diff --git a/lerna.json b/lerna.json index bd19e9a62d2fa7e14bf6d44b8474cef3207fda47..b425e227e2718b202bf23a2f3a47f9c0a30f0835 100644 --- a/lerna.json +++ b/lerna.json @@ -7,7 +7,8 @@ "packages/renderer", "packages/ui-vue", "packages/mobile-ui-vue", - "packages/devkit" + "packages/devkit", + "packages/designer" ], "version": "0.0.0", "useWorkspaces": true, diff --git a/packages/designer/.editorconfig b/packages/designer/.editorconfig deleted file mode 100644 index e89330a618c137cdaccde46f87923736cc04dfb4..0000000000000000000000000000000000000000 --- a/packages/designer/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Editor configuration, see https://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false diff --git a/packages/designer/.gitignore b/packages/designer/.gitignore index f4f46a5feeb99832da5739425488cf171397a413..a547bf36d8d11a4f89c59c144f24795749086dd1 100644 --- a/packages/designer/.gitignore +++ b/packages/designer/.gitignore @@ -1,46 +1,24 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* -# compiled output -/dist -/tmp -/out-tsc -# Only exists if Bazel was run -/bazel-out +node_modules +dist +dist-ssr +*.local -# dependencies -/node_modules - -# profiling files -chrome-profiler-events.json -speed-measure-plugin.json - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode +# Editor directories and files .vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json !.vscode/extensions.json -.history/* - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files +.idea .DS_Store -Thumbs.db +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/packages/designer/.vscode/extensions.json b/packages/designer/.vscode/extensions.json new file mode 100644 index 0000000000000000000000000000000000000000..a7cea0b0678120a1b590d1b6592c7318039b9179 --- /dev/null +++ b/packages/designer/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/packages/designer/README.md b/packages/designer/README.md index fea87685ab867c36c51b8a5fcf5eb2d15a4e4c03..33895ab2002862766f2df205d5783f14cd0c1d74 100644 --- a/packages/designer/README.md +++ b/packages/designer/README.md @@ -1,30 +1,5 @@ +# Vue 3 + TypeScript + Vite -## 如何本地运行项目 +This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` + + diff --git a/packages/designer/package-lock.json b/packages/designer/package-lock.json index 307a1936bc19f4b44c4cce755519e7fff1f7c31c..06e37befdf4760d409f5b6cb813ff621ebae039f 100644 --- a/packages/designer/package-lock.json +++ b/packages/designer/package-lock.json @@ -1,3351 +1,2857 @@ { - "name": "designer", + "name": "@farris/designer", "version": "0.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { - "@angular-devkit/architect": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/architect/-/architect-0.13.10.tgz", - "integrity": "sha512-FC+YmeXwFdNMmqnX1nIOkXBQMxWQSbgYz5crWcb7FtOWTNH1IgM/22tZ6lpf3kiAfTtBbnb7oTkA4Y69nUaoQg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.10", - "rxjs": "6.3.3" - } - }, - "@angular-devkit/build-angular": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/build-angular/-/build-angular-0.13.10.tgz", - "integrity": "sha512-wBWZJh89pPHE06WRoUJ+tdGk+yyMGM+3j0I2gduoxmGvgXXjf48tM4QbXZZSJbHkOeYlCiuP/wiVyTkshzCwGA==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.13.10", - "@angular-devkit/build-optimizer": "0.13.10", - "@angular-devkit/build-webpack": "0.13.10", - "@angular-devkit/core": "7.3.10", - "@ngtools/webpack": "7.3.10", - "ajv": "6.9.1", - "autoprefixer": "9.4.6", - "circular-dependency-plugin": "5.0.2", - "clean-css": "4.2.1", - "copy-webpack-plugin": "5.1.1", - "file-loader": "3.0.1", - "glob": "7.1.3", - "istanbul-instrumenter-loader": "3.0.1", - "karma-source-map-support": "1.3.0", - "less": "3.9.0", - "less-loader": "4.1.0", - "license-webpack-plugin": "2.1.0", - "loader-utils": "1.2.3", - "mini-css-extract-plugin": "0.5.0", - "minimatch": "3.0.4", - "node-sass": "4.13.1", - "open": "6.0.0", - "parse5": "4.0.0", - "postcss": "7.0.14", - "postcss-import": "12.0.1", - "postcss-loader": "3.0.0", - "raw-loader": "1.0.0", - "rxjs": "6.3.3", - "sass-loader": "7.1.0", - "semver": "5.6.0", - "source-map-loader": "0.2.4", - "source-map-support": "0.5.10", - "speed-measure-webpack-plugin": "1.3.1", - "stats-webpack-plugin": "0.7.0", - "style-loader": "0.23.1", - "stylus": "0.54.5", - "stylus-loader": "3.0.2", - "terser-webpack-plugin": "1.4.3", - "tree-kill": "1.2.2", - "webpack": "4.29.0", - "webpack-dev-middleware": "3.5.1", - "webpack-dev-server": "3.1.14", - "webpack-merge": "4.2.1", - "webpack-sources": "1.3.0", - "webpack-subresource-integrity": "1.1.0-rc.6" - } - }, - "@angular-devkit/build-ng-packagr": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/build-ng-packagr/-/build-ng-packagr-0.13.10.tgz", - "integrity": "sha512-e1HB39RT/tnQ9cwk6AhPhyJEaPIwt1O9pphbskeC4layUKzVqPK/Gay4pFhExDXO0vmY4ynqy3EhlllG+AZg/A==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.13.10", - "@angular-devkit/core": "7.3.10", - "rxjs": "6.3.3", - "semver": "5.6.0" - } - }, - "@angular-devkit/build-optimizer": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/build-optimizer/-/build-optimizer-0.13.10.tgz", - "integrity": "sha512-BbavzPeuq6Sy9uC7FwOQ4DhxXvd8xsFkW8t8bXemQwHFP3BqrulxvelVfStJMN6dvXlC3BKXzFQjSX7wAocSdA==", - "dev": true, - "requires": { - "loader-utils": "1.2.3", - "source-map": "0.5.6", - "typescript": "3.2.4", - "webpack-sources": "1.3.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==", - "dev": true - } - } - }, - "@angular-devkit/build-webpack": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/build-webpack/-/build-webpack-0.13.10.tgz", - "integrity": "sha512-TiNW1qLRePWORdme1tglAqK1xnAsyqxDQ5qmo3zPyyw1v253CG+yS2kAEAqiHPKwz8E3h9ETNPoaz6jcaAEWeg==", + "@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", "dev": true, "requires": { - "@angular-devkit/architect": "0.13.10", - "@angular-devkit/core": "7.3.10", - "rxjs": "6.3.3" + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" } }, - "@angular-devkit/core": { - "version": "7.3.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/core/-/core-7.3.10.tgz", - "integrity": "sha512-h8Yj2+UfBsPI7jZ8X88tImO/7RPgNWUcKF8Uq/J5eUSN6z0FMO0lluD4sM7X8aikb7RK8MwkwrqB/xfxvvkOow==", + "@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", "dev": true, "requires": { - "ajv": "6.9.1", - "chokidar": "2.0.4", - "fast-json-stable-stringify": "2.0.0", - "rxjs": "6.3.3", - "source-map": "0.7.3" + "@algolia/autocomplete-shared": "1.9.3" } }, - "@angular-devkit/schematics": { - "version": "7.3.10", - "resolved": "https://registry.npmmirror.com/@angular-devkit/schematics/-/schematics-7.3.10.tgz", - "integrity": "sha512-LMTGQ8kJb80LjTttu0ZqWXddzYtDwjKtMKY9X0A60Iz8/wbGl0j+wYG7KAVoRF0JeieYXs8Dl9KWdjyJyvJ/RA==", + "@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.10", - "rxjs": "6.3.3" + "@algolia/autocomplete-shared": "1.9.3" } }, - "@angular/animations": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/animations/-/animations-7.2.16.tgz", - "integrity": "sha512-jH7haM3Hgtn1EW9b0Vfq6UqSz+rx3l7k+gJi9tuHEOPZdBTjtv3sNQxmM0IKxzOuTfM8KhRFkUlzyi43kfdp0w==", - "requires": { - "tslib": "^1.9.0" - } + "@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmmirror.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true }, - "@angular/cdk": { - "version": "7.3.7", - "resolved": "https://registry.npmmirror.com/@angular/cdk/-/cdk-7.3.7.tgz", - "integrity": "sha512-xbXxhHHKGkVuW6K7pzPmvpJXIwpl0ykBnvA2g+/7Sgy5Pd35wCC+UtHD9RYczDM/mkygNxMQtagyCErwFnDtQA==", + "@algolia/cache-browser-local-storage": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.24.0.tgz", + "integrity": "sha512-t63W9BnoXVrGy9iYHBgObNXqYXM3tYXCjDSHeNwnsc324r4o5UiVKUiAB4THQ5z9U5hTj6qUvwg/Ez43ZD85ww==", + "dev": true, "requires": { - "parse5": "^5.0.0", - "tslib": "^1.7.1" - }, - "dependencies": { - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmmirror.com/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", - "optional": true - } + "@algolia/cache-common": "4.24.0" } }, - "@angular/cli": { - "version": "7.3.10", - "resolved": "https://registry.npmmirror.com/@angular/cli/-/cli-7.3.10.tgz", - "integrity": "sha512-ikSwYa3Pc8GkfyoQ+bzblxyuPnKzNYD6SRVbO4CXUbTJB+NmOCNEV3LTwwMANVBp4Z6fBMdUZccJdFbT4FbG2Q==", + "@algolia/cache-common": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/cache-common/-/cache-common-4.24.0.tgz", + "integrity": "sha512-emi+v+DmVLpMGhp0V9q9h5CdkURsNmFC+cOS6uK9ndeJm9J4TiqSvPYVu+THUP8P/S08rxf5x2P+p3CfID0Y4g==", + "dev": true + }, + "@algolia/cache-in-memory": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/cache-in-memory/-/cache-in-memory-4.24.0.tgz", + "integrity": "sha512-gDrt2so19jW26jY3/MkFg5mEypFIPbPoXsQGQWAi6TrCPsNOSEYepBMPlucqWigsmEy/prp5ug2jy/N3PVG/8w==", "dev": true, "requires": { - "@angular-devkit/architect": "0.13.10", - "@angular-devkit/core": "7.3.10", - "@angular-devkit/schematics": "7.3.10", - "@schematics/angular": "7.3.10", - "@schematics/update": "0.13.10", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "inquirer": "6.2.1", - "npm-package-arg": "6.1.0", - "open": "6.0.0", - "pacote": "9.4.0", - "semver": "5.6.0", - "symbol-observable": "1.2.0" + "@algolia/cache-common": "4.24.0" } }, - "@angular/common": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/common/-/common-7.2.16.tgz", - "integrity": "sha512-lPo2Vt5zmKeKTdMxHMUuViouMiK4QsmO6dGTIhJ7QAx9mov0QYb4sUVKN9Ix32Aeeznaa97qJnhevyDncJqvSA==", + "@algolia/client-account": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/client-account/-/client-account-4.24.0.tgz", + "integrity": "sha512-adcvyJ3KjPZFDybxlqnf+5KgxJtBjwTPTeyG2aOyoJvx0Y8dUQAEOEVOJ/GBxX0WWNbmaSrhDURMhc+QeevDsA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@algolia/client-common": "4.24.0", + "@algolia/client-search": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@angular/compiler": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/compiler/-/compiler-7.2.16.tgz", - "integrity": "sha512-8iX+E9Cnet2167RdP8wM5PGPoEnw/jZNvHrtTRHs4g53n/Rg45iLmE9qFzxCqXGBmUO9LXKYdcXnettFKFLifg==", + "@algolia/client-analytics": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/client-analytics/-/client-analytics-4.24.0.tgz", + "integrity": "sha512-y8jOZt1OjwWU4N2qr8G4AxXAzaa8DBvyHTWlHzX/7Me1LX8OayfgHexqrsL4vSBcoMmVw2XnVW9MhL+Y2ZDJXg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@algolia/client-common": "4.24.0", + "@algolia/client-search": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@angular/compiler-cli": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/compiler-cli/-/compiler-cli-7.2.16.tgz", - "integrity": "sha512-3PK0Rlepvsy+MSw5oZEl26j+7E1hBI42T5+7hpZxf/c3vcPRORZ71oR3Ez/q51D2rkvovv8m8Ihv0Xjs0xDibQ==", + "@algolia/client-common": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/client-common/-/client-common-4.24.0.tgz", + "integrity": "sha512-bc2ROsNL6w6rqpl5jj/UywlIYC21TwSSoFHKl01lYirGMW+9Eek6r02Tocg4gZ8HAw3iBvu6XQiM3BEbmEMoiA==", "dev": true, "requires": { - "canonical-path": "1.0.0", - "chokidar": "^2.1.1", - "convert-source-map": "^1.5.1", - "dependency-graph": "^0.7.2", - "magic-string": "^0.25.0", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", - "source-map": "^0.6.1", - "tslib": "^1.9.0", - "yargs": "13.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "yargs": { - "version": "13.1.0", - "resolved": "https://registry.npmmirror.com/yargs/-/yargs-13.1.0.tgz", - "integrity": "sha512-1UhJbXfzHiPqkfXNHYhiz79qM/kZqjTE8yGlEjZa85Q+3+OwcV6NRkV7XOV1W2Eom2bzILeUn55pQYffjVOLAg==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@angular/core": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/core/-/core-7.2.16.tgz", - "integrity": "sha512-z1RuBinuYeC4KLv8Z95YOgIQLd4nkoApdxkIZaWALwSkgeBuHJn4bCBn2cL0gJ/KO2x18TiTU5HuC+uyBt0AVQ==", + "@algolia/client-personalization": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/client-personalization/-/client-personalization-4.24.0.tgz", + "integrity": "sha512-l5FRFm/yngztweU0HdUzz1rC4yoWCFo3IF+dVIVTfEPg906eZg5BOd1k0K6rZx5JzyyoP4LdmOikfkfGsKVE9w==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@angular/forms": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/forms/-/forms-7.2.16.tgz", - "integrity": "sha512-50JTXco6w1HOi5o6RQ6PVSR0tD4Y2aRcCFBfLXvzDi78aZOSEdOYaSm78RDUNzGCbjwdMCIbX8eOdQgUUtsEFA==", + "@algolia/client-search": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/client-search/-/client-search-4.24.0.tgz", + "integrity": "sha512-uRW6EpNapmLAD0mW47OXqTP8eiIx5F6qN9/x/7HHO6owL3N1IXqydGwW5nhDFBrV+ldouro2W1VX3XlcUXEFCA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@algolia/client-common": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@angular/language-service": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/language-service/-/language-service-7.2.16.tgz", - "integrity": "sha512-a/Bqf19+YhqACxQOkpYB0HK/zjHqDrZVUyBtdiX17njuvlWgD4wvdtdxae//ZeIVHNDJS+G5Gelbe+Yzon+VGA==", + "@algolia/logger-common": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/logger-common/-/logger-common-4.24.0.tgz", + "integrity": "sha512-LLUNjkahj9KtKYrQhFKCzMx0BY3RnNP4FEtO+sBybCjJ73E8jNdaKJ/Dd8A/VA4imVHP5tADZ8pn5B8Ga/wTMA==", "dev": true }, - "@angular/platform-browser": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/platform-browser/-/platform-browser-7.2.16.tgz", - "integrity": "sha512-6LltxoPlbtUgSec5a+BGPHZ0UYdqFizxSsplC1PoJdqH17DDxQjxcluAfXnLlvOYFSSPvYa73PSOpmUU2vp4gA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.16.tgz", - "integrity": "sha512-xsQ0qB54h7oY5UATK9VW25Y4dvG7uQe9+X4cf/GWB+R3eCzP8J9Ekxs4VU9y2ujlQkD64PV8gpKu0FHFh7wjIQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "7.2.16", - "resolved": "https://registry.npmmirror.com/@angular/router/-/router-7.2.16.tgz", - "integrity": "sha512-SXDfkoGVUHhy83K+sR+39mmqTs4nSUh4DZbhFe4gii+mgAtBvlbeH8KBCqPNf7xq24aadyI2LCSGnGwgVKmXrA==", + "@algolia/logger-console": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/logger-console/-/logger-console-4.24.0.tgz", + "integrity": "sha512-X4C8IoHgHfiUROfoRCV+lzSy+LHMgkoEEU1BbKcsfnV0i0S20zyy0NLww9dwVHUWNfPPxdMU+/wKmLGYf96yTg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@algolia/logger-common": "4.24.0" } }, - "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "@algolia/recommend": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/recommend/-/recommend-4.24.0.tgz", + "integrity": "sha512-P9kcgerfVBpfYHDfVZDvvdJv0lEoCvzNlOy2nykyt5bK8TyieYyiD0lguIJdRZZYGre03WIAFf14pgE+V+IBlw==", "dev": true, "requires": { - "@babel/highlight": "^7.22.5" + "@algolia/cache-browser-local-storage": "4.24.0", + "@algolia/cache-common": "4.24.0", + "@algolia/cache-in-memory": "4.24.0", + "@algolia/client-common": "4.24.0", + "@algolia/client-search": "4.24.0", + "@algolia/logger-common": "4.24.0", + "@algolia/logger-console": "4.24.0", + "@algolia/requester-browser-xhr": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/requester-node-http": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "@babel/generator": { - "version": "7.22.7", - "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.22.7.tgz", - "integrity": "sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==", + "@algolia/requester-browser-xhr": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.24.0.tgz", + "integrity": "sha512-Z2NxZMb6+nVXSjF13YpjYTdvV3032YTBSGm2vnYvYPA6mMxzM3v5rsCiSspndn9rzIW4Qp1lPHBvuoKJV6jnAA==", "dev": true, "requires": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - } + "@algolia/requester-common": "4.24.0" } }, - "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "@algolia/requester-common": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/requester-common/-/requester-common-4.24.0.tgz", + "integrity": "sha512-k3CXJ2OVnvgE3HMwcojpvY6d9kgKMPRxs/kVohrwF5WMr2fnqojnycZkxPoEg+bXm8fi5BBfFmOqgYztRtHsQA==", "dev": true }, - "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "@algolia/requester-node-http": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/requester-node-http/-/requester-node-http-4.24.0.tgz", + "integrity": "sha512-JF18yTjNOVYvU/L3UosRcvbPMGT9B+/GQWNWnenIImglzNVGpyzChkXLnrSf6uxwVNO6ESGu6oN8MqcGQcjQJw==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@algolia/requester-common": "4.24.0" } }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "@algolia/transporter": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/@algolia/transporter/-/transporter-4.24.0.tgz", + "integrity": "sha512-86nI7w6NzWxd1Zp9q3413dRshDqAzSbsQjhcDhPIatEFiZrL1/TjnHL8S7jVKFePlIMzDsZWXAXwXzcok9c5oA==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@algolia/cache-common": "4.24.0", + "@algolia/logger-common": "4.24.0", + "@algolia/requester-common": "4.24.0" } }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "requires": { - "@babel/types": "^7.22.5" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "@arr/every": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@arr/every/-/every-1.0.1.tgz", + "integrity": "sha512-UQFQ6SgyJ6LX42W8rHCs8KVc0JS0tzVL9ct4XYedJukskYVWTo49tNiMEK9C2HTyarbNiT/RVIRSY82vH+6sTg==", "dev": true }, - "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + } + }, + "@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", "dev": true }, - "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" }, "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, - "@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", - "dev": true + "@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + } }, - "@babel/runtime": { - "version": "7.22.6", - "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.6.tgz", - "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", + "@babel/helper-annotate-as-pure": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", + "dev": true, "requires": { - "regenerator-runtime": "^0.13.11" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" - } + "@babel/types": "^7.24.7" } }, - "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", + "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" + "@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "ms": "2.1.2" + "yallist": "^3.0.2" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } }, - "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "@babel/helper-create-class-features-plugin": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz", + "integrity": "sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "semver": "^6.3.1" }, "dependencies": { - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, - "@farris/app-navigation-be": { - "version": "0.0.12", - "resolved": "https://registry.npmmirror.com/@farris/app-navigation-be/-/app-navigation-be-0.0.12.tgz", - "integrity": "sha512-6gP38cwq7VlOcOLeAoZC3dfVK+OhJgBXc9u7/V+qZ99gQybXCfY/a+jknFzI2/WFQnDEC09HcdAMUmvl3uDbUA==", + "@babel/helper-create-regexp-features-plugin": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz", + "integrity": "sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } } }, - "@farris/app-navigation-selector": { - "version": "0.0.7", - "resolved": "https://registry.npmmirror.com/@farris/app-navigation-selector/-/app-navigation-selector-0.0.7.tgz", - "integrity": "sha512-kisWwmiPuK2G//kI4M/+gL9cp0tRduMcJlHLdFnOG22xz3CCOUOQQsCXVFe1X0uE0Vbrr7gEGN++YoZ9Lj/24A==", + "@babel/helper-define-polyfill-provider": { + "version": "0.6.2", + "resolved": "https://registry.npmmirror.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" } }, - "@farris/colorpicker-plus": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@farris/colorpicker-plus/-/colorpicker-plus-0.0.5.tgz", - "integrity": "sha512-WSGt3q8UvgOVtGLu+W4zHj/Y9x0Ed9NqaYm3p0CZLHaIC24xeBnJVpDnBOfrXtb9hjI7fwp78inIpgOPs/GgxA==", - "requires": { - "@angular/animations": "~7.2.0", - "@angular/common": "~7.2.0", - "@angular/compiler": "~7.2.0", - "@angular/core": "~7.2.0", - "@angular/forms": "~7.2.0", - "@angular/platform-browser": "~7.2.0", - "@angular/platform-browser-dynamic": "~7.2.0", - "@angular/router": "~7.2.0", - "@farris/discussion-group": "0.0.24", - "@farris/dynamic-control-group": "0.1.11", - "@farris/extend-header-footer": "^0.0.4", - "@farris/extend-page-modal": "^0.0.9", - "@farris/extend-scroll-collapsible-area": "^0.0.2", - "@farris/header-group-editor": "^0.0.20", - "@farris/smooth-dnd": "^0.0.1", - "@farris/tags": "^0.0.11", - "@farris/ui-area-response": "^0.0.2", - "@farris/ui-avatar": "^0.0.18", - "@farris/ui-batch-edit-dialog": "^0.0.13", - "@farris/ui-button": "^0.1.3", - "@farris/ui-calculator": "^0.0.1", - "@farris/ui-calendar": "^0.0.7", - "@farris/ui-color-picker": "^0.0.4", - "@farris/ui-combo-list": "^0.2.17", - "@farris/ui-combo-lookup": "^0.2.0", - "@farris/ui-common": "^0.3.26", - "@farris/ui-context-menu": "0.0.9", - "@farris/ui-datagrid": "^1.2.2", - "@farris/ui-datagrid-editors": "^0.3.18", - "@farris/ui-datagrid-filter": "^0.1.3", - "@farris/ui-datagrid-settings": "^0.3.1", - "@farris/ui-datalist": "^0.1.0", - "@farris/ui-datatable": "^0.3.3", - "@farris/ui-datepicker": "^0.7.5", - "@farris/ui-dialog": "^0.2.5", - "@farris/ui-draggable": "^0.1.0", - "@farris/ui-dropdown": "^0.1.3", - "@farris/ui-editor": "^0.0.21", - "@farris/ui-enum-editor": "^0.1.1", - "@farris/ui-feature-editor": "^0.0.6", - "@farris/ui-field-group": "^0.0.23", - "@farris/ui-filter": "^0.1.3", - "@farris/ui-filter-condition": "^0.0.9", - "@farris/ui-filter-editor": "^0.3.4", - "@farris/ui-filter-panel": "^0.1.3", - "@farris/ui-flex-layout": "^0.0.3", - "@farris/ui-footer": "^0.0.2", - "@farris/ui-forms": "^0.3.8", - "@farris/ui-html-editor": "^0.0.29", - "@farris/ui-input-group": "^0.2.18", - "@farris/ui-language-textbox": "^0.1.24", - "@farris/ui-layout": "^0.1.0", - "@farris/ui-list-filter": "^0.1.19", - "@farris/ui-list-nav": "^0.0.17", - "@farris/ui-list-view": "^0.1.7", - "@farris/ui-loading": "^0.2.2", - "@farris/ui-locale": "^0.3.3", - "@farris/ui-lookup": "^0.9.0", - "@farris/ui-messager": "^0.2.32", - "@farris/ui-modal": "^0.1.21", - "@farris/ui-multi-select": "^0.2.15", - "@farris/ui-nav": "^0.0.4", - "@farris/ui-notify": "^0.1.8", - "@farris/ui-number-spinner": "^0.4.12", - "@farris/ui-pagination": "^0.2.18", - "@farris/ui-panel": "^0.0.5", - "@farris/ui-perfect-scrollbar": "^0.0.8", - "@farris/ui-popover": "^0.1.2", - "@farris/ui-progress": "^0.0.2", - "@farris/ui-progress-step": "^0.0.25", - "@farris/ui-rate": "^0.0.4", - "@farris/ui-response-toolbar": "^0.1.29", - "@farris/ui-responsive": "^0.0.2", - "@farris/ui-scrollspy": "^0.0.30", - "@farris/ui-section": "^0.1.12", - "@farris/ui-shortcuts": "^0.0.4", - "@farris/ui-sidebar": "^0.1.5", - "@farris/ui-sort-editor": "^0.2.1", - "@farris/ui-splitter": "^0.0.5", - "@farris/ui-switch": "^0.1.10", - "@farris/ui-tabs": "^0.2.16", - "@farris/ui-tag": "^0.0.2", - "@farris/ui-text": "^0.1.34", - "@farris/ui-time-picker": "^0.2.2", - "@farris/ui-time-spinner": "^0.0.9", - "@farris/ui-tooltip": "^0.0.26", - "@farris/ui-treetable": "^0.5.3", - "@farris/ui-view-change": "^0.0.6", - "@farris/ui-wizard": "^0.0.29", - "@fullcalendar/core": "4.4.2", - "@fullcalendar/daygrid": "4.4.2", - "@fullcalendar/interaction": "4.4.2", - "@fullcalendar/timegrid": "4.4.2", - "acorn": "^8.8.0", - "angular-monaco-editor": "^1.10.0", - "bignumber.js": "^9.0.2", - "core-js": "^2.5.4", - "date-fns": "^2.28.0", - "file-saver": "^2.0.5", - "jszip": "^3.7.1", - "jszip-utils": "^0.1.0", - "lodash-es": "^4.17.21", - "perfect-scrollbar": "^1.5.5", - "resize-observer-polyfill": "^1.5.1", - "rxjs": "~6.3.3", - "rxjs-compat": "^6.5.1", - "tslib": "^1.9.0", - "zone.js": "~0.8.26" - }, - "dependencies": { - "@farris/smooth-dnd": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@farris/smooth-dnd/-/smooth-dnd-0.0.1.tgz", - "integrity": "sha512-mbXFt4iy8u4wHAi0TdFR3fsdMea0WloKcak2wKKt0pthsds/ajsHhPTIiH69mGDrmJKwK1kJqVa6QT2PYBviOA==" - }, - "@farris/ui-area-response": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-area-response/-/ui-area-response-0.0.2.tgz", - "integrity": "sha512-A+HORSY1P0w+ni5OEbHx4/s/NI3UfcVRmwC6L/GeshQYCKmreJvnKRfNZoe5/PFnWY5PRFzcXo5pBcx+pWI6Hg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-combo-list": { - "version": "0.2.17", - "resolved": "https://registry.npmmirror.com/@farris/ui-combo-list/-/ui-combo-list-0.2.17.tgz", - "integrity": "sha512-hW8adcl/tUAydWfjIrGlVw5M6p8oO0ppZCuxNEz3ZOvJaM7Zdgcbouub2kbtAPGxZU48Al86nhydqSaauRe6Yg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-combo-lookup": { - "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-combo-lookup/-/ui-combo-lookup-0.2.0.tgz", - "integrity": "sha512-+Vb8XYv2BAMYT4xBs3d3v7M9mJ1i8ewtNqNF7HimbSFP3qFllthGKAzTA3wcKW5FkEtw1urpmNR0Ax9CxHNlrQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-common": { - "version": "0.3.26", - "resolved": "https://registry.npmmirror.com/@farris/ui-common/-/ui-common-0.3.26.tgz", - "integrity": "sha512-frsOtNdm3E6x9O4MbHPDVRxmNHvX4kcFrTc+cxFAxvugwL4/TOGGWPYUFQYbhByHE69pLKO1aOOGW3S8liUsCg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-context-menu": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/@farris/ui-context-menu/-/ui-context-menu-0.0.9.tgz", - "integrity": "sha512-YUu5KFefLQ+93i2cq4WRMOVo5XlDBC94Zk9mIAxEnqVhDAlBNpXZRVxQIBpOe+SU/rPT3cN0UbZ+eE4hbyrDIQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datagrid": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@farris/ui-datagrid/-/ui-datagrid-1.2.2.tgz", - "integrity": "sha512-/7BUAJ8oohnUVbCdcb5P5U6RCR5FLCve2Nkd6+FmFWcsCbFAoCEPW8ur5qu/K6RpbpNMGzotMsWaoS4ZRtFcrw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datagrid-editors": { - "version": "0.3.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid-editors/-/ui-datagrid-editors-0.3.18.tgz", - "integrity": "sha512-jTTaSkV1eu7Xxw/GBX6+W8P4MW2m+//Go4bJY0YKypGsT733nRWug0be4wU5QzqWhD/8Inlr9nbkSu8tmrsM1Q==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datagrid-filter": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid-filter/-/ui-datagrid-filter-0.1.3.tgz", - "integrity": "sha512-/h0TINzGq2fisJp6F8iERkhkbQnkTCINrNrEoikP6mZJIaVgiUuzRVAuL7RPQJnJXR5Prq1dkbBMslZHBHKxhw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datalist": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-datalist/-/ui-datalist-0.1.0.tgz", - "integrity": "sha512-BksgqNbX1uGWRC9NYrSoCKdNXco5UM8vCrzUCLogaqxbBQbhd6s80Rxrw5vpPL7gNT46FsaZQs634tP+aleT8w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datatable": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@farris/ui-datatable/-/ui-datatable-0.3.3.tgz", - "integrity": "sha512-/fiA502YdW0ZqihPxFFRduTrYiHlz8BvT9tbqpHi/i21A2Gk6AIT3GWfwSb7/UMiAWgMOXbCnlna/LrtRwIS6w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-datepicker": { - "version": "0.7.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-datepicker/-/ui-datepicker-0.7.5.tgz", - "integrity": "sha512-83P4eHDNgpH5wCEUpbtSs+HLQ44PR7RKA3Ub5+Y53o0rN6NeANCmPMtpGPZX2EaeIw9rpi8+Ti3omlfYp7Ibww==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-dialog": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-dialog/-/ui-dialog-0.2.5.tgz", - "integrity": "sha512-Jd1E/2vRwiLC8lIfxO6M6cH3nFYFN6bgus6NKcjdbeIvREfxDcxtn68NjSuCqDA3A212o4BQFfIkJ2QjNe/2uQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-draggable": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-draggable/-/ui-draggable-0.1.0.tgz", - "integrity": "sha512-j4Wtk4gZRznblMPeIrfWiRg7hSS6cUf79OVlbcVC7Boh49x5sNjWnUPTiaKJh7WaSYsdTbT7VmbcTySCGJ/Llw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-editor": { - "version": "0.0.21", - "resolved": "https://registry.npmmirror.com/@farris/ui-editor/-/ui-editor-0.0.21.tgz", - "integrity": "sha512-V/FRMWWZGtBso8jrjK9i1UFm7KuJILroDaALy1cpxqB+u03SveDAkkYCerT/BPAeNuZGquWrPV0j1jWjheMB4w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-filter": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter/-/ui-filter-0.1.3.tgz", - "integrity": "sha512-Yedx/SnjCBsv/xtP2Y4wMPmOs3HF1H6agarZe9n+e7MJA193EVv058+PI39JK9EimBs4lKNsfmZu4ufiztHtFg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-filter-condition": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-condition/-/ui-filter-condition-0.0.9.tgz", - "integrity": "sha512-2hBNAfk74GVNM5MNYj+YgFptXpVYnGxU5ZvFqphhmMmrglM8S4hWIICPbvjH9xjCpP2twIb6B3VGvnXRwVlnVQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-filter-editor": { - "version": "0.3.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-editor/-/ui-filter-editor-0.3.4.tgz", - "integrity": "sha512-DE2J2VfXxL3c5U+VKoje98aT+43dvuEONp9JTRMxveoTug7r+MHA488cfKugJtvCQ6lsWt3QnfSJpb7OUeFa6g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-filter-panel": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-panel/-/ui-filter-panel-0.1.3.tgz", - "integrity": "sha512-RN0G1UOmQe+GfvmlYOa+6US22TuchiqVr3yEFuguBIfBdSHrdP1f26j68h62Q0bs3vfc/kzIZg+mLtoRO1GCzw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-forms": { - "version": "0.3.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-forms/-/ui-forms-0.3.8.tgz", - "integrity": "sha512-oCsQOnN2T8+2TOHA+xD8bCW6qNEMNaFuVpil2DkdJNb6tWLc9er9ePgbrl7Hz8+V1LTozzT9SSjo6bOlpHamQA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-input-group": { - "version": "0.2.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-input-group/-/ui-input-group-0.2.18.tgz", - "integrity": "sha512-kiFJwQiyxhMonepttVkLTefbkY9d13Fcxege3Tjyfm42YzFzZaekG0+6y3K5AcF6CWBSGO3xRPq7lm8PJvNxKQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-language-textbox": { - "version": "0.1.24", - "resolved": "https://registry.npmjs.org/@farris/ui-language-textbox/-/ui-language-textbox-0.1.24.tgz", - "integrity": "sha512-dr3OET+o+BVskCOYg6gCkjSJ4qqg0dFogWD7pgBxkOO/Dbt1Vq2qSgfSEpA7ACnR3kPzpH/KxQf28/KXDy7Dyg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-layout": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-layout/-/ui-layout-0.1.0.tgz", - "integrity": "sha512-Hy3O37hxfvyOFwcguQtCfBiHz9tioxzICK56iu34MKwAU2lMlUB6zfxftY9WlAc151VnJzIk/mD8532e9n56Nw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-loading": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-loading/-/ui-loading-0.2.2.tgz", - "integrity": "sha512-D5dIpimT4v8GAdFUcPRgmdFqQSviRPuBZNpvL7u7IFuz/FLoKSR7YZpcKQkF46DGhObuJHAnHHyl6XRdlAXdTA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-locale": { - "version": "0.3.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-locale/-/ui-locale-0.3.3.tgz", - "integrity": "sha512-9qrWpOTcnUKqLl5cWIGcAHtUBLuw8S7Ofqj/iKEd7etZYCpHfILGro4tUtcRYgaMFOhXMp7DIobEoBr4B2nc2w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-lookup": { - "version": "0.9.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-lookup/-/ui-lookup-0.9.0.tgz", - "integrity": "sha512-GmAcp+hgU2S0cPcWXKymjkOFSzVOHdsxeIvA0MlEIsOKLyouVsYukOM2IWNuuqzWZ/ZecjUUnWxfURd3PEdt/g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-messager": { - "version": "0.2.32", - "resolved": "https://registry.npmmirror.com/@farris/ui-messager/-/ui-messager-0.2.32.tgz", - "integrity": "sha512-QV84UMoIEOSajQLG7DD9HmGdb/qs+YP4CA1EsAkWXj+6fgV7uUig8H0+iVDbGrWz4AcDlJ9t4RhgZGR4f+2ikA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-modal": { - "version": "0.1.21", - "resolved": "https://registry.npmmirror.com/@farris/ui-modal/-/ui-modal-0.1.21.tgz", - "integrity": "sha512-G8zxYczK7a/BiPDpMrnMQad2fZC3eNxJCUbKBk3dVVhEQEwfb4SYBGE32xu9L/TudffShi1Rj2fT3dB6XxeyvA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-notify": { - "version": "0.1.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-notify/-/ui-notify-0.1.8.tgz", - "integrity": "sha512-fiQcDLMkX3MON2xOGNOkDkWeDOsrFpt6Vdz5hNfpxjNIP03zmlIlObZyHM9AscpJD+nVNA3dAGZWOsNqLhoytQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-number-spinner": { - "version": "0.4.12", - "resolved": "https://registry.npmmirror.com/@farris/ui-number-spinner/-/ui-number-spinner-0.4.12.tgz", - "integrity": "sha512-OpQ/4EnBsMAF1m6sZXif0/yDrQf9UUz/fh2Tmzzh21YhMb9kYV3ei9RmT5oDutwBu3NZBHRZCbYUj/dCDOWHMg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-pagination": { - "version": "0.2.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-pagination/-/ui-pagination-0.2.18.tgz", - "integrity": "sha512-IF2lULoocXdNm8EgpSzwW+IB5a8zLdIm5edJ8glhhnrYTQurv2VpeOxaHywrVQtDn9jwEF9CJDlJdC1vdn5u4g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-perfect-scrollbar": { - "version": "0.0.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-perfect-scrollbar/-/ui-perfect-scrollbar-0.0.8.tgz", - "integrity": "sha512-wu9RKEZzy2mqBX4s0nL8S4KCxtYCZ40TdFSKi2h9jF/yoPYENY0KB2IAlU/iPOy6dA9P5f/qSqisqyx9cg562Q==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-popover": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-popover/-/ui-popover-0.1.2.tgz", - "integrity": "sha512-rpTiFm4FNxxbIFxJy5oixdbcBh0d6aelyFfiCA0ms4o0vRt1s7y2a3GKmiJg/YJYGLRDfwmSp6VyCL2Gnvf/ug==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-progress-step": { - "version": "0.0.25", - "resolved": "https://registry.npmmirror.com/@farris/ui-progress-step/-/ui-progress-step-0.0.25.tgz", - "integrity": "sha512-hV6FXBnZCT/Hi5WzyFECHhqLR6eH/POrYQewkHYqMhl1zSvYmAp9RmRtRRTyBrPOfZjsNnNOA1pgCRTKcnwxIg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-shortcuts": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-shortcuts/-/ui-shortcuts-0.0.4.tgz", - "integrity": "sha512-mLad9J1ca3fq6ijaDht8WmQ3x/u41u2edb0Ky/pJPsbLdzXBYPtApIUitcRmpQ4kLeZGXDD6q0oZfwMCDPOhRw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-sidebar": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-sidebar/-/ui-sidebar-0.1.5.tgz", - "integrity": "sha512-PIOlztKaGt4JPGxkfGuBiCYO0P8FG9UonY0z6TIE9xyH12rV4NGccYC6VcBeYVS0ag2ix4XnVOd8v+CJLMZD6w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-switch": { - "version": "0.1.10", - "resolved": "https://registry.npmmirror.com/@farris/ui-switch/-/ui-switch-0.1.10.tgz", - "integrity": "sha512-BYs1tHqOhwNiRVABQgM0Rr3Knzuzjl13n3sdvhCrbVj4VhDBNLrbuHSrSu/HroxD003n6bEZOcXEOqFPBuG0YQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-tabs": { - "version": "0.2.16", - "resolved": "https://registry.npmmirror.com/@farris/ui-tabs/-/ui-tabs-0.2.16.tgz", - "integrity": "sha512-R0uxwGjME2odnEJUBk1KClCgQK0wA/I6RbN4HwRIsbpmIr0bERs9YeTkCKFHR29vO/4WOzwQ11FGK6QXDiO8uA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-time-picker": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-time-picker/-/ui-time-picker-0.2.2.tgz", - "integrity": "sha512-5C42Bh3epfDN95iW1qSUqUoUn4329TmGFrfRSiisn0U3/dGnrxvAZWIE3uun8cKptvI2dvPjCxqwmbWHzziqog==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-tooltip": { - "version": "0.0.26", - "resolved": "https://registry.npmmirror.com/@farris/ui-tooltip/-/ui-tooltip-0.0.26.tgz", - "integrity": "sha512-2F6dVAnedfS0tqEBxbzNkxWidrW5qIOBACFhaQQ0Wrgj+FTYC0bx+Zk5E8eOsqrJAt6EZLZgIPQJUsDU6BlkIA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-treetable": { - "version": "0.5.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-treetable/-/ui-treetable-0.5.3.tgz", - "integrity": "sha512-Bf2OHn6LnkPipTQKyA/PjeipDJDcTN7N3lIkMPkHspn9lUZGFsDemEaMmbtpkclxeIEtI9Mhv+RjmZGbH+cEig==", - "requires": { - "tslib": "^1.9.0" - } - }, - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" - }, - "bignumber.js": { - "version": "9.1.1", - "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.1.tgz", - "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==" - } + "@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "requires": { + "@babel/types": "^7.24.7" } }, - "@farris/designer-dragula": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/designer-dragula/-/designer-dragula-0.0.2.tgz", - "integrity": "sha512-ZzlHjVlnT6oAew/lLfFE9vZxhCQaOTlERCn2ItPB7qMqsioDxMyphwVCT2krjnS/1Y+2lPXRuLtxePVos+gFaw==" - }, - "@farris/discussion-group": { - "version": "0.0.24", - "resolved": "https://registry.npmmirror.com/@farris/discussion-group/-/discussion-group-0.0.24.tgz", - "integrity": "sha512-oeY09PILKmtQ6X/TUNQGUCGWCnVPRrDzIrufXVasmgAMgBi5KxC8ga/Wx2zmes/eM3vWlKim29w+c17nE8wH+w==", + "@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/dynamic-control-group": { - "version": "0.1.11", - "resolved": "https://registry.npmmirror.com/@farris/dynamic-control-group/-/dynamic-control-group-0.1.11.tgz", - "integrity": "sha512-hob8XSZaRnMxc4pGzQSNroH3Z+PAfgU39bMScPMblMSoaSmHjtS1P4bZfdjfzsmKKaeiqlgSsuyuXKy0b5Z9mA==", + "@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/types": "^7.24.7" } }, - "@farris/extend-header-footer": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/extend-header-footer/-/extend-header-footer-0.0.4.tgz", - "integrity": "sha512-2xxEBwsDFiU/jE+OokKVnr3DONSbduk89HGw+PrlB5nF1gGgGd2gWpIABlt2AowcOVIQKonxNvQ0+/KO5wLn6g==", + "@babel/helper-member-expression-to-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz", + "integrity": "sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/extend-page-modal": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/@farris/extend-page-modal/-/extend-page-modal-0.0.9.tgz", - "integrity": "sha512-Vn+Xurj2kD6BBjBM1UZuJojydNngt/Ds2U/IbRoeGlp9u0P3+fVBbgBS7ENEP7ixKNTQl1cvQXsNFRdLYQb0Mg==", + "@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/extend-scroll-collapsible-area": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/extend-scroll-collapsible-area/-/extend-scroll-collapsible-area-0.0.2.tgz", - "integrity": "sha512-yK3cnWXYbdCXegzM2CCBupgxQFw7yrtz+wb3VrrZ7aHiduSJHPRRv4GkCkEAtseCSyg7Fo9tEwH+GZJsGrN+PA==", + "@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" } }, - "@farris/header-group-editor": { - "version": "0.0.20", - "resolved": "https://registry.npmmirror.com/@farris/header-group-editor/-/header-group-editor-0.0.20.tgz", - "integrity": "sha512-3ZKCbTTSUi2IOx0JwLPjrjY+g1gYkx/aAOd8u09ZzfnaoixYYZo76rrWG2/Zbf/nvBuHXD5rQVBAJ01BYsh0Yg==", + "@babel/helper-optimise-call-expression": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/types": "^7.24.7" } }, - "@farris/ide-devkit": { - "version": "1.0.39", - "resolved": "https://registry.npmmirror.com/@farris/ide-devkit/-/ide-devkit-1.0.39.tgz", - "integrity": "sha512-+LC1vbSlf/OjlzRpbuq/jgF6OH/k3xnZQQ+wDSaFjwK4c6jGiKkUtjw1ZdkNqPhFUMBELeFYbzLGzfgCxzsSkQ==", + "@babel/helper-plugin-utils": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz", + "integrity": "sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-wrap-function": "^7.24.7" } }, - "@farris/ide-property-panel": { - "version": "0.0.1-ubml", - "resolved": "https://registry.npmjs.org/@farris/ide-property-panel/-/ide-property-panel-0.0.1-ubml.tgz", - "integrity": "sha512-f8sw2NjYdwy5/pK5uyeWkk/KJQj6P7pn5IdG2gtaim6wqTAM7J0wIGRJOv4gLF2OJPf5FJkurM9SZWA1IsC43w==", + "@babel/helper-replace-supers": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz", + "integrity": "sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.7", + "@babel/helper-optimise-call-expression": "^7.24.7" } }, - "@farris/on-change": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/@farris/on-change/-/on-change-0.0.3.tgz", - "integrity": "sha512-rdNGseNOyve+ebO+n62TGPbeUNgmVzQ84wkvUYkMDYzc9S522qmmMr1KxUHvcRwhpP5HkT4CCHN/A848YAlESw==" - }, - "@farris/property-editor": { - "version": "0.0.12", - "resolved": "https://registry.npmmirror.com/@farris/property-editor/-/property-editor-0.0.12.tgz", - "integrity": "sha512-RPhJbRPZ866DKb71V2839mZNYgH9C3pIiZiTGTwL1vqrneCm0Aw27bjcfIdCkt1aEHi7K/2ZN80EvU4ugjJtHw==", + "@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/response-layout-editor": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/@farris/response-layout-editor/-/response-layout-editor-0.0.10.tgz", - "integrity": "sha512-RDckxkUIKcbN1Qw4ZvI3dY3D4TjBsXDUyrv7O3eyR69aaPktsbJSkvFvpU31xGiMXFOQzDgcTe9BsFM/9Wqqwg==", + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/rich-text-designer": { - "version": "0.0.6", - "resolved": "https://registry.npmmirror.com/@farris/rich-text-designer/-/rich-text-designer-0.0.6.tgz", - "integrity": "sha512-15Td6pjIbQJt41IwuQ9ZmvtAqWhLTlK8ay1v5IaOL4hahtof5PGGoDzV3cIf7Nc604bbg0mW6NcWdKqqSWC+ZQ==", + "@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/types": "^7.24.7" } }, - "@farris/smooth-dnd": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/@farris/smooth-dnd/-/smooth-dnd-0.0.1.tgz", - "integrity": "sha512-mbXFt4iy8u4wHAi0TdFR3fsdMea0WloKcak2wKKt0pthsds/ajsHhPTIiH69mGDrmJKwK1kJqVa6QT2PYBviOA==" + "@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true }, - "@farris/tags": { - "version": "0.0.11", - "resolved": "https://registry.npmmirror.com/@farris/tags/-/tags-0.0.11.tgz", - "integrity": "sha512-jYcQZYrDdwGGUcYlzZtRIE33j9pyRGgLlfQYnFPBqD0ZXYMorX1t+0qo3v872JJrDwnDp+wz0VP2pxelFfaeLg==", + "@babel/helper-wrap-function": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz", + "integrity": "sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-function-name": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/ui-area-response": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-area-response/-/ui-area-response-0.0.2.tgz", - "integrity": "sha512-A+HORSY1P0w+ni5OEbHx4/s/NI3UfcVRmwC6L/GeshQYCKmreJvnKRfNZoe5/PFnWY5PRFzcXo5pBcx+pWI6Hg==", + "@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@farris/ui-avatar": { - "version": "0.0.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-avatar/-/ui-avatar-0.0.18.tgz", - "integrity": "sha512-96ng/vsvmmdyZCW8U3V5QM85h6RgMdqVYKeaVLdiLz5oK39zvPJl8afIz+5lj+aut7Tjfpeikq6vNVhbne/xpQ==", + "@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, - "@farris/ui-batch-edit-dialog": { - "version": "0.0.13", - "resolved": "https://registry.npmmirror.com/@farris/ui-batch-edit-dialog/-/ui-batch-edit-dialog-0.0.13.tgz", - "integrity": "sha512-9ZtCqO0e85dsTqML2DPmi39Kj6ddhxJDIfNc5o3wLr1T4Cpav+RGNnjA3RMRzUNqUn8VemfZEOVVhSiNzBaiWQ==", + "@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==" + }, + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz", + "integrity": "sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-button": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@farris/ui-button/-/ui-button-0.1.3.tgz", - "integrity": "sha512-sOoWrFSx8PSLeb00VmEUtuoKlZBoPbVRLljditEB46WtAcpAunfAIE7DfFsyh1pMWYRTKXyf2/M6OOyE7DJvmw==", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz", + "integrity": "sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-calculator": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/@farris/ui-calculator/-/ui-calculator-0.0.1.tgz", - "integrity": "sha512-6Tx/Yb0psvETfx3dTE96M3DVL6WUtwPJZ3SH+cUl4YLSthMgmRAl625+eDXa+m+P+s673JNGnpRH78TpjdEfhg==", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", + "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7" } }, - "@farris/ui-calendar": { - "version": "0.0.7", - "resolved": "https://registry.npmmirror.com/@farris/ui-calendar/-/ui-calendar-0.0.7.tgz", - "integrity": "sha512-dgVIW/gexQKAEQQd1Ze9LDb+W8udmK2vbV8O6lU5ispu1BFgbJc1741KmdezNqfxqfCyxAQ0pqlCu8OuMlGFkg==", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz", + "integrity": "sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg==", + "dev": true, "requires": { - "@fullcalendar/core": "4.4.2", - "@fullcalendar/daygrid": "4.4.2", - "@fullcalendar/interaction": "4.4.2", - "@fullcalendar/timegrid": "4.4.2", - "tslib": "^1.9.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-color-picker": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-color-picker/-/ui-color-picker-0.0.4.tgz", - "integrity": "sha512-2cZOf1fxRj71tvEykyCqQhPLOqL+o/uSfhQHfrLB1HINOc5xtD1pY5ExQ9idU4RTS+BV1SIGPiS06RUajT03OQ==", + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmmirror.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-combo-list": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/@farris/ui-combo-list/-/ui-combo-list-0.2.16.tgz", - "integrity": "sha512-HBM6Fphe4FkrnNhnkoYcEnkkAKYrN3tiySkGKfStxNHLcPHNl0z4oZ7xhqjza0FEO0lwKoYkCsfPYgGue01JXA==", + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-combo-lookup": { - "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-combo-lookup/-/ui-combo-lookup-0.2.0.tgz", - "integrity": "sha512-+Vb8XYv2BAMYT4xBs3d3v7M9mJ1i8ewtNqNF7HimbSFP3qFllthGKAzTA3wcKW5FkEtw1urpmNR0Ax9CxHNlrQ==", + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.12.13" } }, - "@farris/ui-common": { - "version": "0.3.26", - "resolved": "https://registry.npmmirror.com/@farris/ui-common/-/ui-common-0.3.26.tgz", - "integrity": "sha512-frsOtNdm3E6x9O4MbHPDVRxmNHvX4kcFrTc+cxFAxvugwL4/TOGGWPYUFQYbhByHE69pLKO1aOOGW3S8liUsCg==", + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@farris/ui-context-menu": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/@farris/ui-context-menu/-/ui-context-menu-0.0.10.tgz", - "integrity": "sha512-S3j1S5ZQA74HjTsjRjyud7QTdHw2I4A5E2WEVPhc2kxj8RcALQpQjFKNZOmqz3Vxr75vEDwtpP1YL7HSz30Mhw==", + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-datagrid": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid/-/ui-datagrid-1.2.0.tgz", - "integrity": "sha512-agCTf75qvGJsfXKYv6mqLnrCRqqtGoK89c4QQ0drZKSkkqxLYPRJ5cJ2PRW9qe86XGGzd6EwHZqn1u6Hqwi6Rg==", + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, - "@farris/ui-datagrid-editors": { - "version": "0.3.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid-editors/-/ui-datagrid-editors-0.3.18.tgz", - "integrity": "sha512-jTTaSkV1eu7Xxw/GBX6+W8P4MW2m+//Go4bJY0YKypGsT733nRWug0be4wU5QzqWhD/8Inlr9nbkSu8tmrsM1Q==", + "@babel/plugin-syntax-import-assertions": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz", + "integrity": "sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-datagrid-filter": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid-filter/-/ui-datagrid-filter-0.1.3.tgz", - "integrity": "sha512-/h0TINzGq2fisJp6F8iERkhkbQnkTCINrNrEoikP6mZJIaVgiUuzRVAuL7RPQJnJXR5Prq1dkbBMslZHBHKxhw==", + "@babel/plugin-syntax-import-attributes": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", + "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-datagrid-settings": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/@farris/ui-datagrid-settings/-/ui-datagrid-settings-0.3.1.tgz", - "integrity": "sha512-DyK75aAOXjjYkzRy0Vj7TQO2e/H6MmB1cWqkJg5shE5H9AM90Jjl4C7Wpa/JB47tkK/jbg1TYQYv+al+hW25Bg==", + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@farris/ui-datalist": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-datalist/-/ui-datalist-0.1.0.tgz", - "integrity": "sha512-BksgqNbX1uGWRC9NYrSoCKdNXco5UM8vCrzUCLogaqxbBQbhd6s80Rxrw5vpPL7gNT46FsaZQs634tP+aleT8w==", + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-datatable": { - "version": "0.3.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-datatable/-/ui-datatable-0.3.2.tgz", - "integrity": "sha512-Hqo+zQUTog9mZy8Z6jllCUgOD3epFY72UJqUdbW3uElYc75Ai58hrjj9NS69avD9Aoh4nWkgwWdZ45utGyMBSg==", + "@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-datepicker": { - "version": "0.7.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-datepicker/-/ui-datepicker-0.7.5.tgz", - "integrity": "sha512-83P4eHDNgpH5wCEUpbtSs+HLQ44PR7RKA3Ub5+Y53o0rN6NeANCmPMtpGPZX2EaeIw9rpi8+Ti3omlfYp7Ibww==", + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@farris/ui-dialog": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-dialog/-/ui-dialog-0.2.5.tgz", - "integrity": "sha512-Jd1E/2vRwiLC8lIfxO6M6cH3nFYFN6bgus6NKcjdbeIvREfxDcxtn68NjSuCqDA3A212o4BQFfIkJ2QjNe/2uQ==", + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-draggable": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-draggable/-/ui-draggable-0.1.0.tgz", - "integrity": "sha512-j4Wtk4gZRznblMPeIrfWiRg7hSS6cUf79OVlbcVC7Boh49x5sNjWnUPTiaKJh7WaSYsdTbT7VmbcTySCGJ/Llw==", + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@farris/ui-dropdown": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-dropdown/-/ui-dropdown-0.1.3.tgz", - "integrity": "sha512-ipi5Zbv0VDHhX1hU9tyFhx12m8xx8XhWCfviHYWiHAxRqqBP7eae4+k3TWIRBp4EOZzxdbn6/RyyXt4meLzNig==", + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-editor": { - "version": "0.0.21", - "resolved": "https://registry.npmmirror.com/@farris/ui-editor/-/ui-editor-0.0.21.tgz", - "integrity": "sha512-V/FRMWWZGtBso8jrjK9i1UFm7KuJILroDaALy1cpxqB+u03SveDAkkYCerT/BPAeNuZGquWrPV0j1jWjheMB4w==", + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-enum-editor": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/@farris/ui-enum-editor/-/ui-enum-editor-0.1.1.tgz", - "integrity": "sha512-Iq1DE70zeGlpjdHPvy8IQOpYYV9xNBxlQ8tm0fX6BtN+yUMhKHLlfecZIjh0p53SWYguGWe/MComEiy1BntP2Q==", + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@farris/ui-feature-editor": { - "version": "0.0.6", - "resolved": "https://registry.npmmirror.com/@farris/ui-feature-editor/-/ui-feature-editor-0.0.6.tgz", - "integrity": "sha512-DIkjAwTr48rQXduGeF+P08IEnrMxuyxHIiacpRil5ULbuMElO1qytq9YiXNB5/l2M/3YR8lCTlPV2LspKgb7vA==", + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@farris/ui-field-group": { - "version": "0.0.23", - "resolved": "https://registry.npmmirror.com/@farris/ui-field-group/-/ui-field-group-0.0.23.tgz", - "integrity": "sha512-MN+zGb19e28gsBQZGE2S1HnKBlFf1PyOzRlqK2MHeNpsF4YwZu1eEytZXoVqlWbOUpLoyk1NPYdlAHOltqUdaQ==", + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.14.5" } }, - "@farris/ui-filter": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter/-/ui-filter-0.1.3.tgz", - "integrity": "sha512-Yedx/SnjCBsv/xtP2Y4wMPmOs3HF1H6agarZe9n+e7MJA193EVv058+PI39JK9EimBs4lKNsfmZu4ufiztHtFg==", + "@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-filter-condition": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-condition/-/ui-filter-condition-0.0.9.tgz", - "integrity": "sha512-2hBNAfk74GVNM5MNYj+YgFptXpVYnGxU5ZvFqphhmMmrglM8S4hWIICPbvjH9xjCpP2twIb6B3VGvnXRwVlnVQ==", + "@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmmirror.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, - "@farris/ui-filter-editor": { - "version": "0.3.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-editor/-/ui-filter-editor-0.3.4.tgz", - "integrity": "sha512-DE2J2VfXxL3c5U+VKoje98aT+43dvuEONp9JTRMxveoTug7r+MHA488cfKugJtvCQ6lsWt3QnfSJpb7OUeFa6g==", + "@babel/plugin-transform-arrow-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", + "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-filter-panel": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-filter-panel/-/ui-filter-panel-0.1.3.tgz", - "integrity": "sha512-RN0G1UOmQe+GfvmlYOa+6US22TuchiqVr3yEFuguBIfBdSHrdP1f26j68h62Q0bs3vfc/kzIZg+mLtoRO1GCzw==", + "@babel/plugin-transform-async-generator-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz", + "integrity": "sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7", + "@babel/plugin-syntax-async-generators": "^7.8.4" } }, - "@farris/ui-flex-layout": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-flex-layout/-/ui-flex-layout-0.0.3.tgz", - "integrity": "sha512-Bd8j9GeaXEPf21fhNnUoyluOwy62cc8KuOw62gD15zSHUktT7Wv+Rqo5TE5/Z/Sy4Ah5yvsDQnboXQKUEULwyg==", + "@babel/plugin-transform-async-to-generator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz", + "integrity": "sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-remap-async-to-generator": "^7.24.7" } }, - "@farris/ui-footer": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-footer/-/ui-footer-0.0.2.tgz", - "integrity": "sha512-N8/2X05ZwGznCbUQEPY1SOuRy3SFjBQaF39gZb9SEqdFk1zNTGJ3k6w+PaGHAtwZINXlKMvzAM9gwkiNuaH/qQ==", + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", + "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-forms": { - "version": "0.3.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-forms/-/ui-forms-0.3.8.tgz", - "integrity": "sha512-oCsQOnN2T8+2TOHA+xD8bCW6qNEMNaFuVpil2DkdJNb6tWLc9er9ePgbrl7Hz8+V1LTozzT9SSjo6bOlpHamQA==", + "@babel/plugin-transform-block-scoping": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz", + "integrity": "sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-html-editor": { - "version": "0.0.29", - "resolved": "https://registry.npmmirror.com/@farris/ui-html-editor/-/ui-html-editor-0.0.29.tgz", - "integrity": "sha512-U3V/9WWGcn7Cfw8PsV0sVUQ7K78GWwQ8S+C4g22ohQFnpZWCs1Kza2eJg77jx9kFDRtNJUuTtK5ie0UGH8cuiw==", + "@babel/plugin-transform-class-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz", + "integrity": "sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-input-group": { - "version": "0.2.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-input-group/-/ui-input-group-0.2.18.tgz", - "integrity": "sha512-kiFJwQiyxhMonepttVkLTefbkY9d13Fcxege3Tjyfm42YzFzZaekG0+6y3K5AcF6CWBSGO3xRPq7lm8PJvNxKQ==", + "@babel/plugin-transform-class-static-block": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, - "@farris/ui-language-textbox": { - "version": "0.1.24", - "resolved": "https://registry.npmmirror.com/@farris/ui-language-textbox/-/ui-language-textbox-0.1.24.tgz", - "integrity": "sha512-dr3OET+o+BVskCOYg6gCkjSJ4qqg0dFogWD7pgBxkOO/Dbt1Vq2qSgfSEpA7ACnR3kPzpH/KxQf28/KXDy7Dyg==", + "@babel/plugin-transform-classes": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz", + "integrity": "sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "globals": "^11.1.0" } }, - "@farris/ui-layout": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-layout/-/ui-layout-0.1.0.tgz", - "integrity": "sha512-Hy3O37hxfvyOFwcguQtCfBiHz9tioxzICK56iu34MKwAU2lMlUB6zfxftY9WlAc151VnJzIk/mD8532e9n56Nw==", + "@babel/plugin-transform-computed-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", + "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/template": "^7.24.7" } }, - "@farris/ui-list-filter": { - "version": "0.1.19", - "resolved": "https://registry.npmmirror.com/@farris/ui-list-filter/-/ui-list-filter-0.1.19.tgz", - "integrity": "sha512-sWe+d7v0ZkUyIzNV8HS1eIEJq72kwPlwefGqQ2NmdYtiaFArcw2tyWIqOhhetVG5DnqAf5uAuOmdwpEMk61wpA==", + "@babel/plugin-transform-destructuring": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz", + "integrity": "sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw==", + "dev": true, "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-list-nav": { - "version": "0.0.17", - "resolved": "https://registry.npmmirror.com/@farris/ui-list-nav/-/ui-list-nav-0.0.17.tgz", - "integrity": "sha512-IW95GVrZmVcanFubndzpqJSlv6QQI7OSJV0FLRPXPGLCdKZeUnHjzxiBjOp2aJ7SufEZf7ck2akrDD8iX4MiCA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@farris/ui-list-view": { - "version": "0.1.7", - "resolved": "https://registry.npmmirror.com/@farris/ui-list-view/-/ui-list-view-0.1.7.tgz", - "integrity": "sha512-cfa007Dhnm5M9nbFhr3jPqDf5waWYQ20weeowEC325fuUgBqNy2qCB9cusYS6GKdWNN17Bg7CAhu3rDU9AGPbQ==", - "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-loading": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-loading/-/ui-loading-0.2.2.tgz", - "integrity": "sha512-D5dIpimT4v8GAdFUcPRgmdFqQSviRPuBZNpvL7u7IFuz/FLoKSR7YZpcKQkF46DGhObuJHAnHHyl6XRdlAXdTA==", + "@babel/plugin-transform-dotall-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", + "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-locale": { - "version": "0.3.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-locale/-/ui-locale-0.3.3.tgz", - "integrity": "sha512-9qrWpOTcnUKqLl5cWIGcAHtUBLuw8S7Ofqj/iKEd7etZYCpHfILGro4tUtcRYgaMFOhXMp7DIobEoBr4B2nc2w==", + "@babel/plugin-transform-duplicate-keys": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", + "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-lookup": { - "version": "0.9.0", - "resolved": "https://registry.npmmirror.com/@farris/ui-lookup/-/ui-lookup-0.9.0.tgz", - "integrity": "sha512-GmAcp+hgU2S0cPcWXKymjkOFSzVOHdsxeIvA0MlEIsOKLyouVsYukOM2IWNuuqzWZ/ZecjUUnWxfURd3PEdt/g==", + "@babel/plugin-transform-dynamic-import": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", + "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, - "@farris/ui-messager": { - "version": "0.2.32", - "resolved": "https://registry.npmmirror.com/@farris/ui-messager/-/ui-messager-0.2.32.tgz", - "integrity": "sha512-QV84UMoIEOSajQLG7DD9HmGdb/qs+YP4CA1EsAkWXj+6fgV7uUig8H0+iVDbGrWz4AcDlJ9t4RhgZGR4f+2ikA==", + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", + "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-modal": { - "version": "0.1.21", - "resolved": "https://registry.npmmirror.com/@farris/ui-modal/-/ui-modal-0.1.21.tgz", - "integrity": "sha512-G8zxYczK7a/BiPDpMrnMQad2fZC3eNxJCUbKBk3dVVhEQEwfb4SYBGE32xu9L/TudffShi1Rj2fT3dB6XxeyvA==", + "@babel/plugin-transform-export-namespace-from": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", + "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, - "@farris/ui-multi-select": { - "version": "0.2.15", - "resolved": "https://registry.npmmirror.com/@farris/ui-multi-select/-/ui-multi-select-0.2.15.tgz", - "integrity": "sha512-gpCJ9LPEbK2ojtHdLLjstE3FPQlZ/HUQ98iiPUCtxBxpbmZNk67KK3rlqeeQht7JeBkc4MMsxcwUPoBeJXFKJw==", + "@babel/plugin-transform-for-of": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", + "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" } }, - "@farris/ui-nav": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-nav/-/ui-nav-0.0.4.tgz", - "integrity": "sha512-PdVFERGSmpHO4UNo8/VmR7sY/jNDbZ+J3B/+jM1ANnjFoFaQCtb+uC1aEVd6crwxZEi7bjNSwAVYcMPBy4BVpw==", + "@babel/plugin-transform-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz", + "integrity": "sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-notify": { - "version": "0.1.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-notify/-/ui-notify-0.1.8.tgz", - "integrity": "sha512-fiQcDLMkX3MON2xOGNOkDkWeDOsrFpt6Vdz5hNfpxjNIP03zmlIlObZyHM9AscpJD+nVNA3dAGZWOsNqLhoytQ==", + "@babel/plugin-transform-json-strings": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", + "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" } }, - "@farris/ui-number-spinner": { - "version": "0.4.12", - "resolved": "https://registry.npmmirror.com/@farris/ui-number-spinner/-/ui-number-spinner-0.4.12.tgz", - "integrity": "sha512-OpQ/4EnBsMAF1m6sZXif0/yDrQf9UUz/fh2Tmzzh21YhMb9kYV3ei9RmT5oDutwBu3NZBHRZCbYUj/dCDOWHMg==", + "@babel/plugin-transform-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz", + "integrity": "sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-pagination": { - "version": "0.2.18", - "resolved": "https://registry.npmmirror.com/@farris/ui-pagination/-/ui-pagination-0.2.18.tgz", - "integrity": "sha512-IF2lULoocXdNm8EgpSzwW+IB5a8zLdIm5edJ8glhhnrYTQurv2VpeOxaHywrVQtDn9jwEF9CJDlJdC1vdn5u4g==", + "@babel/plugin-transform-logical-assignment-operators": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", + "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, - "@farris/ui-panel": { - "version": "0.0.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-panel/-/ui-panel-0.0.5.tgz", - "integrity": "sha512-dZnaRroVK+QNtGI8zdhitIKTmGI8Lgcz+/LEgyN88psWulhHn1QIoT+bKjcW0gnOxS+llO85/My1NwTsDTAP3Q==", + "@babel/plugin-transform-member-expression-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", + "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-perfect-scrollbar": { - "version": "0.0.8", - "resolved": "https://registry.npmmirror.com/@farris/ui-perfect-scrollbar/-/ui-perfect-scrollbar-0.0.8.tgz", - "integrity": "sha512-wu9RKEZzy2mqBX4s0nL8S4KCxtYCZ40TdFSKi2h9jF/yoPYENY0KB2IAlU/iPOy6dA9P5f/qSqisqyx9cg562Q==", + "@babel/plugin-transform-modules-amd": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", + "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-popover": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-popover/-/ui-popover-0.1.2.tgz", - "integrity": "sha512-rpTiFm4FNxxbIFxJy5oixdbcBh0d6aelyFfiCA0ms4o0vRt1s7y2a3GKmiJg/YJYGLRDfwmSp6VyCL2Gnvf/ug==", + "@babel/plugin-transform-modules-commonjs": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz", + "integrity": "sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7" } }, - "@farris/ui-progress": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-progress/-/ui-progress-0.0.2.tgz", - "integrity": "sha512-hFOYRiWrodZ5Z0zDqtVOoaV8ZVz1ALQD+05yZmBsPgnc2PldivAESTVLB3C+T+s3vEtAh/oyqwu2ZgNV0yCW9g==", + "@babel/plugin-transform-modules-systemjs": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz", + "integrity": "sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" } }, - "@farris/ui-progress-step": { - "version": "0.0.25", - "resolved": "https://registry.npmmirror.com/@farris/ui-progress-step/-/ui-progress-step-0.0.25.tgz", - "integrity": "sha512-hV6FXBnZCT/Hi5WzyFECHhqLR6eH/POrYQewkHYqMhl1zSvYmAp9RmRtRRTyBrPOfZjsNnNOA1pgCRTKcnwxIg==", + "@babel/plugin-transform-modules-umd": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", + "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-rate": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-rate/-/ui-rate-0.0.4.tgz", - "integrity": "sha512-e7y8AAHXjrVKputdSaUZX8+zTKfcGb9D2hNnlasZUCgh6crtSfWRX9Q3o6+LQZYqePLXtTRW5+0rdUC8xXoKPQ==", + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", + "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-response-toolbar": { - "version": "0.1.29", - "resolved": "https://registry.npmmirror.com/@farris/ui-response-toolbar/-/ui-response-toolbar-0.1.29.tgz", - "integrity": "sha512-SsXOfgzbWBJZ6fKaYrBj1nb7nN6NB3rd7yARgQ6fyDNg5A7qywDD2L71oqhcHaInyXfxALHTtPFZfvvpzoecXg==", + "@babel/plugin-transform-new-target": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", + "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-responsive": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-responsive/-/ui-responsive-0.0.2.tgz", - "integrity": "sha512-2woDAdQxnl15rFEIbAV5imqexbjSpAP0fYSb/8rR1L8O6gwBAom/lElexDOFTKTqHzZ+MatV4DnFl3vwUM+r+g==", + "@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", + "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, - "@farris/ui-scrollspy": { - "version": "0.0.30", - "resolved": "https://registry.npmmirror.com/@farris/ui-scrollspy/-/ui-scrollspy-0.0.30.tgz", - "integrity": "sha512-nTab+PH3eqBlvinPvwHgD4SeAvNyjZbihQ5t5zySvQNShq8ZgwqbzFud54QodJ89XKm0Vvojn63c/auQsR1mHA==", + "@babel/plugin-transform-numeric-separator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", + "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, - "@farris/ui-search-box": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-search-box/-/ui-search-box-0.1.4.tgz", - "integrity": "sha512-hsbSu6bEDN8Q7HpZUFWBZTLJP2IUy5HzO6jZJ9yVYjZFSP/odbUUILQ6k1wxceeLrQg5ypI6eX9DQapm+ZfYKg==", + "@babel/plugin-transform-object-rest-spread": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", + "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.24.7" } }, - "@farris/ui-section": { - "version": "0.1.12", - "resolved": "https://registry.npmmirror.com/@farris/ui-section/-/ui-section-0.1.12.tgz", - "integrity": "sha512-lxV7EGjTd3Lk3K3qlz9K8K6s0xjBE3/iZoVtThrEcsCYntm+5gOxEy2l8x8T613Qh7Emb05MHNIgAYx+zbUzpA==", + "@babel/plugin-transform-object-super": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", + "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-replace-supers": "^7.24.7" } }, - "@farris/ui-shortcuts": { - "version": "0.0.4", - "resolved": "https://registry.npmmirror.com/@farris/ui-shortcuts/-/ui-shortcuts-0.0.4.tgz", - "integrity": "sha512-mLad9J1ca3fq6ijaDht8WmQ3x/u41u2edb0Ky/pJPsbLdzXBYPtApIUitcRmpQ4kLeZGXDD6q0oZfwMCDPOhRw==", + "@babel/plugin-transform-optional-catch-binding": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", + "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, - "@farris/ui-sidebar": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-sidebar/-/ui-sidebar-0.1.5.tgz", - "integrity": "sha512-PIOlztKaGt4JPGxkfGuBiCYO0P8FG9UonY0z6TIE9xyH12rV4NGccYC6VcBeYVS0ag2ix4XnVOd8v+CJLMZD6w==", + "@babel/plugin-transform-optional-chaining": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz", + "integrity": "sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, - "@farris/ui-sort-editor": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/@farris/ui-sort-editor/-/ui-sort-editor-0.2.1.tgz", - "integrity": "sha512-03xUYjnqxqGP+7XYCk71U8Q34nJZAuTtq3+jsgGvaBrKcW1nQsrAwnViotw786/4HUo+jb4gVgsZdl0DQs50OQ==", + "@babel/plugin-transform-parameters": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz", + "integrity": "sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-splitter": { - "version": "0.0.5", - "resolved": "https://registry.npmmirror.com/@farris/ui-splitter/-/ui-splitter-0.0.5.tgz", - "integrity": "sha512-56gx9JpLlWcYj2TgdGaZcEVGtIxcNYaaA1nSfyPo58f08GfxVEKiK3DkDAS5yy49jOibywHyX206DhCId5nQ7A==", + "@babel/plugin-transform-private-methods": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz", + "integrity": "sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-switch": { - "version": "0.1.10", - "resolved": "https://registry.npmmirror.com/@farris/ui-switch/-/ui-switch-0.1.10.tgz", - "integrity": "sha512-BYs1tHqOhwNiRVABQgM0Rr3Knzuzjl13n3sdvhCrbVj4VhDBNLrbuHSrSu/HroxD003n6bEZOcXEOqFPBuG0YQ==", + "@babel/plugin-transform-private-property-in-object": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz", + "integrity": "sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, - "@farris/ui-tabs": { - "version": "0.2.16", - "resolved": "https://registry.npmmirror.com/@farris/ui-tabs/-/ui-tabs-0.2.16.tgz", - "integrity": "sha512-R0uxwGjME2odnEJUBk1KClCgQK0wA/I6RbN4HwRIsbpmIr0bERs9YeTkCKFHR29vO/4WOzwQ11FGK6QXDiO8uA==", + "@babel/plugin-transform-property-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz", + "integrity": "sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-tag": { - "version": "0.0.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-tag/-/ui-tag-0.0.2.tgz", - "integrity": "sha512-lBDOj9irAtFYnJafyF78qvUlBs6/AwNqHxux+HqzLadrKtGVyClwBRzYXHK2rC4uEcNuSknmQ9H5ZMMJeLJNLw==", + "@babel/plugin-transform-regenerator": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", + "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "regenerator-transform": "^0.15.2" } }, - "@farris/ui-text": { - "version": "0.1.34", - "resolved": "https://registry.npmmirror.com/@farris/ui-text/-/ui-text-0.1.34.tgz", - "integrity": "sha512-EpHO+GePljFst95GlNF8BZZPlZ7m2f/oA6dqrfTDDRIjxGI4BZehqrdElx3okuRyxy+5splBElnuK936CqxVjA==", + "@babel/plugin-transform-reserved-words": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", + "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-time-picker": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/@farris/ui-time-picker/-/ui-time-picker-0.2.2.tgz", - "integrity": "sha512-5C42Bh3epfDN95iW1qSUqUoUn4329TmGFrfRSiisn0U3/dGnrxvAZWIE3uun8cKptvI2dvPjCxqwmbWHzziqog==", + "@babel/plugin-transform-shorthand-properties": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", + "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-time-spinner": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/@farris/ui-time-spinner/-/ui-time-spinner-0.0.9.tgz", - "integrity": "sha512-FUY/WiO9fPgsdkoZP5D723B7zKsgwjLrXIKrKRvkZR2AwDHkzUil2qqZCpznwQpPE5GeOrWcN/bQGXAimXpfgQ==", + "@babel/plugin-transform-spread": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", + "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" } }, - "@farris/ui-tooltip": { - "version": "0.0.26", - "resolved": "https://registry.npmmirror.com/@farris/ui-tooltip/-/ui-tooltip-0.0.26.tgz", - "integrity": "sha512-2F6dVAnedfS0tqEBxbzNkxWidrW5qIOBACFhaQQ0Wrgj+FTYC0bx+Zk5E8eOsqrJAt6EZLZgIPQJUsDU6BlkIA==", + "@babel/plugin-transform-sticky-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", + "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-treetable": { - "version": "0.5.3", - "resolved": "https://registry.npmmirror.com/@farris/ui-treetable/-/ui-treetable-0.5.3.tgz", - "integrity": "sha512-Bf2OHn6LnkPipTQKyA/PjeipDJDcTN7N3lIkMPkHspn9lUZGFsDemEaMmbtpkclxeIEtI9Mhv+RjmZGbH+cEig==", + "@babel/plugin-transform-template-literals": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", + "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-view-change": { - "version": "0.0.6", - "resolved": "https://registry.npmmirror.com/@farris/ui-view-change/-/ui-view-change-0.0.6.tgz", - "integrity": "sha512-S3Ob9HfLM6609rv/slZCFSzXnaGGjL+6/T+dG4aKDf9oLr4jUoV7jH1EHnOkxuJtcZytfOv7gcKuqiGrVcQLIg==", + "@babel/plugin-transform-typeof-symbol": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz", + "integrity": "sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@farris/ui-wizard": { - "version": "0.0.29", - "resolved": "https://registry.npmmirror.com/@farris/ui-wizard/-/ui-wizard-0.0.29.tgz", - "integrity": "sha512-MAzz5A8Et1n/gVdEGvPw/u+JYtiLhX58Kt127TDxlpmIrZbzXlGlPE7aNPzPCeM4IIQMZD0ts0zy4Ui44V1FmQ==", + "@babel/plugin-transform-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz", + "integrity": "sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/plugin-syntax-typescript": "^7.24.7" } }, - "@fullcalendar/core": { - "version": "4.4.2", - "resolved": "https://registry.npmmirror.com/@fullcalendar/core/-/core-4.4.2.tgz", - "integrity": "sha512-vq7KQGuAJ1ieFG5tUqwxwUwmXYtblFOTjHaLAVHo6iEPB52mS7DS45VJfkhaQmX4+5/+BHRpg82G1qkuAINwtg==" - }, - "@fullcalendar/daygrid": { - "version": "4.4.2", - "resolved": "https://registry.npmmirror.com/@fullcalendar/daygrid/-/daygrid-4.4.2.tgz", - "integrity": "sha512-axjfMhxEXHShV3r2TZjf+2niJ1C6LdAxkHKmg7mVq4jXtUQHOldU5XsjV0v2lUAt1urJBFi2zajfK8798ukL3Q==" - }, - "@fullcalendar/interaction": { - "version": "4.4.2", - "resolved": "https://registry.npmmirror.com/@fullcalendar/interaction/-/interaction-4.4.2.tgz", - "integrity": "sha512-3ItpGFnxcYQT4NClqhq93QTQwOI8x3mlMf5M4DgK5avVaSzpv9g8p+opqeotK2yzpFeINps06cuQyB1h7vcv1Q==" - }, - "@fullcalendar/timegrid": { - "version": "4.4.2", - "resolved": "https://registry.npmmirror.com/@fullcalendar/timegrid/-/timegrid-4.4.2.tgz", - "integrity": "sha512-M5an7qii8OUmI4ogY47k5pn2j/qUbLp6sa6Vo0gO182HR5pb9YtrEZnoQhnScok+I0BkDkLFzMQoiAMTjBm2PQ==", + "@babel/plugin-transform-unicode-escapes": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", + "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", + "dev": true, "requires": { - "@fullcalendar/daygrid": "~4.4.0" + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@gsp-bef/gsp-cm-metadata": { - "version": "0.0.23", - "resolved": "https://registry.npmmirror.com/@gsp-bef/gsp-cm-metadata/-/gsp-cm-metadata-0.0.23.tgz", - "integrity": "sha512-lGXzQTG39/T9hUYgH9KtFK+LqdxoM3bARBRsIXyf8OlIBlJOqEfjeFx1xM3QaSgjOKeIzPMRqPrcZZcqm8j0JQ==", + "@babel/plugin-transform-unicode-property-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", + "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@gsp-cmp/webcommand": { - "version": "0.0.15", - "resolved": "https://registry.npmmirror.com/@gsp-cmp/webcommand/-/webcommand-0.0.15.tgz", - "integrity": "sha512-8uQdNSCfjTmWIprRuW29shvBzhKTmepgk1qdYvtmFubWm2QYZSuvEzqzUxNVB+EUgv/gQjq56yacNDd1deuKAA==", + "@babel/plugin-transform-unicode-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", + "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "@babel/plugin-transform-unicode-sets-regex": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz", + "integrity": "sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/helper-create-regexp-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7" } }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@babel/preset-env": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/preset-env/-/preset-env-7.24.7.tgz", + "integrity": "sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.24.7", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.24.7", + "@babel/plugin-transform-async-to-generator": "^7.24.7", + "@babel/plugin-transform-block-scoped-functions": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.24.7", + "@babel/plugin-transform-class-properties": "^7.24.7", + "@babel/plugin-transform-class-static-block": "^7.24.7", + "@babel/plugin-transform-classes": "^7.24.7", + "@babel/plugin-transform-computed-properties": "^7.24.7", + "@babel/plugin-transform-destructuring": "^7.24.7", + "@babel/plugin-transform-dotall-regex": "^7.24.7", + "@babel/plugin-transform-duplicate-keys": "^7.24.7", + "@babel/plugin-transform-dynamic-import": "^7.24.7", + "@babel/plugin-transform-exponentiation-operator": "^7.24.7", + "@babel/plugin-transform-export-namespace-from": "^7.24.7", + "@babel/plugin-transform-for-of": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.24.7", + "@babel/plugin-transform-json-strings": "^7.24.7", + "@babel/plugin-transform-literals": "^7.24.7", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", + "@babel/plugin-transform-member-expression-literals": "^7.24.7", + "@babel/plugin-transform-modules-amd": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-modules-systemjs": "^7.24.7", + "@babel/plugin-transform-modules-umd": "^7.24.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", + "@babel/plugin-transform-new-target": "^7.24.7", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7", + "@babel/plugin-transform-numeric-separator": "^7.24.7", + "@babel/plugin-transform-object-rest-spread": "^7.24.7", + "@babel/plugin-transform-object-super": "^7.24.7", + "@babel/plugin-transform-optional-catch-binding": "^7.24.7", + "@babel/plugin-transform-optional-chaining": "^7.24.7", + "@babel/plugin-transform-parameters": "^7.24.7", + "@babel/plugin-transform-private-methods": "^7.24.7", + "@babel/plugin-transform-private-property-in-object": "^7.24.7", + "@babel/plugin-transform-property-literals": "^7.24.7", + "@babel/plugin-transform-regenerator": "^7.24.7", + "@babel/plugin-transform-reserved-words": "^7.24.7", + "@babel/plugin-transform-shorthand-properties": "^7.24.7", + "@babel/plugin-transform-spread": "^7.24.7", + "@babel/plugin-transform-sticky-regex": "^7.24.7", + "@babel/plugin-transform-template-literals": "^7.24.7", + "@babel/plugin-transform-typeof-symbol": "^7.24.7", + "@babel/plugin-transform-unicode-escapes": "^7.24.7", + "@babel/plugin-transform-unicode-property-regex": "^7.24.7", + "@babel/plugin-transform-unicode-regex": "^7.24.7", + "@babel/plugin-transform-unicode-sets-regex": "^7.24.7", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" }, "dependencies": { - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, - "@ngtools/json-schema": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz", - "integrity": "sha512-6i322P+RDn7nFiqdKqGGfvjyhEN551o8NsKxE0/lBAXzu0kUA8wlWa8d/RU1+VJtQ0+GOKFc7xHmoKuw7gt+Lw==", - "dev": true - }, - "@ngtools/webpack": { - "version": "7.3.10", - "resolved": "https://registry.npmmirror.com/@ngtools/webpack/-/webpack-7.3.10.tgz", - "integrity": "sha512-2NVylZt3ybnBCRky+R4JTMXUGeJjoqRQ2OzCd5STjyyWE5tjPKbxMjF4claO3kl2ep09ML0QPi7ngZrZVTcEqA==", + "@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmmirror.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.10", - "enhanced-resolve": "4.1.0", - "rxjs": "6.3.3", - "tree-kill": "1.2.2", - "webpack-sources": "1.3.0" + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" } }, - "@schematics/angular": { - "version": "7.3.10", - "resolved": "https://registry.npmmirror.com/@schematics/angular/-/angular-7.3.10.tgz", - "integrity": "sha512-R/oBE5Nbs/meMVqLLFjeVf3G+ROJAPtRbiJ+22EZ6V63RQfLbW37zX+z3Wv7yD9URtYE7X9Ojtz9WEfmSzBPUg==", + "@babel/preset-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", + "integrity": "sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.10", - "@angular-devkit/schematics": "7.3.10", - "typescript": "3.2.4" + "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "@babel/plugin-syntax-jsx": "^7.24.7", + "@babel/plugin-transform-modules-commonjs": "^7.24.7", + "@babel/plugin-transform-typescript": "^7.24.7" } }, - "@schematics/update": { - "version": "0.13.10", - "resolved": "https://registry.npmmirror.com/@schematics/update/-/update-0.13.10.tgz", - "integrity": "sha512-X02qa+rpeD6+eacR0fy+Yr+OKrj3FTpod9TkfshMa1WwIFoWlshF/bpPmLoMGXOD+zCYoHrPimpkvEFPjOvCDQ==", + "@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmmirror.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true + }, + "@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", "dev": true, "requires": { - "@angular-devkit/core": "7.3.10", - "@angular-devkit/schematics": "7.3.10", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "pacote": "9.4.0", - "rxjs": "6.3.3", - "semver": "5.6.0", - "semver-intersect": "1.4.0" + "regenerator-runtime": "^0.14.0" } }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/jasmine": { - "version": "2.8.19", - "resolved": "https://registry.npmmirror.com/@types/jasmine/-/jasmine-2.8.19.tgz", - "integrity": "sha512-LD9nOC/+6AHfEFKpOW3Nu7wmXHEs41BWOr9uyaXYHx/iiLPAEfBZ2AlIH3yk+xyLWi5I83fLltMiDCrrHvU3Wg==", - "dev": true - }, - "@types/jasminewd2": { - "version": "2.0.10", - "resolved": "https://registry.npmmirror.com/@types/jasminewd2/-/jasminewd2-2.0.10.tgz", - "integrity": "sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g==", + "@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, "requires": { - "@types/jasmine": "*" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@types/lodash": { - "version": "4.14.182", - "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.14.182.tgz", - "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==" + "@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + } }, - "@types/lodash-es": { - "version": "4.17.7", - "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.7.tgz", - "integrity": "sha512-z0ptr6UI10VlU6l5MYhGwS4mC8DZyYer2mCoyysZtSF7p26zOX8UpbrV0YpNYLGS8K4PUFIyEr62IMFFjveSiQ==", + "@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, "requires": { - "@types/lodash": "*" + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" } }, - "@types/node": { - "version": "8.9.5", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-8.9.5.tgz", - "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==", - "dev": true - }, - "@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmmirror.com/@types/q/-/q-0.0.32.tgz", - "integrity": "sha512-qYi3YV9inU/REEfxwVcGZzbS3KG/Xs90lv0Pr+lDtuVjBPGd1A+eciXzVSaRvLify132BfcvhvEjeVahrUl0Ug==", + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmmirror.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmmirror.com/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "@commitlint/cli": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/cli/-/cli-17.8.1.tgz", + "integrity": "sha512-ay+WbzQesE0Rv4EQKfNbSMiJJ12KdKTDzIt0tcK4k11FdsWmtwP0Kp1NWMOUswfIWo6Eb7p7Ln721Nx9FLNBjg==", "dev": true, "requires": { - "@types/node": "*" + "@commitlint/format": "^17.8.1", + "@commitlint/lint": "^17.8.1", + "@commitlint/load": "^17.8.1", + "@commitlint/read": "^17.8.1", + "@commitlint/types": "^17.8.1", + "execa": "^5.0.0", + "lodash.isfunction": "^3.0.9", + "resolve-from": "5.0.0", + "resolve-global": "1.0.0", + "yargs": "^17.0.0" } }, - "@types/selenium-webdriver": { - "version": "3.0.22", - "resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/-/selenium-webdriver-3.0.22.tgz", - "integrity": "sha512-Nh76NUqvfsZHG5ot5gMlHNNHQvbRvv5UpM4FH3K1HuUGeq4scNlRoKVKSOP/EGIYHhJ2IUXyQc+38jvZLxfB2Q==", - "dev": true - }, - "@types/source-list-map": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/@types/source-list-map/-/source-list-map-0.1.2.tgz", - "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", - "dev": true - }, - "@types/webpack-sources": { - "version": "0.1.9", - "resolved": "https://registry.npmmirror.com/@types/webpack-sources/-/webpack-sources-0.1.9.tgz", - "integrity": "sha512-bvzMnzqoK16PQIC8AYHNdW45eREJQMd6WG/msQWX5V2+vZmODCOPb4TJcbgRljTZZTwTM4wUMcsI8FftNA7new==", + "@commitlint/config-conventional": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/config-conventional/-/config-conventional-17.8.1.tgz", + "integrity": "sha512-NxCOHx1kgneig3VLauWJcDWS40DVjg7nKOpBEEK9E5fjJpQqLCilcnKkIIjdBH98kEO1q3NpE5NSrZ2kl/QGJg==", "dev": true, "requires": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "conventional-changelog-conventionalcommits": "^6.1.0" } }, - "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", + "@commitlint/config-validator": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/config-validator/-/config-validator-17.8.1.tgz", + "integrity": "sha512-UUgUC+sNiiMwkyiuIFR7JG2cfd9t/7MV8VB4TZ+q02ZFkHoduUS4tJGsCBWvBOGD9Btev6IecPMvlWUfJorkEA==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" + "@commitlint/types": "^17.8.1", + "ajv": "^8.11.0" } }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", + "@commitlint/ensure": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/ensure/-/ensure-17.8.1.tgz", + "integrity": "sha512-xjafwKxid8s1K23NFpL8JNo6JnY/ysetKo8kegVM7c8vs+kWLP8VrQq+NbhgVlmCojhEDbzQKp4eRXSjVOGsow==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.7.11" + "@commitlint/types": "^17.8.1", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.upperfirst": "^4.3.1" } }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", + "@commitlint/execute-rule": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/execute-rule/-/execute-rule-17.8.1.tgz", + "integrity": "sha512-JHVupQeSdNI6xzA9SqMF+p/JjrHTcrJdI02PwesQIDCIGUrv04hicJgCcws5nzaoZbROapPs0s6zeVHoxpMwFQ==", "dev": true }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", + "@commitlint/format": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/format/-/format-17.8.1.tgz", + "integrity": "sha512-f3oMTyZ84M9ht7fb93wbCKmWxO5/kKSbwuYvS867duVomoOsgrgljkGGIztmT/srZnaiGbaK8+Wf8Ik2tSr5eg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" + "@commitlint/types": "^17.8.1", + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", + "@commitlint/is-ignored": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/is-ignored/-/is-ignored-17.8.1.tgz", + "integrity": "sha512-UshMi4Ltb4ZlNn4F7WtSEugFDZmctzFpmbqvpyxD3la510J+PLcnyhf9chs7EryaRFJMdAKwsEKfNK0jL/QM4g==", "dev": true, "requires": { - "@xtuc/ieee754": "^1.2.0" + "@commitlint/types": "^17.8.1", + "semver": "7.5.4" + }, + "dependencies": { + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, - "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", + "@commitlint/lint": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/lint/-/lint-17.8.1.tgz", + "integrity": "sha512-aQUlwIR1/VMv2D4GXSk7PfL5hIaFSfy6hSHV94O8Y27T5q+DlDEgd/cZ4KmVI+MWKzFfCTiTuWqjfRSfdRllCA==", "dev": true, "requires": { - "@xtuc/long": "4.2.1" + "@commitlint/is-ignored": "^17.8.1", + "@commitlint/parse": "^17.8.1", + "@commitlint/rules": "^17.8.1", + "@commitlint/types": "^17.8.1" } }, - "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", + "@commitlint/load": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/load/-/load-17.8.1.tgz", + "integrity": "sha512-iF4CL7KDFstP1kpVUkT8K2Wl17h2yx9VaR1ztTc8vzByWWcbO/WaKwxsnCOqow9tVAlzPfo1ywk9m2oJ9ucMqA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" + "@commitlint/config-validator": "^17.8.1", + "@commitlint/execute-rule": "^17.8.1", + "@commitlint/resolve-extends": "^17.8.1", + "@commitlint/types": "^17.8.1", + "@types/node": "20.5.1", + "chalk": "^4.1.0", + "cosmiconfig": "^8.0.0", + "cosmiconfig-typescript-loader": "^4.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0", + "resolve-from": "^5.0.0", + "ts-node": "^10.8.1", + "typescript": "^4.6.4 || ^5.2.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } + "@commitlint/message": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/message/-/message-17.8.1.tgz", + "integrity": "sha512-6bYL1GUQsD6bLhTH3QQty8pVFoETfFQlMn2Nzmz3AOLqRVfNNtXBaSY0dhZ0dM6A2MEq4+2d7L/2LP8TjqGRkA==", + "dev": true }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", + "@commitlint/parse": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/parse/-/parse-17.8.1.tgz", + "integrity": "sha512-/wLUickTo0rNpQgWwLPavTm7WbwkZoBy3X8PpkUmlSmQJyWQTj0m6bDjiykMaDt41qcUbfeFfaCvXfiR4EGnfw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" + "@commitlint/types": "^17.8.1", + "conventional-changelog-angular": "^6.0.0", + "conventional-commits-parser": "^4.0.0" } }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", + "@commitlint/read": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/read/-/read-17.8.1.tgz", + "integrity": "sha512-Fd55Oaz9irzBESPCdMd8vWWgxsW3OWR99wOntBDHgf9h7Y6OOHjWEdS9Xzen1GFndqgyoaFplQS5y7KZe0kO2w==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" + "@commitlint/top-level": "^17.8.1", + "@commitlint/types": "^17.8.1", + "fs-extra": "^11.0.0", + "git-raw-commits": "^2.0.11", + "minimist": "^1.2.6" + }, + "dependencies": { + "fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + } } }, - "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", + "@commitlint/resolve-extends": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/resolve-extends/-/resolve-extends-17.8.1.tgz", + "integrity": "sha512-W/ryRoQ0TSVXqJrx5SGkaYuAaE/BUontL1j1HsKckvM6e5ZaG0M9126zcwL6peKSuIetJi7E87PRQF8O86EW0Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" + "@commitlint/config-validator": "^17.8.1", + "@commitlint/types": "^17.8.1", + "import-fresh": "^3.0.0", + "lodash.mergewith": "^4.6.2", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" } }, - "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", + "@commitlint/rules": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/rules/-/rules-17.8.1.tgz", + "integrity": "sha512-2b7OdVbN7MTAt9U0vKOYKCDsOvESVXxQmrvuVUZ0rGFMCrCPJWWP1GJ7f0lAypbDAhaGb8zqtdOr47192LBrIA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" + "@commitlint/ensure": "^17.8.1", + "@commitlint/message": "^17.8.1", + "@commitlint/to-lines": "^17.8.1", + "@commitlint/types": "^17.8.1", + "execa": "^5.0.0" } }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "@commitlint/to-lines": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/to-lines/-/to-lines-17.8.1.tgz", + "integrity": "sha512-LE0jb8CuR/mj6xJyrIk8VLz03OEzXFgLdivBytoooKO5xLt5yalc8Ma5guTWobw998sbR3ogDd+2jed03CFmJA==", "dev": true }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "@commitlint/top-level": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/top-level/-/top-level-17.8.1.tgz", + "integrity": "sha512-l6+Z6rrNf5p333SHfEte6r+WkOxGlWK4bLuZKbtf/2TXRN+qhrvn1XE63VhD8Oe9oIHQ7F7W1nG2k/TJFhx2yA==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "find-up": "^5.0.0" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + } } }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "@commitlint/types": { + "version": "17.8.1", + "resolved": "https://registry.npmmirror.com/@commitlint/types/-/types-17.8.1.tgz", + "integrity": "sha512-PXDQXkAmiMEG162Bqdh9ChML/GJZo6vU+7F03ALKDK8zYc6SuAr47LjG7hGYRqUOz+WK0dU7bQ0xzuqFMdxzeQ==", "dev": true, "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "chalk": "^4.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true - }, - "adm-zip": { - "version": "0.5.10", - "resolved": "https://registry.npmmirror.com/adm-zip/-/adm-zip-0.5.10.tgz", - "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==", - "dev": true + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmmirror.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmmirror.com/after/-/after-0.8.2.tgz", - "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==", + "@docsearch/css": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/@docsearch/css/-/css-3.6.0.tgz", + "integrity": "sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==", "dev": true }, - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "@docsearch/js": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/@docsearch/js/-/js-3.6.0.tgz", + "integrity": "sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==", "dev": true, "requires": { - "es6-promisify": "^5.0.0" + "@docsearch/react": "3.6.0", + "preact": "^10.0.0" } }, - "agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "@docsearch/react": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/@docsearch/react/-/react-3.6.0.tgz", + "integrity": "sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==", "dev": true, "requires": { - "humanize-ms": "^1.2.1" + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.6.0", + "algoliasearch": "^4.19.1" } }, - "ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } + "optional": true }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "dev": true, + "optional": true }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "dev": true, + "optional": true }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true + "@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "dev": true, + "optional": true }, - "angular-monaco-editor": { - "version": "1.10.0", - "resolved": "https://registry.npmmirror.com/angular-monaco-editor/-/angular-monaco-editor-1.10.0.tgz", - "integrity": "sha512-GYdU//EiwHO6cwNVB7sR+QQDBlXskt6JoQGmNftWH+XLtdrFVkbiPLH4Y/x3Jujg9MCObCdsoDtDfJxDbb9pfQ==", - "requires": { - "tslib": "^1.7.1" - } + "@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "dev": true, + "optional": true }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA==", + "@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "dev": true, - "requires": { - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } + "optional": true }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmmirror.com/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true + "@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "dev": true, + "optional": true }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true + "@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "dev": true, + "optional": true }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmmirror.com/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha512-JoAxEa1DfP9m2xfB/y2r/aKcwXNlltr4+0QSBC4TrLfcxyvepX2Pv0t/xpgGV5bGsDzCYV8SzjWgyCW0T9yYbA==", - "dev": true + "@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "dev": true, + "optional": true }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true + "@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "dev": true, + "optional": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "dev": true, - "requires": { - "color-convert": "^1.9.0" - } + "optional": true }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } + "optional": true }, - "app-root-path": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/app-root-path/-/app-root-path-2.2.1.tgz", - "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==", - "dev": true + "@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "dev": true, + "optional": true }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } + "optional": true }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true + "@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "dev": true, + "optional": true }, - "are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } + "optional": true }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "optional": true }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true + "@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "dev": true, + "optional": true }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true + "@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "dev": true, + "optional": true }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true + "@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "dev": true, + "optional": true }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", - "dev": true + "@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "dev": true, + "optional": true }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true + "@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "dev": true, + "optional": true }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmmirror.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "eslint-visitor-keys": "^3.3.0" } }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmmirror.com/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "@farris/designer-dragula": { + "version": "0.0.5", + "resolved": "https://registry.npmmirror.com/@farris/designer-dragula/-/designer-dragula-0.0.5.tgz", + "integrity": "sha512-Y9lUkoXO0EFc5kJXEr5q2BcU6XKeJLJc00cSoeZOFSiup5j+UeFaJz+GSgwGu46ZegGbR8wjZ20OMSNTDEGKFA==", "dev": true }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmmirror.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "@farris/ui-common": { + "version": "0.3.29", + "resolved": "https://registry.npmmirror.com/@farris/ui-common/-/ui-common-0.3.29.tgz", + "integrity": "sha512-wTwCININMEtKjCICv9rmfavvEUANCmbfQvfKJM3L7/yD06VwugIJy3uneuf6QIXPrVVyByak5rHNFl0AZN251g==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@farris/ui-vue": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/@farris/ui-vue/-/ui-vue-1.0.2.tgz", + "integrity": "sha512-QDv+X2mFSA12OBsVDG852jfnCy7jVQ+kqJQZPkSEWrr8o4kBuayzcfyzORUR5Km1xR4ryCJUd5oWJuZjoFRwOQ==", + "requires": { + "@farris/ui-common": "^0.3.26", + "@types/lodash-es": "^4.17.4", + "@vue/shared": "^3.2.0", + "@vueuse/core": "9.2.0", + "async-validator": "^4.2.0", + "bignumber.js": "^9.1.1", + "lodash": "^4.17.21", + "lodash-es": "^4.17.20", + "rxjs": "~7.4.0", + "vite-plugin-dts": "^2.1.0" + } + }, + "@francoischalifour/autocomplete-core": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmmirror.com/@francoischalifour/autocomplete-core/-/autocomplete-core-1.0.0-alpha.28.tgz", + "integrity": "sha512-rL9x+72btViw+9icfBKUJjZj87FgjFrD2esuTUqtj4RAX3s4AuVZiN8XEsfjQBSc6qJk31cxlvqZHC/BIyYXgg==", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "@francoischalifour/autocomplete-preset-algolia": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmmirror.com/@francoischalifour/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.0.0-alpha.28.tgz", + "integrity": "sha512-bprfNmYt1opFUFEtD2XfY/kEsm13bzHQgU80uMjhuK0DJ914IjolT1GytpkdM6tJ4MBvyiJPP+bTtWO+BZ7c7w==", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "@hutson/parse-repository-url": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", "dev": true }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } + "@inquirer/figures": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@inquirer/figures/-/figures-1.0.3.tgz", + "integrity": "sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==", + "dev": true }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmmirror.com/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } } } }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmmirror.com/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { - "inherits": "2.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } } } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmmirror.com/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmmirror.com/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/async-each/-/async-each-1.0.6.tgz", - "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", - "dev": true - }, - "async-foreach": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/async-foreach/-/async-foreach-0.1.3.tgz", - "integrity": "sha512-VUeSMD8nEGBWaZK4lizI1sf3yEC7pnAQ/mrI7pC2fBz2s/tq5jWWEngTwaf0Gruu/OoXRGLGg1XFqpYBiGTYJA==", - "dev": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.4.6", - "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-9.4.6.tgz", - "integrity": "sha512-Yp51mevbOEdxDUy5WjiKtpQaecqYq9OqZSL04rSoCiry7Tc5I9FEyo3bfxiTJc1DfHeKwSFCUYbBAiOQ2VGfiw==", - "dev": true, - "requires": { - "browserslist": "^4.4.1", - "caniuse-lite": "^1.0.30000929", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.13", - "postcss-value-parser": "^3.3.1" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true - }, - "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmmirror.com/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmmirror.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" }, "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmmirror.com/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmmirror.com/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmmirror.com/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmmirror.com/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmmirror.com/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmmirror.com/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmmirror.com/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "@types/yargs-parser": "*" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "color-convert": "^2.0.1" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "has-flag": "^4.0.0" } } } }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g==", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha512-rz8L+d/xByiB/vLVftPkyY215fqNrmasrcJsYkVcm4TgJNz+YXKrFaFAWibSaHkiKoSgMDCb+lipOIRQNGYesw==", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmmirror.com/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmmirror.com/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ==", + "@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "requires": { - "inherits": "~2.0.0" + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" } }, - "blocking-proxy": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/blocking-proxy/-/blocking-proxy-1.0.1.tgz", - "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", + "@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "jest-get-type": "^29.6.3" + }, + "dependencies": { + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + } } }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "side-channel": "^1.0.4" + "has-flag": "^4.0.0" } } } }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmmirror.com/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha512-RaVTblr+OnEli0r/ud8InrU7D+G0y6aJhlxaLa6Pwty4+xoxboF1BsUI45tujvRpbj9dQVoglChqonGAsjEBYg==", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "has-flag": "^4.0.0" } } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "@types/yargs-parser": "*" } }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true - } - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - } - }, - "browserstack": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/browserstack/-/browserstack-1.6.1.tgz", - "integrity": "sha512-GxtFjpIaKdbAyzHfFDKixKO8IBT7wR3NjbzrGc78nNs/Ciys9wU3/nBtsqsWv5nDSrdI5tz0peKuzCPuNXNUiw==", - "dev": true, - "requires": { - "https-proxy-agent": "^2.2.1" - } - }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmmirror.com/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmmirror.com/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", @@ -3360,6 +2866,19 @@ "path-is-absolute": "^1.0.0" } }, + "istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "requires": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", @@ -3368,7228 +2887,8512 @@ "requires": { "brace-expansion": "^1.1.7" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "requires": { - "caller-callsite": "^2.0.0" + "@sinclair/typebox": "^0.27.8" } }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", - "dev": true - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", + "@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" } }, - "caniuse-lite": { - "version": "1.0.30001515", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz", - "integrity": "sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==", - "dev": true - }, - "canonical-path": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/canonical-path/-/canonical-path-1.0.0.tgz", - "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", - "dev": true - }, - "capture-stack-trace": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/capture-stack-trace/-/capture-stack-trace-1.0.2.tgz", - "integrity": "sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" }, "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" } }, - "circular-dependency-plugin": { - "version": "5.0.2", - "resolved": "https://registry.npmmirror.com/circular-dependency-plugin/-/circular-dependency-plugin-5.0.2.tgz", - "integrity": "sha512-oC7/DVAyfcY3UWKm0sN/oVoDedQDQiw/vIiAnuTWTpE5s0zWf7l3WY417Xw/Fbi/QbAjctAkxgMiS9P0s3zkmA==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmmirror.com/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha512-3Fo5wu8Ytle8q9iCzS4D2MWVL2X7JVWRiS1BnXbTFDhS9c/REkM9vd1AmabsoZoY5/dGi5TT9iKL8Kb6DeBRQg==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmmirror.com/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, - "codelyzer": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/codelyzer/-/codelyzer-4.5.0.tgz", - "integrity": "sha512-oO6vCkjqsVrEsmh58oNlnJkRXuA30hF8cdNAQV9DytEalDwyOFRvHMnlKFzmOStNerOmPGZU9GAHnBo4tGvtiQ==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "app-root-path": "^2.1.0", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.1.1" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@jsdevtools/ez-spawn": { + "version": "3.0.4", + "resolved": "https://registry.npmmirror.com/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz", + "integrity": "sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "cross-spawn": "^7.0.3", + "string-argv": "^0.3.1", + "type-detect": "^4.0.8" + } + }, + "@microsoft/api-extractor": { + "version": "7.47.0", + "resolved": "https://registry.npmmirror.com/@microsoft/api-extractor/-/api-extractor-7.47.0.tgz", + "integrity": "sha512-LT8yvcWNf76EpDC+8/ArTVSYePvuDQ+YbAUrsTcpg3ptiZ93HIcMCozP/JOxDt+rrsFfFHcpfoselKfPyRI0GQ==", + "requires": { + "@microsoft/api-extractor-model": "7.29.2", + "@microsoft/tsdoc": "~0.15.0", + "@microsoft/tsdoc-config": "~0.17.0", + "@rushstack/node-core-library": "5.4.1", + "@rushstack/rig-package": "0.5.2", + "@rushstack/terminal": "0.13.0", + "@rushstack/ts-command-line": "4.22.0", + "lodash": "~4.17.15", + "minimatch": "~3.0.3", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "source-map": "~0.6.1", + "typescript": "5.4.2" }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true + "@rushstack/node-core-library": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/@rushstack/node-core-library/-/node-core-library-5.4.1.tgz", + "integrity": "sha512-WNnwdS8r9NZ/2K3u29tNoSRldscFa7SxU0RT+82B6Dy2I4Hl2MeCSKm4EXLXPKeNzLGvJ1cqbUhTLviSF8E6iA==", + "requires": { + "ajv": "~8.13.0", + "ajv-draft-04": "~1.0.0", + "ajv-formats": "~3.0.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4" + } }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true + "ajv": { + "version": "8.13.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "requires": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "typescript": { + "version": "5.4.2", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==" } } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", - "dev": true, + "@microsoft/api-extractor-model": { + "version": "7.29.2", + "resolved": "https://registry.npmmirror.com/@microsoft/api-extractor-model/-/api-extractor-model-7.29.2.tgz", + "integrity": "sha512-hAYajOjQan3uslhKJRwvvHIdLJ+ZByKqdSsJ/dgHFxPtEbdKpzMDO8zuW4K5gkSMYl5D0LbNwxkhxr51P2zsmw==", "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "@microsoft/tsdoc": "~0.15.0", + "@microsoft/tsdoc-config": "~0.17.0", + "@rushstack/node-core-library": "5.4.1" + }, + "dependencies": { + "@rushstack/node-core-library": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/@rushstack/node-core-library/-/node-core-library-5.4.1.tgz", + "integrity": "sha512-WNnwdS8r9NZ/2K3u29tNoSRldscFa7SxU0RT+82B6Dy2I4Hl2MeCSKm4EXLXPKeNzLGvJ1cqbUhTLviSF8E6iA==", + "requires": { + "ajv": "~8.13.0", + "ajv-draft-04": "~1.0.0", + "ajv-formats": "~3.0.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4" + } + }, + "ajv": { + "version": "8.13.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "requires": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + } } }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, + "@microsoft/tsdoc": { + "version": "0.15.0", + "resolved": "https://registry.npmmirror.com/@microsoft/tsdoc/-/tsdoc-0.15.0.tgz", + "integrity": "sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==" + }, + "@microsoft/tsdoc-config": { + "version": "0.17.0", + "resolved": "https://registry.npmmirror.com/@microsoft/tsdoc-config/-/tsdoc-config-0.17.0.tgz", + "integrity": "sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==", "requires": { - "color-name": "1.1.3" + "@microsoft/tsdoc": "0.15.0", + "ajv": "~8.12.0", + "jju": "~1.4.0", + "resolve": "~1.22.2" } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "requires": { - "delayed-stream": "~1.0.0" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "compare-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==", - "dev": true + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "requires": { - "mime-db": ">= 1.43.0 < 2" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" } }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmmirror.com/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "@one-ini/wasm": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/@one-ini/wasm/-/wasm-0.1.1.tgz", + "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", + "dev": true + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } + "optional": true }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "@polka/url": { + "version": "0.5.0", + "resolved": "https://registry.npmmirror.com/@polka/url/-/url-0.5.0.tgz", + "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, + "@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" } }, - "configstore": { - "version": "3.1.5", - "resolved": "https://registry.npmmirror.com/configstore/-/configstore-3.1.5.tgz", - "integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==", - "dev": true, + "@rushstack/node-core-library": { + "version": "3.66.1", + "resolved": "https://registry.npmmirror.com/@rushstack/node-core-library/-/node-core-library-3.66.1.tgz", + "integrity": "sha512-ker69cVKAoar7MMtDFZC4CzcDxjwqIhFzqEnYI5NRN/8M3om6saWCVx/A7vL2t/jFCJsnzQplRDqA7c78pytng==", "requires": { - "dot-prop": "^4.2.1", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" + "colors": "~1.2.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4", + "z-schema": "~5.0.2" }, "dependencies": { - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "requires": { - "pify": "^3.0.0" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, - "connect": { - "version": "3.7.0", - "resolved": "https://registry.npmmirror.com/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, + "@rushstack/rig-package": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/@rushstack/rig-package/-/rig-package-0.5.2.tgz", + "integrity": "sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==", "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" + "resolve": "~1.22.1", + "strip-json-comments": "~3.1.1" + } + }, + "@rushstack/terminal": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/@rushstack/terminal/-/terminal-0.13.0.tgz", + "integrity": "sha512-Ou44Q2s81BqJu3dpYedAX54am9vn245F0HzqVrfJCMQk5pGgoKKOBOjkbfZC9QKcGNaECh6pwH2s5noJt7X6ew==", + "requires": { + "@rushstack/node-core-library": "5.4.1", + "supports-color": "~8.1.1" }, "dependencies": { - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, + "@rushstack/node-core-library": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/@rushstack/node-core-library/-/node-core-library-5.4.1.tgz", + "integrity": "sha512-WNnwdS8r9NZ/2K3u29tNoSRldscFa7SxU0RT+82B6Dy2I4Hl2MeCSKm4EXLXPKeNzLGvJ1cqbUhTLviSF8E6iA==", "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" + "ajv": "~8.13.0", + "ajv-draft-04": "~1.0.0", + "ajv-formats": "~3.0.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.5.4" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, + "ajv": { + "version": "8.13.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.13.0.tgz", + "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", "requires": { - "ee-first": "1.1.1" + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" } }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true + "@rushstack/ts-command-line": { + "version": "4.22.0", + "resolved": "https://registry.npmmirror.com/@rushstack/ts-command-line/-/ts-command-line-4.22.0.tgz", + "integrity": "sha512-Qj28t6MO3HRgAZ72FDeFsrpdE6wBWxF3VENgvrXh7JF2qIT+CrXiOJIesW80VFZB9QwObSpkB1ilx794fGQg6g==", + "requires": { + "@rushstack/terminal": "0.13.0", + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "string-argv": "~0.3.1" + } }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true + "@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "dev": true, + "requires": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + } }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true + "@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", + "dev": true, + "requires": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + } }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true + "@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", + "dev": true, + "requires": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + } }, - "content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", "dev": true, "requires": { - "safe-buffer": "5.2.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" } }, - "content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true - }, - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true + "@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", + "dev": true, + "requires": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + } }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", "dev": true }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmmirror.com/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", "dev": true, "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmmirror.com/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, - "copy-webpack-plugin": { - "version": "5.1.1", - "resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz", - "integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==", + "@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { - "cacache": "^12.0.3", - "find-cache-dir": "^2.1.0", - "glob-parent": "^3.1.0", - "globby": "^7.1.1", - "is-glob": "^4.0.1", - "loader-utils": "^1.2.3", - "minimatch": "^3.0.4", - "normalize-path": "^3.0.0", - "p-limit": "^2.2.1", - "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } + "type-detect": "4.0.8" } }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } + "@sinonjs/commons": "^3.0.0" } }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "@testing-library/dom": { + "version": "9.3.4", + "resolved": "https://registry.npmmirror.com/@testing-library/dom/-/dom-9.3.4.tgz", + "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" }, "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw==", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "@testing-library/vue": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/@testing-library/vue/-/vue-7.0.0.tgz", + "integrity": "sha512-JU/q93HGo2qdm1dCgWymkeQlfpC0/0/DBZ2nAHgEAsVZxX11xVIxT7gbXdI7HACQpUbsUWt1zABGU075Fzt9XQ==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "@babel/runtime": "^7.21.0", + "@testing-library/dom": "^9.0.1", + "@vue/test-utils": "^2.3.1" } }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmmirror.com/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } + "@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true }, - "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha512-eZ+m1WNhSZutOa/uRblAc9Ut5MQfukFrFMtPSm3bZCA888NmMd5AWXWdgRZ80zd+pTk1P2JrGjg9pUPTvl2PWQ==", - "dev": true, + "@ts-morph/common": { + "version": "0.19.0", + "resolved": "https://registry.npmmirror.com/@ts-morph/common/-/common-0.19.0.tgz", + "integrity": "sha512-Unz/WHmd4pGax91rdIKWi51wnVUW11QttMEPpBiBgIewnc9UQIX7UDLxr5vRlqeByXCwhkF6VabSsI0raWcyAQ==", "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" + "fast-glob": "^3.2.12", + "minimatch": "^7.4.3", + "mkdirp": "^2.1.6", + "path-browserify": "^1.0.1" }, "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, + "minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "brace-expansion": "^2.0.1" } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true } } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmmirror.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } + "@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==", + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, - "css-parse": { - "version": "1.7.0", - "resolved": "https://registry.npmmirror.com/css-parse/-/css-parse-1.7.0.tgz", - "integrity": "sha512-OI38lO4JQQX2GSisTqwiSFxiWNmLajXdW4tCCxAuiwGKjusHALQadSHBSxGlU8lrFp47IkLuU2AfSYz31qpETQ==", + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, - "css-selector-tokenizer": { - "version": "0.7.3", - "resolved": "https://registry.npmmirror.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz", - "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==", + "@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmmirror.com/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==" + }, + "@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmmirror.com/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true + }, + "@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "cssesc": "^3.0.0", - "fastparse": "^1.1.2" + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" } }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha512-Ht70DcFBh+/ekjVrYS2PlDMdSQEl3OFNmjK6lcn49HptBgilXf/Zwg4uFh9Xn0pX3Q8YOkSjIFOfK2osvdqpBw==", + "@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmmirror.com/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "requires": { - "through": "X.X.X" + "@babel/types": "^7.0.0" } }, - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true - }, - "cuint": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/cuint/-/cuint-0.2.2.tgz", - "integrity": "sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw==", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", + "@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmmirror.com/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "requires": { - "array-find-index": "^1.0.1" + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true + "@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmmirror.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "requires": { + "@babel/types": "^7.20.7" + } }, - "cyclist": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/cyclist/-/cyclist-1.0.2.tgz", - "integrity": "sha512-0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA==", + "@types/chai": { + "version": "4.3.16", + "resolved": "https://registry.npmmirror.com/@types/chai/-/chai-4.3.16.tgz", + "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", "dev": true }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "@types/chai-subset": { + "version": "1.3.5", + "resolved": "https://registry.npmmirror.com/@types/chai-subset/-/chai-subset-1.3.5.tgz", + "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "@types/chai": "*" } }, - "date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "@types/chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/@types/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-1zzPV9FDe1I/WHhRkf9SNgqtRJWZqrBWgu7JGveuHmmyR9CnAPCie2N/x+iHrgnpYBIcCJWHBoMRv2TRWktsvw==", + "dev": true, "requires": { - "@babel/runtime": "^7.21.0" + "chalk": "*" } }, - "date-format": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/date-format/-/date-format-2.1.0.tgz", - "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "@types/commander": { + "version": "2.12.2", + "resolved": "https://registry.npmmirror.com/@types/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-0QEFiR8ljcHp9bAbWxecjVRuAMr16ivPiGOw6KFQBVrVd0RQIcM3xKdRisH2EDWgVWujiYtHwhSkSUoAAGzH7Q==", "dev": true, "requires": { - "ms": "2.0.0" + "commander": "*" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" + "@types/node": "*" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmmirror.com/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, - "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmmirror.com/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", - "dev": true, - "requires": { - "execa": "^0.10.0", - "ip-regex": "^2.1.0" - } - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha512-B0n2zDIXpzLzKeoEozorDSa1cHc1t0NjmxP0zuAxbizNU2MBqYJJKYXrrFdKuQliojXynrxgd7l4ahfg/+aA5g==", + "@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "requires": { - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - } + "@types/istanbul-lib-coverage": "*" } }, - "define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "@types/istanbul-lib-report": "*" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "@types/jest": { + "version": "26.0.24", + "resolved": "https://registry.npmmirror.com/@types/jest/-/jest-26.0.24.tgz", + "integrity": "sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "jest-diff": "^26.0.0", + "pretty-format": "^26.0.0" }, "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "color-convert": "^2.0.1" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "color-name": "~1.1.4" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/del/-/del-3.0.0.tgz", - "integrity": "sha512-7yjqSoVSlJzA4t/VUwazuEagGeANEKB3f/aNI//06pfKgwoCb7f6Q1gETN1sZzYaj6chTQ0AhIwDiPdfOjko4A==", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/globby/-/globby-6.1.0.tgz", - "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - } + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "@types/jsonp": { + "version": "0.2.3", + "resolved": "https://registry.npmmirror.com/@types/jsonp/-/jsonp-0.2.3.tgz", + "integrity": "sha512-+bbowFC2n6TkpbQ369/tqL8pRPF4JRfRNf7Z6cpnAlLlEdy6YxG4HYZE7Qkeg2otcDbwNPIuSMux+P3pE4viFA==", "dev": true }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", "dev": true }, - "dependency-graph": { - "version": "0.7.2", - "resolved": "https://registry.npmmirror.com/dependency-graph/-/dependency-graph-0.7.2.tgz", - "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", - "dev": true + "@types/lodash": { + "version": "4.17.6", + "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.6.tgz", + "integrity": "sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==" }, - "des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, + "@types/lodash-es": { + "version": "4.17.12", + "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", + "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "@types/lodash": "*" } }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true + "@types/lodash.debounce": { + "version": "4.0.9", + "resolved": "https://registry.npmmirror.com/@types/lodash.debounce/-/lodash.debounce-4.0.9.tgz", + "integrity": "sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ==", + "dev": true, + "requires": { + "@types/lodash": "*" + } }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", + "@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", "dev": true, "requires": { - "repeating": "^2.0.0" + "@types/linkify-it": "*", + "@types/mdurl": "*" } }, - "detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/di/-/di-0.0.1.tgz", - "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", + "@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmmirror.com/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "@types/node": { + "version": "20.5.1", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmmirror.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmmirror.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, + "@types/ora": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/@types/ora/-/ora-3.2.0.tgz", + "integrity": "sha512-jll99xUKpiFbIFZSQcxm4numfsLaOWBzWNaRk3PvTSE7BPqTzzOCFmS0mQ7m8qkTfmYhuYbehTGsxkvRLPC++w==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "ora": "*" } }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmmirror.com/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmmirror.com/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "@types/web-bluetooth": { + "version": "0.0.15", + "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.15.tgz", + "integrity": "sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==" + }, + "@types/yargs": { + "version": "15.0.19", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-15.0.19.tgz", + "integrity": "sha512-2XUaGVmyQjgyAZldf0D0c14vvo/yv0MhQBSTJcejMMaitsn3nxCB6TmH4G0ZQf+uxROOa9mpanoSm8h6SG/1ZA==", "dev": true, "requires": { - "path-type": "^3.0.0" + "@types/yargs-parser": "*" } }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", + "@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, - "dns-packet": { - "version": "1.3.4", - "resolved": "https://registry.npmmirror.com/dns-packet/-/dns-packet-1.3.4.tgz", - "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==", + "@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" } }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha512-Ix5PrWjphuSoUXV/Zv5gaFHjnaJtb02F2+Si3Ht9dyJ87+Z/lMmy+dpNHtTGraNK958ndXq2i+GLkWsWHcKaBQ==", + "@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "requires": { - "buffer-indexof": "^1.0.0" + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" } }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" } }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" } }, - "duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmmirror.com/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" } }, - "echarts": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", - "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "requires": { - "tslib": "2.3.0", - "zrender": "5.5.0" - }, - "dependencies": { - "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" - } + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "@vitejs/plugin-vue": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", + "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", "dev": true }, - "electron-to-chromium": { - "version": "1.4.457", - "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.457.tgz", - "integrity": "sha512-/g3UyNDmDd6ebeWapmAoiyy+Sy2HyJ+/X8KyvNeHfKRFfHaA2W8oF5fxD5F3tjBDcjpwo0iek6YNgxNXDBoEtA==", - "dev": true + "@vitejs/plugin-vue-jsx": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-3.1.0.tgz", + "integrity": "sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==", + "dev": true, + "requires": { + "@babel/core": "^7.23.3", + "@babel/plugin-transform-typescript": "^7.23.3", + "@vue/babel-plugin-jsx": "^1.1.5" + } }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "@volar/language-core": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/@volar/language-core/-/language-core-1.11.1.tgz", + "integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "@volar/source-map": "1.11.1" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmmirror.com/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "@volar/source-map": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/@volar/source-map/-/source-map-1.11.1.tgz", + "integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==", "dev": true, "requires": { - "iconv-lite": "^0.6.2" - }, - "dependencies": { - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - } + "muggle-string": "^0.3.1" } }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "@volar/typescript": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/@volar/typescript/-/typescript-1.11.1.tgz", + "integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==", "dev": true, "requires": { - "once": "^1.4.0" + "@volar/language-core": "1.11.1", + "path-browserify": "^1.0.1" } }, - "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", + "@vue/babel-helper-vue-transform-on": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.2.2.tgz", + "integrity": "sha512-nOttamHUR3YzdEqdM/XXDyCSdxMA9VizUKoroLX6yTyRtggzQMHXcmwh8a7ZErcJttIBIc9s68a1B8GZ+Dmvsw==", + "dev": true + }, + "@vue/babel-plugin-jsx": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.2.2.tgz", + "integrity": "sha512-nYTkZUVTu4nhP199UoORePsql0l+wj7v/oyQjtThUVhJl1U+6qHuoVhIvR3bf7eVKjbCK+Cs2AWd7mi9Mpz9rA==", "dev": true, "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" + "@babel/helper-module-imports": "~7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.23.3", + "@babel/template": "^7.23.9", + "@babel/traverse": "^7.23.9", + "@babel/types": "^7.23.9", + "@vue/babel-helper-vue-transform-on": "1.2.2", + "@vue/babel-plugin-resolve-type": "1.2.2", + "camelcase": "^6.3.0", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" }, "dependencies": { - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "requires": { - "ms": "2.0.0" + "@babel/types": "^7.22.15" } + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true } } }, - "engine.io-client": { - "version": "3.2.1", - "resolved": "https://registry.npmmirror.com/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" + "@vue/babel-plugin-resolve-type": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/@vue/babel-plugin-resolve-type/-/babel-plugin-resolve-type-1.2.2.tgz", + "integrity": "sha512-EntyroPwNg5IPVdUJupqs0CFzuf6lUrVvCspmv2J1FITLeGnUCuoGNNk78dgCusxEiYj6RMkTJflGSxk5aIC4A==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.23.5", + "@babel/helper-module-imports": "~7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/parser": "^7.23.9", + "@vue/compiler-sfc": "^3.4.15" }, "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "requires": { - "ms": "2.0.0" + "@babel/types": "^7.22.15" } } } }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, + "@vue/compiler-core": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.31.tgz", + "integrity": "sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==", "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.31", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" } }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, + "@vue/compiler-dom": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.31.tgz", + "integrity": "sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==", "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" + "@vue/compiler-core": "3.4.31", + "@vue/shared": "3.4.31" } }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", - "dev": true - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha512-CJAN+O0/yA1CKfRn9SXOGctSpEM7DCon/r/5r2eXFMY2zCCJBasFhcM5I+1kh3Ap11FsQCX+vGHceNPvpWKhoA==", - "dev": true - }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, + "@vue/compiler-sfc": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.31.tgz", + "integrity": "sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==", "requires": { - "prr": "~1.0.1" + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.31", + "@vue/compiler-dom": "3.4.31", + "@vue/compiler-ssr": "3.4.31", + "@vue/shared": "3.4.31", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.10", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, + "@vue/compiler-ssr": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.31.tgz", + "integrity": "sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==", "requires": { - "is-arrayish": "^0.2.1" + "@vue/compiler-dom": "3.4.31", + "@vue/shared": "3.4.31" } }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "@vue/devtools-api": { + "version": "6.6.3", + "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz", + "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==", "dev": true }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "@vue/language-core": { + "version": "1.8.27", + "resolved": "https://registry.npmmirror.com/@vue/language-core/-/language-core-1.8.27.tgz", + "integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==", "dev": true, "requires": { - "es6-promise": "^4.0.3" + "@volar/language-core": "~1.11.1", + "@volar/source-map": "~1.11.1", + "@vue/compiler-dom": "^3.3.0", + "@vue/shared": "^3.3.0", + "computeds": "^0.0.1", + "minimatch": "^9.0.3", + "muggle-string": "^0.3.1", + "path-browserify": "^1.0.1", + "vue-template-compiler": "^2.7.14" } }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, + "@vue/reactivity": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.31.tgz", + "integrity": "sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==", "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "@vue/shared": "3.4.31" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "@vue/runtime-core": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.31.tgz", + "integrity": "sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==", "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } + "@vue/reactivity": "3.4.31", + "@vue/shared": "3.4.31" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true + "@vue/runtime-dom": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.31.tgz", + "integrity": "sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==", + "requires": { + "@vue/reactivity": "3.4.31", + "@vue/runtime-core": "3.4.31", + "@vue/shared": "3.4.31", + "csstype": "^3.1.3" + } }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true + "@vue/server-renderer": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.31.tgz", + "integrity": "sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==", + "requires": { + "@vue/compiler-ssr": "3.4.31", + "@vue/shared": "3.4.31" + } }, - "eventsource": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-1.1.2.tgz", - "integrity": "sha512-xAH3zWhgO2/3KIniEKYPr8plNSzlGINOUqYj0m0u7AB81iRw8b/3E73W6AuU+6klLbaSFmZnaETQ2lXPfAydrA==", - "dev": true + "@vue/shared": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.31.tgz", + "integrity": "sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==" }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "@vue/test-utils": { + "version": "2.4.6", + "resolved": "https://registry.npmmirror.com/@vue/test-utils/-/test-utils-2.4.6.tgz", + "integrity": "sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "js-beautify": "^1.14.9", + "vue-component-type-helpers": "^2.0.0" } }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } + "@vuedx/compiler-sfc": { + "version": "0.7.2", + "resolved": "https://registry.npmmirror.com/@vuedx/compiler-sfc/-/compiler-sfc-0.7.2.tgz", + "integrity": "sha512-20u9gN1OjAWPuJcBqvF0AOvjI76Zl/s+Q50e1oQhpjIxSsHM7+wprtLV2kiyOR3b49ABszTYWeGAkPoEHAtTyw==", + "dev": true, + "requires": { + "@vue/compiler-core": "^3.2.31", + "@vuedx/shared": "0.7.5", + "@vuedx/template-ast-types": "0.7.4", + "lru-cache": "^6.0.0", + "source-map": "^0.6.1" } }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmmirror.com/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "@vuedx/compiler-tsx": { + "version": "0.8.1", + "resolved": "https://registry.npmmirror.com/@vuedx/compiler-tsx/-/compiler-tsx-0.8.1.tgz", + "integrity": "sha512-Zp6+6D/qUpblm2eNQN2jV3VsmXISIEVmgCfFloxmtEqI76LXelFm0aGwpBzCqkAOveDMW9c1H+Y99OvCuAFy9Q==", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "@babel/parser": "7.12.3", + "@babel/types": "7.12.1", + "@vue/compiler-core": "^3.2.31", + "@vuedx/compiler-sfc": "0.7.2", + "@vuedx/shared": "0.7.5", + "@vuedx/template-ast-types": "0.7.4", + "@vuedx/transforms": "0.7.6", + "magic-string": "^0.26.2", + "source-map": "^0.6.1", + "sourcemap-codec": "^1.4.8" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "@babel/parser": { + "version": "7.12.3", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", + "dev": true + }, + "@babel/types": { + "version": "7.12.1", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "magic-string": { + "version": "0.26.7", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.26.7.tgz", + "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "sourcemap-codec": "^1.4.8" } } } }, - "express": { - "version": "4.18.2", - "resolved": "https://registry.npmmirror.com/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "@vuedx/projectconfig": { + "version": "0.7.3", + "resolved": "https://registry.npmmirror.com/@vuedx/projectconfig/-/projectconfig-0.7.3.tgz", + "integrity": "sha512-WZXF1Mxm2yrXbblC7R3G4u/guOyedRdrzFxBeqfOXL4rm7qp1Rcz8ivy/7dFnAgXc3fy5d8VSVAp1WAvtwvdAw==", "dev": true, "requires": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } + "@vuedx/shared": "0.7.5", + "json5": "^2.2.0" } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "@vuedx/shared": { + "version": "0.7.5", + "resolved": "https://registry.npmmirror.com/@vuedx/shared/-/shared-0.7.5.tgz", + "integrity": "sha512-BdezMybQbHNAPAQ0fRCSSgzqUOpnK7Scf+UV7MfIIhMS77jecNlc4gXtnTfzp5GdjkcHX7U/LmG4sJiApjxxKw==", + "dev": true, + "requires": { + "@sentry/node": "^5.30.0", + "sourcemap-codec": "^1.4.8" + } }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "@vuedx/template-ast-types": { + "version": "0.7.4", + "resolved": "https://registry.npmmirror.com/@vuedx/template-ast-types/-/template-ast-types-0.7.4.tgz", + "integrity": "sha512-Vd+0Kj7H75S/2bph3WLjsEGrNX7N9pIv7IniW5noUIouc8Y5J9cpdUXG4gFh6aySkc2n0L2DadY33V8ydNA+rg==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "@vue/compiler-core": "^3.2.31" } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "@vuedx/transforms": { + "version": "0.7.6", + "resolved": "https://registry.npmmirror.com/@vuedx/transforms/-/transforms-0.7.6.tgz", + "integrity": "sha512-PanN3GzoiPCDnQFPfD495radHVJqTZK+OqCnw/H+iWLgyYSQ0eYD24Mtr8mnf2V7g3SZwMcpGsH14wXNYra6KQ==", "dev": true, "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "@vuedx/shared": "0.7.5" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "@vuedx/typecheck": { + "version": "0.7.6", + "resolved": "https://registry.npmmirror.com/@vuedx/typecheck/-/typecheck-0.7.6.tgz", + "integrity": "sha512-CxuL/ghxXn/u1BGiqZ4nxLcOQkRFcGj2jNBrNunRX//4JH61ez4htQ+jEKyyybWOkXhlcW85KaZKuJsRF6st5A==", "dev": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "@vuedx/shared": "0.7.5", + "@vuedx/typescript-plugin-vue": "0.7.6", + "@vuedx/vue-virtual-textdocument": "0.7.6", + "chalk": "^4.1.0", + "fast-glob": "^3.2.4", + "minimist": "^1.2.5", + "resolve-from": "^5.0.0", + "typescript": "^4.8.2" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "color-convert": "^2.0.1" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "color-name": "~1.1.4" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "has-flag": "^4.0.0" } } } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha512-eIgZvM9C3P05kg0qxfqaVU6Tma4QedCPIByQOcemV0vju8ot3cS2DpHi4m2G2JvbSMI152rjfLX0p1pkSdyPlQ==", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmmirror.com/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ==", + "@vuedx/typescript-plugin-vue": { + "version": "0.7.6", + "resolved": "https://registry.npmmirror.com/@vuedx/typescript-plugin-vue/-/typescript-plugin-vue-0.7.6.tgz", + "integrity": "sha512-8kaobkgrxEa5ebA6CptUBQn/gqBszBYlbmN0lPM2MFVpON7mF8ovqp/8Lzgg+7im6LbQ/EeHN+XrJP2y7BuseA==", "dev": true, "requires": { - "websocket-driver": ">=0.5.1" + "@vuedx/projectconfig": "0.7.3", + "@vuedx/shared": "0.7.5", + "@vuedx/template-ast-types": "0.7.4", + "@vuedx/vue-virtual-textdocument": "0.7.6", + "inversify": "^5.1.1", + "json5": "^2.2.0", + "node-ipc": "10.1.0", + "reflect-metadata": "^0.1.13" } }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmmirror.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "@vuedx/vue-virtual-textdocument": { + "version": "0.7.6", + "resolved": "https://registry.npmmirror.com/@vuedx/vue-virtual-textdocument/-/vue-virtual-textdocument-0.7.6.tgz", + "integrity": "sha512-atPX5dgH/iOYG8uyaKXy3ra7Lc6F73WQBIj7uAXJM39fabi83rkQXljG0qbIA1O/dePAU/Z+bbT3zUU/vza0Xw==", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "@vuedx/compiler-sfc": "0.7.2", + "@vuedx/compiler-tsx": "0.8.1", + "@vuedx/shared": "0.7.5", + "@vuedx/template-ast-types": "0.7.4", + "@vuedx/transforms": "0.7.6", + "sourcemap-codec": "^1.4.8", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-uri": "^2.1.2" } }, - "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", - "dev": true, + "@vueuse/core": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.2.0.tgz", + "integrity": "sha512-/MZ6qpz6uSyaXrtoeBWQzAKRG3N7CvfVWvQxiM3ei3Xe5ydOjjtVbo7lGl9p8dECV93j7W8s63A8H0kFLpLyxg==", "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" + "@types/web-bluetooth": "^0.0.15", + "@vueuse/metadata": "9.2.0", + "@vueuse/shared": "9.2.0", + "vue-demi": "*" } }, - "file-saver": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", - "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true + "@vueuse/metadata": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.2.0.tgz", + "integrity": "sha512-exN4KE6iquxDCdt72BgEhb3tlOpECtD61AUdXnUqBTIUCl70x1Ar/QXo3bYcvxmdMS2/peQyfeTzBjRTpvL5xw==" }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha512-UxowFKnAFIwtmSxgKjWAVgjE3Fk7MQJT0ZIyl0NwIFZTrx4913rLaonGJ84V+x/2+w/pe4ULHRns+GZPs1TVuw==", - "dev": true, + "@vueuse/shared": { + "version": "9.2.0", + "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.2.0.tgz", + "integrity": "sha512-NnRp/noSWuXW0dKhZK5D0YLrDi0nmZ18UeEgwXQq7Ul5TTP93lcNnKjrHtd68j2xFB/l59yPGFlCryL692bnrA==", "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" + "vue-demi": "*" } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "@yankeeinlondon/builder-api": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/@yankeeinlondon/builder-api/-/builder-api-1.4.1.tgz", + "integrity": "sha512-qc6HyfqtuS06FvA5rK0L62Nmc1LnarVOt8/V/mTX2DBZlpTfIDpudpbE/7/kxjme9pP4PFMCk7cPSrprLEorjw==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" + "@types/markdown-it": "^12.2.3", + "@yankeeinlondon/happy-wrapper": "^2.10.1", + "fp-ts": "^2.13.1", + "inferred-types": "^0.37.6", + "markdown-it": "^13.0.1", + "vite-plugin-md": ">=0.22.5" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "vite-plugin-md": { + "version": "0.22.5", + "resolved": "https://registry.npmmirror.com/vite-plugin-md/-/vite-plugin-md-0.22.5.tgz", + "integrity": "sha512-ex6yQfan2teBT2uMzoIlDHRhKTOsNiyvblA9eLU/+uygpg4KikJPFeyBX300LqQ3pZ9qGHz35qoGJ0oLw47eZg==", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "@yankeeinlondon/builder-api": "^1.3.4", + "@yankeeinlondon/gray-matter": "^6.1.1", + "@yankeeinlondon/happy-wrapper": "^2.10.1", + "markdown-it": "^13.0.1", + "source-map-js": "^1.0.2" } } } }, - "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "@yankeeinlondon/gray-matter": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/@yankeeinlondon/gray-matter/-/gray-matter-6.2.1.tgz", + "integrity": "sha512-ZrHqB3PAin0QmxeNV3Ly3c6IDXKelGGLmGJGWoqwxI1jJjXNU80i6KWsJ0sAhzTg/UIsAtgBFcJkXS7F1ZM6eQ==", "dev": true, "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" + "inferred-types": "^0.37.6", + "js-yaml": "^4.1.0", + "kind-of": "^6.0.3", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" } }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "@yankeeinlondon/happy-wrapper": { + "version": "2.10.1", + "resolved": "https://registry.npmmirror.com/@yankeeinlondon/happy-wrapper/-/happy-wrapper-2.10.1.tgz", + "integrity": "sha512-kS3HT26QSQqcZa8Me2yrb6oc/j0BTmTRR76ITRGcYlO8G1snz9wii1eCrBTx+gAo58P+e3UkxB8PTVrmjTowVA==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" + "fp-ts": "^2.13.1", + "happy-dom": "^8.1.0", + "native-dash": "^1.24.0" } }, - "find-parent-dir": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/find-parent-dir/-/find-parent-dir-0.3.1.tgz", - "integrity": "sha512-o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmmirror.com/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" } }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "abbrev": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-2.0.0.tgz", + "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", "dev": true }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "requires": { - "for-in": "^1.0.1" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "acorn": { + "version": "8.12.0", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", "dev": true }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "acorn": "^8.11.0" } }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==", "dev": true }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { - "map-cache": "^0.2.2" + "debug": "4" } }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", - "dev": true, + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" } }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha512-05cXDIwNbFaoFWaz5gNHlUTbH5whiss/hr/ibzPd4MH3cR4w0ZKeIPiVdbyJurg3O5r/Bjpvn9KOb1/rPMf3nA==", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } + "ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==" }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, + "ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "ajv": "^8.0.0" } }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "algoliasearch": { + "version": "4.24.0", + "resolved": "https://registry.npmmirror.com/algoliasearch/-/algoliasearch-4.24.0.tgz", + "integrity": "sha512-bf0QV/9jVejssFBmz2HQLxUadxk574t4iwjCKp5E7NBzwKkrDEhKPISIIjAU/p6K5qDx3qoeh4+26zWN1jmw3g==", "dev": true, "requires": { - "minipass": "^2.6.0" + "@algolia/cache-browser-local-storage": "4.24.0", + "@algolia/cache-common": "4.24.0", + "@algolia/cache-in-memory": "4.24.0", + "@algolia/client-account": "4.24.0", + "@algolia/client-analytics": "4.24.0", + "@algolia/client-common": "4.24.0", + "@algolia/client-personalization": "4.24.0", + "@algolia/client-search": "4.24.0", + "@algolia/logger-common": "4.24.0", + "@algolia/logger-console": "4.24.0", + "@algolia/recommend": "4.24.0", + "@algolia/requester-browser-xhr": "4.24.0", + "@algolia/requester-common": "4.24.0", + "@algolia/requester-node-http": "4.24.0", + "@algolia/transporter": "4.24.0" } }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==", + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmmirror.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "optional": true, "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" + "color-convert": "^1.9.0" } }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmmirror.com/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmmirror.com/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmmirror.com/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", - "dev": true, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "sprintf-js": "~1.0.2" } }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "aria-query": { + "version": "5.1.3", + "resolved": "https://registry.npmmirror.com/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, "requires": { - "globule": "^1.0.0" + "deep-equal": "^2.0.5" } }, - "genfun": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" } }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", "dev": true }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "async-validator": { + "version": "4.2.5", + "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==" + }, + "available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "possible-typed-array-names": "^1.0.0" } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" }, "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "has-flag": "^4.0.0" } } } }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmmirror.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "requires": { - "ini": "^1.3.4" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmmirror.com/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true + "babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/globby/-/globby-7.1.1.tgz", - "integrity": "sha512-yANWAN2DUcBtuus5Cpd+SKROzXHs2iVXFZt/Ykrfz6SAXqacLX25NZpltE+39ceMexYF4TtEadjuSTw8+3wX4g==", + "babel-plugin-polyfill-corejs2": { + "version": "0.4.11", + "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.2", + "semver": "^6.3.1" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, - "globule": { - "version": "1.3.4", - "resolved": "https://registry.npmmirror.com/globule/-/globule-1.3.4.tgz", - "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", + "babel-plugin-polyfill-corejs3": { + "version": "0.10.4", + "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", + "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", "dev": true, "requires": { - "glob": "~7.1.1", - "lodash": "^4.17.21", - "minimatch": "~3.0.2" + "@babel/helper-define-polyfill-provider": "^0.6.1", + "core-js-compat": "^3.36.1" } }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmmirror.com/got/-/got-6.7.1.tgz", - "integrity": "sha512-Y/K3EDuiQN9rTZhBvPRWMLXIKdeD1Rj0nzunfoi0Yyn5WBEbzxXKU9Ub2X41oZBagVWOBU3MuDonFMgPWQFnwg==", + "babel-plugin-polyfill-regenerator": { + "version": "0.6.2", + "resolved": "https://registry.npmmirror.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", "dev": true, "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" + "@babel/helper-define-polyfill-provider": "^0.6.2" } }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, - "handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==" + }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "bl": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dev": true, + "requires": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "body-scroll-lock": { + "version": "4.0.0-beta.0", + "resolved": "https://registry.npmmirror.com/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz", + "integrity": "sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==", "dev": true }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "requires": { + "fill-range": "^7.1.1" + } + }, + "brilliant-errors": { + "version": "0.7.3", + "resolved": "https://registry.npmmirror.com/brilliant-errors/-/brilliant-errors-0.7.3.tgz", + "integrity": "sha512-WT9BkAze4SUOJfr7LUwJWNDAvynEAvUMvMPuFKu8QQKnRq+WMx3DAtHfOBJjHmHRxf748JY3CNVytSk6HH2yGg==", "dev": true, "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "bumpp": "^8.2.1", + "callsites": "^4.0.0", + "inferred-types": "^0.37.2", + "vitest": "^0.25.6" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "callsites": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/callsites/-/callsites-4.2.0.tgz", + "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", "dev": true } } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "node-int64": "^0.4.0" } }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "bumpp": { + "version": "8.2.1", + "resolved": "https://registry.npmmirror.com/bumpp/-/bumpp-8.2.1.tgz", + "integrity": "sha512-4tHKsWC2mqHQvdjZ4AXgVhS2xMsz8qQ4zYt87vGRXW5tqAjrYa/UJqy7s/dGYI2OIe9ghBdiFhKpyKEX9SXffg==", "dev": true, "requires": { - "isarray": "2.0.1" + "@jsdevtools/ez-spawn": "^3.0.4", + "cac": "^6.7.12", + "fast-glob": "^3.2.11", + "kleur": "^4.1.4", + "prompts": "^2.4.1", + "semver": "^7.3.5" }, "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", + "kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true } } }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==", + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "cac": { + "version": "6.7.14", + "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "requires": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, - "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", "dev": true }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmmirror.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" } }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "caniuse-lite": { + "version": "1.0.30001639", + "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz", + "integrity": "sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==", "dev": true }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "chai": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" } }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmmirror.com/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } + "get-func-name": "^2.0.2" } }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmmirror.com/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" } }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmmirror.com/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true + }, + "cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "restore-cursor": "^4.0.0" } }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmmirror.com/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" } }, - "html-entities": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/html-entities/-/html-entities-1.4.0.tgz", - "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmmirror.com/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true + "code-block-writer": { + "version": "12.0.0", + "resolved": "https://registry.npmmirror.com/code-block-writer/-/code-block-writer-12.0.0.tgz", + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==" }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmmirror.com/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "color-name": "1.1.3" } }, - "http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmmirror.com/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmmirror.com/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==" }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmmirror.com/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", "dev": true, "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "mime-db": ">= 1.43.0 < 2" } }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmmirror.com/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" }, "dependencies": { "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.0.0" } }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true } } }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, - "requires": { - "ms": "^2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmmirror.com/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "computeds": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/computeds/-/computeds-0.0.1.tgz", + "integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==", "dev": true }, - "ignore-walk": { - "version": "3.0.4", - "resolved": "https://registry.npmmirror.com/ignore-walk/-/ignore-walk-3.0.4.tgz", - "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "image-size": { - "version": "0.5.5", - "resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz", - "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha512-Ew5AZzJQFqrOV5BTW3EIoHAnoie1LojZLXKcCQ/yTRyVZosBhK1x1ViYjHGf5pAFOq8ZyChZp6m/fSN7pJyZtg==", + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmmirror.com/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, "requires": { - "import-from": "^2.1.0" + "ini": "^1.3.4", + "proto-list": "~1.2.1" } }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "conventional-changelog": { + "version": "3.1.25", + "resolved": "https://registry.npmmirror.com/conventional-changelog/-/conventional-changelog-3.1.25.tgz", + "integrity": "sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==", "dev": true, "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "conventional-changelog-angular": "^5.0.12", + "conventional-changelog-atom": "^2.0.8", + "conventional-changelog-codemirror": "^2.0.8", + "conventional-changelog-conventionalcommits": "^4.5.0", + "conventional-changelog-core": "^4.2.1", + "conventional-changelog-ember": "^2.0.9", + "conventional-changelog-eslint": "^3.0.9", + "conventional-changelog-express": "^2.0.6", + "conventional-changelog-jquery": "^3.0.11", + "conventional-changelog-jshint": "^2.0.9", + "conventional-changelog-preset-loader": "^2.3.4" + }, + "dependencies": { + "conventional-changelog-angular": { + "version": "5.0.13", + "resolved": "https://registry.npmmirror.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + } + }, + "conventional-changelog-conventionalcommits": { + "version": "4.6.3", + "resolved": "https://registry.npmmirror.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", + "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "lodash": "^4.17.15", + "q": "^1.5.1" + } + } } }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha512-0vdnLL2wSGnhlRmzHJAg5JHjt1l2vYhzJ7tNLGbeVg0fse56tpGaH0uzH+r9Slej+BSXXEHvBKDEnVSLLE9/+w==", + "conventional-changelog-angular": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz", + "integrity": "sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "compare-func": "^2.0.0" } }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", - "dev": true - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "conventional-changelog-atom": { + "version": "2.0.8", + "resolved": "https://registry.npmmirror.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz", + "integrity": "sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==", "dev": true, "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" + "q": "^1.5.1" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "in-publish": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/in-publish/-/in-publish-2.0.1.tgz", - "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", - "dev": true - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", + "conventional-changelog-cli": { + "version": "2.2.2", + "resolved": "https://registry.npmmirror.com/conventional-changelog-cli/-/conventional-changelog-cli-2.2.2.tgz", + "integrity": "sha512-8grMV5Jo8S0kP3yoMeJxV2P5R6VJOqK72IiSV9t/4H5r/HiRqEBQ83bYGuz4Yzfdj4bjaAEhZN/FFbsFXr5bOA==", "dev": true, "requires": { - "repeating": "^2.0.0" + "add-stream": "^1.0.0", + "conventional-changelog": "^3.1.24", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "tempfile": "^3.0.0" } }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "conventional-changelog-codemirror": { + "version": "2.0.8", + "resolved": "https://registry.npmmirror.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz", + "integrity": "sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "q": "^1.5.1" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "injection-js": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/injection-js/-/injection-js-2.4.0.tgz", - "integrity": "sha512-6jiJt0tCAo9zjHbcwLiPL+IuNe9SQ6a9g0PEzafThW3fOQi0mrmiJGBJvDD6tmhPh8cQHIQtCOrJuBfQME4kPA==", + "conventional-changelog-conventionalcommits": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-6.1.0.tgz", + "integrity": "sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==", "dev": true, "requires": { - "tslib": "^2.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", - "dev": true - } + "compare-func": "^2.0.0" } }, - "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmmirror.com/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" + "conventional-changelog-core": { + "version": "4.2.4", + "resolved": "https://registry.npmmirror.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz", + "integrity": "sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==", + "dev": true, + "requires": { + "add-stream": "^1.0.0", + "conventional-changelog-writer": "^5.0.0", + "conventional-commits-parser": "^3.2.0", + "dateformat": "^3.0.0", + "get-pkg-repo": "^4.0.0", + "git-raw-commits": "^2.0.8", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^4.1.1", + "lodash": "^4.17.15", + "normalize-package-data": "^3.0.0", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "through2": "^4.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "conventional-commits-parser": { + "version": "3.2.4", + "resolved": "https://registry.npmmirror.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "is-fullwidth-code-point": { + "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "p-try": "^1.0.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - } + "p-limit": "^1.1.0" } - } - } - }, - "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "dependencies": { + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + } + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, + "conventional-changelog-ember": { + "version": "2.0.9", + "resolved": "https://registry.npmmirror.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", + "integrity": "sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==", "dev": true, "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" + "q": "^1.5.1" } }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmmirror.com/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "conventional-changelog-eslint": { + "version": "3.0.9", + "resolved": "https://registry.npmmirror.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz", + "integrity": "sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "q": "^1.5.1" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true - }, - "ip": { - "version": "1.1.8", - "resolved": "https://registry.npmmirror.com/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true + "conventional-changelog-express": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz", + "integrity": "sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==", + "dev": true, + "requires": { + "q": "^1.5.1" + } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "conventional-changelog-jquery": { + "version": "3.0.11", + "resolved": "https://registry.npmmirror.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz", + "integrity": "sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "q": "^1.5.1" } }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "conventional-changelog-jshint": { + "version": "2.0.9", + "resolved": "https://registry.npmmirror.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz", + "integrity": "sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "compare-func": "^2.0.0", + "q": "^1.5.1" } }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "conventional-changelog-preset-loader": { + "version": "2.3.4", + "resolved": "https://registry.npmmirror.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", + "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "conventional-changelog-writer": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz", + "integrity": "sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==", "dev": true, "requires": { - "binary-extensions": "^1.0.0" + "conventional-commits-filter": "^2.0.7", + "dateformat": "^3.0.0", + "handlebars": "^4.7.7", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "conventional-commits-filter": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", "dev": true, "requires": { - "ci-info": "^1.5.0" + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" } }, - "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "conventional-commits-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz", + "integrity": "sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==", "dev": true, "requires": { - "has": "^1.0.3" + "JSONStream": "^1.3.5", + "is-text-path": "^1.0.1", + "meow": "^8.1.2", + "split2": "^3.2.2" } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true + }, + "copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } } } }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "core-js-compat": { + "version": "3.37.1", + "resolved": "https://registry.npmmirror.com/core-js-compat/-/core-js-compat-3.37.1.tgz", + "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "browserslist": "^4.23.0" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmmirror.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "requires": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "cosmiconfig-typescript-loader": { + "version": "4.4.0", + "resolved": "https://registry.npmmirror.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz", + "integrity": "sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==", + "dev": true + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" }, "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" } }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha512-ERNhMg+i/XgDwPIPF3u24qpajVreaiSuvpb1Uu0jugw7KKcxGyCX8cgp8P5fwTmAuXku6beDHHECdKArjlg7tw==", + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dev": true, "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" } }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg==", + "css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", "dev": true }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "csso": { + "version": "5.0.5", + "resolved": "https://registry.npmmirror.com/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", "dev": true, "requires": { - "kind-of": "^3.0.2" + "css-tree": "~2.2.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" } - } + }, + "mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", + "dev": true + } } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==", + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", "dev": true }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha512-cnS56eR9SPAscL77ik76ATVqoPARTqPIVkMDVxRaWH06zT+6+CzIroYRJ0VVvm0Z1zfAvxvz9i/D3Ppjaqt5Nw==", + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } + "de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", + "dev": true }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g==", - "dev": true, + "debug": { + "version": "4.3.5", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "requires": { - "path-is-inside": "^1.0.1" + "ms": "2.1.2" } }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "requires": { - "isobject": "^3.0.1" + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true + } } }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw==", + "dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmmirror.com/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmmirror.com/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "type-detect": "^4.0.0" } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true + "deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", - "dev": true + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmmirror.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "requires": { - "buffer-alloc": "^1.2.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "diacritics": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/diacritics/-/diacritics-1.3.0.tgz", + "integrity": "sha512-wlwEkqcsaxvPJML+rDh/2iS824jbREk6DUMUKkEaSlxdYHeS43cClJtsWglvw2RfeXGm6ohKDqsXteJ5sP5enA==", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmmirror.com/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, - "istanbul-api": { - "version": "2.1.7", - "resolved": "https://registry.npmmirror.com/istanbul-api/-/istanbul-api-2.1.7.tgz", - "integrity": "sha512-LYTOa2UrYFyJ/aSczZi/6lBykVMjCCvUmT64gOe+jPZFy4w6FYfPGqFT2IiQ2BxVHHDOvCD7qrIXb0EOh4uGWw==", + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { - "async": "^2.6.2", - "compare-versions": "^3.4.0", - "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-hook": "^2.0.7", - "istanbul-lib-instrument": "^3.3.0", - "istanbul-lib-report": "^2.0.8", - "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.5", - "js-yaml": "^3.13.1", - "make-dir": "^2.1.0", - "minimatch": "^3.0.4", - "once": "^1.4.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", - "dev": true, - "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } + "path-type": "^4.0.0" } }, - "istanbul-instrumenter-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz", - "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==", + "dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmmirror.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true + }, + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, "requires": { - "convert-source-map": "^1.5.0", - "istanbul-lib-instrument": "^1.7.3", - "loader-utils": "^1.1.0", - "schema-utils": "^0.3.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmmirror.com/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha512-fueX787WZKCV0Is4/T2cyAdM4+x1S3MXXOAhavE1ys/W42SHAPacLTQhucja22QBYrfGw50M2sRiXPtTGv9Ymw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha512-4JD/Ivzg7PoW8NzdrBSr3UFwC9mHgvI7Z6z3QGBsSHgKaRTUDmyZAAKJo2UbG1kUVfS9WS8bi36N49U1xw43DA==", - "dev": true - }, - "schema-utils": { - "version": "0.3.0", - "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-0.3.0.tgz", - "integrity": "sha512-QaVYBaD9U8scJw2EBWnCBY+LJ0AD+/2edTaigDs0XLDLBfJmSUK9KGqktg1rb32U3z4j/XwvFwHHH1YfbYFd7Q==", - "dev": true, - "requires": { - "ajv": "^5.0.0" - } - } + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" } }, - "istanbul-lib-coverage": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", - "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true }, - "istanbul-lib-hook": { - "version": "2.0.7", - "resolved": "https://registry.npmmirror.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", - "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "requires": { - "append-transform": "^1.0.0" + "domelementtype": "^2.3.0" } }, - "istanbul-lib-instrument": { - "version": "1.10.2", - "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", - "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.1", - "semver": "^5.3.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" } }, - "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmmirror.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - } + "is-obj": "^2.0.0" } }, - "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmmirror.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "easy-stack": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/easy-stack/-/easy-stack-1.0.1.tgz", + "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==", + "dev": true + }, + "editorconfig": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/editorconfig/-/editorconfig-1.0.4.tgz", + "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", - "source-map": "^0.6.1" + "@one-ini/wasm": "0.1.1", + "commander": "^10.0.0", + "minimatch": "9.0.1", + "semver": "^7.5.3" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmmirror.com/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, + "minimatch": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.1.tgz", + "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", "dev": true, "requires": { - "ms": "2.1.2" + "brace-expansion": "^2.0.1" } - }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true } } }, - "istanbul-reports": { - "version": "2.2.7", - "resolved": "https://registry.npmmirror.com/istanbul-reports/-/istanbul-reports-2.2.7.tgz", - "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "electron-to-chromium": { + "version": "1.4.816", + "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.816.tgz", + "integrity": "sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==", + "dev": true + }, + "emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmmirror.com/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "html-escaper": "^2.0.0" + "is-arrayish": "^0.2.1" } }, - "jasmine": { - "version": "2.8.0", - "resolved": "https://registry.npmmirror.com/jasmine/-/jasmine-2.8.0.tgz", - "integrity": "sha512-KbdGQTf5jbZgltoHs31XGiChAPumMSY64OZMWLNYnEnMfG5uwGBhffePwuskexjT+/Jea/gU3qAU8344hNohSw==", + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, "requires": { - "exit": "^0.1.2", - "glob": "^7.0.6", - "jasmine-core": "~2.8.0" - }, - "dependencies": { - "jasmine-core": { - "version": "2.8.0", - "resolved": "https://registry.npmmirror.com/jasmine-core/-/jasmine-core-2.8.0.tgz", - "integrity": "sha512-SNkOkS+/jMZvLhuSx1fjhcNWUC/KG6oVyFUGkSBEr9n1axSNduWU8GlI7suaHXr4yxjet6KjrUZxUTE5WzzWwQ==", - "dev": true - } + "get-intrinsic": "^1.2.4" } }, - "jasmine-core": { - "version": "2.99.1", - "resolved": "https://registry.npmmirror.com/jasmine-core/-/jasmine-core-2.99.1.tgz", - "integrity": "sha512-ra97U4qu3OCcIxvN6eg3kyy8bLrID/TgxafSGMMICg3SFx5C/sUfDPpiOh7yoIsHdtjrOVdtT9rieYhqOsh9Ww==", + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true }, - "jasmine-spec-reporter": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", - "integrity": "sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==", + "es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, "requires": { - "colors": "1.1.2" - } + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + } + }, + "esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "esbuild-android-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz", + "integrity": "sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==", + "dev": true, + "optional": true }, - "jasminewd2": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/jasminewd2/-/jasminewd2-2.2.0.tgz", - "integrity": "sha512-Rn0nZe4rfDhzA63Al3ZGh0E+JTmM6ESZYXJGKuqKGZObsAB9fwXPD03GjtIEvJBDOhN94T5MzbwZSqzFHSQPzg==", - "dev": true + "esbuild-android-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz", + "integrity": "sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==", + "dev": true, + "optional": true }, - "js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", - "dev": true + "esbuild-darwin-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz", + "integrity": "sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==", + "dev": true, + "optional": true }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true + "esbuild-darwin-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz", + "integrity": "sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==", + "dev": true, + "optional": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "esbuild-freebsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz", + "integrity": "sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==", "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } + "optional": true }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "esbuild-freebsd-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz", + "integrity": "sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==", + "dev": true, + "optional": true }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", - "dev": true + "esbuild-linux-32": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz", + "integrity": "sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==", + "dev": true, + "optional": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true + "esbuild-linux-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz", + "integrity": "sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==", + "dev": true, + "optional": true }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true + "esbuild-linux-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz", + "integrity": "sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==", + "dev": true, + "optional": true }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "esbuild-linux-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz", + "integrity": "sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==", + "dev": true, + "optional": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true + "esbuild-linux-mips64le": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz", + "integrity": "sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==", + "dev": true, + "optional": true }, - "json3": { - "version": "3.3.3", - "resolved": "https://registry.npmmirror.com/json3/-/json3-3.3.3.tgz", - "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", - "dev": true + "esbuild-linux-ppc64le": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz", + "integrity": "sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==", + "dev": true, + "optional": true }, - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "esbuild-linux-riscv64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz", + "integrity": "sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==", "dev": true, - "requires": { - "minimist": "^1.2.0" - } + "optional": true }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "esbuild-linux-s390x": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz", + "integrity": "sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==", "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } + "optional": true }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "esbuild-netbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz", + "integrity": "sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==", "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } + "optional": true }, - "jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmmirror.com/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } + "esbuild-openbsd-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz", + "integrity": "sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==", + "dev": true, + "optional": true }, - "jszip-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/jszip-utils/-/jszip-utils-0.1.0.tgz", - "integrity": "sha512-tBNe0o3HAf8vo0BrOYnLPnXNo5A3KsRMnkBFYjh20Y3GPYGfgyoclEMgvVchx0nnL+mherPi74yLPIusHUQpZg==" + "esbuild-sunos-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz", + "integrity": "sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==", + "dev": true, + "optional": true }, - "karma": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/karma/-/karma-4.0.1.tgz", - "integrity": "sha512-ind+4s03BqIXas7ZmraV3/kc5+mnqwCd+VDX1FndS6jxbt03kQKX2vXrWxNLuCjVYmhMwOZosAEKMM0a2q7w7A==", - "dev": true, - "requires": { - "bluebird": "^3.3.0", - "body-parser": "^1.16.1", - "braces": "^2.3.2", - "chokidar": "^2.0.3", - "colors": "^1.1.0", - "connect": "^3.6.0", - "core-js": "^2.2.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.0", - "flatted": "^2.0.0", - "glob": "^7.1.1", - "graceful-fs": "^4.1.2", - "http-proxy": "^1.13.0", - "isbinaryfile": "^3.0.0", - "lodash": "^4.17.11", - "log4js": "^4.0.0", - "mime": "^2.3.1", - "minimatch": "^3.0.2", - "optimist": "^0.6.1", - "qjobs": "^1.1.4", - "range-parser": "^1.2.0", - "rimraf": "^2.6.0", - "safe-buffer": "^5.0.1", - "socket.io": "2.1.1", - "source-map": "^0.6.1", - "tmp": "0.0.33", - "useragent": "2.3.0" - }, - "dependencies": { - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "esbuild-windows-32": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz", + "integrity": "sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==", + "dev": true, + "optional": true }, - "karma-chrome-launcher": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", - "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "esbuild-windows-64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz", + "integrity": "sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==", "dev": true, - "requires": { - "fs-access": "^1.0.0", - "which": "^1.2.1" - } + "optional": true }, - "karma-coverage-istanbul-reporter": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.6.tgz", - "integrity": "sha512-WFh77RI8bMIKdOvI/1/IBmgnM+Q7NOLhnwG91QJrM8lW+CIXCjTzhhUsT/svLvAkLmR10uWY4RyYbHMLkTglvg==", + "esbuild-windows-arm64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz", + "integrity": "sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==", "dev": true, - "requires": { - "istanbul-api": "^2.1.6", - "minimatch": "^3.0.4" - } + "optional": true }, - "karma-jasmine": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/karma-jasmine/-/karma-jasmine-1.1.2.tgz", - "integrity": "sha512-SENGE9DhlIIFTSZWiNq4eGeXL8G6z9cqHIOdkx9jh1qhhQqwEy3tAoLRyER0vOcHqdOlKmGpOuXk+HOipIy7sg==", + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, - "karma-jasmine-html-reporter": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-0.2.2.tgz", - "integrity": "sha512-AHInTzedmNkyP8ue67p8lTy7DM6YUBfOX5VC3oexaUA0gY0L/2NErkl+aTd4QT9LYqg0VHTj6ie0LbMyulOwAw==", + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "karma-jasmine": "^1.0.2" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" } }, - "karma-source-map-support": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/karma-source-map-support/-/karma-source-map-support-1.3.0.tgz", - "integrity": "sha512-HcPqdAusNez/ywa+biN4EphGz62MmQyPggUsDfsHqa7tSe4jdsxgvTKuDfIazjL+IOxpVWyT7Pr4dhAV+sxX5Q==", + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "source-map-support": "^0.5.5" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } } }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha512-Be1YRHWWlZaSsrz2U+VInk+tO0EwLIyV+23RhWLINJYwg/UIikxjlj3MhH37/6/EDCAusjajvMkMMUXRaMWl/w==", + "event-pubsub": { + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/event-pubsub/-/event-pubsub-5.0.3.tgz", + "integrity": "sha512-2QiHxshejKgJrYMzSI9MEHrvhmzxBL+eLyiM5IiyjDBySkgwS2+tdtnO3gbx8pEisu/yOFCIhfCb63gCEu0yBQ==", "dev": true, "requires": { - "package-json": "^4.0.0" + "copyfiles": "^2.4.0", + "strong-type": "^0.1.3" + }, + "dependencies": { + "strong-type": { + "version": "0.1.6", + "resolved": "https://registry.npmmirror.com/strong-type/-/strong-type-0.1.6.tgz", + "integrity": "sha512-eJe5caH6Pi5oMMeQtIoBPpvNu/s4jiyb63u5tkHNnQXomK+puyQ5i+Z5iTLBr/xUz/pIcps0NSfzzFI34+gAXg==", + "dev": true + } } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" } }, - "less": { - "version": "3.9.0", - "resolved": "https://registry.npmmirror.com/less/-/less-3.9.0.tgz", - "integrity": "sha512-31CmtPEZraNUtuUREYjSqRkeETFdyEHSEPAGq4erDlUXtda7pzNmctdljdIagSb589d/qXGWiiP31R5JVf+v0w==", + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "clone": "^2.1.2", - "errno": "^0.1.1", - "graceful-fs": "^4.1.2", - "image-size": "~0.5.0", - "mime": "^1.4.1", - "mkdirp": "^0.5.0", - "promise": "^7.1.1", - "request": "^2.83.0", - "source-map": "~0.6.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true } } }, - "less-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/less-loader/-/less-loader-4.1.0.tgz", - "integrity": "sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "requires": { - "clone": "^2.1.1", - "loader-utils": "^1.1.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - } + "is-extendable": "^0.1.0" } }, - "less-plugin-npm-import": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/less-plugin-npm-import/-/less-plugin-npm-import-2.1.0.tgz", - "integrity": "sha512-f7pVkEooRq2/jge/M/Y+spoPXj5rRIY30q1as+3kZsDG8Rs+loNJUCVQjzXB9Ao/9FeIJULiq2zrXymv+OMTbw==", + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "requires": { - "promise": "~7.0.1", - "resolve": "~1.1.6" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" }, "dependencies": { - "promise": { - "version": "7.0.4", - "resolved": "https://registry.npmmirror.com/promise/-/promise-7.0.4.tgz", - "integrity": "sha512-8z1gTSL9cMgqCx8zvMYhzT0eQURAQNSQqR8B2hGfCYkAzt1vjReVdKBv4YwGw3OXAPaxfm4aR0gLoBUon4VmmA==", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "asap": "~2.0.3" + "safer-buffer": ">= 2.1.2 < 3" } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true } } }, - "license-webpack-plugin": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/license-webpack-plugin/-/license-webpack-plugin-2.1.0.tgz", - "integrity": "sha512-vDiBeMWxjE9n6TabQ9J4FH8urFdsRK0Nvxn1cit9biCiR9aq1zBR0X2BlAkEiIG6qPamLeU0GzvIgLkrFc398A==", - "dev": true, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "requires": { - "@types/webpack-sources": "^0.1.5", - "webpack-sources": "^1.2.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" } }, - "lie": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "requires": { - "immediate": "~3.0.5" + "reusify": "^1.0.4" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - } + "bser": "2.1.1" } }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmmirror.com/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "is-callable": "^1.1.3" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true + "foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } }, - "lodash.tail": { - "version": "4.1.1", - "resolved": "https://registry.npmmirror.com/lodash.tail/-/lodash.tail-4.1.1.tgz", - "integrity": "sha512-+7y6zfkH4TqgS5DYKIqJuxmL5xT3WUUumVMZVRpDUo0UqJREwZqKmGo9wluj12FbPGl1UjRf2TnAImbw/bKtdw==", + "fp-ts": { + "version": "2.16.7", + "resolved": "https://registry.npmmirror.com/fp-ts/-/fp-ts-2.16.7.tgz", + "integrity": "sha512-Xiux+4mHHPj32/mrqN3XIIqEKk/MousgoC2FIaCwehpPjBI4oDrLvQEyQ/2T1sbTe0s/YIQqF98z+uHJLVoS9Q==", "dev": true }, - "log4js": { - "version": "4.5.1", - "resolved": "https://registry.npmmirror.com/log4js/-/log4js-4.5.1.tgz", - "integrity": "sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw==", - "dev": true, + "fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "requires": { - "date-format": "^2.0.0", - "debug": "^4.1.1", - "flatted": "^2.0.0", - "rfdc": "^1.1.4", - "streamroller": "^1.0.6" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "requires": { - "ms": "2.1.2" + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==" } } }, - "loglevel": { - "version": "1.8.1", - "resolved": "https://registry.npmmirror.com/loglevel/-/loglevel-1.8.1.tgz", - "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } + "optional": true }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true }, - "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.8" - } + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true + }, + "get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, - "make-fetch-happen": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/make-fetch-happen/-/make-fetch-happen-4.0.2.tgz", - "integrity": "sha512-YMJrAjHSb/BordlsDEcVcPyTbiJKkzqMf48N8dAJZT9Zjctrkb6Yg4TY9Sq2AwSIQJFn5qBBKVTYt3vP5FMIHA==", + "get-pkg-repo": { + "version": "4.2.1", + "resolved": "https://registry.npmmirror.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz", + "integrity": "sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==", "dev": true, "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^11.3.3", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" + "@hutson/parse-repository-url": "^3.0.0", + "hosted-git-info": "^4.0.0", + "through2": "^2.0.0", + "yargs": "^16.2.0" }, "dependencies": { - "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmmirror.com/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "safe-buffer": "~5.1.0" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" } } } }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmmirror.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "git-raw-commits": { + "version": "2.0.11", + "resolved": "https://registry.npmmirror.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", "dev": true, "requires": { - "p-defer": "^1.0.0" + "dargs": "^7.0.0", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + } }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true + "git-semver-tags": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz", + "integrity": "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==", + "dev": true, + "requires": { + "meow": "^8.0.0", + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } }, - "map-visit": { + "gitconfiglocal": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "resolved": "https://registry.npmmirror.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==", "dev": true, "requires": { - "object-visit": "^1.0.0" + "ini": "^1.3.2" } }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmmirror.com/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "glob": { + "version": "10.4.2", + "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmmirror.com/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", "dev": true, "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" + "ini": "^1.3.4" } }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==", + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmmirror.com/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" } }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmmirror.com/meow/-/meow-3.7.0.tgz", - "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" + "get-intrinsic": "^1.1.3" } }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" }, "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } } } }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmmirror.com/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "happy-dom": { + "version": "8.9.0", + "resolved": "https://registry.npmmirror.com/happy-dom/-/happy-dom-8.9.0.tgz", + "integrity": "sha512-JZwJuGdR7ko8L61136YzmrLv7LgTh5b8XaEM3P709mLjyQuXJ3zHTDXvUtBBahRjGlcYW0zGjIiEWizoTUGKfA==", "dev": true, "requires": { - "mime-db": "1.52.0" + "css.escape": "^1.5.1", + "he": "^1.2.0", + "iconv-lite": "^0.6.3", + "node-fetch": "^2.x.x", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0" } }, - "mimic-fn": { + "hard-rejection": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "resolved": "https://registry.npmmirror.com/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, - "mini-css-extract-plugin": { - "version": "0.5.0", - "resolved": "https://registry.npmmirror.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", - "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" + "es-define-property": "^1.0.0" } }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "has-symbols": "^1.0.3" } }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmmirror.com/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "function-bind": "^1.1.2" } }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "requires": { - "minipass": "^2.9.0" + "lru-cache": "^6.0.0" } }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" + "agent-base": "6", + "debug": "4" } }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmmirror.com/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "mixin-object": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/mixin-object/-/mixin-object-2.0.1.tgz", - "integrity": "sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==", + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true + }, + "immutable": { + "version": "4.3.6", + "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.6.tgz", + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { - "for-in": "^0.1.3", - "is-extendable": "^0.1.1" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "dependencies": { - "for-in": { - "version": "0.1.8", - "resolved": "https://registry.npmmirror.com/for-in/-/for-in-0.1.8.tgz", - "integrity": "sha512-F0to7vbBSHP8E3l6dCjxNOLuSFAACIxFy3UehTUlG7svlXi37HHsDkyVcHo0Pq8QwrE+pXvWSVX3ZT1T9wAZ9g==", + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true } } }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==" }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==", + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmmirror.com/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "inferred-types": { + "version": "0.37.6", + "resolved": "https://registry.npmmirror.com/inferred-types/-/inferred-types-0.37.6.tgz", + "integrity": "sha512-CfL5g1wR5rVwX2K5S6wSL+h9eODScum/LBwlhGRrcBIvfYppvUQM0aeRJ1BZS+QE38kGzd3v+U526+nQR7ZUkg==", "dev": true, "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" + "brilliant-errors": "^0.7.3" } }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmmirror.com/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmmirror.com/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "once": "^1.3.0", + "wrappy": "1" } }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "ng-packagr": { - "version": "4.7.1", - "resolved": "https://registry.npmmirror.com/ng-packagr/-/ng-packagr-4.7.1.tgz", - "integrity": "sha512-MIPKxyrnV22fS3wSfst2XjwWOonFKujVVEnIehYJhiu8GOg37bCdbbr9plsE1jRDmDAUz6M1MvdKibUrJyRp6Q==", - "dev": true, - "requires": { - "@ngtools/json-schema": "^1.1.0", - "autoprefixer": "^9.0.0", - "browserslist": "^4.0.0", - "chalk": "^2.3.1", - "chokidar": "^2.0.3", - "clean-css": "^4.1.11", - "commander": "^2.12.0", - "fs-extra": "^7.0.0", - "glob": "^7.1.2", - "injection-js": "^2.2.1", - "less": "^3.8.0", - "less-plugin-npm-import": "^2.1.0", - "node-sass": "^4.9.3", - "node-sass-tilde-importer": "^1.0.0", - "opencollective-postinstall": "^2.0.1", - "postcss": "^7.0.0", - "postcss-url": "^8.0.0", - "read-pkg-up": "^4.0.0", - "rimraf": "^2.6.1", - "rollup": "^0.67.0", - "rollup-plugin-commonjs": "^9.1.3", - "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^4.0.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "rxjs": "^6.0.0", - "stylus": "^0.54.5", - "uglify-js": "^3.0.7", - "update-notifier": "^2.3.0" + "inquirer": { + "version": "9.3.2", + "resolved": "https://registry.npmmirror.com/inquirer/-/inquirer-9.3.2.tgz", + "integrity": "sha512-+ynEbhWKhyomnaX0n2aLIMSkgSlGB5RrWbNXnEqj6mdaIydu6y40MdBjL38SAB0JcdmOaIaMua1azdjLEr3sdw==", + "dev": true, + "requires": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.1" }, "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "color-convert": "^2.0.1" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } } } }, - "ngx-contextmenu": { - "version": "5.4.0", - "resolved": "https://registry.npmmirror.com/ngx-contextmenu/-/ngx-contextmenu-5.4.0.tgz", - "integrity": "sha512-iHUCs1n/n4e1aE22KrntUWO133bJrxzxSoODfZmJTpsAujHkKU+2HtJsE73MbSdiIKAj2+i98B6g5Pwvkc5ZTw==", + "internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, "requires": { - "tslib": "^1.9.0" + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" } }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, - "node-fetch-npm": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", - "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmmirror.com/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", + "inversify": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/inversify/-/inversify-5.1.1.tgz", + "integrity": "sha512-j8grHGDzv1v+8T1sAQ+3boTCntFPfvxLCkNcxB1J8qA0lUN+fAlSyYd+RXKvaPRL4AGyPxViutBEJHNXOyUdFQ==", "dev": true }, - "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmmirror.com/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dev": true, "requires": { - "fstream": "^1.0.0", - "glob": "^7.0.3", - "graceful-fs": "^4.1.2", - "mkdirp": "^0.5.0", - "nopt": "2 || 3", - "npmlog": "0 || 1 || 2 || 3 || 4", - "osenv": "0", - "request": "^2.87.0", - "rimraf": "2", - "semver": "~5.3.0", - "tar": "^2.0.0", - "which": "1" - }, - "dependencies": { - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/semver/-/semver-5.3.0.tgz", - "integrity": "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw==", - "dev": true - } + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - } + "is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" } }, - "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, - "node-sass": { - "version": "4.13.1", - "resolved": "https://registry.npmmirror.com/node-sass/-/node-sass-4.13.1.tgz", - "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, "requires": { - "async-foreach": "^0.1.3", - "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", - "gaze": "^1.0.0", - "get-stdin": "^4.0.1", - "glob": "^7.0.3", - "in-publish": "^2.0.0", - "lodash": "^4.17.15", - "meow": "^3.7.0", - "mkdirp": "^0.5.1", - "nan": "^2.13.2", - "node-gyp": "^3.8.0", - "npmlog": "^4.0.0", - "request": "^2.88.0", - "sass-graph": "^2.2.4", - "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } + "has-bigints": "^1.0.1" } }, - "node-sass-tilde-importer": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", - "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "find-parent-dir": "^0.3.0" + "binary-extensions": "^2.0.0" } }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmmirror.com/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { - "abbrev": "1" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmmirror.com/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-core-module": { + "version": "2.14.0", + "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "requires": { + "hasown": "^2.0.2" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "has-tostringtag": "^1.0.0" } }, - "normalize-path": { + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true + }, + "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true + }, + "is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "has-tostringtag": "^1.0.0" } }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, - "npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "npm-normalize-package-bin": "^1.0.1" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", + "is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" + "call-bind": "^1.0.7" } }, - "npm-packlist": { - "version": "1.4.8", - "resolved": "https://registry.npmmirror.com/npm-packlist/-/npm-packlist-1.4.8.tgz", - "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1", - "npm-normalize-package-bin": "^1.0.1" + "has-tostringtag": "^1.0.0" } }, - "npm-pick-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmmirror.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", - "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "requires": { - "figgy-pudding": "^3.5.1", - "npm-package-arg": "^6.0.0", - "semver": "^5.4.1" + "has-symbols": "^1.0.2" } }, - "npm-registry-fetch": { - "version": "3.9.1", - "resolved": "https://registry.npmmirror.com/npm-registry-fetch/-/npm-registry-fetch-3.9.1.tgz", - "integrity": "sha512-VQCEZlydXw4AwLROAXWUR7QDfe2Y8Id/vpAgp6TI1/H78a4SiQ1kQrKZALm5/zxM5n4HIi+aYb+idUAV/RuY0Q==", + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, "requires": { - "JSONStream": "^1.3.4", - "bluebird": "^3.5.1", - "figgy-pudding": "^3.4.1", - "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.2", - "npm-package-arg": "^6.1.0" + "text-extensions": "^1.0.0" } }, - "npm-run-path": { + "is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true + }, + "is-weakmap": { "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "resolved": "https://registry.npmmirror.com/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true + }, + "is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { - "path-key": "^2.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmmirror.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "jest": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } + } + }, + "jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmmirror.com/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + } + } + }, + "jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true + }, + "jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true + }, + "jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "requires": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + } + }, + "jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha512-j8ZNHg19TyIQOWCGeeQJBuu6xZYIEurf8M1Qsfd8mFrGEfIZytbw18YjKWg+LcO25NowXGZXZpKAx+Ui3TFfDw==", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmmirror.com/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "color-name": "~1.1.4" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "has-flag": "^4.0.0" } } } }, - "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" } }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/jju/-/jju-1.4.0.tgz", + "integrity": "sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==" }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmmirror.com/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "js-beautify": { + "version": "1.15.1", + "resolved": "https://registry.npmmirror.com/js-beautify/-/js-beautify-1.15.1.tgz", + "integrity": "sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "config-chain": "^1.1.13", + "editorconfig": "^1.0.4", + "glob": "^10.3.3", + "js-cookie": "^3.0.5", + "nopt": "^7.2.0" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } + "js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmmirror.com/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "dev": true }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "js-message": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/js-message/-/js-message-1.0.7.tgz", + "integrity": "sha512-efJLHhLjIyKRewNS9EGZ4UpI8NguuL6fKkhRxVuMmrGV2xN/0APGdQYwLFky5w9naebSZ0OwAGp0G6/2Cg90rA==", "dev": true }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "js-queue": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/js-queue/-/js-queue-2.0.2.tgz", + "integrity": "sha512-pbKLsbCfi7kriM3s1J4DDCo7jQkI58zPLHi0heXPzPlj0hjUsm+FesPUbE0DSbIVIK503A36aUBoCN7eMFedkA==", "dev": true, "requires": { - "ee-first": "1.1.1" + "easy-stack": "^1.0.1" } }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "argparse": "^2.0.1" }, "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true } } }, - "open": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/open/-/open-6.0.0.tgz", - "integrity": "sha512-/yb5mVZBz7mHLySMiSj2DcLtMBbFPJk5JBKEkHVZFxZAPzeg3L026O0T+lbdz1B2nyDnkClRSwRQJdeVUIF7zw==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true }, - "opencollective-postinstall": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmmirror.com/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==", - "dev": true - } - } + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmmirror.com/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", "dev": true }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmmirror.com/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "graceful-fs": "^4.1.6" } }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } + "kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmmirror.com/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==" }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, - "package-json": { + "linkify-it": { "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha512-q/R5GrMek0vzgoomq6rm9OX+3PQve8sLwTirmK30YB3Cu0Bbt9OX9M/SIUnroN5BGJkzwGsFwDaRGD9EwBOlCA==", + "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", "dev": true, "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" + "uc.micro": "^1.0.1" } }, - "pacote": { - "version": "9.4.0", - "resolved": "https://registry.npmmirror.com/pacote/-/pacote-9.4.0.tgz", - "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, "requires": { - "bluebird": "^3.5.3", - "cacache": "^11.3.2", - "figgy-pudding": "^3.5.1", - "get-stream": "^4.1.0", - "glob": "^7.1.3", - "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.1", - "minimatch": "^3.0.4", - "minipass": "^2.3.5", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "normalize-package-data": "^2.4.0", - "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.12", - "npm-pick-manifest": "^2.2.3", - "npm-registry-fetch": "^3.8.0", - "osenv": "^0.1.5", - "promise-inflight": "^1.0.1", - "promise-retry": "^1.1.1", - "protoduck": "^5.0.1", - "rimraf": "^2.6.2", - "safe-buffer": "^5.1.2", - "semver": "^5.6.0", - "ssri": "^6.0.1", - "tar": "^4.4.8", - "unique-filename": "^1.1.1", - "which": "^1.3.1" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { - "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmmirror.com/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, "requires": { - "pump": "^3.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "tar": { - "version": "4.4.19", - "resolved": "https://registry.npmmirror.com/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", - "dev": true, - "requires": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - } - } + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true } } }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "dev": true, - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmmirror.com/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "local-pkg": { + "version": "0.4.3", + "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.3.tgz", + "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", "dev": true }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmmirror.com/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha512-B3Nrjw2aL7aI4TDujOzfA4NsEc4u1lVcIRE0xesutH8kjeWF70uk+W5cBlIQx04zUH9NTBvuN36Y9xLRPK6Jjw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "better-assert": "~1.0.0" + "p-locate": "^4.1.0" } }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmmirror.com/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha512-ijhdxJu6l5Ru12jF0JvzXVPvsC+VibqeaExlNoMhWN6VQ79PGjkmc7oA4W1lp00sFkNyj0fx6ivPLdV51/UMog==", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true + "lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", - "dev": true + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmmirror.com/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmmirror.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmmirror.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", "dev": true }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", "dev": true }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - } - } - }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "perfect-scrollbar": { - "version": "1.5.5", - "resolved": "https://registry.npmmirror.com/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", - "integrity": "sha512-dzalfutyP3e/FOpdlhVryN4AJ5XDVauVWxybSkLZmakFE2sS3y3pc4JnSprw8tGmHvkaG5Edr5T7LBTZ+WWU2g==" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", "dev": true }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", "dev": true }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "optional": true + "lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmmirror.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmmirror.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", "dev": true }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", "dev": true, "requires": { - "pinkie": "^2.0.0" + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" } }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmmirror.com/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "requires": { - "find-up": "^3.0.0" + "get-func-name": "^2.0.1" } }, - "portfinder": { - "version": "1.0.32", - "resolved": "https://registry.npmmirror.com/portfinder/-/portfinder-1.0.32.tgz", - "integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==", - "dev": true, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "requires": { - "async": "^2.6.4", - "debug": "^3.2.7", - "mkdirp": "^0.5.6" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } + "yallist": "^4.0.0" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmmirror.com/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, - "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true }, - "postcss-import": { - "version": "12.0.1", - "resolved": "https://registry.npmmirror.com/postcss-import/-/postcss-import-12.0.1.tgz", - "integrity": "sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==", - "dev": true, + "magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "requires": { - "postcss": "^7.0.1", - "postcss-value-parser": "^3.2.3", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" + "@jridgewell/sourcemap-codec": "^1.4.15" } }, - "postcss-load-config": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-2.1.2.tgz", - "integrity": "sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw==", + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" + "semver": "^7.5.3" } }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmmirror.com/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" + "tmpl": "1.0.5" } }, - "postcss-url": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/postcss-url/-/postcss-url-8.0.0.tgz", - "integrity": "sha512-E2cbOQ5aii2zNHh8F6fk1cxls7QVFZjLPSrqvmiza8OuXLzIpErij8BDS5Y3STPfJgpIMNCPEr8JlKQWEoozUw==", + "map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true + }, + "markdown-it": { + "version": "13.0.2", + "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.2.tgz", + "integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==", "dev": true, "requires": { - "mime": "^2.3.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.0", - "postcss": "^7.0.2", - "xxhashjs": "^0.2.1" + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" }, "dependencies": { - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "entities": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", "dev": true } } }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "markdown-it-anchor": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-7.1.0.tgz", + "integrity": "sha512-loQggrwsIkkP7TOrESvmYkV2ikbQNNKhHcWyqC7/C2CmfHl1tkUizJJU8C5aGgg7J6oXVQJx17gk7i47tNn/lQ==", "dev": true }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", + "markdown-it-container": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz", + "integrity": "sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==", "dev": true }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "markdown-it-emoji": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", + "integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==", "dev": true }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "markdown-it-table-of-contents": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.5.2.tgz", + "integrity": "sha512-6o+rxSwzXmXCUn1n8QGTSpgbcnHBG6lUU8x7A5Cssuq5vbfzTfitfGPvQ5PZkp+gP1NGS/DR2rkYqJPn0rbZ1A==", + "dev": true }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmmirror.com/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "matchit": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/matchit/-/matchit-1.1.0.tgz", + "integrity": "sha512-+nGYoOlfHmxe5BW5tE0EMJppXEwdSf8uBA1GTZC7Q77kbT35+VKLYJMzVNWCHSsga1ps1tPYFtFyvxvKzWVmMA==", "dev": true, - "optional": true, "requires": { - "asap": "~2.0.3" + "@arr/every": "^1.0.0" } }, - "promise-inflight": { + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "mdurl": { "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", "dev": true }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha512-StEy2osPr28o17bIW776GtwO6+Q+M9zPiZkYfosciUUMYqjhU/ffwRAH0zN2+uvGyUsn8/YICIHRzLbPacpZGw==", + "meow": { + "version": "8.1.2", + "resolved": "https://registry.npmmirror.com/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", "dev": true, "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" } }, - "protoduck": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", - "dev": true, - "requires": { - "genfun": "^5.0.0" - } - }, - "protractor": { - "version": "5.4.4", - "resolved": "https://registry.npmmirror.com/protractor/-/protractor-5.4.4.tgz", - "integrity": "sha512-BaL4vePgu3Vfa/whvTUAlgaCAId4uNSGxIFSCXMgj7LMYENPWLp85h5RBi9pdpX/bWQ8SF6flP7afmi2TC4eHw==", - "dev": true, - "requires": { - "@types/q": "^0.0.32", - "@types/selenium-webdriver": "^3.0.0", - "blocking-proxy": "^1.0.0", - "browserstack": "^1.5.1", - "chalk": "^1.1.3", - "glob": "^7.0.3", - "jasmine": "2.8.0", - "jasminewd2": "^2.1.0", - "q": "1.4.1", - "saucelabs": "^1.5.0", - "selenium-webdriver": "3.6.0", - "source-map-support": "~0.4.0", - "webdriver-js-extender": "2.1.0", - "webdriver-manager": "^12.0.6", - "yargs": "^12.0.5" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmmirror.com/del/-/del-2.2.2.tgz", - "integrity": "sha512-Z4fzpbIRjOu7lO5jCETSWoqUDVe0IPOlfugBsF6suen2LKDlVb4QZpKEM9P+buNJ4KI1eN7I083w/pbKUpsrWQ==", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/globby/-/globby-5.0.0.tgz", - "integrity": "sha512-HJRTIH2EeH44ka+LWig+EqT2ONSYpVlNfx6pyd592/VF1TbfljJ7elwie7oSwcViLGqOdWocSdu2txwBF9bjmQ==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - }, - "webdriver-manager": { - "version": "12.1.9", - "resolved": "https://registry.npmmirror.com/webdriver-manager/-/webdriver-manager-12.1.9.tgz", - "integrity": "sha512-Yl113uKm8z4m/KMUVWHq1Sjtla2uxEBtx2Ue3AmIlnlPAKloDn/Lvmy6pqWCUersVISpdMeVpAaGbNnvMuT2LQ==", - "dev": true, - "requires": { - "adm-zip": "^0.5.2", - "chalk": "^1.1.1", - "del": "^2.2.0", - "glob": "^7.0.3", - "ini": "^1.3.4", - "minimist": "^1.2.0", - "q": "^1.4.1", - "request": "^2.87.0", - "rimraf": "^2.5.2", - "semver": "^5.3.0", - "xml2js": "^0.4.17" - } - }, - "which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmmirror.com/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" } }, - "proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" + "mime-db": "1.52.0" } }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", - "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "brace-expansion": "^2.0.1" } }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" } }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true }, - "q": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/q/-/q-1.4.1.tgz", - "integrity": "sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==", - "dev": true + "mkdirp": { + "version": "2.1.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-2.1.6.tgz", + "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==" }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", "dev": true }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "muggle-string": { + "version": "0.3.1", + "resolved": "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.3.1.tgz", + "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", "dev": true }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", "dev": true }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "native-dash": { + "version": "1.25.0", + "resolved": "https://registry.npmmirror.com/native-dash/-/native-dash-1.25.0.tgz", + "integrity": "sha512-vJy1ZEfR/9jpAtuvsbPE/PuaeaJLIS+p7tl/bKEMHutRzMHnmgLv1fSmbyVvL04s2qzg0rCKZX5yfX74uiPLyA==", "dev": true, "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "brilliant-errors": "^0.7.3", + "inferred-types": "^0.37.6" } }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "dependencies": { - "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true - } - } + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true }, - "raw-loader": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/raw-loader/-/raw-loader-1.0.0.tgz", - "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - } + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "whatwg-url": "^5.0.0" } }, - "read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-ipc": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/node-ipc/-/node-ipc-10.1.0.tgz", + "integrity": "sha512-JBHRlMU8xAoo1kPtcvlBAa/6OBi/FUZoO/NbZf63q5Fe8q2aDhVJFryBFSq5T3E7EM13NnAUyEYk1b0IF6QV3Q==", "dev": true, "requires": { - "pify": "^2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - } + "event-pubsub": "5.0.3", + "js-message": "1.0.7", + "js-queue": "2.0.2", + "strong-type": "^1.0.1" } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "noms": { + "version": "0.0.0", + "resolved": "https://registry.npmmirror.com/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" }, "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "dev": true } } }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "nopt": { + "version": "7.2.1", + "resolved": "https://registry.npmmirror.com/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } + "abbrev": "^2.0.0" } }, - "readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" } }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "path-key": "^3.0.0" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "requires": { - "resolve": "^1.1.6" + "boolbase": "^1.0.0" } }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", + "object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "dev": true + }, + "object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dev": true, "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" } }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmmirror.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true + "object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmmirror.com/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } }, - "regex-not": { + "on-headers": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "resolved": "https://registry.npmmirror.com/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "wrappy": "1" } }, - "regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" + "mimic-fn": "^2.1.0" } }, - "registry-auth-token": { - "version": "3.4.0", - "resolved": "https://registry.npmmirror.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "ora": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/ora/-/ora-6.3.1.tgz", + "integrity": "sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ==", + "dev": true, + "requires": { + "chalk": "^5.0.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.6.1", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.1.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "strip-ansi": "^7.0.1", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "p-try": "^2.0.0" } }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "rc": "^1.0.1" + "p-limit": "^2.2.0" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "dev": true }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmmirror.com/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmmirror.com/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "patch-vue-directive-ssr": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/patch-vue-directive-ssr/-/patch-vue-directive-ssr-0.0.1.tgz", + "integrity": "sha512-n84llktHah+EXUGo+RvmTJcAQJQVW0kHHHiJ34ZSLijzhHi32zCMjCc5VAFv4jmdC91bpaYGPk0cDW1D8hQ3GQ==", "dev": true }, - "require-main-filename": { + "path-browserify": { "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true + "resolved": "https://registry.npmmirror.com/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha512-ccu8zQTrzVr954472aUVPLEcB3YpKSYR3cg/3lo1okzobPBM+1INXBbBZlDbnI/hbEocnf8j0QVo43hQKrbchg==", + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.3.0", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.3.0.tgz", + "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", + "dev": true + } } }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmmirror.com/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } + "picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmmirror.com/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmmirror.com/retry/-/retry-0.10.1.tgz", - "integrity": "sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==", + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "glob": "^7.1.3" + "find-up": "^4.0.0" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "polka": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/polka/-/polka-0.5.2.tgz", + "integrity": "sha512-FVg3vDmCqP80tOrs+OeNlgXYmFppTXdjD5E7I4ET1NjvtNmQrb1/mJibybKkb/d4NA7YWAr1ojxuhpL3FHqdlw==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "@polka/url": "^0.5.0", + "trouter": "^2.0.1" } }, - "rollup": { - "version": "0.67.4", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-0.67.4.tgz", - "integrity": "sha512-AVuP73mkb4BBMUmksQ3Jw0jTrBTU1i7rLiUYjFxLZGb3xiFmtVEg40oByphkZAsiL0bJC3hRAJUQos/e5EBd+w==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "@types/node": "*" - } + "possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true }, - "rollup-plugin-commonjs": { - "version": "9.3.4", - "resolved": "https://registry.npmmirror.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz", - "integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==", - "dev": true, + "postcss": { + "version": "8.4.39", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "requires": { - "estree-walker": "^0.6.0", - "magic-string": "^0.25.2", - "resolve": "^1.10.0", - "rollup-pluginutils": "^2.6.0" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" } }, - "rollup-plugin-json": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz", - "integrity": "sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw==", - "dev": true, - "requires": { - "rollup-pluginutils": "^2.3.1" - } + "preact": { + "version": "10.22.1", + "resolved": "https://registry.npmmirror.com/preact/-/preact-10.22.1.tgz", + "integrity": "sha512-jRYbDDgMpIb5LHq3hkI0bbl+l/TQ9UnkdQ0ww+lp+4MMOdqaUYdFc5qeyP+IV8FAd/2Em7drVPeKdQxsiWCf/A==", + "dev": true }, - "rollup-plugin-node-resolve": { - "version": "4.2.4", - "resolved": "https://registry.npmmirror.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz", - "integrity": "sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw==", + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmmirror.com/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "requires": { - "@types/resolve": "0.0.8", - "builtin-modules": "^3.1.0", - "is-module": "^1.0.0", - "resolve": "^1.10.0" + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" }, "dependencies": { - "builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true } } }, - "rollup-plugin-sourcemaps": { - "version": "0.4.2", - "resolved": "https://registry.npmmirror.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz", - "integrity": "sha512-pHUvzofmQx/C3zCkX14h9J9MbRfMjaARED8j8qOY+au4prtk2d567GD29WAHQTeGsDAVeStms3cPnRboC41YzA==", - "dev": true, - "requires": { - "rollup-pluginutils": "^2.0.1", - "source-map-resolve": "^0.5.0" - } + "prismjs": { + "version": "1.29.0", + "resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz", + "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true }, - "rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmmirror.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmmirror.com/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "requires": { - "estree-walker": "^0.6.1" + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", "dev": true }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } + "punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "requires": { - "tslib": "^1.9.0" - } + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true }, - "rxjs-compat": { - "version": "6.6.7", - "resolved": "https://registry.npmmirror.com/rxjs-compat/-/rxjs-compat-6.6.7.tgz", - "integrity": "sha512-szN4fK+TqBPOFBcBcsR0g2cmTTUF/vaFEOZNuSdfU8/pGFnNmmn2u8SystYXG1QMrjOPBc6XTKHMVfENDf6hHw==" + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "dev": true }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dev": true, - "requires": { - "ret": "~0.1.10" - } + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, - "sass-graph": { - "version": "2.2.6", - "resolved": "https://registry.npmmirror.com/sass-graph/-/sass-graph-2.2.6.tgz", - "integrity": "sha512-MKuEYXFSGuRSi8FZ3A7imN1CeVn9Gpw0/SFJKdL1ejXJneI9a5rwlEZrKejhEFAA3O6yr3eIyl/WuvASvlT36g==", + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "requires": { - "glob": "^7.0.0", - "lodash": "^4.0.0", - "scss-tokenizer": "^0.2.3", - "yargs": "^7.0.0" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmmirror.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } } }, - "sass-loader": { - "version": "7.1.0", - "resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-7.1.0.tgz", - "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "requires": { - "clone-deep": "^2.0.1", - "loader-utils": "^1.0.1", - "lodash.tail": "^4.1.1", - "neo-async": "^2.5.0", - "pify": "^3.0.0", - "semver": "^5.5.0" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true } } }, - "saucelabs": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/saucelabs/-/saucelabs-1.5.0.tgz", - "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dev": true, "requires": { - "https-proxy-agent": "^2.2.1" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, - "sax": { - "version": "0.5.8", - "resolved": "https://registry.npmmirror.com/sax/-/sax-0.5.8.tgz", - "integrity": "sha512-c0YL9VcSfcdH3F1Qij9qpYJFpKFKMXNOkLWFssBL3RuF7ZS8oZhllR2rWlCRjDTJsfq3R6wbSsaRU6o0rkEdNw==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "picomatch": "^2.2.1" } }, - "scss-tokenizer": { - "version": "0.2.3", - "resolved": "https://registry.npmmirror.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", - "integrity": "sha512-dYE8LhncfBUar6POCxMTm0Ln+erjeczqEvCJib5/7XNkdw1FkUGgwMPY360FY0FgPWQxHWCx29Jl3oejyGLM9Q==", + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "requires": { - "js-base64": "^2.1.8", - "source-map": "^0.4.2" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } + "resolve": "^1.1.6" } }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true - }, - "selenium-webdriver": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz", - "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==", + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "requires": { - "jszip": "^3.1.3", - "rimraf": "^2.5.4", - "tmp": "0.0.30", - "xml2js": "^0.4.17" - }, - "dependencies": { - "tmp": { - "version": "0.0.30", - "resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.0.30.tgz", - "integrity": "sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - } + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" } }, - "selfsigned": { - "version": "1.10.14", - "resolved": "https://registry.npmmirror.com/selfsigned/-/selfsigned-1.10.14.tgz", - "integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==", + "reflect-metadata": { + "version": "0.1.14", + "resolved": "https://registry.npmmirror.com/reflect-metadata/-/reflect-metadata-0.1.14.tgz", + "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", + "dev": true + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "10.1.1", + "resolved": "https://registry.npmmirror.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", + "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", "dev": true, "requires": { - "node-forge": "^0.10.0" + "regenerate": "^1.4.2" } }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmmirror.com/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "dev": true }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw==", + "regenerator-transform": { + "version": "0.15.2", + "resolved": "https://registry.npmmirror.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, "requires": { - "semver": "^5.0.3" + "@babel/runtime": "^7.8.4" } }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha512-e8BOaTo007E3dMuQQTnPdalbKTABKNS7UxoBIDnwOqRa+QwMrCPjynB8zAlPF6xlqUfdLPPLIJ13hJNmhtq8Ng==", + "regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "requires": { - "semver": "^5.3.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" } }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", + "regexpu-core": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", "dev": true, "requires": { - "semver": "^5.0.0" + "@babel/regjsgen": "^0.8.0", + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" } }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmmirror.com/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmmirror.com/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", "dev": true, "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" + "jsesc": "~0.5.0" }, "dependencies": { - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", "dev": true } } }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmmirror.com/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmmirror.com/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true - } - } + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, - "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "resolve-from": "^5.0.0" } }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmmirror.com/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shallow-clone": { + "resolve-global": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/shallow-clone/-/shallow-clone-1.0.0.tgz", - "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", - "dev": true, - "requires": { - "is-extendable": "^0.1.1", - "kind-of": "^5.0.0", - "mixin-object": "^2.0.1" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "resolved": "https://registry.npmmirror.com/resolve-global/-/resolve-global-1.0.0.tgz", + "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "global-dirs": "^0.1.1" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" } }, - "side-channel": { + "reusify": { "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "fsevents": "~2.3.2" } }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", - "dev": true - }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmmirror.com/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", "dev": true }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmmirror.com/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } + "queue-microtask": "^1.2.2" } }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, + "rxjs": { + "version": "7.4.0", + "resolved": "https://registry.npmmirror.com/rxjs/-/rxjs-7.4.0.tgz", + "integrity": "sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==", "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "tslib": "~2.1.0" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + "tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" } } }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass": { + "version": "1.77.6", + "resolved": "https://registry.npmmirror.com/sass/-/sass-1.77.6.tgz", + "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", "dev": true, "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" } }, - "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", "dev": true, "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" } }, - "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "semver": { + "version": "7.6.2", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true }, - "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", - "to-array": "0.1.4" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" } }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", + "set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==", - "dev": true - } + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" } }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmmirror.com/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" + "shebang-regex": "^3.0.0" } }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" }, "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "ms": "^2.1.1" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmmirror.com/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { - "websocket-driver": ">=0.5.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } } } }, - "socks": { - "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", + "shiki": { + "version": "0.11.1", + "resolved": "https://registry.npmmirror.com/shiki/-/shiki-0.11.1.tgz", + "integrity": "sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==", "dev": true, "requires": { - "ip": "1.1.5", - "smart-buffer": "^4.1.0" - }, - "dependencies": { - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmmirror.com/ip/-/ip-1.1.5.tgz", - "integrity": "sha512-rBtCAQAJm8A110nbwn6YdveUnuZH3WrC36IwkRXxDnq53JvXA2NVQvB7IHyKomxK1MJ4VDNw3UtFDdXQ+AvLYA==", - "dev": true - } + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "^6.0.0" } }, - "socks-proxy-agent": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", + "side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sirv": { + "version": "1.0.19", + "resolved": "https://registry.npmmirror.com/sirv/-/sirv-1.0.19.tgz", + "integrity": "sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ==", "dev": true, "requires": { - "agent-base": "~4.2.1", - "socks": "~2.3.2" + "@polka/url": "^1.0.0-next.20", + "mrmime": "^1.0.0", + "totalist": "^1.0.0" }, "dependencies": { - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } + "@polka/url": { + "version": "1.0.0-next.25", + "resolved": "https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", + "dev": true } } }, - "sortablejs": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz", - "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==" - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "source-map-loader": { - "version": "0.2.4", - "resolved": "https://registry.npmmirror.com/source-map-loader/-/source-map-loader-0.2.4.tgz", - "integrity": "sha512-OU6UJUty+i2JDpTItnizPrlpOIBLmQbWMuBg9q5bVtnHACqw1tn9nNwqJLbv0/00JjnJb/Ee5g5WS5vrRv7zIQ==", - "dev": true, - "requires": { - "async": "^2.5.0", - "loader-utils": "^1.1.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmmirror.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==" }, "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "version": "0.5.13", + "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, "sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", @@ -10607,9 +11410,9 @@ } }, "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true }, "spdx-expression-parse": { @@ -10623,519 +11426,289 @@ } }, "spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", - "dev": true - }, - "spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmmirror.com/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "speed-measure-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmmirror.com/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "version": "3.0.18", + "resolved": "https://registry.npmmirror.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", "dev": true }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.2", - "resolved": "https://registry.npmmirror.com/ssri/-/ssri-6.0.2.tgz", - "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } + "through": "2" } }, - "stats-webpack-plugin": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/stats-webpack-plugin/-/stats-webpack-plugin-0.7.0.tgz", - "integrity": "sha512-NT0YGhwuQ0EOX+uPhhUcI6/+1Sq/pMzNuSCBVT4GbFl/ac6I/JZefBcjlECNfAb1t3GOx5dEj1Z7x0cAxeeVLQ==", + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, "requires": { - "lodash": "^4.17.4" + "readable-stream": "^3.0.0" } }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, - "stdout-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/stdout-stream/-/stdout-stream-1.4.1.tgz", - "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", + "stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { - "readable-stream": "^2.0.1" + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } } }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", "dev": true, "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" + "bl": "^5.0.0" } }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" + "internal-slot": "^1.0.4" } }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmmirror.com/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmmirror.com/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==" + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" } }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "streamroller": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/streamroller/-/streamroller-1.0.6.tgz", - "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==", + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "async": "^2.6.2", - "date-format": "^2.0.0", - "debug": "^3.2.6", - "fs-extra": "^7.0.1", - "lodash": "^4.17.14" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^5.0.1" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "ansi-regex": "^5.0.1" } }, - "strip-eof": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + }, + "strip-bom-string": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", + "resolved": "https://registry.npmmirror.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, "requires": { - "get-stdin": "^4.0.1" + "min-indent": "^1.0.0" } }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - }, - "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmmirror.com/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - } + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, - "stylus": { - "version": "0.54.5", - "resolved": "https://registry.npmmirror.com/stylus/-/stylus-0.54.5.tgz", - "integrity": "sha512-4Yzg9aqLf3f4sDvO3x+Fbp2V634j9ikFGCFokIPYi+7Y4IG/nxAiPUs95MRlo+lPdTsxAs9wCzEclmPccItISA==", + "strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", "dev": true, "requires": { - "css-parse": "1.7.x", - "debug": "*", - "glob": "7.0.x", - "mkdirp": "0.5.x", - "sax": "0.5.x", - "source-map": "0.1.x" - }, - "dependencies": { - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.0.6.tgz", - "integrity": "sha512-f8c0rE8JiCxpa52kWPAOa3ZaYEnzofDzCQLCn3Vdk0Z5OVLq3BsRFJI4S4ykpeVW6QMGBUkMeUpoEgWnMTnw5Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } + "acorn": "^8.10.0" } }, - "stylus-loader": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/stylus-loader/-/stylus-loader-3.0.2.tgz", - "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "lodash.clonedeep": "^4.5.0", - "when": "~3.6.x" - } + "strong-type": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/strong-type/-/strong-type-1.1.0.tgz", + "integrity": "sha512-X5Z6riticuH5GnhUyzijfDi1SoXas8ODDyN7K8lJeQK+Jfi4dKdoJGL4CXTskY/ATBcN+rz5lROGn1tAUkOX7g==", + "dev": true }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, + "version": "8.1.1", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", "dev": true }, - "tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "svgo": { + "version": "3.3.2", + "resolved": "https://registry.npmmirror.com/svgo/-/svgo-3.3.2.tgz", + "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", + "dev": true, + "requires": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^5.1.0", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", + "picocolors": "^1.0.0" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, + "temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", "dev": true }, - "tar": { - "version": "2.2.2", - "resolved": "https://registry.npmmirror.com/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "tempfile": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/tempfile/-/tempfile-3.0.0.tgz", + "integrity": "sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==", "dev": true, "requires": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" + "temp-dir": "^2.0.0", + "uuid": "^3.3.2" } }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha512-7dPUZQGy/+m3/wjVz3ZW5dobSoD/02NxJpoXUX0WIyjfVS3l0c+b/+9phIDFA7FHzkYtwtMFgeGZ/Y8jVTeqQQ==", + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { - "execa": "^0.7.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" }, "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-0.7.0.tgz", - "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - } - } - }, - "terser": { - "version": "4.8.1", - "resolved": "https://registry.npmmirror.com/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "brace-expansion": "^1.1.7" } } } }, - "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", - "dev": true, - "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - } - } + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true }, "through": { "version": "2.3.8", @@ -11144,35 +11717,31 @@ "dev": true }, "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", "dev": true, "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "readable-stream": "3" } }, - "thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "tinybench": { + "version": "2.8.0", + "resolved": "https://registry.npmmirror.com/tinybench/-/tinybench-2.8.0.tgz", + "integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==", "dev": true }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==", + "tinypool": { + "version": "0.3.1", + "resolved": "https://registry.npmmirror.com/tinypool/-/tinypool-0.3.1.tgz", + "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==", "dev": true }, - "timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npmmirror.com/timers-browserify/-/timers-browserify-2.0.12.tgz", - "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } + "tinyspy": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/tinyspy/-/tinyspy-1.1.1.tgz", + "integrity": "sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==", + "dev": true }, "tmp": { "version": "0.0.33", @@ -11183,472 +11752,189 @@ "os-tmpdir": "~1.0.2" } }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==", + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmmirror.com/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "^7.0.0" } }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==", "dev": true }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", - "dev": true - }, - "true-case-path": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/true-case-path/-/true-case-path-1.0.3.tgz", - "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", - "dev": true, - "requires": { - "glob": "^7.1.2" - } - }, - "ts-node": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/ts-node/-/ts-node-7.0.1.tgz", - "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", - "dev": true, - "requires": { - "arrify": "^1.0.0", - "buffer-from": "^1.1.0", - "diff": "^3.1.0", - "make-error": "^1.1.1", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.5.6", - "yn": "^2.0.0" - } - }, - "tsickle": { - "version": "0.37.1", - "resolved": "https://registry.npmmirror.com/tsickle/-/tsickle-0.37.1.tgz", - "integrity": "sha512-0GwgOJEnsmRsrONXCvcbAWY0CvdqF3UugPVoupUpA8Ul0qCPTuqqq0ou/hLqtKZOyyulzCP6MYRjb9/J1g9bJg==", - "dev": true - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmmirror.com/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha512-yA5YmWkzQoMF/fOA6TjkJlJniZxpo7cneTvdQEJj7blUd7YsR23gcOC5caM2MP186hTrhpSf1VSuygnikerwmQ==", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmmirror.com/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", - "dev": true - }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "trouter": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/trouter/-/trouter-2.0.1.tgz", + "integrity": "sha512-kr8SKKw94OI+xTGOkfsvwZQ8mWoikZDd2n8XZHjJVZUARZT+4/VV6cacRS6CLsH9bNm+HFIPU1Zx4CnNnb4qlQ==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" + "matchit": "^1.0.0" } }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, + "ts-morph": { + "version": "18.0.0", + "resolved": "https://registry.npmmirror.com/ts-morph/-/ts-morph-18.0.0.tgz", + "integrity": "sha512-Kg5u0mk19PIIe4islUI/HWRvm9bC1lHejK4S0oh1zaZ77TMZAEmQC0sHQYiu2RgCQFZKXz1fMVi/7nOOeirznA==", "requires": { - "unique-slug": "^2.0.0" + "@ts-morph/common": "~0.19.0", + "code-block-writer": "^12.0.0" } }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" + "ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmmirror.com/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" } }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { - "crypto-random-string": "^1.0.0" + "tslib": "^1.8.1" } }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmmirror.com/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmmirror.com/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", - "dev": true - } - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw==", + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", "dev": true }, - "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "uglify-js": { + "version": "3.18.0", + "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.18.0.tgz", + "integrity": "sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==", "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } + "optional": true }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, "requires": { - "punycode": "^2.1.0" + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", "dev": true }, - "url": { - "version": "0.11.1", - "resolved": "https://registry.npmmirror.com/url/-/url-0.11.1.tgz", - "integrity": "sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==", - "dev": true, - "requires": { - "punycode": "^1.4.1", - "qs": "^6.11.0" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, - "qs": { - "version": "6.11.2", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - } - } - }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmmirror.com/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } + "unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true }, - "useragent": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/useragent/-/useragent-2.3.0.tgz", - "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", + "update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "requires": { - "lru-cache": "4.1.x", - "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - } + "escalade": "^3.1.2", + "picocolors": "^1.0.1" } }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmmirror.com/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - } + "punycode": "^2.1.0" } }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "uuid": { @@ -11657,6 +11943,23 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmmirror.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmmirror.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -11667,14 +11970,10 @@ "spdx-expression-parse": "^3.0.0" } }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } + "validator": { + "version": "13.12.0", + "resolved": "https://registry.npmmirror.com/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==" }, "vary": { "version": "1.1.2", @@ -11682,796 +11981,895 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "vite": { + "version": "4.5.3", + "resolved": "https://registry.npmmirror.com/vite/-/vite-4.5.3.tgz", + "integrity": "sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "esbuild": "^0.18.10", + "fsevents": "~2.3.2", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + } + }, + "vite-plugin-dts": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/vite-plugin-dts/-/vite-plugin-dts-2.3.0.tgz", + "integrity": "sha512-WbJgGtsStgQhdm3EosYmIdTGbag5YQpZ3HXWUAPCDyoXI5qN6EY0V7NXq0lAmnv9hVQsvh0htbYcg0Or5Db9JQ==", + "requires": { + "@babel/parser": "^7.21.4", + "@microsoft/api-extractor": "^7.34.4", + "@rollup/pluginutils": "^5.0.2", + "@rushstack/node-core-library": "^3.55.2", + "debug": "^4.3.4", + "fast-glob": "^3.2.12", + "fs-extra": "^10.1.0", + "kolorist": "^1.7.0", + "magic-string": "^0.29.0", + "ts-morph": "18.0.0" }, "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "magic-string": { + "version": "0.29.0", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.29.0.tgz", + "integrity": "sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==", + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.13" + } } } }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true + "vite-plugin-md": { + "version": "0.20.6", + "resolved": "https://registry.npmmirror.com/vite-plugin-md/-/vite-plugin-md-0.20.6.tgz", + "integrity": "sha512-9KOL9B+Dc5zb9ihl0pVodtfkOkfnxo0MUXNyWBGitnHQYWldw92L8rahvTbnW7Z4P0qTjVU3G3amfR+35ZxtCw==", + "dev": true, + "requires": { + "@yankeeinlondon/builder-api": "*", + "@yankeeinlondon/happy-wrapper": "^2.6.0", + "gray-matter": "^4.0.3", + "markdown-it": "^13.0.1", + "source-map-js": "^1.0.2" + } }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", - "dev": true + "vite-svg-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/vite-svg-loader/-/vite-svg-loader-4.0.0.tgz", + "integrity": "sha512-0MMf1yzzSYlV4MGePsLVAOqXsbF5IVxbn4EEzqRnWxTQl8BJg/cfwIzfQNmNQxZp5XXwd4kyRKF1LytuHZTnqA==", + "dev": true, + "requires": { + "@vue/compiler-sfc": "^3.2.20", + "svgo": "^3.0.2" + } }, - "watchpack": { - "version": "1.7.5", - "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-1.7.5.tgz", - "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "vitepress": { + "version": "1.0.0-alpha.8", + "resolved": "https://registry.npmmirror.com/vitepress/-/vitepress-1.0.0-alpha.8.tgz", + "integrity": "sha512-kTRN5DCagvMqr9OjylSV9/waGg0IHrxL0hBVuJoz7ykleZq2qR02n5CaiFq5QrSB/VRBGqiVsFQzet9vJsXS8g==", "dev": true, "requires": { - "chokidar": "^3.4.1", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0", - "watchpack-chokidar2": "^2.0.1" + "@docsearch/css": "^3.2.1", + "@docsearch/js": "^3.2.1", + "@vitejs/plugin-vue": "^3.0.3", + "@vue/devtools-api": "^6.2.1", + "@vueuse/core": "^9.1.0", + "body-scroll-lock": "^4.0.0-beta.0", + "shiki": "^0.11.1", + "vite": "^3.0.8", + "vue": "^3.2.37" }, "dependencies": { - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "@esbuild/android-arm": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz", + "integrity": "sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==", "dev": true, - "optional": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } + "optional": true }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "@esbuild/linux-loong64": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz", + "integrity": "sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==", "dev": true, "optional": true }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "@vitejs/plugin-vue": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz", + "integrity": "sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==", + "dev": true + }, + "esbuild": { + "version": "0.15.18", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.15.18.tgz", + "integrity": "sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.15.18", + "@esbuild/linux-loong64": "0.15.18", + "esbuild-android-64": "0.15.18", + "esbuild-android-arm64": "0.15.18", + "esbuild-darwin-64": "0.15.18", + "esbuild-darwin-arm64": "0.15.18", + "esbuild-freebsd-64": "0.15.18", + "esbuild-freebsd-arm64": "0.15.18", + "esbuild-linux-32": "0.15.18", + "esbuild-linux-64": "0.15.18", + "esbuild-linux-arm": "0.15.18", + "esbuild-linux-arm64": "0.15.18", + "esbuild-linux-mips64le": "0.15.18", + "esbuild-linux-ppc64le": "0.15.18", + "esbuild-linux-riscv64": "0.15.18", + "esbuild-linux-s390x": "0.15.18", + "esbuild-netbsd-64": "0.15.18", + "esbuild-openbsd-64": "0.15.18", + "esbuild-sunos-64": "0.15.18", + "esbuild-windows-32": "0.15.18", + "esbuild-windows-64": "0.15.18", + "esbuild-windows-arm64": "0.15.18" + } + }, + "rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, - "optional": true, "requires": { - "fill-range": "^7.0.1" + "fsevents": "~2.3.2" } }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "vite": { + "version": "3.2.10", + "resolved": "https://registry.npmmirror.com/vite/-/vite-3.2.10.tgz", + "integrity": "sha512-Dx3olBo/ODNiMVk/cA5Yft9Ws+snLOXrhLtrI3F4XLt4syz2Yg8fayZMWScPKoz12v5BUv7VEmQHnsfpY80fYw==", "dev": true, - "optional": true, "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", + "esbuild": "^0.15.9", "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "postcss": "^8.4.18", + "resolve": "^1.22.1", + "rollup": "^2.79.1" } + } + } + }, + "vitepress-theme-demoblock": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/vitepress-theme-demoblock/-/vitepress-theme-demoblock-1.4.2.tgz", + "integrity": "sha512-OMIRg1JJI8NvBVLFu2G0cd+gT5IzXZfTsV7yws7GfRXZE3Q4qLO5cR1+ngNnFZw44ID1oLk+Yu9HZM+AJYtgWA==", + "dev": true, + "requires": { + "camelcase": "^6.2.0", + "globby": "^11.0.2", + "kolorist": "^1.5.0", + "markdown-it": "^12.0.4", + "minimist": "^1.2.5", + "prettier": "^2.2.1", + "vitepress": "^0.16.1", + "yaml": "^2.0.0-6" + }, + "dependencies": { + "@docsearch/css": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmmirror.com/@docsearch/css/-/css-1.0.0-alpha.28.tgz", + "integrity": "sha512-1AhRzVdAkrWwhaxTX6/R7SnFHz8yLz1W8I/AldlTrfbNvZs9INk1FZiEFTJdgHaP68nhgQNWSGlQiDiI3y2RYg==", + "dev": true }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "@docsearch/js": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmmirror.com/@docsearch/js/-/js-1.0.0-alpha.28.tgz", + "integrity": "sha512-2g7aPhBy7FoEyeZW2G3LYHWVa8CFvqyozEz8PXt3hyywdFcmEIqmoCRwn8kboVftrOKCjtPcuLCewsaBoB3uiw==", + "dev": true, + "requires": { + "@docsearch/react": "^1.0.0-alpha.28", + "preact": "^10.0.0" + } + }, + "@docsearch/react": { + "version": "1.0.0-alpha.28", + "resolved": "https://registry.npmmirror.com/@docsearch/react/-/react-1.0.0-alpha.28.tgz", + "integrity": "sha512-XjJOnCBXn+UZmtuDmgzlVIHnnvh6yHVwG4aFq8AXN6xJEIX3f180FvGaowFWAxgdtHplJxFGux0Xx4piHqBzIw==", "dev": true, - "optional": true, "requires": { - "to-regex-range": "^5.0.1" + "@docsearch/css": "^1.0.0-alpha.28", + "@francoischalifour/autocomplete-core": "^1.0.0-alpha.28", + "@francoischalifour/autocomplete-preset-algolia": "^1.0.0-alpha.28", + "algoliasearch": "^4.0.0" } }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "@esbuild/linux-loong64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz", + "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==", "dev": true, "optional": true }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "@vitejs/plugin-vue": { + "version": "1.10.2", + "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-1.10.2.tgz", + "integrity": "sha512-/QJ0Z9qfhAFtKRY+r57ziY4BSbGUTGsPRMpB/Ron3QPwBZM4OZAZHdTa4a8PafCwU5DTatXG8TMDoP8z+oDqJw==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "optional": true, "requires": { - "is-glob": "^4.0.1" + "color-convert": "^2.0.1" } }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, - "optional": true, "requires": { - "binary-extensions": "^2.0.0" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, - "optional": true + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "optional": true, "requires": { - "picomatch": "^2.2.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, - "optional": true, "requires": { - "is-number": "^7.0.0" + "restore-cursor": "^3.1.0" } - } - } - }, - "watchpack-chokidar2": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", - "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", - "dev": true, - "optional": true, - "requires": { - "chokidar": "^2.1.8" - }, - "dependencies": { - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true - } - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmmirror.com/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webdriver-js-extender": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", - "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", - "dev": true, - "requires": { - "@types/selenium-webdriver": "^3.0.0", - "selenium-webdriver": "^3.0.1" - } - }, - "webpack": { - "version": "4.29.0", - "resolved": "https://registry.npmmirror.com/webpack/-/webpack-4.29.0.tgz", - "integrity": "sha512-pxdGG0keDBtamE1mNvT5zyBdx+7wkh6mh7uzMOo/uRQ/fhsdj5FXkh/j5mapzs060forql1oXqXN9HJGju+y7w==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" + "color-name": "~1.1.4" } - } - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmmirror.com/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha512-P6ZUGXn5buTEZyTStCHHLwtWGKSm/jA629Zgp4pcHSsy60CCsT9MaHDxNIPL+GGJ2KwOgI6ORwQtHcrYHAt2UQ==", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmmirror.com/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha512-cabwdhnSNf/tTDMh/DXZXlkeQLvdYT5xfGYBohqHG7wb3bBQrQlHQNWM9NWSOboXXK1zgwz6JzS5e4hZq9vxMw==", + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + }, + "esbuild": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.54.tgz", + "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "dev": true, + "requires": { + "@esbuild/linux-loong64": "0.14.54", + "esbuild-android-64": "0.14.54", + "esbuild-android-arm64": "0.14.54", + "esbuild-darwin-64": "0.14.54", + "esbuild-darwin-arm64": "0.14.54", + "esbuild-freebsd-64": "0.14.54", + "esbuild-freebsd-arm64": "0.14.54", + "esbuild-linux-32": "0.14.54", + "esbuild-linux-64": "0.14.54", + "esbuild-linux-arm": "0.14.54", + "esbuild-linux-arm64": "0.14.54", + "esbuild-linux-mips64le": "0.14.54", + "esbuild-linux-ppc64le": "0.14.54", + "esbuild-linux-riscv64": "0.14.54", + "esbuild-linux-s390x": "0.14.54", + "esbuild-netbsd-64": "0.14.54", + "esbuild-openbsd-64": "0.14.54", + "esbuild-sunos-64": "0.14.54", + "esbuild-windows-32": "0.14.54", + "esbuild-windows-64": "0.14.54", + "esbuild-windows-arm64": "0.14.54" + } + }, + "esbuild-android-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz", + "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz", + "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz", + "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", + "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz", + "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz", + "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz", + "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz", + "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz", + "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", + "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz", + "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz", + "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==", "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.5.1", - "resolved": "https://registry.npmmirror.com/webpack-dev-middleware/-/webpack-dev-middleware-3.5.1.tgz", - "integrity": "sha512-4dwCh/AyMOYAybggUr8fiCkRnjVDp+Cqlr9c+aaNB3GJYgRGYQWJ1YX/WAKUNA9dPNHZ6QSN2lYDKqjKSI8Vqw==", - "dev": true, - "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.14", - "resolved": "https://registry.npmmirror.com/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz", - "integrity": "sha512-mGXDgz5SlTxcF3hUpfC8hrQ11yhAttuUQWf1Wmb+6zo3x6rb7b9mIfuQvAPLdfDRCGRGvakBWHdHOa0I9p/EVQ==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^2.0.0", - "internal-ip": "^3.0.1", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "3.4.0", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true + "optional": true }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", - "dev": true + "esbuild-linux-riscv64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz", + "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==", + "dev": true, + "optional": true }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "esbuild-linux-s390x": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz", + "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==", "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } + "optional": true }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "esbuild-netbsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz", + "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==", "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } + "optional": true }, - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "esbuild-openbsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz", + "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==", "dev": true, - "requires": { - "ms": "^2.1.1" - } + "optional": true }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", + "esbuild-sunos-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz", + "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==", "dev": true, - "requires": { - "xregexp": "4.0.0" - } + "optional": true }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "esbuild-windows-32": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz", + "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==", "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } + "optional": true }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "esbuild-windows-64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz", + "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==", "dev": true, - "requires": { - "pump": "^3.0.0" - } + "optional": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "esbuild-windows-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz", + "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==", + "dev": true, + "optional": true + }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", "dev": true, "requires": { - "invert-kv": "^2.0.0" + "uc.micro": "^1.0.1" } }, - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" } }, - "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmmirror.com/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" } }, - "which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmmirror.com/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", + "rollup": { + "version": "2.77.3", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.77.3.tgz", + "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" + "fsevents": "~2.3.2" } }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "has-flag": "^4.0.0" } - } + }, + "vite": { + "version": "2.9.18", + "resolved": "https://registry.npmmirror.com/vite/-/vite-2.9.18.tgz", + "integrity": "sha512-sAOqI5wNM9QvSEE70W3UGMdT8cyEn0+PmJMTFvTB8wB0YbYUWw3gUbY62AOyrXosGieF2htmeLATvNxpv/zNyQ==", + "dev": true, + "requires": { + "esbuild": "^0.14.27", + "fsevents": "~2.3.2", + "postcss": "^8.4.13", + "resolve": "^1.22.0", + "rollup": ">=2.59.0 <2.78.0" + } + }, + "vitepress": { + "version": "0.16.1", + "resolved": "https://registry.npmmirror.com/vitepress/-/vitepress-0.16.1.tgz", + "integrity": "sha512-jsgNY+b4mngVHQ1mZZ7ZGJliup/nM0jwdKTGoptwVzSQfkx5i3lF14jRRMb6ulC+9X5xbQ7N/zNcWqVWMFd/cQ==", + "dev": true, + "requires": { + "@docsearch/css": "^1.0.0-alpha.28", + "@docsearch/js": "^1.0.0-alpha.28", + "@types/markdown-it": "^12.0.1", + "@vitejs/plugin-vue": "^1.4.0", + "@vue/compiler-sfc": "^3.2.1", + "@vue/server-renderer": "^3.2.1", + "chalk": "^4.1.1", + "compression": "^1.7.4", + "debug": "^4.3.2", + "diacritics": "^1.3.0", + "escape-html": "^1.0.3", + "fs-extra": "^10.0.0", + "globby": "^11.0.3", + "gray-matter": "^4.0.3", + "lru-cache": "^6.0.0", + "markdown-it": "^12.0.6", + "markdown-it-anchor": "^7.1.0", + "markdown-it-container": "^3.0.0", + "markdown-it-emoji": "^2.0.0", + "markdown-it-table-of-contents": "^0.5.2", + "minimist": "^1.2.5", + "ora": "^5.4.0", + "polka": "^0.5.2", + "prismjs": "^1.23.0", + "sirv": "^1.0.12", + "vite": "^2.4.4", + "vue": "^3.2.1" + } + } + } + }, + "vitest": { + "version": "0.25.8", + "resolved": "https://registry.npmmirror.com/vitest/-/vitest-0.25.8.tgz", + "integrity": "sha512-X75TApG2wZTJn299E/TIYevr4E9/nBo1sUtZzn0Ci5oK8qnpZAZyhwg0qCeMSakGIWtc6oRwcQFyFfW14aOFWg==", + "dev": true, + "requires": { + "@types/chai": "^4.3.4", + "@types/chai-subset": "^1.3.3", + "@types/node": "*", + "acorn": "^8.8.1", + "acorn-walk": "^8.2.0", + "chai": "^4.3.7", + "debug": "^4.3.4", + "local-pkg": "^0.4.2", + "source-map": "^0.6.1", + "strip-literal": "^1.0.0", + "tinybench": "^2.3.1", + "tinypool": "^0.3.0", + "tinyspy": "^1.0.2", + "vite": "^3.0.0 || ^4.0.0" } }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, + "vscode-languageserver-textdocument": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", + "dev": true + }, + "vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "vscode-textmate": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/vscode-textmate/-/vscode-textmate-6.0.0.tgz", + "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", + "dev": true + }, + "vscode-uri": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/vscode-uri/-/vscode-uri-2.1.2.tgz", + "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "dev": true + }, + "vue": { + "version": "3.4.31", + "resolved": "https://registry.npmmirror.com/vue/-/vue-3.4.31.tgz", + "integrity": "sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==", "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" + "@vue/compiler-dom": "3.4.31", + "@vue/compiler-sfc": "3.4.31", + "@vue/runtime-dom": "3.4.31", + "@vue/server-renderer": "3.4.31", + "@vue/shared": "3.4.31" } }, - "webpack-merge": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/webpack-merge/-/webpack-merge-4.2.1.tgz", - "integrity": "sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw==", + "vue-component-type-helpers": { + "version": "2.0.24", + "resolved": "https://registry.npmmirror.com/vue-component-type-helpers/-/vue-component-type-helpers-2.0.24.tgz", + "integrity": "sha512-Jr5N8QVYEcbQuMN1LRgvg61758G8HTnzUlQsAFOxx6Y6X8kmhJ7C+jOvWsQruYxi3uHhhS6BghyRlyiwO99DBg==", + "dev": true + }, + "vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==" + }, + "vue-template-compiler": { + "version": "2.7.16", + "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", + "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", "dev": true, "requires": { - "lodash": "^4.17.5" + "de-indent": "^1.0.2", + "he": "^1.2.0" } }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "vue-tsc": { + "version": "1.8.27", + "resolved": "https://registry.npmmirror.com/vue-tsc/-/vue-tsc-1.8.27.tgz", + "integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==", "dev": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "@volar/typescript": "~1.11.1", + "@vue/language-core": "1.8.27", + "semver": "^7.5.4" } }, - "webpack-subresource-integrity": { - "version": "1.1.0-rc.6", - "resolved": "https://registry.npmmirror.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", - "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, "requires": { - "webpack-core": "^0.6.8" + "makeerror": "1.0.12" } }, - "websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmmirror.com/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, "requires": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" + "defaults": "^1.0.3" } }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmmirror.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true - }, - "when": { - "version": "3.6.4", - "resolved": "https://registry.npmmirror.com/when/-/when-3.6.4.tgz", - "integrity": "sha512-d1VUP9F96w664lKINMGeElWdhhb5sC+thXM+ydZGU3ZnaE09Wv6FaS+mpM9570kcDs/xMfcXJBTLsMdHEFYY9Q==", + "webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmmirror.com/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "requires": { - "isexe": "^2.0.0" + "iconv-lite": "0.6.3" } }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", + "whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "requires": { - "string-width": "^2.1.1" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" }, "dependencies": { - "ansi-regex": { + "webidl-conversions": { "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } } } }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", - "dev": true - }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmmirror.com/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "errno": "~0.1.7" + "isexe": "^2.0.0" } }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" } }, - "wrappy": { + "which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmmirror.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "resolved": "https://registry.npmmirror.com/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" } }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmmirror.com/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmmirror.com/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" } }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmmirror.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha512-/bFPLUgJrfGUL10AIv4Y7/CUt6so9CLtB/oFxQSHseSDNNCdC6vwwKEqwLN6wNPBg9YWXAiMu8jkf6RPRS/75Q==", + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } }, "xtend": { "version": "4.0.2", @@ -12479,110 +12877,79 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, - "xxhashjs": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/xxhashjs/-/xxhashjs-0.2.2.tgz", - "integrity": "sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==", - "dev": true, - "requires": { - "cuint": "^0.2.2" - } - }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "5.0.8", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "dev": true }, "yargs": { - "version": "7.1.2", - "resolved": "https://registry.npmmirror.com/yargs/-/yargs-7.1.2.tgz", - "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", + "version": "17.7.2", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.1" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true } } }, "yargs-parser": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-5.0.1.tgz", - "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true - } - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==", + "version": "20.2.9", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yn": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/yn/-/yn-2.0.0.tgz", - "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true }, - "zone.js": { - "version": "0.8.29", - "resolved": "https://registry.npmmirror.com/zone.js/-/zone.js-0.8.29.tgz", - "integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ==" + "yoctocolors-cjs": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.1.tgz", + "integrity": "sha512-c6T13b6qYcJZvck7QbEFXrFX/Mu2KOjvAGiKHmYMUg96jxNpfP6i+psGW72BOPxOIDUJrORG+Kyu7quMX9CQBQ==", + "dev": true }, - "zrender": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz", - "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", + "z-schema": { + "version": "5.0.5", + "resolved": "https://registry.npmmirror.com/z-schema/-/z-schema-5.0.5.tgz", + "integrity": "sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==", "requires": { - "tslib": "2.3.0" - }, - "dependencies": { - "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" - } + "commander": "^9.4.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" } } } diff --git a/packages/designer/package.json b/packages/designer/package.json index 0b5506b964be29a2e886903c8ec853adff50b698..c74313f30f7ada4a258857cbaab580492b221d66 100644 --- a/packages/designer/package.json +++ b/packages/designer/package.json @@ -1,120 +1,59 @@ { - "name": "designer", + "name": "@farris/designer", + "private": true, "version": "0.0.0", + "type": "module", "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e", - "element": "npm run build designer-element && cp -r dist/designer-element node_modules/@farris", - "services": "npm run build designer-services && cp -r dist/designer-services node_modules/@farris", - "devkit": "npm run build designer-devkit && cp -r dist/designer-devkit node_modules/@farris", - "ui": "npm run build designer-ui && cp -r dist/designer-ui node_modules/@farris", - "formDesigner": "npm run element && npm run services && npm run devkit && npm run ui" + "dev": "vite", + "build": "vue-tsc -b && vite build", + "preview": "vite preview" }, - "private": true, "dependencies": { - "@angular/animations": "~7.2.0", - "@angular/cdk": "^7.3.7", - "@angular/common": "~7.2.0", - "@angular/compiler": "~7.2.0", - "@angular/core": "~7.2.0", - "@angular/forms": "~7.2.0", - "@angular/platform-browser": "~7.2.0", - "@angular/platform-browser-dynamic": "~7.2.0", - "@angular/router": "~7.2.0", - "@farris/app-navigation-be": "0.0.12", - "@farris/app-navigation-selector": "0.0.7", - "@farris/colorpicker-plus": "0.0.5", - "@farris/designer-dragula": "0.0.2", - "@farris/ide-devkit": "^1.0.39", - "@farris/ide-property-panel": "0.0.1-ubml", - "@farris/on-change": "0.0.3", - "@farris/property-editor": "0.0.12", - "@farris/response-layout-editor": "0.0.10", - "@farris/rich-text-designer": "0.0.6", - "@farris/smooth-dnd": "0.0.1", - "@farris/ui-area-response": "0.0.2", - "@farris/ui-combo-list": "^0.2.16", - "@farris/ui-combo-lookup": "^0.2.0", - "@farris/ui-common": "^0.3.26", - "@farris/ui-context-menu": "0.0.10", - "@farris/ui-datagrid": "^1.2.0", - "@farris/ui-datagrid-editors": "^0.3.18", - "@farris/ui-datagrid-filter": "^0.1.3", - "@farris/ui-datalist": "^0.1.0", - "@farris/ui-datatable": "^0.3.2", - "@farris/ui-datepicker": "^0.7.5", - "@farris/ui-dialog": "^0.2.5", - "@farris/ui-draggable": "^0.1.0", - "@farris/ui-editor": "0.0.21", - "@farris/ui-filter": "^0.1.3", - "@farris/ui-filter-condition": "0.0.9", - "@farris/ui-filter-editor": "^0.3.4", - "@farris/ui-filter-panel": "^0.1.3", - "@farris/ui-forms": "^0.3.8", - "@farris/ui-input-group": "^0.2.18", - "@farris/ui-language-textbox": "^0.1.24", - "@farris/ui-layout": "^0.1.0", - "@farris/ui-loading": "^0.2.2", - "@farris/ui-locale": "^0.3.3", - "@farris/ui-lookup": "^0.9.0", - "@farris/ui-messager": "^0.2.32", - "@farris/ui-modal": "^0.1.21", - "@farris/ui-notify": "^0.1.8", - "@farris/ui-number-spinner": "^0.4.12", - "@farris/ui-pagination": "^0.2.18", - "@farris/ui-perfect-scrollbar": "0.0.8", - "@farris/ui-popover": "^0.1.2", - "@farris/ui-progress-step": "0.0.25", - "@farris/ui-search-box": "^0.1.4", - "@farris/ui-shortcuts": "0.0.4", - "@farris/ui-sidebar": "^0.1.5", - "@farris/ui-switch": "^0.1.10", - "@farris/ui-tabs": "^0.2.16", - "@farris/ui-time-picker": "^0.2.2", - "@farris/ui-tooltip": "0.0.26", - "@farris/ui-treetable": "^0.5.3", - "@gsp-bef/gsp-cm-metadata": "0.0.23", - "@gsp-cmp/webcommand": "0.0.15", - "@types/lodash": "4.14.182", - "@types/lodash-es": "^4.17.7", - "bignumber.js": "^9.0.1", - "core-js": "^2.5.4", - "echarts": "^5.5.0", - "ngx-contextmenu": "^5.4.0", - "perfect-scrollbar": "^1.5.5", - "rxjs": "~6.3.3", - "rxjs-compat": "^6.6.7", - "sortablejs": "^1.15.0", - "tslib": "^1.9.0", - "zone.js": "~0.8.26" + "@farris/ui-vue": "^1.0.2", + "vite-plugin-dts": "^2.1.0", + "vue": "^3.2.37" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.13.0", - "@angular-devkit/build-ng-packagr": "~0.13.0", - "@angular/cli": "~7.3.10", - "@angular/compiler-cli": "~7.2.0", - "@angular/language-service": "~7.2.0", - "@types/jasmine": "~2.8.8", - "@types/jasminewd2": "~2.0.3", - "@types/node": "~8.9.4", - "codelyzer": "~4.5.0", - "jasmine-core": "~2.99.1", - "jasmine-spec-reporter": "~4.2.1", - "karma": "~4.0.0", - "karma-chrome-launcher": "~2.2.0", - "karma-coverage-istanbul-reporter": "~2.0.1", - "karma-jasmine": "~1.1.2", - "karma-jasmine-html-reporter": "^0.2.2", - "ng-packagr": "^4.2.0", - "protractor": "~5.4.0", - "ts-node": "~7.0.0", - "tsickle": "^0.37.1", - "tslib": "^1.9.0", - "tslint": "~5.11.0", - "typescript": "~3.2.2" + "@babel/parser": "^7.19.0", + "@babel/preset-env": "^7.19.0", + "@babel/preset-typescript": "^7.18.0", + "@babel/traverse": "^7.19.0", + "@commitlint/cli": "^17.1.0", + "@commitlint/config-conventional": "^17.1.0", + "@farris/designer-dragula": "0.0.5", + "@testing-library/vue": "^7.0.0", + "@types/chalk": "^2.2.0", + "@types/commander": "^2.12.2", + "@types/jest": "^26.0.24", + "@types/jsonp": "^0.2.3", + "@types/lodash.debounce": "^4.0.7", + "@types/ora": "^3.2.0", + "@typescript-eslint/eslint-plugin": "^5.37.0", + "@typescript-eslint/parser": "^5.37.0", + "@vitejs/plugin-vue": "^4.2.3", + "@vitejs/plugin-vue-jsx": "^3.0.1", + "@vue/babel-plugin-jsx": "^1.1.1", + "@vue/compiler-sfc": "^3.2.0", + "@vue/test-utils": "^2.0.0", + "@vuedx/typecheck": "^0.7.5", + "@vuedx/typescript-plugin-vue": "^0.7.5", + "babel-jest": "^29.0.3", + "chalk": "^5.0.0", + "commander": "^9.4.0", + "conventional-changelog-cli": "^2.2.2", + "happy-dom": "^8.9.0", + "inquirer": "^9.1.1", + "jest": "^29.0.0", + "ora": "^6.1.2", + "patch-vue-directive-ssr": "^0.0.1", + "sass": "^1.32.2", + "shelljs": "^0.8.4", + "typescript": "^4.6.4", + "vite": "^4.4.1", + "vite-plugin-md": "^0.20.0", + "vite-svg-loader": "^4.0.0", + "vitepress": "1.0.0-alpha.8", + "vitepress-theme-demoblock": "1.4.2", + "vue-tsc": "^1.2.0" } } diff --git a/packages/designer/projects/designer-devkit/README.md b/packages/designer/projects/designer-devkit/README.md deleted file mode 100644 index 62cd95a917eed9ae2d8b9d9e2585f8541c1816d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DesignerDevkit - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0. - -## Code scaffolding - -Run `ng generate component component-name --project designer-devkit` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project designer-devkit`. -> Note: Don't forget to add `--project designer-devkit` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `ng build designer-devkit` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `ng build designer-devkit`, go to the dist folder `cd dist/designer-devkit` and run `npm publish`. - -## Running unit tests - -Run `ng test designer-devkit` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/packages/designer/projects/designer-devkit/karma.conf.js b/packages/designer/projects/designer-devkit/karma.conf.js deleted file mode 100644 index 27faebf4ee1e384c0e62ae08e9f530840370eef0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../coverage/designer-devkit'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/packages/designer/projects/designer-devkit/ng-package.json b/packages/designer/projects/designer-devkit/ng-package.json deleted file mode 100644 index e30afbb2c96d4f59ca520094a0b6083200f87d3a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/designer-devkit", - "lib": { - "entryFile": "src/public-api.ts" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/package.json b/packages/designer/projects/designer-devkit/package.json deleted file mode 100644 index 85315275e1d2ee0b2462284266f4c67fb4f6cc56..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@farris/designer-devkit", - "version": "0.0.1", - "peerDependencies": { - "@angular/common": "^7.2.0", - "@angular/core": "^7.2.0" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.css deleted file mode 100644 index 0956b2c6f10d0a30063d47ee5dadf3fdb9f4a252..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.css +++ /dev/null @@ -1,9 +0,0 @@ -:host { - display: block; - min-height: 200px; -} - -.editor { - width: 100%; - height: 100%; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.html deleted file mode 100644 index 73e08611bab250c9c957ccaea26d54eb6873631e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.spec.ts deleted file mode 100644 index 72908ecef0a6e3438087322d819bc2957ec7adb4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AngularMonacoEditorComponent } from './angular-monaco-editor.component'; - -describe('AngularMonacoEditorComponent', () => { - let component: AngularMonacoEditorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ AngularMonacoEditorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AngularMonacoEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.ts deleted file mode 100644 index a05fe1140a13db44a09c169bbc47d256f5ae0ce2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/angular-monaco-editor/angular-monaco-editor.component.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { Component, Input, Output } from '@angular/core'; -import { forwardRef, Inject, NgZone } from '@angular/core'; -import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; -import { fromEvent } from 'rxjs/observable/fromEvent'; - -import { ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorConfig } from '../model/config'; -import { CodeEditorEventService } from '../service/code-editor.event.service'; -import { CODE_EDITOR_EVENTS } from '../constant/events'; -import { AngularEditorModel } from '../model/types'; -import { BaseMonacoEditor } from '../model/base-monaco-editor'; -import { AngularMonacoEditorService } from '../service/angular-monaco-editor.service'; - -declare const monaco: any; - -// 自定义输入控件:1.封装ControlValueAccessor -// https://code-examples.net/zh-CN/q/2154761 -export const CODE_EDITOR_INPUT_VALUE_ACCESSOR: any = { - // https://blog.csdn.net/wangdan_2013/article/details/81314959 - provide: NG_VALUE_ACCESSOR, - useExisting: forwardRef(() => AngularMonacoEditorComponent), - multi: true -}; - -@Component({ - // tslint:disable-next-line:component-selector - selector: 'angular-monaco-editor', - templateUrl: './angular-monaco-editor.component.html', - styleUrls: ['./angular-monaco-editor.component.css'], - // 自定义输入控件:2.引入依赖服务ControlValueAccessor - providers: [ - CODE_EDITOR_INPUT_VALUE_ACCESSOR, - CodeEditorEventService, - AngularMonacoEditorService - ] -}) - -// 自定义输入控件 <-> Monaco Edtor - -// 自定义输入控件:3.1 implements ControlValueAccessor -export class AngularMonacoEditorComponent extends BaseMonacoEditor implements ControlValueAccessor { - - @Input('model') - set model(model: AngularEditorModel) { - this.options.model = model; - if (this._editor) { - this._editor.dispose(); - this.initMonaco(this.options); - } - } - - private _value = ''; - - // tslint:disable-next-line:max-line-length - constructor( - private angularMonacoEditorService: AngularMonacoEditorService, - private zone: NgZone, - private editorEventService: CodeEditorEventService, - @Inject(ANGULAR_MONACO_EDITOR_CONFIG) private angularEditorconfig: AngularMonacoEditorConfig) { - super(editorEventService, angularEditorconfig); - } - - // todo: 提取options公共类 - protected initMonaco(options: any): void { - const enableModel = !!options.model; - if (enableModel) { - const searchedModel = monaco.editor.getModel(options.model.uri); - if (null !== searchedModel) { - searchedModel.dispose(); - } - - options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); - } - - this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); - - if (!enableModel) { - this._editor.setValue(this._value); - } - - if (enableModel) { - this.angularMonacoEditorService.handleModelMarkers(); - } - - // monaco editor -> outside component - this._editor.onDidChangeModelContent((e: any) => this.onChangeModelContentHandler(e)); - - this._editor.onDidBlurEditorText((e: any) => this.onBlurEditorTextHandler(e)); - - this._editor.onDidLayoutChange((e: any) => this.onLayoutChangeHandler(e)); - - // refresh layout on resize event. - this.refreshLayoutWhenWindowResize(); - - this.editorEventService.fireEvent({ - eventName: CODE_EDITOR_EVENTS.onInit, - target: this, - editor: this._editor - }); - } - - /** - * refresh layout when resized the window - */ - refreshLayoutWhenWindowResize() { - if (this._windowResizeSubscription) { - this._windowResizeSubscription.unsubscribe(); - } - // fromEvent用于兼听事件,事件触发时,将事件event转成可流动的Observable进行传输 - // https://www.jianshu.com/p/46894deb870a - this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this._editor.layout()); - } - - onChangeModelContentHandler(e) { - const _value = this._editor.getValue(); - - // monaco editor -> outside component - // https://github.com/JTangming/tm/issues/4 ngZone详解 - this.zone.run(() => this.value = _value); // value is not propagated to parent when executing outside zone. - } - - onBlurEditorTextHandler(e) { - - this.onControlTouched(); - } - - onLayoutChangeHandler(e) { - // console.log('Layout changed:\n' + e); - } - - // get accessor - get value(): any { - return this._value; - } - - // set accessor including call the onchange callback - set value(v: any) { - if (v !== this.value) {// 注意这种写法,值得学习 - this._value = v; - } - - this.onControlValueChange(this.value); // 在属性修饰器里调用onControlValueChange方法 - } - - // 自定义输入控件:3.2 implements ControlValueAccesso - - // outside component -> monaco editor - - // From ControlValueAccessor interface - writeValue(value: any) { - const self = this; - self.value = value || ''; - - // Fix for value change while dispose in process. - setTimeout(() => { - if (self._editor /*&& !this.options.model*/) { - self._editor.setValue(self._value); - } - }); - } - - // From ControlValueAccessor interface - registerOnChange(fn: any) { - this.onControlValueChange = fn; - } - - // From ControlValueAccessor interface - registerOnTouched(fn: any) { - this.onControlTouched = fn; - } - - // ControlValueAccessor提供的事件回调 - onControlValueChange = (_: any) => { - } - - // ControlValueAccessor提供的事件回调 - onControlTouched = () => { - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/constant/events.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/constant/events.ts deleted file mode 100644 index cea57ec82438663b3fb2a722f5e702647190d32d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/constant/events.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const CODE_EDITOR_EVENTS = { - onInit: 'onInit' -}; diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/editor.module.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/editor.module.ts deleted file mode 100644 index da3e4c2ed9efe92a208e4adebcb1cb98d06b04ea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/editor.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CommonModule } from '@angular/common'; - -import { ModuleWithProviders, NgModule } from '@angular/core'; -import { ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorConfig } from './model/config'; -import { AngularMonacoEditorComponent } from './angular-monaco-editor/angular-monaco-editor.component'; - -@NgModule({ - imports: [ - CommonModule - ], - declarations: [ - AngularMonacoEditorComponent - ], - exports: [ - AngularMonacoEditorComponent - ], - providers: [ - ] -}) - -export class AngularMonacoEditorModule { - static forRoot(config?: AngularMonacoEditorConfig): ModuleWithProviders { - return { - ngModule: AngularMonacoEditorModule, - providers: [ - { provide: ANGULAR_MONACO_EDITOR_CONFIG, useValue: config } - ] - }; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/index.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/index.ts deleted file mode 100644 index 79d48e967e3ba018a98eeb444e351ec0de862e83..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './editor.module'; -export * from './angular-monaco-editor/angular-monaco-editor.component'; -export * from './model/config'; -export * from './constant/events'; -export * from './service/code-editor.event.service'; -export * from './service/angular-monaco-editor.service'; diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/base-monaco-editor.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/base-monaco-editor.ts deleted file mode 100644 index fa8a029c630660c2736991c0d67b46258b94491b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/base-monaco-editor.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { AfterViewInit, ElementRef, Input, OnDestroy, Output, ViewChild, EventEmitter } from '@angular/core'; -import { Subscription } from 'rxjs'; - -import { pick } from 'lodash-es'; - -import { AngularMonacoEditorConfig } from './config'; -import { CodeEditorEventService } from '../service/code-editor.event.service'; - -let loadedMonaco = false; -let loadPromise: Promise; - -export abstract class BaseMonacoEditor implements AfterViewInit, OnDestroy { - - protected _editor: any; - private _options: any; - protected _windowResizeSubscription: Subscription; - - @ViewChild('codeEditor') _editorComponent: ElementRef; // 动态添加代码编辑器 - - // tslint:disable-next-line:no-output-on-prefix - @Output() onInit; - - @Input('options') - set options(options: any) { - // 默认options(this.config.defaultOptions) + 自定义options(options) - this._options = Object.assign({}, this.config.defaultOptions, options); - if (this._editor) { - this._editor.dispose(); - this.initMonaco(options); - } - } - get options(): any { - return this._options; - } - - constructor(private codeEditorEventService: CodeEditorEventService, private config: AngularMonacoEditorConfig) { - // 初始化自定义事件 - const self = this; - codeEditorEventService.eventNames.forEach((name) => { - // 创建自定义事件,此处作用等效于: @Output() onInit = new EventEmitter() - self[name] = new EventEmitter(); - const eventPair = pick(self, name); - codeEditorEventService.addEvent(eventPair); - }); - } - - ngAfterViewInit(): void { - if (loadedMonaco) { - // Wait until monaco editor is available - loadPromise.then(() => { - this.initMonaco(this.options); - }); - } else { - loadedMonaco = true; - loadPromise = new Promise((resolve: any) => { - const baseUrl = this.config.baseUrl || '/assets'; - // if (typeof((window).monaco) === 'object') { - // resolve(); - // return; - // } - const onGotAmdLoader: any = () => { - // Load monaco - (window).require.config({ paths: { 'vs': `${baseUrl}/monaco/vs` } }); - (window).require(['vs/editor/editor.main'], () => { - if (typeof this.config.onMonacoLoad === 'function') { - this.config.onMonacoLoad(); - } - this.initMonaco(this.options); - resolve(); - }); - }; - - // Load AMD loader if necessary - if (!(window).require) { - const loaderScript: HTMLScriptElement = document.createElement('script'); - loaderScript.type = 'text/javascript'; - loaderScript.src = `${baseUrl}/monaco/vs/loader.js`; - loaderScript.addEventListener('load', onGotAmdLoader); - document.body.appendChild(loaderScript); - } else { - onGotAmdLoader(); - } - }); - } - } - - // Monaco Editor Initializer - protected abstract initMonaco(options: any): void ; - - ngOnDestroy() { - if (this._windowResizeSubscription) { - this._windowResizeSubscription.unsubscribe(); - } - - if (this._editor) { - this._editor.dispose(); - this._editor = undefined; - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/config.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/config.ts deleted file mode 100644 index 0620149e3b2cb8db17638912576e59a8456962b0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { InjectionToken } from '@angular/core'; - -// injectionToken作用说明 -// https://segmentfault.com/a/1190000008626348 -export const ANGULAR_MONACO_EDITOR_CONFIG = new InjectionToken('ANGULAR_MONACO_EDITOR_CONFIG'); - -export interface AngularMonacoEditorConfig { - baseUrl?: string; - defaultOptions?: { [key: string]: any; }; - onMonacoLoad?: any; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/types.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/types.ts deleted file mode 100644 index edb9b42bbb2d1718a16d4a5e24631239f4c49c21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/model/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -// export interface AngularDiffEditorModel { -// code: string; -// language: string; -// } -export interface AngularEditorModel { - value: string; - language?: string; - uri?: any; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/angular-monaco-editor.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/angular-monaco-editor.service.ts deleted file mode 100644 index 4dd35ca5a4db867b950053bfad3aeaf6279c01c0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/angular-monaco-editor.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Injectable } from '@angular/core'; - -declare const monaco: any; - -// Angular Monaco Editor Component Variables -// 汇总Angular monaco editor component 组件暴露的变量 -@Injectable() -export class AngularMonacoEditorService { - - private _existError = false;//默认没有错误 - get existError() { - return this._existError; - } - - handleModelMarkers() { - var self = this; - // https://github.com/Microsoft/monaco-editor/issues/30 - const setModelMarkers = monaco.editor.setModelMarkers; - monaco.editor.setModelMarkers = function (model, owner, markers) { - setModelMarkers.call(monaco.editor, model, owner, markers); - if (markers.length === 0) { - // there are no errors(synx error and validate error) - // console.log('continue'); - } else { - // there are errors - self._existError = true; - } - }; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/code-editor.event.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/code-editor.event.service.ts deleted file mode 100644 index 99f06f518ee0363d701275fccc47a126f544f832..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/angular-editor/service/code-editor.event.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { assign } from 'lodash-es'; - -import { CODE_EDITOR_EVENTS } from '../constant/events'; - -@Injectable() -export class CodeEditorEventService { - public eventNames = Object.keys(CODE_EDITOR_EVENTS); - private _events: any = {}; // 使用事件 - - /** - * 设置启用事件 - * @param 事件 - */ - addEvent(event) { - assign(this._events, event); - // console.log(this.events); - } - - fireEvent(event) { - this._events[event.eventName].emit(event); - // console.log("Emit Event:" + event); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.css b/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.css deleted file mode 100644 index 76dd0f849ba2454ac8502173537eab5c13d66593..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.css +++ /dev/null @@ -1,73 +0,0 @@ -.card-body { - display: flex; - flex-wrap: wrap; - background: #FCFDFF !important; -} - -.controlPanel .farrisControlIcon { - font-size: 27px; -} - -.controlPanel { - font-size: 13px; - cursor: grab; - display: flex; - background: #fcfdff; - align-items: center; - width: 21%; - border: 1px solid #edf1f5; - height: 76px!important; - text-align: center; - margin: 10px 10px 0; - color: #6080ad; - overflow: hidden; - text-overflow: ellipsis; - border-radius: 7px; -} - - -.controlPanel>div { - margin: auto; - overflow: hidden; -} - -.controlPanel .controlName { - white-space: pre-wrap; - text-align: right; - max-height: 2.32147rem; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; -} - -.controlPanel.active { - position: relative; - background-color: #fff; - box-shadow: 0 2px 7px 0 rgba(85,110,97,.35); - border-radius: 7px; - border: 1px solid #1b7bee99; -} - - -.controlPanel.active:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - border: 17px solid #1b7beedb; - border-top-color: transparent; - border-left-color: transparent; -} - -.controlPanel.active:after { - content: ''; - width: 5px; - height: 12px; - position: absolute; - right: 6px; - bottom: 6px; - border: 2px solid #fff; - border-top-color: transparent; - border-left-color: transparent; - transform: rotate(45deg); -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.html b/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.html deleted file mode 100644 index dc17fca5013ec65fe28c5d7e44da7557e0912594..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.html +++ /dev/null @@ -1,18 +0,0 @@ -
-
-
-
-
{{control.name}}
-
- - -
-
- - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.ts deleted file mode 100644 index 8716d94c895024a5fcb6c2876d4cdb0c90bbd227..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/component-template-manage/component-template-manage.component.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { Component, EventEmitter, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { Subject } from 'rxjs'; -import { DgControl } from '@farris/designer-services'; -import { NotifyService } from '@farris/ui-notify'; -import { MessagerService } from '@farris/ui-messager'; - -@Component({ - selector: 'component-template-manage', - templateUrl: './component-template-manage.component.html', - styleUrls: ['./component-template-manage.component.css'] -}) -export class ComponentTemplateManageComponent implements OnInit { - - /** - * 关闭按钮事件 - */ - @Output() closeModal = new EventEmitter(); - /** - * 确定按钮事件 - */ - @Output() submitModal = new EventEmitter(); - - /** - * 绑定编辑器页尾组件 - */ - @ViewChild('footer') modalFooter: TemplateRef; - /** - * 编辑器默认弹出窗口显示属性 - */ - public modalConfig = { - title: '维护组件模板', - width: 600, - height: 500, - showButtons: true, - resizable: false, - showMaxButton: false - }; - - templateItems = []; - - selectedItemIds = []; - - /** 模板保存、查询的url地址 */ - private templateUrl = '/api/dev/formdesigner/v1.0/field-template'; - - private headerOption = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - }; - - constructor(private http: HttpClient, - private notifyService: NotifyService, - private msgService: MessagerService) { } - - ngOnInit() { - this.getComponentTemplates().subscribe(data => { - if (data) { - this.templateItems = data; - } - }); - } - - /** - * 获取定制模板 - */ - private getComponentTemplates() { - - const subject = new Subject(); - - this.http.get(this.templateUrl, this.headerOption).subscribe((templates: any[]) => { - if (!templates || !templates.length) { - subject.next(null); - return; - } - const items = []; - - templates.forEach((template: any) => { - if (template && template.templateDom) { - const templateDom = JSON.parse(template.templateDom); - const templateControlType = templateDom.type; - const source = template.templateSource ? JSON.parse(template.templateSource) : null; - const item = { - id: template.id, - name: template.name, - type: templateControlType, - controlIconClass: '', - formId: source && source.formId, - formName: source && source.formName, - controlId: source && source.controlId, - templateCategory: template.templateCategory, - } - const icon = DgControl[templateControlType] && DgControl[templateControlType].icon; - if (icon) { - item.controlIconClass = 'fd-i-Family fd_pc-' + icon; - } else { - item.controlIconClass = 'f-icon f-icon-paste'; - } - - - items.push(item); - } - - }); - - subject.next(items); - }, error => { - subject.next(null); - }); - - return subject; - - } - - onSelectItem(item: any) { - item.selected = !item.selected; - } - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - - const checkedItems = this.templateItems.filter(item => item.selected); - const itemIds = checkedItems.map(item => item.id); - - if (!itemIds.length) { - this.notifyService.warning('请先选择模板!'); - return; - } - - this.confirmDelete(itemIds); - - } - - confirmDelete(itemIds: string[]) { - this.msgService.question('确定删除模板?', () => { - - return this.http.put(this.templateUrl + '/batchDelete', itemIds, this.headerOption).subscribe((data: any) => { - if (data && data.state) { - - this.notifyService.success('删除成功'); - this.submitModal.emit(); - } - if (data && !data.state) { - this.notifyService.warning(data.errorMessage || '删除失败'); - } - }, () => { - this.notifyService.warning('删除失败'); - }); - }); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.css b/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.css deleted file mode 100644 index 3dbed77728609240884dd4b5e6f1c49a4f786898..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.css +++ /dev/null @@ -1,66 +0,0 @@ -.controlBox { - font-size: 13px !important; -} - -.controlBox .farris-panel .card-header { - padding: 10px 0px; - background-color: #FCFDFF; -} - -.controlBox .farris-panel .card-header .col-form-label { - font-size: 13px; - margin-bottom: 0px; - color: #3F4764; - opacity: 0.65; -} - -.controlBox .farris-panel .card-header .col-form-label .f-icon { - font-size: 10.8px; - color: #3F4764; -} - -.controlBox .farris-panel .card-body { - display: flex; - flex-wrap: wrap; - background: #FCFDFF !important; -} - -.controlPanel:nth-child(-n+3) { - margin-top: 0 !important; -} - -.controlPanel .farrisControlIcon { - font-size: 27px; -} - -.controlPanel { - font-size: 13px; - cursor: grab; - display: flex; - background: #fff; - align-items: center; - width: 33.333%; - background-color: #fcfdff; - border: 1px solid #edf1f5; - height: 76px !important; - text-align: center; - margin: -1px 0 0 -1px !important; - color: #6080AD; - /* overflow: hidden; */ - text-overflow: ellipsis; - word-break: keep-all; -} - - -.controlPanel>div { - margin: auto; - overflow: hidden; -} - -.gu-mirror.undroppable.controlPanel { - cursor: no-drop; -} - -.controlBox .farris-panel .card-header .col-form-label .icon-panel .f-icon { - font-size: 16px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.html b/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.html deleted file mode 100644 index dc27b6358275870e058ce7527299efb26551eecf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
- - -
- -
-
-
-
-
- -
-
- {{category.name}} -
- - -
-
- -
-
-
-
- -
-
-
-
-
{{control.name}}
-
-
-
-
-
- -
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.spec.ts deleted file mode 100644 index c97582d3a0122f84d02ecf3cb43dd34f550685e4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ControlBoxComponent } from './control-box.component'; - -describe('ControlBoxComponent', () => { - let component: ControlBoxComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ControlBoxComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ControlBoxComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.ts deleted file mode 100644 index 5ed3b655f83d91dee40952698ef5b322742d687d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-box.component.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Component, ComponentFactoryResolver, Injector, Input, NgZone, OnDestroy, OnInit } from '@angular/core'; -import { FormBasicService } from '@farris/designer-services'; -import { BsModalService } from '@farris/ui-modal'; -import { ComponentTemplateManageComponent } from './component-template-manage/component-template-manage.component'; -import { ControlCategoryService } from './control-category.service'; - -@Component({ - selector: 'control-box', - templateUrl: './control-box.component.html', - styleUrls: ['./control-box.component.css'] -}) -export class ControlBoxComponent implements OnInit, OnDestroy { - - /** 可视化区域构造器 */ - @Input() designerBuilder: any; - - /** 设计器支持的控件分类 */ - public controlCategoryList: any[]; - - timer: any; - - constructor( - private http: HttpClient, - private ngZone: NgZone, - private formBasicService: FormBasicService, - private injector: Injector, - private resolver: ComponentFactoryResolver, - private modalService: BsModalService) { - } - - ngOnInit() { } - - ngOnDestroy(): void { - if (this.timer) { - clearTimeout(this.timer); - } - } - - /** - * 获取工具箱控件列表,需要等到可视化区域渲染完成后执行,否则DgControl为空 - */ - getDisplayedControls() { - - const controlCategoryService = new ControlCategoryService(this.http, this.formBasicService); - controlCategoryService.getControlCategoryList().subscribe(data => { - this.controlCategoryList = data; - - this.ngZone.runOutsideAngular(() => { - this.timer = setTimeout(() => { - this.addControlBoxToDragula(); - }); - }); - - }); - } - /** - * 更新拖拽列表中的工具箱节点,用于页面重新渲染后执行 - */ - updateCategoryPanelsInDragula() { - this.addControlBoxToDragula(); - - } - /** - * 将工具箱各容器添加到dragula的拖拽列表中 - */ - private addControlBoxToDragula() { - if (!this.designerBuilder) { - return; - } - const controlPanels = document.getElementsByClassName('controlCategory'); - if (!controlPanels) { - return; - } - - if (this.designerBuilder.instance.dragula) { - - this.designerBuilder.instance.dragula.containers = - this.designerBuilder.instance.dragula.containers.filter(e => !e.className.includes('controlCategory')); - - Array.from(controlPanels).forEach(panelElement => { - this.designerBuilder.instance.dragula.containers.push(panelElement); - }); - - } - } - - /** - * 维护分类下的控件。目前支持组件模板类 - * @param categoryType - */ - onManageTemplateCategory(e) { - if (e) { - e.preventDefault(); - e.stopPropagation(); - } - - const compFactory = this.resolver.resolveComponentFactory(ComponentTemplateManageComponent); - const compRef = compFactory.create(this.injector); - const modalConfig = compRef.instance.modalConfig as any; - modalConfig.buttons = compRef.instance.modalFooter; - - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe(() => { - this.getDisplayedControls(); - modalPanel.close(); - - }); - } - - /** - * 刷新模板 - * @param e - */ - onRefreshTemplateCategory(e) { - if (e) { - e.preventDefault(); - e.stopPropagation(); - } - - this.getDisplayedControls(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-category.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-category.service.ts deleted file mode 100644 index 6c1cc9fefcb0dcc1c168174b160f1f1266c5d89a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/control-category.service.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { DgControl, FormBasicService } from '@farris/designer-services'; -import { DesignerEnvType } from '@farris/designer-services'; -import { of, Subject } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -/** - * 控件工具箱:获取现有控件 - */ -export class ControlCategoryService { - /** 保存工具箱中的模板类控件 */ - static componentTemplates = []; - - constructor(private http: HttpClient, private formBasicService: FormBasicService) { } - - /** - * farris控件+组件模板 - */ - public getControlCategoryList() { - const subject = new Subject(); - - let controlCategoryList = []; - - this.getControlsInControlBox().pipe( - switchMap(farrisControls => { - controlCategoryList = controlCategoryList.concat(farrisControls); - return this.getCustomTemplates(); - }) - ).subscribe((portletCategory) => { - if (portletCategory) { - controlCategoryList.push(portletCategory); - } - - subject.next(controlCategoryList); - }); - - return subject; - } - - /** - * 获取控件列表,仅farris控件 - * @param type 控件类型 - */ - private getControlsInControlBox() { - const subject = new Subject(); - this.http.get(`assets/form/controlList.json?version=202307`).subscribe(data => { - if (data && data.length) { - // 配置控件图标 - data.forEach(category => { - category.items.forEach(item => { - const icon = DgControl[item.type] && DgControl[item.type].icon; - if (item.icon && item.iconSource) { - item.controlIconClass = 'mt-2 mb-1 f-icon ' + item.icon; - } else { - item.controlIconClass = 'fd-i-Family fd_pc-' + (item.icon || icon); - } - - if (item.feature) { - item.feature = JSON.stringify(item.feature); - } - }); - }); - - subject.next(data); - } - }); - - return subject; - } - - /** - * 获取定制模板 - */ - private getCustomTemplates() { - if (this.formBasicService && this.formBasicService.envType !== DesignerEnvType.noCode) { - return of(null); - } - const subject = new Subject(); - const headerOption = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - } - const url = '/api/dev/formdesigner/v1.0/field-template'; - - this.http.get(url, headerOption).subscribe((templates: any[]) => { - if (!templates || !templates.length) { - subject.next(null); - return; - } - const items = []; - ControlCategoryService.componentTemplates = []; - templates.forEach((template: any) => { - if (template && template.templateDom && template.templateSource && template.bindingFields) { - const templateDom = JSON.parse(template.templateDom); - - const templateSource = JSON.parse(template.templateSource); - const templateControlType = templateSource.templateIconType; - - const bindingFields = JSON.parse(template.bindingFields); - - const item = { - id: template.id, - name: template.name, - type: templateControlType, - category: 'componentTemplate', - controlIconClass: '', - templateDom: templateDom, - fieldType: template.templateCategory === 'input' && bindingFields && bindingFields.length ? bindingFields[0].type.name : null, - templateCategory: template.templateCategory, - bindingFields - } - const icon = DgControl[templateControlType] && DgControl[templateControlType].icon; - item.controlIconClass = 'fd-i-Family fd_pc-' + (icon || templateControlType); - - ControlCategoryService.componentTemplates.push(item); - - items.push(item); - } - - }); - - const controlBoxGroup = { - name: '组件模板', - type: 'componentTemplate', - items: items - }; - subject.next(controlBoxGroup); - }, error => { - subject.next(null); - }); - - return subject; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-box/index.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-box/index.ts deleted file mode 100644 index d88bc2fb7b3e6b66b742a1a09b770cfc768c0b18..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-box/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ControlBoxComponent } from './control-box.component'; - -export { ControlCategoryService } from './control-category.service'; diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.css b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.css deleted file mode 100644 index 46354249b57ecc799346a7c089fc45bbfe1c6835..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.css +++ /dev/null @@ -1,17 +0,0 @@ -:host::ng-deep .controlIcon { - font-size: 20px; - color: #7d86ab !important; - margin-right: 9px !important; - margin-top: -4px; -} - -:host::ng-deep .controlIcon.f-icon { - font-size: 18px; -} - -:host { - display: block; - height: 100%; - color: #212529 !important; - background: #fcfdff; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.html b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.html deleted file mode 100644 index ad03c163f4bbe37a76431977c1d50a6f098b04a8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.html +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.ts deleted file mode 100644 index 59831849d97d9ba090b50027590d16cfadfdf8e7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/control-tree.component.ts +++ /dev/null @@ -1,253 +0,0 @@ -import { - Component, Input, OnChanges, ViewChild, OnInit, EventEmitter, Output, - SimpleChanges, NgZone, ChangeDetectionStrategy, ChangeDetectorRef, Injector -} from '@angular/core'; -import { ContextMenuItem } from '@farris/ui-context-menu'; -import { NotifyService } from '@farris/ui-notify'; -import { RowNode, TreeTableComponent } from '@farris/ui-treetable'; -import { RefreshFormService, FormBasicService } from '@farris/designer-services'; -import { of } from 'rxjs'; -import { IdeTreeComponent } from '../ide-tree/ide-tree.component'; -import { ControlTreeNode } from './entity/tree-node'; -import { MoveUpDownContextMenuManger } from './service/move-context-menu.service'; -import { ControlTreeBuilderService } from './service/tree-builder.service'; -import { CollapsedControlTreeBuilderService } from './service/collapsed-tree-builder.service'; - -@Component({ - selector: 'control-tree', - templateUrl: './control-tree.component.html', - styleUrls: ['./control-tree.component.css'], - providers: [ControlTreeBuilderService, CollapsedControlTreeBuilderService], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class ControlTreeComponent implements OnInit, OnChanges { - /** 表单元数据JSON */ - @Input() domJson: any; - - - /** 变更选中节点 */ - @Output() changeControlTreeNode = new EventEmitter(); - - /** 右键菜单前事件的回调方法,用于收集控件的菜单配置 */ - @Input() beforeShowContextMenu: (rowNode: RowNode, parentRowNode?: RowNode) => { menus: ContextMenuItem[], show: boolean }; - - /** ide-tree实例 */ - @ViewChild('ideTree') private ideTree: IdeTreeComponent; - - /** 树json数据 */ - treeNodes: ControlTreeNode[] = []; - - /** 当前选中节点 */ - currentSelectedNode: ControlTreeNode; - - /** 当前选中节点id */ - currentSelectedNodeId: string; - - /** 展示控件属性类型:expanded完整控件树/ collapsed合并收折的控件树 */ - showType = 'collapsed'; - - /** 收折的树json数据 */ - collpasedTreeNodes: ControlTreeNode[] = []; - - /** 展开的树json数据 */ - ideTreeNodes: ControlTreeNode[] = []; - - selectedOutsideNodeId: string; - constructor( - private controlTreeService: ControlTreeBuilderService, - private collapsedControlTreeService: CollapsedControlTreeBuilderService, - private ngZone: NgZone, - private notifyService: NotifyService, - private refreshFormService: RefreshFormService, - private cdr: ChangeDetectorRef) { } - - ngOnInit() { - this.refreshControlTree(); - } - - ngOnChanges(changes: SimpleChanges) { - if (this.ideTree.tb) { - this.ideTree.tb.isExpanded = false; - } - - // 变更DOM结构,触发控件树刷新 - if (changes.domJson) { - this.refreshControlTree(); - } - } - - - /** - * 刷新控件树 - */ - refreshControlTree(selectedNodeId?: string) { - if (!this.domJson) { - return; - } - - this.ideTreeNodes = this.controlTreeService.mappingFormDataToTree(this.domJson); - this.collapsedControlTreeService.plainCompleteControlTreeNodes = this.controlTreeService.plainControlTreeNodes; - this.collpasedTreeNodes = this.collapsedControlTreeService.mappingFormDataToTree(this.domJson); - - this.treeNodes = this.ideTree.tb.isExpanded ? this.ideTreeNodes : this.collpasedTreeNodes; - - - // 当前选中的是控件树上不存在的节点 - if (this.selectedOutsideNodeId) { - this.changeControlTreeNode.next({ - outsideNodeId: this.selectedOutsideNodeId - }); - } else { - // 当前选中的是控件树上存在的节点:触发重新定位 - this.currentSelectedNodeId = selectedNodeId || this.getSelectedNodeId(); - this.triggerTreeFocus(this.currentSelectedNodeId); - } - - this.cdr.detectChanges(); - - - } - - - - /** - * 点击树节点 - * @param $event 树节点点击事件 - */ - onSelectNodeChange($event) { - this.currentSelectedNode = $event.node; - this.selectedOutsideNodeId = null; - - // 有强依赖关系的控件,需要传递依赖的控件节点。例如TabPage 依赖Tab - if (this.currentSelectedNode.dependentParentControl) { - this.changeControlTreeNode.next({ - treeNode: $event.node, - dependentTreeNode: $event.node.parent - }); - } else { - this.changeControlTreeNode.next({ - treeNode: $event.node - }); - } - - - } - - /** - * 由外部触发控件树节点的点击事件 - * @param elementId 节点id - */ - triggerTreeFocus(elementId: string) { - const serializedValues = this.ideTree.tt.serializedValue; - if (serializedValues.length && !serializedValues.find(n => n.id === elementId)) { - // 若没有找到节点,说明可能是点击的控件树上没有显示的节点,例如列表的列或者被收折起来的容器节点 - this.selectedOutsideNodeId = elementId; - - } else { - this.selectedOutsideNodeId = null; - - // 从代码编辑器切换到可视化设计器的场景里会重复触发一个节点的点击事件,为了显示控件边框和并更新属性面板,此处先取消选中,再选中一次 - if (elementId === this.currentSelectedNodeId) { - this.ideTree.tt.unSelectNode(this.currentSelectedNodeId); - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - // 判断选中节点是否还存在 - const index = this.controlTreeService.plainControlTreeNodes.findIndex(data => data.data.id === this.currentSelectedNodeId); - if (index > -1) { - this.ideTree.tt.selectNode(this.currentSelectedNodeId); - } else { - this.changeControlTreeNode.next({ - treeNode: null - }); - } - }); - }); - } else { - this.currentSelectedNodeId = elementId; - } - } - - - this.cdr.detectChanges(); - } - - /** - * 更新控件树节点的数据,常用于修改控件名称后同步控件树 - * @param nodeId 节点id - * @param data 需要更新的数据 - */ - updateControlTreeNodeData(nodeId: string, data: { [key: string]: string }) { - this.ideTree.tt.update(nodeId, data); - - this.cdr.detectChanges(); - } - - /** - * 获取应该选中的节点id - */ - private getSelectedNodeId() { - if (this.currentSelectedNode) { - return this.currentSelectedNode.id; - } - if (this.treeNodes.length) { - return this.treeNodes[0].data.id; - } - } - - /** - * 展示右键菜单前事件 - * @param e 菜单参数 - */ - onBeforeShowContextMenu = (e: { data: RowNode }) => { - let config; - const rowNode = e.data as RowNode; - const treeNode = rowNode.node as ControlTreeNode; - // 有强依赖关系的控件,需要传递依赖的控件节点。例如TabPage 依赖Tab - if (treeNode.dependentParentControl) { - config = this.beforeShowContextMenu(rowNode, rowNode.parentRowNode); - } else { - config = this.beforeShowContextMenu(rowNode); - } - - - config = this.addMoveUpAndDownMenu(rowNode, config); - - return of(config); - } - - /** - * 追加上移下移菜单 - * @param rowNode 右键点击的树表行 - * @param config 菜单配置 - * @returns 菜单配置 - */ - private addMoveUpAndDownMenu(rowNode: RowNode, config: { show: boolean, menus: ContextMenuItem[] }) { - const moveUpDownMenuManager = new MoveUpDownContextMenuManger(this.notifyService, this.refreshFormService); - moveUpDownMenuManager.plainCompleteControlTreeNodes = this.controlTreeService.plainControlTreeNodes; - - const moveUpDownMenu = moveUpDownMenuManager.setMoveMenuConfig(rowNode); - - let menus = config.menus as any[]; - if (moveUpDownMenu.length) { - if (menus.length) { - menus = menus.concat(['-']); - } - menus = menus.concat(moveUpDownMenu); - - config.menus = menus; - config.show = true; - } - - return config; - } - - onNodeExpandedAll() { - this.treeNodes = this.ideTreeNodes; - this.refreshControlTree(); - } - onNodeCollapsedAll() { - this.treeNodes = this.collpasedTreeNodes; - this.refreshControlTree(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/entity/tree-node.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/entity/tree-node.ts deleted file mode 100644 index cdb1a2316114fb1d89263baace0699385926c4db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/entity/tree-node.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { TreeNode } from '@farris/ui-treetable'; - - -/** - * 控件树节点 - */ -export class ControlTreeNode implements TreeNode { - id?: string; - - data: { - /** 节点标识 */ - id: string, - - /** 节点名称 */ - name?: string, - - /** 隶属组件节点标识 */ - componentId?: string - }; - - /** - * 在节点中保存的表单原始DOM对象(注意:在收折起来的控件树上rawElement并非原始DOM对象,所以针对这个属性的修改不会映射到DOM中。) - */ - rawElement?: any; - /** - * 子节点集合 - */ - children?: ControlTreeNode[]; - - /** - * 节点类型,包括:组件、视图模型、控件集合、控件四种类型。 - */ - type?: ControlTreeNodeType; - - /** 是否展开 */ - expanded?: boolean; - - /** 叶子节点图标 */ - icon?: any; - - /** 节点展开图标 */ - expandedIcon?: any; - - /** 节点折叠图标 */ - collapsedIcon?: any; - - /** 树节点在其父节点下的索引号 */ - index?: number; - - /** 父节点标识 */ - parentNodeId?: string; - - /** 父节点 */ - parent?: ControlTreeNode; - - controlIcon?: string; - - hideContextMenuIcon?: boolean; - - dependentParentControl?: string; - - tips?: string; - - rawParentNodeId?: string; -} - - - -/** - * 控件树节点类型 - */ -export enum ControlTreeNodeType { - /** - * 组件节点 - */ - Component = 'Component', - - /** - * 视图模型节点 - */ - // ViewModel = 'ViewModel', - - /** - * 组件结构节点 - */ - // ControlCollection = 'ControlCollection', - - /** - * 控件节点 - */ - Control = 'Control', - - /** - * 表单顶层节点 - */ - Frame = 'Frame', - -} - - -/** - * 控件树右键菜单配置 - */ -export class ControlTreeContextMenuConfig { - public command?: string; - - public name: string; - - public controlType?: string; - - public isUnique?: boolean; - - public subMenus?: ControlTreeContextMenuConfig[]; - - public divider?: boolean; - - [propName: string]: any; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.css b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.css deleted file mode 100644 index 23bfa1025bd02eb019a80b1b78eef157334afef5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.css +++ /dev/null @@ -1,13 +0,0 @@ -:host::ng-deep .controlIcon { - font-size: 20px; - color: #7d86ab !important; - margin-right: 9px !important; - margin-top: -4px; -} - -:host { - display: block; - height: 100%; - color: #212529 !important; - background: #fcfdff; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.html b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.html deleted file mode 100644 index 6c36224c2e6c582b56e16d0fd195b58820776e14..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.html +++ /dev/null @@ -1,5 +0,0 @@ - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.ts deleted file mode 100644 index 7fd5e8a2f9705e71723b57ddec9ba05d072ba2f1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/mobile-control-tree.component.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { - Component, Input, OnChanges, ViewChild, OnInit, EventEmitter, Output, - SimpleChanges, NgZone, ChangeDetectionStrategy, ChangeDetectorRef, Injector -} from '@angular/core'; -import { ContextMenuItem } from '@farris/ui-context-menu'; -import { NotifyService } from '@farris/ui-notify'; -import { RowNode, TreeTableComponent } from '@farris/ui-treetable'; -import { RefreshFormService, FormBasicService } from '@farris/designer-services'; -import { of } from 'rxjs'; -import { IdeTreeComponent } from '../ide-tree/ide-tree.component'; -import { ControlTreeNode } from './entity/tree-node'; -import { MoveUpDownContextMenuManger } from './service/move-context-menu.service'; -import { ControlTreeBuilderService } from './service/tree-builder.service'; -import { CollapsedControlTreeBuilderService } from './service/collapsed-tree-builder.service'; - -/** - * 已废弃 - */ -@Component({ - selector: 'mobile-control-tree', - templateUrl: './mobile-control-tree.component.html', - styleUrls: ['./mobile-control-tree.component.css'], - providers: [ControlTreeBuilderService, CollapsedControlTreeBuilderService], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class MobileControlTreeComponent implements OnInit, OnChanges { - /** 表单元数据JSON */ - @Input() domJson: any; - - - /** 变更选中节点 */ - @Output() changeControlTreeNode = new EventEmitter(); - - /** 右键菜单前事件的回调方法,用于收集控件的菜单配置 */ - @Input() beforeShowContextMenu: (rowNode: RowNode, parentRowNode?: RowNode) => { menus: ContextMenuItem[], show: boolean }; - - /** ide-tree实例 */ - @ViewChild('ideTree') private ideTree: IdeTreeComponent; - - /** 树json数据 */ - treeNodes: ControlTreeNode[] = []; - - /** 当前选中节点 */ - currentSelectedNode: ControlTreeNode; - - /** 当前选中节点id */ - currentSelectedNodeId: string; - - /** 展示控件属性类型:expanded完整控件树/ collapsed合并收折的控件树 */ - showType = 'collapsed'; - - /** 收折的树json数据 */ - collpasedTreeNodes: ControlTreeNode[] = []; - - /** 展开的树json数据 */ - ideTreeNodes: ControlTreeNode[] = []; - - constructor( - private controlTreeService: ControlTreeBuilderService, - private collapsedControlTreeService: CollapsedControlTreeBuilderService, - private ngZone: NgZone, - private notifyService: NotifyService, - private refreshFormService: RefreshFormService, - private cdr: ChangeDetectorRef) { } - - ngOnInit() { - this.refreshControlTree(); - } - - ngOnChanges(changes: SimpleChanges) { - if (this.ideTree.tb) { - this.ideTree.tb.isExpanded = false; - } - - // 变更DOM结构,触发控件树刷新 - if (changes.domJson) { - this.refreshControlTree(); - } - } - - - /** - * 刷新控件树 - */ - refreshControlTree(selectedNodeId?: string) { - if (this.domJson) { - // // 重新选中节点 - // this.currentSelectedNodeId = selectedNodeId || this.getSelectedNodeId(); - - // this.triggerTreeFocus(this.currentSelectedNodeId); - this.treeNodes = this.controlTreeService.mappingFormDataToTree(this.domJson); - - // 重新选中节点 - this.currentSelectedNodeId = selectedNodeId || this.getSelectedNodeId(); - - this.triggerTreeFocus(this.currentSelectedNodeId); - - this.cdr.detectChanges(); - } - } - - - - /** - * 点击树节点 - * @param $event 树节点点击事件 - */ - onSelectNodeChange($event) { - this.currentSelectedNode = $event.node; - - // 有强依赖关系的控件,需要传递依赖的控件节点。例如TabPage 依赖Tab - if (this.currentSelectedNode.dependentParentControl) { - this.changeControlTreeNode.next({ - treeNode: $event.node, - dependentTreeNode: $event.node.parent - }); - } else { - this.changeControlTreeNode.next({ - treeNode: $event.node - }); - } - - - } - - /** - * 由外部触发控件树节点的点击事件 - * @param elementId 节点id - */ - triggerTreeFocus(elementId: string) { - - // 从代码编辑器切换到可视化设计器的场景里会重复触发一个节点的点击事件,为了显示控件边框和并更新属性面板,此处先取消选中,再选中一次 - if (elementId === this.currentSelectedNodeId) { - this.ideTree.tt.unSelectNode(this.currentSelectedNodeId); - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.ideTree.tt.selectNode(this.currentSelectedNodeId); - }); - }); - } else { - this.currentSelectedNodeId = elementId; - } - - this.cdr.detectChanges(); - } - - /** - * 更新控件树节点的数据,常用于修改控件名称后同步控件树 - * @param nodeId 节点id - * @param data 需要更新的数据 - */ - updateControlTreeNodeData(nodeId: string, data: { [key: string]: string }) { - this.ideTree.tt.update(nodeId, data); - // this.collapsedTree.tt.update(nodeId, data); - - this.cdr.detectChanges(); - } - - /** - * 获取应该选中的节点id - */ - private getSelectedNodeId() { - if (this.currentSelectedNode) { - return this.currentSelectedNode.id; - } - if (this.treeNodes.length) { - return this.treeNodes[0].data.id; - } - } - - /** - * 展示右键菜单前事件 - * @param e 菜单参数 - */ - onBeforeShowContextMenu = (e: { data: RowNode }) => { - let config; - const rowNode = e.data as RowNode; - const treeNode = rowNode.node as ControlTreeNode; - // 有强依赖关系的控件,需要传递依赖的控件节点。例如TabPage 依赖Tab - if (treeNode.dependentParentControl) { - config = this.beforeShowContextMenu(rowNode, rowNode.parentRowNode); - } else { - config = this.beforeShowContextMenu(rowNode); - } - - - config = this.addMoveUpAndDownMenu(rowNode, config); - - return of(config); - } - - /** - * 追加上移下移菜单 - * @param rowNode 右键点击的树表行 - * @param config 菜单配置 - * @returns 菜单配置 - */ - private addMoveUpAndDownMenu(rowNode: RowNode, config: { show: boolean, menus: ContextMenuItem[] }) { - const moveUpDownMenuManager = new MoveUpDownContextMenuManger(this.notifyService, this.refreshFormService); - moveUpDownMenuManager.plainCompleteControlTreeNodes = this.controlTreeService.plainControlTreeNodes; - - const moveUpDownMenu = moveUpDownMenuManager.setMoveMenuConfig(rowNode); - - let menus = config.menus as any[]; - if (moveUpDownMenu.length) { - if (menus.length) { - menus = menus.concat(['-']); - } - menus = menus.concat(moveUpDownMenu); - - config.menus = menus; - config.show = true; - } - - return config; - } - - onNodeExpandedAll() { - this.treeNodes = this.ideTreeNodes; - this.refreshControlTree(); - } - onNodeCollapsedAll() { - this.treeNodes = this.collpasedTreeNodes; - this.refreshControlTree(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/collapsed-tree-builder.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/collapsed-tree-builder.service.ts deleted file mode 100644 index 779d019956d35e62ca2f79f3492896804e89a80b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/collapsed-tree-builder.service.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DomService,DgControl,FormBasicService } from '@farris/designer-services'; -import { ControlTreeNode, ControlTreeNodeType } from '../entity/tree-node'; -import { TreeNodeMergeRuleService } from './merge-rule.service'; -import { ControlTreeNodeBuilderService } from './tree-node-builder.service'; - -@Injectable() -export class CollapsedControlTreeBuilderService { - - private mergeService: TreeNodeMergeRuleService; - private nodeBuilderService: ControlTreeNodeBuilderService; - - /** 平铺的完整的控件树数据,用来替换被克隆的rawElement */ - plainCompleteControlTreeNodes: ControlTreeNode[]; - - constructor( - private domService: DomService, - private formbasicService: FormBasicService) { - this.mergeService = new TreeNodeMergeRuleService(domService); - this.nodeBuilderService = new ControlTreeNodeBuilderService(domService); - } - - /** - * 表单对象映射为树结构 - * @param formData 表单Dg对象 - */ - public mappingFormDataToTree(domJson: any): ControlTreeNode[] { - if (!domJson) { - return; - } - // 表单顶层节点 - const frameId = this.formbasicService.formMetaBasicInfo.id; - const frameNode: ControlTreeNode = { - data: { - id: frameId, - name: '页面', - }, - rawElement: domJson, - type: ControlTreeNodeType.Frame, - children: [], - expanded: true, - index: 0, - parentNodeId: null, - hideContextMenuIcon: true, - controlIcon: 'fd-i-Family fd_pc-Module', - - }; - if (this.formbasicService.envType === 'mobileDesigner') { - const pageComponents = domJson.module.components.filter(component => component.type === 'Component' && component.componentType === 'Page'); - const pageComponentNodes = pageComponents.map(component => this.createComponentNode(component, 0, null)); - frameNode.children = pageComponentNodes; - frameNode.data.name = domJson.module.name - return [frameNode]; - } - const rootComponent = domJson.module.components[0]; - const rootComponentNode = this.createComponentNode(rootComponent, 0, null); - frameNode.children = [rootComponentNode]; - - return [frameNode]; - } - - private recursionElements(parentElement: any): ControlTreeNode[] { - const elements = parentElement.contents as any[]; - const parentNodeId = parentElement.id; - - const newComponentNodeList: ControlTreeNode[] = []; - - elements.forEach((element: any, index: number) => { - let newComponentNode: ControlTreeNode; - let nodeRefObject; - - if (element.type === 'ComponentRef') { - const childComponentNode = this.domService.getComponentById(element.component); - newComponentNode = this.createComponentNode(childComponentNode, index, parentElement); - newComponentNodeList.push(newComponentNode); - } else { - const mergedEle = this.mergeService.getMergeNode(element, parentElement); - // 获取树节点名称 - const nodeName = this.nodeBuilderService.getNodeName(element, parentElement); - const completeNode = this.plainCompleteControlTreeNodes.find(n => n.data.id === element.id); - newComponentNode = { - data: { - id: element.id, - name: nodeName, - }, - rawElement: completeNode.rawElement, - children: [], - expanded: true, - type: ControlTreeNodeType.Control, - index, - parentNodeId, - rawParentNodeId: completeNode.parentNodeId, - controlIcon: this.nodeBuilderService.getControlIconClass(element), - dependentParentControl: DgControl[element.type] && DgControl[element.type].dependentParentControl - }; - if (mergedEle) { - nodeRefObject = this.recursionElements(mergedEle); - if (nodeRefObject.length) { - newComponentNode.children = nodeRefObject; - } - } else if (element.contents) { - nodeRefObject = this.recursionElements(element); - if (nodeRefObject.length) { - newComponentNode.children = nodeRefObject; - } - } - - newComponentNodeList.push(newComponentNode); - - // 列表弹出编辑 - if ((DgControl.DataGrid && DgControl.DataGrid.type === element.type) && element.enableEditByCard !== 'none' && element.modalComponentId) { - const modalCmp = this.domService.getComponentById(element.modalComponentId); - if (modalCmp) { - const modalComponentNode = this.createComponentNode(modalCmp, index, parentElement); - newComponentNodeList.push(modalComponentNode); - } - - } - - } - }); - - return newComponentNodeList; - - - } - - private createComponentNode(element: any, elementIndex: number, parentElement: any): ControlTreeNode { - const parentNodeId = parentElement ? parentElement.id : null; - - const mergedEle = this.mergeService.getMergeNode(element, parentElement); - - // 组件子控件节点,默认为空数组。 - let controlsNodes: ControlTreeNode[] = []; - if (mergedEle) { - controlsNodes = this.recursionElements(mergedEle); - } else if (element.contents) { - controlsNodes = this.recursionElements(element); - } - - - // 获取树节点名称 - const nodeName = this.nodeBuilderService.getNodeName(element); - - // 构造组件节点 - const completeNode = this.plainCompleteControlTreeNodes.find(n => n.data.id === element.id); - const newComponentNode: ControlTreeNode = { - data: { - id: element.id, - name: nodeName, - }, - rawElement: completeNode ? completeNode.rawElement : element, - children: controlsNodes, - expanded: true, - type: ControlTreeNodeType.Component, - index: elementIndex, - parentNodeId, - rawParentNodeId: completeNode ? completeNode.parentNodeId : null, - controlIcon: this.nodeBuilderService.getControlIconClass(element) - }; - return newComponentNode; - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/merge-rule.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/merge-rule.service.ts deleted file mode 100644 index b5cef733906f616fd335f976058a87e920c6bb80..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/merge-rule.service.ts +++ /dev/null @@ -1,456 +0,0 @@ -import { DgControl, DomService, FormComponentType } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; - -export class TreeNodeMergeRuleService { - - constructor(private domService: DomService) { } - - public getMergeNode(element: any, parentElement: any) { - const elementType = element.type; - switch (elementType) { - case DgControl.ContentContainer.type: { - return this.checkContentContainerMerge(element, parentElement); - } - case DgControl.Component.type: { - return this.checkComponentMerge(element, parentElement); - } - case DgControl.SplitterPane && DgControl.SplitterPane.type: { - return this.mergeChildContainerNodes(element); - } - } - } - /** - * 容器收折规则 - * @param element 容器元素 - * @param parentElement 容器父元素 - */ - private checkContentContainerMerge(element: any, parentElement: any) { - - // 控件本身样式 - const cmpClass = element.appearance && element.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 页头 - if (cmpClassList.includes('f-page-header')) { - return this.mergeHeaderNodes(element); - } - // 卡片主区域 - if (cmpClassList.includes('f-page-main')) { - element = this.mergeLikeCardContainerNode(element); - - // 卡片模板的子表区域 - return this.mergeChildContainerNodes(element); - } - - // 带导航的列表中右侧根容器 - if (cmpClassList.includes('f-page-content-main')) { - return this.mergeRootLayoutInContainer(element); - } - - // 滚动监听容器 - if (cmpClassList.includes('f-scrollspy-content')) { - element = this.mergeLikeCardContainerNode(element); - - // 卡片模板的子表区域 - return this.mergeChildContainerNodes(element); - } - } - /** - * 隐藏卡片模板中主区域节点(like-card-container层级) - * f-page-main------f-struct-like-card-----[xxx] 合并为f-page-main-----[xxx] - * @param pageMainEle - */ - private mergeLikeCardContainerNode(pageMainEle: any) { - // 若只有一个like-card-container层级,则隐藏掉 - if (!pageMainEle.contents || pageMainEle.contents.length !== 1) { - return pageMainEle; - } - const likeCardEle = pageMainEle.contents[0]; - const likeCardEleCls = likeCardEle && likeCardEle.appearance && likeCardEle.appearance.class || ''; - if (!likeCardEleCls.split(' ').includes('f-struct-like-card')) { - return pageMainEle; - } - - // 将like-card-container的子级节点放到like-card-container的父级节点下面 - const clonedpageMainEle = cloneDeep(pageMainEle); - clonedpageMainEle.contents = likeCardEle.contents || []; - - return clonedpageMainEle; - } - - /** - * 带导航的列表中隐藏右侧根容器(f-page的容器节点) - * @param rootLayoutEle 根容器元素 - * @param parentElement 根容器的父容器 - */ - private mergeRootLayoutInContainer(rootLayoutEleParent: any) { - if (!rootLayoutEleParent.contents || rootLayoutEleParent.contents.length !== 1) { - return; - } - const rootLayoutEle = rootLayoutEleParent.contents[0]; - const rootLayoutEleCls = rootLayoutEle && rootLayoutEle.appearance && rootLayoutEle.appearance.class || ''; - if (!rootLayoutEleCls.split(' ').includes('f-page')) { - return rootLayoutEleParent; - } - // 将f-page的子级节点放到f-page的父级节点下面 - const clonedrootLayoutEleParentEle = cloneDeep(rootLayoutEleParent); - clonedrootLayoutEleParentEle.contents = rootLayoutEle.contents || []; - - return clonedrootLayoutEleParentEle; - } - /** - * 页头: - * f-page-header:{ - * f-page-header-base:{ - * f-title:{ - * HTMLTemplate - * }, - * ... - * }, - * ... - * } - * 合并为: - * f-page-header:{ - * HTMLTemplate, - * ..., - * ... - * } - * @param pageHeaderEle 页头元素 - */ - private mergeHeaderNodes(pageHeaderEle: any) { - if (!pageHeaderEle.contents || !pageHeaderEle.contents.length) { - return; - } - const pageHeaderBaseEle = pageHeaderEle.contents[0]; - const pageHeaderBaseCls = pageHeaderEle && pageHeaderBaseEle.appearance && pageHeaderBaseEle.appearance.class || ''; - if (!pageHeaderBaseCls.includes('f-page-header-base')) { - return; - } - - if (!pageHeaderBaseEle.contents || !pageHeaderBaseEle.contents.length) { - return; - } - const titleEle = pageHeaderBaseEle.contents[0]; - const titleEleCls = titleEle && titleEle.appearance && titleEle.appearance.class || ''; - if (!titleEleCls.includes('f-title') || !titleEle.contents || !titleEle.contents.length) { - return; - } - // 模板容器 - const htmlTemplateEle = titleEle.contents[0]; - if (htmlTemplateEle.type !== DgControl.HtmlTemplate.type) { - return; - } - const clonedPageHeaderEle = cloneDeep(pageHeaderEle); - clonedPageHeaderEle.contents = []; - - // 前置任务(筛选条) - const listFilter = this.domService.selectNode(pageHeaderEle, item => item.type === DgControl.ListFilter.type); - - // 条件全部满足 - clonedPageHeaderEle.contents.push(htmlTemplateEle); - pageHeaderBaseEle.contents.forEach((c, index) => { - if (index === 0) { - return; - } - // 提取筛选条容器下的筛选条 - const cls = c && c.appearance && c.appearance.class || ''; - if (listFilter && cls.includes('f-filter-container')) { - clonedPageHeaderEle.contents.push(listFilter); - } else { - clonedPageHeaderEle.contents.push(c); - } - }); - pageHeaderEle.contents.forEach((c, index) => { - if (index === 0) { - return; - } - clonedPageHeaderEle.contents.push(c); - }); - return clonedPageHeaderEle; - - } - - - /** - * 检查是否满足子表三层结构:Container---Section---Tab - * @param childContaninerEle 子表区域容器节点 - */ - private checkIsChildContainerNodes(childContaninerEle: any) { - if (!childContaninerEle.contents || childContaninerEle.contents.length !== 1) { - return false; - } - const sectionEle = childContaninerEle.contents[0]; - const sectionEleCls = sectionEle && sectionEle.appearance && sectionEle.appearance.class || ''; - if (!sectionEleCls.includes('f-section-tabs')) { - return false; - } - - if (!sectionEle.contents || sectionEle.contents.length !== 1) { - return false; - } - const tabEle = sectionEle.contents[0]; - const tabEleCls = tabEle && tabEle.appearance && tabEle.appearance.class || ''; - if (!tabEleCls.includes('f-component-tabs')) { - return false; - } - // 条件全部满足 - return true; - - - - } - private mergeChildContainerNodes(parentEle: any) { - if (!parentEle.contents || !parentEle.contents.length) { - return; - } - - const clonedParentEle = cloneDeep(parentEle); - - // 查找子表区域节点 - parentEle.contents.forEach((item, index) => { - if (!item.type === DgControl.ContentContainer.type) { - return; - } - const itemCls = item.appearance && item.appearance.class || ''; - const itemClsList = itemCls.split(' '); - if (!itemClsList.includes('f-struct-wrapper')) { - return false; - } - const result = this.checkIsChildContainerNodes(item); - if (result) { - const tabEle = this.domService.selectNode(item, child => child.type === DgControl.Tab.type); - clonedParentEle.contents.splice(index, 1, tabEle); - } - }); - - - return clonedParentEle; - } - /** - * 组件Component收折 - * @param cmpEle Component节点 - * @param parentElement 父级元素 - */ - private checkComponentMerge(cmpEle: any, parentElement: any) { - // 控件本身样式 - const cmpClass = cmpEle.appearance && cmpEle.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - - switch (cmpEle.componentType) { - case FormComponentType.dataGrid: case FormComponentType.appointmentCalendar: { - // 列表DataGrid组件合并层级 - if (cmpClassList.includes('f-struct-is-subgrid')) { - return this.mergeChildDataGridComponentNodes(cmpEle); - } - // 列表DataGrid组件合并层级 - if (cmpClassList.includes('f-struct-wrapper')) { - return this.mergeMainDataGridComponentNodes(cmpEle); - } - break; - } - case FormComponentType.Frame: { - return this.mergeRootLayoutInRootComponent(cmpEle); - } - case FormComponentType.table: { - return this.mergeTableComponentNodes(cmpEle); - } - default: { - if (cmpEle.componentType.startsWith('form')) { - return this.mergeFormComponentNode(cmpEle); - } - } - } - - - - } - - /** - * 收折根组件下的根容器 - * @param cmpEle 根组件Component节点 - */ - private mergeRootLayoutInRootComponent(cmpEle: any) { - if (!cmpEle.contents || cmpEle.contents.length !== 1) { - return; - } - const rootLayoutEle = cmpEle.contents[0]; - const rootLayoutEleCls = rootLayoutEle && rootLayoutEle.appearance && rootLayoutEle.appearance.class || ''; - if (!rootLayoutEleCls.split(' ').includes('f-page')) { - return cmpEle; - } - // 将f-page的子级节点放到f-page的父级节点下面 - const clonedCmpEle = cloneDeep(cmpEle); - clonedCmpEle.contents = cloneDeep(rootLayoutEle.contents || []); - - - - this.mergeQuerySchemeSectionNode(clonedCmpEle); - return clonedCmpEle; - } - /** - * 列表Component-ContentContainer-DataGrid 三层 合并为Component-DataGrid两层 - * @param cmpEle Component节点 - */ - private mergeChildDataGridComponentNodes(cmpEle: any) { - // 控件本身样式 - const cmpClass = cmpEle.appearance && cmpEle.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 子级节点 - const childContents = cmpEle.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 孙子节点 - const grandChildContents = firstChildContent.contents || []; - const firstGrandChildContent = grandChildContents.length ? grandChildContents[0] : null; - const firstGrandChildClass = firstGrandChildContent && firstGrandChildContent.appearance ? firstGrandChildContent.appearance.class : ''; - const firstGrandChildClassList = firstGrandChildClass ? firstGrandChildClass.split(' ') : []; - - - if (!cmpClassList.includes('f-struct-is-subgrid')) { - return; - } - - if (!firstChildContent || firstChildContent.type !== DgControl.ContentContainer.type || !firstChildClassList.includes('f-grid-is-sub')) { - return; - } - - if (!firstGrandChildContent || firstGrandChildContent.type !== DgControl.DataGrid.type || !firstGrandChildClassList.includes('f-component-grid')) { - return; - } - - // 条件全部满足 - const clonedcmpEle = cloneDeep(cmpEle); - clonedcmpEle.contents = []; - - clonedcmpEle.contents.push(firstGrandChildContent); - - return clonedcmpEle; - } - - /** - * 列表Component-Section-DataGrid 三层 合并为Component-DataGrid两层。 - * 树表Component-Section-TreeGrid 三层,合并为Component-TreeGrid两层。 - * @param cmpEle Component节点 - */ - private mergeMainDataGridComponentNodes(cmpEle: any) { - - // 控件本身样式 - const cmpClass = cmpEle.appearance && cmpEle.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 子级节点 - const childContents = cmpEle.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 孙子节点 - const grandChildContents = firstChildContent.contents || []; - const firstGrandChildContent = grandChildContents.length ? grandChildContents[0] : null; - const firstGrandChildClass = firstGrandChildContent && firstGrandChildContent.appearance ? firstGrandChildContent.appearance.class : ''; - const firstGrandChildClassList = firstGrandChildClass ? firstGrandChildClass.split(' ') : []; - - - if (!cmpClassList.includes('f-struct-wrapper')) { - return; - } - - if (!firstChildContent || firstChildContent.type !== DgControl.Section.type || !(firstChildClassList.includes('f-section-grid') || firstChildClassList.includes('f-section-treegrid'))) { - return; - } - if (!firstGrandChildContent) { - return; - } - const DataGridEle = this.domService.selectNode(firstChildContent, item => [DgControl.DataGrid.type, DgControl.TreeGrid.type, DgControl.AppointmentCalendar.type].includes(item.type)); - if (!DataGridEle) { - return; - } - const listFilterEle = this.domService.selectNode(firstChildContent, item => item.type === (DgControl.ListFilter && DgControl.ListFilter.type)); - - const clonedcmpEle = cloneDeep(cmpEle); - clonedcmpEle.contents = []; - - // 包含筛选条:将筛选条和DataGrid提取出来 - if (listFilterEle) { - if (grandChildContents.length === 2 && firstGrandChildClassList.includes('f-filter-container')) { - clonedcmpEle.contents.push(listFilterEle); - clonedcmpEle.contents.push(DataGridEle); - return clonedcmpEle; - } else { - return; - } - } else { - // 不包含筛选条:只将DataGrid提取出来 - if (grandChildContents.length === 1 && - (firstGrandChildClassList.includes('f-component-grid') || firstGrandChildClassList.includes('f-component-treetable') || firstGrandChildClassList.includes('f-component-appointment-calendar'))) { - clonedcmpEle.contents.push(DataGridEle); - return clonedcmpEle; - } - } - } - - /** - * 卡片Component-Section-Form三层,合并为Component-Form两层 - * @param cmpEle Component节点 - */ - private mergeFormComponentNode(cmpEle: any) { - - } - - /** - * 隐藏筛选方案容器。Section---QueryScheme - * @param rootLayoutEle s - */ - private mergeQuerySchemeSectionNode(parentEle: any) { - if (!parentEle.contents || !parentEle.contents.length) { - return parentEle; - } - - const querySchemeSectionNodeIndex = parentEle.contents.findIndex(item => { - if (item.type !== DgControl.Section.type) { - return false; - } - const cls = item.appearance && item.appearance.class || ''; - if (cls.split(' ').includes('f-section-scheme') && item.contents && item.contents.length === 1) { - if (item.contents[0].type === DgControl.QueryScheme.type) { - return true; - } - } - }); - if (querySchemeSectionNodeIndex > -1) { - const querySchemeSectionNode = parentEle.contents[querySchemeSectionNodeIndex]; - - parentEle.contents.splice(querySchemeSectionNodeIndex, 1, querySchemeSectionNode.contents[0]); - } - return parentEle; - - } - - /** - * table类型组件收折:Component----Section----Form----Table 收折为Component----Table - * @param cmpEle 组件节点 - */ - private mergeTableComponentNodes(cmpEle: any) { - // 控件本身样式 - const cmpClass = cmpEle.appearance && cmpEle.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - if (!cmpClassList.includes('f-struct-wrapper')) { - return; - } - - const tableEle = this.domService.selectNode(cmpEle, item => item.type === (DgControl.Table && DgControl.Table.type)); - if (!tableEle) { - return cmpEle; - } - - const clonedcmpEle = cloneDeep(cmpEle); - clonedcmpEle.contents = [tableEle]; - - return clonedcmpEle; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/move-context-menu.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/move-context-menu.service.ts deleted file mode 100644 index 069da266bd420619a66e6e78608be90e7635ded8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/move-context-menu.service.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { ContextMenuItem } from '@farris/ui-context-menu'; -import { RowNode } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { RefreshFormService, DgControl } from '@farris/designer-services'; -import { ControlTreeNode } from '../entity/tree-node'; - -/** - * 控件树上移下移菜单 - */ -export class MoveUpDownContextMenuManger { - - /** 平铺的完整的控件树数据,用来替换被克隆的rawElement */ - plainCompleteControlTreeNodes: ControlTreeNode[]; - - parentRowNode: ControlTreeNode; - - constructor( - private notifyService: NotifyService, - private refreshFormService: RefreshFormService) { } - - /** - * 配置上移下移菜单。 - */ - setMoveMenuConfig(rowNode: RowNode): ContextMenuItem[] { - - this.getRealParentNode(rowNode); - - if (!this.parentRowNode) { - return []; - } - - // 1、支持卡片区域内的输入控件和分组控件 - if (this.parentRowNode.rawElement && this.parentRowNode.rawElement.type === DgControl.Form.type) { - return this.confirmSetMoveMenuConfig(rowNode); - } - if (this.parentRowNode.rawElement && this.parentRowNode.rawElement.type === DgControl.FieldSet.type) { - return this.confirmSetMoveMenuConfig(rowNode); - } - - // 2、支持卡片组件 - if (rowNode.node.type === DgControl.Component.type) { - const treeNode = rowNode.node as ControlTreeNode; - const cmpType = treeNode.rawElement && treeNode.rawElement.componentType; - if (cmpType && cmpType.includes('form')) { - return this.confirmSetMoveMenuConfig(rowNode); - } - } - return []; - - } - /** - * 获取右键节点真正的父节点。对于收折后的控件树,直接在rowNode上取parent是不准的。 - * @param rowNode 右键的节点 - */ - private getRealParentNode(rowNode: RowNode) { - - const rowData = rowNode.node as ControlTreeNode; - - // 收折后的控件树,获取父节点要通过rawParentNodeId - if (rowData.rawParentNodeId) { - this.parentRowNode = this.plainCompleteControlTreeNodes.find(n => n.data.id === rowData.rawParentNodeId); - } else { - // 完整的控件树 - this.parentRowNode = rowNode.parent as ControlTreeNode; - } - - } - - private confirmSetMoveMenuConfig(rowNode: RowNode) { - let moveUpDisable = () => false; - let moveDownDisable = () => false; - - let index; - if (this.parentRowNode) { - index = this.parentRowNode.children.findIndex(c => c.data.id === rowNode.id); - } - - if (index === 0) { - moveUpDisable = () => true; - } - if (index === this.parentRowNode.children.length - 1) { - moveDownDisable = () => true; - } - // 若是卡片组件节点,需要判断当前是不是最后一个卡片组件 - if (rowNode.node.type === DgControl.Component.type) { - const cardCmps = this.parentRowNode.children.filter(c => c.rawElement && c.rawElement.type === DgControl.Component.type && c.rawElement.componentType && c.rawElement.componentType.startsWith('form')); - const cardCmpIndex = cardCmps.findIndex(c => c.data.id === rowNode.id); - - if (cardCmpIndex === 0) { - moveUpDisable = () => true; - } - if (cardCmpIndex === cardCmps.length - 1) { - moveDownDisable = () => true; - } - - } - return [ - { - id: 'moveUp', - title: '上移', - disable: moveUpDisable, - handle: (e) => this.moveUpDownMenuHandle(e) - }, - { - id: 'moveDown', - title: '下移', - disable: moveDownDisable, - handle: (e) => this.moveUpDownMenuHandle(e) - } - ]; - } - - - /** - * 控件节点上移下移点击事件 - */ - public moveUpDownMenuHandle(e: { data: RowNode, menu: ContextMenuItem }) { - const menu = e.menu; - if (!this.parentRowNode) { - return; - } - - const rowNode = e.data.node as ControlTreeNode; - const rightMenuIndex = this.parentRowNode.children.findIndex(c => c.data.id === rowNode.id); - const parentDomElement = this.parentRowNode.rawElement; - - - switch (menu.id) { - case 'moveUp': { - if (rightMenuIndex === 0) { - this.notifyService.warning('已经是第一个节点'); - return; - } - - const rightMenuDomElement = parentDomElement.contents[rightMenuIndex]; - parentDomElement.contents.splice(rightMenuIndex, 1); - parentDomElement.contents.splice(rightMenuIndex - 1, 0, rightMenuDomElement); - - - this.refreshFormService.refreshFormDesigner.next(parentDomElement.id); - - - break; - } - case 'moveDown': { - const isLastNode = rightMenuIndex === this.parentRowNode.children.length - 1; - - if (isLastNode) { - this.notifyService.warning('已经是最后一个节点'); - return; - } - - const rightMenuDomElement = parentDomElement.contents[rightMenuIndex]; - parentDomElement.contents.splice(rightMenuIndex, 1); - parentDomElement.contents.splice(rightMenuIndex + 1, 0, rightMenuDomElement); - - this.refreshFormService.refreshFormDesigner.next(parentDomElement.id); - break; - } - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-builder.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-builder.service.ts deleted file mode 100644 index c93becd361eaa07f320b9a074871d23e559fef89..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-builder.service.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DomService, DgControl, FormBasicService } from '@farris/designer-services'; -import { ControlTreeNode, ControlTreeNodeType } from '../entity/tree-node'; -import { ControlTreeNodeBuilderService } from './tree-node-builder.service'; - -@Injectable() -export class ControlTreeBuilderService { - - private nodeBuilderService: ControlTreeNodeBuilderService; - - /** 控件树节点-平铺 */ - plainControlTreeNodes = []; - - constructor( - private domService: DomService, - private formbasicService: FormBasicService) { - this.nodeBuilderService = new ControlTreeNodeBuilderService(domService); - } - - /** - * 表单对象映射为树结构 - * @param formData 表单Dg对象 - */ - public mappingFormDataToTree(domJson: any): ControlTreeNode[] { - if (!domJson) { - return; - } - this.plainControlTreeNodes = []; - - // 表单顶层节点 - const frameId = this.formbasicService.formMetaBasicInfo.id; - const frameNode: ControlTreeNode = { - data: { - id: frameId, - name: '页面', - }, - rawElement: domJson, - type: ControlTreeNodeType.Frame, - children: [], - expanded: true, - index: 0, - parentNodeId: null, - hideContextMenuIcon: true, - controlIcon: 'fd-i-Family fd_pc-Module', - tips: '页面[' + frameId + ']' - - }; - if (this.formbasicService.envType === 'mobileDesigner') { - const pageComponents = domJson.module.components.filter(component => component.type === 'Component' && component.componentType === 'Page'); - const pageComponentNodes = pageComponents.map(component => this.createComponentNode(component, 0, null, false)); - frameNode.children = pageComponentNodes; - this.plainControlTreeNodes.push(frameNode); - frameNode.data.name = domJson.module.name - return [frameNode]; - } - const rootComponent = domJson.module.components[0]; - const rootComponentNode = this.createComponentNode(rootComponent, 0, null); - frameNode.children = [rootComponentNode]; - - this.plainControlTreeNodes.push(frameNode); - - return [frameNode]; - } - - private recursionElements(parentElement: any): ControlTreeNode[] { - const elements = parentElement.contents as any[]; - const parentNodeId = parentElement.id; - - const newComponentNodeList: ControlTreeNode[] = []; - - elements.forEach((element: any, index: number) => { - let newComponentNode: ControlTreeNode; - let nodeRefObject; - - if (element.type === 'ComponentRef') { - const childComponentNode = this.domService.getComponentById(element.component); - newComponentNode = this.createComponentNode(childComponentNode, index, parentNodeId); - newComponentNodeList.push(newComponentNode); - - this.plainControlTreeNodes.push(newComponentNode); - } else { - // 获取树节点名称 - const nodeName = this.nodeBuilderService.getNodeName(element, parentElement); - newComponentNode = { - data: { - id: element.id, - name: nodeName, - }, - rawElement: element, - children: [], - expanded: true, - type: ControlTreeNodeType.Control, - index, - parentNodeId, - controlIcon: this.nodeBuilderService.getControlIconClass(element), - dependentParentControl: DgControl[element.type] && DgControl[element.type].dependentParentControl, - tips: nodeName + '[' + element.id + ']' - }; - if (element.contents) { - nodeRefObject = this.recursionElements(element); - if (nodeRefObject.length) { - newComponentNode.children = nodeRefObject; - } - } - - newComponentNodeList.push(newComponentNode); - this.plainControlTreeNodes.push(newComponentNode); - - // 列表弹出编辑 - if ((DgControl.DataGrid && DgControl.DataGrid.type === element.type) && element.enableEditByCard !== 'none' && element.modalComponentId) { - const modalCmp = this.domService.getComponentById(element.modalComponentId); - if (modalCmp) { - const modalComponentNode = this.createComponentNode(modalCmp, index, parentNodeId); - newComponentNodeList.push(modalComponentNode); - - this.plainControlTreeNodes.push(newComponentNode); - } - - } - - } - }); - - return newComponentNodeList; - - - } - private createComponentNode(element: any, elementIndex: number, parentNodeId: string, expanded = true): ControlTreeNode { - // 组件子控件节点,默认为空数组。 - let controlsNodes: ControlTreeNode[] = []; - // 如果组件下包含子元素,构造子控件节点数组。 - if (element.contents) { - controlsNodes = this.recursionElements(element); - } - // 获取树节点名称(mock,待集成控件元数据后删除) - const nodeName = this.nodeBuilderService.getNodeName(element); - - // 构造组件节点 - const newComponentNode: ControlTreeNode = { - data: { - id: element.id, - name: nodeName, - }, - rawElement: element, - children: controlsNodes, - expanded: expanded, - type: ControlTreeNodeType.Component, - index: elementIndex, - parentNodeId, - controlIcon: this.nodeBuilderService.getControlIconClass(element), - tips: nodeName + '[' + element.id + ']' - }; - return newComponentNode; - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-node-builder.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-node-builder.service.ts deleted file mode 100644 index f3c5707ead798ebb0e68b101ee083baf7d83040b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/control-tree/service/tree-node-builder.service.ts +++ /dev/null @@ -1,158 +0,0 @@ - -import { FormComponentType, DgControl, DomService, FormComponent } from '@farris/designer-services'; - -export class ControlTreeNodeBuilderService { - - constructor(private domService: DomService) { } - /** - * 获取树节点图标 - * @param element 表单DOM元素 - */ - getControlIconClass(element: any) { - const controlType = element && element.type || ''; - - // 多视图项节点使用各自的icon - if (DgControl.MultiViewItem && controlType === DgControl.MultiViewItem.type && element.icon) { - return element.icon; - } - - // 其余控件使用farris control图标库里的icon - const iconType = DgControl[controlType] && DgControl[controlType].icon; - if (!iconType) { - return; - } - - return 'fd-i-Family fd_pc-' + iconType; - - } - /** - * 获取树节点名称 - * @param element 表单DOM元素 - */ - public getNodeName(element: any, parentElement?: any) { - - const name = element.text || element.name || element.title || element.caption || element.mainTitle; - - if (name && typeof (name) === 'string') { - return name.trim(); - } - - switch (element.type) { - case DgControl.Component.type: - return this.getComponentShowName(element); - - case DgControl.ContentContainer.type: { - return this.getContentContainerTitle(element); - } - case DgControl.SplitterPane && DgControl.SplitterPane.type: { - return this.getSplitterPaneTitle(element, parentElement); - } - default: { - // 显示控件类型名称 - return (DgControl[element.type] && DgControl[element.type].name) || element.id; - } - } - - - } - - private getSplitterPaneTitle(splitterPaneElement: any, splitterElement: any) { - const panes = splitterElement.contents; - if (panes.length !== 2) { - return DgControl[splitterPaneElement.type] && DgControl[splitterPaneElement.type].name; - } - const firstPane = panes[0]; - const firstPaneClass = (firstPane.appearance && firstPane.appearance.class) || ''; - // 是否水平布局 - const isHorizontal = firstPane.resizeHandlers === 'e' && firstPaneClass.includes('f-col-w'); - - // 第一个区域 - if (splitterPaneElement.id === firstPane.id) { - return isHorizontal ? '左侧区域' : '上方区域'; - - } else { - // 第二个区域 - return isHorizontal ? '右侧区域' : '下方区域'; - } - } - - private getContentContainerTitle(element: any) { - if (element.isLikeCardContainer) { - return '区块'; - } - const elementClass = element.appearance && element.appearance.class || ''; - const elementClassList = elementClass.split(' '); - if (element.id === 'page-header' && elementClass && elementClass === 'f-page-header') { - return '页头'; - } - if (elementClassList.includes('f-page-header-base')) { - return '页头容器'; - } - if (elementClassList.includes('f-page-header-extend')) { - return '页头扩展容器'; - } - if (elementClassList.includes('f-title')) { - return '标题容器'; - } - if (elementClassList.includes('f-page')) { - return '根容器'; - } - if (elementClassList.includes('f-page-main')) { - return '内容区域'; - } - if (elementClassList.includes('f-scrollspy-content') && element.isScrollspyContainer) { - return '滚动监听容器'; - } - if (elementClassList.includes('f-grid-is-sub')) { - return '表格容器'; - } - - if (elementClassList.includes('f-filter-container')) { - return '筛选条容器'; - } - return '容器'; - } - - /** - * 获取组件展示名称 - */ - private getComponentShowName(element: any) { - const componentType = element.componentType; - - switch (componentType) { - case FormComponentType.Frame: { - return '根组件'; - } - case FormComponentType.dataGrid: case FormComponentType.table: { - return this.checkDataGridComponentName(element); - } - case FormComponentType.attachmentPanel: { - return '附件组件'; - } - case FormComponentType.listView: case 'ListView': { - return '列表视图组件'; - } - case FormComponentType.modalFrame: { - return '弹窗页面'; - } - case FormComponentType.appointmentCalendar: { - return '预约日历组件'; - } - default: { - if (componentType.startsWith('form')) { - return '卡片组件'; - } - } - } - - return '组件'; - } - - private checkDataGridComponentName(element: any) { - const treeGrid = this.domService.selectNode(element, (item) => item.type === (DgControl.TreeGrid && DgControl.TreeGrid.type)); - if (treeGrid) { - return '树表格组件'; - } - return '表格组件'; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.css b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.css deleted file mode 100644 index 2410014887b40ad7081f0009e8c287d878e81968..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.css +++ /dev/null @@ -1,7 +0,0 @@ -:host .leftTree>>>.filter-row .search-fields { - display: none; -} - -:host .leftTree>>>.filter-row .search-text { - margin-right: .625rem; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.html b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.html deleted file mode 100644 index df672bb14eda80cf11b2691a38fe134e1d670d09..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.html +++ /dev/null @@ -1,75 +0,0 @@ -
-
- - 未选择 - -
- - - - - - - {{rowData['name']}} [{{ rowData['bindingField'] }}] - - - - -
-
-
-
- - - - -
- -
-
-
- 已选择 -
- 分组 - 解除分组 -
-
-
- -
-
-
-
- - - - -
- - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.ts deleted file mode 100644 index a308569b145cac588a139b3e551519e8bad76335..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-manager.component.ts +++ /dev/null @@ -1,416 +0,0 @@ - -import { - Component, OnInit, Input, ViewChild, Output, EventEmitter, - TemplateRef, AfterViewInit, Injector, ChangeDetectorRef, HostBinding, NgZone, OnDestroy -} from '@angular/core'; -import { TreeTableComponent, TreeNode } from '@farris/ui-treetable'; -import { FieldTreeTableService } from './field-treetable/field-treetable.service'; -import { NotifyService } from '@farris/ui-notify'; -import { FieldTreeTableComponent } from './field-treetable/field-treetable.component'; -import { constants, ContainerOptions, smoothDnD } from '@farris/smooth-dnd'; -import { DomService, DesignViewModelService, FormBasicService, SchemaService, RefreshFormService, DgControl } from '@farris/designer-services'; - - -/** - * 维护Form控件下的输入控件。TODO:暂时屏蔽运行时定制新增的be字段 - */ -@Component({ - selector: 'app-field-manager', - templateUrl: './field-manager.component.html', - styleUrls: ['./field-manager.component.css'], - providers: [FieldTreeTableService] -}) - -export class FieldManagerComponent implements OnInit, AfterViewInit, OnDestroy { - /** 卡片所属的视图模型id */ - @Input() viewModelId; - - /** 卡片所属的Form 控件id,用于点击确定后重绘卡片区域 */ - @Input() formId; - - /** 点击取消,关闭窗口 */ - @Output() closeModal = new EventEmitter(); - - /** 点击确定,关闭窗口 */ - @Output() confirmModal = new EventEmitter(); - - - /** 页脚按钮 */ - @ViewChild('modalFooter') modalFooter: TemplateRef; - - idField = 'id'; - - @ViewChild('leftTree') leftTree: TreeTableComponent; - leftTreeData: TreeNode[] = []; - - @ViewChild(FieldTreeTableComponent) rightCmp: FieldTreeTableComponent; - viewModelFieldChanges = {}; - - - /** 记录初始字段ID列表 */ - initRightFieldIds = []; - - /** 组件是否支持分组:只有form类型组件支持分组 */ - canGroup = true; - noDataMoveMessage = '请选择要移动的数据。'; - - dgVMServ: DesignViewModelService; - domServ: DomService; - fieldTreeServ: FieldTreeTableService; - - /** 运行时定制追加的字段节点(be或vo中新追加,但是表单schema中没有的) */ - rtAddedTreeNodes = []; - - /** 当前卡片中是否允许再次添加其他卡片中已使用的字段。若不允许,则置灰处理 */ - disableFieldsInOtherForm = true; - - /** 在其他卡片中已使用的字段id */ - fieldIdsInOhterForms = []; - - constructor( - private notifyServ: NotifyService, - private injector: Injector, - private ngZone: NgZone, - private cd: ChangeDetectorRef, - private formBasicServ: FormBasicService, - // private rtSchemaServ: RtSchemaService, - private schemaServ: SchemaService, - private refreshFormService: RefreshFormService) { - - this.dgVMServ = this.injector.get(DesignViewModelService); - this.domServ = this.injector.get(DomService); - this.fieldTreeServ = this.injector.get(FieldTreeTableService); - } - - @HostBinding('class') - cls = 'row f-multi-select h-100 p-2'; - ngOnInit() { - this.getFieldIdsInOtherForms(); - this.initData(); - this.subscribeViewModelChanged(); - } - ngAfterViewInit() { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.makeSourceTreeDraggable(); - }); - }); - this.rightCmp.addFieldDropped.subscribe(() => { - this.leftTree.clearAll(); - - this.cd.detectChanges(); - }); - } - ngOnDestroy() { - if (this['leftTreeContainer']) { - this['leftTreeContainer'].dispose(); - } - } - - initData() { - const cmp = this.domServ.getComponentByVMId(this.viewModelId); - - this.leftTreeData = this.dgVMServ.getAllFields2TreeByVMId(this.viewModelId); - - // 运行时定制追加字段 - // if (this.formBasicServ.envType === DesignerEnvType.runtimeCustom && this.rtSchemaServ.addedTreeNodes) { - // const entityInfo = this.schemaServ.getTableInfoByViewModelId(this.viewModelId); - // if (entityInfo) { - // this.rtAddedTreeNodes = this.rtSchemaServ.addedTreeNodes[entityInfo.id]; - // if (this.rtAddedTreeNodes) { - // this.leftTreeData = this.leftTreeData.concat(this.rtAddedTreeNodes); - // } - // } - // } - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.initRightFieldIds = this.rightCmp.treeTable.serializedValue.map(v => v.node.data.id); - }); - }); - - - this.canGroup = cmp.componentType.startsWith('form') || this.formBasicServ.envType === 'mobileDesigner'; - } - /** - * 获取在其他卡片中已使用的字段id,这些字段在当前卡片中不允许再添加 - */ - private getFieldIdsInOtherForms() { - this.fieldIdsInOhterForms = []; - const currentVM = this.domServ.getViewModelById(this.viewModelId); - const currentCmp = this.domServ.getComponentByVMId(this.viewModelId); - /** 当前组件的类型 */ - let currentComponentType = currentCmp.componentType; - - // 根组件和table组件内的输入控件与form内不能重复 - if (currentCmp.componentType === 'Frame' || currentCmp.componentType === 'table' || (currentCmp.componentType && currentCmp.componentType.startsWith('form'))) { - currentComponentType = 'form'; - } - this.domServ.viewmodels.forEach(vm => { - - // 绑定同一个实体 - if (vm.id === this.viewModelId || !vm.fields || !vm.fields.length || vm.bindTo !== currentVM.bindTo) { - return; - } - const cmpNode = this.domServ.getComponentByVMId(vm.id); - - let componentType = cmpNode.componentType; - if (componentType === 'Frame' || componentType === 'table' || (componentType && componentType.startsWith('form'))) { - componentType = 'form'; - } - - if (currentComponentType === componentType && !this.checkIfInSidebar(cmpNode)) { - const fieldIds = vm.fields.map(f => f.id); - this.fieldIdsInOhterForms = this.fieldIdsInOhterForms.concat(fieldIds); - } - - }); - - - } - /** - * 监听树组件的字段变化,组合viewModel字段schema的增量 - */ - subscribeViewModelChanged() { - this.rightCmp.viewModelChanged.subscribe(changes => { - Object.assign(this.viewModelFieldChanges, changes); - }); - } - - - canChecked(item: any) { - - - const data = item.data; - - if (item.selectable !== undefined && !item.selectable) { - return false; - } - const rightTree = this.rightCmp.treeTable; - const rightTreeData = this.rightCmp.treeData; - const isInOtherForm = this.fieldIdsInOhterForms.find(id => id === data[this.idField]); - if (this.disableFieldsInOtherForm && isInOtherForm) { - return false; - } - if (!rightTreeData || rightTreeData.length === 0) { - return true; - } else { - const serializedData = rightTree.serializedValue.map(s => s.node.data); - return serializedData.findIndex(c => c[this.idField] === data[this.idField]) === -1; - } - - - } - - /** - * 新增字段 - */ - moveToRight() { - const leftChecks = this.leftTree.checkeds; - if (!leftChecks || leftChecks.length === 0) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - // const fields = leftChecks.map(c => c.data); - this.rightCmp.addFields(leftChecks); - - this.leftTree.clearAll(); - } - - /** - * 全部新增 - */ - moveAllToRight() { - const leftChecks = []; - this.leftTree.serializedValue.forEach(rn => { - if (rn.node.selectable) { - if (this.canChecked(rn.node)) { - leftChecks.push(rn.node); - } - } - }); - - this.rightCmp.addFields(leftChecks); - - this.leftTree.clearAll(); - } - - /** - * 删除字段 - */ - moveToLeft() { - this.rightCmp.removeFields(); - - } - /** - * 全部删除 - */ - moveAllToLeft() { - this.rightCmp.removeAllFields(); - } - - - /** - * 置顶 - */ - moveTop() { - this.rightCmp.moveTop(); - - } - /** - * 上移 - */ - moveUp() { - this.rightCmp.moveUp(); - } - /** - * 下移 - */ - moveDown() { - this.rightCmp.moveDown(); - } - - /** - * 置底 - */ - moveBottom() { - this.rightCmp.moveBottom(); - } - - addGroup() { - this.rightCmp.addGroup(); - } - removeGroup() { - this.rightCmp.removeGroup(); - } - - clickCancel() { - this.closeModal.emit(); - } - - clickOK() { - this.fieldTreeServ.refreshDOM(this.viewModelId, this.rightCmp.treeData); - - const dgVM = this.dgVMServ.getDgViewModel(this.viewModelId); - - - - const addedFields = []; - const currentFieldIds = []; - // 增加字段 - this.rightCmp.treeTable.serializedValue.forEach(row => { - const node = row.node as TreeNode | any; - if (node.isGroupNode) { - return; - } - if (!this.initRightFieldIds.includes(node.data.id)) { - - dgVM.addField(node.data); - - // 运行时定制新同步的be或vo字段 - // addedFields.push(node.data); 可以在ui中处理新增的字段 - // if (this.formBasicServ.envType === DesignerEnvType.runtimeCustom && this.rtAddedTreeNodes) { - // const addedFieldId = node.rtRelateSchemaField ? node.rtRelateSchemaField.id : node.id; - // const treeNode = this.rtAddedTreeNodes.find(n => n.id === addedFieldId); - - // if (treeNode) { - // this.rtSchemaServ.createNewSchemaField(this.viewModelId, treeNode.data); - // } - // } - } - currentFieldIds.push(node.data.id); - }); - - // 删除字段 - const deletedFieldIds = this.initRightFieldIds.filter(id => !currentFieldIds.includes(id)); - dgVM.removeField(deletedFieldIds); - - - - // 修改字段 - const fieldIdList = Object.keys(this.viewModelFieldChanges); - if (fieldIdList.length > 0) { - - fieldIdList.forEach(fieldId => { - const vmChange = this.viewModelFieldChanges[fieldId]; - dgVM.changeField(fieldId, vmChange); - }); - } - // 刷新设计器页面 - this.refreshFormService.refreshFormDesigner.next(this.formId); - - // 关闭窗口 - this.confirmModal.emit({ - addedFields, - deletedFieldIds - }); - } - - - /** - * 配置左侧树可拖拽 - */ - private makeSourceTreeDraggable() { - const tbodyList = this.leftTree.el.nativeElement.getElementsByTagName('tbody'); - if (!tbodyList.length) { - return; - } - const containerElement = tbodyList[0]; - const containerOptions: ContainerOptions = { - behaviour: 'copy', - getGhostParent: this.getGhostParent, - groupName: 'selectColumn', - nonDragAreaSelector: '[ng-reflect-select-row-disabled=true]', - getChildPayload: this.getSourceTreeChildPayload.bind(this) - }; - // tslint:disable-next-line:no-string-literal - this['leftTreeContainer'] = smoothDnD(containerElement, containerOptions); - const children = containerElement.children; - - Array.prototype.forEach.call(children, (item: HTMLElement) => { - item.classList.add(constants.wrapperClass); - }); - } - - - private getGhostParent() { - return window.document.body; - } - - private getSourceTreeChildPayload(index: number) { - return this.leftTree.serializedValue[index].node.data; - } - - /** - * 左侧树搜索 - */ - searchField($event) { - if ($event) { - const { field, value } = $event; - this.leftTree.searchHandle.search(field, value); - } else { - this.leftTree.searchHandle.search('*', ''); - } - // 重新触发左侧树的拖拽渲染 - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.makeSourceTreeDraggable(); - }); - }); - } - - - /** - * 检查卡片组件是否在侧边栏中,在侧边栏中的字段可以与非侧边栏中的字段重复。 - */ - private checkIfInSidebar(cmpNode: any) { - - const sidebar = this.domServ.selectNode(this.domServ.components[0], - item => item.type === DgControl.Sidebar && DgControl.Sidebar.type && item.contents && item.contents.length && - item.contents.find(child => child.type === DgControl.ComponentRef.type && child.component === cmpNode.id)); - if (sidebar) { - return true; - } - return false; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-tree-builder.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-tree-builder.service.ts deleted file mode 100644 index 11061602f42072a1789bc5bccc5a1bca7509155a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-tree-builder.service.ts +++ /dev/null @@ -1,433 +0,0 @@ -import { DesignViewModelService, DesignViewModelField, FormBindingType, DgControl, DomService, FormComponentType, FormBasicService } from '@farris/designer-services'; - -/** - * 构造视图模型字段及分组树列表数据源 - */ -export class FieldTreeBuilder { - controlsInfo: any = {}; - viewModelId: string; - - constructor( - public schemaDOMMapping: any, - public dgVMServ: DesignViewModelService, - public domServ: DomService, - private formBasicServ: FormBasicService) { } - - /** - * 构造视图模型字段及分组树列表数据源 - * @param viewModelId 视图模型标识 - */ - public buildFieldTreeData(viewModelId: string): FieldTreeNode[] { - const dgViewModel = this.dgVMServ.getDgViewModel(viewModelId); - if (!dgViewModel) { - return []; - } - const component = this.domServ.getComponentByVMId(viewModelId); - if (!component) { - return []; - } - this.adaptOldListViewComponentType(component); - this.viewModelId = viewModelId; - const componentId = component.id; - const componentType = component.componentType; - const dgViewModelFields = dgViewModel.fields; - if (componentType === 'dataGrid' || componentType.startsWith('form') || this.formBasicServ.envType === 'mobileDesigner') { - const controls = this.getAllControlsInComponents(component); - this.controlsInfo.controls = controls; - return this.buildFieldTreeDataByControls(dgViewModelFields, controls, componentId, componentType); - } else { - this.controlsInfo = {}; - return this.buildFieldTreeDataByEntityFields(dgViewModelFields, componentId, componentType); - } - } - /** - * 获取指定组件实例内的所有UI控件 - * @param component 组件实例 - */ - private getAllControlsInComponents(component: any): any[] { - const controls = []; - const dataCollectionControl = this.getFormLayoutInCmp(component.contents); - this.controlsInfo.formLayout = dataCollectionControl; - if (dataCollectionControl) { - const elementsIndataCollectionControl = dataCollectionControl.fields || dataCollectionControl.contents; - this.getAllControlsInLayout(elementsIndataCollectionControl, controls); - } - return controls; - } - /** - * 根据组件内控件顺序构造包含分组的视图模型字段树所需要的数据源 - * @param dgViewModelFields 视图模型字段集合 - * @param controls 视图模型对应组件内的UI控件集合 - * @param componentId 组件标识 - * @param componentType 组件类型 - */ - private buildFieldTreeDataByControls( - dgViewModelFields: DesignViewModelField[], - controls: any, - componentId: string, - componentType: string): FieldTreeNode[] { - const treeData: FieldTreeNode[] = []; - const groupData: Map = new Map(); - const fieldsetList = []; - controls.forEach(control => { - // 跳过分组节点 - if (control.type === DgControl.FieldSet.type) { - fieldsetList.push(control); - return; - } - const treeNode = this.buildFieldTreeNodeFromControl(control, dgViewModelFields, componentId, componentType); - if (!treeNode) { - return; - } - if (treeNode.isInGroupNode) { - if (!groupData.has(treeNode.groupId)) { - const newGroupNode = this.buildFieldTreeGroupNodeWithBindingEntityField(control, dgViewModelFields, fieldsetList); - groupData.set(treeNode.groupId, newGroupNode); - treeData.push(newGroupNode); - } - const groupNode = groupData.get(treeNode.groupId); - groupNode.children.push(treeNode); - } else { - treeData.push(treeNode); - } - }); - return treeData; - } - /** - * 构造视图模型字段树所需的数据源。 - * @param dgViewModelFields 视图模型字段集合 - * @param componentId 组件标识 - * @param componentType 组件类型 - */ - private buildFieldTreeDataByEntityFields( - dgViewModelFields: DesignViewModelField[], - componentId: string, - componentType: string - ) { - const treeData: FieldTreeNode[] = []; - if (dgViewModelFields && dgViewModelFields.length) { - dgViewModelFields.forEach(viewModelField => { - const treeNode = this.buildFieldTreeNodeFromViewModelField(viewModelField, componentId, componentType); - if (treeNode) { - treeData.push(treeNode); - } - }); - } - return treeData; - } - - /** - * 适配ListView组件的类型属性:旧的模板里componentType写成了dataGrid,需要修改为ListView - * @param component 组件实例 - */ - private adaptOldListViewComponentType(component: any) { - if (component.componentType === 'dataGrid') { - const dataCollectionControl = this.getFormLayoutInCmp(component.contents); - if (dataCollectionControl.type === DgControl.ListView.type) { - component.componentType = FormComponentType.listView; - } - } - } - - /** - * 由视图模型字段元素构造树节点 - * @param viewModelFieldElement 视图模型字段元素 - * @param componentId 组件标识 - * @param componentType 组件类型 - */ - private buildFieldTreeNodeFromViewModelField( - viewModelFieldElement: DesignViewModelField, - componentId: string, - componentType: string - ): FieldTreeNode { - const { groupId } = viewModelFieldElement; - const rowData = viewModelFieldElement; - const isRemoved = viewModelFieldElement.isSchemaRemoved; - const canChangeControlType = !viewModelFieldElement.isSchemaRemoved; - const isComplexField = viewModelFieldElement.$type === 'ComplexField'; - const isInGroupNode = !!viewModelFieldElement.groupId; - const fieldTreeNode = { - canChangeControlType, - children: [], - componentId, - componentType, - control: null, - data: rowData, - expanded: false, - groupId, - isBindVariable: false, - isComplexField, - isGroupNode: false, - isInGroupNode, - isNoBinding: false, - isRemoved, - nodeType: 'field' - }; - return fieldTreeNode; - } - /** - * 由UI控件元素及视图模型字段集合构造树节点 - * @param control UI控件元素 - * @param dgViewModelFields 视图模型字段集合 - * @param componentId 组件标识 - * @param componentType 组件类型 - */ - private buildFieldTreeNodeFromControl( - control: any, - dgViewModelFields: DesignViewModelField[], - componentId: string, - componentType: string - ): FieldTreeNode { - let treeNode: FieldTreeNode; - if (!control.binding) { - treeNode = this.buildFieldTreeNodeWithoutControlBinding(control); - } else if (control.binding.type === FormBindingType.Variable) { - treeNode = this.buildFieldTreeNodeWithBindingVariable(control); - } else { - treeNode = this.buildFieldTreeNodeWithBindingEntityField(control, dgViewModelFields, componentId, componentType); - } - return treeNode; - } - /** - * 构造仅有控件,没有绑定视图模型字段的节点 - * @param control UI控件元素 - */ - private buildFieldTreeNodeWithoutControlBinding(control: any): FieldTreeNode { - const controlName = this.schemaDOMMapping.getControlName(control.type) || control.type; - return { - canChangeControlType: false, - children: [], - componentId: '', - componentType: '', - control, - data: { id: control.id, name: control[controlName] }, - groupId: '', - expanded: false, - isBindVariable: false, - isComplexField: false, - isGroupNode: false, - isInGroupNode: false, - isNoBinding: true, - isRemoved: false, - nodeType: '' - }; - } - /** - * 构造绑定了视图模型变量的字段节点 - * @param control UI控件元素 - */ - private buildFieldTreeNodeWithBindingVariable(control: any): FieldTreeNode { - const controlName = this.schemaDOMMapping.getControlName(control.type) || control.type; - const bindingFieldId = control.binding.field; - const variable = this.domServ.getVariableById(bindingFieldId); - const viewModelFieldElement = this.domServ.getViewModelFieldById(this.viewModelId, bindingFieldId); - - const groupId = viewModelFieldElement && viewModelFieldElement.groupId; - return { - canChangeControlType: false, - children: [], - componentId: '', - componentType: '', - control, - data: { - id: bindingFieldId, - name: control[controlName], - code: control.binding.fullPath || control.binding.path, - controlType: control.type, - type: variable && variable.type, - category: variable && variable.category - }, - groupId, - expanded: false, - isBindVariable: true, - isComplexField: false, - isInGroupNode: !!groupId, - isGroupNode: false, - isNoBinding: false, - isRemoved: false, - nodeType: '' - }; - } - /** - * 构造绑定了视图模型字段的树节点 - * @param control UI控件元素 - * @param dgViewModelFields 视图模型字段集合 - * @param componentId 组件标识 - * @param componentType 组件类型 - */ - private buildFieldTreeNodeWithBindingEntityField( - control: any, - dgViewModelFields: DesignViewModelField[], - componentId: string, - componentType: string - ): FieldTreeNode { - const controlName = this.schemaDOMMapping.getControlName(control.type) || control.type; - const bindingFieldId = control.binding.field; - const viewModelFieldElement = dgViewModelFields.find(field => field.id === bindingFieldId); - if (!viewModelFieldElement) { - return null; - } - const { groupId, groupName } = viewModelFieldElement; - const rowData = viewModelFieldElement.isSchemaRemoved ? - { id: bindingFieldId, name: control[controlName] } : viewModelFieldElement; - const isRemoved = viewModelFieldElement.isSchemaRemoved; - const canChangeControlType = !viewModelFieldElement.isSchemaRemoved; - const isComplexField = viewModelFieldElement.$type === 'ComplexField'; - const fieldTreeNode = { - canChangeControlType, - children: [], - componentId, - componentType, - control, - data: rowData, - expanded: false, - groupId, - isBindVariable: false, - isComplexField, - isGroupNode: false, - isInGroupNode: !!groupId, - isNoBinding: false, - isRemoved, - nodeType: 'field' - }; - return fieldTreeNode; - } - /** - * 构造字段分组节点 - * @param control UI控件元素 - * @param dgViewModelFields 视图模型字段集合 - * @param fieldsetList FieldSet元素集合 - */ - private buildFieldTreeGroupNodeWithBindingEntityField( - control: any, - dgViewModelFields: DesignViewModelField[], - fieldsetList: any): FieldTreeNode { - const bindingFieldId = control.binding.field; - - // let isRemoved = false; - // let canChangeControlType = false; - // let isComplexField = false; - let groupId; - let groupName; - if (control.binding.type === FormBindingType.Form) { - const viewModelFieldElement = dgViewModelFields.find(field => field.id === bindingFieldId); - if (!viewModelFieldElement) { - return null; - } - // isRemoved = viewModelFieldElement.isSchemaRemoved; - // canChangeControlType = !viewModelFieldElement.isSchemaRemoved; - // isComplexField = viewModelFieldElement.$type === 'ComplexField'; - groupId = viewModelFieldElement.groupId; - groupName = viewModelFieldElement.groupName; - } else { - const viewModelVariableElement = this.domServ.getViewModelFieldById(this.viewModelId, bindingFieldId); - if (!viewModelVariableElement) { - return null; - } - groupId = viewModelVariableElement.groupId; - groupName = viewModelVariableElement.groupName; - } - const fieldSetControl = fieldsetList.find(fieldSet => fieldSet.id === groupId); - return { - canChangeControlType: false, - children: [], - componentId: '', - componentType: '', - control: fieldSetControl, - data: { id: groupId, name: groupName }, - groupId, - expanded: true, - isBindVariable: false, - isComplexField: false, - isGroupNode: true, - isInGroupNode: false, - isNoBinding: false, - isRemoved: false, - nodeType: 'group' - }; - } - /** - * 获取视图模型字段标识集合 - * @param viewModelId 视图模型标识 - */ - public getFieldIdList(viewModelId: string): string[] { - const dgViewModel = this.dgVMServ.getDgViewModel(viewModelId); - if (!dgViewModel) { - return []; - } - const dgViewModelFields = dgViewModel.fields; - const fieldIdList = dgViewModelFields.map(viewModelElementField => viewModelElementField.id); - return fieldIdList; - } - - /** - * 获取组件内的基础组件父节点 - * Form、DataGrid、TreeGrid - * @param contents 容器 - */ - getFormLayoutInCmp(contents: any[]) { - if (!contents) { - return {}; - } - for (const element of contents) { - if ((DgControl.DataGrid && DgControl.DataGrid.type === element.type) || (DgControl.TreeGrid && DgControl.TreeGrid.type === element.type) || - element.type === DgControl.Form.type || - element.type === DgControl.ListView.type) { - return element; - - } - if (element.contents) { // 容器组件 - const result = this.getFormLayoutInCmp(element.contents); - if (result) { - return result; - } - } - - } - return null; - } - /** - * 获取组件中绑定字段/变量的所有控件 - * @param contents 组件内容 - */ - getAllControlsInLayout(contents, controls) { - if (!contents) { - return; - } - for (const element of contents) { - - // 分组节点 - if (element.type === DgControl.FieldSet.type) { - controls.push(element); - } - - if (element.contents) { // 容器 - this.getAllControlsInLayout(element.contents, controls); - } else { - controls.push(element); - } - } - - } -} - -/** - * 视图模型字段及分组树列表数据源实体 - */ -export interface FieldTreeNode { - canChangeControlType: boolean; - children: FieldTreeNode[]; - componentId: string; - componentType: string; - control: any; - data: any; - expanded: boolean; - groupId: string; - isBindVariable: boolean; - isComplexField: boolean; - isGroupNode: boolean; - isInGroupNode: boolean; - isNoBinding: boolean; - isRemoved: boolean; - nodeType: string; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.css b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.css deleted file mode 100644 index 4fcbcd528a3a4096087435768c7a03a6dc36660b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.css +++ /dev/null @@ -1,4 +0,0 @@ -:host .targetTreetable>>>table tbody>tr:last-child { - margin-bottom: 20px; - -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.html b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.html deleted file mode 100644 index b0ae4f9349585008547fbfb673b11211f8795803..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - {{rowData['name']}} {{getBindingFieldInfo(rowNode)}} - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.ts deleted file mode 100644 index e18fa4ac934feb62bcbd0f66e3a9f1a8d2858005..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.component.ts +++ /dev/null @@ -1,723 +0,0 @@ -import { Component, OnInit, ViewChild, Input, Output, EventEmitter, HostBinding, NgZone, AfterViewInit, OnDestroy } from '@angular/core'; -import { TreeTableComponent, TreeNode } from '@farris/ui-treetable'; -import { FieldTreeTableService } from './field-treetable.service'; -import { NotifyService } from '@farris/ui-notify'; -import { cloneDeep } from 'lodash-es'; -import { constants, ContainerOptions, DropResult, smoothDnD } from '@farris/smooth-dnd'; -import { DomService, DesignViewModelService, DgControl, FormBasicService, DesignerEnvType } from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; - - -@Component({ - selector: 'app-field-treetable', - templateUrl: './field-treetable.component.html', - styleUrls: ['./field-treetable.component.css'] -}) - -export class FieldTreeTableComponent implements OnInit, AfterViewInit, OnDestroy { - @Input() viewModelId; - - @Input() treeCols = []; - @Input() idField = 'id'; - @Output() viewModelChanged = new EventEmitter(); - // 从左至右拖拽添加字段 - @Output() addFieldDropped = new EventEmitter(); - - // @Output() selectRowEvent = new EventEmitter(); - - @HostBinding('class') - cls = 'd-block h-100 f-utils-overflow-auto'; - - @ViewChild('treeTable') treeTable: TreeTableComponent; - treeData = []; - fieldCount = 0; - selectedNode: TreeNode | any; - - noDataMoveMessage = '请选择要移动的数据。'; - noDataGroupMessage = '请选择要分组的数据。'; - noDataRemoveGroupMessage = '请选择要解除分组的数据。'; - get checkedNodes() { - return this.treeTable.checkeds; - } - - dgViewModel; - constructor( - private domServ: DomService, - private fieldTreeServ: FieldTreeTableService, - private notifyServ: NotifyService, - private dgViewModelServ: DesignViewModelService, - private idService: IdService, - private ngZone: NgZone, - private formBasicServ: FormBasicService) { - - } - ngOnInit() { - this.initData(); - this.dgViewModel = this.dgViewModelServ.getDgViewModel(this.viewModelId); - } - - ngAfterViewInit() { - this.makeTargetTreeDraggable(); - } - ngOnDestroy() { - if (this['targetTreeContainer']) { - this['targetTreeContainer'].dispose(); - } - } - initData() { - const cmp = this.domServ.getComponentByVMId(this.viewModelId); - - // this.treeData = this.fieldTreeServ.assembleFieldTreeData(cmp.viewModel); - this.treeData = this.fieldTreeServ.buildFieldTreeData(cmp.viewModel); - - - } - - /** - * 获取绑定字段展示文本 - * @param rowNode 行数据 - */ - getBindingFieldInfo(rowNode: any) { - if (rowNode.node.isRemoved) { - return '[绑定字段不存在,请手动移除控件]'; - } - if (rowNode.node.isBindVariable) { - return '[变量:' + rowNode.node.data.code + ']'; - } - if (rowNode.node.isComplexField) { - return '[请手动移除控件,添加关联字段节点]'; - } - if (rowNode.node.isNoBinding) { - return '[控件没有绑定信息]'; - } - if (rowNode.node.isGroupNode) { - return ''; - } - return '[' + rowNode.node.data.bindingField + ']'; - } - /** - * 选中行 - * @param rowNode 行数据 - */ - selectNode(rowNode: any) { - this.selectedNode = rowNode.node; - // this.selectRowEvent.emit(this.selectedNode); - } - unSelectNode(rowNode) { - this.selectedNode = null; - } - deleteFields() { - - } - - /** - * 新增字段 - * @param fields 字段 - */ - addFields(leftChecks: any[]) { - const fieldCountBeforeAdd = this.treeData.length; - const vmAdded = []; - leftChecks.forEach(checkNode => { - this.treeData.push({ data: checkNode.data, children: [], rtRelateSchemaField: checkNode.rtRelateSchemaField }); - vmAdded.push(checkNode.data); - }); - this.treeTable.loadData(this.treeData); - - // 若右侧树数据从0变成1时,tbody节点会被重绘,所以要重新配置拖拽逻辑 - if (fieldCountBeforeAdd === 0) { - this.makeTargetTreeDraggable(); - } - } - - /** - * 删除字段 - * @param fields 字段 - */ - removeFields() { - let checkeds = this.treeTable.checkeds as TreeNode[] | any[]; - if (!checkeds || checkeds.length === 0) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - checkeds = this.checkRTControl(checkeds); - if (checkeds.length === 0) { - this.treeTable.checkeds = []; - this.treeTable.loadData(this.treeData); - return; - } - const vmChanges = {}; - checkeds.forEach((element: any) => { - // 跳过分组节点 - if (element.isGroupNode) { - return; - } - // 在根节点下删除 - if (!element.parent) { - const nodeIndex = this.treeData.findIndex(node => node.data.id === element.data.id); - this.treeData.splice(nodeIndex, 1); - } else { - // 分组节点下删除 - const nodeIndex = element.parent.children.findIndex(node => node.data.id === element.data.id); - element.parent.children.splice(nodeIndex, 1); - - // 分组节点下没有字段则自动删除分组节点 - if (element.parent.children.length === 0) { - const groupId = this.treeData.findIndex(node => node.data.id === element.parent.data.id); - this.treeData.splice(groupId, 1); - } - - vmChanges[element.data.id] = { - groupId: null, - groupName: null - }; - } - // 若当前节点为行选中节点,需要清空选中行记录 - if (this.selectedNode && element.data.id === this.selectedNode.data.id) { - this.selectedNode = null; - } - }); - this.treeTable.checkeds = []; - this.treeTable.loadData(this.treeData); - if (this.selectedNode) { - // 重新选中行 - const rowNode = this.treeTable.findRowNode(this.selectedNode.data.id); - if (rowNode) { - rowNode.isSelected = true; - } - } else { - this.treeTable.clearAll(); - } - this.viewModelChanged.emit(vmChanges); - - // 若右侧树没有数据,那么treetable会重绘tbody节点,这样之前配置的拖拽逻辑就会被丢弃,所以要支持拖拽接收字段的话,就需要重新配置拖拽 - if (this.treeData.length === 0) { - this.makeTargetTreeDraggable(); - } - } - - /** - * 不允许移除基础表单控件 - * @param checkes 选中的字段 - */ - private checkRTControl(selectedNodes: TreeNode[] | any[]): TreeNode[] { - if (this.formBasicServ.envType !== DesignerEnvType.runtimeCustom) { - return selectedNodes; - } - const basicNames = []; - selectedNodes.forEach((node: any) => { - if (!node.control || node.control.type === DgControl.FieldSet.type) { - return; - } - if (!node.control.isRTControl) { - basicNames.push(node.data.name); - } - }); - selectedNodes = selectedNodes.filter((node: any) => !node.control || node.control.isRTControl); - if (basicNames.length) { - this.notifyServ.warning('【' + basicNames.join('、') + '】是基础表单控件,不允许移除。'); - } - return selectedNodes; - } - - /** - * 删除所有字段 - */ - removeAllFields() { - const isRtEnvType = this.formBasicServ.envType === DesignerEnvType.runtimeCustom; - const plainNodes = this.treeTable.serializedValue; - const plainTreeNodes = plainNodes.map(row => row.node) as TreeNode[] | any[]; - - const treeData = cloneDeep(this.treeData); - const basicNames = []; - const vmChanges = {}; - plainTreeNodes.forEach((node: any) => { - if (node.isGroupNode) { - return; - } - // 基础表单控件 - if (isRtEnvType && node.control && !node.control.isRTControl) { - basicNames.push(node.data.name); - return; - } - - // 在根节点下删除 - if (!node.parent) { - const nodeIndex = treeData.findIndex(n => node.data.id === n.data.id); - treeData.splice(nodeIndex, 1); - } else { - // 分组节点下删除 - const groupNodeIndex = treeData.findIndex(n => n.data.id === node.parent.data.id); - const groupNode = treeData[groupNodeIndex]; - const nodeIndex = groupNode.children.findIndex(n => n.data.id === node.data.id); - groupNode.children.splice(nodeIndex, 1); - - // 分组节点下没有字段则自动删除分组节点 - if (groupNode.children.length === 0) { - treeData.splice(groupNodeIndex, 1); - } - - vmChanges[node.data.id] = { - groupId: null, - groupName: null - }; - } - }); - - if (basicNames.length) { - this.notifyServ.warning('【' + basicNames.join('、') + '】是基础表单控件,不允许移除。'); - } - this.treeData = treeData; - this.treeTable.loadData(treeData); - this.treeTable.clearAll(); - this.selectedNode = null; - - this.viewModelChanged.emit(vmChanges); - - // 若右侧树没有数据,那么treetable会重绘tbody节点,这样之前配置的拖拽逻辑就会被丢弃,所以要支持拖拽接收字段的话,就需要重新配置拖拽 - if (treeData.length === 0) { - this.makeTargetTreeDraggable(); - } - - } - /** - * 置顶 - */ - moveTop() { - if (!this.selectedNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const curEle = this.selectedNode; - const parentNode = curEle.parent; - const parentData = parentNode ? parentNode.children : this.treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === curEle.data.id); - // 1、顶级节点 ====> 不动 - if (index < 1 && !parentNode) { - return; - } - const vmChanges = {}; - parentData.splice(index, 1); - this.treeData.splice(0, 0, curEle); - - // 2、分组节点内的节点 - if (parentNode && parentNode.isGroupNode) { - curEle.parent = null; - vmChanges[curEle.id] = { - groupId: null, - groupName: null - }; - // 分组下没有控件了==>移除分组 - if (parentNode.children.length === 0) { - const groupIndex = this.treeData.findIndex(node => node.data.id === parentNode.data.id); - this.treeData.splice(groupIndex, 1); - } - } - - this.treeTable.loadData(this.treeData); - - this.viewModelChanged.emit(vmChanges); - } - - /** - * 上移 - */ - moveUp() { - - if (!this.selectedNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const curEle = this.selectedNode; - const parentNode = curEle.parent; - const parentData = parentNode ? parentNode.children : this.treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === curEle.data.id); - // 1、顶级节点 ====> 不动 - if (index < 1 && !parentNode) { - return; - } - const vmChanges = {}; - // 2、分组节点内的第一个节点 ===> 移出分组 - if (index < 1 && parentNode && parentNode.isGroupNode) { - parentData.splice(0, 1); - const parentIndex = this.treeData.findIndex(node => node.data.id === parentNode.data.id); - curEle.parent = null; - this.treeData.splice(parentIndex, 0, curEle); - vmChanges[curEle.id] = { - groupId: null, - groupName: null - }; - // 分组下没有字段了: 删除分组 - if (parentData.length === 0) { - this.treeData.splice(parentIndex + 1, 1); - } - } else { - const preEle = parentData[index - 1]; - parentData.splice(index, 1); - - if (preEle.children && preEle.children.length > 0 && !curEle.isGroupNode) { - // 3、上一个节点是分组且当前不是分组节点 ===> 移动到分组内 - curEle.parent = preEle; - preEle.children.push(curEle); - vmChanges[curEle.id] = { - groupId: preEle.data.id, - groupName: preEle.data.name - }; - } else { - // 4、同级移动 - parentData.splice(index - 1, 0, curEle); - } - } - - - this.treeTable.loadData(this.treeData); - - - this.viewModelChanged.emit(vmChanges); - } - /** - * 下移 - */ - moveDown() { - if (!this.selectedNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const curEle = this.selectedNode; - const parentNode = curEle.parent; - const parentData = parentNode ? parentNode.children : this.treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === curEle.data.id); - // 1、顶级节点的最后一个====> 不动 - if (index === parentData.length - 1 && !parentNode) { - return; - } - - const vmChanges = {}; - // 2、分组节点内的最后一个节点 ====> 移出分组 - if (index === parentData.length - 1 && parentNode && parentNode.isGroupNode) { - parentData.splice(index, 1); - curEle.parent = null; - const parentIndex = this.treeData.findIndex(node => node.data.id === parentNode.data.id); - this.treeData.splice(parentIndex + 1, 0, curEle); - vmChanges[curEle.id] = { - groupId: null, - groupName: null - }; - // 分组下没有字段了: 删除分组 - if (parentData.length === 0) { - this.treeData.splice(parentIndex, 1); - } - } else { - const nextEle = parentData[index + 1]; - - parentData.splice(index, 1); - // 3、下一个节点是分组且当前不是分组节点 ===> 移动到分组内 - if (nextEle.children && nextEle.children.length > 0 && !curEle.isGroupNode) { - nextEle.children.splice(0, 0, curEle); - curEle.parent = nextEle; - vmChanges[curEle.id] = { - groupId: nextEle.data.id, - groupName: nextEle.data.name - }; - } else { - // 4、同级移动 - parentData.splice(index + 1, 0, curEle); - } - } - - - this.treeTable.loadData(this.treeData); - - this.viewModelChanged.emit(vmChanges); - } - - /** - * 置底 - */ - moveBottom() { - if (!this.selectedNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - - const curEle = this.selectedNode; - const parentNode = curEle.parent; - const parentData = parentNode ? parentNode.children : this.treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === curEle.data.id); - - // 1、顶级节点的最后一个 ====> 不动 - if (index === parentData.length - 1 && !parentNode) { - return; - } - parentData.splice(index, 1); - this.treeData.push(curEle); - - // 分组节点内的 - const vmChanges = {}; - if (parentNode && parentNode.isGroupNode) { - curEle.parent = null; - vmChanges[curEle.id] = { - groupId: null, - groupName: null - }; - - // 分组下没有控件了==>移除分组 - if (parentNode.children.length === 0) { - const groupIndex = this.treeData.findIndex(node => node.data.id === parentNode.data.id); - this.treeData.splice(groupIndex, 1); - } - } - - this.treeTable.loadData(this.treeData); - - this.viewModelChanged.emit(vmChanges); - } - - addGroup() { - const checkeds = this.treeTable.checkeds as TreeNode[] | any; - if (!checkeds || checkeds.length === 0) { - this.notifyServ.warning(this.noDataGroupMessage); - return; - } - for (const element of checkeds) { - if (element.parent) { - this.notifyServ.warning('字段【' + element.data.name + '】已分组,不可再次分组!'); - return; - } - if (element.isGroupNode) { - this.notifyServ.warning('分组节点不可再次分组!'); - return; - } - if (element.isBindVariable) { - this.notifyServ.warning('绑定变量的控件不支持分组!'); - return; - } - if (element.isNoBinding) { - this.notifyServ.warning('没有绑定信息的控件不支持分组!'); - return; - } - } - const selectedIdList = this.treeTable.checkeds.map(ele => ele.data.id); - // treeData中删除选中字段 - this.treeData = this.treeData.filter(treeNode => !selectedIdList.includes(treeNode.data.id)); - - // 新增分组字段 - const groupId = this.idService.generate(); - const groupNode = { - data: { - id: groupId, - code: '', - name: '新增分组' - }, - children: this.treeTable.checkeds, - expanded: true, - isGroupNode: true - }; - this.treeData.push(groupNode); - this.treeTable.checkeds = []; - - - // 修改VM - const vmChanges = {}; - selectedIdList.forEach(id => { - vmChanges[id] = { - groupId, - groupName: '新增分组' - }; - }); - this.viewModelChanged.emit(vmChanges); - } - - - /** - * 解除分组 - */ - removeGroup() { - const checkeds = this.treeTable.checkeds as TreeNode[] | any; - if (!checkeds || checkeds.length === 0) { - this.notifyServ.warning(this.noDataRemoveGroupMessage); - return; - } - - const selectedIdList = []; - for (const element of checkeds) { - // 1、分组下的节点:父节点未选中时,从分组中移除并添加到根节点;若父节点已选中,则跳过 - if (element.parent && element.children.length === 0) { - const isParentSelected = checkeds.findIndex(se => se.data.id === element.parent.data.id); - if (isParentSelected < 0) { - const nodeIndex = element.parent.children.findIndex(node => node.data.id === element.data.id); - element.parent.children.splice(nodeIndex, 1); - const { parent, ...nodeInfo } = element; - this.treeData.push(nodeInfo); - if (parent.children.length === 0) { - const groupId = this.treeData.findIndex(node => node.data.id === parent.data.id); - this.treeData.splice(groupId, 1); - } - - selectedIdList.push(element.data.id); - } - } - - // 2、分组节点:移除分组节点并将其下的节点移动到根节点下 - if (element.isGroupNode) { - this.treeData = this.treeData.filter(treeNode => element.data.id !== treeNode.data.id); - - const childNodes = element.children; - childNodes.map(treeNode => { - const { parent, ...nodeInfo } = treeNode; - this.treeData.push(nodeInfo); - selectedIdList.push(treeNode.data.id); - }); - // 当前选中的是分组节点: 清空属性面板 - if (this.selectedNode && element.data.id === this.selectedNode.data.id) { - this.selectedNode = null; - } - } - - // 3、根节点下未分组的字段:给出提示 - if (!element.parent && !element.isGroupNode) { - this.notifyServ.warning('字段【' + element.data.name + '】未分组!'); - } - - element.parent = null; - } - this.treeTable.checkeds = []; - this.treeTable.loadData(this.treeData); - - // 重新选中行 - if (this.selectedNode) { - const rowNode = this.treeTable.findRowNode(this.selectedNode.data.id); - if (rowNode) { - rowNode.isSelected = true; - } - } else { - this.treeTable.clearAll(); - } - - // 修改VM - const vmChanges = {}; - selectedIdList.forEach(id => { - vmChanges[id] = { - groupId: null, - groupName: null - }; - // 当前选中行: 修改parent - if (this.selectedNode && id === this.selectedNode.data.id) { - this.selectedNode.parent = null; - } - }); - this.viewModelChanged.emit(vmChanges); - } - /** - * 字段拖拽 - */ - onDrop(dropResult: DropResult) { - if (dropResult.removedIndex !== null) { - // 在右侧树中上下拖拽----暂不考虑 - // this.dragInsideTargetTree(dropResult); - - } else { - // 从左侧树拖字段至右侧树 - this.dragFromSourceTreeToTargetTree(dropResult); - } - } - - // dragInsideTargetTree({ removedIndex, addedIndex, payload }: DropResult) { - - // if (removedIndex === null) { - // return; - // } - // const movedNode = this.treeTable.serializedValue.find(v => v.index === removedIndex); - // const targetNode = this.treeTable.serializedValue.find(v => v.index === addedIndex); - // if (!movedNode.parent) { - // // 被移动节点在根节点下 - // const movedNodeIndex = this.treeData.findIndex(d => d.id === movedNode.id); - // if (!targetNode.parent) { - // // 目标位置在根节点下--- 同级移动 - // this.treeData.splice(movedNodeIndex, 1); - // const targetNodeIndex = this.treeData.findIndex(d => d.id === targetNode.id); - // // if (movedNodeIndex > targetNodeIndex) { - // this.treeData.splice(targetNodeIndex, 0, payload); - - // // } else { - - // // } - // } - // } - - // this.treeTable.loadData(this.treeData); - - // } - - /** - * 从左侧树拖字段至右侧树 - */ - dragFromSourceTreeToTargetTree({ addedIndex, payload }: DropResult) { - if (addedIndex === null || !payload) { - return; - } - const fieldCountBeforeDrag = this.treeData.length; - const targetNode = this.treeTable.serializedValue.find(v => v.index === addedIndex); - if (!targetNode) { - // 拖拽到最后一个节点下面 - this.treeData.push({ data: payload, children: [] }); - } else { - const parentNode = targetNode.parent; - if (!parentNode) { - // 拖拽到根节点下 - const targetIndex = this.treeData.findIndex(d => d.id === targetNode.id); - this.treeData.splice(targetIndex, 0, { data: payload, children: [] }); - - } else { - // 拖拽到分组内 - const newData = Object.assign({}, - payload, { - groupId: parentNode.data.id, - groupName: parentNode.data.name - }); - const targetIndex = parentNode.children.findIndex(d => d.id === targetNode.id); - parentNode.children.splice(targetIndex, 0, { data: newData, children: [] }); - } - } - - this.treeTable.loadData(this.treeData); - - this.addFieldDropped.emit(); - - - if (fieldCountBeforeDrag === 0) { - this.makeTargetTreeDraggable(); - } - } - - /** - * 配置右侧树可拖拽 - */ - private makeTargetTreeDraggable() { - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - const tbodyList = this.treeTable.el.nativeElement.getElementsByTagName('tbody'); - if (!tbodyList.length) { - return; - } - const containerElement = tbodyList[0]; - - const containerOptions: ContainerOptions = { - groupName: 'selectColumn', - nonDragAreaSelector: '[ng-reflect-enable-dbl-click=true]', - onDrop: this.onDrop.bind(this) - }; - // tslint:disable-next-line:no-string-literal - this['targetTreeContainer'] = smoothDnD(containerElement, containerOptions); - - const children = containerElement.children; - - Array.prototype.forEach.call(children, (item: HTMLElement) => { - item.classList.add(constants.wrapperClass); - }); - }); - }); - - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.service.ts deleted file mode 100644 index aae7c1955b218b77eff1d2e4c104f33b4d0395ae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/field-manage/field-treetable/field-treetable.service.ts +++ /dev/null @@ -1,393 +0,0 @@ -import { Injectable } from '@angular/core'; -import { TreeNode } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { DomService, DesignViewModelService, DesignerHostSettingService, DgControl, SchemaService, FormBasicService, DesignerEnvType } from '@farris/designer-services'; -import { IControlService } from '@farris/designer-element'; -import { FieldTreeBuilder } from '../field-tree-builder.service'; - -@Injectable() -export class FieldTreeTableService { - - private controlServ: IControlService; - private controlCreatorServ: any; - private schemaDOMMapping: any; - - controlsInfo: any = {}; - viewModelId: string; - - private fieldTreeBuilder: FieldTreeBuilder; - - constructor( - private designerHostSettingService: DesignerHostSettingService, - private domServ: DomService, - private dgVMServ: DesignViewModelService, - private schemaServ: SchemaService, - private formBasicServ: FormBasicService, - private notifyServ: NotifyService) { - - this.schemaDOMMapping = this.designerHostSettingService.designerHost.getService('SchemaDOMMapping'); - this.controlServ = this.designerHostSettingService.designerHost.getService('ControlService'); - this.controlCreatorServ = this.designerHostSettingService.designerHost.getService('ControlCreatorService'); - } - - buildFieldTreeData(viewModelId: string) { - this.fieldTreeBuilder = new FieldTreeBuilder(this.schemaDOMMapping, this.dgVMServ, this.domServ, this.formBasicServ); - - const treeData = this.fieldTreeBuilder.buildFieldTreeData(viewModelId); - this.controlsInfo = this.fieldTreeBuilder.controlsInfo; - return treeData; - } - - /** - * 刷新表单DOM - * @param viewModelId VMID - */ - refreshDOM(viewModelId: string, treeData: TreeNode[] | any[]) { - const cmp = this.domServ.getComponentByVMId(viewModelId); - switch (cmp.componentType) { - case 'dataGrid': { - this.refreshGridControls(treeData, viewModelId); - break; - } - default: { - if (cmp.componentType.startsWith('form') || this.formBasicServ.envType === 'mobileDesigner') { - this.refreshFormControls(treeData, cmp.componentType, viewModelId); - } - } - } - - } - - /** - * Form类型的组件,重组内容 - */ - private refreshFormControls(treeData: TreeNode[] | any[], componentType: string, viewModelId: string) { - const newDomContents = []; - const { controls: oldControls, formLayout } = this.controlsInfo; - const cmpNode = this.domServ.getComponentByVMId(viewModelId); - treeData.forEach((element: TreeNode | any) => { - // 没有绑定信息的控件:原样塞回 - if (element.isNoBinding) { - newDomContents.push(element.control); - return; - } - if (element.control && element.control.type === DgControl.FieldSet.type) { - // return; - } - - const field = element.data; - let oldControlDom: any = oldControls.find(c => c.binding && c.binding.field === field.id); - - // 分组节点 - if (element.isGroupNode) { - oldControlDom = oldControls.find(c => c.id === element.id); - if (oldControlDom) { - oldControlDom.contents = []; - newDomContents.push(oldControlDom); - } else { - const fieldSetMetadata = this.controlServ.getControlMetaData(DgControl.FieldSet.type); - if (!fieldSetMetadata) { return; } - fieldSetMetadata.id = field.id; - fieldSetMetadata.title = field.name; - fieldSetMetadata.contents = []; - fieldSetMetadata.appearance = { class: 'col-12 px-0' }; - - // 运行时定制新增控件:增加isRTControl的标识 - if (this.formBasicServ.envType === DesignerEnvType.runtimeCustom) { - fieldSetMetadata.isRTControl = true; - } - - - oldControlDom = fieldSetMetadata; - newDomContents.push(fieldSetMetadata); - oldControls.push(fieldSetMetadata); - } - - element.children.forEach(childNode => { - const oldChildControlDom = oldControls.find(c => c.binding && c.binding.field === childNode.data.id); - // 新增控件 - if (!oldChildControlDom) { - let metadata; - if (childNode.isBindVariable) { - metadata = this.controlCreatorServ.createControlByVariable(childNode.data, componentType, null, cmpNode.id); - } else { - metadata = this.controlCreatorServ.createControlBySchemaFeild(childNode.data, componentType, null, cmpNode.id); - } - if (metadata) { - oldControlDom.contents.push(metadata); - oldControls.push(metadata); - } - } else { - oldControlDom.contents.push(oldChildControlDom); - } - }); - - return; - } - - // 平铺字段 - if (!oldControlDom) { - let metadata; - if (element.isBindVariable) { - metadata = this.controlCreatorServ.createControlByVariable(field, componentType, null, cmpNode.id); - } else { - metadata = this.controlCreatorServ.createControlBySchemaFeild(field, componentType, null, cmpNode.id); - } - if (metadata) { - newDomContents.push(metadata); - oldControls.push(metadata); - } - } else { - newDomContents.push(oldControlDom); - } - }); - - // 重置组件dom结构 - formLayout.contents = newDomContents; - } - - - /** - * 表格类型的组件,重组内容 - */ - private refreshGridControls(treeData: TreeNode[] | any[], viewModelId: string) { - const { controls: gridFields, formLayout } = this.controlsInfo; - if (!formLayout) { - return; - } - const fieldEditable = formLayout.fieldEditable; - const gridType = formLayout.type; - const gridFieldType = gridType === DgControl.DataGrid.type ? DgControl.GridField.type : DgControl.TreeGridField.type; - - const newDomContents = []; - treeData.forEach(element => { - const oldControlDom = gridFields.find(f => f.binding && f.binding.field === element.data.id); - - // 平铺字段 - if (!oldControlDom) { - let dataField = element.data.bindingPath; - // 对于很旧的表单schema缺少bindingPath属性,故重新获取bindingPath - if (!dataField) { - const { isRefElement, refElementLabelPath } = this.schemaServ.getFieldByIDAndVMID(element.data.id, viewModelId); - dataField = isRefElement ? refElementLabelPath : element.data.label; // 关联字段dataField - } - - const metadata = this.controlCreatorServ.createGridFieldBySchemaFeild( - element.data, dataField, fieldEditable, gridFieldType, formLayout.controlSource); - if (metadata) { - newDomContents.push(metadata); - gridFields.push(metadata); - } - } else { - newDomContents.push(oldControlDom); - } - }); - - // 更新组件dom结构 - formLayout.fields = newDomContents; - - } - - - /** - * 上移 - * 若当前节点是分组节点内的第一个节点,则移出分组,放在分组上面; 字段移出分组后判断分组下的节点是否为空,若空则删除分组 - * 若上个节点是分组节点,则移动到分组内 - * 当前是分组节点,只在根节点下移动(不支持嵌套分组) - * - * 方法返回VM字段的变更集 - */ - moveUp(selectedNode: any, treeData: any) { - - const parentNode = selectedNode.parent; - const parentData = parentNode ? parentNode.children : treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === selectedNode.data.id); - // 1、顶级节点 ====> 不动 - if (index < 1 && !parentNode) { - return; - } - const vmChanges = {}; - // 2、分组节点内的第一个节点 ===> 移出分组 - if (index < 1 && parentNode && parentNode.isGroupNode) { - parentData.splice(0, 1); - const parentIndex = treeData.findIndex(node => node.data.id === parentNode.data.id); - selectedNode.parent = null; - treeData.splice(parentIndex, 0, selectedNode); - vmChanges[selectedNode.id] = { - groupId: null, - groupName: null - }; - // 分组下没有字段了: 删除分组 - if (parentData.length === 0) { - treeData.splice(parentIndex + 1, 1); - } - } else { - const preEle = parentData[index - 1]; - parentData.splice(index, 1); - - if (preEle.children && preEle.children.length > 0 && !selectedNode.isGroupNode) { - // 3、上一个节点是分组且当前不是分组节点 ===> 移动到分组内 - selectedNode.parent = preEle; - preEle.children.push(selectedNode); - vmChanges[selectedNode.id] = { - groupId: preEle.data.id, - groupName: preEle.data.name - }; - } else { - // 4、同级移动 - parentData.splice(index - 1, 0, selectedNode); - } - } - - return vmChanges; - - } - - /** - * 下移 - * 若当前节点是分组节点内的最后一个节点,则移出分组,放在分组下面; 字段移出分组后判断分组下的节点是否为空,若空则删除分组 - * 若下个节点是分组节点,则移动到分组内 - * 当前是分组节点,只在根节点下移动(不支持嵌套分组) - * - * 方法返回VM字段的变更集 - */ - moveDown(selectedNode: any, treeData: any) { - const parentNode = selectedNode.parent; - const parentData = parentNode ? parentNode.children : treeData; // 在根节点上移动 or 分组节点上移动 - const index = parentData.findIndex(node => node.data.id === selectedNode.data.id); - // 1、顶级节点的最后一个====> 不动 - if (index === parentData.length - 1 && !parentNode) { - return; - } - // 记录涉及VM字段的变化 - const vmChanges = {}; - - // 2、分组节点内的最后一个节点 ====> 移出分组 - if (index === parentData.length - 1 && parentNode && parentNode.isGroupNode) { - parentData.splice(index, 1); - selectedNode.parent = null; - const parentIndex = treeData.findIndex(node => node.data.id === parentNode.data.id); - treeData.splice(parentIndex + 1, 0, selectedNode); - vmChanges[selectedNode.id] = { - groupId: null, - groupName: null - }; - // 分组下没有字段了: 删除分组 - if (parentData.length === 0) { - treeData.splice(parentIndex, 1); - } - } else { - const nextEle = parentData[index + 1]; - - parentData.splice(index, 1); - // 3、下一个节点是分组且当前不是分组节点 ===> 移动到分组内 - if (nextEle.children && nextEle.children.length > 0 && !selectedNode.isGroupNode) { - nextEle.children.splice(0, 0, selectedNode); - selectedNode.parent = nextEle; - vmChanges[selectedNode.id] = { - groupId: nextEle.data.id, - groupName: nextEle.data.name - }; - } else { - // 4、同级移动 - parentData.splice(index + 1, 0, selectedNode); - } - } - - return vmChanges; - } - - /** - * 移除字段 - * @param checkeds 勾选中的节点 - * @param treeData 树数据 - * @param selectedNodeId 当前行选中记录id - */ - removeFields(checkeds: any, treeData: any, selectedNodeId: string) { - - let removeSelectedNode = false; - - checkeds.forEach(element => { - // 跳过分组节点 - if (element.isGroupNode) { - return; - } - // 在根节点下删除 - if (!element.parent) { - const nodeIndex = treeData.findIndex(node => node.data.id === element.data.id); - treeData.splice(nodeIndex, 1); - } else { - // 分组节点下删除 - const nodeIndex = element.parent.children.findIndex(node => node.data.id === element.data.id); - element.parent.children.splice(nodeIndex, 1); - - // 分组节点下没有字段则自动删除分组节点 - if (element.parent.children.length === 0) { - const groupId = treeData.findIndex(node => node.data.id === element.parent.data.id); - treeData.splice(groupId, 1); - } - } - // 若当前节点为行选中节点,需要清空选中行记录 - if (element.data.id === selectedNodeId) { - removeSelectedNode = true; - } - - // 删除当前controls集合中的节点 - if (this.controlsInfo && this.controlsInfo.controls && this.controlsInfo.controls.length) { - this.controlsInfo.controls = this.controlsInfo.controls.filter(c => - (c.binding && c.binding.field !== element.data.id) && c.id !== element.data.id); - } - - }); - return removeSelectedNode; - } - - - /** - * 解除分组 - * @param checkeds 勾选中的节点 - * @param treeData 树数据 - */ - removeGroup(checkeds: TreeNode[] | any[], treeData: any) { - const selectedIdList = []; - for (const element of checkeds) { - // 1、分组下的节点:父节点未选中时,从分组中移除并添加到根节点;若父节点已选中,则跳过 - if (element.parent && element.children.length === 0) { - const isParentSelected = checkeds.findIndex(se => se.data.id === element.parent.data.id); - if (isParentSelected < 0) { - const nodeIndex = element.parent.children.findIndex(node => node.data.id === element.data.id); - element.parent.children.splice(nodeIndex, 1); - treeData.push({ data: element.data, children: [], isBindVariable: element.isBindVariable }); - - if (element.parent.children.length === 0) { - const groupId = treeData.findIndex(node => node.data.id === element.parent.data.id); - treeData.splice(groupId, 1); - } - - selectedIdList.push(element.data.id); - } - } - - // 2、分组节点:移除分组节点并将其下的节点移动到根节点下 - if (element.isGroupNode) { - const groupNodeIndex = treeData.findIndex(treeNode => treeNode.data.id === element.data.id); - treeData.splice(groupNodeIndex, 1); - - element.children.map(treeNode => { - treeData.push({ data: treeNode.data, children: [], isBindVariable: treeNode.isBindVariable }); - selectedIdList.push(treeNode.data.id); - }); - } - - // 3、根节点下未分组的字段:给出提示 - if (!element.parent && !element.isGroupNode) { - this.notifyServ.warning('字段【' + element.data.name + '】未分组!'); - } - - element.parent = null; - } - - return selectedIdList; - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.css b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.css deleted file mode 100644 index 91b8d1cf239cea7d94a2b970eb996b5c9dc2a110..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.css +++ /dev/null @@ -1,52 +0,0 @@ -:host { - background: #fcfdff !important; -} - -:host::ng-deep.farris-treetable .table { - background-color: #FCFDFF !important; -} - -.toolbar-panel { - position: relative; - padding: 5px 10px; - color: #8DA3CE; - background-color: #FCFDFF; -} - -.ide-tree-container { - padding-left: 16px; - padding-right: 16px; - background: #fcfdff; -} - -/***********修改选中行样式 ***********/ -:host::ng-deep.farris-treetable .farris-treetable-tbody tr.farris-table-selectedrow { - background-color: initial; -} - -:host::ng-deep.farris-treetable .table .treetable-cell .treetable-cell-content { - position: relative; - z-index: 10; -} - -:host::ng-deep.farris-treetable .farris-treetable-tbody tr.farris-table-selectedrow .treetable-cell-content::after { - transform: scale(1); -} - -:host::ng-deep.farris-treetable .table .treetable-cell .treetable-cell-content::after { - content: ""; - position: absolute; - left: 0; - right: 0; - top: 0; - z-index: -1; - bottom: 0; - /* background: #DAE9FF; */ - background: #EFF6FE; - transform: scale(0); - border-radius: 10px; -} - -:host::ng-deep.farris-treetable .table .treetable-cell.used .f-icon-preview { - color: #2A87FF !important; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.html b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.html deleted file mode 100644 index ae49bd5a88992c72743c1b0651ce1e7d58e3d8dc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.html +++ /dev/null @@ -1,56 +0,0 @@ -
-
- -
- -
- -
-
- - - - - - - - - {{ ctx.rowData[textField] }} - - [{{ ctx.rowData[labelField] }}] - - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.ts deleted file mode 100644 index 00445e106b8d76b1fb736bfd112b19ef29b31e61..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.component.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { AfterViewInit, Component, ElementRef, EventEmitter, Injector, Input, OnChanges, OnInit, Output, SimpleChanges, TemplateRef, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { RowNode, TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { Observable, Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; -import { IdeTreeToolbarComponent } from './tool-bar/ide-tree-toolbar.component'; - -export type EnableNodeName = boolean | ((node: TreeNode) => boolean); - -@Component({ - selector: 'ide-tree', - templateUrl: 'ide-tree.component.html', - styleUrls: ['ide-tree.component.css'] -}) -export class IdeTreeComponent implements OnInit, AfterViewInit, OnChanges { - @Input() data: TreeNode[]; - @Input() showLines = false; - @Input() showLinesOnHover = false; - @Input() idField = 'id'; - @Input() textField = 'name'; - @Input() labelField = ''; - @Input() showCheckbox = false; - @Input() virtualized = false; - @Input() iconCls = ''; - @Input() iconField = ''; - @Input() whenDataIconEmptyUseDefault = false; - @Input() indentSpacing = 16; - - @Input() textWithId = false; - - @Input() enableToolbar = true; - - @Input() editable: EnableNodeName = false; - @Input() useIconFromData = true; - @Input() leafIcon: string; - @Input() expandIcon: string; - @Input() collapseIcon: string; - - @Input() enableContextMenu = false; - @Input() contextMenus = null; - @Input() beforeShowContextMenu: (e: { [key: string]: any }) => Observable<{ show: boolean, menus: Array }>; - - - @Input() selectValue: string; - @Input() isFormControlTree = false; - @Input() enableRefresh = false; - @Input() rowCls; - - @Output() nameChanged = new EventEmitter(); - @Output() refresh = new EventEmitter(); - @Output() selectChanged = new EventEmitter(); - @Output() selectValueChange = new EventEmitter(); - @Output() nodeExpanded = new EventEmitter(); - @Output() nodeExpandedAll = new EventEmitter(); - @Output() nodeCollapsedAll = new EventEmitter(); - - - - @ViewChild('tt') tt: TreeTableComponent; - @ViewChild('toolbar') tb: IdeTreeToolbarComponent; - @ViewChild('nodeText') nodeTextTemp: TemplateRef; - @ViewChild('hiddenInput') hiddenInput: ElementRef; - - loadSuccess = new Subject(); - - cols = []; - - activeEditInfo: { - id: string, - editing: boolean, - oldValue?: string, - value?: string - } = { - id: '', - editing: false, - oldValue: undefined - }; - - isEditing = false; - - private notifySer: NotifyService; - constructor(private el: ElementRef, private injector: Injector) { - this.notifySer = this.injector.get(NotifyService); - } - - ngOnInit() { - if (this.useIconFromData) { - this.checkData(this.data); - } - if (!this.labelField) { - this.labelField = this.idField; - } - - this.cols = [ - { field: this.textField, title: '', visible: true, width: 100, template: this.nodeTextTemp, styler: this.rowCls } - ]; - } - - ngAfterViewInit(): void { - if (this.enableToolbar && this.tb) { - // 搜索后事件 - this.tb.textChange.pipe( - debounceTime(300), - distinctUntilChanged(), - ).subscribe((e: any) => { - - this.tt.searchHandle.search(this.textField + ',' + this.labelField, e.val); - const tbody = this.tt.el.nativeElement.querySelector('tbody.farris-treetable-tbody'); - if (tbody) { - this.loadSuccess.next({ tt: this.tt, tbody }); - } - }); - } - - this.tt.loadedData.asObservable().pipe( - debounceTime(200) - ).subscribe(() => { - const tbody = this.tt.el.nativeElement.querySelector('tbody.farris-treetable-tbody'); - if (tbody) { - this.loadSuccess.next({ tt: this.tt, tbody }); - } - }); - } - - ngOnChanges(changes: SimpleChanges) { - if (changes.selectValue && !changes.selectValue.isFirstChange()) { - this.tt.selectNode(changes.selectValue.currentValue, false); - } - - if (changes.data && !changes.data.isFirstChange()) { - if (this.useIconFromData) { - this.checkData(this.data); - } - } - // if (this.rowCls) { - // this.cols = [ - // { field: this.textField, title: '', visible: true, width: 100, template: this.nodeTextTemp, styler: this.rowCls } - // ]; - // } - - } - - private checkData(data: TreeNode[]) { - if (data && data.length) { - data.forEach((n: TreeNode) => { - if (!n[this.iconField]) { - n.showIcon = false; - } - this.checkData(n.children); - }); - } - } - - private isNodeCanEdit(node: TreeNode) { - if (typeof this.editable === 'boolean') { - return this.editable; - } - - if (typeof this.editable === 'function') { - return this.editable(node); - } - - return false; - } - - onMenuItemClick($event: any) { - const { event, action } = $event; - switch (action.key) { - case 'SHOWID': - this.textWithId = action.value; - this.tt.detectChanges(); - break; - case 'EXPANDALL': - if (!this.isFormControlTree) { - this.tt.expandAll(); - } - - this.onNodeExpaned(null); - this.onNodeExpanedAll(); - break; - case 'COLLAPSEALL': - if (!this.isFormControlTree) { - this.tt.collapseAll(); - } - this.onNodeCollapsedAll(); - break; - } - } - - // onNodeDblClick($event) { - // } - - onNodeTextClick($event) { - const { data, el } = $event; - const id = data.rowNode.id; - - if (id === this.activeEditInfo.id && this.tt.selectedRow && this.tt.selectedRow.id === id) { - const val = data.rowData[this.textField]; - this.editNode(val, el); - } - } - - onSelectNodeChange($event) { - this.selectValue = $event.node.id; - this.selectValueChange.emit($event.node.id); - this.selectChanged.emit($event); - } - - // 节点点击事件 - onNodeClick($event: any) { - if (this.tt.selectedRow && this.tt.selectedRow.id === $event.node.id) { - this.activeEditInfo.id = $event.node.id; - } else { - if (this.activeEditInfo.editing) { - const { id, value, oldValue } = this.activeEditInfo; - if (value !== oldValue) { - this.tt.update(id, { [this.textField]: value }); - this.nameChanged.emit({ id, value, tt: this.tt, instance: this }); - } - } - this.activeEditInfo.id = ''; - } - - this.stopEditing(); - } - - onKeyDown($event) { - const key = $event.key; - if (key === 'F2' && this.tt.selectedRow) { - const val = this.tt.selectedRow.data[this.textField]; - this.editNode(val, $event.target); - } - } - - onNameModelChange($event) { - this.activeEditInfo.value = $event; - } - - onNodeNameKeydown($event, oldVal) { - $event.stopPropagation(); - - if ($event.key === 'Enter') { - const newVal = $event.target.value; - if (this.activeEditInfo.oldValue !== newVal) { - this.tt.update(this.tt.selectedRow.id, { [this.textField]: newVal }); - this.nameChanged.emit({ value: newVal, id: this.tt.selectedRow.id }); - } - - this.stopEditing(); - } - - if ($event.key === 'Escape') { - this.tt.update(this.tt.selectedRow.id, { [this.textField]: this.activeEditInfo.oldValue }); - this.stopEditing(); - } - } - - private stopEditing() { - this.activeEditInfo.editing = false; - this.activeEditInfo.oldValue = undefined; - this.activeEditInfo.value = undefined; - this.isEditing = false; - this.tt.detectChanges(); - } - - editNode(val: string, el?: HTMLElement) { - - const canEdit = this.isNodeCanEdit(this.tt.selectedRow); - if (!canEdit) { - return; - } - - this.activeEditInfo = { - id: this.tt.selectedRow.id, - editing: true, - value: val, - oldValue: val - }; - - this.tt.detectChanges(); - - if (el) { - setTimeout(() => { - el.querySelector('input').focus(); - this.isEditing = true; - }, 10); - } - } - - onRefresh($event) { - this.refresh.emit({ event: $event, tt: this.tt, instance: this }); - } - - getNodeDoms() { - return this.tt.el.nativeElement.querySelectorAll('tr'); - } - - copyLabel(t: RowNode) { - if (!this.hiddenInput) { - return; - } - this.hiddenInput.nativeElement.focus(); - this.hiddenInput.nativeElement.value = t.node.data[this.labelField]; - this.hiddenInput.nativeElement['select'](); - document.execCommand('Copy'); - this.hiddenInput.nativeElement.value = ''; - - if (this.notifySer) { - this.notifySer.success('复制成功。'); - } else { - alert('复制成功。'); - } - } - - onNodeExpaned($event) { - const tb = this.tt.el.nativeElement.querySelector('tbody.farris-treetable-tbody'); - this.nodeExpanded.emit({ node: $event, tt: this.tt, tbody: tb }); - } - onNodeExpanedAll() { - this.nodeExpandedAll.emit(); - } - - onNodeCollapsedAll() { - this.nodeCollapsedAll.emit(); - } - - /** 搜索节点后事件 */ - onSearched() { - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.module.ts b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.module.ts deleted file mode 100644 index b9a5b5f7da059e9122177469ab84f11b6719f168..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NotifyModule } from '@farris/ui-notify'; -import { FormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { TreeTableModule } from '@farris/ui-treetable'; -import { IdeTreeComponent } from './ide-tree.component'; -import { IdeTreeToolbarComponent } from './tool-bar/ide-tree-toolbar.component'; -import { IdeTreeNodeDirective } from './ide-treenode.directive'; - -@NgModule({ - declarations: [ - IdeTreeComponent, - IdeTreeToolbarComponent, - IdeTreeNodeDirective - ], - imports: [ - CommonModule, - FormsModule, - TreeTableModule, - NotifyModule.forRoot() - ], - exports: [IdeTreeComponent] -}) -export class IdeTreeModule { } diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.service.ts deleted file mode 100644 index df8b2394d9cd95fc5295c106b10e31e50490a8fb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-tree.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class IdeTreeService { - - constructor() { } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-treenode.directive.ts b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-treenode.directive.ts deleted file mode 100644 index 488179fddfe19f4d494498918a0e96266e1ed047..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/ide-treenode.directive.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { IdeTreeComponent } from './ide-tree.component'; -import { Directive, Input, ElementRef, OnInit, OnDestroy, Output, EventEmitter } from '@angular/core'; -// import { fromEvent, merge } from 'rxjs'; -// import { async } from 'rxjs/internal/scheduler/async'; -// import { buffer, debounceTime, filter, map, throttleTime } from 'rxjs/operators'; - -@Directive({ - selector: '[ide-treename]', -}) -export class IdeTreeNodeDirective implements OnInit, OnDestroy { - @Input() data; - - @Output() singleClick = new EventEmitter(); - - // 暂时不实现双击修改节点名称的功能 - // @Output() nodeDblClick = new EventEmitter(); - - - private click$ = null; - constructor(private elRef: ElementRef, private ideTreeRef: IdeTreeComponent) { } - - ngOnInit(): void { - this.click$ = this.onClick(); - } - - ngOnDestroy() { - if (this.click$) { - this.click$(); - } - } - - /** - * 点击事件,区分点击和双击--暂不实现双击功能 - */ - // private onClick() { - // const target = this.elRef.nativeElement; - - // const throttleConfig = { - // leading: false, - // trailing: true - // }; - - // const btnClick$ = fromEvent(target, 'click'); - - // const throttled$ = btnClick$.pipe(throttleTime(250, async, throttleConfig)); - - // const btnDblClick$ = btnClick$.pipe( - // buffer(throttled$), - // map(arr => arr.length), - // filter(len => len >= 2), - // ); - - // const eventsMerged = merge(btnClick$, btnDblClick$).pipe(debounceTime(255)); - - // const subscription = eventsMerged.subscribe((e: any) => { - // if (typeof e === 'number') { - // this.nodeDblClick.emit(this.data); - // } else { - // this.singleClick.emit({ data: this.data, el: this.elRef.nativeElement }); - // } - // }); - // return () => { - // subscription.unsubscribe(); - // }; - // } - - - private onClick() { - this.singleClick.emit({ data: this.data, el: this.elRef.nativeElement }); - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.css b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.css deleted file mode 100644 index a5354a4b72ad11f61a859619749a957935a06240..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.css +++ /dev/null @@ -1,9 +0,0 @@ -.ide-tree-icon { - color: #C7CDDC; - margin: 0 auto; -} - -.toolbar-search-input { - padding-left: 22px; - border: 1px solid rgba(141, 163, 206, 0.1); -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.html b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.html deleted file mode 100644 index 5af96da7c97e9e52bb42dc8145cb173efad35e83..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.html +++ /dev/null @@ -1,25 +0,0 @@ -
- - - -
- - - - - -
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.ts deleted file mode 100644 index 930693f725fbf3c12060390cc807f3b1950208fe..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/ide-tree/tool-bar/ide-tree-toolbar.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Subject } from 'rxjs'; -import { Component, EventEmitter, OnInit, Output, ViewChild, ElementRef, Input } from '@angular/core'; - -@Component({ - selector: 'tree-toolbar', - templateUrl: './ide-tree-toolbar.component.html', - styleUrls: ['ide-tree-toolbar.component.css'] -}) -export class IdeTreeToolbarComponent implements OnInit { - - textChange = new Subject(); - @Input() enableRefresh = false; - - @Output() menuClick = new EventEmitter(); - @Output() refresh = new EventEmitter(); - - @ViewChild('toolbar') toolbarEl: ElementRef; - @ViewChild('searchInput') searchInput: ElementRef; - - isPanelOpen = false; - pos = { left: 0, top: 0 }; - - _showId = false; - - isExpanded = true; - /** 输入法输入过程标识 */ - searchFlag = true; - - /** 暂存搜索文本 */ - searchValue: string; - - constructor() { } - - ngOnInit(): void { } - - - togglePanel($event) { - - const toolbarElRect = this.toolbarEl.nativeElement.getBoundingClientRect(); - this.pos = { - left: toolbarElRect.width + toolbarElRect.left - 200, - top: toolbarElRect.height + toolbarElRect.top - }; - - this.isPanelOpen = !this.isPanelOpen; - } - - hidePanel($event: MouseEvent) { - $event.stopPropagation(); - this.isPanelOpen = false; - } - - clearInput($event: MouseEvent, searchInput: any) { - $event.stopPropagation(); - searchInput.value = ''; - this.textChange.next({ event: $event, val: '' }); - } - - onMenuItemClick($event, key: string) { - if (key) { - key = key.toUpperCase(); - } - - const p = { event: $event, action: { key, value: false } }; - - switch (key) { - case 'SHOWID': - this._showId = !this._showId; - p.action.value = this._showId; - break; - } - this.menuClick.emit(p); - } - - - toggleNodes($event) { - this.isExpanded = !this.isExpanded; - this.onMenuItemClick($event, this.isExpanded ? 'expandall' : 'collapseall'); - } - - onRefresh() { - this.refresh.emit(); - } - - onTextChange($event) { - const val = $event.target.value; - this.searchValue = val; - if (!this.searchFlag) { - return; - } - this.textChange.next({ event: $event, val }); - } - - onSearchChangeFlag(value) { - this.searchFlag = value; - // 拼音按空格后input的执行时间早于compositionend,故重新触发一次 - if (value) { - this.textChange.next({ val: this.searchValue }); - } - } - /** - * 监听回车事件 - * @param $event 事件 - */ - onTextKeyup($event) { - if ($event.which === 13) { - this.onTextChange($event); - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/index.ts b/packages/designer/projects/designer-devkit/src/lib/components/index.ts deleted file mode 100644 index 5fc65a626837b8b3dfdf1de0922c1195e0a53971..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -export { ControlTreeContextMenuConfig, ControlTreeNode, ControlTreeNodeType } from './control-tree/entity/tree-node'; -export { ControlTreeComponent } from './control-tree/control-tree.component'; -export { MobileControlTreeComponent } from './control-tree/mobile-control-tree.component'; -export { ControlTreeNodeBuilderService } from './control-tree/service/tree-node-builder.service'; - -export * from './angular-editor'; -export { ControlBoxComponent } from './control-box/control-box.component'; -export { ControlCategoryService } from './control-box/control-category.service'; -export { SchemaTreeComponent } from './schema-tree/schema-tree.component'; - -export { ComponentBuildInfo } from './inner-component-creator/inner-component-build-info'; -export { InnerComponentCreatorComponent } from './inner-component-creator/inner-component-creator.component'; -export { ComponentCreatorService } from './inner-component-creator/component-creator.service'; - -export { UpdateFormSchemaService } from './update-schema/update-schema.service'; -export { UpdateSchemaComponent } from './update-schema/update-schema.component'; -export { RefreshFormAfterSchemaChangedService } from './update-schema/refresh-after-schema-changed.service'; -export { SchemaChangeEntity, IRefreshAfterChangedService } from './update-schema/refresh.service'; - -export { FieldManagerComponent } from './field-manage/field-manager.component'; -export { FieldTreeBuilder, FieldTreeNode } from './field-manage/field-tree-builder.service'; diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/component-creator.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/component-creator.service.ts deleted file mode 100644 index d2c3bed5b55a7d2be8e6994d532896e986d11402..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/component-creator.service.ts +++ /dev/null @@ -1,723 +0,0 @@ -import { Injector } from '@angular/core'; -import { IControlService } from '@farris/designer-element'; -import { - DesignerEnvType, DesignerHostSettingService, DgControl, DomService, FormBasicService, FormBindingType, - FormComponentType, FormSchemaEntityField$Type, FormSchemaEntityFieldTypeName, FormViewModel, WebCmdService -} from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; -import { ComponentBuildInfo } from './inner-component-build-info'; -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; - -export class ComponentCreatorService { - - public controlCreatorService: any; - public controlService: IControlService; - public formBasicService: FormBasicService; - - public webCmdService: WebCmdService; - - public injector: Injector; - constructor( - private designerHostSettingServ: DesignerHostSettingService, - private domService: DomService, injector?: Injector) { - if (this.designerHostSettingServ) { - this.controlService = this.designerHostSettingServ.controlService; - this.controlCreatorService = this.designerHostSettingServ.controlCreatorService; - this.injector = this.designerHostSettingServ.designerHost.getService('Injector') as Injector; - this.formBasicService = this.injector.get(FormBasicService); - - this.webCmdService = this.injector.get(WebCmdService); - - } - - if (injector) { - this.webCmdService = injector.get(WebCmdService); - this.injector = injector; - } - } - - createComponentRefNode(buildInfo: ComponentBuildInfo): any { - const componentRefNode = this.controlService.getControlMetaData(DgControl.ComponentRef.type); - Object.assign(componentRefNode, { - id: `${buildInfo.componentIdPrefix}-ref`, - component: buildInfo.componentIdPrefix - }); - return componentRefNode; - } - - createComponentNode(buildInfo: ComponentBuildInfo): any { - const componentNode = this.controlService.getControlMetaData(DgControl.Component.type); - const contents = this.createComponentContents(buildInfo); - Object.assign(componentNode, { - id: `${buildInfo.componentIdPrefix}`, - viewModel: `${buildInfo.componentIdPrefix}-viewmodel`, - componentType: buildInfo.resolvedComponentType, - appearance: { - // class: buildInfo.componentAppearance - class: this.getComponentAppearance(buildInfo.resolvedComponentType) - }, - contents - }); - return componentNode; - } - - getComponentAppearance(componentType: string) { - switch (componentType) { - case FormComponentType.form: case FormComponentType.table: { - return this.getFormComponentClass(); - } - case FormComponentType.dataGrid: { - return this.getDataGridComponentClass(); - } - case 'AttachmentPanel': case FormComponentType.attachmentPanel: { - return this.getAttachmenetComponentClass(); - } - case FormComponentType.appointmentCalendar: { - return 'f-struct-wrapper f-utils-fill-flex-column'; - } - default: { - if (componentType.startsWith('form-col-')) { - return this.getFormComponentClass(); - } - return ''; - } - } - } - /** - * 获取卡片组件层级的class样式 - */ - private getFormComponentClass(): string { - const templateId = this.domService.module.templateId; - - // 双列表标签页模板中拖入卡片 - if (templateId === 'double-list-in-tab-template') { - return 'f-struct-wrapper f-utils-fill-flex-column'; - } - return 'f-struct-wrapper'; - - } - /** - * 获取列表组件层级的class样式 - */ - private getDataGridComponentClass(): string { - const templateId = this.domService.module.templateId; - - // 双列表标签页模板,要求列表填充表单高度 - if (templateId === 'double-list-in-tab-template') { - return 'f-struct-wrapper f-utils-fill-flex-column'; - } - return 'f-struct-is-subgrid'; - - } - - /** - * 获取列表组件层级的class样式 - */ - private getAttachmenetComponentClass(): string { - const templateId = this.domService.module.templateId; - - // 双列表标签页模板,要求列表填充表单高度 - if (templateId === 'double-list-in-tab-template') { - return 'f-struct-wrapper f-utils-fill-flex-column'; - } - return 'f-struct-wrapper'; - } - - private createComponentContents(buildInfo: ComponentBuildInfo) { - switch (buildInfo.componentType) { - case 'form': case 'Form': - return this.createFormComponentContents(buildInfo); - case 'DataGrid': - return this.createDateGridComponentContents(buildInfo); - case 'TreeGrid': - return this.createTreeGridComponentContents(buildInfo); - case 'ListView': - return this.createListViewComponentContents(buildInfo); - case 'FileUploadPreview': - return this.createAttachmentComponentContents(buildInfo); - case 'AppointmentCalendar': { - return this.createAppointmentCalendarComponentContents(buildInfo); - } - default: { - if (buildInfo.componentType.startsWith('form-col-')) { - return this.createFormComponentContents(buildInfo); - } - } - } - } - - - - private createFormComponentContents(buildInfo: ComponentBuildInfo) { - // 1、创建section - const section = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(section, { - id: buildInfo.componentId + '-form-section', - appearance: { - class: 'f-section-form f-section-in-mainsubcard' - }, - mainTitle: buildInfo.componentName - }); - - // 2、创建form(默认控件标签独占一列) - const layoutForm = this.controlService.getControlMetaData(DgControl.Form.type); - const controls = []; - Object.assign(layoutForm, { - id: buildInfo.componentId + '-form-layout', - appearance: { - class: 'f-form-layout farris-form farris-form-controls-inline' - }, - contents: controls - }); - - // 零代码输入控件的长度不受farris最大长度限制 - if (this.formBasicService && this.formBasicService.envType === DesignerEnvType.noCode) { - layoutForm.appearance.class += ' farris-form-auto'; - } - section.contents = [layoutForm]; - - // 3、创建字段 - const { selectedFields } = buildInfo; - selectedFields.forEach(field => { - const dgVMField = cloneDeep(field); - const fieldMetadata = this.controlCreatorService.createControlBySchemaFeild(dgVMField, buildInfo.resolvedComponentType); - - if (!fieldMetadata) { - return; - } - // 默认创建的控件按照选定的布局设置样式,不支持自适应 - if (!fieldMetadata.appearance.class) { - fieldMetadata.appearance.class = this.getFormControlClassName(buildInfo); - } - controls.push(fieldMetadata); - }); - - - // 双列表标签页模板中拖入卡片,要求卡片要填充 - const templateId = this.domService.module.templateId; - if (templateId === 'double-list-in-tab-template') { - section.appearance.class = 'f-section-grid f-section-in-main px-0 pt-0'; - section.fill = true; - } - return [section]; - } - - private createDateGridComponentContents(buildInfo: ComponentBuildInfo) { - const templateId = this.domService.module.templateId; - let container; - // 根据模板不同,创建不同的容器类型和样式 - if (templateId === 'double-list-in-tab-template') { - // 1、创建setion - const section = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(section, { - id: buildInfo.componentIdPrefix + '-section', - appearance: { - class: 'f-section-grid f-section-in-main px-0 pt-0' - }, - fill: true, - showHeader: false - }); - container = section; - } else { - // 1、创建contentContainer - const contentContainer = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - Object.assign(contentContainer, { - id: buildInfo.componentIdPrefix + '-layout', - appearance: { - class: 'f-grid-is-sub f-utils-flex-column' - } - }); - container = contentContainer; - } - - - // 2、创建DataGrid - const dataGrid = this.controlService.getControlMetaData(DgControl.DataGrid.type); - const fields = []; - - Object.assign(dataGrid, { - id: buildInfo.componentId + '-dataGrid', - appearance: { - class: 'f-component-grid f-utils-fill' - }, - fields, - fieldEditable: buildInfo.editable, - dataSource: buildInfo.dataSource - }); - container.contents = [dataGrid]; - const { selectedFields } = buildInfo; - // 3、创建字段 - selectedFields.forEach(field => { - const dgVMField = cloneDeep(field); - const fieldMetadata = this.controlCreatorService.createGridFieldBySchemaFeild(dgVMField, field.bindingPath, - buildInfo.editable, DgControl.GridField.type, 'Farris'); - if (fieldMetadata) { - fields.push(fieldMetadata); - } - }); - return [container]; - } - - private createTreeGridComponentContents(buildInfo: ComponentBuildInfo) { - // 1、创建contentContainer - const contentContainer = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - Object.assign(contentContainer, { - id: buildInfo.componentIdPrefix + '-layout', - appearance: { - class: 'f-grid-is-sub f-utils-flex-column' // TODO待优化 - } - }); - - // 2、创建TreeGrid - const dataGrid = this.controlService.getControlMetaData(DgControl.TreeGrid.type); - const fields = []; - - Object.assign(dataGrid, { - id: buildInfo.componentId + '-treeGrid', - appearance: { - class: 'f-component-treetable' - }, - fields, - dataSource: buildInfo.dataSource - // dataSource: this.selectedCmp.label - }); - contentContainer.contents = [dataGrid]; - const { selectedFields } = buildInfo; - // 3、创建字段 - selectedFields.forEach(field => { - const dgVMField = cloneDeep(field); - const fieldMetadata = this.controlCreatorService.createGridFieldBySchemaFeild(dgVMField, field.bindingPath, - false, DgControl.TreeGridField.type, 'Farris'); - fields.push(fieldMetadata); - }); - return [contentContainer]; - } - - /** - * 预约日历组件 - * @param buildInfo 构造信息 - */ - private createAppointmentCalendarComponentContents(buildInfo: ComponentBuildInfo) { - // 1、创建setion - const section = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(section, { - id: buildInfo.componentIdPrefix + '-section', - appearance: { - class: 'f-section-grid f-section-in-managelist' - }, - fill: true, - showHeader: false - }); - - // 2、创建日历 - const appointmentCalendar = this.controlService.getControlMetaData(DgControl.AppointmentCalendar.type); - Object.assign(appointmentCalendar, { - id: buildInfo.componentId + '-calendar', - appearance: { - class: 'f-utils-fill-flex-row f-component-appointment-calendar' - }, - dataSource: buildInfo.dataSource, - filterChange: `${buildInfo.componentId.replace(/-/g, '')}Load`, - removeHandler: `${buildInfo.componentId.replace(/-/g, '')}Remove`, - reservation: `${buildInfo.componentId.replace(/-/g, '')}OpenAppAndAdd1` - }); - section.contents = [appointmentCalendar]; - - return [section]; - } - - private createListViewComponentContents(buildInfo: ComponentBuildInfo) { - // 1、创建ListView - const listView = this.controlService.getControlMetaData(DgControl.ListView.type); - - Object.assign(listView, { - id: buildInfo.componentId + '-listview', - appearance: { - class: '' - }, - fill: true - }); - - return [listView]; - } - /** - * 创建附件组件 - * @param buildInfo 组件构造信息 - */ - private createAttachmentComponentContents(buildInfo: ComponentBuildInfo) { - // 1、创建section - const section = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(section, { - id: buildInfo.componentId + '-section', - appearance: { - class: 'f-section-form f-section-in-mainsubcard' - }, - mainTitle: buildInfo.componentName ? buildInfo.componentName : '附件', - showHeader: buildInfo.parentContainerType === DgControl.Tab.type ? false : true, - contents: [] - }); - // 根据模板不同,创建不同的样式 - const templateId = this.domService.module.templateId; - if (templateId === 'double-list-in-tab-template') { - section.appearance.class = 'f-section-grid f-section-in-main px-0 pt-0'; - section.showHeader = false; - section.fill = true; - } - - // 2、 创建附件 - const uploadPreview = this.controlService.getControlMetaData(DgControl.FileUploadPreview.type); - - Object.assign(uploadPreview, { - id: buildInfo.componentId + '-file' - }); - section.contents.push(uploadPreview); - - // 附件信息udt字段 - let attachmentUdtField; - const selectedFields = buildInfo.selectedEntity && buildInfo.selectedEntity.type.fields; - if (selectedFields && selectedFields.length) { - attachmentUdtField = selectedFields.find(field => field.$type === FormSchemaEntityField$Type.ComplexField && field.type && field.type.name && field.type.name.includes('AttachmentInfo')); - } - if (!attachmentUdtField || !attachmentUdtField.type || !attachmentUdtField.type.fields) { - return [section]; - } - // 预置附件id字段和名称字段属性值 - const attachmentIdField = attachmentUdtField.type.fields.find(field => field.code === 'AttachmentId'); - const attachmentFileSortOrderField = attachmentUdtField.type.fields.find(field => field.code === 'FileSortOrder'); - const attachmentNameField = attachmentUdtField.type.fields.find(field => field.code === 'FileName'); - uploadPreview.attachmentFieldId = attachmentUdtField.label; - if (attachmentFileSortOrderField) { - uploadPreview.fileSortOrderKey = { - type: FormBindingType.Form, - path: attachmentFileSortOrderField.bindingField, - field: attachmentFileSortOrderField.id, - fullPath: attachmentFileSortOrderField.path, - bindingPath: attachmentFileSortOrderField.bindingPath - }; - } - if (attachmentIdField) { - uploadPreview.fieldIdKey = { - type: FormBindingType.Form, - path: attachmentIdField.bindingField, - field: attachmentIdField.id, - fullPath: attachmentIdField.path, - bindingPath: attachmentIdField.bindingPath - }; - } - if (attachmentNameField) { - uploadPreview.fileNameKey = { - type: FormBindingType.Form, - path: attachmentNameField.bindingField, - field: attachmentNameField.id, - fullPath: attachmentNameField.path, - bindingPath: attachmentNameField.bindingPath - }; - } - - - // 预置附件上传、删除命令 - const prefix = buildInfo.componentId.replace('fileuploadpreview', '').replace(/-/g, '').replace(/_/g, ''); - uploadPreview.fUploadDoneEvent = `${prefix}AddFileRows`; - uploadPreview.fileRemoveEvent = `${prefix}RemoveFileRows`; - - return [section]; - - } - createViewModeNode(buildInfo: ComponentBuildInfo): any { - // 3、 添加viewModel节点 - const viewModelNode = new FormViewModel(); - Object.assign(viewModelNode, { - id: `${buildInfo.componentIdPrefix}-viewmodel`, - code: `${buildInfo.componentIdPrefix}-viewmodel`, - name: buildInfo.componentName, - bindTo: buildInfo.bindTo, - parent: ROOT_VIEW_MODEL_ID, - fields: this.assembleViewModelFields(buildInfo), - commands: [], - states: [], - enableValidation: true, - pagination: { - enable: false - } - }); - - if (buildInfo.componentType === 'AppointmentCalendar') { - this.assembleAppointmentCalendarCommands(viewModelNode, buildInfo); - } - if (buildInfo.componentType === 'FileUploadPreview') { - this.assembleAttachementCommands(viewModelNode, buildInfo); - } - return viewModelNode; - } - - /** - * 组装viewModel fields 节点 - */ - private assembleViewModelFields(buildInfo: ComponentBuildInfo) { - - if (buildInfo.componentType === 'FileUploadPreview') { - return []; - } - const vmFields = []; - const { selectedFields } = buildInfo; - selectedFields.forEach(field => { - let updateOn = 'blur'; - const type = field.type.name; - if (type === FormSchemaEntityFieldTypeName.Enum || type === FormSchemaEntityFieldTypeName.Boolean) { - updateOn = 'change'; - } - - vmFields.push({ - type: FormBindingType.Form, - id: field.id, - fieldName: field.bindingField, - groupId: null, - groupName: null, - updateOn, - fieldSchema: {} - }); - }); - return vmFields; - } - - /** - * 默认创建的控件按照选定的布局设置样式,不支持自适应 - */ - private getFormControlClassName(buildInfo: ComponentBuildInfo) { - switch (buildInfo.formColumns) { - case 1: { - return 'col-12'; - } - case 2: { - return 'col-6'; - } - case 3: { - return 'col-4'; - } - case 4: { - return 'col-3'; - } - default: { - return ''; - } - } - } - - /** - * 添加附件上传、删除命令 - * @param viewModel 视图模型 - * @param buildInfo 组件构造上下文 - */ - private assembleAttachementCommands(viewModel: FormViewModel, buildInfo: ComponentBuildInfo) { - const prefix = buildInfo.componentId.replace('fileuploadpreview', '').replace(/-/g, '').replace(/_/g, ''); - const addCommandCode = `${prefix}AddFileRows`; - const removeCommandCode = `${prefix}RemoveFileRows`; - - let attachmentUdtField; - const attachCmpId = '31c1022c-ab40-4e8d-bc31-85d539f1d36c'; - const selectedFields = buildInfo.selectedEntity && buildInfo.selectedEntity.type.fields; - if (selectedFields && selectedFields.length) { - attachmentUdtField = selectedFields.find(field => field.$type === FormSchemaEntityField$Type.ComplexField && field.type && field.type.name && field.type.name.includes('AttachmentInfo')); - } - if (!attachmentUdtField) { - return; - } - const attachCommands = [ - { - id: `${addCommandCode}-id`, - code: addCommandCode, - name: '批量添加文件数据', - handlerName: 'addFileRows', - cmpId: attachCmpId, - params: [ - { - name: 'fileInfoFieldPath', - shownName: '文件信息字段路径', - value: `${buildInfo.bindTo}/${attachmentUdtField.label}` - } - ], - shortcut: {}, - extensions: [], - isInvalid: false - }, - { - id: `${removeCommandCode}-id`, - code: removeCommandCode, - name: '批量删除文件数据', - handlerName: 'removeFileRows', - cmpId: attachCmpId, - params: [ - { - name: 'fileInfoFieldPath', - shownName: '文件信息字段路径', - value: `${buildInfo.bindTo}/${attachmentUdtField.label}` - } - ], - shortcut: {}, - extensions: [], - isInvalid: false - } - ]; - - viewModel.commands = viewModel.commands.concat(attachCommands); - - // 在命令构件的引用信息中记录子表的命令对构件方法的引用。 - const webcmds = this.domService.getWebCmds(); - let attachcmd = webcmds.find(item => item.id === attachCmpId); - if (!attachcmd) { - attachcmd = { - id: attachCmpId, - path: 'Gsp/Web/AttachmentCmp/bo-attachmentcmp/metadata/webcmd', - name: 'FileController.webcmd', - refedHandlers: [] - }; - webcmds.push(attachcmd); - - // 涉及到新增控制器,所以这里需要获取控制器信息,方便交互面板展示命令数据。 - // if (this.formBasicService.envType === DesignerEnvType.designer) { - // // 低代码环境要先安装附件包的依赖 - // const metadataService = this.injector.get(GSPMetadataService); - // if (metadataService && metadataService.addDependencyAndRestore) { - // metadataService.addDependencyAndRestore(this.formBasicService.formMetaBasicInfo.relativePath, 'Inspur.GS.Gsp.Web.AttachmentCmp', true).subscribe(data => { - // if (this.webCmdService) { - // this.webCmdService.checkCommands(); - // } - // }); - // } - // } else { - if (this.webCmdService) { - this.webCmdService.checkCommands(); - } - // } - } - - for (const command of attachCommands) { - attachcmd.refedHandlers.push({ host: command.id, handler: command.handlerName }); - } - } - - /** - * 添加预约日历相关的变量、命令 - * @param viewModel 视图模型 - * @param buildInfo 组件构造上下文 - */ - private assembleAppointmentCalendarCommands(viewModel: FormViewModel, buildInfo: ComponentBuildInfo) { - // 预置变量 - viewModel.states.push( - { - id: `${buildInfo.componentId}-startDate`, - code: 'startDate', - name: '日历视图开始时间', - type: 'String', - category: 'locale' - }, - { - id: `${buildInfo.componentId}-endDate`, - code: 'endDate', - name: '日历视图结束时间', - type: 'String', - category: 'locale' - }, - { - id: `${buildInfo.componentId}-viewType`, - code: 'viewType', - name: '日历视图类型', - type: 'String', - category: 'locale' - }); - - // 预置命令 - const listControllerId = '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72'; - const calendarCommands = [ - { - id: `${buildInfo.componentId.replace(/-/g, '')}-load`, - code: `${buildInfo.componentId.replace(/-/g, '')}Load`, - name: '加载数据1', - handlerName: 'Load', - cmpId: listControllerId, - params: [], - shortcut: {}, - extensions: [] - }, - { - id: `${buildInfo.componentId.replace(/-/g, '')}-remove`, - code: `${buildInfo.componentId.replace(/-/g, '')}Remove`, - name: '删除当前数据1', - handlerName: 'Remove', - cmpId: listControllerId, - params: [ - { - name: 'id', - shownName: '待删除数据的标识', - value: `{DATA~/#{${buildInfo.componentIdPrefix}}/id}` - } - ], - shortcut: {}, - extensions: [] - }, - { - id: `${buildInfo.componentId.replace(/-/g, '')}-openAppAndAdd1`, - code: `${buildInfo.componentId.replace(/-/g, '')}OpenAppAndAdd1`, - name: '在新页签中打开应用页面新增数据1', - params: [{ - name: 'appId', - shownName: '应用标识', - value: '' - }, - { - name: 'appEntrance', - shownName: '应用入口', - value: '' - }, - { - name: 'params', - shownName: '附加参数', - value: '' - }, - { - name: 'tabName', - shownName: '标签页标题', - value: '' - }, - { - name: 'enableRefresh', - shownName: '支持刷新列表数据', - value: '' - }, - { - name: 'destructuring', - shownName: '是否解构参数', - value: '' - }], - handlerName: 'OpenAppAndAdd', - cmpId: listControllerId, - shortcut: {}, - extensions: [] - } - ]; - viewModel.commands = viewModel.commands.concat(calendarCommands); - - // 在命令构件的引用信息中记录新增方法。 - const webcmds = this.domService.getWebCmds(); - let listcmd = webcmds.find(item => item.id === listControllerId); - if (!listcmd) { - listcmd = { - id: listControllerId, - path: 'Gsp/Web/webcmp/bo-webcmp/metadata/webcmd', - code: 'ListController', - name: 'ListController.webcmd', - refedHandlers: [] - }; - webcmds.push(listcmd); - - // 涉及到新增控制器,所以这里需要获取控制器信息,方便交互面板展示命令数据 - if (this.webCmdService) { - this.webCmdService.checkCommands(); - } - } - - for (const command of calendarCommands) { - listcmd.refedHandlers.push({ host: command.id, handler: command.handlerName }); - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/index.ts b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/index.ts deleted file mode 100644 index a780cac9503ed57858f53967bb30b58cc308fd02..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { InnerComponentCreatorComponent } from './inner-component-creator.component'; -export { ComponentBuildInfo } from './inner-component-build-info'; diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-build-info.ts b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-build-info.ts deleted file mode 100644 index cc55f93cad0535323cf8890f33f881ee392e35c2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-build-info.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { FormSchemaEntity } from "@farris/designer-services"; - -export class ComponentBuildInfo { - componentId: string; - componentIdPrefix: string; - componentName: string; - componentType?: string; - componentAppearance?: string; - resolvedComponentType: string; - formColumns?: number; - parentContainerId?: string; - parentContainerType?: string; - editable?: boolean; // 目前列表类型组件只能选择子表,并且均可编辑 - selectedFields: any[]; - bindTo: string; - dataSource: string; - selectedEntity?: FormSchemaEntity; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.css b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.css deleted file mode 100644 index 0d877a724782bf8b5cfa6060e84c374e4182374d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.css +++ /dev/null @@ -1,26 +0,0 @@ -.entityDiv { - padding: 16px; - border: 1px solid #EFEFEF; - border-radius: 8px; -} - -.fieldsDiv { - padding: 0 16px 16px 16px; -} - -.fieldsDiv>div { - border: 1px solid #EFEFEF; - border-radius: 8px; -} - -.fieldsDiv>>>tr[ng-reflect-select-row-disabled=true] { - cursor: not-allowed; -} - -.fieldsDiv>>>tr td { - padding: 0.25rem 0.75rem; -} - -.entityDiv>>>tr[ng-reflect-select-row-disabled=true] { - cursor: not-allowed; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.html b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.html deleted file mode 100644 index f5042d68d090b29d4106d5cae69b16ec03c6c298..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -
-
-
- - -
-
-
- - -
-
-
-
-
-

组件信息

-
-
-
-
-
-
- -
- - -
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- - -
-
- - - - - {{col.title}} - {{col.title}} -
- - -
-
- - -
- - - - - - - {{rowData.name}} - - - {{rowData.bindingField}} - - - {{rowData.type.displayName || rowData.type.name}} - -
- - -
- - -
-
-
-
- - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.spec.ts deleted file mode 100644 index da7bdfb72124881afebe1368b768a331ddcf31b5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { InnerComponentCreatorComponent } from './inner-component-creator.component'; - -describe('InnerComponentCreatorComponent', () => { - let component: InnerComponentCreatorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ InnerComponentCreatorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(InnerComponentCreatorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.ts deleted file mode 100644 index 39f5b6eee2abcf7826a19eafe9b4ee8e88c16d47..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/inner-component-creator/inner-component-creator.component.ts +++ /dev/null @@ -1,761 +0,0 @@ -import { Component, EventEmitter, HostBinding, Input, NgZone, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { DesignerEnvType, DomService, FormBasicService, FormComponentType, FormSchemaEntity, FormSchemaEntityField, SchemaService } from '@farris/designer-services'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeTableComponent } from '@farris/ui-treetable'; -import { cloneDeep } from 'lodash-es'; -import { DgControl } from '@farris/designer-services'; -import { ComponentBuildInfo } from './inner-component-build-info'; - -/** - * 创建组件: - * 场景1:控件工具箱中拖拽Form DataGrid图标。传入组件类型(componentType),需要用户选择实体和实体展示字段 - * 场景2:实体树中拖拽实体节点。传入实体id(fixedEntityId),需要用户选择组件类型、(实体)、实体展示字段 - * 场景3:控件树中点击组件节点右键菜单,创建同级组件或者选中标签页添加子级DataGrid。传入组件类型(componentType),需要用户选择实体和实体展示字段 - */ -@Component({ - selector: 'inner-component-creator', - templateUrl: './inner-component-creator.component.html', - styleUrls: ['./inner-component-creator.component.css'] -}) -export class InnerComponentCreatorComponent implements OnInit { - @HostBinding('class') - cls = 'd-flex f-utils-fill-flex-column h-100'; - - @ViewChild('btns') btns: TemplateRef; - - /** 需要创建的组件类型: form/Form/form-col-xx/DataGrid/ListView/FileUploadPreview */ - @Input() componentType = ''; - - /** 允许选择的实体级别,不填则不限制。 1:主表;2:从表;3从从表 */ - @Input() allowedEntityLevel: number; - - /** 固定选择实体Id.用于实体树上实体节点拖拽生成控件时使用。 */ - @Input() fixedEntityId = ''; - - /** 展示字段列表是否需要排除掉已添加的字段----默认排除 */ - @Input() needExcludeDisplayedFields = true; - - /** 实体列表是否需要排除掉已使用的实体----默认不排除 */ - @Input() needExcludeDisplayedEntity = false; - - /** 目标组件是否在侧边栏中 */ - @Input() bindingTargetInSidebar: boolean; - - /* 保存前事件,用于保存前的扩展操作 */ - @Output() beforeSave = new EventEmitter(); - - @Output() save = new EventEmitter(); - - @Output() cancel = new EventEmitter(); - - // 步骤条信息 - activeIndex = 0; - currentId = 'selectTable'; - stepMessages = []; - - // 实体树表实例 - @ViewChild('schemaTree') schemaTree: TreeTableComponent; - - /** 实体树表数据源 */ - schemaSource = []; - - /** 实体树表列配置 */ - schemaTreeColumns = [{ field: 'name', title: '名称' }]; - - /** 选中的实体表 */ - selectedEntity; - /** 选中的表节点(树节点) */ - selectedEntityTreeNode; - - /** 默认选中的表ID */ - defaultSelectedCmp: any; - - - /** 是否选中主表 */ - isSelectMainTable = false; - - /** 记录主表信息 */ - mainTable; - - /** 记录所有表的编号信息,便于在新增子表是查重 */ - tableCodes = []; - - /** 展示字段树表实例 */ - @ViewChild('fieldsTree') fieldsTree: TreeTableComponent; - /** 展示字段树表数据源 */ - fieldsSource = []; - /** 展示字段树表列配置 */ - filedsTreeColumns = [ - { field: 'name', title: '字段名称' }, { field: 'bindingField', title: '绑定字段' }, - { field: 'type', title: '字段类型', width: 100 }, { field: 'show', title: '显示', width: 120 } - ]; - /** 是否全选字段 */ - selectedAllFields = false; - /** 字段勾选配置 */ - selected = {}; - /** 选中的字段 */ - selectedFields = []; - /** 筛选是否为parentID && id */ - bindingFields = []; - /** 组件的构造信息 */ - buildInfo: ComponentBuildInfo = { - componentId: '', - componentIdPrefix: '', - componentName: '', - componentType: '', - componentAppearance: '', - resolvedComponentType: '', - formColumns: 4, - parentContainerId: null, - editable: true, // 目前列表类型组件只能选择子表,并且均可编辑 - selectedFields: [], - bindTo: '', - dataSource: '' - }; - - /** 当前表单schema实体 */ - schemaEntity; - - /** 表单中已添加的字段集合,用于添加卡片组件时排除掉页面中已创建过控件的字段 */ - displayedFieldsMap = new Map(); - - /** 选中的实体下是否包含可勾选的字段,用于没有可选字段时不显示全选按钮 */ - hasSelectableFields = false; - - /** 表单中已创建过的列表label结合,用于添加列表组件时排除掉页面中已创建过列表的实体 */ - private engagedEntityLabels: Set; - - /** DOM结构中Component节点记录的componentType */ - private resolvedComponentType; - - /** 是否需要用户选择组件类型 */ - needSelectComponentType = false; - - /** 可选的组件类型 */ - componentTypeList = []; - - /** 组件标题 */ - componentName: string; - - /** 当前设计器运行环境是否为零代码环境 */ - isNoCodeDesingerEnv: boolean; - - /** 当前设计器运行环境是否为零代码环境 */ - desingerEnv: any; - constructor( - private notifyService: NotifyService, - private domServ: DomService, - private schemServ: SchemaService, - private formBasicServ: FormBasicService, - private ngZone: NgZone) { } - - - ngOnInit() { - if (!this.componentType) { - this.componentType = ''; - } - - this.isNoCodeDesingerEnv = this.formBasicServ && this.formBasicServ.envType === DesignerEnvType.noCode; - this.desingerEnv = this.formBasicServ && this.formBasicServ.envType; - - this.initProgressData(); - this.currentId = this.stepMessages[0].id; - - // 现有的schema实体 - const entityOrigin = this.schemServ.getSchemaEntities(); - this.schemaEntity = cloneDeep(entityOrigin); - - this.assembleSchemaSource(); - - // 默认排除已选字段 - if (this.needExcludeDisplayedFields === undefined) { - this.needExcludeDisplayedFields = true; - } - - this.needSelectComponentType = !this.componentType; - if (this.componentType) { - this.resolvedComponentType = this.getComponentResolovedType(); - } - } - - /** - * 步骤条信息 - */ - private initProgressData() { - // 不确定组件类型、确定绑定实体:场景为实体树拖实体节点 - if (!this.componentType && this.fixedEntityId) { - this.stepMessages = [ - { id: 'selectComponentType', title: '选择组件类型' }, - { id: 'selectShowFields', title: '选择显示字段' } - ]; - return; - } - // 确定组件类型、确定绑定实体:场景为控件树Form组件增加同级 - if (this.componentType && this.fixedEntityId) { - this.stepMessages = [ - { id: 'selectShowFields', title: '选择显示字段' } - ]; - return; - } - // 工具箱拖附件,只需要选择实体,不需要选择字段 - if (this.componentType === 'FileUploadPreview' || this.componentType === 'ListView') { - if (this.desingerEnv === DesignerEnvType.mobileDesigner) { - this.stepMessages = [ - { id: 'selectTable', title: '选择实体' }, - { id: 'selectShowFields', title: '选择显示字段' } - ]; - } else { - this.stepMessages = [ - { id: 'selectTable', title: '选择实体' } - ]; - } - - return; - } - - // 移动附件列表添加 - if (this.componentType === 'ChildAttachList' || this.componentType === 'Attachment') { - this.stepMessages = [ - { id: 'selectTable', title: '选择实体' } - ]; - return; - } - if (this.componentType === 'AttachmentEntry') { - this.stepMessages = [ - { id: 'selectTable', title: '选择实体' }, - { id: 'selectShowFields', title: '选择显示字段 (可选)' } - ]; - return; - } - - // 工具箱拖Form、DataGrid...不限制实体,都可以选择 - this.stepMessages = [ - { id: 'selectTable', title: '选择实体' }, - { id: 'selectShowFields', title: '选择显示字段' } - ]; - - - } - - /** - * 组装实体树 - */ - assembleSchemaSource() { - const schemaTree = this.assembleSchemaBasicInfo2Tree(this.schemaEntity[0], 1); - this.schemaSource = [schemaTree]; - if (this.defaultSelectedCmp) { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.schemaTree.selectNode(this.defaultSelectedCmp.id); - - // 若没有选择实体的步骤,则需要初始字段列表 - if (!this.stepMessages.find(step => step.id === 'selectTable')) { - - // 获取选中实体 - this.selectedEntity = this.defaultSelectedCmp; - if (this.needSelectComponentType) { - this.getSelectablecomponentLists(); - } - - this.assembleSchemaFields(); - } - }); - }); - } else { - - } - } - /** - * 将schema实体组装成树 - * 规则: 卡片类型组件只能选择主表,列表类型组件只能选择从表 - */ - private assembleSchemaBasicInfo2Tree(schemaEntity: FormSchemaEntity, level: number) { - const result = { - data: schemaEntity, - expanded: true, - children: [], - selectable: false - }; - if (level === 1) { - // 主表支持配置为卡片、列表、表格 - this.tableCodes = []; - this.mainTable = schemaEntity; - - // if (this.componentType.toLowerCase().startsWith('form') || this.componentType === 'ListView') { - result.selectable = this.fixedEntityId ? schemaEntity.id === this.fixedEntityId : true; - // } - } else { - // 不限制实体绑定次数 - if (this.needExcludeDisplayedEntity) { - const entityEngaged = this.checkEntityEngaged(schemaEntity); - result.selectable = this.fixedEntityId ? schemaEntity.id === this.fixedEntityId && !entityEngaged : !entityEngaged; - } else { - result.selectable = this.fixedEntityId ? schemaEntity.id === this.fixedEntityId : true; - } - } - - // 判断允许选择的实体层级 - if (this.allowedEntityLevel && level !== this.allowedEntityLevel) { - result.selectable = false; - } - - result.selectable = this.checkAttachmentBindingCondition(schemaEntity) && result.selectable; - - if (result.selectable) { - this.defaultSelectedCmp = this.defaultSelectedCmp || schemaEntity; - } - - this.tableCodes.push(schemaEntity.code); - - if (schemaEntity.type.entities && schemaEntity.type.entities.length) { - const childTable = schemaEntity.type.entities.map(ele => this.assembleSchemaBasicInfo2Tree(ele, level + 1)); - result.children.push(...childTable); - } - - return result; - } - - /** - * 校验与附件相关的绑定条件 - * @param schemaEntity 实体 - */ - checkAttachmentBindingCondition(schemaEntity: FormSchemaEntity) { - if (!['FileUploadPreview', 'DataGrid', 'ChildAttachList', 'AttachmentEntry', 'Attachment'].includes(this.componentType)) { - return true; - } - let haveAttachField = false; - if (schemaEntity.type && schemaEntity.type.fields) { - schemaEntity.type.fields.find((fitled) => { - if (fitled.type && - fitled.type.$type === 'ObjectType' && - fitled.type.fields && - fitled.type.fields.length >= 4 && - fitled.type.fields[0].code === 'AttachmentId' && - fitled.type.fields[1].code === 'FileName' && - fitled.type.fields[2].code === 'FileSize' && - fitled.type.fields[3].code === 'FileCreateTime' - ) { - haveAttachField = true; - return true; - } - return false; - }); - } - // 附件控件只能绑定带附件字段的实体 - if (this.componentType === 'FileUploadPreview' && !haveAttachField) { - return false; - } - - // 零代码:列表控件不能绑定带附件的实体 - if (this.isNoCodeDesingerEnv && this.componentType === 'DataGrid' && haveAttachField) { - return false; - } - - // 移动附件子表 - if ((this.componentType === 'ChildAttachList' || this.componentType === 'AttachmentEntry' || this.componentType === 'Attachment') && !haveAttachField) { - return false; - } - - return true; - } - - /** - * 切换选中的实体节点 - */ - selectedEntityChanged(selectedEntityNode: any) { - this.selectedAllFields = false; - this.selected = {}; - this.selectedFields = []; - this.selectedEntityTreeNode = selectedEntityNode.node; - this.isSelectMainTable = !selectedEntityNode.node.parent; - } - - clickSelectAllFieldsCheckbox() { - this.selectedFields = []; - this.selectAllChange(this.fieldsSource); - - } - - selectAllChange(fieldsSource) { - if (fieldsSource.length === 0) { - return; - } - fieldsSource.forEach(fieldTreeNode => { - const bindingField = fieldTreeNode.data.bindingField; - if (fieldTreeNode.children && fieldTreeNode.children.length > 0) { - this.selectAllChange(fieldTreeNode.children); - } else { - if (fieldTreeNode.selectable) { - this.selected[bindingField] = this.selectedAllFields; - if (this.selectedAllFields) { - this.selectedFields.push(fieldTreeNode.data); - } - } - - } - }); - } - - clickCheckbox(flag: boolean, rowData: any) { - if (flag) { - this.selectedFields.push(rowData); - const fieldCheckboxCount = this.fieldsTree.el.nativeElement.getElementsByClassName('k-checkbox').length - 1; - if (this.selectedFields.length === fieldCheckboxCount) { - this.selectedAllFields = true; - } - } else { - this.selectedFields = this.selectedFields.filter(f => f.bindingField !== rowData.bindingField); - this.selectedAllFields = false; - } - } - - /** - * 下一步 - */ - clickNextStep() { - switch (this.currentId) { - case 'selectTable': { - if (!this.schemaTree.selectedRow) { - this.notifyService.warning('请先选择实体'); - return; - } - // 获取选中实体 - this.selectedEntity = this.schemaTree.selectedRow.data; - - if (this.needSelectComponentType) { - this.getSelectablecomponentLists(); - } - - this.assembleSchemaFields(); - break; - } - case 'selectComponentType': { - if (!this.componentType) { - this.notifyService.warning('请先选择组件类型'); - return; - } - if (!this.componentName) { - this.notifyService.warning('请先填写组件标题'); - return; - } - this.resolvedComponentType = this.getComponentResolovedType(); - this.assembleSchemaFields(); - this.selectedFields = []; - this.selectedAllFields = false; - this.selected = {}; - break; - } - } - this.activeIndex = this.activeIndex + 1; - this.currentId = this.stepMessages[this.activeIndex].id; - - // 零代码:默认选中所有可选字段 - if (this.isNoCodeDesingerEnv) { - this.selectedAllFields = true; - this.selectAllChange(this.fieldsSource); - } - - } - /** - * 组装字段列表 - */ - assembleSchemaFields() { - const fields = this.selectedEntity.type.fields; - - this.displayedFieldsMap.clear(); - this.getDisplayedFieldsMapBySelectedEntity(); - - - this.hasSelectableFields = false; - this.fieldsSource = this.assembleFields2Tree(fields, true); - } - private getSelectablecomponentLists() { - let attachmentCode = []; - for (let i = 0; i < this.selectedEntity.type.fields.length; i++) { - attachmentCode.push(this.selectedEntity.type.fields[i].code); - } - // 主表 - if (this.isSelectMainTable) { - this.componentTypeList = [{ text: '卡片面板', value: 'Form' }, { text: '表格', value: 'DataGrid' }]; - } else if (attachmentCode.includes("Attachment")) { - this.componentTypeList = [{ text: '附件', value: 'FileUploadPreview' }]; - } else { - // 子表 - this.componentTypeList = [{ text: '表格', value: 'DataGrid' }, { text: '卡片面板', value: 'Form' }]; - } - if (!this.componentType) { - this.componentType = this.componentTypeList[0].value; - } - if (!this.componentName) { - this.componentName = this.selectedEntity.type.displayName; - } - - /** 拖入附件 立即创建 */ - // let attachmentCode = []; - // for(let i = 0;i< this.selectedEntity.type.fields.length;i++){ - // attachmentCode.push(this.selectedEntity.type.fields[i].code); - // } - // if(attachmentCode.includes("Attachment")){ - // this.componentTypeList =[{text: '附件', value: 'FileUploadPreview'}]; - // this.componentType = this.componentTypeList[0].value; - // this.selectedAllFields = true; - // this.clickSave(); - // } - } - /** - * 上一步 - */ - clickPreStep() { - this.activeIndex = this.activeIndex - 1; - this.currentId = this.stepMessages[this.activeIndex].id; - } - /** - * schema字段集合组装成树 - * @param fields schema字段集合 - */ - private assembleFields2Tree(fields: FormSchemaEntityField[], expandRelateNode = true) { - const treeData = []; - fields.forEach(element => { - // 关联表字段 / UDT字段 - let children = []; - if (element.type && element.type.fields && element.type.fields.length > 0) { - children = this.assembleFields2Tree(element.type.fields, true); - } - let selectable = this.displayedFieldsMap ? - children.length === 0 && !this.displayedFieldsMap.has(element.id) : children.length === 0; - - // 零代码: ID与ParentID字段不可选 - if (this.isNoCodeDesingerEnv && (element.code === 'ID' || element.code === 'ParentID')) { - selectable = false; - } - if (selectable) { - this.hasSelectableFields = true; - } - treeData.push({ - data: element, - children, - expanded: expandRelateNode, - selectable - }); - }); - return treeData; - } - - - /** - * 获取指定实体中已在当前表单中被占用的字段,场景:创建卡片组件时将已在其他组件中添加的字段排除掉 - */ - private getDisplayedFieldsMapBySelectedEntity() { - if (!this.selectedEntity) { - this.displayedFieldsMap.clear(); - return; - } - - // 根组件和table组件内的输入控件与form内不能重复 - let targetCmpType = this.resolvedComponentType; - if (targetCmpType === 'Frame' || targetCmpType === 'table' || (targetCmpType && targetCmpType.startsWith('form'))) { - targetCmpType = 'form'; - } - - this.domServ.viewmodels.forEach(viewModel => { - if (!viewModel.fields || viewModel.fields.length === 0) { - return; - } - const componentNode = this.domServ.getComponentByVMId(viewModel.id); - // 绑定同一个实体,并且是同类型的组件(form类、dataGrid类...) - let sourceCmpType = componentNode.componentType; - if (sourceCmpType === 'Frame' || sourceCmpType === 'table' || (sourceCmpType && sourceCmpType.startsWith('form'))) { - sourceCmpType = 'form'; - } - const entityInfo = this.schemServ.getTableInfoByViewModelId(viewModel.id); - - if (sourceCmpType !== targetCmpType || entityInfo.id !== this.selectedEntity.id) { - return; - } - /** 组件是否在侧边栏中 */ - const componentInSidebar = this.checkComponentIfInSidebar(componentNode.id); - - - // 若当前组件在侧边栏中,那么只收集同样在侧边栏中的字段。 - if (this.bindingTargetInSidebar && componentInSidebar) { - viewModel.fields.forEach(field => { - this.displayedFieldsMap.set(field.id, true); - }); - - } - - // 若当前组件不在侧边栏中,那么只收集不在侧边栏中的字段 - if (!this.bindingTargetInSidebar && !componentInSidebar) { - viewModel.fields.forEach(field => { - this.displayedFieldsMap.set(field.id, true); - }); - - } - - // if () { - // viewModel.fields.forEach(field => { - // this.displayedFieldsMap.set(field.id, true); - // }); - // } - }); - - } - - /** - * 触发保存 - */ - clickSave() { - let execute = false; - if (this.isNoCodeDesingerEnv && this.fieldsSource.length === 2) { - for (let i = 0; i < this.fieldsSource.length; i++) { - this.bindingFields.push(this.fieldsSource[i].data.bindingField); - if (this.bindingFields.includes('parentID') && this.bindingFields.includes('id')) { - execute = true; - } - } - } - if (this.componentType === 'FileUploadPreview' - || this.componentType === 'ListView' - || this.componentType === 'ChildAttachList' - || this.componentType === 'AttachmentEntry' - || this.componentType === 'Attachment' - ) { - if (!this.schemaTree.selectedRow) { - this.notifyService.warning('请先选择实体'); - return; - } - this.selectedEntity = this.schemaTree.selectedRow.data; - } else { - if (this.selectedFields.length === 0 && !execute) { - this.notifyService.warning('请先选择字段'); - return; - } - } - - if (this.desingerEnv === DesignerEnvType.mobileDesigner && this.selectedFields.length === 0 && this.componentType === 'ListView') { - this.notifyService.warning('请先选择字段'); - return; - } - - - this.buildInfo.componentId = this.selectedEntity.code.toLowerCase() + '-' + Math.random().toString(36).slice(2, 6); - this.buildInfo.componentIdPrefix = this.buildInfo.componentId + '-component'; - this.buildInfo.componentName = this.componentName || this.selectedEntity.type.displayName; - this.buildInfo.componentType = this.componentType; - // this.buildInfo.componentAppearance = this.getComponentAppearance(); - this.buildInfo.resolvedComponentType = this.resolvedComponentType; - this.buildInfo.formColumns = 4; - this.buildInfo.parentContainerId = ''; - this.buildInfo.selectedFields = this.selectedFields; - this.buildInfo.bindTo = '/' + this.getViewModelBindTo(this.selectedEntityTreeNode); - this.buildInfo.dataSource = this.selectedEntity.label; - - // 创建附件时保存选中的实体,用于获取实体中的附件udt - if (this.componentType === 'FileUploadPreview') { - this.buildInfo.selectedEntity = this.selectedEntity; - } - - this.save.emit(this.buildInfo); - } - - /** - * 取消 - */ - clickCancel() { - this.cancel.emit(); - } - - /** - * 根据组件类型获取DOM中Component节点的componentType属性 - */ - private getComponentResolovedType() { - switch (this.componentType) { - case 'form': case 'Form': { - // 这里默认为form-col-4 - return this.componentType.toLowerCase() + '-col-' + this.buildInfo.formColumns; - } - case 'DataGrid': case 'TreeGrid': { - return FormComponentType.dataGrid; - } - case 'ListView': - return FormComponentType.listView; - case 'FileUploadPreview': - return FormComponentType.attachmentPanel; - - default: { - if (this.componentType.startsWith('form-col-')) { - return this.componentType; - } - } - } - } - - /** - * 组装viewModel bindTo属性 - * @param node schema节点 - */ - private getViewModelBindTo(node: any) { - let parentLabel = ''; - if (node.parent && node.parent.parent) { - parentLabel = this.getViewModelBindTo(node.parent) + '/'; - } - if (node.parent) { - return parentLabel + node.data.label; - } - - return ''; - } - - - /** - * 检查实体是否被使用了 - * 同一类型的组件中是否已使用过实体 - * @param schemaEntity 被检查的实体 - */ - private checkEntityEngaged(schemaEntity: FormSchemaEntity) { - const targetCmpType = this.getComponentResolovedType(); - - if (!this.engagedEntityLabels) { - this.engagedEntityLabels = new Set(); - const vms = this.domServ.viewmodels; - vms.forEach(vm => { - if (vm.bindTo === '/' || vm.fakeDel) { - return; // 跳过对主表的处理 - } - const cmp = this.domServ.getComponentByVMId(vm.id); - if (cmp && cmp.componentType === targetCmpType) { - const lastSlashIndex = vm.bindTo.lastIndexOf('/'); - const tableCode = vm.bindTo.slice(lastSlashIndex + 1); - this.engagedEntityLabels.add(tableCode); - } - - // 临时修改:兼容移动端 - if ( - this.componentType === 'ChildList' - || this.componentType === 'ChildAttachList' - || this.componentType === 'AttachmentEntry' - || this.componentType === 'Attachment' - ) { - const lastSlashIndex = vm.bindTo.lastIndexOf('/'); - const tableCode = vm.bindTo.slice(lastSlashIndex + 1); - this.engagedEntityLabels.add(tableCode); - } - }); - } - - return this.engagedEntityLabels.has(schemaEntity.label); - } - - /** - * 检查卡片组件是否在侧边栏中,在侧边栏中的字段可以与非侧边栏中的字段重复。 - */ - private checkComponentIfInSidebar(cmpNodeId: string) { - const sidebar = this.domServ.selectNode(this.domServ.components[0], - item => item.type === DgControl.Sidebar && DgControl.Sidebar && DgControl.Sidebar.type && item.contents && item.contents.length && - item.contents.find(child => child.type === DgControl.ComponentRef.type && child.component === cmpNodeId)); - if (sidebar) { - return true; - } - return false; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/entity/schema-tree-node.ts b/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/entity/schema-tree-node.ts deleted file mode 100644 index 93adb716e728f063f539ef6af4a074a4fdf22f33..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/entity/schema-tree-node.ts +++ /dev/null @@ -1,26 +0,0 @@ - -import { TreeNode } from '@farris/ui-treetable'; - -export class SchemaTreeNode implements TreeNode { - id?: string; - - data: any; - - - /** 子节点集合 */ - children?: SchemaTreeNode[]; - - - /** 是否展开 */ - expanded?: boolean; - - - /** 父节点 */ - parent?: SchemaTreeNode; - - /** 节点类型 */ - nodeType?: 'entity' | 'childEntity' | 'field'; - - /** 实体绑定路径 */ - entityPath?: string; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.css b/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.css deleted file mode 100644 index 365054fa541302457c9c8401bb524e5878d3aa93..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.css +++ /dev/null @@ -1,5 +0,0 @@ -:host { - display: block; - height: 100%; - background: #fff; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.html b/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.html deleted file mode 100644 index f0b68864fbaf2b1866e76a709e1a0e6d1c1e4112..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.html +++ /dev/null @@ -1,5 +0,0 @@ - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.ts deleted file mode 100644 index 9cc2fa0461a0a8fe0fde5bf65899e2bf1b4070eb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/schema-tree/schema-tree.component.ts +++ /dev/null @@ -1,329 +0,0 @@ -import { Component, Injector, Input, NgZone, OnInit, ViewChild } from '@angular/core'; -import { DesignerEnvType, DomService, FormBasicService, FormSchemaEntityField$Type, SchemaService } from '@farris/designer-services'; -import { RowNode, TreeTableComponent } from '@farris/ui-treetable'; -import { IdeTreeComponent } from '../ide-tree/ide-tree.component'; -import { RefreshFormAfterSchemaChangedService } from '../update-schema/refresh-after-schema-changed.service'; -import { UpdateFormSchemaService } from '../update-schema/update-schema.service'; -import { SchemaTreeNode } from './entity/schema-tree-node'; - -@Component({ - selector: 'schema-tree', - templateUrl: './schema-tree.component.html', - styleUrls: ['./schema-tree.component.css'], -}) -export class SchemaTreeComponent implements OnInit { - - /** 可视化区域构造器 */ - @Input() designerBuilder: any; - /** 是否启用刷新 */ - @Input() enableRefresh = true; - - /** 实体树绑定数据 */ - public treeData: SchemaTreeNode[] = []; - - /** IDE实体树组件实例 */ - @ViewChild(IdeTreeComponent) private ideTree: IdeTreeComponent; - - leafIcon = ' f-icon f-icon-yxs_level text-primary mr-1'; - - constructor( - private schemaServ: SchemaService, - private ngZone: NgZone, - private injector: Injector, - private domServ: DomService, - private formBasicService: FormBasicService) { } - - ngOnInit() { - this.addSchemaTreeBodyToDragulaContainer(); - - if (this.formBasicService && this.formBasicService.envType === DesignerEnvType.designer) { - this.leafIcon = ' f-icon f-icon-preview mr-1'; - } - } - - - /** - * 组装schema实体的树数据 - */ - refreshTreeData() { - const schemaEntity = this.schemaServ.getSchemaEntities(); - const rootData = this.assembleSchemEntityTree(schemaEntity[0]) as any; - rootData.isMainEntity = true; - if (this.treeData.length) { - this.assignExpandState(rootData, this.treeData[0]); - } - this.treeData = [rootData]; - - - - } - - /** - * 更新拖拽列表中的实体树节点 - */ - updateTreeNodesInDragula() { - const tbody = this.ideTree.tt.el.nativeElement.querySelector('tbody.farris-treetable-tbody'); - if (tbody) { - this.addTreeBodyToDragula(tbody); - } - } - /** - * 组装实体树数据 - */ - private assembleSchemEntityTree(schemaEntity: any, entityPath: string = '/') { - const displayedFieldsMap = this.getViewModelFieldsByEntity(entityPath); - - let fieldsTree = []; - if (schemaEntity.type && schemaEntity.type.fields && schemaEntity.type.fields.length > 0) { - fieldsTree = this.schemaServ.assembleFields2Tree(schemaEntity.type.fields, false, displayedFieldsMap); - } - - const entityTree = { - data: schemaEntity, - children: fieldsTree, - expanded: true, - nodeType: 'entity', - entityPath - }; - const childTree = []; - if (schemaEntity.type.entities && schemaEntity.type.entities.length > 0) { - for (const en of schemaEntity.type.entities) { - const childEntityPath = `${entityPath === '/' ? '' : entityPath}/${en.label}`; - const childEntity = this.assembleSchemEntityTree(en, childEntityPath); - if (childEntity) { - childTree.push(childEntity); - } - } - entityTree.children.push( - { - data: { id: 'childEntity_' + schemaEntity.id, name: '子表' }, - children: childTree, - expanded: true, - nodeType: 'childEntity' - } - ); - } - - return entityTree; - } - - /** - * 刷新实体树时复制树展开状态 - * @param newData 新的treeData - * @param oldData 旧的treeData - */ - private assignExpandState(newData, oldData) { - // 展平oldData,放入map - const oldTreeNodeMap = new Map(); - const queue = [oldData]; - while (queue.length) { - const current = queue.shift(); - oldTreeNodeMap.set(current.id, current); - if (current.children && current.children.length) { - queue.push(...current.children); - } - } - - // 队列处理newData - queue.push(newData); - while (queue.length) { - const current = queue.shift(); - const id = current.data && current.data.id; - if (oldTreeNodeMap.has(id)) { - const oldNode = oldTreeNodeMap.get(id); - current.expanded = oldNode.expanded; - } - if (current.children && current.children.length) { - queue.push(...current.children); - } - } - } - - - /** - * 实体树加载完成后将tbody节点添加到可拖拽列表中 - */ - private addSchemaTreeBodyToDragulaContainer() { - - this.ideTree.loadSuccess.subscribe((data: { tt: TreeTableComponent, tbody: HTMLElement }) => { - this.addTreeBodyToDragula(data.tbody); - }); - } - - /** - * 将实体书tbody加到dragula的拖拽列表中 - * @param tbodyDom 树控件tbody元素节点 - */ - private addTreeBodyToDragula(tbodyDom: HTMLElement) { - if (!this.designerBuilder) { - return; - } - if (this.designerBuilder.instance.dragula) { - - this.designerBuilder.instance.dragula.containers = - this.designerBuilder.instance.dragula.containers.filter(e => !e.className.includes('farris-treetable-tbody')); - - // tbody节点不接收拖拽进来的内容 - if (!tbodyDom.className.includes('no-drop')) { - tbodyDom.className += ' no-drop'; - } - // 配置tr节点拖拽相关属性 - if (tbodyDom.children && tbodyDom.children.length) { - this.addDragClassToTrElement(tbodyDom); - } - // 添加到拖拽列表 - this.designerBuilder.instance.dragula.containers.push(tbodyDom); - } - } - - /** - * 树节点展开后,重新收集tbody容器 - * @param $event $event - */ - onTreeNodeExpand($event) { - const tbodyDom = $event.tbody; - // 点击节点前的展开图标时,需要等待子级tr渲染完成后,再收集容器 - if ($event.node) { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => this.addTreeBodyToDragula(tbodyDom)); - }); - } else { - // 点击搜索栏的展开按钮 - this.addTreeBodyToDragula(tbodyDom); - } - } - - /** - * 配置tr节点拖拽相关属性 - * @param tbodyDom 实体树tbody节点 - */ - private addDragClassToTrElement(tbodyDom: HTMLElement) { - Array.from(tbodyDom.children).forEach(trEle => { - const nodeId = trEle.getAttribute('id'); - const rowNode = this.getRowNodeById(nodeId); - if (!rowNode) { - if (!trEle.className.includes('no-drag')) { - trEle.className += ' no-drag'; - } - } else { - this.setDragContextToElement(rowNode, trEle); - } - - - }); - } - /** - * 根据id判断当前行是实体节点 or 字段节点 - */ - private getRowNodeById(nodeId: string) { - if (!nodeId || !nodeId.includes('rownode-') || nodeId.includes('rownode-childEntity')) { - return; - } - const id = nodeId.replace('rownode-', ''); - const rowNode = this.ideTree.tt.findRowNode(id); - - return rowNode; - - } - - private setDragContextToElement(rowNode: RowNode, trEle: Element) { - const treeNode = rowNode.node as SchemaTreeNode; - switch (treeNode.data.$type) { - // 简单字段节点 - case FormSchemaEntityField$Type.SimpleField: { - trEle.setAttribute('data-sourceType', 'field'); - trEle.setAttribute('data-fieldId', rowNode.node.data.id); - trEle.setAttribute('data-category', 'input'); - - if (!trEle.className.includes('drag-copy')) { - trEle.className += ' drag-copy'; - } - break; - } - // udt、关联字段节点 - case FormSchemaEntityField$Type.ComplexField: { - if (!trEle.className.includes('no-drag')) { - trEle.className += ' no-drag'; - } - break; - } - default: { - // 实体节点 - if (treeNode.nodeType === 'entity') { - trEle.setAttribute('data-sourceType', 'entity'); - trEle.setAttribute('data-fieldId', rowNode.node.data.id); - trEle.setAttribute('data-category', 'dataCollection'); - - if (!trEle.className.includes('drag-copy')) { - trEle.className += ' drag-copy'; - } - } - } - } - - } - /** - * 更新schema - */ - onUpdateSchema() { - const refreshAfterChangedServ = new RefreshFormAfterSchemaChangedService( - this.injector - ); - - const updateSchemaService = new UpdateFormSchemaService(this.injector); - updateSchemaService.synchronizeVO(refreshAfterChangedServ); - } - - /** - * 行颜色 - */ - rowCls = (row, data, index, rowNode) => { - const nodeData = rowNode.node; - if (!nodeData) { - return; - } - - if (this.formBasicService && this.formBasicService.envType === DesignerEnvType.designer) { - return { - cls: nodeData.isUsed ? 'used' : '!used' - }; - } - - } - /** - * 获取指定实体下,在页面上展示的字段列表 - */ - private getViewModelFieldsByEntity(entityPath: string): Map { - if (!this.domServ) { - return; - } - const viewModels = this.domServ.viewmodels; - const fieldsMap = new Map(); - /** 记录每个字段出现了多少次。 */ - const fieldsCountingMap = new Map(); - - // 可能多个视图模型绑定同一个实体 - const matchingViewModels = viewModels.filter(viewModel => viewModel.bindTo === entityPath); - matchingViewModels.forEach(viewModel => { - if (viewModel.fakeDel) { - return; - } - const cmp = this.domServ.getComponentByVMId(viewModel.id); - if (!cmp || cmp.fakeDel) { - return; - } - if (!viewModel.fields) { - return; - } - viewModel.fields.forEach(field => { - const count = fieldsCountingMap.has(field.id) ? fieldsCountingMap.get(field.id) + 1 : 1; - fieldsCountingMap.set(field.id, count); - }); - }); - fieldsCountingMap.forEach((count, id) => { - fieldsMap.set(id, true); - }); - return fieldsMap; - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/prop-name.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/prop-name.ts deleted file mode 100644 index 41d44b542731adfc4205ec9a7a32e541df17a462..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/prop-name.ts +++ /dev/null @@ -1,36 +0,0 @@ -export class SchemaPropName { - static propNameMap = { - $type: '类型', - id: 'ID', - originalId: '原始ID', - code: '编号', - name: '名称', - label: '标签', - bindingField: '绑定字段', - defaultValue: '默认值', - require: '必填', - readonly: '只读', - type: '类型属性', - length: '长度', - precision: '精度', - editor: '编辑器属性', - format: '格式', - valueType: '值类型', - enumValues: '枚举项', - dataSource: '帮助数据源', - textField: '文本字段', - valueField: '值字段', - displayType: '显示类型', - helpId: '帮助元数据ID', - mapFields: '帮助映射', - path: '路径', - editable: '允许编辑', - multiLanguage: '多语' - }; - - static getName(propCode: string) { - return this.propNameMap[propCode] || propCode; - } -} - - diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh-after-schema-changed.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh-after-schema-changed.service.ts deleted file mode 100644 index bda1e8d3f2220c15189aa21e3dd08d089f82cd7d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh-after-schema-changed.service.ts +++ /dev/null @@ -1,296 +0,0 @@ -import { - DesignViewModelService, SchemaService, DomService, DesignViewModel, - FormSchemaEntityFieldType$Type -} from '@farris/designer-services'; -import { DesignerHostSettingService, DgControl } from '@farris/designer-services'; -import { merge, get, set } from 'lodash-es'; -import { Injector } from '@angular/core'; - -import { SchemaChangeEntity } from './refresh.service'; - -/** - * 更新表单Schema后,同步控件的服务 - */ -export class RefreshFormAfterSchemaChangedService { - - private domService: DomService; - private schemaService: SchemaService; - private dgViewModelService: DesignViewModelService; - private controlCreatorService: any; - private schemaDOMMapping: any; - - constructor( - private injector: Injector) { - this.domService = this.injector.get(DomService); - this.schemaService = this.injector.get(SchemaService); - this.dgViewModelService = this.injector.get(DesignViewModelService); - - const designerHostService = this.injector.get(DesignerHostSettingService); - this.schemaDOMMapping = designerHostService.designerHost.getService('SchemaDOMMapping'); - this.controlCreatorService = designerHostService.designerHost.getService('ControlCreatorService'); - - } - - /** - * 刷新schema后更新DOM结构:原则:变更的属性不在VM.fieldSchema里 - * @param changes - */ - refreshAfterSchemaChange(changes: SchemaChangeEntity) { - - const dgViewModels = this.dgViewModelService.getDgViewModels(); - dgViewModels.forEach(dgViewModel => { - if (!dgViewModel.fields || dgViewModel.fields.length === 0) { - return; - } - dgViewModel.fields.forEach(field => { - // 1、 获取当前VM对应的组件中绑定该字段的所有控件 - const controls = this.domService.getControlsInCmpWidthBinding(dgViewModel.id, field.id); - // 字段不存在:若是table类型,则需要自动移除编辑器 - if (field.isSchemaRemoved) { - this.updateTableEditorAfterSchemaFieldRemoved(controls, dgViewModel.id); - } - const fieldChanges = changes[field.id]; - - - if (!fieldChanges) { - return; - } - - if (!controls && controls.length === 0) { - return; - } - - // 2、判断是否需要替换控件:字段类型更改并且后替换控件 - // udt和关联字段,不要同步,需要手动删除。 - const typeChange = fieldChanges.find(c => c.propPath === 'type.$type'); - const editorChange = fieldChanges.find(c => c.propPath === 'editor' || c.propPath === 'editor.$type'); - const multiLanguageChange = fieldChanges.find(c => c.propPath === 'multiLanguage' && c.newValue === true); - - // ① 替换控件 - if (typeChange && editorChange) { - this.changeControlType(controls, field, dgViewModel); - return; - } - - // 若多语属性由false-->true,需要替换控件 - if (multiLanguageChange && editorChange) { - this.changeControlType(controls, field, dgViewModel); - return; - } - - // ② 不需要替换控件 - this.updateControlsBySchemaChange(fieldChanges, controls, field, dgViewModel.id); - }); - }); - - } - /** - * 对于table中的输入控件,若绑定字段被移除,需要自动清除单元格的绑定,因为目前table显示视图模型 - * @param controls - * @param viewModelId - */ - private updateTableEditorAfterSchemaFieldRemoved(controls: any[], viewModelId: string) { - if (controls && controls.length) { - const fieldIds = []; - controls.forEach(control => { - if (control.showInTable && control.binding && control.binding.field) { - fieldIds.push(control.binding.field); - this.assignControlDom(control, { type: null, binding: null }); - } - }); - - this.deleteFieldById(viewModelId, fieldIds); - } - } - - /** - * 根据控件变更集更新控件。 - * @param fieldChanges 字段变更集 - * @param controls 控件列表 - * @param dgField 字段 - * @param viewModelId 模型ID - */ - private updateControlsBySchemaChange(fieldChanges, controls, dgField, viewModelId) { - let updateChanges = []; - const viewModelField = this.domService.getViewModelFieldById(viewModelId, dgField.id); - const fieldSchema = viewModelField.fieldSchema; - - // ① 收集需要在控件上变更的属性:VM上没有变更记录 或者 变更的属性不在VM的变更记录中 - if (!fieldSchema) { // 字段没有变更记录 - updateChanges = updateChanges.concat(fieldChanges) - } else { - // 判断变更是否在fieldSchema中,若在不更control,若不在,更control(因为表单对控件的变更优先于VO的变更) - fieldChanges.forEach(change => { - const propInVm = get(fieldSchema, change.propPath, 'notFound'); - if (propInVm === 'notFound') { - updateChanges.push(change); - } - }); - } - if (updateChanges.length === 0) { - return; - } - - // ③ 更新control属性 - controls.forEach(control => { - const domChangeset = this.getDomChangeBySchemaChange(control, updateChanges); - merge(control, domChangeset); - - // 若schema bindingField 变更,需要同步viewmodel field中的fieldName值 - const bindingFieldProp = updateChanges.find(c => c.propPath === 'bindingField'); - if (bindingFieldProp) { - viewModelField.fieldName = bindingFieldProp.newValue; - } - - // 数字类型从普通浮点数转为大数字:不更换控件,但要修改控件bigNumber属性 - if (control.type === DgControl.NumericBox.type) { - const bigNumber = updateChanges.find(c => c.propPath === 'type.$type' && c.newValue.includes('NumericType')); - if (bigNumber) { - control.bigNumber = bigNumber.newValue === FormSchemaEntityFieldType$Type.BigNumericType; - } - } - if ((control.type === 'GridField' || control.type === 'TreeGridField') && - control.editor && control.dataType === 'number') { - const bigNumber = updateChanges.find(c => c.propPath === 'type.$type' && c.newValue.includes('NumericType')); - if (bigNumber) { - control.editor.bigNumber = bigNumber.newValue === FormSchemaEntityFieldType$Type.BigNumericType; - } - } - }); - - } - - /** - * schema变更字段类型后替换DOM控件 - * @param controls - * @param dgField - */ - private changeControlType(controls, dgField, dgViewModel: DesignViewModel) { - // 删除VM上针对原字段的修改 - const schema = this.schemaService.getFieldByIDAndVMID(dgField.id, dgViewModel.id); - dgViewModel.clearFieldChange(schema.schemaField, dgField); - - this.clearExpressionByFieldId([dgField.id]); - - controls.forEach(control => { - if (dgField.$type === 'ComplexField') { - // 复杂字段相关控件由用户在视图模型中手动删除 - // this.notifyService.warning({ - // title: '系统提示', msg: '请删除复杂字段【' + dgField.name + '】相关控件!', timeout: 3000 - // } as NotifyOptions); - - // table内的输入控件自动移除单元格的绑定数据 - if (control.showInTable) { - this.assignControlDom(control, { type: null, binding: null }); - this.deleteFieldById(dgViewModel.id, [dgField.id]); - } - return; - } - if (control.type === DgControl.GridField.type || control.type === DgControl.TreeGridField.type) { - const editable = control.editor ? true : false; - const metadata = this.controlCreatorService.createGridFieldBySchemaFeild(dgField, '', - editable, control.type, control.controlSource); - // 保留原id、dataField - metadata.id = control.id; - metadata['dataField'] = control.dataField; - if (editable) { - metadata['editor']['id'] = control.editor.id; - } - // 仍使用原来的controlSource和frozen属性 - if (control.controlSource) { - metadata.controlSource = control.controlSource; - } - if (control.frozen) { - metadata.frozen = control.frozen; - } - this.assignControlDom(control, metadata); - } else { - let metadata; - if (control.showInTable) { - metadata = this.controlCreatorService.createTableTdControlBySchemaFeild(dgField, ''); - } else { - metadata = this.controlCreatorService.createControlBySchemaFeild(dgField, ''); - } - // 保留原id、name、样式 - metadata.id = control.id; - metadata['title'] = control['title']; - metadata['appearance'] = control.appearance; - - // 只读属性:除非配置为表达式,否则都沿用旧控件的只读值 - if (!(control.readonly && control.readonly.type === 'Expression')) { - metadata['readonly'] = control.readonly; - } - this.assignControlDom(control, metadata); - - - } - }); - - - } - /** - * 根据schema的变更获取DOM对应的变更 - * @param controlDom 控件DOM - * @param changeObjects schema变更集合 - */ - private getDomChangeBySchemaChange(controlDom, changeObjects) { - const schemaChangePaths = changeObjects.map(c => c.propPath); - const mappingArray = this.schemaDOMMapping.mappingDomPropAndSchemaProp(controlDom); - const domChangeset = {}; - mappingArray.map(m => { - if (schemaChangePaths.includes(m.schemaField)) { - const changeObject = changeObjects.find(c => c.propPath === m.schemaField); - - // 只读、必填属性单独处理: 需要同步的场景有:1、控件设置为boolean时(状态机、表达式等不更新)2、vo上属性由false改成true - if (m.schemaField === 'readonly') { - if (typeof (controlDom.readonly) === 'boolean' || changeObject.newValue === true) { - set(domChangeset, m.domField, changeObject.newValue); - } - } else if (m.schemaField === 'require') { - if (typeof (controlDom.require) === 'boolean' || changeObject.newValue === true) { - set(domChangeset, m.domField, changeObject.newValue); - } - } else { - set(domChangeset, m.domField, changeObject.newValue); - } - } - }); - - return domChangeset; - } - - - - private assignControlDom(oldControlDom, metadata) { - for (const key of Object.keys(oldControlDom)) { - delete oldControlDom[key]; - } - Object.assign(oldControlDom, metadata); - - } - /** - * 根据VMID和字段ID删除字段 - * @param viewModelId VMID - * @param fieldIdList 字段ID列表 - */ - private deleteFieldById(viewModelId: string, fieldIdList: string[]) { - const dgViewModel = this.dgViewModelService.getDgViewModel(viewModelId); - if (!dgViewModel) { return; } - - dgViewModel.removeField(fieldIdList); - - - this.clearExpressionByFieldId(fieldIdList); - - } - - /** - * 若字段配置了表达式,需要删除表达式 - */ - private clearExpressionByFieldId(fieldIdList: string[]) { - if (this.domService.expressions && this.domService.expressions.length && fieldIdList.length) { - this.domService.expressions = this.domService.expressions.filter(e => !fieldIdList.includes(e.fieldId)); - } - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh.service.ts deleted file mode 100644 index 97e58c4dcb5abdf100037cad181aa283facf54ca..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/refresh.service.ts +++ /dev/null @@ -1,19 +0,0 @@ - -/** - * 表单schema更新后,同步控件的服务 - */ -export abstract class IRefreshAfterChangedService { - - /** 表单schema更新后,同步控件的逻辑 */ - public abstract refreshAfterSchemaChange(changes: SchemaChangeEntity); -} - -/** - * 变更实体 - */ -export class SchemaChangeEntity { - [fieldId: string]: [{ - propPath: string; - newValue: any; - }] -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.css b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.css deleted file mode 100644 index 78bb41a2b10901e93362866d9a930244d7d58582..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.css +++ /dev/null @@ -1,4 +0,0 @@ -farris-treetable { - border-radius: 6px; -} - diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.html b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.html deleted file mode 100644 index 632c2e1bb518e38ec7e72fb32790c59e91c9f49a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - {{col.title}} - {{col.title}} -
- - -
-
- - - -
- - - - - - {{rowData.name}} - - - {{rowData.bindingField}} - - -
- - -
- - -
-
-
-
- - - - - - - {{col.title}} - {{col.title}} -
- - -
-
- - - -
- - - - - - {{rowData.name}} - - - {{rowData.bindingField}} - - -
- - -
- - -
-
-
-
- - -
-
- - -
- -
-
- - -
-
-
- 字段类型/编辑器类型已更改,请选中以下所有变更!更新后将自动替换相关控件。 -
-
- 字段类型已更改,请选中以下所有变更! -
-
- 字段类型已更改,更新后需要手动删除已经绑定此关联字段的控件,并重新添加。 -
-
- - - - - {{col.title}} - {{col.title}} -
- - -
-
- - - -
- - - - - - {{rowData.oldValueShowName||'点击查看'}} - - - {{rowData.newValueShowName||'点击查看'}} - - - {{rowData[col.field]}} - - - {{rowData[col.field]}} - -
- - -
- - -
-
-
-
-
-
-
-
-
- - - - - - - - - - -
-
 {{showPropObject(oldValue)}}
-
-
- - -
-
 {{showPropObject(newValue)}}
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.spec.ts deleted file mode 100644 index 363f58d510c4d4240a7eebc758a33f8a0e23fa52..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { UpdateSchemaComponent } from './update-schema.component'; - -describe('UpdateSchemaComponent', () => { - let component: UpdateSchemaComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ UpdateSchemaComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UpdateSchemaComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.ts deleted file mode 100644 index f03f9552b77f15d0c54ca02335cc6955ac67bc80..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.component.ts +++ /dev/null @@ -1,876 +0,0 @@ -import { - Component, OnInit, ViewChild, TemplateRef, Output, EventEmitter, Renderer2, ElementRef, ChangeDetectorRef, Input, ViewChildren -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { cloneDeep, set } from 'lodash-es'; -import { SchemaPropName } from './prop-name'; -import { VariableContrastService } from './variable-contrast.service'; -import { FormSchema, FormSchemaEntity, FormSchemaEntityField, DomService, DesignViewModelService, RefreshFormService } from '@farris/designer-services'; -import { IRefreshAfterChangedService } from './refresh.service'; -import { PopoverDirective } from '@farris/ui-popover'; -import { FarrisTabComponent } from '@farris/ui-tabs'; - -/** - * 更新表单Schema组件 - */ -@Component({ - selector: 'app-update-schema', - templateUrl: './update-schema.component.html', - styleUrls: ['./update-schema.component.css'], - providers: [VariableContrastService] -}) -export class UpdateSchemaComponent implements OnInit { - @Input() oldSchema: FormSchema; - @Input() newSchema: FormSchema; - @Input() refreshAfterChangedServ: IRefreshAfterChangedService; - @Output() closeModal = new EventEmitter(); - - @ViewChild('btns') btns: TemplateRef; - @ViewChildren(PopoverDirective) popoverContainers: Array; - @ViewChild(FarrisTabComponent) tabCmp: FarrisTabComponent; - - /** 旧schema */ - oldSchemaEntities: FormSchemaEntity[]; - - /** 新schema */ - newSchemaEntities: FormSchemaEntity[]; - - /** 新增字段树表绑定数据 */ - addedTreeData: TreeNode[] = []; - - /** 删除字段树表绑定数据 */ - deletedTreeData: TreeNode[] = []; - - /** 选中的新增字段 */ - addSelected; - - /** 选中的删除字段 */ - deleteSelected; - - addedFields; - - /** 表格列配置 */ - treeCols = [{ field: 'name', title: '名称' }, { field: 'bindingField', title: '绑定字段' }, { field: 'select', title: '更新' }]; - - /** 新增的表 */ - addedTable = []; - - /** 删除的表 */ - deletedTable = []; - - /** 新增字段--全选 */ - addFieldSelectedAll = true; - - /** 删除字段---全选 */ - deleteFieldSelectedAll = true; - - /** 变更字段左侧树列配置 */ - leftTreeCols = [{ field: 'name', title: '字段名称' }]; - - /** 变更字段左侧树绑定数据 */ - changeLeftTreeData = []; - - /** 变更字段左侧树选中节点id */ - selectedTreeKey = ''; - - /** 是否显示变更列表 */ - showChangeContrast = false; - - /** 变更集合 */ - changeContrast = {}; - - /** 选中的变更集合 */ - changeSelected = {}; - - /** 字段的全选 */ - selectedAll = {}; - - /** 平铺的变更集合 */ - changeList = []; - - /** 全选变更checkbox */ - selectAllChange = false; - - /** 变更radio 分类 */ - updateRadioTypes = [{ value: false, text: '部分更新' }, { value: true, text: '全部更新' }]; - - - /** 变更字段类型和编辑器类型的字段集合,用于页面中提示用户进行全选操作 */ - changeFieldTypeEditorTypeList = []; - - /** 变更字段类型,但编辑器类型不变的字段集合,用于页面中提示用户进行全选操作 */ - changeFieldTypeList = []; - - /** 变更复杂字段类型的字段集合,用于页面中提示用户将会删除已有控件,需要手动添加 */ - changeComplexFieldTypeList = []; - - /** 变更树表列配置 */ - changedTreeCols = [ - { field: 'propName', title: '属性名称' }, - { field: 'propCode', title: '属性编号' }, - { field: 'oldValue', title: '当前值' }, - { field: 'newValue', title: '新值' }, - { field: 'select', title: '更新', width: 120 } - ]; - - - /** schema变量结构 */ - variableList = []; - - /** 变量树表列配置 */ - varTreeCols = [ - { field: 'name', title: '变量名称' }, - { field: 'code', title: '变量编号' }, - { field: 'type', title: '变量类型' }, - { field: 'modifyType', title: '更新' } - ]; - - /** 变量树表绑定数据 */ - variableTreeList = []; - - /** 是否更新变量 */ - isUpdateVariable = false; - - - constructor( - private notifyService: NotifyService, - private domService: DomService, - private dgVMService: DesignViewModelService, - private variableService: VariableContrastService, - private refreshFormService: RefreshFormService, - private el: ElementRef, - private cd: ChangeDetectorRef) { - } - - ngOnInit() { - this.show(this.oldSchema, this.newSchema); - } - - show(oldSchema: FormSchema, newSchema: FormSchema) { - this.init(oldSchema, newSchema); - this.recursiveOldSchema(this.oldSchemaEntities, this.newSchemaEntities); - this.recursiveNewSchema(this.oldSchemaEntities, this.newSchemaEntities); - - // 变量 - this.variableList = newSchema.variables; - this.variableTreeList = this.variableService.getVariableTree(newSchema.variables, oldSchema.variables); - - // 新增、删除全选按钮 - this.addFieldSelectedAll = Object.keys(this.addSelected).length > 0; - this.deleteFieldSelectedAll = Object.keys(this.deleteSelected).length > 0; - - } - - init(oldSchema, newSchema) { - this.addSelected = {}; - this.deleteSelected = {}; - this.addedTreeData = []; - this.deletedTreeData = []; - this.addedFields = {}; - - this.oldSchemaEntities = cloneDeep(oldSchema.entities); - this.newSchemaEntities = newSchema.entities; - - - this.changeSelected = {}; - this.changeLeftTreeData = []; - this.changeContrast = {}; - this.changeList = []; - - this.showChangeContrast = false; - this.selectedTreeKey = ''; - - this.addedTable = []; - - this.selectAllChange = false; - this.selectedAll = {}; - this.changeFieldTypeEditorTypeList = []; - this.changeComplexFieldTypeList = []; - - this.variableTreeList = []; - this.isUpdateVariable = false; - this.variableList = []; - } - - - /** - * 获取已删除字段、变更字段 - * @param oldSchemaEntities - * @param newSchemaEntities - */ - private recursiveOldSchema(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[]) { - if (!oldSchemaEntities || oldSchemaEntities.length === 0 || !newSchemaEntities) { - return; - } - oldSchemaEntities.forEach(entity => { - const newEntity = newSchemaEntities.find(e => e.id === entity.id); - if (!newEntity) { // 删除表 - this.deletedTreeData.push({ data: entity, selectable: true, children: [], expanded: true }); - this.deletedTable.push(entity.id); - this.deleteSelected[entity.id] = true; - return; - } - const deletedFields = [], otherFields = []; - entity.type.fields.forEach(field => { - const newField = newEntity.type.fields.find(f => f.id === field.id); - if (!newField) { // 已删除字段 - deletedFields.push({ data: field, selectable: true }); - this.deleteSelected[field.id] = true; - } else { - // 对比字段属性差异 - const { leftTree, deletedFields: deletedChildFields } = this.contrastObject(field, newField, field.id, ''); - if (leftTree) { - otherFields.push(leftTree); - } - if (deletedChildFields.length > 0) { - deletedFields.push(...deletedChildFields); - } - } - }); - const { type, ...basicEntity } = entity; - if (deletedFields.length > 0) { - this.deletedTreeData.push({ data: basicEntity, selectable: false, children: deletedFields, expanded: true }); - } - if (otherFields.length > 0) { - this.changeLeftTreeData.push({ data: { ...basicEntity }, children: otherFields, expanded: true }); - } - - if (entity.type.entities && entity.type.entities.length > 0) { - this.recursiveOldSchema(entity.type.entities, newEntity.type.entities); - } - }); - } - - /** - * 获取新增字段 - * @param oldSchemaEntities - * @param newSchemaEntities - */ - private recursiveNewSchema(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[], parentEntityId: string = '') { - if (!oldSchemaEntities || !newSchemaEntities || newSchemaEntities.length === 0) { - return; - } - newSchemaEntities.forEach(entity => { - const oldEntity = oldSchemaEntities.find(e => e.id === entity.id); - if (!oldEntity) { // 新增表 - this.addSelected[entity.id] = true; - this.addedTreeData.push({ data: entity, selectable: true, children: [], expanded: true }); - this.addedTable.push({ parentEntityId, entity }); - return; - } - this.addedFields[entity.id] = []; - const added = this.recursiveField(entity.type.fields, oldEntity.type.fields, entity.id); - - const { type, ...basicEntity } = entity; - if (added.length > 0) { - this.addedTreeData.push({ data: basicEntity, selectable: false, children: added, expanded: true }); - } - if (entity.type.entities && entity.type.entities.length > 0) { - const oldChildEntities = oldEntity && oldEntity.type ? oldEntity.type.entities : []; - this.recursiveNewSchema(oldChildEntities, entity.type.entities, entity.id); - } - }); - } - - private recursiveField(newFields: FormSchemaEntityField[], oldFields: FormSchemaEntityField[], parentId) { - const added = []; - newFields.forEach(newField => { - if (!oldFields) { - added.push({ data: newField, selectable: true }); - this.addSelected[newField.id] = true; - this.addedFields[parentId].push(newField); - return; - } - const oldField = oldFields.find(f => f.id === newField.id); - if (!oldField) { - added.push({ data: newField, selectable: true }); - this.addSelected[newField.id] = true; - this.addedFields[parentId].push(newField); - return; - } - - // 字段类型相同,并且有下级字段:遍历下级字段 - if (oldField.type.name === newField.type.name && newField.type.fields) { - this.addedFields[newField.id] = []; - const childAddedFields = this.recursiveField(newField.type.fields, oldField.type.fields, newField.id); - if (childAddedFields.length > 0) { - added.push({ data: newField, selectable: false, children: childAddedFields, expanded: true }); - } - } - }); - - return added; - } - - /** - * 切换左侧树节点 - */ - handleTreeSelection($event) { - this.hidePopoverContainers(); - - // 选中表名 - if (!$event.node.data.$type) { - this.showChangeContrast = false; - return; - } - // 选中字段 - this.showChangeContrast = true; - const curId = $event.node.data.id; - - this.selectedTreeKey = curId; - } - - /** - * 【更新】tab页的字段全选 - */ - clickSelectAllCheckbox() { - const changeList = this.changeContrast[this.selectedTreeKey]; - this.selectChangeItem(changeList, this.selectedAll[this.selectedTreeKey], this.selectedTreeKey); - - } - - private selectChangeItem(changeList, isSelect, selectedTreeKey) { - changeList.forEach(change => { - if (change.selectable) { - this.changeSelected[selectedTreeKey][change.data.propPath] = isSelect; - } else if (change.children && change.children.length > 0) { - this.selectChangeItem(change.children, isSelect, selectedTreeKey); - } - }); - } - /** - * 【更新】tab页的全选 - */ - selectAllChanged() { - Object.keys(this.changeContrast).forEach(treeKey => { - this.selectedAll[treeKey] = this.selectAllChange; - this.selectChangeItem(this.changeContrast[treeKey], this.selectAllChange, treeKey); - }); - - this.hidePopoverContainers(); - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - - /** - * 确定 - */ - clickOK() { - const newSchema = this.domService.getSchemas(); - - // 处理extendProperties 节点,直接覆盖 - newSchema.extendProperties = this.newSchema.extendProperties; - - if (!this.checkIsNeedUpdate()) { - this.closeModal.emit(); - return; - } - - this.oldSchemaEntities = this.handleChangeSet(this.oldSchemaEntities, this.newSchemaEntities); - // 处理主对象变更的情况 - const addedT = this.addedTable.find(t => t.parentEntityId === ''); - if (addedT && this.addSelected[addedT.entity.id]) { - this.oldSchemaEntities.push(addedT.entity); - } - - newSchema.entities = this.oldSchemaEntities; - - // 处理变量同步 - if (this.isUpdateVariable) { - newSchema.variables = this.variableList; - this.domService.updateRemoteVariables(this.variableList); - } - // 刷新实体树 - this.refreshFormService.refreshSchamaTree.next(); - - // 同步表单控件 - this.syncForm(); - - // 刷新页面 - this.refreshFormService.refreshFormDesigner.next(); - - this.notifyService.success('更新成功!'); - - this.closeModal.emit(); - - } - - /** - * 对比属性差异 - * @param oldValue - * @param newValue - * @param fieldId - * @param path - */ - private contrastObject(oldValue, newValue, fieldId, path) { - const diffTree = [], propPath = path ? path + '.' : '', childLeftTree = []; - let deletedFields = []; - // 遍历基础属性 - const basicDiff = this.contrastBasicProp(oldValue, newValue, fieldId, propPath); - if (basicDiff && basicDiff.length > 0) { - diffTree.push(...basicDiff); - } - - // 新增属性 - Object.keys(newValue).forEach(propCode => { - if (propCode === 'editor') { - return; - } - if (!Object.keys(oldValue).includes(propCode)) { - const data = { - propPath: propPath + propCode, - fieldId, - propCode, - propName: SchemaPropName.getName(propCode), - newValue: newValue[propCode], - oldValue: '无' - }; - diffTree.push({ selectable: true, data }); - this.changeList.push(data); - } - }); - - - if (oldValue.type && newValue.type) { - const oldType = oldValue.type; const newType = newValue.type; - // 类型变化后将type和editor整体覆盖,不再向下对比差异 - if (oldType.$type !== newType.$type) { - // 排除类型变化,但编辑器不变的场景:日期和日期时间类型对应的控件类型都是DateBox - if (!(oldValue.editor && newValue.editor && oldValue.editor.$type === newValue.editor.$type)) { - const type = { - propPath: propPath + 'type', fieldId, propCode: 'type', propName: SchemaPropName.getName('type'), - oldValue: oldType, newValue: newType - }; - const editor = { - propPath: propPath + 'editor', - fieldId, - propCode: 'editor', - propName: SchemaPropName.getName('editor'), - oldValue: oldValue.editor === undefined ? '无' : oldValue.editor, - newValue: newValue.editor - }; - diffTree.push({ selectable: true, data: type, isObject: true }); - diffTree.push({ selectable: true, data: editor, isObject: true }); - this.changeList.push(type); - this.changeList.push(editor); - - this.changeContrast[oldValue.id] = diffTree; - this.changeSelected[oldValue.id] = {}; - this.selectedAll[oldValue.id] = false; - - this.changeFieldTypeEditorTypeList.push(oldValue.id); - return { leftTree: { data: { ...oldValue } }, deletedFields }; - } - this.changeFieldTypeList.push(oldValue.id); - - } else if (oldType.name !== newType.name) { - // 复杂类型字段,更换了引用的对象 - const complexTypeDiff = { - propPath: propPath + 'type', - propCode: 'type', - propName: SchemaPropName.getName('type'), - fieldId, - oldValue: oldType, - newValue: newType, - oldValueShowName: oldType.displayName || oldType.name, - newValueShowName: newType.displayName - }; - diffTree.push({ selectable: true, data: complexTypeDiff, isObject: true }); - this.changeList.push(complexTypeDiff); - this.changeContrast[oldValue.id] = diffTree; - this.changeSelected[oldValue.id] = {}; - this.selectedAll[oldValue.id] = false; - this.changeComplexFieldTypeList.push(oldValue.id); - return { leftTree: { data: { ...oldValue } }, deletedFields }; - } else if (oldValue.multiLanguage !== newValue.multiLanguage) { - // 类型不变,但编辑器需要改变---目前场景:修改多语属性,但要排除现有表单新增多语为false的场景 - if (!(oldValue.multiLanguage === undefined && newValue.multiLanguage === false)) { - if (!this.compareJsonByString(oldType, newType)) { - const type = { - propPath: propPath + 'type', fieldId, propCode: 'type', propName: SchemaPropName.getName('type'), - oldValue: oldType, newValue: newType - }; - diffTree.push({ selectable: true, data: type, isObject: true }); - this.changeList.push(type); - } - - const editor = { - propPath: propPath + 'editor', - fieldId, - propCode: 'editor', - propName: SchemaPropName.getName('editor'), - oldValue: oldValue.editor, - newValue: newValue.editor - }; - diffTree.push({ selectable: true, data: editor, isObject: true }); - this.changeList.push(editor); - - this.changeContrast[oldValue.id] = diffTree; - this.changeSelected[oldValue.id] = {}; - this.selectedAll[oldValue.id] = false; - - this.changeFieldTypeEditorTypeList.push(oldValue.id); - return { leftTree: { data: { ...oldValue } }, deletedFields }; - } - - } - - const typeDiff = this.contrastBasicProp(oldType, newType, fieldId, propPath + 'type.'); - if (oldType.valueType && newType.valueType) { - const valueTypeDiff = this.contrastBasicProp(oldType.valueType, newType.valueType, fieldId, propPath + 'type.valueType.'); - if (valueTypeDiff && valueTypeDiff.length > 0) { - typeDiff.push({ - selectable: false, children: valueTypeDiff, expanded: true, - data: { - propPath: propPath + 'type.valueType', fieldId, propCode: 'valueType', - propName: SchemaPropName.getName('valueType') - } - }); - } - } - if (oldType.enumValues && newType.enumValues) { - if (JSON.stringify(oldType.enumValues) !== JSON.stringify(newType.enumValues)) { - const data = { - propPath: propPath + 'type.enumValues', fieldId, propCode: 'enumValues', - propName: SchemaPropName.getName('enumValues'), oldValue: oldType.enumValues, newValue: newType.enumValues - }; - typeDiff.push({ selectable: true, data, isObject: true }); - this.changeList.push(data); - } - } - if (oldType.fields) { - oldType.fields.forEach(oldEle => { - const newEle = newType.fields.find(f => f.id === oldEle.id); - if (!newEle) { - // 已删除字段 - deletedFields.push({ data: oldEle, selectable: true }); - this.deleteSelected[oldEle.id] = true; - } else { - const { leftTree: eleLeftTree, deletedFields: deletedChildFields } = this.contrastObject(oldEle, newEle, oldEle.id, ''); - if (eleLeftTree) { - childLeftTree.push(eleLeftTree); - } - if (deletedChildFields.length > 0) { - deletedFields.push(...deletedChildFields); - } - } - }); - } - if (typeDiff && typeDiff.length > 0) { - diffTree.push({ - selectable: false, children: typeDiff, expanded: true, - data: { - propPath: propPath + 'type', - fieldId, - propCode: 'type', - propName: SchemaPropName.getName('type') - } - }); - } - } - - // 编辑器属性整体更新 - if (oldValue.editor && newValue.editor) { - const editorDiff = this.contrastBasicProp(oldValue.editor, newValue.editor, fieldId, propPath + 'editor.', false); - if (editorDiff && editorDiff.length > 0) { - const data = { - propPath: propPath + 'editor', - fieldId, - propCode: 'editor', - propName: SchemaPropName.getName('editor'), - oldValue: oldValue.editor, - newValue: newValue.editor - }; - diffTree.push({ selectable: true, data, isObject: true }); - this.changeList.push(data); - } - } - - - - let leftTree; - - // 字段本身变化 - if (diffTree.length > 0 || childLeftTree.length > 0) { - this.changeContrast[oldValue.id] = diffTree; - this.changeSelected[oldValue.id] = {}; - leftTree = { data: { ...oldValue } }; - this.selectedAll[oldValue.id] = false; - if (childLeftTree.length > 0) { - leftTree['children'] = childLeftTree; - leftTree['expanded'] = true; - } - } - - if (deletedFields.length > 0) { - deletedFields = [{ data: { ...oldValue }, children: deletedFields, selectable: false, expanded: true }]; - } - - return { leftTree, deletedFields }; - } - - private contrastBasicProp(oldValue, newValue, fieldId, path, selectable = true): any[] { - const diffTree = []; - Object.keys(oldValue).forEach(propCode => { - if (typeof (oldValue[propCode]) !== 'object' && typeof (oldValue[propCode]) !== 'undefined') { - // tslint:disable-next-line:triple-equals (为了适配默认值属性int和string之间的差异,故不采用!==) - if (oldValue[propCode] != newValue[propCode]) { - const data = { - propPath: path + propCode, fieldId, propCode, propName: SchemaPropName.getName(propCode), - oldValue: oldValue[propCode], newValue: newValue[propCode] === undefined ? '无' : newValue[propCode] - }; - diffTree.push({ selectable, data }); - this.changeList.push(data); - } - } - }); - - return diffTree; - } - - - private handleChangeSet(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[]) { - // 删除表 - if (this.deletedTable.length > 0) { - oldSchemaEntities = oldSchemaEntities.filter(e => !this.deleteSelected[e.id]); - } - - oldSchemaEntities.forEach(entity => { - const newEntity = newSchemaEntities.find(e => e.id === entity.id); - if (!newEntity) { - return; - } - - entity.type.fields = this.handleChangesetField(entity.type.fields); - // 根节点下新增字段 - if (this.addedFields[entity.id] && this.addedFields[entity.id].length > 0) { - this.addedFields[entity.id].forEach(field => { - if (this.addSelected[field.id]) { - entity.type.fields.push(field); - } - }); - } - // 处理子表 - if (entity.type.entities && entity.type.entities.length > 0) { - entity.type.entities = this.handleChangeSet(entity.type.entities, newEntity.type.entities); - } - - // 新增子表 - if (this.addedTable.length > 0) { - const addedTs = this.addedTable.filter(t => t.parentEntityId === entity.id); - if (addedTs && addedTs.length) { - addedTs.forEach(a => { - if (this.addSelected[a.entity.id]) { - entity.type.entities.push(a.entity); - } - }); - } - } - }); - return oldSchemaEntities; - - } - - private handleChangesetField(oldFields: FormSchemaEntityField[]): any[] { - oldFields = oldFields.filter(oldField => { - // 已删除字段 - if (this.deleteSelected[oldField.id]) { - return false; - } - return true; - }); - oldFields.forEach(oldField => { - // 获取勾选的变更集 - const changeSelected = this.changeSelected[oldField.id], propPathSet = []; - if (changeSelected) { - Object.keys(changeSelected).forEach(key => { - if (changeSelected[key]) { - propPathSet.push(key); - } - }); - // 根据propPath 更新字段属性值(若path中的路径不存在,则会创建相应属性并赋值;若新值为undefined,则会删除相应属性) - propPathSet.forEach(path => { - const newValue = this.changeList.find(c => c.fieldId === oldField.id && c.propPath === path); - // 为适配页面显示,将不存在的属性写成了无,故此处再改回undefined - newValue.newValue = newValue.newValue === '无' ? undefined : newValue.newValue; - set(oldField, path, newValue.newValue); - }); - } - - - // 下级字段 - if (oldField.type.fields) { - oldField.type.fields = this.handleChangesetField(oldField.type.fields); - } - - // 新增下级字段 - const addedDownFields = this.addedFields[oldField.id]; - if (addedDownFields && addedDownFields.length > 0) { - addedDownFields.forEach(field => { - if (this.addSelected[field.id]) { - oldField.type.fields.push(field); - } - }); - } - }); - - return oldFields; - - } - - /** - * 格式化json对象 - * @param object - */ - showPropObject(object) { - if (!object || typeof (object) !== 'object') { - return object; - } - const objStr = JSON.stringify(object, null, 2); - - return objStr; - } - - /** - * 检查是否需要更新,若没有选中字段则不提示“更新成功” - */ - private checkIsNeedUpdate(): boolean { - const deSelected = Object.keys(this.deleteSelected).filter(d => this.deleteSelected[d]); - if (deSelected.length > 0) { - return true; - } - const addSelected = Object.keys(this.addSelected).filter(d => this.addSelected[d]); - if (addSelected.length > 0) { - return true; - } - - const changeSelected = Object.keys(this.changeSelected).filter(d => { - const c = Object.keys(this.changeSelected[d]).filter(s => this.changeSelected[d][s]); - if (c.length > 0) { - return true; - } - return false; - }); - if (changeSelected.length > 0) { - return true; - } - - if (this.isUpdateVariable) { - return true; - } - - return false; - } - - /** - * 更新Dg ViewModel 和 DOM结构 - */ - private syncForm() { - // 1、收集字段变更集:fieldId: { propPath, newValue}, 平铺type和editor的改动 - const changes = {}; - Object.keys(this.changeSelected).forEach(fieldId => { - const selectedChange = this.changeSelected[fieldId], fieldChanges = []; - Object.keys(selectedChange).forEach(propPath => { - if (selectedChange[propPath]) { - const changeInfo = this.changeList.find(c => c.fieldId === fieldId && c.propPath === propPath); - if ((propPath === 'editor' || propPath === 'type') && changeInfo.newValue) { - Object.keys(changeInfo.newValue).forEach(key => { - fieldChanges.push({ propPath: propPath + '.' + key, newValue: changeInfo.newValue[key] }); - }); - } else { - fieldChanges.push({ - propPath, - newValue: changeInfo.newValue - }); - } - } - }); - if (fieldChanges.length > 0) { - changes[fieldId] = fieldChanges; - } - }); - - // 2、重新组装 DgVM - this.dgVMService.assembleDesignViewModel(); - - // 3、 调用设计器定义的同步控件服务 - if (this.refreshAfterChangedServ) { - this.refreshAfterChangedServ.refreshAfterSchemaChange(changes); - } - - } - - /** - * 针对标签页变更/切换树节点等场景中popover无法消失的问题,手动调用hide方法 - */ - hidePopoverContainers() { - if (this.popoverContainers && this.popoverContainers.length) { - this.popoverContainers.forEach(pop => { - pop.hide(); - }); - } - - } - - /** - * 新增tab- 全选点击事件 - */ - clickAddFieldSelectAllCheckbox() { - - Object.keys(this.addSelected).forEach(id => { - this.addSelected[id] = this.addFieldSelectedAll; - }); - this.cd.detectChanges(); - - } - /** - * 删除tab- 全选点击事件 - */ - clickDeleteFieldSelectAllCheckbox() { - Object.keys(this.deleteSelected).forEach(id => { - this.deleteSelected[id] = this.deleteFieldSelectedAll; - }); - this.cd.detectChanges(); - - } - /** - * 新增tab- checkbox点击事件 - */ - clickAddSelectCheckbox(checked: boolean) { - if (!checked) { - this.addFieldSelectedAll = false; - } - - } - - /** - * 删除tab- checkbox点击事件 - */ - clickDeleteSelectCheckbox(checked: boolean) { - if (!checked) { - this.deleteFieldSelectedAll = false; - } - } - - - compareJsonByString(json1: any, json2: any): boolean { - const sortedJson1 = this.sortJsonByKey(json1); - const sortedJson2 = this.sortJsonByKey(json2); - return JSON.stringify(sortedJson1) === JSON.stringify(sortedJson2); - } - sortJsonByKey(jsonData) { - const newkey = Object.keys(jsonData).sort(); - const newObj = {}; - // tslint:disable-next-line:prefer-for-of - for (const key of newkey) { - newObj[key] = jsonData[key]; - } - return newObj; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.service.ts deleted file mode 100644 index 259d6ebc1400b09e32a63c24611388a232d7deee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/update-schema.service.ts +++ /dev/null @@ -1,257 +0,0 @@ -import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { NotifyService } from '@farris/ui-notify'; -import { UpdateSchemaComponent } from './update-schema.component'; -import { LoadingService } from '@farris/ui-loading'; -import { FormBasicService, FormSchema, FormSchemaEntity, FormSchemaEntityField, DomService, SchemaService } from '@farris/designer-services'; -import { Observable } from 'rxjs'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { IRefreshAfterChangedService } from './refresh.service'; - -export class UpdateFormSchemaService { - - private notifyService: NotifyService; - private domService: DomService; - private schemaService: SchemaService; - private msgService: MessagerService; - private resolver: ComponentFactoryResolver; - private modalService: BsModalService; - private http: HttpClient; - private formBasicService: FormBasicService; - private loadingService: LoadingService; - - - private refreshAfterChangedServ: IRefreshAfterChangedService; - - constructor(private injector: Injector) { - - this.notifyService = this.injector.get(NotifyService); - this.domService = this.injector.get(DomService); - this.schemaService = this.injector.get(SchemaService); - this.msgService = this.injector.get(MessagerService); - this.resolver = this.injector.get(ComponentFactoryResolver); - this.modalService = this.injector.get(BsModalService); - this.http = this.injector.get(HttpClient); - this.formBasicService = this.injector.get(FormBasicService); - this.loadingService = this.injector.get(LoadingService); - } - - - /** - * 同步VO-> schema - */ - synchronizeVO(refreshAfterChangedServ: IRefreshAfterChangedService) { - this.refreshAfterChangedServ = refreshAfterChangedServ; - - const schema = this.domService.getSchemas(); - if (!schema || !schema.id) { - this.notifyService.error('VO 标识不存在,请检查表单DOM结构'); - return; - } - const loading = this.loadingService.show({ container: 'body', message: '请稍候...' }); - - const qdpInfo = this.domService.getQDPInfo(); - if (qdpInfo) { - const formInfo = { - qoMetadataId: qdpInfo.qoMetadata[0].id, - packgetName: qdpInfo.packgetName, - voCode: schema.code, - relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - nameSpace: this.formBasicService.formMetaBasicInfo.nameSpace - }; - this.createVMFromQO(formInfo).subscribe(voMetadata => { - if (voMetadata) { - this.converVO2Schema(schema, loading); - } - }, error => { - loading.close(); - this.notifyService.error('更新失败'); - }); - } else { - this.converVO2Schema(schema, loading); - } - } - - private converVO2Schema(schema: any, loading: any) { - const sessionId = ''; - this.schemaService.converVO2Schema(schema.id, sessionId).subscribe(data => { - this.checkAndUppdateSchema(schema, data, loading); - }, error => { - loading.close(); - this.notifyService.error('更新失败'); - }); - } - - /** - * 更新Schema节点 - */ - private _updateSchemaEntities(oldSchema: FormSchema, newSchema: FormSchema, loading) { - // 旧表单升级:解决id与originalId不匹配的问题 - const updateVersion = this.domService.getUpdateVersion(); - if (updateVersion && updateVersion <= '190103' && this._checkIsNeedUpdateId(oldSchema.entities)) { - oldSchema.entities = this._updateOldFormId(oldSchema.entities, newSchema.entities); - } - - loading.close(); - - const compFactory = this.resolver.resolveComponentFactory(UpdateSchemaComponent); - const compRef = compFactory.create(this.injector); - compRef.instance.oldSchema = oldSchema; - compRef.instance.newSchema = newSchema; - - compRef.instance.refreshAfterChangedServ = this.refreshAfterChangedServ; - - const modalConfig = { - title: '更新表单schema', - width: 950, - height: 560, - resizable: false, - buttons: compRef.instance.btns - }; - - - const modal = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modal.close(); - }); - } - /** - * 判断主对象ID是否变更 - */ - private _checkMainEntitiyID(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[]) { - const mainEntity = oldSchemaEntities[0]; - const oldMainEntityID = mainEntity.id; - const newMainEntityID = newSchemaEntities[0].id; - return oldMainEntityID === newMainEntityID; - - } - /** - * 校验并更新Schema - */ - private checkAndUppdateSchema(oldSchema: FormSchema, newSchema: FormSchema, loading: any) { - if (!newSchema) { - loading.close(); - this.notifyService.error('更新失败'); - return; - } - - if (!this._checkMainEntitiyID(oldSchema.entities, newSchema.entities)) { - loading.close(); - this.msgService.question('VO主对象ID已更改,更新表单schema后需要重新添加控件,确定更新?', () => { - // 场景①:表单主对象ID已更改,但用户选择更新 - this._updateSchemaEntities(oldSchema, newSchema, loading); - }, () => { - // 场景②:表单主对象ID已更改,但用户选择不更新 - return; - }); - } else { - // 场景③:表单主对象ID未更改,表单升级后更新schema节点 - this._updateSchemaEntities(oldSchema, newSchema, loading); - } - - } - - /** - * 旧表单升级:解决id与originalId不匹配的问题 - */ - private _updateOldFormId(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[]): FormSchemaEntity[] { - // console.log('旧表单升级:解决id与originalId不匹配的问题'); - const dom = this.domService.getDomJson(); - let domStr = JSON.stringify(dom); - - domStr = this.recursiveSchema(oldSchemaEntities, newSchemaEntities, domStr); - // this.domJson = JSON.parse(domStr); - this.domService.setDomJson(JSON.parse(domStr)); - - const schema = this.domService.getSchemas(); - return schema.entities; - } - - /** - * 旧表单升级:判断主表的主键字段id和originalId是否相等 => 判断表单是否需要更新 - */ - private _checkIsNeedUpdateId(oldSchemaEntities: FormSchemaEntity[]): boolean { - if (!oldSchemaEntities || oldSchemaEntities.length === 0) { - return; - } - const mainEntity = oldSchemaEntities[0]; - const primaryLabel = mainEntity.type.primary; - const fields = mainEntity.type.fields; - const primaryField = fields.find(f => f.label === primaryLabel); - if (primaryField && primaryField.id === primaryField.originalId) { - return false; - } - return true; - } - - /** - * 旧表单升级:遍历schema实体,原表单中所有的id全量替换为新schema字段的id - */ - private recursiveSchema(oldSchemaEntities: FormSchemaEntity[], newSchemaEntities: FormSchemaEntity[], domStr: string): string { - if (!oldSchemaEntities || oldSchemaEntities.length === 0 || !newSchemaEntities || newSchemaEntities.length === 0) { - return; - } - oldSchemaEntities.forEach(entity => { - const entityId = entity.id; - const newEntity = newSchemaEntities.find(e => e.id === entityId); - if (!newEntity) { - return; - } - entity.type.fields.forEach(field => { - const newField = newEntity.type.fields.find(f => f.originalId === field.originalId); - domStr = this._recursiveField(field, newField, domStr); - }); - - if (entity.type.entities && entity.type.entities.length > 0) { - domStr = this.recursiveSchema(entity.type.entities, newEntity.type.entities, domStr); - } - }); - - return domStr; - } - - /** - * 旧表单升级:遍历schema字段 - */ - private _recursiveField(oldField: FormSchemaEntityField, newField, domStr: string): string { - if (!oldField || !newField) { - return domStr; - } - if (oldField.$type === 'SimpleField') { - - // 简单字段:原表单中所有的id全量替换为新schema字段的id - const regExp = new RegExp(oldField.id, 'g'); - domStr = domStr.replace(regExp, newField.id); - } else if (oldField.type.fields && oldField.type.fields.length > 0) { - // 复杂字段 - oldField.type.fields.forEach(f => { - const childField = newField.type.fields.find(n => n.originalId === f.originalId); - domStr = this._recursiveField(f, childField, domStr); - }); - } - - return domStr; - } - - /** - * 调用QO生成VO - */ - private createVMFromQO(formInfo: any): Observable { - const url = '/api/dev/main/v1.0/qometadata/generatevmfromqo'; - return this.http.put( - url, - { - qoid: formInfo.qoMetadataId - , comcmppkgname: 'Inspur.GS.Gsp.QDP.QdpCommonCmp' - , qopkgname: formInfo.packgetName - , formcode: formInfo.voCode - , formpath: formInfo.relativePath - , nameSpace: formInfo.nameSpace - }, - { - headers: new HttpHeaders({ SessionId: '' }), responseType: 'json' - } - ); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/variable-contrast.service.ts b/packages/designer/projects/designer-devkit/src/lib/components/update-schema/variable-contrast.service.ts deleted file mode 100644 index 8c2b9b25c7c30f321c02211ec7c881f7d9b5ef50..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/components/update-schema/variable-contrast.service.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Injectable } from '@angular/core'; -import { TreeNode } from '@farris/ui-treetable'; -import { FormSchemaEntityField } from '@farris/designer-services'; - -@Injectable() -export class VariableContrastService { - - newVarList: FormSchemaEntityField[]; - oldVarList: FormSchemaEntityField[]; - - varTreeData: TreeNode[] = []; - - getVariableTree(newVarList: FormSchemaEntityField[], oldVarList: FormSchemaEntityField[]): TreeNode[] { - - this.newVarList = newVarList; - this.oldVarList = oldVarList || []; - this.varTreeData = []; - this.getAddedVars(); - this.getModifiedVars(); - - return this.varTreeData; - } - - private getAddedVars() { - this.newVarList.forEach(newVar => { - - const oldVar = this.oldVarList.find(f => f.id === newVar.id); - if (!oldVar) { - this.varTreeData.push({ - data: { ...newVar, modifyType: '新增' }, selectable: true - }); - } - }); - } - - private getModifiedVars() { - const deleted = []; - const modified = []; - this.oldVarList.forEach(oldVar => { - - const newVar = this.newVarList.find(f => f.id === oldVar.id); - if (!newVar) { - deleted.push({ data: { ...oldVar, modifyType: '删除' }, selectable: true, }); - } else { - // 简单比较 - delete oldVar['category']; - if (JSON.stringify(newVar) !== JSON.stringify(oldVar)) { - modified.push({ data: { ...oldVar, modifyType: '修改' }, selectable: true }); - } - } - }); - - this.varTreeData.push(...deleted); - this.varTreeData.push(...modified); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/designer-devkit.module.ts b/packages/designer/projects/designer-devkit/src/lib/designer-devkit.module.ts deleted file mode 100644 index 8e18b81df477aa429e78675226b008fb1bd3d17e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/designer-devkit.module.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BindingEditorComponent } from './property-editor/binding-editor/binding-editor.component'; -import { StyleEditorComponent } from './property-editor/style-editor/style-editor.component'; -import { FormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; -import { DatagridModule } from '@farris/ui-datagrid'; -import { DatagridEditorsModule, EditorProviders } from '@farris/ui-datagrid-editors'; -import { LoadingModule } from '@farris/ui-loading'; -import { TreeTableModule } from '@farris/ui-treetable'; -import { NotifyModule } from '@farris/ui-notify'; -import { EditorModule } from '@farris/ui-editor'; -import { FarrisFormsModule } from '@farris/ui-forms'; -import { ControlBoxComponent } from './components/control-box/control-box.component'; -import { ContextMenuModule } from 'ngx-contextmenu'; -import { ItemCollectionEditorComponent } from './property-editor/item-collection-editor/item-collection-editor.component'; -import { NumberSpinnerModule } from '@farris/ui-number-spinner'; -import { SwitchModule } from '@farris/ui-switch'; -import { ComboLookupModule } from '@farris/ui-combo-lookup'; -import { ComboListModule } from '@farris/ui-combo-list'; -import { InnerComponentCreatorComponent } from './components/inner-component-creator/inner-component-creator.component'; -import { ProgressStepModule } from '@farris/ui-progress-step'; -import { CollectionWithPropertyEditorComponent } from './property-editor/collection-with-property-editor/collection-with-property-editor.component'; -import { IconSelectEditorComponent } from './property-editor/icon-select-editor/icon-select-editor.component'; -import { CodeEditorComponent } from './property-editor/code-editor/code-editor.component'; -import { ExpressionEditorComponent } from './property-editor/expression-editor/expression-editor.component'; -// import { PropertyPanelModule } from '@farris/ide-property-panel'; -import { AngularMonacoEditorConfig } from './components/angular-editor/model/config'; -import { AngularMonacoEditorModule } from './components/angular-editor/editor.module'; -import { JavaScriptBooleanEditorComponent } from './property-editor/javascript-boolean-editor/javascript-boolean-editor.component'; -import { RichTextPropEditor } from './property-editor/rich-text-prop-editor/rich-text-prop-editor.component'; -import { SelectSchemaFieldEditorComponent } from './property-editor/select-schema-field-editor/select-schema-field-editor.component'; -import { UpdateSchemaComponent } from './components/update-schema/update-schema.component'; -import { FarrisTabsModule } from '@farris/ui-tabs'; -import { PopoverModule } from '@farris/ui-popover'; -import { FieldManagerComponent } from './components/field-manage/field-manager.component'; -import { FieldTreeTableComponent } from './components/field-manage/field-treetable/field-treetable.component'; -import { BindingCustomEditorComponent } from './property-editor/binding-custom-editor/binding-custom-editor.component'; -import { FarrisDatePickerModule } from '@farris/ui-datepicker'; -import { SelectMappingComponent } from './property-editor/select-mapping/select-mapping.component'; -import { SelectMicroAppComponent } from './property-editor/select-microapp/select-microapp.component'; -import { ImportCmpComponent } from './property-editor/import-cmp/import-cmp.component'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { ControlTreeComponent } from './components/control-tree/control-tree.component'; -import { MobileControlTreeComponent } from './components/control-tree/mobile-control-tree.component'; -import { IdeTreeModule } from './components/ide-tree/ide-tree.module'; -import { SchemaTreeComponent } from './components/schema-tree/schema-tree.component'; -// import { ExpressionModule } from '@gsp-svc/expression'; -import { InputGroupModule } from '@farris/ui-input-group'; -import { PaginationControlsComponent, PaginationModule } from '@farris/ui-pagination'; -import { AdvancedStyleEditorComponent } from './property-editor/advanced-style-editor/advanced-style-editor.component'; -import { AdvancedStyleEditorModule } from './property-editor/advanced-style-editor/advanced-style.editor.module'; -import { SaveAsTemplateEditorComponent } from './property-editor/save-as-template-editor/save-as-template-editor.component'; -import { ComponentTemplateManageComponent } from './components/control-box/component-template-manage/component-template-manage.component'; - -const monacoConfig: AngularMonacoEditorConfig = { - baseUrl: 'assets', - defaultOptions: { - theme: 'vs-dark', - language: 'json', - formatOnType: true, - foldingStrategy: 'indentation', // 显示缩进 - folding: true, // 启用代码折叠功能 - showFoldingControls: 'always', // 默认显示装订线 - automaticLayout: true, // 监测父容器变化 - scrollBeyondLastLine: false - } -}; - -@NgModule({ - declarations: [ - StyleEditorComponent, - BindingEditorComponent, - ControlBoxComponent, - SchemaTreeComponent, - ItemCollectionEditorComponent, - InnerComponentCreatorComponent, - CollectionWithPropertyEditorComponent, - IconSelectEditorComponent, - CodeEditorComponent, - ExpressionEditorComponent, - JavaScriptBooleanEditorComponent, - RichTextPropEditor, - SelectSchemaFieldEditorComponent, - UpdateSchemaComponent, - FieldManagerComponent, - FieldTreeTableComponent, - BindingCustomEditorComponent, - SelectMappingComponent, - SelectMicroAppComponent, - ImportCmpComponent, - ControlTreeComponent, - MobileControlTreeComponent, - SaveAsTemplateEditorComponent, - ComponentTemplateManageComponent - ], - imports: [ - EditorModule.forRoot('/platform/common/web/assets/tinymce/tinymce.min.js'), - CommonModule, - FormsModule, - TreeTableModule, - LoadingModule.forRoot({ - message: '加载中,请稍候...' - }), - DatagridEditorsModule, - DatagridModule.forRoot([ - ...EditorProviders - ]), - NotifyModule, - FarrisFormsModule, - NumberSpinnerModule, - SwitchModule, - ComboListModule, - ComboLookupModule, - ContextMenuModule.forRoot({ - autoFocus: false, - useBootstrap4: true, - }), - ProgressStepModule, - // PropertyPanelModule, - AngularMonacoEditorModule.forRoot(monacoConfig), - FarrisTabsModule, - PopoverModule, - FarrisDatePickerModule, - BrowserAnimationsModule, - IdeTreeModule, - // ExpressionModule, - InputGroupModule, - PaginationModule, - AdvancedStyleEditorModule - ], - exports: [ - ControlBoxComponent, - SchemaTreeComponent, - ItemCollectionEditorComponent, - InnerComponentCreatorComponent, - CollectionWithPropertyEditorComponent, - IconSelectEditorComponent, - CodeEditorComponent, - ExpressionEditorComponent, - JavaScriptBooleanEditorComponent, - RichTextPropEditor, - SelectSchemaFieldEditorComponent, - AngularMonacoEditorModule, - FieldManagerComponent, - BindingCustomEditorComponent, - SelectMappingComponent, - SelectMicroAppComponent, - ImportCmpComponent, - ControlTreeComponent, - MobileControlTreeComponent, - UpdateSchemaComponent, - AdvancedStyleEditorComponent, - SaveAsTemplateEditorComponent - ], - entryComponents: [ - StyleEditorComponent, - BindingEditorComponent, - ItemCollectionEditorComponent, - InnerComponentCreatorComponent, - CollectionWithPropertyEditorComponent, - IconSelectEditorComponent, - CodeEditorComponent, - ExpressionEditorComponent, - JavaScriptBooleanEditorComponent, - RichTextPropEditor, - SelectSchemaFieldEditorComponent, - UpdateSchemaComponent, - FieldManagerComponent, - BindingCustomEditorComponent, - SelectMappingComponent, - SelectMicroAppComponent, - ImportCmpComponent, - MobileControlTreeComponent, - PaginationControlsComponent, - SaveAsTemplateEditorComponent, - ComponentTemplateManageComponent - ] -}) -export class FarrisDesignerDevkitModule { - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/entity/property-entity.ts b/packages/designer/projects/designer-devkit/src/lib/entity/property-entity.ts deleted file mode 100644 index be9461c258333401204703e6cf7f3e57248f970c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/entity/property-entity.ts +++ /dev/null @@ -1,315 +0,0 @@ -import { Type } from '@angular/core'; - -/** - * 属性类型 - */ -export enum PropertyType { - /** 字符串 */ - string = 'string', - - /** 布尔,下拉选择 */ - boolean = 'boolean', - - /** 数字 */ - number = 'number', - - /** 下拉选择:单选 */ - select = 'select', - - /** 已废弃,请使用editableSelect */ - boolOrExp = 'boolOrExp', - - /** 可编辑的下拉选择:单选,并且可编辑 */ - editableSelect = 'editableSelect', - - /** 下拉多选 */ - multiSelect = 'multiSelect', - - /** 日期 */ - date = 'date', - - /** 日期时间 */ - datetime = 'datetime', - - /** 模态窗,自定义组件 */ - modal = 'modal', - - /** 级联 */ - cascade = 'cascade', - - /** 自定义组件 */ - custom = 'custom', - - /** 多功能属性编辑器,支持常量、变量、自定义、表达式等场景 */ - unity = 'unity', - - /** 事件编辑器集成,支持导入命令、参数编辑等场景 */ - events = 'events', - - /** 开关类编辑器,适用于布尔值属性 */ - switch = 'switch', - - /** 多语言输入框 */ - multiLanguage = 'multiLanguage' -} - - -/** - * 属性分类实体 - */ -export class ElementPropertyConfig { - /** - * 分类ID - */ - categoryId: string; - - /** - * 分类显示的名称 - */ - categoryName: string; - - /** - * 分类是否隐藏,默认false - */ - hide?= false; - - /** - * 是否隐藏分类标题 - */ - hideTitle?= false; - - /** - * 分类下的属性配置 - */ - properties: PropertyEntity[]; - - /** - * 是否启用级联特性,默认false - */ - enableCascade?= false; - - /** - * 属性值:分类启用级联特性时必填 - */ - propertyData?: any; - - /** - * 父级属性ID:分类启用级联特性时必填 - */ - parentPropertyID?: string; - - /** - * 属性关联关系,用于属性变更后修改其他属性配置或属性值 - */ - setPropertyRelates?: (changeObject, propertyData, parameters?) => void; - - /** - * 分类以标签页展示时,标签页的ID。若只需平铺展示,则不需要传入。 - */ - tabId?: string; - - /** - * 分类以标签页展示时,标签页的名称。若只需平铺展示,则不需要传入。 - */ - tabName?: string; -} - - - -/** - * 属性实体 - */ -export class PropertyEntity { - /** - * 属性ID - */ - propertyID?: string; - - /** - * 属性显示的名称 - */ - //事件编辑器集成 - propertyName?: string; - - /** - * 属性的类型 - */ - propertyType: PropertyType | any; - - /** - * 属性描述 - */ - description?: string; - - /** - * 属性的默认值 - */ - defaultValue?: any; - - /** - * 是否只读,默认false - */ - readonly?= false; - - /** - * 是否可见,默认true - */ - visible?= true; - - /** - * 最小值 - */ - min?: any; - - /** - * 最大值 - */ - max?: any; - - /** - * 数字类型属性的小数位数 - */ - decimals?: number; - - /** - * 是否大数字 - */ - isBigNumber?= false; - - /** - * 属性改变后是否需要刷新整个面板:用于更改其他分类下的属性 - */ - refreshPanelAfterChanged?= false; - - /** - * 下拉框的枚举值 - */ - iterator?: KeyMap[]; - - /** - * 下拉多选类型:属性值的类型:string(多值以逗号分隔)/array(多值组装成数组) - */ - multiSelectDataType?= 'string'; - - /** - * 文本控件限制输入的字符,支持字符和正则表达式 - */ - notAllowedChars?: any[]; - - /** - * 级联属性配置 - */ - cascadeConfig?: PropertyEntity[]; - - /** - * 级联属性是否默认收起 - */ - isExpand?= false; - - /** - * 是否隐藏级联属性的头部 - */ - hideCascadeTitle?= false; - - /** - * 级联属性的汇总信息 - */ - cascadeConverter?: TypeConverter; - - /** - * 模态框属性自定义编辑器 - */ - editor?: Type; - - /** - * 模态框属性自定义编辑器参数 - */ - editorParams?: any; - - /** - * 模态框属性值转换器 - */ - converter?: TypeConverter; - - /** - * 模态框属性是否展示清除图标 - */ - showClearButton?= false; - - //事件编辑器集成 - /** 内置构件显示的命令列表 */ - internalCommandList?: any; - /** 内置构件显示的命令列表 */ - viewModel?: any; - /** 内置构件显示的命令列表 */ - events?: any; - /** 已绑定的事件 */ - boundEventsList?: any; - isAddControllerMethod?: boolean; - - /** - * 点击清除按钮后的方法,参数为清除前的属性值 - */ - afterClickClearButton?(value: any): void; - - /** - * 打开模态框前的方法,一般用于校验逻辑,返回值中result=true,则进一步打开模态框,result=false则提示message内容,并不再打开模态框。 - */ - beforeOpenModal?(): BeforeOpenModalResult { - return new BeforeOpenModalResult(); - } - - [propName: string]: any; -} - -/** - * 属性值转换器,返回模态框类属性文本框内的显示内容 - */ -export interface TypeConverter { - convertTo(data: any, params?: any): string; // 由模态框转为属性框中展示的值 -} - -export interface KeyMap { - key: any; - value: any; -} - -/** - * 打开模态框前的方法返回值,result=true,则进一步打开模态框,result=false则提示message内容,并不再打开模态框。 - */ -export class BeforeOpenModalResult { - result: boolean; - message?: string; - parameters?: any; -} - -/** - * 属性变更集 - */ -export class PropertyChangeObject { - /** - * 属性ID - */ - propertyID: string; - - /** - * 变更后的属性值 - */ - propertyValue: any; - - /** - * 属性所在分类ID - */ - categoryId: string; - - /** - * 级联属性的父路径,以.分隔 - */ - propertyPath: string; - - /** - * 级联属性的父属性ID - */ - parentPropertyID: string; - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.css deleted file mode 100644 index 734a986b04e057c3c8cfa8ec86879b76376b372f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.css +++ /dev/null @@ -1,45 +0,0 @@ -:host>>>.style-panel { - margin-bottom: 10px; - padding-bottom: 5px; - border-bottom: 1px solid rgba(31, 56, 88, .1); -} - -:host>>>.form-group { - display: flex; -} - -:host>>>.form-group .col-form-label { - width: 80px; - min-width: 80px; - text-align: left; - padding-right: 10px; -} - -:host>>>.form-group .col-form-label .f-icon { - color: #a3a3a3; -} - -:host>>>.style-panel .detail-panel { - margin: 10px 0px; - padding: 5px 20px; - background: rgba(31, 56, 88, .04); - box-shadow: 1px 1px 3px 1px rgb(2 75 193 / 20%); - border-radius: 5px; -} - -:host>>>.style-panel .detail-panel .farris-form-group { - margin-bottom: 8px; -} - - - -:host>>>.style-panel .detail-panel.detail-panel .farris-input-wrap>>>.color-picker-wrapper .color-picker-input { - min-width: unset; -} - -.btn-custom { - border-color: #529DFF; - color: #529DFF; - width: 100%; - margin: 8px 0; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.html deleted file mode 100644 index 429db398ea784f02a2e3798eaf6749fe12be19dc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.ts deleted file mode 100644 index 43c78c628f54e28884d3d50cbbc03a7cd395bf58..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style-editor.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ChangeDetectorRef, Component, ComponentFactoryResolver, EventEmitter, Injector, OnInit, Output } from '@angular/core'; -// import { PropertyEntity } from '@farris/ide-property-panel'; -import { BsModalService, ModalOptions } from '@farris/ui-modal'; -import { cloneDeep } from 'lodash-es'; -import { PropertyEntity } from '../../entity/property-entity'; -import { StyleEditorComponent } from '../style-editor/style-editor.component'; - -/** - * 内联样式编辑器。不考虑class样式的影响 - */ -@Component({ - selector: 'app-advanced-style-editor', - templateUrl: './advanced-style-editor.component.html', - styleUrls: ['./advanced-style-editor.component.css'] -}) -export class AdvancedStyleEditorComponent implements OnInit { - @Output() valueChanged = new EventEmitter(); - - private _elementConfig: PropertyEntity; - - get elementConfig() { - return this._elementConfig; - } - - set elementConfig(value) { - this._elementConfig = value; - } - - /** 控件初始style样式 */ - private originControlStyle = ''; - originControlStyleList = []; - - constructor( - private resolver: ComponentFactoryResolver, - private injector: Injector, - private modalService: BsModalService, - private cd: ChangeDetectorRef - ) { } - - ngOnInit() { - this.initAppearance(); - } - - initAppearance() { - const appearance = this.elementConfig && this.elementConfig.editorParams && this.elementConfig.editorParams.appearance || {}; - this.originControlStyle = appearance.style || ''; - const styleList = this.originControlStyle.split(';'); - this.originControlStyleList = cloneDeep(styleList.filter(item => !!item)); - } - - - emitStyleValueChange(finalStyle: string) { - this.originControlStyleList = finalStyle.split(';'); - if (!this.elementConfig) { - return; - } - if (!this.elementConfig.editorParams) { - this.elementConfig.editorParams = { - appearance: { - style: '' - } - }; - } - if (!this.elementConfig.editorParams.appearance) { - this.elementConfig.editorParams.appearance = { - style: '' - }; - } - this.elementConfig.editorParams.appearance.style = finalStyle; - - this.valueChanged.next({ $event: null, elementValue: null }); - - } - - /** - * 打开自定义编辑器 - */ - openCusomStyleEditor() { - const compFactory = this.resolver.resolveComponentFactory(StyleEditorComponent); - const compRef = compFactory.create(this.injector); - compRef.instance.value = this.originControlStyleList.join(';'); - const modalConfig = compRef.instance.modalConfig as ModalOptions; - modalConfig.buttons = compRef.instance.modalFooter; - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.submitModal.subscribe((value) => { - this.emitStyleValueChange(value.value); - this.cd.detectChanges(); - - modalPanel.close(); - }); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style.editor.module.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style.editor.module.ts deleted file mode 100644 index c75244243116e337d9b3c8cbce388f20c66f1d05..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/advanced-style.editor.module.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { FarrisColorpickerPlusModule } from '@farris/colorpicker-plus'; -import { ComboListModule } from '@farris/ui-combo-list'; -import { ComboLookupModule } from '@farris/ui-combo-lookup'; -import { FarrisFormsModule } from '@farris/ui-forms'; -import { InputGroupModule } from '@farris/ui-input-group'; -import { NumberSpinnerModule } from '@farris/ui-number-spinner'; -import { PaginationModule } from '@farris/ui-pagination'; -import { AdvancedStyleEditorComponent } from './advanced-style-editor.component'; -import { BackgroundEditorComponent } from './background/background-editor.component'; -import { BorderEditorComponent } from './border/border-editor.component'; -import { MarginEditorComponent } from './margin/margin-editor.component'; -import { SizeEditorComponent } from './size/size-editor.component'; - - -@NgModule({ - declarations: [ - AdvancedStyleEditorComponent, - MarginEditorComponent, - BackgroundEditorComponent, - BorderEditorComponent, - SizeEditorComponent - ], - imports: [ - CommonModule, - FormsModule, - FarrisFormsModule, - NumberSpinnerModule, - ComboListModule, - ComboLookupModule, - BrowserAnimationsModule, - InputGroupModule, - PaginationModule, - FarrisColorpickerPlusModule - ], - exports: [ - AdvancedStyleEditorComponent - ], - entryComponents: [ - AdvancedStyleEditorComponent - ] -}) -export class AdvancedStyleEditorModule { - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.html deleted file mode 100644 index 7b99401dc0cca62747b8af9f5c264b2d3986703e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
-
- -
-
- - -
-
-
-
-
-
- -
-
- -
-
-
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.ts deleted file mode 100644 index 38ef0e1fcec8edca5707cb739df2eaae684f3d25..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/background/background-editor.component.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; - -/** - * 背景色编辑器 - */ -@Component({ - selector: 'app-background-editor', - templateUrl: './background-editor.component.html' -}) -export class BackgroundEditorComponent implements OnInit, OnChanges { - - /** 初始style列表 */ - @Input() originControlStyleList: string[]; - @Output() emitValueChange = new EventEmitter(); - - - typeList = [ - { value: 'none', text: '系统默认' }, - { value: 'custom', text: '自定义' } - ]; - /** 当前颜色类型 */ - actualType = 'custom'; - - /** 自定义颜色值 */ - customColor; - - presetColors = ['#fff', '#edf5ff', '#e6e9f0', '#dae9ff', '#673AB7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800', '#ff5722 ', '#9e9e9e']; - /** 颜色选择器入参 */ - elementConfig; - - /** 是否显示详情 */ - showBackgroundDetail = false; - - ngOnInit() { - // this.initBackgroundStyle(); - } - ngOnChanges(changes: SimpleChanges): void { - this.initBackgroundStyle(); - } - - initBackgroundStyle() { - let background = this.getStyleValue('background'); - const backgroundColor = this.getStyleValue('background-color'); - - // 提取background中颜色值 - if (background) { - background = background.split(' ').find(item => item.includes('#') || item.includes('rgba')); - } - - this.customColor = backgroundColor || background; - - this.actualType = !!this.customColor ? 'custom' : 'none'; - - this.elementConfig = { - editorParams: { - preColor: this.customColor || '#fff', - presets: this.presetColors - } - - }; - } - - /** - * 根据样式key值,获取value值 - * @param styleKey key值 - */ - private getStyleValue(styleKey: string) { - const style = this.originControlStyleList.find(item => item && item.includes(styleKey + ':')); - - if (!style) { - return; - } - return style.replace(styleKey + ':', ''); - - } - - onChangeType() { - - if (this.actualType === 'none') { - this.showBackgroundDetail = false; - this.customColor = '#fff'; - } else { - if (!this.customColor) { - this.customColor = '#fff'; - } - - this.showBackgroundDetail = true; - } - - this.elementConfig = { - editorParams: { - preColor: this.customColor || '#fff', - presets: this.presetColors - } - - }; - this.emitStyleAfterColorChanged(); - } - - onChangeCustomColor(e) { - this.customColor = e.elementValue; - this.actualType = 'custom'; - this.emitStyleAfterColorChanged(); - } - /** - * 更改颜色后触发变更事件 - */ - emitStyleAfterColorChanged() { - const otherstyles = this.originControlStyleList.filter(item => !item.includes('background-color')); - let finalStyle = otherstyles.join(';'); - - let finalColor = this.actualType === 'none' ? null : this.customColor; - - if (finalColor) { - finalColor = 'background-color:' + finalColor + ';'; - - finalStyle = finalColor + finalStyle; - } - - - this.emitValueChange.next(finalStyle); - - } - - onChangeBackgroundDetailPanel() { - this.showBackgroundDetail = !this.showBackgroundDetail; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.css deleted file mode 100644 index 14df5b7371346ee3511aa8889e1c2d693f288f1c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.css +++ /dev/null @@ -1,45 +0,0 @@ -.style-panel .detail-panel { - padding: 10px; - -} - -.detail-panel .border-panel { - display: flex; - margin-top: 0; - border: 0; -} - - -.detail-panel .border-panel .left-pane { - width: 40%; - display: flex; - align-items: center; - justify-content: space-around; -} - -.detail-panel .border-panel .right-pane { - padding-left: 8px; - flex-direction: column; - display: flex; - justify-content: center; - align-items: center; -} - - -.detail-panel .border-panel .right-pane .col-form-label { - width: 50px; - min-width: 50px; -} - -.detail-panel .border-panel .left-pane .direction-panel>div { - margin: 2px; - padding: 5px; - border-radius: 2px; - text-align: center; - cursor: pointer; -} - -.detail-panel .border-panel .left-pane .direction-panel>div.active { - background: linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, .2)); -} - diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.html deleted file mode 100644 index dccbb24474ad07ec173cc80c4df2c9a3b2854821..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.html +++ /dev/null @@ -1,143 +0,0 @@ -
-
-
- - -
-
- - -
-
-
-
-
-
- -
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
-
- -
-
- - -
-
-
- -
-
-
- -
-
- -
-
-
-
- -
-
-
-
- -
-
- -
-
-
-
-
- -
-
- - -
-
-
-
-
- -
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.ts deleted file mode 100644 index 1d4e865b472bde0ca73dc09e883d04ff634fb96f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/border/border-editor.component.ts +++ /dev/null @@ -1,317 +0,0 @@ -import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { cloneDeep } from 'lodash-es'; - -/** - * 边框编辑器 - */ -@Component({ - selector: 'app-border-editor', - templateUrl: './border-editor.component.html', - styleUrls: ['./border-editor.component.css'] -}) -export class BorderEditorComponent implements OnInit, OnChanges { - - /** 初始style列表 */ - @Input() originControlStyleList: string[]; - @Output() emitValueChange = new EventEmitter(); - - /** 是否显示详情面板 */ - showBorderDetail = false; - - /** 当前选中的边框方向 */ - selectedBorderDirection = 'all'; - - /** 边框配置值 */ - border = { - all: { - style: 'none', - width: 0, - color: '#fff', - colorConfig: {} - }, - top: { - style: 'none', - width: 0, - color: '#fff', - colorConfig: {} - }, - right: { - style: 'none', - width: 0, - color: '#fff', - colorConfig: {} - }, - bottom: { - style: 'none', - width: 0, - color: '#fff', - colorConfig: {} - }, - left: { - style: 'none', - width: 0, - color: '#fff', - colorConfig: {} - } - }; - /** 可选的线型列表 */ - borderStyleTypes = [ - { value: 'none', text: '无' }, - { value: 'solid', text: '实线' }, - { value: 'dotted', text: '点线' }, - { value: 'dashed', text: '虚线' }, - - ]; - /** 预置边框颜色 */ - presetBorderColors = ['#000000', '#edf5ff', '#e6e9f0', '#dae9ff', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800', '#ff5722 ', '#9e9e9e']; - - /** 当前选中的圆角方向 */ - selectedRadiusDirection = 'all'; - - /** 圆角值 */ - radius = { - all: 0, - 'top-left': 0, - 'top-right': 0, - 'bottom-left': 0, - 'bottom-right': 0 - }; - constructor(private cd: ChangeDetectorRef) { - - } - ngOnInit() { - // this.initBorderStyle(); - } - ngOnChanges(changes: SimpleChanges): void { - this.initBorderStyle(); - this.initRadiusStyle(); - } - - initBorderStyle() { - // 取统一配置 - this.getUnifiedBorderValue(); - - // 取各方向的配置 - this.getBorderInDirection('top'); - this.getBorderInDirection('right'); - this.getBorderInDirection('bottom'); - this.getBorderInDirection('left'); - } - - private getBorderInDirection(direction: string) { - - const borderStyle = this.getBorderValueInDirection(direction, 'style'); - const borderWidth = this.getBorderValueInDirection(direction, 'width'); - const borderColor = this.getBorderValueInDirection(direction, 'color'); - - this.border[direction] = { - style: borderStyle || 'none', - width: parseInt(borderWidth || '0', 10), - color: borderColor || '#fff', - colorConfig: { - editorParams: { - preColor: borderColor || '#fff', - presets: this.presetBorderColors - } - } - }; - } - /** - * 获取某个方向上某属性的最终生效值 - * 例如:左侧边框的线型值 - */ - private getBorderValueInDirection(direction: string, propKey: string) { - let finalBorderStyle; - - // 以下四种场景,最终生效的线型值是按照样式出现的先后顺序,后面会覆盖前面的 - // border: 2px solid #fff; 提取solid - // border-left: 2px solid #fff; 提取solid - // border-left-style: solid; - // border-style: solid; - - // TODO:考虑border-style: solid dotted;的场景 - - - this.originControlStyleList.forEach(item => { - if (!item.includes('border')) { - return; - } - const itemKey = item.split(':')[0]; - const itemValue = item.split(':')[1]; - const searchKeys = [ - `border-${propKey}`, - ]; - if (propKey !== 'radius') { - searchKeys.push(`border`); - } - if (direction) { - searchKeys.push( - `border-${direction}-${propKey}`, - `border-${direction}` - ); - } - if (!searchKeys.includes(itemKey)) { - return; - } - finalBorderStyle = this.getValueByPropKey(propKey, itemValue); - }); - - return finalBorderStyle; - } - - /** - * 根据border-left: 2px solid #fff; 提取solid - * @param propKey solid - * @param styleValue border-left: 2px solid #fff - */ - private getValueByPropKey(propKey: string, styleValue: string): string { - if (!styleValue) { - return; - } - let condition; - switch (propKey) { - case 'style': { - condition = (item) => ['none', 'solid', 'dashed', 'dotted'].includes(item); - break; - } - case 'width': case 'radius': { - condition = (item) => item.includes('px'); - break; - } - case 'color': { - condition = (item) => item.includes('#') || item.includes('rgba'); - break; - } - } - if (condition) { - return styleValue.split(' ').find(condition); - } - } - /** - * 获取border统一的值 - */ - private getUnifiedBorderValue() { - const borderStyle = this.getBorderValueInDirection('', 'style'); - const borderWidth = this.getBorderValueInDirection('', 'width'); - const borderColor = this.getBorderValueInDirection('', 'color'); - - this.border.all = { - style: borderStyle || 'none', - width: parseInt(borderWidth || '0', 10), - color: borderColor || '#fff', - colorConfig: { - editorParams: { - preColor: borderColor || '#fff', - presets: this.presetBorderColors - } - } - }; - } - - onChangeBorderDetailPanel() { - this.showBorderDetail = !this.showBorderDetail; - } - /** - * 切换边框方向 - */ - onChangeBorderDirection(key: string) { - this.selectedBorderDirection = key; - - // 为了解决界面不检测变更的问题 - this.border = cloneDeep(this.border); - this.cd.detectChanges(); - } - - /** - * 改变某个方向的样式值 - * @param propKey 样式key,例如width/style - */ - onChangeBorderInDirection(propKey: string) { - let styleKey = `border-${propKey}`; - - if (this.selectedBorderDirection !== 'all') { - styleKey = `border-${this.selectedBorderDirection}-${propKey}`; - } - - // 组装style样式:例如border-right-width:4px或border-left-style:dotted - let finalStyle = `${styleKey}:${this.border[this.selectedBorderDirection][propKey]}`; - if (propKey === 'width') { - finalStyle += 'px'; - } - - // 删掉旧值,并在最后追加新值 - const styleIndex = this.originControlStyleList.findIndex(item => item.split(':')[0] === styleKey); - if (styleIndex > -1) { - this.originControlStyleList.splice(styleIndex, 1); - } - this.originControlStyleList.push(finalStyle); - - this.emitValueChange.next(this.originControlStyleList.join(';')); - - } - /** - * 修改边框颜色 - */ - onChangeBorderColor(e) { - const color = e.elementValue; - this.border[this.selectedBorderDirection]['color'] = color; - this.onChangeBorderInDirection('color'); - } - - /** - * 初始圆角数据 - */ - initRadiusStyle() { - const borderRadius = this.getBorderValueInDirection('', 'radius'); - - this.radius.all = borderRadius; - - - const borderTopLeftRadius = this.getBorderValueInDirection('top-left', 'radius'); - const borderTopRightRadius = this.getBorderValueInDirection('top-right', 'radius'); - const borderBottomLeftRadius = this.getBorderValueInDirection('bottom-left', 'radius'); - const borderBottomRightRadius = this.getBorderValueInDirection('bottom-right', 'radius'); - - this.radius = { - all: parseInt(borderRadius || '0', 10), - 'top-left': parseInt(borderTopLeftRadius || '0', 10), - 'top-right': parseInt(borderTopRightRadius || '0', 10), - 'bottom-left': parseInt(borderBottomLeftRadius || '0', 10), - 'bottom-right': parseInt(borderBottomRightRadius || '0', 10), - }; - } - - /** - * 切换圆角方向 - */ - onChangeRadiusDirection(direction: string) { - this.selectedRadiusDirection = direction; - - // 为了解决界面不检测变更的问题 - this.radius = cloneDeep(this.radius); - this.cd.detectChanges(); - } - - /** - * 修改圆角值 - */ - onChangeRadiusValueInDirection() { - let styleKey = `border-radius`; - - if (this.selectedRadiusDirection !== 'all') { - styleKey = `border-${this.selectedRadiusDirection}-radius`; - } - - // 组装style样式:例如border-bottom-right-radius:4px - const finalStyle = `${styleKey}:${this.radius[this.selectedRadiusDirection]}px`; - - // 删掉旧值,并在最后追加新值 - const styleIndex = this.originControlStyleList.findIndex(item => item.split(':')[0] === styleKey); - if (styleIndex > -1) { - this.originControlStyleList.splice(styleIndex, 1); - } - this.originControlStyleList.push(finalStyle); - - this.emitValueChange.next(this.originControlStyleList.join(';')); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.html deleted file mode 100644 index a35ee82b99435344b2dd3c228466267ddb6caa66..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.html +++ /dev/null @@ -1,72 +0,0 @@ -
-
-
- -
-
- - -
-
-
-
- -
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
- -
-
- - -
-
-
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.ts deleted file mode 100644 index f71495f2818c950530be932545471a9ecca0b650..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/margin/margin-editor.component.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; - -/** - * 外边距编辑器 - */ -@Component({ - selector: 'app-margin-editor', - templateUrl: './margin-editor.component.html', - styleUrls: ['./margin-editor.component.css'] -}) -export class MarginEditorComponent implements OnInit, OnChanges { - - @Input() styleType: 'margin' | 'padding'; - /** 初始style列表 */ - @Input() originControlStyleList: string[]; - @Output() emitValueChange = new EventEmitter(); - - - presettingMarginList = [ - { value: 'none', text: '系统默认' }, - { value: '20px', text: '大(20px)' }, - { value: '16px', text: '中(16px)' }, - { value: '12px', text: '小(12px)' }, - { value: '8px', text: '超小(8px)' }, - { value: '0px', text: '无(0px)' }, - { value: 'custom', text: '自定义' } - ]; - - marginData: { - type: string, - margin?: string, - marginLeft?: string, - marginRight?: string, - marginTop?: string, - marginBottom?: string - }; - /** 是否显示外间距详情 */ - showMarginDetail = false; - - marginName = ''; - constructor(private cd: ChangeDetectorRef) { } - - - // style:"margin:10px;margin-top:12px;margin-left:12px" - ngOnInit() { - this.marginName = this.styleType === 'margin' ? '外间距' : '内间距'; - // this.marginData = { type: 'custom' }; - - // this.initMarginStyle(); - } - ngOnChanges(changes: SimpleChanges): void { - this.marginData = { type: 'custom' }; - this.initMarginStyle(); - } - - - private initMarginStyle() { - // 提取样式中的margin部分 - const margin = this.getStyleValue(`${this.styleType}`); - let marginTop = this.getStyleValue(`${this.styleType}-top`); - let marginBottom = this.getStyleValue(`${this.styleType}-bottom`); - let marginLeft = this.getStyleValue(`${this.styleType}-left`); - let marginRight = this.getStyleValue(`${this.styleType}-right`); - - marginTop = marginTop ? marginTop : margin; - marginBottom = marginBottom ? marginBottom : margin; - marginLeft = marginLeft ? marginLeft : margin; - marginRight = marginRight ? marginRight : margin; - - - this.marginData.type = 'custom'; - - - // 值都是null,则为类型为系统默认 - if (!margin && !marginTop && !marginBottom && !marginLeft && !marginRight) { - this.marginData.type = 'none'; - } else { - // 有值,且值相等,且值在预置列表里,则类型为间距值 - if (marginTop && marginTop === marginBottom && marginTop === marginLeft && marginTop === marginRight) { - const presettingMarinKeys = this.presettingMarginList.map(item => item.value); - if (presettingMarinKeys.includes(margin)) { - this.marginData.type = margin; - } - } - // 有值,且值不相等,或者值不在预置列表里,则类型为自定义 - // this.marginData.type = 'custom'; - } - this.marginData.marginTop = marginTop ? marginTop.replace('px', '') : null; - this.marginData.marginBottom = marginBottom ? marginBottom.replace('px', '') : null; - this.marginData.marginLeft = marginLeft ? marginLeft.replace('px', '') : null; - this.marginData.marginRight = marginRight ? marginRight.replace('px', '') : null; - - // this.showMarginDetail = this.marginData.type !== 'none'; - - } - - /** - * 根据样式key值,获取value值 - * @param styleKey key值 - */ - private getStyleValue(styleKey: string) { - const style = this.originControlStyleList.find(item => item && item.includes(styleKey + ':')); - - if (!style) { - return; - } - return style.replace(styleKey + ':', ''); - - } - - onChangeMarginType() { - switch (this.marginData.type) { - // 移除外边距 - case 'none': { - this.showMarginDetail = false; - this.marginData.marginTop = null; - this.marginData.marginRight = null; - this.marginData.marginBottom = null; - this.marginData.marginLeft = null; - this.marginData.margin = null; - break; - } - // 自定义外边距 - case 'custom': { - this.showMarginDetail = true; - // this.marginData.margin = null; - break; - } - // 固定边距,上下左右都一致 - default: { - this.marginData.marginTop = this.marginData.type.replace('px', ''); - this.marginData.marginRight = this.marginData.marginTop; - this.marginData.marginBottom = this.marginData.marginTop; - this.marginData.marginLeft = this.marginData.marginTop; - this.marginData.margin = this.marginData.marginTop; - } - } - - this.cd.detectChanges(); - this.emitStyleAfterMarginChanged(); - - } - onChangeMarginDetailPanel() { - this.showMarginDetail = !this.showMarginDetail; - } - onChangeSingleMargin() { - // 判断各方向的间距都有值,而且相等 - const hasSameMarginValue = this.marginData.marginTop + '' && - this.marginData.marginTop + '' === this.marginData.marginBottom + '' && - this.marginData.marginTop + '' === this.marginData.marginLeft + '' && - this.marginData.marginTop + '' === this.marginData.marginRight + ''; - - // 值不同 - if (!hasSameMarginValue) { - this.marginData.type = 'custom'; - this.emitStyleAfterMarginChanged(); - return; - } - // 值相同,且都为null - if (!this.marginData.marginTop) { - this.marginData.type = 'none'; - this.emitStyleAfterMarginChanged(); - return; - } - - // 值相同,且在预置的列表里 - const presettingMarinKeys = this.presettingMarginList.map(item => item.value); - if (presettingMarinKeys.includes(this.marginData.marginTop + 'px')) { - this.marginData.type = this.marginData.marginTop + 'px'; - - this.emitStyleAfterMarginChanged(); - return; - } - // 值相同,且不在预置的列表里 - this.marginData.type = 'custom'; - this.emitStyleAfterMarginChanged(); - - } - /** - * 更改外间距后触发变更事件 - */ - emitStyleAfterMarginChanged() { - const otherstyles = this.originControlStyleList.filter(item => !item.includes(this.styleType)); - - let finalStyle = otherstyles.join(';'); - if (this.marginData.type !== 'none') { - let marginStyle = ''; - if (this.marginData.marginTop && this.marginData.marginTop && this.marginData.marginTop === this.marginData.marginBottom - && this.marginData.marginTop === this.marginData.marginLeft && this.marginData.marginTop === this.marginData.marginRight) { - marginStyle += `${this.styleType}:${this.marginData.marginTop}px;`; - } else { - marginStyle += this.marginData.marginTop !== null ? `${this.styleType}-top:${this.marginData.marginTop}px;` : ''; - marginStyle += this.marginData.marginRight !== null ? `${this.styleType}-right:${this.marginData.marginRight}px;` : ''; - marginStyle += this.marginData.marginBottom !== null ? `${this.styleType}-bottom:${this.marginData.marginBottom}px;` : ''; - marginStyle += this.marginData.marginLeft !== null ? `${this.styleType}-left:${this.marginData.marginLeft}px;` : ''; - - } - - finalStyle = marginStyle + finalStyle; - } - - - this.emitValueChange.next(finalStyle); - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.css deleted file mode 100644 index 44ffd7cb5cc26fdf949adfd1358a04dcbed80eaf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.css +++ /dev/null @@ -1,9 +0,0 @@ -.form-group .col-form-label { - width: 60px !important; - min-width: 60px !important; -} - -.size-type { - width: 60px; - min-width: 60px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.html deleted file mode 100644 index 66fceb3fe36f1deea04ad568e63a910f0090ba28..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.html +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
- -
-
-
- - - - -
-
-
-
-
-
- - -
-
-
- -
-
-
- - - - -
-
-
-
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.ts deleted file mode 100644 index 439996ebd6001b80e2acc857af9fb722814d2bfc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/advanced-style-editor/size/size-editor.component.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; - -/** - * 宽高编辑器 - */ -@Component({ - selector: 'app-size-editor', - templateUrl: './size-editor.component.html', - styleUrls: ['./size-editor.component.css'] -}) -export class SizeEditorComponent implements OnInit, OnChanges { - - @Input() originControlStyleList: string[]; - @Output() emitValueChange = new EventEmitter(); - - sizeType = [{ value: 'px', text: 'px' }, { value: '%', text: '%' }]; - - width: number; - height: number; - - - /** 当前宽度类型 */ - currentWidthType = 'px'; - - /** 当前高度类型 */ - currentHeightType = 'px'; - - /** 宽度输入框的最大值,用于百分比类型下限制最高100% */ - maxWidth; - - /** 高度输入框的最大值,用于百分比类型下限制最高100% */ - maxHeight; - - constructor(private cd: ChangeDetectorRef) { } - ngOnInit() { - // this.initControlSize(); - } - ngOnChanges(changes: SimpleChanges): void { - this.initControlSize(); - } - - - private initControlSize() { - const widthStyle = this.getStyleValue('width'); - const heightStyle = this.getStyleValue('height'); - if (widthStyle) { - this.width = parseInt(widthStyle.replace('px', '').replace('%', ''), 10); - this.currentWidthType = widthStyle.includes('%') ? '%' : 'px'; - this.maxWidth = this.currentWidthType === '%' ? 100 : null; - } else { - this.width = null; - // this.currentWidthType = 'px'; - this.maxWidth = null; - } - - if (heightStyle) { - this.height = parseInt(heightStyle.replace('px', '').replace('%', ''), 10); - this.currentHeightType = heightStyle.includes('%') ? '%' : 'px'; - this.maxHeight = this.currentHeightType === '%' ? 100 : null; - } else { - this.height = null; - // this.currentHeightType = 'px'; - this.maxHeight = null; - } - } - - onChangeWidth() { - - const otherstyles = this.originControlStyleList.filter(item => !item.includes('width')); - let finalStyle = otherstyles.join(';'); - - if (this.width) { - const widthStyle = 'width:' + this.width + this.currentWidthType + ';'; - - finalStyle = widthStyle + finalStyle; - } - - - this.emitValueChange.next(finalStyle); - } - onChangeHeight() { - const otherstyles = this.originControlStyleList.filter(item => !item.includes('height')); - let finalStyle = otherstyles.join(';'); - - if (this.height) { - const heightStyle = 'height:' + this.height + this.currentHeightType + ';'; - - finalStyle = heightStyle + finalStyle; - } - - - this.emitValueChange.next(finalStyle); - } - onChangeWidthType() { - this.maxWidth = this.currentWidthType === '%' ? 100 : null; - - // 若百分比格式下超出100%,就将值清空 - if (this.maxWidth && this.width > this.maxWidth) { - this.width = null; - this.cd.detectChanges(); - } - this.onChangeWidth(); - } - onChangeHeightType() { - this.maxHeight = this.currentHeightType === '%' ? 100 : null; - - // 若百分比格式下超出100%,就将值清空 - if (this.maxHeight && this.height > this.maxHeight) { - this.height = null; - this.cd.detectChanges(); - } - this.onChangeHeight(); - } - - /** - * 根据样式key值,获取value值 - * @param styleKey key值 - */ - private getStyleValue(styleKey: string) { - const style = this.originControlStyleList.find(item => item && item.includes(styleKey + ':')); - - if (!style) { - return; - } - return style.replace(styleKey + ':', ''); - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor-convert.ts deleted file mode 100644 index cba800ad88c1b1e68567d3953dd4f904476f9345..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor-convert.ts +++ /dev/null @@ -1,41 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class BindingCustomEditorConverter implements TypeConverter { - - selectConfig: { - idField: string, - textField: string, - options: any[] - }; - constructor(selectConfig?: any) { - this.selectConfig = selectConfig; - } - convertTo(data): any { - if (typeof (data) === 'boolean') { - return data; - } - // 枚举的场景 - if (typeof (data) === 'string') { - if (this.selectConfig && this.selectConfig.options && this.selectConfig.idField) { - const valueOption = this.selectConfig.options.find(option => option[this.selectConfig.idField] === data); - if (valueOption) { - return valueOption[this.selectConfig.textField]; - } else { - return data; - } - } else { - return data; - } - - } - if (data && data.type === 'Expression') { - return '表达式'; - } - if (data) { - return data.type + ':' + data.path; - } - return data || ''; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.html deleted file mode 100644 index 6f705faf57afb5f75fd1dfb4eb93fc1144a771ed..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.html +++ /dev/null @@ -1,142 +0,0 @@ -
- - -
- - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- - -
-
-
-
-
- -
- -
-
-
-
- - -
-
-
- -
- - -
-
-
-
-
- -
- -
-
-
-
- - -
-
-
- -
- - -
-
-
-
- - - - - -
- - - - - - {{rowData[col.field]}} - - - - - -
- -
- -
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.ts deleted file mode 100644 index 0b85ee01a408ae261dccb6602d3ac576cf4d4e0a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-custom-editor/binding-custom-editor.component.ts +++ /dev/null @@ -1,644 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, NgZone, HostBinding } from '@angular/core'; -import { TreeTableComponent } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { FormBindingType, FormExpressionConfig, DomService, DesignViewModelService, FormVariableCategory } from '@farris/designer-services'; -// import { ExpressionEditorComponent } from '../expression-editor/expression-editor.component'; - -// 绑定自定义的字符串 -const BINDING_TYPE_CUSTOM = 'Custom'; -const BINDING_TYPE_FORM = FormBindingType.Form; -const BINDING_TYPE_LOCAL_VAR = 'LocaleVariable'; -const BINDING_TYPE_REMOTE_VAR = 'RemoteVariable'; -const BINDING_TYPE_EXPRESSION = 'Expression'; - - - -/** - * 用于属性填写自定义的字符串或绑定变量、字段,选择后的字段和变量不会添加到viewModel.fields节点下。待删,用多值属性编辑器替换。 - */ - -@Component({ - selector: 'app-binding-custom-editor', - templateUrl: './binding-custom-editor.component.html', -}) -export class BindingCustomEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams: BindingCustomEditorParams; - @ViewChild('bindingFooter') modalFooter: TemplateRef; - get modalConfig() { - return { - title: this.editorParams.modalTitle || '绑定编辑器', - width: 1060, - height: 700, - showButtons: true - }; - } - /** 当前绑定方式 */ - bindingType = BINDING_TYPE_CUSTOM; - - /** - * 支持的绑定方式数组 - */ - bindingTypeEnumData = []; - - /** 是否支持绑定字段---默认不支持 */ - canBindForm = false; - - /** 是否支持绑定组件变量 */ - canBindLocaleVar = true; - - /** 是否支持绑定表单变量 */ - canBindRemoteVar = true; - - /** 是否支持自定义配置项 */ - canBindCustom = true; - - - /** 自定义绑定数据 */ - customBinding: any; - - /** 自定义下拉列表配置项 */ - selectConfig; - - customBoolAndStringRadioValue: any = true; - customStringValue = ''; - - /** 树表数据 */ - treeData = []; - - /** 树表列配置 */ - treeCols = []; - - /** 树表实例 */ - @ViewChild('treeTable') treeTable: TreeTableComponent; - - // 绑定字段树表信息 - fieldsTreeData = []; - fieldsTreeCols = [{ field: 'name', title: '名称' }, { field: 'bindingField', title: '绑定字段' }]; - - - // 变量树表信息 - localVarTreeData = []; - remoteVarTreeData = []; - variableTreeCols = [{ field: 'name', title: '名称' }, { field: 'code', title: '编号' }]; - - /** 当前配置的表达式 */ - originalExpConfig: FormExpressionConfig; - - /** 表达式编辑器参数配置 */ - expressionParams: any = {}; - - /** 表达式值 */ - expressionValue = ''; - - /** 表达式编辑器实例 */ - // @ViewChild(ExpressionEditorComponent) expressionEditorComponent: ExpressionEditorComponent; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - /** 日期类控件的展示格式 */ - dateFormat = 'yyyy-MM-dd'; - showDateTime = false; - - constructor( - private domService: DomService, - private dgVMService: DesignViewModelService, - private notifyService: NotifyService, - private ngZone: NgZone) { } - - ngOnInit() { - const viewModelId = this.editorParams.viewModelId; - const viewModel = this.domService.getViewModelById(viewModelId); - // 字段 - this.fieldsTreeData = this.dgVMService.getAllFields2TreeByVMId(viewModelId); - - // 根组件的组件变量 - if (viewModel.parent) { - const rootLocalVars = this.domService.getLocaleVariablesByViewModelId(viewModel.parent); - if (rootLocalVars && rootLocalVars.length) { - rootLocalVars[0].data.name = '根组件'; - this.localVarTreeData = this.localVarTreeData.concat(rootLocalVars); - } - } - // 当前组件的组件变量 - const localVars = this.domService.getLocaleVariablesByViewModelId(viewModelId); - this.localVarTreeData = this.localVarTreeData.concat(localVars); - - // 后端变量 - this.remoteVarTreeData = this.domService.getRemoteVariables(); - - this.init(); - this.assembleTreeData(); - this.initExpression(); - this.initCustomBoolOrString(); - this.initCustomSelectOrString(); - - this.assembleBindingTypeEnumData(); - } - - - init() { - // 初始自定义绑定中的下拉枚举配置 - switch (this.editorParams.customType) { - case BindingCustomType.boolean: { - this.selectConfig = this.editorParams.selectConfig || { - idField: 'value', - textField: 'text', - options: [{ value: true, text: 'true' }, { value: false, text: 'false' }] - }; - break; - } - case BindingCustomType.select: { - this.selectConfig = Object.assign({ - idField: 'value', - textField: 'text', - options: [] - }, this.editorParams.selectConfig); - break; - } - case BindingCustomType.booleanOrString: { - this.selectConfig = this.editorParams.selectConfig || { - idField: 'value', - textField: 'text', - options: [{ value: true, text: 'true' }, { value: false, text: 'false' }, { value: 'string', text: '自定义' }] - }; - break; - } - case BindingCustomType.selectOrString: { - const idField = this.editorParams.selectConfig.idField; - const textField = this.editorParams.selectConfig.textField; - const options = this.editorParams.selectConfig.options.concat({ - [idField]: 'string', - [textField]: '自定义' - }); - this.selectConfig = { - idField, - textField, - options - }; - break; - } - case BindingCustomType.datetime: { - this.dateFormat = 'yyyy-MM-dd HH:mm:ss'; - this.showDateTime = true; - break; - } - } - - // 获取当前绑定类型 - this.getBindingType(); - } - - /** - * 获取当前绑定类型 - */ - private getBindingType() { - this.bindingType = BINDING_TYPE_CUSTOM; - - const allowedBindingType = this.editorParams.allowedBindingType; - if (allowedBindingType) { - const types = allowedBindingType.split(','); - this.canBindForm = types.includes(BINDING_TYPE_FORM); - this.canBindLocaleVar = types.includes(BINDING_TYPE_LOCAL_VAR); - this.canBindRemoteVar = types.includes(BINDING_TYPE_REMOTE_VAR); - this.canBindCustom = types.includes(BINDING_TYPE_CUSTOM); - - this.bindingType = types[0]; - } - - if (this.value || typeof (this.value) === 'boolean') { - // value为字符串或布尔值 - if (!this.value.type) { - this.bindingType = BINDING_TYPE_CUSTOM; - this.customBinding = this.value; - } else { - // value为绑定字段或变量或表达式 - this.bindingType = this.value.type; - } - } - } - - /** - * 组装当前支持的绑定方式数组,用于radiogroup - */ - private assembleBindingTypeEnumData() { - if (this.canBindCustom) { - this.bindingTypeEnumData.push({ value: 'Custom', text: '自定义' }); - } - if (this.canBindForm) { - this.bindingTypeEnumData.push({ value: 'Form', text: '绑定字段' }); - } - if (this.canBindLocaleVar) { - this.bindingTypeEnumData.push({ value: 'LocaleVariable', text: '绑定组件变量' }); - } - if (this.canBindRemoteVar) { - this.bindingTypeEnumData.push({ value: 'RemoteVariable', text: '绑定表单变量' }); - } - - // if (this.editorParams.showExpression) { - // this.bindingTypeEnumData.push({ value: 'Expression', text: '表达式' }); - // } - } - - - /** - * 切换绑定类型 - */ - changeBindingType() { - switch (this.bindingType) { - case BINDING_TYPE_CUSTOM: { - this.treeCols = []; - this.treeData = []; - break; - } - case BINDING_TYPE_FORM: { - this.treeCols = this.fieldsTreeCols; - this.treeData = this.fieldsTreeData; - break; - } - case BINDING_TYPE_LOCAL_VAR: { - this.treeCols = this.variableTreeCols; - this.treeData = this.localVarTreeData; - break; - } - case BINDING_TYPE_REMOTE_VAR: { - this.treeCols = this.variableTreeCols; - this.treeData = this.remoteVarTreeData; - break; - } - } - this.treeTable.clearSelections(); - - // 离开表达式界面时,保存当前填写的表达式值 - // if (this.editorParams.showExpression && this.bindingType !== BINDING_TYPE_EXPRESSION && this.expressionEditorComponent) { - // this.expressionValue = this.expressionEditorComponent.expEditor.getExpr() || ''; - // } - } - /** - * 绑定字段或变量时,组装树表数据 - */ - private assembleTreeData() { - - switch (this.bindingType) { - case BINDING_TYPE_FORM: { - this.treeCols = this.fieldsTreeCols; - this.treeData = this.fieldsTreeData; - - this.selectTreeNode(this.value); - break; - } - case FormBindingType.Variable: { - const variableCategory = this.getVaribleCategoryTypeById(this.value && this.value.field); - - if (variableCategory === FormVariableCategory.remote) { // 绑定remote变量 - this.treeCols = this.variableTreeCols; - this.treeData = this.remoteVarTreeData; - this.bindingType = BINDING_TYPE_REMOTE_VAR; - } else { // 绑定组件本地变量 - this.treeCols = this.variableTreeCols; - this.treeData = this.localVarTreeData; - this.bindingType = BINDING_TYPE_LOCAL_VAR; - } - - this.selectTreeNode(this.value); - break; - } - case BINDING_TYPE_REMOTE_VAR: { - this.treeCols = this.variableTreeCols; - this.treeData = this.remoteVarTreeData; - break; - } - case BINDING_TYPE_LOCAL_VAR: { - this.treeCols = this.variableTreeCols; - this.treeData = this.localVarTreeData; - break; - } - } - } - - /** - * 树表定位已有记录 - */ - selectTreeNode(binding: any) { - if (!binding) { - return; - } - const bindingId = binding.field || binding.id; - if (!bindingId) { - return; - } - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - try { - this.treeTable.selectNode(bindingId); - } catch (e) { - this.treeTable.clearSelections(); - // console.log('已绑定字段或变量不存在!'); - } - }); - }); - } - - /** - * 字段/变量是否可选中 - * @param rowNode 行数据 - */ - canChecked(rowNode) { - - switch (this.bindingType) { - case BINDING_TYPE_FORM: { - if (rowNode.data.$type === 'SimpleField') { - return true; - } else { - return false; - } - } - default: { - return rowNode.selectable; - } - } - - } - - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - - - - /** - * 确定 - */ - clickConfirm() { - this.clearOriginalExpression(); - - // 绑定:自定义 - if (this.bindingType === BINDING_TYPE_CUSTOM) { - this.getCustomBinding(); - this.submitModal.emit({ value: this.customBinding }); - return; - } - // 绑定:表达式 - if (this.bindingType === BINDING_TYPE_EXPRESSION) { - const expressionId = this.setExpression(); - this.submitModal.emit({ - value: { - type: BINDING_TYPE_EXPRESSION, - expressionId - } - }); - return; - } - // 绑定:字段、变量 - if (!this.treeTable.selectedRow) { - const msg = this.bindingType === BINDING_TYPE_FORM ? '字段' : '变量'; - this.notifyService.warning('请选择' + msg + '!'); - return; - } - const selectedRow = this.treeTable.selectedRow; - const selectedData = selectedRow.data; - const viewModelId = this.editorParams.viewModelId; - - let newValue; - switch (this.bindingType) { - case BINDING_TYPE_FORM: { - newValue = { - type: BINDING_TYPE_FORM, - path: selectedData.bindingField, - field: selectedData.id, - fullPath: selectedData.path - }; - break; - } - case BINDING_TYPE_LOCAL_VAR: { - newValue = { - type: FormBindingType.Variable, - path: selectedRow['viewModelId'] === viewModelId ? selectedData.code : 'root-component.' + selectedData.code, - field: selectedData.id, - fullPath: selectedData.code - }; - break; - } - case BINDING_TYPE_REMOTE_VAR: { - newValue = { - type: FormBindingType.Variable, - path: 'root-component.' + selectedData.code, - field: selectedData.id, - fullPath: selectedData.code - }; - break; - } - } - - this.submitModal.emit({ value: newValue }); - } - - /** - * 初始化表达式相关配置 - */ - private initExpression() { - if (!this.editorParams.showExpression) { - return; - } - this.expressionParams = { - fieldId: this.editorParams.bindingFieldId, - viewModelId: this.editorParams.viewModelId, - expType: this.editorParams.expressionType - }; - // 必填表达式需要配置提示消息 - if (this.editorParams.expressionType === 'require') { - this.expressionParams.message = ''; - } - if (!this.value || !this.value.expressionId || !this.editorParams.bindingFieldId) { - return; - } - const expField = this.domService.expressions.find(e => e.fieldId === this.editorParams.bindingFieldId); - if (!expField) { - return; - } - this.originalExpConfig = expField.expression.find(exp => exp.id === this.value.expressionId); - this.expressionValue = this.originalExpConfig.value; - - if (this.editorParams.expressionType === 'require') { - this.expressionParams.message = this.originalExpConfig.message; - } - } - - /** - * 保存表达式 - */ - private setExpression() { - // const newExpr = this.expressionEditorComponent.expEditor.getExpr() || ''; - // return this.expressionEditorComponent.saveExpression(newExpr); - - } - /** - * 清除原表达式 - */ - private clearOriginalExpression() { - if (this.value && this.value.type === BINDING_TYPE_EXPRESSION && this.bindingType !== BINDING_TYPE_EXPRESSION) { - const exp = this.domService.expressions.find(e => e.fieldId === this.editorParams.bindingFieldId); - if (!exp || !exp.expression) { - return; - } - - exp.expression = exp.expression.filter(e => e.type !== this.editorParams.expressionType); - } - } - /** - * booleanOrString类型的自定义绑定:初始化 - */ - private initCustomBoolOrString() { - if (this.bindingType !== BINDING_TYPE_CUSTOM) { - return; - } - if (this.editorParams.customType !== BindingCustomType.booleanOrString) { - return; - } - if (typeof (this.value) === 'boolean') { - this.customBoolAndStringRadioValue = this.value; - } else { - this.customBoolAndStringRadioValue = 'string'; - if (typeof (this.value) === 'string') { - this.customStringValue = this.value || ''; - } - } - } - - /** - * selectOrString类型的自定义绑定:初始化 - */ - private initCustomSelectOrString() { - if (this.bindingType !== BINDING_TYPE_CUSTOM) { - this.customBoolAndStringRadioValue = null; - return; - } - if (this.editorParams.customType !== BindingCustomType.selectOrString) { - return; - } - if (!this.editorParams.selectConfig.options || !this.editorParams.selectConfig.idField) { - return; - } - const valueOptions = this.editorParams.selectConfig.options.map(option => option[this.editorParams.selectConfig.idField]); - - if (this.value && valueOptions.includes(this.value)) { - this.customBoolAndStringRadioValue = this.value; - } else { - this.customBoolAndStringRadioValue = 'string'; - if (typeof (this.value) === 'string') { - this.customStringValue = this.value || ''; - } - } - } - - - - /** - * booleanOrString类的自定义绑定:获取自定义绑定值 - */ - getCustomBinding() { - if (this.editorParams.customType === BindingCustomType.booleanOrString || - this.editorParams.customType === BindingCustomType.selectOrString) { - if (this.customBoolAndStringRadioValue === 'string') { - this.customBinding = this.customStringValue; - } else { - this.customBinding = this.customBoolAndStringRadioValue; - } - } - } - - /** - * 根据变量id获取变量分类 - * @param variableId 变量id - */ - private getVaribleCategoryTypeById(variableId: string): string { - const viewModels = this.domService.viewmodels; - if (!viewModels || viewModels.length === 0) { - return; - } - - for (const viewModel of viewModels) { - const variable = viewModel.states.find(v => v.id === variableId); - if (variable) { - return variable.category; - } - } - - - } -} - - -class BindingCustomEditorParams { - /** 弹窗标题 */ - public modalTitle?: string; - /** 控件所在视图模型ID */ - public viewModelId: string; - - /** 允许绑定的类型---默认'Custom,LocaleVariable,RemoteVariable' */ - public allowedBindingType: string; - - /** 自定义数据的类型:目前支持string/boolean/select/booleanOrString/selectOrString */ - public customType: BindingCustomType; - - /** 自定义类型为下拉框时,下拉框需要的配置项 */ - public selectConfig: { - idField: '', - textField: '', - options: any[] - }; - - /** - * 是否支持表达式配置项 - */ - public showExpression?= false; - - /** 当前控件绑定的字段或变量的ID ,在支持表达式配置时,必填 */ - public bindingFieldId?: string; - - /** 表达式类型 */ - public expressionType?: string; - - /** 表达式提示消息 */ - public message?: string; - - - public maxDate: string; - - public minDate: string; -} - -/** - * 绑定类型 - */ -export enum BindingCustomType { - /** - * 字符串 - */ - string = 'string', - /** - * 布尔值(以下拉框展示) - */ - boolean = 'boolean', - /** - * 下拉选择 - */ - select = 'select', - /** - * 布尔值或者字符串(目前的场景是配置状态机) - */ - booleanOrString = 'booleanOrString', - - selectOrString = 'selectOrString', - - date = 'date', - - datetime = 'datetime' -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor-convert.ts deleted file mode 100644 index f32dcc22a172639d6a6f3bfbd91ff1f407e8309a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor-convert.ts +++ /dev/null @@ -1,25 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class BindingEditorConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - // 目前运行时定制需要展示字段名称 - if (data && data.fieldName) { - return this.getTypeName(data.type) + ':' + data.fieldName; - } - if (data) { - return data.type + ':' + data.path; - } - return ''; - } - - getTypeName(type: string) { - switch (type) { - case 'Form': { return '字段'; } - case 'Variable': { return '变量'; } - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.css deleted file mode 100644 index 689913e846352758bf22451d88b49a9d27d78823..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.css +++ /dev/null @@ -1,7 +0,0 @@ -.fieldPanel { - border-radius: 7px; -} - -.fieldPanel::ng-deep tr[ng-reflect-select-row-disabled=true] { - cursor: not-allowed; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.html deleted file mode 100644 index dbf277b69954d3a7481b6354ae1c0f2a9ad94eee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.html +++ /dev/null @@ -1,32 +0,0 @@ -
- - -
- - -
- - - - - - {{rowData[col.field]}} - - {{rowData.$type==='SimpleField'&& rowData.type ? (rowData.multiLanguage ? '多语言': rowData.type.displayName): ''}} - - - - - - -
- - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.ts deleted file mode 100644 index 9fb509307d7e66a66e0f60d5cd9c9bfa68b8a616..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/binding-editor/binding-editor.component.ts +++ /dev/null @@ -1,793 +0,0 @@ -import { Component, EventEmitter, HostBinding, Input, NgZone, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { DesignerHostSettingService, DesignViewModel, DesignViewModelService, DgControl, DomService, FormBinding, FormBindingType, FormSchemaEntityField$Type, FormVariableCategory, SchemaService, FormBasicService } from '@farris/designer-services'; -import { NotifyOptions, NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { merge } from 'lodash-es'; - -export class BindingEditorParam { - /** 所属视图模型id */ - viewModelId: string; - - /** 控件类型 */ - controlType?: string; - - /** 允许选择的绑定类型:'Form'| 'RemoteVariable'|'LocaleVariable' */ - allowedBindingType?: string; - - /** 是否可以变更字段类型 */ - canChangeFieldType?: boolean; - - /** 是否将不可选的字段置灰 */ - unusedOnly?: boolean; - - /** DataGrid列绑定的字段类型 */ - gridFielType?: string; -} - - -/** - * 用于控件绑定属性,可选字段或变量,选择后的字段和变量都会添加到viewModel.fields节点下 - */ -@Component({ - selector: 'app-binding-editor', - templateUrl: './binding-editor.component.html', - styleUrls: ['./binding-editor.component.css'] -}) -export class BindingEditorComponent implements OnInit { - /** - * 关闭按钮事件 - */ - @Output() closeModal = new EventEmitter(); - /** - * 确定按钮事件 - */ - @Output() submitModal = new EventEmitter(); - /** - * 绑定信息 - */ - @Input() value: FormBinding; // datagrid控件 fields字段 - /** - * 编辑器属性 - */ - @Input() editorParams = new BindingEditorParam(); - /** - * 绑定控件类型 - */ - @Input() bindingControlType: string; - /** - * 只选择未绑定的字段 - */ - @Input() unusedOnly = false; - /** - * 是否启用严格的匹配模式。例如严格模式下日期控件只能选择日期字段,非严格模式下,日期控件可以选择日期字段或字符串字段 - */ - @Input() useStrictMappingRule = false; - - /** - * 绑定编辑器页尾组件 - */ - @ViewChild('bindingFooter') modalFooter: TemplateRef; - /** - * 绑定编辑器默认弹出窗口显示属性 - */ - public modalConfig = { - title: '绑定编辑器', - width: 900, - height: 700, - showButtons: true, - buttons: this.modalFooter - }; - /** - * 标记是否支持绑定变量 - */ - canBindVar = true; - /** - * 标记是否支持绑定字段 - */ - canBindForm = true; - /** - * 标记是否支持绑定本地变量 - */ - canBindLocaleVar = true; - /** - * 标记是否支持绑定后端变量 - */ - canBindRemoteVar = true; - /** - * 字段绑定方式 - */ - bindingType = 'Form'; - - /** - * 支持的绑定方式数组 - */ - bindingTypeEnumData = []; - /** - * 当前绑定树数据源 - */ - public currentBindingTreeDataSource = []; - /** - * 当前绑定树显示列 - */ - public currentBindingTreeColumns = []; - /** - * 绑定树 - */ - @ViewChild('treeTable') treeTable: TreeTableComponent; - /** - * 绑定字段树表信息 - */ - fieldsTreeData: TreeNode[] = []; - /** - * 绑定字段树显示列 - */ - fieldsTreeCols = [{ field: 'name', title: '名称' }, { field: 'bindingField', title: '绑定字段' }, { field: 'fieldType', title: '字段类型' }]; - /** - * 本地变量树表信息 - */ - localVarTreeData: TreeNode[] = []; - /** - * 后端变量树信息 - */ - remoteVarTreeData: TreeNode[] = []; - /** - * 变量树显示列 - */ - variableTreeCols = [{ field: 'name', title: '名称' }, { field: 'code', title: '编号' }, { field: 'displayTypeName', title: '变量类型' }]; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - private displayedFieldSet: Set; - - /** 是否变更了字段的类型 */ - private fieldTypeChanged = false; - - private schemaDOMMapping; - - /** 映射<控件类型,可选的字段类型> */ - private controlFieldMapping: any; - - constructor( - private domService: DomService, - private dgVMService: DesignViewModelService, - private notifyService: NotifyService, - private designerHostSettingService: DesignerHostSettingService, - private schemaService: SchemaService, - private formBasicService: FormBasicService, - private ngZone: NgZone) { } - - ngOnInit() { - this.schemaDOMMapping = this.designerHostSettingService.designerHost.getService('SchemaDOMMapping'); - - const viewModelId = this.editorParams.viewModelId; - const viewModel = this.domService.getViewModelById(viewModelId); - - // 字段 - this.fieldsTreeData = this.dgVMService.getAllFields2TreeByVMId(viewModelId); - - // 根组件的组件变量 - if (viewModel.parent) { - const rootLocalVars = this.domService.getLocaleVariablesByViewModelId(viewModel.parent); - if (rootLocalVars && rootLocalVars.length) { - rootLocalVars[0].data.name = '根组件'; - this.localVarTreeData = this.localVarTreeData.concat(rootLocalVars); - } - } - // 当前组件的组件变量 - const localVars = this.domService.getLocaleVariablesByViewModelId(viewModelId); - this.localVarTreeData = this.localVarTreeData.concat(localVars); - - // 后端变量 - this.remoteVarTreeData = this.domService.getRemoteVariables(); - - this.unusedOnly = this.unusedOnly || this.editorParams.unusedOnly; - - this.processDataSelectable(); - - if (this.value) { - this.init(this.value); - } else { - this.currentBindingTreeColumns = this.fieldsTreeCols; - this.currentBindingTreeDataSource = this.fieldsTreeData; - } - - if (this.editorParams.allowedBindingType) { - const allowedBindingTypes = this.editorParams.allowedBindingType.split(','); - if (!allowedBindingTypes.includes('Form')) { - this.canBindForm = false; - } - if (!allowedBindingTypes.includes('RemoteVariable')) { - this.canBindRemoteVar = false; - } - if (!allowedBindingTypes.includes('LocaleVariable')) { - this.canBindLocaleVar = false; - } - - if (!allowedBindingTypes.includes(this.bindingType)) { - this.bindingType = allowedBindingTypes[0]; - this.changeBindingType(); - } - } - - this.assembleBindingTypeEnumData(); - - } - - - init(value: FormBinding) { - switch (value.type) { - case FormBindingType.Form: { - this.currentBindingTreeColumns = this.fieldsTreeCols; - this.currentBindingTreeDataSource = this.fieldsTreeData; - this.bindingType = 'Form'; - break; - } - case FormBindingType.Variable: { - const variableCategory = this.getVaribleCategoryTypeById(value.field); - - if (variableCategory === FormVariableCategory.remote) {// 绑定remote变量 - this.currentBindingTreeColumns = this.variableTreeCols; - this.currentBindingTreeDataSource = this.remoteVarTreeData; - this.bindingType = 'RemoteVariable'; - } else { // 绑定组件本地变量 - this.currentBindingTreeColumns = this.variableTreeCols; - this.currentBindingTreeDataSource = this.localVarTreeData; - this.bindingType = 'LocaleVariable'; - } - - } - } - - this.selectTreeNode(this.value.field); - } - - /** - * 组装当前支持的绑定方式数组,用于radiogroup - */ - private assembleBindingTypeEnumData() { - if (this.canBindForm) { - this.bindingTypeEnumData.push({ value: 'Form', text: '绑定字段' }); - } - if (this.canBindLocaleVar) { - this.bindingTypeEnumData.push({ value: 'LocaleVariable', text: '绑定组件变量' }); - } - if (this.canBindRemoteVar) { - this.bindingTypeEnumData.push({ value: 'RemoteVariable', text: '绑定表单变量' }); - } - } - - /** - * 界面切换绑定类型响应方法 - * @param type 绑定类型 - */ - public changeBindingType() { - switch (this.bindingType) { - // 绑定字段 - case FormBindingType.Form: { - // 更新绑定树数据源和显示列 - this.currentBindingTreeColumns = this.fieldsTreeCols; - this.currentBindingTreeDataSource = this.fieldsTreeData; - break; - } - // 绑定本地变量 - case 'LocaleVariable': { - // 更新绑定树数据源和显示列 - this.currentBindingTreeColumns = this.variableTreeCols; - this.currentBindingTreeDataSource = this.localVarTreeData; - break; - } - // 绑定后端变量 - case 'RemoteVariable': { - // 更新绑定树数据源和显示列 - this.currentBindingTreeColumns = this.variableTreeCols; - this.currentBindingTreeDataSource = this.remoteVarTreeData; - } - } - // 重置绑定树选择项 - this.treeTable.clearSelections(); - } - /** - * 定位已有记录 - * @param type 绑定树节点标识 - */ - public selectTreeNode(bindingNodeId: string) { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - try { - this.treeTable.selectNode(bindingNodeId); - } catch (e) { - this.treeTable.clearSelections(); - // console.log('已绑定字段或变量不存在!'); - } - }); - }); - } - /** - * 判断是否可选择当前待绑定字段或变量节点 - * @param bindingFieldTreeData 绑定树节点信息 - */ - public canChecked(bindingFieldTreeData: TreeNode) { - switch (this.bindingType) { - case 'Form': { - if (bindingFieldTreeData.data.$type === 'SimpleField') { - return true; - } else { - return false; - } - } - default: { - return bindingFieldTreeData.selectable; - } - } - } - /** - * 取消按钮响应事件 - */ - public clickCancel() { - this.closeModal.emit(); - } - /** - * 确定按钮响应事件 - */ - public clickConfirm() { - // 校验绑定树选择信息 - if (!this.verifySelection()) { - return; - } - // 记录原始绑定节点 - const originalBindingField = this.value ? this.value.field : null; - // 读取绑定树当前选择项 - const selectedRow = this.treeTable.selectedRow; - - // 更新绑定结果。 - this.updateSelectionResult(selectedRow); - - // 更换绑定后,需要清除原绑定字段的表达式信息 - let expressionCleared = false; - if (originalBindingField && originalBindingField !== this.value.field) { - expressionCleared = this.clearExpresssionConfig(originalBindingField); - } - - this.submitModal.emit({ - value: this.value, - parameters: { - selectedData: selectedRow.data, - fieldTypeChanged: this.fieldTypeChanged, - expressionCleared - } - }); - } - - /** - * 校验绑定树选择信息 - */ - private verifySelection(): boolean { - let result = true; - // 校验绑定树选择信息 - if (!this.treeTable.selectedRow) { - if (this.bindingType === FormBindingType.Form) { - this.notifyService.warning({ msg: '请选择字段!', timeout: 3000 } as NotifyOptions); - } else { - this.notifyService.warning({ msg: '请选择变量!', timeout: 3000 } as NotifyOptions); - } - return false; - } - // tslint:disable-next-line: no-string-literal - const viewModelId = this.editorParams['viewModelId']; - // 读取绑定树当前选择项 - const selectedData = this.treeTable.selectedRow.data; - if (this.value && this.value.field && this.value.field === selectedData.id) { - return true; - } - - // 校验当前选择字段是否已经被绑定,不允许多个控件重复绑定统一字段 - if (this.domService.checkViewModelDulplicated(viewModelId, selectedData.id)) { - this.notifyService.warning('【' + selectedData.name + '】已绑定控件,请重新选择!'); - return false; - } - this.fieldTypeChanged = false; - - - result = this.checkFieldTypeChanged(); - - return result; - } - /** - * 检查字段/变量类型是否有变更 - */ - private checkFieldTypeChanged(): boolean { - if (!this.value) { - return true; - } - let result = true; - this.fieldTypeChanged = false; - - - - // 旧绑定字段类型 - let oldFieldType; - - // 旧绑定类型为复杂字段,适用于简单字段变为关联字段或udt的场景 - let isOldBindComplexField = false; - - if (this.value.type === FormBindingType.Form) { - const schemaField = this.schemaService.getFieldByID(this.value.field); - if (schemaField) { - const oldField = this.getFieldType(schemaField, FormBindingType.Form); - oldFieldType = oldField.fieldType; - if (schemaField.$type === FormSchemaEntityField$Type.ComplexField) { - isOldBindComplexField = true; - } - } - - } else { - const varField = this.domService.getVariableById(this.value.field); - if (varField) { - oldFieldType = varField.type; - } - } - - // 新绑定类型 - const selectedData = this.treeTable.selectedRow.data; - const { fieldType: newFieldType, fieldTypeName: newFieldTypeName } = this.getFieldType(selectedData, this.bindingType); - - // 检查当前控件类型是否支持新字段类型 - const allowedBindingFieldTypes = this.getFieldTypesByEditorType(this.editorParams.controlType); - if (!allowedBindingFieldTypes || !allowedBindingFieldTypes.includes(newFieldType)) { - this.notifyService.warning('不可以切换成' + newFieldTypeName + '类型字段,请重新选择!'); - result = false; - return result; - - } - if (isOldBindComplexField) { - this.fieldTypeChanged = true; - } else { - if (oldFieldType && oldFieldType !== newFieldType) { - if (!this.editorParams.canChangeFieldType) { - this.notifyService.warning('不可以切换成' + newFieldTypeName + '类型字段,请重新选择!'); - result = false; - } else { - this.fieldTypeChanged = true; - } - } - - } - - - return result; - } - - private getFieldType(selectedData: any, bindingType: string) { - if (selectedData.multiLanguage) { - return { fieldType: 'multiLanguage', fieldTypeName: '多语言' }; - } - - const fieldType = bindingType === FormBindingType.Form ? selectedData.type.name : selectedData.type; - const fieldTypeName = bindingType === FormBindingType.Form ? selectedData.type.displayName : selectedData.displayTypeName; - return { fieldType, fieldTypeName }; - } - - /** - * 更新当前选择结果 - */ - private updateSelectionResult(selectedRow: TreeNode) { - const selectedData = selectedRow.data; - const viewModelId = this.editorParams.viewModelId; - - // 如果未修改绑定,返回。 - if (this.value && selectedData.id === this.value.field) { - return; - } - // 获取视图模型信息 - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - // 更新最新绑定信息 - let latestBinding: FormBinding; - switch (this.bindingType) { - case 'Form': { - latestBinding = { - type: FormBindingType.Form, - path: selectedData.bindingField, - field: selectedData.id, - fullPath: selectedData.path - }; - // 附件相关组件单独添加bindingPath属性 - if (DgControl.FilePreview && DgControl.FileUploadPreview && [DgControl.FilePreview.type, DgControl.FileUploadPreview.type].includes(this.editorParams.controlType)) { - latestBinding.bindingPath = selectedData.bindingPath; - } - break; - } - case 'LocaleVariable': { - latestBinding = { - type: FormBindingType.Variable, - path: selectedRow['viewModelId'] === viewModelId ? selectedData.code : 'root-component.' + selectedData.code, - field: selectedData.id, - fullPath: selectedData.code - }; - break; - } - case 'RemoteVariable': { - latestBinding = { - type: FormBindingType.Variable, - path: 'root-component.' + selectedData.code, - field: selectedData.id, - fullPath: selectedData.code - }; - break; - } - } - // 更新视图模型显示字段 - this.modifyViewModel(dgViewModel, this.bindingType, selectedData); - // 更新绑定信息 - this.value = latestBinding; - } - /** - * 更新视图模型显示字段 - * @param dgViewModel 当前绑定视图模型 - * @param bindingType 绑定类型 - * @param selectedData 当前选中绑定字段 - */ - private modifyViewModel(dgViewModel: DesignViewModel, bindingType: string, selectedData: any) { - if (!dgViewModel) { - return; - } - // 绑定字段 - if (bindingType === 'Form') { - // 构造当前显示字段信息 - const currentSelectedField = merge({}, selectedData, { groupId: null, groupName: null }); - if (this.value && this.value.field) { - - // 查找原始字段 - const originalBindingField = dgViewModel.fields.find(f => f.id === this.value.field); - dgViewModel.removeField([this.value.field]); - if (originalBindingField) { - // 保留原有分组信息、保留编辑器信息(待优化)、删除原DgViewModel字段 - const { groupId, groupName, editor } = originalBindingField; - merge(currentSelectedField, { editor, groupId, groupName }); - } - } - // 向视图模型中添加新字段 - dgViewModel.addField(currentSelectedField); - // 同步编辑器信息(目前只同步了编辑器信息,其他信息如必填只读等属性待优化后同步) - dgViewModel.changeField(currentSelectedField.id, { editor: currentSelectedField.editor }); - } else { - // 绑定变量 - const currentSelectedVar = { - type: FormBindingType.Variable, - id: selectedData.id, - fieldName: selectedData.code, - groupId: '', - groupName: '' - }; - if (this.value && this.value.field) { - const originalBindingField = this.domService.getViewModelFieldById(this.editorParams.viewModelId, this.value.field); - if (originalBindingField) { - currentSelectedVar.groupName = originalBindingField.groupName; - currentSelectedVar.groupId = originalBindingField.groupId; - } - - // 删除原始绑定信息 - dgViewModel.removeField([this.value.field]); - } - // 向视图模型中添加新绑定 - this.domService.addViewModelField(this.editorParams.viewModelId, currentSelectedVar); - } - } - - private processDataSelectable() { - if (!this.displayedFieldSet) { - this.collectDisplayedFieldSet(); - } - this.processDataSelectableByBindingType(this.fieldsTreeData, 'Form'); - this.processDataSelectableByBindingType(this.localVarTreeData, 'LocaleVariable'); - this.processDataSelectableByBindingType(this.remoteVarTreeData, 'RemoteVariable'); - } - - private processDataSelectableByBindingType(data: any[], bindingType: string) { - if (!data || !data.length) { - return; - } - data.forEach(item => { - // 先判断类型是否匹配 - if (this.bindingControlType && item.selectable) { - this.checkIsTypeMapping(item, bindingType); - } - if (this.unusedOnly && item.selectable) { - if (this.displayedFieldSet.has(item.data.id)) { - item.selectable = false; - } - } - if (item.children) { - this.processDataSelectableByBindingType(item.children, bindingType); - } - }); - } - - private checkIsTypeMapping(item: TreeNode, bindingType: string) { - // 严格模式下,根据schema字段的editor类型判断 - if (this.useStrictMappingRule) { - if (this.bindingControlType !== item.data.editor.$type) { - item.selectable = false; - } - } else { - // 非严格模式下,根据schema字段的type类型判断 - const matchingTypes = this.getFieldTypesByEditorType(this.bindingControlType); - if (!matchingTypes || !matchingTypes.includes(this.getTypeFromBindingNode(item, bindingType))) { - item.selectable = false; - } - } - } - - private getTypeFromBindingNode(node: any, bindingType: string): string { - if (node.data.multiLanguage) { - return 'multiLanguage'; - } - switch (bindingType) { - case 'Form': - return node.data && node.data.type && node.data.type.name; - case 'LocaleVariable': - case 'RemoteVariable': - return node.data && node.data.type; - } - } - - /** - * 获取实体中已在当前表单中被占用的字段 - */ - private collectDisplayedFieldSet() { - const currentBindingId = this.value ? this.value.field : null; - this.displayedFieldSet = new Set(); - const componentNode = this.domService.getComponentByVMId(this.editorParams.viewModelId); - - /** 当前组件是否在侧边栏中 */ - const targetComponentInSidebar = this.checkComponentIfInSidebar(componentNode.id); - - /** 当前组件的类型 */ - let targetComponentType = componentNode.componentType; - const targetViewModel = this.domService.getViewModelById(componentNode.viewModel); - - // 根组件和table组件内的输入控件与form内不能重复 - if (targetComponentType === 'Frame' || targetComponentType === 'table' || (targetComponentType && targetComponentType.startsWith('form'))) { - targetComponentType = 'form'; - } - this.domService.viewmodels.forEach(viewModel => { - if (this.formBasicService.envType === 'mobileDesigner' && (viewModel.id !== this.editorParams.viewModelId)) { - return; - } - if (!viewModel.fields || viewModel.fields.length === 0) { - return; - } - const cmpNode = this.domService.getComponentByVMId(viewModel.id); - let componentType = cmpNode.componentType; - if (componentType === 'Frame' || componentType === 'table' || (componentType && componentType.startsWith('form'))) { - componentType = 'form'; - } - // 同类型的组件并且绑定同一个实体(form类、dataGrid类...) - if (componentType !== targetComponentType || viewModel.bindTo !== targetViewModel.bindTo) { - return; - } - - /** 组件是否在侧边栏中 */ - const componentInSidebar = this.checkComponentIfInSidebar(cmpNode.id); - - // 若当前组件在侧边栏中,那么只收集同样在侧边栏中的字段。 - if (targetComponentInSidebar && componentInSidebar) { - viewModel.fields.forEach(field => { - if (field.id !== currentBindingId) { - this.displayedFieldSet.add(field.id); - } - }); - } - - // 若当前组件不在侧边栏中,那么只收集不在侧边栏中的字段 - if (!targetComponentInSidebar && !componentInSidebar) { - viewModel.fields.forEach(field => { - if (field.id !== currentBindingId) { - this.displayedFieldSet.add(field.id); - } - }); - - } - - - }); - - } - - - /** - * 检查卡片组件是否在侧边栏中,在侧边栏中的字段可以与非侧边栏中的字段重复。 - */ - private checkComponentIfInSidebar(cmpNodeId: string) { - - const sidebar = this.domService.selectNode(this.domService.components[0], - item => item.type === DgControl.Sidebar && DgControl.Sidebar.type && item.contents && item.contents.length && - item.contents.find(child => child.type === DgControl.ComponentRef.type && child.component === cmpNodeId)); - if (sidebar) { - return true; - } - return false; - } - /** - * 根据变量id获取变量分类 - * @param variableId 变量id - */ - private getVaribleCategoryTypeById(variableId: string): string { - const viewModels = this.domService.viewmodels; - if (!viewModels || viewModels.length === 0) { - return; - } - - for (const viewModel of viewModels) { - const variable = viewModel.states.find(v => v.id === variableId); - if (variable) { - return variable.category; - } - } - - - } - /*** - * 获取当前控件类型下可选的字段类型 - */ - private getFieldTypesByEditorType(editorType: string): string[] { - if (!this.controlFieldMapping) { - this.reverseFieldControlMapping(); - } - // if (editorType === (DgControl.GridField && DgControl.GridField.type) || editorType === (DgControl.TreeGridField && DgControl.TreeGridField.type) && this.editorParams.gridFieldEditorType) { - // return this.controlFieldMapping[this.editorParams.gridFieldEditorType]; - - // } else { - // return this.controlFieldMapping[editorType]; - // } - - if (editorType === (DgControl.GridField && DgControl.GridField.type) || editorType === (DgControl.TreeGridField && DgControl.TreeGridField.type)) { - if (this.editorParams.gridFielType) { - return [this.editorParams.gridFielType]; - } - } else { - return this.controlFieldMapping[editorType]; - } - } - - /** - * 将<字段类型,控件类型列表>的映射反转为<控件类型,可选的字段类型列表> - */ - private reverseFieldControlMapping() { - if (this.controlFieldMapping) { - return; - } - this.controlFieldMapping = {}; - const fieldControlTypeMapping = this.schemaDOMMapping.fieldControlTypeMapping; - - for (const fieldType in fieldControlTypeMapping) { - if (fieldControlTypeMapping.hasOwnProperty(fieldType)) { - const controlTypes = fieldControlTypeMapping[fieldType]; - if (!controlTypes || !controlTypes.length) { - continue; - } - controlTypes.forEach(item => { - this.controlFieldMapping[item.key] = this.controlFieldMapping[item.key] || []; - this.controlFieldMapping[item.key].push(fieldType); - }); - } - } - - // 追加多语控件 - this.controlFieldMapping.LanguageTextBox = ['multiLanguage']; - } - - private clearExpresssionConfig(originalBindingField: string): boolean { - - if (this.domService.expressions && this.domService.expressions.length) { - const expFieldIndex = this.domService.expressions.findIndex(e => e.fieldId === originalBindingField); - if (expFieldIndex > -1) { - this.domService.expressions.splice(expFieldIndex, 1); - - this.notifyService.warning('切换绑定后,请重新配置表达式'); - return true; - } - - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.css deleted file mode 100644 index 738e097941650314e1233b632e1f97b2c5ec0c7c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.css +++ /dev/null @@ -1,17 +0,0 @@ -.open-doc-href { - text-align: right; - padding: 5px 10px; -} - -.editor { - position: relative; - flex: 1; -} - -.editor .custom-monaco-editor { - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.html deleted file mode 100644 index e738a9844dba423a7a162879191a1357d058d72e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
示例代码
-
-{{ editorParams.exampleCode}}
-    
-
- - - -
- - -
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.ts deleted file mode 100644 index aa7627017c527bbef6a95a8064fca23370a4bb38..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/code-editor/code-editor.component.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Component, Input, Output, EventEmitter, ViewChild, TemplateRef, OnInit, HostBinding } from '@angular/core'; - -@Component({ - selector: 'code-template-editor', - templateUrl: './code-editor.component.html', - styleUrls: ['./code-editor.component.css'] -}) -export class CodeEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value: string; - @Input() editorParams = { modalTitle: '', exampleCode: '', language: '', valueType: 'string', hideDocLink: false }; - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - get modalConfig() { - return { - title: this.getModalTitle(), - width: 900, - height: 500, - showButtons: true - }; - } - - codeEditorOptions = { - theme: 'vs-dark', - language: 'javascript', - formatOnType: true, - foldingStrategy: 'indentation', // 显示缩进 - folding: true, // 启用代码折叠功能 - showFoldingControls: 'always', // 默认显示装订线 - automaticLayout: true // 监测父容器变化 - }; - - monacoEditor; - - editingHtml: string; - - @HostBinding('class') - cls = 'h-100 w-100 f-utils-overflow-hidden d-flex'; - - onMonacoInit($event) { - this.monacoEditor = $event.editor; - } - - ngOnInit() { - this.codeEditorOptions.language = this.editorParams.language; - - switch (this.editorParams.valueType) { - case 'json': { - this.editingHtml = this.value && JSON.stringify(this.value); - break; - } - default: { - this.editingHtml = this.value; - } - } - - if (this.editorParams.language === 'html') { - this.cls = this.cls + ' flex-column'; - } - - - } - getModalTitle() { - switch (this.editorParams.language) { - case 'json': { - return this.editorParams.modalTitle || 'JSON编辑器'; - - } - case 'javascript': { - return this.editorParams.modalTitle || 'JavaScript编辑器'; - } - case 'html': { - return this.editorParams.modalTitle || 'HTML编辑器'; - - } - default: { - return '代码编辑器'; - } - } - } - - /** - * 确定 - */ - clickConfirm() { - if (!this.editingHtml) { - this.submitModal.emit({ - value: null, - parameters: { - oldValue: this.value - } - }); - return; - } - - let result = null; - switch (this.editorParams.valueType) { - case 'json': { - result = JSON.parse(this.editingHtml); - break; - } - default: { - result = this.editingHtml; - } - } - this.submitModal.emit({ - value: result, - parameters: { - oldValue: this.value - } - }); - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-convert.ts deleted file mode 100644 index 3d6d869a47e189f740f3b70ba679002a3a89a570..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-convert.ts +++ /dev/null @@ -1,14 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class CollectionWithPropertyConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data && data.length > 0) { - return '共 ' + data.length + ' 项'; - } - return '共 0 项'; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.html deleted file mode 100644 index 20921e3f36f7c7e1605cf66ee962d90badc8a38b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
- - - - - -
-
-
- - -
- -
- -
-
-
- - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.spec.ts deleted file mode 100644 index 296e193cb38969a044c570f4c1e59c75fcf7fe49..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CollectionWithPropertyEditorComponent } from './collection-with-property-editor.component'; - -describe('CollectionWithPropertyEditorComponent', () => { - let component: CollectionWithPropertyEditorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ CollectionWithPropertyEditorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CollectionWithPropertyEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.ts deleted file mode 100644 index e43aa984494c44a4935cb809a053cb26b2cacee5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/collection-with-property-editor/collection-with-property-editor.component.ts +++ /dev/null @@ -1,469 +0,0 @@ -import { Component, OnInit, EventEmitter, Input, Output, ViewChild, TemplateRef, ChangeDetectorRef } from '@angular/core'; -// import { PropertyChangeObject } from '@farris/ide-property-panel'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeTableComponent } from '@farris/ui-treetable'; -import { cloneDeep } from 'lodash-es'; -import { DesignerHostSettingService, DomService } from '@farris/designer-services'; -import { debounceTime } from 'rxjs/operators'; -import { PropertyChangeObject } from '../../entity/property-entity'; - -/** - * 提供一个左树右属性面板的编辑器 - */ -@Component({ - selector: 'collection-with-property-editor', - templateUrl: './collection-with-property-editor.component.html', - styleUrls: ['./collection-with-property-editor.component.css'] -}) -export class CollectionWithPropertyEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @Input() value; - @Input() editorParams: CollectionWithPropertyEditorParam; - - @ViewChild('footer') modalFooter: TemplateRef; - @ViewChild('tt') treeTable: TreeTableComponent; - - get modalConfig() { - return { - title: this.editorParams.modalTitle || '编辑器', - width: 700, - height: 700, - showButtons: true - }; - } - - /** 属性面板配置项 */ - propertyConfig; - /** 属性值 */ - propertyData; - /** 是否显示属性面板 */ - showPropertyPanel = false; - - - treeData = []; - treeCols = []; - /** 当前选中行 */ - selectedNode; - /** 选中行在树中的层级 */ - selectedNodeLayer = 0; - - /** 禁用子级节点 */ - disableChildItem = false; - - /** 记录编辑器刚打开时的DOM actions数据。编辑器内部交互面板在操作过程中可能会修改actions节点,导致点击【取消】按钮时无法还原actions数据。所以这里记录一份原始数据,方便还原。 */ - private previousActions: any[]; - - /** 记录编辑器刚打开时的DOM viewmodels数据。编辑器内部交互面板在操作过程中可能会修改viewmodels节点,导致点击【取消】按钮时无法还原viewmodels数据。所以这里记录一份原始数据,方便还原。 */ - private previousViewModels: any[]; - - /** 触发编辑器的保存操作 */ - private triggerModalSave: any; - - constructor( - private designerHostSettingService: DesignerHostSettingService, - private domService: DomService, - private notifyService: NotifyService, - private msgService: MessagerService, - private cd: ChangeDetectorRef) { } - - ngOnInit() { - - this.modalConfig.title = this.editorParams.modalTitle || '列表项集合编辑器'; - this.treeCols = [{ field: this.editorParams.textKey, title: '名称' }]; - - - - this.previousActions = cloneDeep(this.domService.module.actions); - this.previousViewModels = cloneDeep(this.domService.module.viewmodels); - - this.triggerModalSave = () => this.clickConfirm(); - - if (this.editorParams.maxCascadeLevel === 1) { - this.disableChildItem = true; - } - if (!this.value || this.value.length === 0) { - this.treeData = []; - return; - } - - - const value = cloneDeep(this.value); - this.treeData = this.assembleData(value); - - // 默认选中第一行 - const sub = this.treeTable.loadedData.asObservable().pipe( - debounceTime(200) - ).subscribe(() => { - if (this.treeData.length) { - const firstDataId = this.treeData[0].data.id; - this.treeTable.selectNode(firstDataId); - - // 只订阅一次 - sub.unsubscribe(); - } - - }); - } - - private assembleData(data) { - const treeData = []; - data.forEach(item => { - const itemData = { - data: item, - children: [], - expanded: true - }; - if (this.editorParams.childrenKey && item[this.editorParams.childrenKey]) { - itemData.children = this.assembleData(item[this.editorParams.childrenKey]); - } - treeData.push(itemData); - }); - - return treeData; - } - - - onNodeSelected(e) { - this.selectedNode = e.node; - this.selectedNodeLayer = e.parents && e.parents.length || 0; - this.triggerPropertyPanel(); - } - - private triggerPropertyPanel() { - this.propertyConfig = []; - if (this.editorParams.getPropertyConfig) { - this.propertyData = this.selectedNode.data; - this.propertyConfig = this.editorParams.getPropertyConfig(this.selectedNode, this.triggerModalSave); - - this.showPropertyPanel = true; - } else { - this.showPropertyPanel = false; - } - } - - /** - * 新增同级 - */ - addSiblingItem() { - const newNode = this.createNewNode(); - - if (this.selectedNode && this.selectedNode.parent) { - this.selectedNode.parent.children.push(newNode); - } else { - // 没有选中元素,则在根节点添加 - this.treeData.push(newNode); - } - - this.reloadTreeData(newNode.data.id, this.selectedNodeLayer); - } - /** - * 新增子级 - */ - addChildItem() { - if (!this.selectedNode) { - this.notifyService.warning('请先选择节点'); - return; - } - - if (this.selectedNodeLayer + 1 >= this.editorParams.maxCascadeLevel) { - this.notifyService.warning('最多允许' + this.editorParams.maxCascadeLevel + '级节点'); - return; - } - - const newNode = this.createNewNode(); - if (!this.selectedNode.children) { - this.selectedNode.children = []; - } - this.selectedNode.children.push(newNode); - - this.reloadTreeData(newNode.data.id, this.selectedNodeLayer + 1); - } - - private createNewNode() { - const controlService = this.designerHostSettingService.controlService; - - const metadata = controlService.getControlMetaData(this.editorParams.controlType); - - if (this.editorParams.defaultControlValue) { - Object.assign(metadata, cloneDeep(this.editorParams.defaultControlValue)); - } - const radomNum = Math.random().toString().slice(2, 6); - - metadata[this.editorParams.idKey] = metadata[this.editorParams.idKey] + '_' + radomNum; - metadata[this.editorParams.textKey] = metadata[this.editorParams.textKey] + '_' + radomNum; - - return { - data: metadata, - children: [], - expanded: true - }; - } - /** - * 下移 - */ - moveDownItem() { - if (!this.selectedNode) { - this.notifyService.warning('请先选择要移动的节点'); - return; - } - - const parentNode = this.selectedNode.parent; - const siblingsData = parentNode ? parentNode.children : this.treeData; - const index = siblingsData.findIndex(node => node.data.id === this.selectedNode.data.id); - - // 上级节点的最后一个====> 不动 - if (index === siblingsData.length - 1) { - return; - } - siblingsData.splice(index, 1); - siblingsData.splice(index + 1, 0, this.selectedNode); - - - this.reloadTreeData(); - - } - /** - * 上移 - */ - moveUpItem() { - if (!this.selectedNode) { - this.notifyService.warning('请先选择要移动的节点'); - return; - } - - const parentNode = this.selectedNode.parent; - const siblingsData = parentNode ? parentNode.children : this.treeData; - const index = siblingsData.findIndex(node => node.data.id === this.selectedNode.data.id); - - // 第一个节点====> 不动 - if (index === 0) { - return; - } - siblingsData.splice(index, 1); - siblingsData.splice(index - 1, 0, this.selectedNode); - - - this.reloadTreeData(); - } - - /** - * 删除 - */ - removeItem() { - if (!this.selectedNode) { - this.notifyService.warning('请先选择要删除的节点'); - return; - } - - if (this.selectedNode.children && this.selectedNode.children.length > 0) { - this.msgService.question('【' + this.selectedNode.data[this.editorParams.textKey] + '】包含下级节点,确认级联删除?', () => { - this.confirmDeleteItem(); - }, () => { - return; - }); - } else { - this.confirmDeleteItem(); - } - - } - - private confirmDeleteItem() { - - const parentNode = this.selectedNode.parent; - const siblingsData = parentNode ? parentNode.children : this.treeData; - const index = siblingsData.findIndex(node => node.data.id === this.selectedNode.data.id); - - siblingsData.splice(index, 1); - - this.selectedNode = null; - this.reloadTreeData(); - - this.showPropertyPanel = false; - } - - private reloadTreeData(newTargetId?: string, targetLevel?: number) { - this.treeTable.loadData(this.treeData); - - // 重新选中行 - let targetNode; - if (newTargetId) { - this.treeTable.selectNode(newTargetId); - this.selectedNodeLayer = targetLevel; - } else if (this.selectedNode) { - targetNode = this.treeTable.findRowNode(this.selectedNode.data.id); - if (targetNode) { - targetNode.isSelected = true; - } - } - - - } - propertyChanged(changeObject: PropertyChangeObject) { - const textKey = this.editorParams.textKey; - if (changeObject.propertyID === textKey) { - - this.treeTable.update( - this.selectedNode.id, - { [textKey]: changeObject.propertyValue }); - - this.updateControlMap(); - } - - // 保存新增的变量 - this.addNewVariableToViewModel(changeObject, this.editorParams.viewModelId); - - } - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - private addNewVariableToViewModel(changeObject: PropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && - newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id === newVar.id)) { - viewModel.states.push(newVar); - } - } - } - - onPropertyModalChanged(e) { - - this.addControlMapForEventPath(e); - } - - private addControlMapForEventPath(e) { - const changeObject: PropertyChangeObject = e.changeObject; - const param = e.parameters; - - // 交互面板有变更时,触发更新事件路径 - if (changeObject.categoryId !== 'eventsEditor' || !param || !param.events || !param.events.length) { - return; - } - // 若没有父级控件id,则不设置事件路径 - if (!this.editorParams.parentNodeId) { - return; - } - - this.updateControlMap(); - - - // const parentPath = this.domService.controlBasicInfoMap.get(this.editorParams.parentNodeId); - // if (parentPath) { - // const nodeText = this.selectedNode.data[this.editorParams.textKey]; - // this.domService.controlBasicInfoMap.set(this.selectedNode.data.id, { - // showName: nodeText, - // parentPathName: `${parentPath.parentPathName} > ${nodeText}` - // }); - // } - - } - - private updateControlMap() { - if (!this.editorParams.parentNodeId) { - return; - } - const parentPath = this.domService.controlBasicInfoMap.get(this.editorParams.parentNodeId); - if (parentPath) { - const nodeText = this.selectedNode.data[this.editorParams.textKey]; - this.domService.controlBasicInfoMap.set(this.selectedNode.data.id, { - showName: nodeText, - parentPathName: `${parentPath.parentPathName} > ${nodeText}` - }); - } - } - /** - * 取消 - */ - clickCancel() { - - this.domService.module.actions = this.previousActions; - this.domService.module.viewmodels = this.previousViewModels; - - this.closeModal.emit(); - } - - - /** - * 确定 - */ - clickConfirm() { - // 使用模式切换为弹出帮助的按钮,需要创建隐藏区域 - // if (this.toolbarItemProp.needOpenHelpMap.size > 0) { - // this.toolbarItemProp.needOpenHelpMap.forEach(itemPropertyData => { - // this.toolbarItemProp.handleOpenHelpMode(itemPropertyData, this.editorParams.parentNodeId, this.editorParams.viewModelId); - // }); - - // } - - if (this.editorParams.beforeSave) { - this.editorParams.beforeSave(); - } - const newValue = this.getValueArray(this.treeData); - this.submitModal.emit({ value: newValue }); - } - - private getValueArray(treeNode: any[]) { - const originalDataArray = []; - treeNode.forEach(treeData => { - const originalData = treeData.data; - - if (treeData.children && this.editorParams.childrenKey) { - const childrenData = this.getValueArray(treeData.children); - originalData[this.editorParams.childrenKey] = childrenData; - } - - originalDataArray.push(originalData); - }); - - return originalDataArray; - } -} - - -class CollectionWithPropertyEditorParam { - - modalTitle: string; - viewModelId: string; - - /** 节点对应的控件类型 */ - controlType: string; - /** 新增节点的默认值 */ - defaultControlValue?: any; - - parentNodeId?: string; - - idKey: string; - textKey: string; - - // 多级节点的场景下,必需。 - childrenKey?: string; - - /** 节点级数,不传则认为不限制 */ - maxCascadeLevel?: number; - - /** 获取单行数据对应的属性面板配置 */ - getPropertyConfig: (selectedNode: any, triggerModalSave?: any) => {}; - - /** 保存前方法 */ - beforeSave: () => {}; - - /** 隐藏工具栏,用于只配置属性,不新增或删除 */ - disableToolbar?: boolean; - - /** 触发模板编辑器的保存方法 */ - triggerModalSave?: any; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.html deleted file mode 100644 index 827904153ed5b4f784c94a7153804cef557f6a60..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.html +++ /dev/null @@ -1,56 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.ts deleted file mode 100644 index 2c208f0ab1564c0ec181d427ebadc230238234b3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/expression-editor/expression-editor.component.ts +++ /dev/null @@ -1,209 +0,0 @@ -import { Component, EventEmitter, HostBinding, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { FormExpressionConfig, DomService, FormBasicService } from '@farris/designer-services'; -// import { ExpressioneditorComponent, Schema as ExpSchema } from '@gsp-svc/expression'; -// import { FilterExprService } from './filter-expr.service'; - -/** - * 表达式编辑器 - */ -@Component({ - selector: 'app-expression-editor', - templateUrl: './expression-editor.component.html', - // providers: [FilterExprService] -}) -export class ExpressionEditorComponent implements OnInit { - /** - * 关闭按钮事件 - */ - @Output() closeModal = new EventEmitter(); - /** - * 确定按钮事件 - */ - @Output() submitModal = new EventEmitter(); - /** - * 表达式值 - */ - @Input() value: string; - - /** - * 参数 - */ - @Input() editorParams: ExpressionEditorParam; - - /** 是否显示提示消息配置 */ - showMessageConfig = false; - /** 是否显示提示消息类型配置 */ - showMessageTypeConfig = false; - /** 提示消息枚举值 */ - messageTypes = [{ value: 'info', text: '提示' }, { value: 'warning', text: '警告' }, { value: 'error', text: '错误' }]; - - /** - * VO变量 - */ - contextEntities = []; - /** - * 系统变量 - */ - sessionEntities = []; - - /** - * 表达式组件实体结构 - */ - // expSchema: ExpSchema; - - /** - * 主实体编号 - */ - mainEntityCode = ''; - - /** - * 编辑器页尾组件 - */ - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - /** - * 编辑器默认弹出窗口显示属性 - */ - get modalConfig() { - return { - title: this.editorParams.modalTitle || '表达式编辑器', - width: 1060, - height: 600, - showButtons: true, - buttons: this.modalFooter - }; - - } - - // @ViewChild(ExpressioneditorComponent) expEditor: ExpressioneditorComponent; - - @HostBinding('class') - cls = 'w-100'; - - constructor( - private domServ: DomService, - private notifyService: NotifyService, - // private filterExprServ: FilterExprService, - private formBasicService: FormBasicService) { - } - - ngOnInit(): void { - // this.contextEntities = this.filterExprServ.assembleContextEntities(); - // this.sessionEntities = this.filterExprServ.assembleSessionEntities(); - // this.expSchema = this.editorParams.hideFieldSchema ? [] : this.filterExprServ.assembleFieldSchema(); - - // this.mainEntityCode = this.filterExprServ.mainEntityCode; - - - // this.showMessageConfig = this.editorParams.hasOwnProperty('message'); - // this.showMessageTypeConfig = this.editorParams.hasOwnProperty('messageType'); - - // if (this.showMessageTypeConfig && !this.editorParams.messageType) { - // this.editorParams.messageType = 'info'; - // } - - } - - /** - * 点击确定 - */ - clickConfirm() { - // const expr = this.expEditor.getExpr(); - // if (!expr) { - // this.notifyService.warning('请先配置表达式'); - // return; - // } - // if (this.editorParams.expType !== 'defaultValue') { - // const expId = this.saveExpression(expr); - // this.submitModal.emit({ value: expr, parameters: expId, type: 'Expression' }); - // } else { - // this.submitModal.emit({ value: expr, parameters: expr, type: 'Expression' }); - // } - - } - - saveExpression(exprValue: string) { - if (!this.domServ.expressions) { - this.domServ.expressions = []; - } - const newExpConfig = new FormExpressionConfig(); - newExpConfig.id = this.editorParams.fieldId + '_' + this.editorParams.expType; - newExpConfig.type = this.editorParams.expType; - newExpConfig.value = exprValue; - - if (this.showMessageConfig) { - newExpConfig.message = this.editorParams.message; - } - if (this.showMessageTypeConfig) { - newExpConfig.messageType = this.editorParams.messageType; - } - - const expField = this.domServ.expressions.find(e => e.fieldId === this.editorParams.fieldId); - - if (!expField) { - if (this.formBasicService.envType === 'mobileDesigner'){ - const cmp = this.domServ.getComponentByVMId(this.editorParams.viewModelId); - - this.domServ.expressions.push( - { - fieldId: this.editorParams.fieldId, - viewModelId:cmp.id, - expression: [newExpConfig] - }); - }else{ - this.domServ.expressions.push( - { - fieldId: this.editorParams.fieldId, - expression: [newExpConfig] - }); - } - - } else { - const originalExp = expField.expression.find(e => e.type === this.editorParams.expType); - if (!originalExp) { - expField.expression.push(newExpConfig); - } else { - Object.assign(originalExp, newExpConfig); - } - } - - return newExpConfig.id; - - } - - /** - * 点击取消 - */ - clickCancel() { - this.closeModal.emit(); - - } - -} - - -export class ExpressionEditorParam { - - /** 弹窗标题 */ - modalTitle?: string; - - // 字段ID - fieldId: string; - - // 视图模型ID - viewModelId: string; - - /** 表达式类型:readonly|require|compute|validate|dependency|dataPicking */ - expType: string; - - /** 提示消息 */ - message?: string; - - /** 提示消息类型 */ - messageType?: string; - - /** 是否隐藏实体字段 */ - hideFieldSchema?: boolean; - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.css deleted file mode 100644 index 5343481a4e26cddb07e0649b80289afec88d937b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.css +++ /dev/null @@ -1,64 +0,0 @@ -:host { - color: #000; -} - -.ficon-container { - float: left; - width: 148px; - height: 100px; - text-align: center; - padding: 10px; -} - -.ficon-container .f-icon { - font-size: 30px; - width: 60px; - height: 60px; -} - -.ficon-container .f-icon:hover { - font-size: 50px; -} - -.ficon-text { - font-size: 12px; -} - -.icon-color-circle { - width: 10px; - height: 10px; - border-radius: 100%; - margin-right: 8px; - background-color: #59A1FF; - display: inline-block; -} - -.selecteIcon { - border: 2px solid #7ACC8D; -} - -.search { - float: right; - padding-top: 10px; - padding-bottom: 10px; - border-top: 1px solid #ddd; -} - -.search input { - width: 220px; - float: right; -} - -.search .fa-search { - position: absolute; - right: 10px; - top: 6px; - color: grey; -} - -.selectedIcon { - font-size: 20px; - position: absolute; - right: -50px; - top: 2px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.html deleted file mode 100644 index 2a5084a4c43bee747199b7a3d1d3c46fe28250de..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.html +++ /dev/null @@ -1,43 +0,0 @@ -
- -
-
- -
- - - -
-
-
-
-
- -
- -
-
-
-
- -
-
- -

{{icon}}

-
-
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.ts deleted file mode 100644 index 8ee6f1287d7c45273091989f3de1e962bc76218c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/icon-select-editor/icon-select-editor.component.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Component, Input, Output, EventEmitter, ViewChild, TemplateRef, OnInit, HostBinding } from '@angular/core'; - -/** - * 图标选择器-PC - */ -@Component({ - selector: 'icon-select-editor', - templateUrl: './icon-select-editor.component.html', - styleUrls: ['./icon-select-editor.component.css'] -}) -export class IconSelectEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - /** 现有的属性值,若需要图标样式,则是对象{iconName: string, iconClass:string},若不需要样式,则是string */ - @Input() value: any; - - /** 是否同时定义图标样式 */ - @Input() editorParams = { needIconClass: true, iconUrl: '' }; - - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - modalConfig = { - title: '图标选择器', - width: 900, - height: 700, - showButtons: true - }; - @HostBinding('class') - cls = 'd-flex flex-column h-100 f-utils-overflow-hidden'; - - /** 图标样式 */ - iconClass = ''; - - /** 可选的图标列表--全量 */ - iconList = []; - - /** 可选的图标列表--搜索后 */ - searchedIconList = []; - - /** 选中的图标 */ - selectedIcon = ''; - - /** 搜索的图标名称 */ - searchIconName = ''; - - /** 生效的图标 f-icon-** */ - fIconName = ''; - - constructor(private http: HttpClient) { } - - ngOnInit() { - this.getPresetIconList(); - - if (!this.value) { - return; - } - if (this.editorParams.needIconClass) { - this.iconClass = this.value.iconClass || ''; - - if (this.value.iconName) { - this.selectedIcon = this.value.iconName.replace('f-icon-', ''); - this.fIconName = this.value.iconName; - } - } else { - this.selectedIcon = this.value.replace('f-icon-', ''); - this.fIconName = this.value; - } - - } - - /** - * 获取图标列表 - * @param type type - */ - private getPresetIconList() { - const self = this; - // 默认路径 - let iconUrl = 'assets/form/icon.json'; - - if (this.editorParams.iconUrl) { - iconUrl = this.editorParams.iconUrl; - } - this.http.get(iconUrl + '?v=' + new Date().getTime()).subscribe(data => { - data.forEach(item => { - const itemArray = item.split('|'); - if (itemArray.length === 1) { - self.iconList.push(item); - } else { - self.iconList = self.iconList.concat(itemArray); - } - - }); - this.searchedIconList = Object.assign([], self.iconList); - }); - - - } - /** - * 选择已有图标 - */ - clickIcon(icon: string) { - this.selectedIcon = icon; - this.fIconName = 'f-icon-' + icon; - } - - /** - * 手动修改图标样式 - */ - changeFIconName() { - this.selectedIcon = this.fIconName.replace('f-icon-', ''); - } - /** - * 搜索 - */ - searchIcon() { - if (this.searchIconName) { - this.searchedIconList = this.iconList.filter(icon => icon.includes(this.searchIconName)); - } else { - this.searchedIconList = Object.assign([], this.iconList); - } - } - /** - * 确定 - */ - clickConfirm() { - if (this.editorParams.needIconClass) { - this.submitModal.emit({ - value: { - iconName: this.fIconName, - iconClass: this.iconClass - } - }); - } else { - this.submitModal.emit({ value: this.fIconName }); - } - - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp-convert.ts deleted file mode 100644 index a8a77ed6970b9c433483604556763f5da92d734b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp-convert.ts +++ /dev/null @@ -1,14 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class ImportCmpConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data) { - return data; - } - return ''; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.css deleted file mode 100644 index 17bd34951a369d09b4353dc3754729801b044b7d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.css +++ /dev/null @@ -1,247 +0,0 @@ -:host { - overflow: hidden; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; -} - - -.f-navForm-allData { - flex: 2; - text-align: center; - display: flex; - justify-content: center; - align-items: center; -} - -.f-navForm-allData-text { - width: 32px; - height: 44px; - font-family: PingFangSC-Medium; - font-size: 16px; - color: #2D2F33; - font-weight: 500; - padding-top: 12px; - cursor: pointer; -} - - -.f-navForm-allData-text-focus { - width: 32px; - height: 44px; - color: #2A87FF; - border-bottom: 3px solid blue; - font-family: PingFangSC-Medium; - font-size: 16px; - font-weight: 500; - padding-top: 12px; - cursor: pointer; -} - -.f-navForm-recommand { - flex: 2; - text-align: center; - display: flex; - justify-content: center; - align-items: center; -} - -.f-navForm-recommand-text { - width: 32px; - height: 44px; - font-family: PingFangSC-Medium; - font-size: 16px; - color: #2D2F33; - font-weight: 500; - padding-top: 12px; - cursor: pointer; -} - -.f-navForm-recommand-text-focus { - width: 32px; - height: 44px; - color: #2A87FF; - border-bottom: 3px solid blue; - font-family: PingFangSC-Medium; - font-size: 16px; - font-weight: 500; - padding-top: 12px; - cursor: pointer; -} - -.f-navForm-remainder { - flex: 12; -} - -.f-navForm-search { - width: 220px; - height: 26.6px; - background: #FFFFFF; - border-radius: 6px; - float: right; - margin-right: 40px; -} - -.f-navForm-content { - width: 100%; - min-width: 400px; - margin-top: 44px; - display: flex; - height: calc(100% - 80px); - overflow: scroll; - flex-wrap: wrap; - align-content: flex-start; -} - -.f-navForm-content-paging { - position: absolute; - top: calc(100% - 35px); - right: 50px; -} - -.f-navForm-content-recent { - width: 100%; - min-width: 400px; - margin-top: 44px; -} - -.f-navForm-content-local { - width: 100%; - min-width: 400px; -} - -.f-navForm-recommandLabel { - height: 18px; - font-family: PingFangSC-Regular; - font-size: 13px; - color: #3D4C6B; - font-weight: 400; - cursor: pointer; -} - - -.f-navForm-recentHeader { - height: 32px; - background: #FAFAFF; - width: 100%; - display: flex; - align-items: center; - padding-left: 10px; - cursor: pointer; - border: 1px solid rgba(233, 236, 243, 1); -} - -.f-navForm-localHeader { - height: 32px; - background: #FAFAFF; - width: 100%; - display: flex; - align-items: center; - padding-left: 10px; - cursor: pointer; - border: 1px solid rgba(233, 236, 243, 1); -} - -.f-navForm { - background-color: white; - height: 100%; -} - -.f-navForm-header { - display: flex; - align-items: center; - min-width: 400px; - width: 100%; - height: 44px; - border: 1px solid #e5e9ef; - background: #F9F9FC; - position: absolute; - top: 0; - z-index: 2; -} - -.f-navForm-item { - margin: 20px 0px 2px 20px; - padding: 15px 0 8px 18px; - border: 1px solid #e5e9ef; - width: 283px; - height: 90px; - background: #FFFFFF; - border: 1px solid rgba(218, 227, 255, 1); - border-radius: 11px; - display: flex; - cursor: pointer; -} - -.f-navForm-leftIcon { - flex: 1; -} - -.f-navForm-itemIcon { - width: 42px; - height: 42px; - background-image: linear-gradient(-45deg, #41D2BD 0%, #1FC8DC 100%); - border-radius: 12px; -} - -.f-navForm-rightText { - flex: 4; -} - -.f-navForm-item:hover { - background-color: #EDF5FC !important; - cursor: pointer; -} - -.f-navForm-item-active { - width: 283px; - height: 90px; - margin-right: 10px; - align-content: space-between; - padding: 15px 0 8px 18px; - border: 1px solid #e5e9ef; - width: 283px; - height: 90px; - background: #FFFFFF; - border: 1px solid rgba(218, 227, 255, 1); - border-radius: 11px; - display: flex; - border: 1px solid #e5e9ef; - background-color: #EDF5FC !important; - margin: 20px 0 2px 20px; - cursor: pointer; -} - -.f-navForm-name { - width: fit-content; - max-width: 200px; - display: inline-block; - vertical-align: center; - height: 20px; - font-family: PingFangSC-Regular; - font-size: 14px; - color: #2E4C70; - font-weight: 400; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - -} - -.f-navForm-source { - width: fit-content; - max-width: 200px; - height: 22px; - font-family: PingFangSC-Regular; - font-size: 13px; - color: #8999B9; - font-weight: 400; - background: #F7F9FC; - border-radius: 4px; - padding: 2px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.html deleted file mode 100644 index 0bb560622305439bcdd132b59393e60d2a9ab1ee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.html +++ /dev/null @@ -1,92 +0,0 @@ -
-
-
-
- 推荐
-
-
-
- 全部
-
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
{{formDataItem.name}} - ({{formDataItem.label}})
-
{{formDataItem.source}}
-
-
-
-
-
- - -
-
- -
-
未查询到符合条件的数据
-
- -
-
- -
-
-
-
-
-
-
-
-
{{formDataItem.name}} - ({{formDataItem.label}})
-
{{formDataItem.source}}
-
-
-
-
-
- - -
-
- -
-
未查询到符合条件的数据
-
-
- - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.spec.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.spec.ts deleted file mode 100644 index 5220c4f2c7ac3fa39a9412ad6c4c55dac5c8e32b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ImportCmpComponent } from './import-cmp.component'; - -describe('ImportCmpComponent', () => { - let component: ImportCmpComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ ImportCmpComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ImportCmpComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.ts deleted file mode 100644 index 6e807e33dad85b56e1ca62e4366afb7a267e704b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/import-cmp/import-cmp.component.ts +++ /dev/null @@ -1,439 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, Injector, ViewChild, TemplateRef } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DeclarationCommand, DgControl, DomService, FormBasicService } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; - -export class ImportCmpEditorParam { - /** 导入组件的原容器类型 */ - containerType: string; - /** 导入组件的原容器id */ - containerId: string; - /** 组件使用独立脚本加载 */ - useIsolateJs?: boolean; - /** 表单路径 */ - relativePath?: string; - /** 表单名称 */ - name?: string; -} - -@Component({ - selector: 'app-import-cmp', - templateUrl: './import-cmp.component.html', - styleUrls: ['./import-cmp.component.css'] -}) - -export class ImportCmpComponent implements OnInit { - /** 原始数据 */ - formData: any; - /** 搜索框输入值 */ - searchValue: string; - groupIcon = ''; - /** 当前选中的展示数据 */ - chooseRecommand: boolean = true; - /** 用户选择的数据 */ - selectedCommand: any; - /** 推荐数据 */ - formRecommandData: any; - /** 全部数据*/ - formAllData; - /** 弹窗设定值 */ - modalConfig = { - title: '选择表单', - width: 950, - height: 500, - minWidth: 650, - minHeight: 300, - resizable: false, - showButtons: true, - showMaxButton: false - }; - /** “全部”数据的副本 */ - formAllDataCopy; - - /** 启用服务器端分页 */ - pagerOnServer = false; - /** 每页记录数 */ - pageList = [21, 50, 100]; - /** 当前页码 */ - pageIndex = 1; - /** 每页记录数 */ - pageSize = 21; - /** 分页区高度 */ - pagerHeight = 56; - /** 显示每页记录数 */ - showPageList = false; - /** 显示分页信息 */ - showPageInfo = true; - /** 显示页码 */ - showPageNumber = true; - /** 显示页码最大数量 */ - pagerLabelSize = 7; - /** 总记录数 */ - total = 0; - /** 是否支持分页 */ - supportPaging = true; - paginationOptions = { - id: 'Farris-formMetadata-Pagination_', - itemsPerPage: this.pageSize, - currentPage: this.pageIndex, - pageList: this.pageList, - totalItems: this.total, - remote: this.pagerOnServer - }; - /** 推荐中是否没有数据 */ - noRecommandData: boolean = false; - /** 全部中是否没有数据 */ - noAllData: boolean = false; - // 模态框关闭 - @Output() closeModal = new EventEmitter(); - // 模态框确定后关闭,并传递参数 - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams: ImportCmpEditorParam; - @ViewChild('footer') modalFooter: TemplateRef; - metadataPath = ''; - oldCmpId = ''; - - // 当前环境是否设计时 - isDeisgnerEnv = true; - - constructor( - private formBasicService: FormBasicService, private domService: DomService, public injector: Injector, - private notifyService: NotifyService) { } - - ngOnInit() { - this.formData = []; - this.getAllDataInfo(); - this.getRecommandDataInfo(); - this.chooseRecommand = true; - this.formAllDataCopy = []; - if (this.value) { - this.oldCmpId = this.value; - } - this.onSearchValueChanged(''); - } - - - /** - * 获取全部数据 - */ - getAllDataInfo() { - const http = this.injector.get(HttpClient); - const relativePath = this.editorParams.relativePath; - // pagesize设为1000,如果调取的总数超过这个值,则再次调取一次,否则保留当前值; - // 搜索逻辑修改为:保留formData,在全部页面搜索时,foreach的数据是formData;然后将搜索到的值显示,并关闭分页; - // const pageSize = 1000; - return http.get('/api/dev/main/v1.0/mdservice/unionmdlist?path=' + relativePath + '&pageIndex=1&pageSize=1000&metadataTypeList=.frm', { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }), - responseType: 'json' - }).subscribe(data => { - this.reinvokeInterface(data); - this.formAllData = cloneDeep(this.getFormData(data, 'all')); - this.formAllDataCopy = cloneDeep(this.formAllData); - }); - } - - - /** 获取推荐数据 */ - getRecommandDataInfo() { - const http = this.injector.get(HttpClient); - const relativePath = this.editorParams.relativePath; - // 推荐 - return http.get('/api/dev/main/v1.0/mdservice/metadataListInSu?path=' + relativePath + '&metadataTypeList=.frm', { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }), - responseType: 'json' - }).subscribe(data => { - this.formRecommandData = cloneDeep(this.getFormData(data, 'recommand')); - if (this.formRecommandData) { - if (this.formRecommandData.length) { - this.showRecommandData(); - this.getUniqueData(this.formData); - } - } - }); - } - /** 获取数据 */ - getFormData(data, category) { - let metadata = []; - const formMetadata = data['metadataIndexItems'] ? data['metadataIndexItems'] : data; - if (formMetadata) { - formMetadata.forEach(function (formMetadataItem, index) { - let formMetadataItemTemp = { - id: index, - name: formMetadataItem.name, - label: formMetadataItem.code, - source: formMetadataItem.nameSpace, - hide: false, - active: false, - data: formMetadataItem, - category: category - } - metadata.push(formMetadataItemTemp); - }); - } - return metadata; - } - - /** 展示“推荐”一栏 */ - showRecommandData() { - this.selectedCommand = undefined; - this.chooseRecommand = true; - this.formData = []; - if (this.formRecommandData) { - if (this.formRecommandData.length) { - this.formRecommandData.forEach(formRecommandDataItem => { - this.formData.push(cloneDeep(formRecommandDataItem)); - }); - } - } - this.getUniqueData(this.formData); - this.formData = this.onSearchValueChanged(this.searchValue); - } - - /** 展示“全部”一栏 */ - showAllData() { - this.selectedCommand = undefined; - this.chooseRecommand = false; - this.formData = this.onSearchValueChanged(this.searchValue); - } - - /** -* 处理用户搜索值 -* @param searchValue 用户搜索值 -* @returns -*/ - public handleSearchedValue(searchValue: any) { - searchValue = searchValue == undefined ? '' : searchValue; - searchValue = searchValue['originalEvent'] != undefined ? searchValue.value || '' : searchValue; - this.searchValue = searchValue; - this.supportPaging = this.searchValue == '' ? true : false; - let value = searchValue.replace(/ /g, '').replace(/>/g, ''); - value = value == '' ? ' ' : value; - value = value.toLowerCase(); - return value; - } - - /** - * 检测推荐中是否有值:包括本地元数据及最近 - * @param searchedData - */ - public checkValueExists(searchedData: any, value: any) { - // 检测推荐元数据中是否有值 - const checkRecommand = searchedData.find(lookupDataItem => - lookupDataItem.category == 'recommand' && `${lookupDataItem.name} ${lookupDataItem.label} ${lookupDataItem.source}`.toLowerCase().includes(value) - ); - //检测全部中是否有值 - const checkAll = searchedData.find(lookupDataItem => - `${lookupDataItem.name} ${lookupDataItem.label} ${lookupDataItem.source}`.toLowerCase().includes(value) - ); - // 检测推荐中是否有数据 - this.noRecommandData = !checkRecommand ? true : false; - // 检测全部中是否有数据 - this.noAllData = !checkAll ? true : false; - } - - /** 搜索项 */ - onSearchValueChanged(searchValue) { - const searchedData = this.chooseRecommand ? this.formData : this.formAllDataCopy; - if (searchedData) { - const value = this.handleSearchedValue(searchValue); - this.checkValueExists(searchedData, value); - searchedData.forEach(formDataItem => { - let combinedString = `${formDataItem.name} ${formDataItem.label} ${formDataItem.source}`; - const selectedItem = combinedString.toLowerCase(); - formDataItem.hide = selectedItem.includes(value) == false ? true : false; - }) - } - this.formData = cloneDeep(searchedData); - return this.formData; - } - - /** 用户选择值 */ - getFormDataItem(selectedformDataItem) { - this.formData.forEach(formDataItem => { - if (selectedformDataItem.label == formDataItem.label) { - formDataItem.active = !formDataItem.active; - this.selectedCommand = cloneDeep(selectedformDataItem); - } - else { - formDataItem.active = false; - } - }) - - } - - /** - * 事件订阅:补充命令所在的组件ID属性 - */ - private adaptSubscription(declarations: any, targetComponentId: string) { - if (!declarations || !declarations.commands) { - return; - } - const subscriptions = this.domService.getComponentSubscriptions(); - if (subscriptions.length === 0) { - return; - } - const currentSubs = subscriptions.filter(s => s.targetComponent === targetComponentId); - if (!currentSubs || currentSubs.length === 0) { - return; - } - const commandDeclarations = declarations.commands as DeclarationCommand[]; - - currentSubs.forEach(subscription => { - const dec = commandDeclarations.find(d => d.code === subscription.invoke); - if (dec && dec.componentId) { - subscription.invokeComponentId = dec.componentId; - } - }); - } - - - /** 用户点击确定时调用postApi传出参数 */ - clickConfirm() { - if (this.selectedCommand && this.selectedCommand['active']) { - const http = this.injector.get(HttpClient); - const relativePath = this.editorParams.relativePath || ''; - const path = '/api/dev/main/v1.0/mdservice/pickMetadata?currentPath=' + relativePath; - const body = this.selectedCommand.data; - const headerOption = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - } - return http.post(path, body, headerOption).subscribe(data => { - data['metadata']['processMode'] = this.selectedCommand.data['processMode'] === 'interpretation' ? 'interpretation' : 'general'; - this.selectedMetadata(data['metadata']); - }); - } - else { - this.notifyService['info']('未选择表单'); - return null; - } - } - - /** 清空搜索内容 */ - onClear() { - this.formData = this.onSearchValueChanged(''); - } - - selectedMetadata($event) { - if (!$event) { - return; - } - const { content, ...frmInfo } = $event; - let frmContent = JSON.parse(content).Contents; - if (typeof (frmContent) === 'string') { - frmContent = JSON.parse(frmContent); - } - // 包含路由组件的表单 暂不支持预览 - const componentStr = JSON.stringify(frmContent.module.components); - if (componentStr.includes(DgControl.RouteContainer.type)) { - this.notifyService.warning('暂不支持引入包含子路由的表单'); - return; - } - - // 若选择的组件与之前相同,则不再生成新的id - let id = ''; const radomNum = Math.random().toString(36).substr(2, 4); - if (!this.value) { - id = frmInfo.code + '-' + radomNum + '-component'; - } else { - const oldCode = this.value.slice(0, this.value.indexOf('-')); - if (oldCode === frmInfo.code) { - id = this.value; - } else { - // 更换组件,需要删除原组件声明 - id = frmInfo.code + '-' + radomNum + '-component'; - this.domService.deleteExternalComponent(this.value); - // TODO删除原组件相关的订阅??否则会有冗余数据--- 目前对不存在的订阅进行提示。 - // 删除相关订阅 - this.domService.deleteComponentSubscription(this.value); - } - } - - const externalInfo = { - id, - uri: frmInfo.id, - name: frmInfo.name, - code: frmInfo.code, - fileName: frmInfo.fileName, - filePath: frmInfo.relativePath, - nameSpace: frmInfo.nameSpace, - declarations: [], - type: this.editorParams.containerType, - containerId: this.editorParams.containerId, - useIsolateJs: this.editorParams.useIsolateJs, - projectName: '', - serviceUnitPath: '' - }; - - if (frmContent.module) { - externalInfo.declarations = frmContent.module.declarations; - externalInfo.projectName = frmContent.module.projectName || ''; - - // 截取su路径--用于独立加载js脚本 - const filePathArray = externalInfo.filePath.split('/'); - if (filePathArray.length > 2) { - externalInfo.serviceUnitPath = filePathArray[0] + '/' + filePathArray[1]; - } - - } - this.value = externalInfo.id; - - // 修改module节点下的externalComponents数据 - this.domService.setExternalComponent(externalInfo, this.oldCmpId); - - this.adaptSubscription(externalInfo.declarations, id); - - const component = externalInfo.id + '-' + frmContent.module.id + '-' + 'root-component'; - this.submitModal.emit({ - value: this.value, parameters: { - component, - uri: frmInfo.id - } - }); - } - - clickCancel() { - this.closeModal.emit(); - } - /** 去重*/ - getUniqueData(data) { - if (data) { - let value = cloneDeep(data); - for (let i = 0; i < value.length; i++) { - for (let j = i + 1; j < value.length; j++) { - if (value[i]['id'] == value[j]['id']) { - value.splice(j, 1); - j--; - } - } - } - data = cloneDeep(value); - } - return data; - } - - onPageChange(page: { pageIndex: number }) { - if (this.pageIndex !== page.pageIndex) { - this.pageIndex = page.pageIndex; - this.paginationOptions.currentPage = page.pageIndex; - } - } - - /** 接口数据超过1000条时,重新调取所有数据 */ - reinvokeInterface(data) { - if (data['page']) { - const totalNum = data['page']['total'] || 0; - if (totalNum > 1000) { - const http = this.injector.get(HttpClient); - const relativePath = this.editorParams.relativePath; - return http.get('/api/dev/main/v1.0/mdservice/unionmdlist?path=' + relativePath + '&pageIndex=1&pageSize=' + totalNum + '&metadataTypeList=.frm', { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }), - responseType: 'json' - }).subscribe(data => { - this.formAllData = cloneDeep(this.getFormData(data, 'all')); - this.formAllDataCopy = cloneDeep(this.formAllData); - }); - } - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/index.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/index.ts deleted file mode 100644 index 60e4e68a17c699855777b39a48d334786b2ca1c9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/index.ts +++ /dev/null @@ -1,54 +0,0 @@ -// 绑定编辑器 -export { BindingEditorConverter } from './binding-editor/binding-editor-convert'; -export { BindingEditorComponent } from './binding-editor/binding-editor.component'; - -// 样式编辑器 -export { StyleEditorComponent } from './style-editor/style-editor.component'; - -// 数组类编辑器 -export { ItemCollectionEditorComponent } from './item-collection-editor/item-collection-editor.component'; -export { ItemCollectionConverter } from './item-collection-editor/item-collection-convert'; - -// 表达式编辑器 -export { ExpressionEditorComponent, ExpressionEditorParam } from './expression-editor/expression-editor.component'; -// export { FilterExprService } from './expression-editor/filter-expr.service'; - -// 集合类属性编辑器 -export { CollectionWithPropertyEditorComponent } from './collection-with-property-editor/collection-with-property-editor.component'; -export { CollectionWithPropertyConverter } from './collection-with-property-editor/collection-with-property-convert'; - -// 图标选择器 -export { IconSelectEditorComponent } from './icon-select-editor/icon-select-editor.component'; -//富文本编辑器 -export { RichTextPropEditor } from './rich-text-prop-editor/rich-text-prop-editor.component'; -// 代码编辑器+布尔值 -export { JavaScriptBooleanEditorComponent } from './javascript-boolean-editor/javascript-boolean-editor.component'; -export { JavaScriptBooleanConverter } from './javascript-boolean-editor/javascript-boolean-converter'; - -// 选择schema字段窗口 -export { SelectSchemaFieldEditorComponent } from './select-schema-field-editor/select-schema-field-editor.component'; - -// 代码编辑器 -export { CodeEditorComponent } from './code-editor/code-editor.component'; - -// 多值属性编辑器--待替换 -export { BindingCustomEditorComponent } from './binding-custom-editor/binding-custom-editor.component'; -export { BindingCustomType } from './binding-custom-editor/binding-custom-editor.component'; -export { BindingCustomEditorConverter } from './binding-custom-editor/binding-custom-editor-convert'; - -// 表单导入,用于组合表单 -export { ImportCmpComponent } from './import-cmp/import-cmp.component'; -export { ImportCmpConverter } from './import-cmp/import-cmp-convert'; - -// 映射编辑器 -export { SelectMappingComponent } from './select-mapping/select-mapping.component'; -export { MappingConverter } from './select-mapping/mapping-converter'; - -export { SelectMicroAppComponent } from './select-microapp/select-microapp.component'; -export { SelectMicroAppConverter } from './select-microapp/select-microapp-convert'; - -// 内联样式编辑器 -export { AdvancedStyleEditorComponent } from './advanced-style-editor/advanced-style-editor.component'; - -// 组件另存为编辑器 -export { SaveAsTemplateEditorComponent } from './save-as-template-editor/save-as-template-editor.component'; diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-convert.ts deleted file mode 100644 index f9b53000742416a8a678ca685c639b9ac12fbe8a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-convert.ts +++ /dev/null @@ -1,14 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class ItemCollectionConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data && data.length > 0) { - return '共 ' + data.length + ' 项'; - } - return '共 0 项'; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.html deleted file mode 100644 index 14acae894016628c77955e54d559ef40595b65fd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.html +++ /dev/null @@ -1,48 +0,0 @@ -
- -
-
- -
- -
-
-
-
-
- -
- -
-
-
-
- -
- - -
- -
- - -
- - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.ts deleted file mode 100644 index bfefa37172e481bc43287807d42f43c51c48ab50..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/item-collection-editor/item-collection-editor.component.ts +++ /dev/null @@ -1,327 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, HostBinding, NgZone } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { IdService } from '@farris/ui-common'; -import { cloneDeep } from 'lodash-es'; - -@Component({ - selector: 'app-item-collection-editor', - templateUrl: './item-collection-editor.component.html' -}) -export class ItemCollectionEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @Input() value: any[]; - - @Input() editorParams: any = { - // 必填的列 - requiredFields: [], - - // 值唯一的列 - uniqueFields: [], - - // 列配置 - columns: [], - - // 模态框标题 - modalTitle: '', - - // 数据是否可以置空 - canEmpty: false, - - // 动态映射键值 - dynamicMappingKeys: false, - - // 动态映射键值时,枚举值的key - valueField: '', - - // 动态映射键值时,枚举名称的key - nameField: '', - - // 列表只有一列时,将结果集转化为字符串数组 - isSimpleArray: false, - - // 是否只读 - readonly: Boolean - }; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - @ViewChild('itemsFooter') modalFooter: TemplateRef; - get modalConfig() { - return { - title: this.editorParams.modalTitle || '列表项集合编辑器', - width: 900, - height: 500, - showButtons: true - }; - } - @ViewChild('dg') dg: DatagridComponent; - - // 当前编辑数据 - data = []; - - constructor( - private notifyService: NotifyService, - private idServ: IdService, - private ngZone: NgZone) { } - - ngOnInit() { - if (!this.value || this.value.length === 0 || this.editorParams.columns.length === 0) { - this.data = []; - return; - } - - - this.assembleData(); - - - - // 默认选中行 - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - try { - this.dg.selectRow(this.data[0].hId); - } catch (e) { - this.dg.clearSelections(); - } - }); - }); - - this.modalConfig.title = this.editorParams.modalTitle || '列表项集合编辑器'; - } - - private assembleData() { - // 增加hid,作为列表的唯一id - if (!this.editorParams.dynamicMappingKeys) { - this.data = cloneDeep(this.value); - if (this.editorParams.isSimpleArray) { - this.data = this.data.map(d => { - return { - [this.editorParams.columns[0].field]: d - }; - }); - } - this.data.forEach((v: any) => { - v.hId = this.idServ.generate(); - }); - return; - } - - // 动态指定枚举值和枚举名称key - this.data = []; - - this.editorParams.valueField = this.editorParams.valueField ? this.editorParams.valueField.trim() : ''; - this.editorParams.nameField = this.editorParams.nameField ? this.editorParams.nameField.trim() : ''; - this.value.forEach(item => { - if (this.editorParams.valueField && this.editorParams.nameField) { - this.data.push( - { - hId: this.idServ.generate(), - value: item[this.editorParams.valueField], - name: item[this.editorParams.nameField] - } - ); - } - }); - - } - addItem() { - - if (this.editorParams.readonly) { - return; - } - // 触发单元格结束编辑 - this.dg.endEditing(); - - if (this.editorParams.dynamicMappingKeys) { - if (!this.editorParams.valueField || !this.editorParams.valueField.trim()) { - const co = this.editorParams.columns.find(c => c.field === 'value'); - this.notifyService.warning('请先填写' + co.title + '字段'); - return; - } - if (!this.editorParams.nameField || !this.editorParams.nameField.trim()) { - const co = this.editorParams.columns.find(c => c.field === 'name'); - this.notifyService.warning('请先填写' + co.title + '字段'); - return; - } - } - - const newData = this.createData(); - const hId = this.idServ.generate(); - this.dg.appendRow({ - hId, - ...newData - }); - - // 选中新增的行 - this.dg.selectRow(hId); - } - private createData(): any { - const data = {}; - this.editorParams.columns.forEach(c => { - data[c.field] = ''; - }); - return data; - } - - removeItem() { - if (this.editorParams.readonly) { - return; - } - - // 触发单元格结束编辑 - this.dg.endEditing(); - - const row = this.dg.selectedRow; - if (row) { - const nextRowId = this.dg.data.length > row.index + 1 ? this.dg.data[row.index + 1].hId : null; - - this.dg.deleteRow(row.id); - - if (nextRowId) { - this.dg.selectRow(nextRowId); - } else { - this.dg.clearSelections(); - } - - } else { - this.notifyService.warning('请选中要删除的行'); - } - - - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - // 获取最新数组 - let latestData = []; - this.dg.data.forEach(d => { - const { hId, ...other } = d; - latestData.push(other); - }); - - - // 校验 - if (!this.checkBeforeSave(latestData)) { - return; - } - - if (!this.editorParams.dynamicMappingKeys) { - if (this.editorParams.isSimpleArray) { - const value = latestData.map(d => d[this.editorParams.columns[0].field]); - this.submitModal.emit({ value }); - } else { - this.submitModal.emit({ value: latestData }); - } - } else { - latestData = this.convertDynamicMappingkeys(latestData); - this.submitModal.emit({ - value: latestData, - parameters: { - valueField: this.editorParams.valueField.trim(), - nameField: this.editorParams.nameField.trim() - } - }); - - } - } - - - - /** - * 保存前检查 - */ - checkBeforeSave(data: any[]): boolean { - // ① 空数组 - if (!data || data.length === 0) { - if (!this.editorParams.canEmpty) { - this.notifyService.warning('请添加值。'); - return false; - } - return true; - } - - const vali = this.editorParams; - if (!vali) { - return true; - } - - // ② 非空,则校验每个的键值是否为空;(区分枚举值为布尔型的场景;排除枚举值为整数0的场景) - const requiredFields = vali.requiredFields || []; - for (const item of data) { - for (const itemKey of Object.keys(item)) { - const co = this.editorParams.columns.find(c => c.field === itemKey); - if (co && co.editor && (co.editor.type === 'checkbox' || co.editor.type === 'switch')) { - if (requiredFields.includes(itemKey) && (item[itemKey] === null || item[itemKey] === undefined)) { - this.notifyService.warning(co.title + '不允许为空。'); - return false; - } - } else { - if (requiredFields.includes(itemKey) && - (item[itemKey] === undefined || item[itemKey] === '' || item[itemKey] === null)) { - this.notifyService.warning(co.title + '不允许为空。'); - return false; - } - } - - } - - } - - // ③ 不允许重复 - const uniqueFields = vali.uniqueFields || []; - - for (const uniqueField of uniqueFields) { - const fieldValues = data.map(e => e[uniqueField]); - const keySet = new Set(fieldValues); - const exclusiveKeys = Array.from(keySet); - if (fieldValues.length !== exclusiveKeys.length) { - const co = this.editorParams.columns.find(c => c.field === uniqueField); - this.notifyService.warning(co.title + '不允许重复。'); - return false; - } - } - - // 校验动态key值 - if (this.editorParams.dynamicMappingKeys) { - if (!this.editorParams.valueField || !this.editorParams.valueField.trim()) { - const co = this.editorParams.columns.find(c => c.field === 'value'); - this.notifyService.warning(co.title + '字段不能为空。'); - return false; - } - if (!this.editorParams.nameField || !this.editorParams.nameField.trim()) { - const co = this.editorParams.columns.find(c => c.field === 'name'); - this.notifyService.warning(co.title + '字段不能为空。'); - return false; - } - } - - return true; - - } - - private convertDynamicMappingkeys(latestData: any[]) { - if (!latestData || latestData.length === 0) { - return latestData; - } - const dynamicDataList = []; - latestData.forEach(data => { - const dynamicData = {}; - dynamicData[this.editorParams.valueField.trim()] = data.value; - dynamicData[this.editorParams.nameField.trim()] = data.name; - - dynamicDataList.push(dynamicData); - }); - - return dynamicDataList; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-converter.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-converter.ts deleted file mode 100644 index 63c99f7bbe4075bf2ac353fb5c4e4de8d82afbcd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-converter.ts +++ /dev/null @@ -1,44 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; -import { FormBinding, FormBindingType, DomService } from '@farris/designer-services'; -import { TypeConverter } from '../../entity/property-entity'; - -export class JavaScriptBooleanConverter implements TypeConverter { - - - constructor(private domService: DomService, private binding: FormBinding) { } - convertTo(data: any): any { - if (typeof (data) === 'boolean') { - return data ? '是' : '否'; - } - if (typeof (data) === 'string') { - return data; - } - if (data && data.type === 'Expression') { - return this.getExprValue(data); - } - return data || ''; - } - - - /** - * 获取属性编辑器需要的展示值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - private getExprValue(propertyValue: any) { - - let expressionStr = null; - if (propertyValue && propertyValue.expressionId) { - const bindingFieldId = this.binding && this.binding.type === FormBindingType.Form && this.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - if (expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig && originalExpConfig.value; - } - - - } - - return expressionStr; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.css deleted file mode 100644 index 5064a8280fcf14c51d287c5bb072ef366cf3e308..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.css +++ /dev/null @@ -1,20 +0,0 @@ -:host { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - overflow: hidden; -} - -.editor { - position: relative; - flex: 1; -} - -.editor .custom-monaco-editor { - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.html deleted file mode 100644 index 5a7c63dc50ada018e5b8ad00a8182307bb99a475..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.html +++ /dev/null @@ -1,31 +0,0 @@ -
- - -
- - -
-
-
示例代码
-
-{{editorParams.exampleCode}}
-      
-
- -
- - -
-
- -
- -
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.ts deleted file mode 100644 index ff24dc9ab33c483eac8d59f5c951a48d912603c7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/javascript-boolean-editor/javascript-boolean-editor.component.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { Component, Input, Output, EventEmitter, ViewChild, TemplateRef, OnInit } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DomService } from '@farris/designer-services'; -import { ExpressionEditorComponent } from '../expression-editor/expression-editor.component'; - -/** - * 属性编辑器,目前用于列表列的可见、只读、必填属性,包含布尔、自定义函数、表达式三个选项 - */ -@Component({ - selector: 'app-javascript-boolean-template-editor', - templateUrl: './javascript-boolean-editor.component.html', - styleUrls: ['./javascript-boolean-editor.component.css'] -}) -export class JavaScriptBooleanEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value: any; - @Input() editorParams: JSBooleanExpEditorParams; - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - get modalConfig() { - return { - title: this.editorParams.modalTitle || '编辑器', - width: 1060, - height: 700, - showButtons: true - }; - } - /** 取值的枚举项配置 */ - radioOptions = []; - - /** 取值类型:true/false/自定义函数/表达式 */ - radioValue: string; - - /** 自定义函数值 */ - customValue = ''; - - /** 代码编辑器配置项 */ - codeEditorOptions = { - theme: 'vs-dark', - language: 'javascript', - formatOnType: true, - foldingStrategy: 'indentation', // 显示缩进 - folding: true, // 启用代码折叠功能 - showFoldingControls: 'always', // 默认显示装订线 - automaticLayout: true // 监测父容器变化 - }; - - /** 代码编辑器实例 */ - monacoEditor; - - /** 表达式编辑器参数配置 */ - expressionParams: any = {}; - - /** 表达式值 */ - expressionValue = ''; - - /** 表达式编辑器实例 */ - @ViewChild(ExpressionEditorComponent) expressionEditorComponent: ExpressionEditorComponent; - - constructor(private domService: DomService, private notifyService: NotifyService) { } - - ngOnInit() { - this.assembleRadioOptions(); - this.initExpression(); - if (this.value === null || this.value === undefined) { - this.radioValue = null; - return; - } - switch (typeof (this.value)) { - case 'boolean': { - // 值为布尔值,则认为true或false - this.radioValue = this.value ? 'true' : 'false'; - break; - } - case 'string': { - // 值为字符串,则认为是自定义函数 - this.radioValue = 'custom'; - this.customValue = this.value; - break; - } - case 'object': { - // 值为对象,则认为是表达式 - this.radioValue = 'expression'; - break; - } - } - - } - onMonacoInit($event) { - this.monacoEditor = $event.editor; - } - /** - * 单选框枚举值 - */ - private assembleRadioOptions() { - this.radioOptions = [ - { value: 'true', text: '是' }, - { value: 'false', text: '否' } - ]; - if (this.editorParams.showJavascript) { - this.radioOptions.push( - { value: 'custom', text: '自定义函数' } - ); - } - if (this.editorParams.showExpression) { - this.radioOptions.push( - { value: 'expression', text: '表达式' } - ); - } - } - - changeRadioType() { - // 离开表达式界面时,保存当前填写的表达式值 - if (this.editorParams.showExpression && this.radioValue !== 'expression' && this.expressionEditorComponent) { - // this.expressionValue = this.expressionEditorComponent.expEditor.getExpr() || ''; - } - } - /** - * 确定 - */ - clickConfirm() { - this.clearOriginalExpression(); - - - if (this.radioValue === null || this.radioValue === undefined) { - this.submitModal.emit({ value: null }); - return; - } - switch (this.radioValue) { - case 'true': { - this.submitModal.emit({ value: true }); break; - } - case 'false': { - this.submitModal.emit({ value: false }); break; - } - case 'custom': { - this.submitModal.emit({ value: this.customValue }); break; - } - case 'expression': { - const expressionId = this.setExpression(); - if (!expressionId) { - return; - } - this.submitModal.emit({ - value: { - type: 'Expression', - expressionId - } - }); - } - } - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - /** - * 初始化表达式相关配置 - */ - private initExpression() { - if (!this.editorParams.showExpression) { - this.radioValue = null; - return; - } - - this.expressionParams = { - fieldId: this.editorParams.bindingFieldId, - viewModelId: this.editorParams.viewModelId, - expType: this.editorParams.expressionType - }; - // 必填表达式需要配置提示消息 - if (this.editorParams.expressionType === 'require') { - this.expressionParams.message = ''; - } - if (!this.value || !this.value.expressionId || !this.editorParams.bindingFieldId) { - return; - } - - const expField = this.domService.expressions.find(e => e.fieldId === this.editorParams.bindingFieldId); - if (!expField) { - return; - } - const originalExpConfig = expField.expression.find(exp => exp.id === this.value.expressionId); - this.expressionValue = originalExpConfig && originalExpConfig.value; - - if (this.editorParams.expressionType === 'require') { - this.expressionParams.message = originalExpConfig.message; - } - } - - - /** - * 保存表达式 - */ - private setExpression() { - // const newExpr = this.expressionEditorComponent.expEditor.getExpr() || ''; - // if (!newExpr) { - // this.notifyService.warning('请先配置表达式'); - // return; - // } - // return this.expressionEditorComponent.saveExpression(newExpr); - return this.expressionEditorComponent.saveExpression(''); - } - /** - * 清除原表达式 - */ - private clearOriginalExpression() { - if (this.value && this.value.type === 'Expression' && this.radioValue !== 'expression') { - const exp = this.domService.expressions.find(e => e.fieldId === this.editorParams.bindingFieldId); - if (!exp || !exp.expression) { - return; - } - - exp.expression = exp.expression.filter(e => e.type !== this.editorParams.expressionType); - } - } - - - -} - -class JSBooleanExpEditorParams { - /** 弹窗标题 */ - public modalTitle?: string; - - public viewModelId: string; - - /** 是否支持表达式配置项,默认false */ - public showExpression?= false; - - /** 当前控件绑定的字段或变量的ID ,在支持表达式配置时,必填 */ - public bindingFieldId?: string; - - /** 表达式类型 ,在支持表达式配置时,必填 */ - public expressionType?: string; - - /** 是否支持自定义函数配置项,默认false */ - public showJavascript?= false; - - /** 自定义函数示例代码 */ - public exampleCode: string; -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.html deleted file mode 100644 index 729e3ed263d11213cda9ee31f6f0994ee26dff0c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -
- - - - - diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.ts deleted file mode 100644 index 433bf89eff6f70c2d0305b6e2ea11f0baa407564..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/rich-text-prop-editor/rich-text-prop-editor.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild -} from '@angular/core'; -import { EditorComponent } from '@farris/ui-editor'; - -@Component({ - selector: 'rich-text-prop-editor', - templateUrl: './rich-text-prop-editor.component.html', - styleUrls: ['./rich-text-prop-editor.component.css'], -}) -export class RichTextPropEditor implements OnInit { - - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value: string; - - @Input('editorParams') - private editorParams: any - - @ViewChild('editor') - private editor: EditorComponent; - - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - ngOnInit() { - this.editorParams.value = this.value || ''; - // this.editor.registerOnChange((contentStr = '') => { - // this.contentString = contentStr - // }); - } - - get modalConfig() { - return { - title: '文本编辑', - width: 900, - height: 500, - showButtons: true - }; - } - - /** - * 确定 - */ - clickConfirm() { - this.submitModal.emit({ value: this.value }); - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.css deleted file mode 100644 index 4b43bad821c472e84061cbe7285bfe75b03608df..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.css +++ /dev/null @@ -1,17 +0,0 @@ -.panel { - padding: 20px 30px; -} - -.panel .farris-form-controls-inline { - width: 390px; -} - -.panel .col-form-label { - width: 65px; - justify-content: flex-start !important; -} - -.panel .content-grid { - border-radius: 8px; - overflow: hidden; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.html deleted file mode 100644 index 7cdb9838a6466867da6dfa82887bff892cbd923f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.html +++ /dev/null @@ -1,33 +0,0 @@ -
-
-
-
- -
- -
-
-
-
- - -
- - -
-
- - - - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.ts deleted file mode 100644 index a59caea31c0204a23a8f0ab86b6482ae9f0d0891..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/save-as-template-editor/save-as-template-editor.component.ts +++ /dev/null @@ -1,647 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DesignViewModelField, DesignViewModelService, DomService, FormBasicService, FormBindingType, FormComponentType, FormSchemaEntityField, FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { cloneDeep } from 'lodash-es'; -import { DgControl } from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; - - -class SaveAsTemplateEditorParam { - - /** 另存为类型:单个控件/ 容器 */ - controlCategory: 'input' | 'container'; - - /** 控件名称 */ - controlTitle: string; - - /** 控件DOM结构 */ - controlDom: any; - - /** 控件所属的视图模型id */ - viewModelId?: string; - - /** 模板在工具箱中展示的图标类型 */ - templateIconType?: string; -} - -class SaveAsComponentTemplateInfo { - /** 模板id */ - id: string; - code: string; - /** 模板名称 */ - name: string; - /** 模板所属表单信息、控件信息 */ - templateSource: string; - - /** 模板DOM结构 */ - templateDom: any; - - /** 模板分类 */ - templateCategory: string; - - /** 模板内需要的绑定字段 */ - bindingFields: FormSchemaEntityField[]; - -} - -/** - * 组件另存为编辑器 - */ -@Component({ - selector: 'app-save-as-template-editor', - templateUrl: './save-as-template-editor.component.html', - styleUrls: ['./save-as-template-editor.component.css'] -}) -export class SaveAsTemplateEditorComponent implements OnInit { - /** - * 关闭按钮事件 - */ - @Output() closeModal = new EventEmitter(); - /** - * 确定按钮事件 - */ - @Output() submitModal = new EventEmitter(); - /** - * 表达式值 - */ - @Input() value: string; - - /** - * 参数 - */ - @Input() editorParams: SaveAsTemplateEditorParam; - - /** - * 绑定编辑器页尾组件 - */ - @ViewChild('bindingFooter') modalFooter: TemplateRef; - /** - * 编辑器默认弹出窗口显示属性 - */ - public modalConfig = { - title: '保存组件模板', - width: 600, - height: 500, - showButtons: true, - resizable: false, - showMaxButton: false - }; - - /** 另存为类型 */ - saveAsType: 'input' | 'container'; - - private templateUrl = "/api/dev/formdesigner/v1.0/field-template"; - - /** 模板信息 */ - controlTemplateInfo: SaveAsComponentTemplateInfo - - /** 模板是否已保存过 */ - alreadySaved = false; - - /** 所有的子级控件 */ - allContentControls = []; - - /** 模板中勾选的子级控件 */ - selectedContentControls = []; - @ViewChild(DatagridComponent) dataGrid: DatagridComponent; - - /** 模板id */ - templateId: string; - /** 列表的列配置 */ - columns = [{ field: 'title', title: '控件' }]; - - /** 输入控件相关的绑定字段 */ - allBindingFields = new Map(); - - /** 记录容器内部绑定简单字段的控件。因为目前还不能支持复杂字段的另存为 */ - private simpleBindingControls = new Set(); - - /** 是否展示筛选控件的表格 */ - showFilterControlPanel = false; - - constructor( - private domService: DomService, - private formBasicService: FormBasicService, - private idService: IdService, - private http: HttpClient, - private dgVMService: DesignViewModelService, - private notifyService: NotifyService) { } - - ngOnInit() { - this.saveAsType = (this.editorParams && this.editorParams.controlCategory) || 'input'; - - // 获取控件DOM结构 - this.editorParams.controlDom = cloneDeep(this.editorParams.controlDom); - - this.allBindingFields.clear(); - - // 获取容器内的子级输入类控件 - if (this.saveAsType === 'container') { - this.simpleBindingControls.clear(); - this.allContentControls = this.getAllInputControls(this.editorParams.controlDom, true); - } else { - this.getBindingFieldForInputControl(); - } - - - this.editorParams.controlDom = this.clearBindingPropertiesInControl(this.editorParams.controlDom); - - // 获取模板id - this.getTemplateIdByFormIdAndControlId(); - - // 支持Form类Component和布局容器筛选内部输入控件,不支持table类Component筛选 - this.showFilterControlPanel = this.saveAsType === 'container' && this.editorParams.controlDom.componentType !== 'table'; - - // 查询模板 - this.controlTemplateInfo = new SaveAsComponentTemplateInfo(); - this.queryCurrentTemplateInfo(); - - - } - - private getTemplateIdByFormIdAndControlId() { - const metadataId = this.formBasicService.formMetaBasicInfo.id; - this.templateId = `${metadataId}_${this.editorParams.controlDom.id}`; - this.templateId = this.idService.encrypt(this.templateId); - - } - - /** - * 获取单个输入类控件的绑定字段 - */ - private getBindingFieldForInputControl() { - if (this.editorParams.controlDom && this.editorParams.controlDom.binding) { - const dgVMField = this.getBindingField(this.editorParams.controlDom.binding.field); - this.allBindingFields.set(this.editorParams.controlDom.id, dgVMField); - } - - } - - private getBindingField(fieldId: string) { - const dgViewModel = this.dgVMService.getDgViewModel(this.editorParams.viewModelId); - const dgVMField = dgViewModel.fields.find(f => f.id === fieldId); - - // 日期、数字需要明确具体类型 - switch (dgVMField.type.name) { - case FormSchemaEntityFieldTypeName.Number: { - dgVMField.type.elementType = dgVMField.type.length === 0 ? GSPElementDataType.Integer : GSPElementDataType.Decimal; - break; - } - case FormSchemaEntityFieldTypeName.DateTime: { - dgVMField.type.elementType = GSPElementDataType.DateTime; - break; - } - case FormSchemaEntityFieldTypeName.Date: { - dgVMField.type.elementType = GSPElementDataType.Date; - break; - } - } - - return dgVMField; - } - /** - * 查询当前模板信息 - */ - private queryCurrentTemplateInfo() { - - this.http.get(`${this.templateUrl}?id=${this.templateId}`).subscribe((data: Array) => { - - if (data && data.length && data[0].templateDom) { - - // 模板已存在,可修改 - this.alreadySaved = true; - this.controlTemplateInfo = data[0]; - this.controlTemplateInfo.templateDom = JSON.parse(data[0].templateDom); - - if (this.saveAsType === 'container' && this.controlTemplateInfo.templateDom.contents) { - this.selectedContentControls = this.getAllInputControls(this.controlTemplateInfo.templateDom); - - const checkedIds = this.selectedContentControls.map(c => c.id) - this.dataGrid.checkRows(checkedIds); - } - return; - } - - this.alreadySaved = false; - this.controlTemplateInfo.name = this.editorParams.controlTitle; - - if (this.saveAsType === 'container') { - this.dataGrid.checkAllRows(); - } - - }) - } - /** - * 查找容器内的输入控件,用于界面列表展示以及勾选 - */ - private getAllInputControls(controlDom: any, isCurrentContainer = false) { - if (this.saveAsType !== 'container') { - return []; - } - - const rawControlDom = controlDom; - if (!rawControlDom || !rawControlDom.contents || !rawControlDom.contents.length) { - return []; - } - // 布局容器 - if (controlDom.type === DgControl.ResponseLayout.type) { - return this.getAllInputControlsInResponseLayout(controlDom, isCurrentContainer); - } - if (controlDom.type === DgControl.Component.type) { - // table类组件 - if (controlDom.componentType === FormComponentType.table) { - return this.getAllInputControlsInTableComponent(controlDom, isCurrentContainer); - } - // form类组件 - if (controlDom.componentType && controlDom.componentType.includes(FormComponentType.form)) { - return this.getAllInputControlsInFormComponent(controlDom, isCurrentContainer); - } - } - - } - - /** - * 提取布局容器中的输入类控件 - * @param controlDom 容器DOM - * @param isCurrentContainer 是否为当前表单的容器 - */ - private getAllInputControlsInResponseLayout(controlDom: any, isCurrentContainer = false) { - const allContentControls = []; - controlDom.contents.forEach(co => { - let inputControl; - if (co.type === DgControl.ResponseLayoutItem.type) { - if (co.contents && co.contents.length) { - inputControl = co.contents[0]; - } - } - if (isCurrentContainer && inputControl) { - if (inputControl && inputControl.binding && inputControl.binding.path && !inputControl.binding.path.includes('_')) { - this.simpleBindingControls.add(inputControl.id); - } else { - this.simpleBindingControls.delete(inputControl.id); - } - } - - if (inputControl) { - // 收集绑定信息 - if (isCurrentContainer) { - const dgVMField = this.getBindingField(inputControl.binding.field); - if (dgVMField) { - this.allBindingFields.set(inputControl.id, dgVMField); - } - } - - inputControl = this.clearBindingPropertiesInControl(inputControl); - allContentControls.push(inputControl); - } - }) - - return allContentControls; - } - /** - * 提取Form类Component内的输入类控件 - * @param controlDom 容器DOM - * @param isCurrentContainer 是否为当前表单的容器 - */ - private getAllInputControlsInFormComponent(controlDom: any, isCurrentContainer = false) { - const allContentControls = []; - - const formNode = this.domService.selectNode(controlDom, item => item.type === DgControl.Form.type); - if (formNode && formNode.contents) { - formNode.contents.forEach(inputControl => { - if (isCurrentContainer && inputControl) { - if (inputControl && inputControl.binding && inputControl.binding.path && !inputControl.binding.path.includes('_')) { - this.simpleBindingControls.add(inputControl.id); - } else { - this.simpleBindingControls.delete(inputControl.id); - } - } - - if (inputControl) { - // 收集绑定信息 - if (isCurrentContainer) { - const dgVMField = this.getBindingField(inputControl.binding.field); - if (dgVMField) { - this.allBindingFields.set(inputControl.id, dgVMField); - } - } - - inputControl = this.clearBindingPropertiesInControl(inputControl); - allContentControls.push(inputControl); - } - }) - } - - return allContentControls; - } - /** - * 提取Table类Component中的输入类控件 - * @param controlDom 容器DOM - * @param isCurrentContainer 是否为当前表单的容器 - */ - private getAllInputControlsInTableComponent(controlDom: any, isCurrentContainer = false) { - const allContentControls = []; - - const tableNode = this.domService.selectNode(controlDom, item => item.type === DgControl.Table.type); - if (tableNode && tableNode.rows) { - tableNode.rows.forEach(row => { - if (row.columns && row.columns.length) { - row.columns.forEach(column => { - const isEditorColumn = column.tdType === 'editor' && !column.invisible && column.editor && column.editor.type; - let inputControl = isEditorColumn ? column.editor : null; - if (isCurrentContainer && inputControl) { - if (inputControl && inputControl.binding && inputControl.binding.path && !inputControl.binding.path.includes('_')) { - this.simpleBindingControls.add(inputControl.id); - } else { - this.simpleBindingControls.delete(inputControl.id); - } - } - - if (inputControl) { - // 收集绑定信息 - if (isCurrentContainer) { - const dgVMField = this.getBindingField(inputControl.binding.field); - if (dgVMField) { - this.allBindingFields.set(inputControl.id, dgVMField); - } - } - - inputControl = this.clearBindingPropertiesInControl(inputControl); - allContentControls.push(inputControl); - } - }) - } - }) - } - - return allContentControls; - } - - /** - *禁止行选中函数。目前只支持绑定简单字段的控件 - */ - disableRowFn = (inputControl, index) => { - - if (this.simpleBindingControls && this.simpleBindingControls.has(inputControl.id)) { - return false; - } - return true; - } - /** - * 清除控件中与绑定字段、变量、事件相关的属性值 - * @param inputControl 输入类控件Schema - */ - private clearBindingPropertiesInControl(inputControl: any) { - // 过滤binding-----这里不移除也可以,因为再次创建的时候这两个值会被覆盖掉 - // inputControl.binding = null; - // inputControl.path = ''; - - // 帮助控件 - if (inputControl.type == DgControl.LookupEdit.type) { - inputControl.dataSource = null; - inputControl.mapFields = ''; - } - // 智能输入框 - if (inputControl.type == DgControl.InputGroup.type && inputControl.modalConfig && inputControl.modalConfig.modalCmp) { - inputControl.modalConfig.modalCmp = null; - inputControl.modalConfig.mapFields = ''; - } - const actions = this.domService.module.actions || []; - Object.keys(inputControl).forEach(propKey => { - const propValue = inputControl[propKey]; - if (!propValue) { - return; - } - switch (typeof (propValue)) { - case 'object': { - // 绑定变量或者表达式 - if (propValue.type === FormBindingType.Variable || propValue.type === 'Expression') { - inputControl[propKey] = null; - } - - break; - } - case 'string': { - // 绑定状态机:增加判空条件,是为了防止目标表单里没有状态机 - if (propValue.includes('viewModel.stateMachine') && !propValue.includes('&&')) { - inputControl[propKey] = `viewModel.stateMachine && ${propValue}`; - } - - // 事件类属性:清空 - const bindingAction = actions.find(action => action.sourceComponent && action.sourceComponent.id === inputControl.id); - if (bindingAction && bindingAction.map) { - const eventBinding = bindingAction.map.find(item => item.event && item.event.label === propKey); - if (eventBinding) { - inputControl[propKey] = null; - } - } - } - - } - - - }) - return inputControl; - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - if (this.saveAsType === 'input') { - this.saveSingleControlAsTemplate(); - - } else { - this.saveContainerAsTemplate(); - } - - } - - /** - * 单个输入控件 - */ - private saveSingleControlAsTemplate() { - - const templateDom = cloneDeep(this.editorParams.controlDom); - const bindingField = this.allBindingFields.get(templateDom.id); - if (bindingField) { - this.saveTemplate(templateDom, [bindingField]); - } - } - - /** - * 容器类控件 - */ - private saveContainerAsTemplate() { - const checkeds = this.dataGrid.checkedRows; - const checkedControlIds = checkeds.map(c => c.data.id); - if (!checkedControlIds.length) { - this.notifyService.warning('请先选择控件!'); - return; - } - - - const templateDom = this.assembleTemplateDomByChecked(); - - - // 过滤绑定字段 - const selectedBindingFields = []; - checkedControlIds.forEach(controlId => { - const bindingField = this.allBindingFields.get(controlId); - selectedBindingFields.push(bindingField); - }) - - this.saveTemplate(templateDom, selectedBindingFields); - } - - - /** - * 根据勾选的控件,筛选容器的子级控件 - */ - private assembleTemplateDomByChecked() { - - const controlDom = this.editorParams.controlDom; - let templateDomAfterChecked; - // 布局容器 - if (controlDom.type === DgControl.ResponseLayout.type) { - templateDomAfterChecked = this.assembleTemplateDomByCheckedInResponseLayout(); - } - if (controlDom.type === DgControl.Component.type) { - // table类组件 - if (controlDom.componentType === FormComponentType.table) { - templateDomAfterChecked = this.assembleTemplateDomByCheckedInTableComponent(); - } - // form类组件 - if (controlDom.componentType && controlDom.componentType.includes(FormComponentType.form)) { - templateDomAfterChecked = this.assembleTemplateDomByCheckedInFormComponent(); - } - } - - return templateDomAfterChecked; - } - - - private assembleTemplateDomByCheckedInResponseLayout() { - const checkeds = this.dataGrid.checkedRows; - const checkedControlIds = checkeds.map(c => c.data.id); - - const rawControlDom = cloneDeep(this.editorParams.controlDom); - - // 未勾选的字段所在的布局项,contents节点置为[] - rawControlDom.contents.forEach((co, index) => { - if (co.contents && co.contents.length && !checkedControlIds.includes(co.contents[0].id)) { - co.contents.length = 0; - } - }) - return rawControlDom; - - } - - /** - * 表格类组件,组装筛选后的DOM结构 - */ - private assembleTemplateDomByCheckedInTableComponent() { - const checkeds = this.dataGrid.checkedRows; - const checkedControlIds = checkeds.map(c => c.data.id); - - const rawControlDom = cloneDeep(this.editorParams.controlDom); - const tableNode = this.domService.selectNode(rawControlDom, item => item.type === DgControl.Table.type); - - - // 为勾选的单元格:清除编辑器单元格的绑定信息和前置静态文本单元格的标题 - tableNode.rows.forEach(row => { - if (row.columns && row.columns.length) { - row.columns.forEach((column, index) => { - const isEditorColumn = column.tdType === 'editor' && !column.invisible && column.editor; - let inputControl = isEditorColumn ? column.editor : null; - - if (inputControl && !checkedControlIds.includes(inputControl.id)) { - column.editor = { - binding: null, - type: null - }; - column.staticText = { - text: '', - require: false - }; - - const staticTextColumn = row.columns[index - 1]; - staticTextColumn.staticText = { - text: '', - require: false - }; - } - }) - } - }) - - return rawControlDom; - - } - - /** - * Form类组件,组装筛选后的DOM结构 - */ - private assembleTemplateDomByCheckedInFormComponent() { - const checkeds = this.dataGrid.checkedRows; - const checkedControlIds = checkeds.map(c => c.data.id); - - const rawControlDom = cloneDeep(this.editorParams.controlDom); - const formNode = this.domService.selectNode(rawControlDom, item => item.type === DgControl.Form.type); - - // 清除未勾选的控件 - formNode.contents.forEach(inputControl => { - if (!checkedControlIds.includes(inputControl.id)) { - inputControl.unSelectedInTemplate = true; - } - }) - - formNode.contents = formNode.contents.filter(co => !co.unSelectedInTemplate); - - return rawControlDom; - } - - private saveTemplate(templateDom: any, bindingFields: FormSchemaEntityField[]) { - if (!this.controlTemplateInfo.name) { - this.notifyService.warning('请填写模板名称!'); - return; - } - const headerOption = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - } - - let templateIconType = this.editorParams.templateIconType || this.editorParams.controlDom.type; - - - const body = { - id: this.templateId, - code: this.templateId, - name: this.controlTemplateInfo.name, - templateCategory: this.editorParams.controlCategory, - templateSource: JSON.stringify({ - formId: this.formBasicService.formMetaBasicInfo.id, - formName: this.formBasicService.formMetaBasicInfo.name, - controlId: this.editorParams.controlDom.id, - templateIconType - }), - templateDom: JSON.stringify(templateDom), - bindingFields: JSON.stringify(bindingFields) - } - return this.http.post(this.templateUrl, body, headerOption).subscribe((data: any) => { - if (data && data.state) { - const msg = this.alreadySaved ? '更新模板成功' : '保存模板成功'; - this.notifyService.success(msg); - this.submitModal.emit(); - } - if (data && !data.state) { - this.notifyService.warning(data.errorMessage || '保存模板失败'); - } - }, () => { - this.notifyService.warning('保存模板失败'); - }); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-converter.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-converter.ts deleted file mode 100644 index 9eb4b3b8584bf5636118b9733b61ce7979f96baa..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-converter.ts +++ /dev/null @@ -1,17 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class MappingConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data) { - const num = data.split(':'); - if (num.length > 0) { - return '共 ' + (num.length - 1) + ' 项'; - } - return '共 ' + num.length + ' 项'; - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-field-manager.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-field-manager.ts deleted file mode 100644 index 2d314e7554737778a9eb32b4ef5ecd85ccec7a97..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/mapping-field-manager.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { Injectable, Optional } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { FormBasicService, FormBinding, FormBindingType, FormVariable, DesignerEnvType, FormSchema, DesignViewModelService, DomService, SchemaService, } from '@farris/designer-services'; -import { Observable, of, Subject } from 'rxjs'; -import { cloneDeep } from 'lodash-es'; -import { FarrisMetadataService } from '@farris/designer-services'; - -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; -/** - * 选择映射的组件参数 - */ -export class SelectMappingEditorParam { - /** 源表单的id */ - public sourceMetadataId: string; - - /** 源表单类型,默认为'help'(帮助) */ - public sourceMetadataType: string; - - /** 源表单展示标题,默认为'帮助' */ - public sourceMetadataName: string; - - /** 源表单字段列表 */ - public sourceMappingFields: TreeNode[]; - - /** 控件所属视图模型id */ - public viewModelId: string; - - /** 控件绑定信息 */ - public binding: any; - - public helpId: string; - - /** 是否多选 */ - public isMultiSelect: boolean; -} - -@Injectable() -export class MappingFieldManager { - - constructor( - private formBasicServ: FormBasicService, private domService: DomService, - private schemaService: SchemaService, - private dgVMService: DesignViewModelService, private notifyService: NotifyService, - @Optional() private unifiedMetadataService: FarrisMetadataService - ) { } - - /** - * 组装源字段树表数据 - * @param editorParams 编辑器参数 - */ - public assembleSourceFields(editorParams: SelectMappingEditorParam) { - if (editorParams.sourceMappingFields) { - const sourceFields = this.getStaticSourceMappingFields(cloneDeep(editorParams.sourceMappingFields)) || []; - return of(sourceFields); - } else { - return this.getSoruceMetadata(editorParams); - } - } - - /** - * 静态数据源补充bindingPath属性 - * @param sourceMappingFields 数据源 - * @returns 数据源 - */ - private getStaticSourceMappingFields(sourceMappingFields: TreeNode[]) { - sourceMappingFields.forEach(f => { - if (!f.data.bindingPath) { - f.data.bindingPath = f.data.label; - } - }); - - return sourceMappingFields; - } - /** - * 根据源元数据id获取元数据字段 - * @param editorParams 编辑器参数 - */ - private getSoruceMetadata(editorParams: SelectMappingEditorParam): Subject { - if (!editorParams.sourceMetadataId) { - return; - } - const subject = new Subject(); - - const ob = this.unifiedMetadataService.getMetadata(editorParams.sourceMetadataId);; - - if (ob) { - const sourceMetadataType = editorParams.sourceMetadataType || 'help'; - ob.subscribe(helpData => { - switch (sourceMetadataType) { - case 'help': { - const helpMetadataContent = JSON.parse(helpData.content); - if (helpMetadataContent && helpMetadataContent.schema && helpMetadataContent.schema.main) { - const fields = this.resolveSourceFields(helpMetadataContent.schema.main); - subject.next(fields); - } - break; - } - case 'form': { - let frmContent = JSON.parse(helpData.content).Contents; - if (typeof (frmContent) === 'string') { - frmContent = JSON.parse(frmContent); - } - const fields = this.resolveSourceFields(frmContent.module.schemas[0]); - subject.next(fields); - break; - } - } - - }, () => { - this.notifyService.error('获取元数据失败!'); - }); - } - return subject; - - } - - /** - * 获取帮助schema字段 - * @param schema schema - */ - private resolveSourceFields(schema: FormSchema) { - if (!schema || !schema.entities || schema.entities.length === 0) { - return []; - } - const mainTable = schema.entities[0]; - if (mainTable.type && mainTable.type.fields) { - return this.schemaService.assembleFields2Tree(mainTable.type.fields); - } - - } - - /** - * 获取表单列或变量信息 - */ - assembleTargetFields(binding: FormBinding, viewModelId: string) { - if (!binding || !viewModelId) { - return; - } - if (binding.type === FormBindingType.Form) { - return this.dgVMService.getAllFields2TreeByVMId(viewModelId); - } else if (binding.type === FormBindingType.Variable) { - const varialbeViewModelId = binding.path.includes('.') ? ROOT_VIEW_MODEL_ID : viewModelId; - const variable = this.domService.getVariableByIdAndVMID(binding.field, varialbeViewModelId); - - const varTree = this.assembleVariable2Tree(cloneDeep(variable)); - return [varTree]; - } - } - - private assembleVariable2Tree(variable: FormVariable, bindingPath = '') { - // 补充bindingPath属性 - if (!variable['bindingPath']) { - variable['bindingPath'] = (bindingPath ? bindingPath + '.' : '') + variable.code; - } - const children = []; - if (variable.fields && variable.fields.length > 0) { - variable.fields.forEach(v => { - const child = this.assembleVariable2Tree(v, variable['bindingPath']); - children.push(child); - }); - } - return { - data: { ...variable, label: variable.code }, - children, - selectable: children.length > 0 ? false : true, - expanded: true, - }; - - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.css deleted file mode 100644 index 9e2c1e898ea0af8792e21b684855fc363d9ef627..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.css +++ /dev/null @@ -1,14 +0,0 @@ -:host { - display: flex; - flex-direction: column; - height: 100%; -} - -.gridPanel { - position: relative; - margin-left: 10px; - margin-right: 10px; - border-radius: 5px; - overflow: hidden; - border: 1px solid #e9ecf3; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.html deleted file mode 100644 index 567416dbcac5fc81ca3520e4d253b3d23d562805..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.html +++ /dev/null @@ -1,17 +0,0 @@ -
- - -
- -
- - - -
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.ts deleted file mode 100644 index 3c8122df884d32aa3ca00d7d48cc3138052f0e97..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-mapping/select-mapping.component.ts +++ /dev/null @@ -1,269 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, TemplateRef, ViewChild } from '@angular/core'; -import { IdService } from '@farris/ui-common'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { MappingFieldManager, SelectMappingEditorParam } from './mapping-field-manager'; - - - -/** - * 映射选择器:元数据与当前表单字段之前的映射 - */ -@Component({ - selector: 'app-select-mapping', - templateUrl: './select-mapping.component.html', - styleUrls: ['./select-mapping.component.css'], - providers: [MappingFieldManager] -}) -export class SelectMappingComponent implements OnInit { - - @Output() closeModal = new EventEmitter(); - - /** 模态框确定后关闭,并传递参数 */ - @Output() submitModal = new EventEmitter(); - - /** 映射值: "{'id':'company.company','name':'company.company_Name'}" */ - @Input() value: string; - - /** 编辑器参数 */ - @Input() editorParams: SelectMappingEditorParam; - - /** 模态框页脚 */ - @ViewChild('mappingFooter') modalFooter: TemplateRef; - - /** 模态框配置数据 */ - modalConfig = { title: '映射编辑器', width: 900, height: 500, showButtons: true }; - - /** 源元数据类型,默认为帮助元数据 */ - sourceMetadataType = 'help'; - - /** 源元数据显示名称 */ - sourceMetadataName = '参照字段'; - - /** 列表组件实例 */ - @ViewChild(DatagridComponent) dataGridCmp: DatagridComponent; - - /** 映射数组 */ - mapValues = []; - - /** 列表列配置 */ - dataGridCols: any[] = [ - { field: 'sourceLabel', title: this.sourceMetadataName, editor: { type: EditorTypes.COMBOLOOKUP, options: { panelWidth: 'auto' } } }, - { field: 'targetLabel', title: '目标字段', editor: { type: EditorTypes.COMBOLOOKUP, options: { panelWidth: 'auto' } } }]; - - /** 源字段下拉树表数据 */ - sourceFieldTreeData: TreeNode[] = []; - - /** 目标字段下拉树表数据 */ - targetFieldTreeData: TreeNode[] = []; - - constructor( - private idService: IdService, - private managerService: MappingFieldManager, - private notifyService: NotifyService) { } - - ngOnInit() { - if (this.value) { - this.convertMapStr2Array(); - } - this.sourceMetadataType = this.editorParams.sourceMetadataType || 'help'; - // this.sourceMetadataName = (this.editorParams.sourceMetadataName || '帮助') + '字段'; - - - if (!this.editorParams || !this.editorParams.sourceMetadataId) { - this.notifyService.warning('请先选择' + this.sourceMetadataName + '元数据!'); - return; - } - if (!this.editorParams || !this.editorParams.binding || !this.editorParams.binding.type) { - this.notifyService.warning('请先绑定字段或变量!'); - return; - } - - this.setSourceDataGridColumnConfig(); - - this.setTargetDataGridColumn(); - } - - /** - * 配置源字段列 - */ - private setSourceDataGridColumnConfig() { - this.managerService.assembleSourceFields(this.editorParams).subscribe(data => { - this.sourceFieldTreeData = data || []; - - this.dataGridCols[0].editor = { - type: EditorTypes.COMBOLOOKUP, - options: { - idField: 'bindingPath', valueField: 'bindingPath', textField: 'bindingPath', data: this.sourceFieldTreeData, - columns: [{ field: 'name', title: '名称' }, { field: 'bindingPath', title: '绑定' }], - editable: false, - enableClear: false, - multiSelect: false, - displayType: 'LOOKUPTREELIST', - autoWidth: true - } - }; - - }); - - } - - /** - * 配置目标字段列 - */ - private setTargetDataGridColumn() { - const isMultiSelect = (this.editorParams && this.editorParams.isMultiSelect) === false ? false : true; - this.targetFieldTreeData = this.managerService.assembleTargetFields(this.editorParams.binding, this.editorParams.viewModelId); - this.dataGridCols[1].editor = { - type: EditorTypes.COMBOLOOKUP, - options: { - idField: 'bindingPath', valueField: 'bindingPath', textField: 'bindingPath', data: this.targetFieldTreeData, - columns: [{ field: 'name', title: '名称' }, { field: 'bindingPath', title: '绑定' }], - editable: false, - enableClear: false, - enableCancelSelected: false, - multiSelect: isMultiSelect, - displayType: 'LOOKUPTREELIST', - autoWidth: true - } - }; - } - - /** - * 将映射字符串转为dataGrid所需的数组结构 - */ - private convertMapStr2Array() { - let mapObject; - try { - const regExp = new RegExp('\'', 'g'); - const value = this.value.replace(regExp, '\"'); - mapObject = JSON.parse(value); - const sourceLabels = Object.keys(mapObject); - if (sourceLabels.length === 0) { - return; - } - sourceLabels.forEach(sourceLabel => { - const targetLabel = mapObject[sourceLabel]; - this.mapValues.push({ - id: this.idService.generate(), - sourceLabel, - targetLabel - }); - - }); - } catch (error) { - this.notifyService.error('mapFields 格式错误!!'); - } - - - } - - /** - * 新增映射 - */ - addMapping() { - // 触发单元格结束编辑 - this.dataGridCmp.endEditing(); - - this.mapValues.push({ - id: this.idService.generate(), - sourceLabel: '', - targetLabel: '' - }); - this.dataGridCmp.loadData(this.mapValues); - } - - /** - * 移除映射 - */ - removeMapping() { - const row = this.dataGridCmp.selectedRow; - if (!row) { - this.notifyService.warning('请先选中要删除的映射。'); - return; - } - - const rowIndex = row.index; - this.mapValues.splice(rowIndex, 1); - - this.dataGridCmp.loadData(this.mapValues); - this.dataGridCmp.clearAll(); - - // 自动选中下一行 - if (this.mapValues.length) { - const targetRowIndex = rowIndex >= this.mapValues.length ? 0 : rowIndex; - this.dataGridCmp.selectRow(this.mapValues[targetRowIndex].id); - } - - - } - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - this.dataGridCmp.endEditing(); - if (this.mapValues.length === 0) { - this.submitModal.emit({ value: '' }); - return; - } - // 校验源字段是否重复 - const keyValues = this.mapValues.map(v => v.sourceLabel); - const keySet = new Set(keyValues); - const exclusiveKeys = Array.from(keySet); - if (this.mapValues.length !== exclusiveKeys.length) { - this.notifyService.warning(this.sourceMetadataName + '重复,请重新选择。'); - return; - } - for (const mapValue of this.mapValues) { - if (!mapValue.sourceLabel) { - this.notifyService.warning(this.sourceMetadataName + '不能为空。'); - return; - } - if (!mapValue.targetLabel) { - this.notifyService.warning('目标字段不能为空。'); - return; - } - } - const mapObject = {}; - this.mapValues.forEach(map => { - mapObject[map.sourceLabel] = map.targetLabel; - }); - let mapStr = JSON.stringify(mapObject); - const regExp = new RegExp('\"', 'g'); - mapStr = mapStr.replace(regExp, '\''); - - this.submitModal.emit({ value: mapStr }); - - } - - - /** - * 将字段bindingPath转为名称显示在非编辑态的DataGrid单元格里。因为编辑态无法实现展示名称,故列表目前显示的是字段bindingPath - */ - // private getFieldNameByBindingPath(flag: 'source' | 'target', bindingPath: string) { - // const treeData = flag === 'source' ? this.sourceFieldTreeData : this.targetFieldTreeData; - // const data = this.findNodeByBindingPath(treeData, bindingPath); - // if (data && data.name) { - // return data.name; - // } - // return bindingPath; - // } - - // private findNodeByBindingPath(treeData: TreeNode[], bindingPath: string) { - // for (const treeNode of treeData) { - // if (treeNode.data.bindingPath === bindingPath) { - // return treeNode.data; - // } - - // if (treeNode.children && treeNode.children.length) { - // const data = this.findNodeByBindingPath(treeNode.children, bindingPath); - // if (data) { - // return data; - // } - // } - // } - // } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp-convert.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp-convert.ts deleted file mode 100644 index 704496c79148624a95615620d9bc26fb83848bbd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp-convert.ts +++ /dev/null @@ -1,17 +0,0 @@ -// import { TypeConverter } from '@farris/ide-property-panel'; - -import { TypeConverter } from "../../entity/property-entity"; - -export class SelectMicroAppConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (typeof (data) === 'string') { - return data || ''; - } - if (data && data.relatedMicroApp) { - return data.relatedMicroApp; - } - return ''; - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.html deleted file mode 100644 index cdd1b6b2bb4ebaa571d3c422e775f23afb50469c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.html +++ /dev/null @@ -1,13 +0,0 @@ -
- - -
- - - - - diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.ts deleted file mode 100644 index 5c9495259b3277f3b4e87bbe908ba5bce61e942f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-microapp/select-microapp.component.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef } from '@angular/core'; -import { FormBasicService, DesignerEnvType } from '@farris/designer-services'; -// import { DomService } from '../../../../service/dom.service'; -import { NotifyService } from '@farris/ui-notify'; -import { DatagridComponent } from '@farris/ui-datagrid'; -// import { DeclarationCommand } from '../../../../entity/dom-entity'; -// import { DgControlType } from '../../../../components/dg-control-type'; -import { ModalOptions } from '@farris/ui-modal'; -import { HttpClient } from '@angular/common/http'; - - -// TODO: 重构成DynamicDropdown。配置一个动态数据源(restful api)和取值字段、显示字段。 -// 支持搜索(或远程搜索),支持弹出窗口选择。 -// 选择轻应用其实是传入获取轻应用数据的api,下拉选择。 - -@Component({ - selector: 'app-select-microapp', - templateUrl: './select-microapp.component.html', - styleUrls: ['./select-microapp.component.css'] -}) -export class SelectMicroAppComponent implements OnInit { - - @ViewChild('microAppList') microAppList: DatagridComponent - - @ViewChild('selectMicroAppFooter') modalFooter: TemplateRef; - - @Input() value; - - @Input() editorParams = {}; - - modalConfig: ModalOptions = { - title: '选择关联轻应用', - width: 855, - height: 550, - showButtons: true - }; - - // 模态框关闭 - @Output() closeModal = new EventEmitter(); - - // 模态框确定后关闭,并传递参数 - @Output() submitModal = new EventEmitter(); - - // 当前环境是否零代码 - isNocodeEnv = true; - - private getMicroAppUrl = '/api/dev/nocode/v1.0/micro-apps'; - - relatedMicroApp: any[] = []; - - microAppDataCols = [ - { field: 'appId', title: 'ID', visible: false}, - { field: 'appCode', title: '编号', align: 'center', halign: 'center' }, - { field: 'appName', title: '名称', align: 'center', halign: 'center' }, - { field: 'taskCategoryId', title: '任务分类id', visible: false} - ]; - - microAppListData: any[] = []; - - constructor( - private formBasicService: FormBasicService, - // private domService: DomService, - private notifyService: NotifyService, - private http: HttpClient - ) { } - - ngOnInit() { - this.isNocodeEnv = this.formBasicService.envType === DesignerEnvType.noCode; - this.getMicroApp().subscribe((res: any[]) => { - if(res && res.length) { - const microAppWithWorkFlow = res.filter(data => !!data.processCategory); - microAppWithWorkFlow.forEach(app => { - let microAppData = Object.assign({}, { - appId: app.id, - appCode: app.code, - appName: app.name, - taskCategoryId: app.processCategory - }); - this.microAppListData.push(microAppData); - }); - } - }); - } - - private getMicroApp() { - return this.http.get(`${this.getMicroAppUrl}`); - } - - onChecked(e: any) { - this.relatedMicroApp.push(e.data); - } - - onUnChecked(e: any) { - const index = this.relatedMicroApp.findIndex(app => app.appId == e.id); - this.relatedMicroApp.splice(index, 1); - this.relatedMicroApp = this.relatedMicroApp.slice(); - } - - clickConfirm() { - if(this.relatedMicroApp.length == 0) { - this.submitModal.emit({ value: '' }); - return; - } - const relatedMicroAppNameArr = this.relatedMicroApp.map(app => { return app.appName }); - const taskCategoryIdArr = this.relatedMicroApp.map(app => { return app.taskCategoryId }); - this.submitModal.emit({value: taskCategoryIdArr.join(',')}); - } - - clickCancel() { - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.css deleted file mode 100644 index d5fc4bd6084ddba4118959d0a7f8e5ed6c7f33a5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.css +++ /dev/null @@ -1,3 +0,0 @@ -:host{ - border-radius: 7px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.html deleted file mode 100644 index 175242e6fb1f461016048c60842860a73f90d7cc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.ts deleted file mode 100644 index 0c613d6cbc2bced0bb1c8e688103ee1af5c38b30..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/select-schema-field-editor/select-schema-field-editor.component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, NgZone } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { DesignViewModelService } from '@farris/designer-services'; - -/** - * 选择表单schema字段参数信息 - */ -export class SelectSchemaFieldEditorParam { - /** 视图模型id */ - viewModelId: string; - /** 是否允许多选,默认false */ - isMultiSelect: boolean; - /** 允许选择的字段类型,不传则默认全部可选 */ - allowedFieldTypes?: string[]; -} -/** - * 选择表单scheme字段 - */ -@Component({ - selector: 'select-schema-field-editor', - templateUrl: './select-schema-field-editor.component.html', - styleUrls: ['./select-schema-field-editor.component.css'] -}) -export class SelectSchemaFieldEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams: SelectSchemaFieldEditorParam = { viewModelId: '', isMultiSelect: false }; - @ViewChild('modalFooter') modalFooter: TemplateRef; - - @HostBinding('class') - class = 'f-utils-fill-flex-column h-100 mx-3 border'; - - modalConfig = { - title: '字段选择器', - width: 900, - height: 500, - showButtons: true, - showMaxButton: false - }; - - // 树表数据 - treeData: TreeNode[] = []; - - // 树表列配置 - treeCols = [{ field: 'name', title: '名称' }, { field: 'label', title: '编号' }, { field: 'bindingPath', title: '绑定字段' }]; - - // 树表实例 - @ViewChild('treeTable') treeTable: TreeTableComponent; - - constructor( - private notifyService: NotifyService, - private dgVMService: DesignViewModelService, - private ngZone: NgZone - ) { } - - ngOnInit(): void { - if (!this.editorParams || !this.editorParams.viewModelId) { - return; - } - this.treeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams.viewModelId); - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - if (!this.value) { return; } - try { - if (this.editorParams.isMultiSelect) { - this.treeTable.checkedNodes(this.value.split(',')); - } else { - this.treeTable.selectNode(this.value); - } - } catch (e) { - this.treeTable.clearSelections(); - // console.log('已绑定字段不存在!'); - } - }); - }); - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - /** - * 确定 - */ - clickConfirm() { - // 单选 - if (!this.editorParams.isMultiSelect) { - if (!this.treeTable.selectedRow) { - this.notifyService.warning('请选择字段'); - return; - } - - const selectedData = this.treeTable.selectedRow.data; - - this.submitModal.emit({ value: selectedData.bindingPath }); - return; - } - - // 多选 - if (this.treeTable.checkeds && !this.treeTable.checkeds.length) { - this.notifyService.warning('请选择字段'); - return; - } - const checkedData = this.treeTable.checkeds.map(c => c.data.bindingPath); - - this.submitModal.emit({ value: checkedData.join(',') }); - - } - - -} diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.css b/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.html b/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.html deleted file mode 100644 index 13fb933cd6e5cd0c8cedc5afae79720af91244ee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.html +++ /dev/null @@ -1,17 +0,0 @@ -
- - -
- -
- - -
- - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.ts b/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.ts deleted file mode 100644 index f2f8836eb4e21a82acce76ca830554897c1122d0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/property-editor/style-editor/style-editor.component.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, HostBinding } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { IdService } from '@farris/ui-common'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; - - -@Component({ - selector: 'app-style-editor', - templateUrl: './style-editor.component.html', - styleUrls: ['./style-editor.component.css'] -}) -export class StyleEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value: string; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - @ViewChild('styleFooter') modalFooter: TemplateRef; - modalConfig = { - title: '样式编辑器', - width: 900, - height: 500, - showButtons: true - }; - - @ViewChild('dg') dg: DatagridComponent; - columns = [ - { field: 'code', title: '样式编号', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'value', title: '样式值', editor: { type: EditorTypes.TEXTBOX } } - ]; - - - /** - * 枚举弹框数据源 - * 用来保存过程中编辑数据 - */ - data = []; - - constructor(private notifyService: NotifyService, private idServ: IdService) { } - - ngOnInit() { - if (!this.value) { - this.data = []; - return; - } - this.value.split(';').forEach(style => { - const styleCode = style.split(':'); - if (styleCode.length === 2) { - this.data.push({ - hId: this.idServ.generate(), - code: styleCode[0].trim(), - value: styleCode[1].trim() - }); - } - }); - } - - - addItem() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - this.dg.appendRow({ - hId: this.idServ.generate(), - code: '', - value: '' - }); - } - - removeItem() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - const row = this.dg.selectedRow; - if (row) { - this.dg.deleteRow(row.id); - this.dg.clearSelections(); - } else { - this.notifyService.warning('请选中要删除的行'); - } - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - - // 获取最新数组 - const latestData = []; - this.dg.data.forEach(d => { - const { hId, ...other } = d; - latestData.push(other); - }); - - - if (latestData.length === 0) { - this.submitModal.emit({ value: '' }); - return; - } - - // 校验 - if (!this.checkBeforeSave(latestData)) { - return; - } - - - - const a = latestData.map(style => style.code.trim() + ':' + style.value.trim()); - this.value = a.join(';'); - - this.submitModal.emit({ value: this.value }); - } - - /** - * 保存前检查 - */ - checkBeforeSave(latestData: any[]): boolean { - // ② 非空,则校验每个的键值是否为空; - for (const item of latestData) { - if (!item.code || !item.value) { - this.notifyService.warning('样式编号和样式值均不允许为空。'); - return false; - } - } - // ③ 键不允许重复; - const enumKeys = latestData.map(e => e.code); - const keySet = new Set(enumKeys); - const exclusiveKeys = Array.from(keySet); - if (enumKeys.length !== exclusiveKeys.length) { - this.notifyService.warning('样式编号不允许重复。'); - return false; - } - return true; - - } -} diff --git a/packages/designer/projects/designer-devkit/src/lib/services/drag-resolve.service.ts b/packages/designer/projects/designer-devkit/src/lib/services/drag-resolve.service.ts deleted file mode 100644 index 9725ef576b64df002c9aad8eff55bd606d40d670..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/lib/services/drag-resolve.service.ts +++ /dev/null @@ -1,743 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core'; -import { BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import { - ComponentBindingSourceContext, ComponentResolveContext, DesignerHostSettingService, - DesignViewModelField, DesignViewModelService, DgControl, - DomService, FormBinding, FormBindingType, FormVariable, SchemaService -} from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; -import { BsModalService } from '@farris/ui-modal'; -import { NotifyService } from '@farris/ui-notify'; -import { merge } from 'lodash-es'; -import { Observable, of, Subject } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; -import { ComponentBuildInfo, InnerComponentCreatorComponent } from '../components/inner-component-creator'; -import { ComponentCreatorService } from '../components/inner-component-creator/component-creator.service'; -import { BindingEditorComponent } from '../property-editor/binding-editor/binding-editor.component'; - -/** - * 表单拖拽服务类 - */ -@Injectable({ - providedIn: 'root' -}) -export class DragResolveService { - - constructor( - public domService: DomService, - public designViewModelService: DesignViewModelService, - private componentFactoryResolver: ComponentFactoryResolver, - private modalService: BsModalService, - public injector: Injector, - public notifyService: NotifyService, - public schemaService: SchemaService, - public designerHostSettingServ: DesignerHostSettingService, - public http: HttpClient - ) { } - - /** - * 获取拖拽上下文信息 - * @param sourceEl 拖拽源HTML节点 - * @param targetComponentInstance 目标组件实例 - */ - public getComponentResolveContext(sourceEl: BuilderHTMLElement, targetComponentInstance: FarrisDesignBaseComponent) - : ComponentResolveContext { - - const resolveContext = new ComponentResolveContext(); - - resolveContext.sourceType = sourceEl.getAttribute('data-sourceType') || 'move' as any; - resolveContext.controlType = sourceEl.getAttribute('data-controlType'); - resolveContext.controlTypeName = sourceEl.getAttribute('data-controlTypeName'); - resolveContext.controlCategory = sourceEl.getAttribute('data-category'); - resolveContext.defaultFieldType = sourceEl.getAttribute('data-fieldType'); - resolveContext.defaultUdtId = sourceEl.getAttribute('data-udtId'); - resolveContext.bindingTargetId = sourceEl.getAttribute('data-fieldId'); - resolveContext.useStrictMappingRule = sourceEl.getAttribute('data-useStrictMappingRule') === 'true'; - resolveContext.controlFeature = sourceEl.getAttribute('data-feature'); - resolveContext.controlTemplate = { - templateId: sourceEl.getAttribute('data-templateId'), - templateCategory: sourceEl.getAttribute('data-templateCategory'), - }; - - resolveContext.parentComponentInstance = targetComponentInstance; - if (resolveContext.controlCategory === 'input') { - resolveContext.bindingType = 'field'; - } else if (resolveContext.controlCategory === 'dataCollection') { - resolveContext.bindingType = 'entity'; - } - - // 现有控件移动位置:从控件实例上获取控件类型 - if (sourceEl.componentInstance) { - resolveContext.controlType = sourceEl.componentInstance.type; - resolveContext.controlCategory = sourceEl.componentInstance.category; - - } - - if (targetComponentInstance) { - resolveContext.bindingTargetInSidebar = DgControl.Sidebar && targetComponentInstance.type === DgControl.Sidebar.type; - } - return resolveContext; - } - - - /** - * 根据拖拽元素解析并创建控件 - * @param sourceEl 源Element - * @param targetComponentInstance 目标控件的实例 - */ - public resolveComponentCreationContextByDrop(sourceEl: BuilderHTMLElement, targetComponentInstance: FarrisDesignBaseComponent): Observable { - - const componentResolveContext = this.getComponentResolveContext(sourceEl, targetComponentInstance); - - return this.resolveBindingSource(componentResolveContext).pipe( - switchMap((bindingSourceContext: ComponentBindingSourceContext) => { - // 若返回undefined 代表终止后续生成。返回null不会终止 - if (bindingSourceContext === undefined) { - return of(null); - } else { - componentResolveContext.bindingSourceContext = bindingSourceContext; - this.resolveComponentSchema(componentResolveContext); - return of(componentResolveContext); - } - - }) - ); - } - /** - * 解析拖拽元素,并根据场景展示不同的绑定窗口 - * @param componentResolveContext 拖拽上下文 - */ - public resolveBindingSource(componentResolveContext: ComponentResolveContext): Observable { - const { bindingType } = componentResolveContext; - - if (componentResolveContext.controlCategory === 'input') { - // 输入类,触发展示字段绑定窗口 - return this.triggerBindingField(componentResolveContext); - } else if (bindingType === 'entity') { - // 实体类,触发展示实体绑定窗口 - return this.triggerBindingEntity(componentResolveContext); - } else { - // 容器类,不需要绑定信息,直接生成控件DOM结构即可 - return of(null); - } - - } - /** - * 字段绑定 - * @param componentResolveContext 拖拽上下文 - */ - public triggerBindingField(componentResolveContext: ComponentResolveContext): Observable { - if (componentResolveContext.bindingTargetId) { - // 包含字段标识,说明是实体树拖拽字段 - return this.getBindingSourceContextBySchemaTree(componentResolveContext); - } else { - // 工具箱拖拽控件 - return this.getBindingSourceContextByControlBox(componentResolveContext); - } - - } - - /** - * 实体树节点拖拽生成控件:解析字段的绑定信息 - * @param componentResolveContext 拖拽上下文 - */ - private getBindingSourceContextBySchemaTree(componentResolveContext: ComponentResolveContext): Observable { - const { bindingTargetId, parentComponentInstance } = componentResolveContext; - - const displayedFieldsMap = this.getDisplayedFieldsMapBySelectedEntity(componentResolveContext); - if (displayedFieldsMap.has(bindingTargetId)) { - this.notifyService.warning('表单已经包含此字段,请勿重复添加'); - // 结束 - return of(undefined); - } else { - const resolveResult = this.schemaService.getFieldByIDAndVMID(bindingTargetId, parentComponentInstance.viewModelId); - const componentBindingSourceContext: ComponentBindingSourceContext = { bindingType: 'field' }; - - - // 注意,这里复制一下,否则是跟表单dom使用的同一个json对象,在上面添加的属性会保存到表单dom上。 - const schemaField = merge({}, resolveResult.schemaField); - - componentBindingSourceContext.entityFieldNode = schemaField; - - // 若添加到分组内,需要保存向vm保存groupId和groupName - const { groupId, groupName } = this.getFieldGroupInfo(parentComponentInstance); - componentBindingSourceContext.designViewModelField = merge({}, schemaField, { groupId, groupName }); - - return of(componentBindingSourceContext); - - } - } - /** - * 控件工具箱拖拽生成控件,创建字段绑定模态框 - */ - protected getBindingSourceContextByControlBox(componentResolveContext: ComponentResolveContext): Observable { - const { controlType, parentComponentInstance, useStrictMappingRule } = componentResolveContext; - // 列表支持的控件类型有限 - if (parentComponentInstance.type === 'DataGrid' || parentComponentInstance.type === 'TreeGrid') { - const notAllowedType = [ - DgControl.CheckGroup.type, DgControl.RadioGroup.type, DgControl.RichTextBox.type, - DgControl.Image.type, DgControl.Tags.type, DgControl.Avatar.type, DgControl.ImageUpload.type]; - if (notAllowedType.includes(controlType)) { - this.notifyService.warning('列表暂不支持此控件,请重新选择'); - // 结束 - return of(undefined); - } - } - const bindingSourceResult = new Subject(); - - const componentBindingSourceContext: ComponentBindingSourceContext = { bindingType: 'field' }; - - - const editorComponentFactory = this.componentFactoryResolver.resolveComponentFactory(BindingEditorComponent); - const editorComponentFactoryRef = editorComponentFactory.create(this.injector); - - editorComponentFactoryRef.instance.editorParams.viewModelId = parentComponentInstance.viewModelId; - editorComponentFactoryRef.instance.unusedOnly = true; - editorComponentFactoryRef.instance.bindingControlType = controlType; - editorComponentFactoryRef.instance.useStrictMappingRule = useStrictMappingRule - - // 限制绑定类型 - editorComponentFactoryRef.instance.editorParams.allowedBindingType = [DgControl.Form.type, DgControl.FieldSet.type, 'TableTd', DgControl.ResponseLayoutItem.type].includes(parentComponentInstance.type) ? null : 'Form'; - - const fieldSelectorDialog = this.modalService.show(editorComponentFactoryRef, { - title: '绑定', - width: 900, - height: 500, - showButtons: true, - buttons: editorComponentFactoryRef.instance.modalFooter - }); - - editorComponentFactoryRef.instance.closeModal.subscribe(() => { - fieldSelectorDialog.close(); - // 结束 - bindingSourceResult.next(undefined); - }); - - editorComponentFactoryRef.instance.submitModal.subscribe((data: { value: FormBinding, parameters: any }) => { - fieldSelectorDialog.close(); - if (!data || !data.value) { - return; - } - // 若添加到分组内,需要向vm保存groupId和groupName - const { groupId, groupName } = this.getFieldGroupInfo(parentComponentInstance); - - if (data.value.type === 'Form') { - // 绑定字段 - const entityField = data.parameters.selectedData as DesignViewModelField; - componentBindingSourceContext.entityFieldNode = entityField; - - componentBindingSourceContext.designViewModelField = merge({}, entityField, { groupId, groupName }); - - bindingSourceResult.next(componentBindingSourceContext); - } else { - // 绑定变量 - const varibleField = data.parameters.selectedData as FormVariable; - componentBindingSourceContext.variableFieldNode = merge({}, varibleField, { groupId, groupName }); - bindingSourceResult.next(componentBindingSourceContext); - - } - }); - return bindingSourceResult; - } - /** - * 生成控件schema结构 - * @param componentResolveContext 拖拽上下文 - */ - public resolveComponentSchema(componentResolveContext: ComponentResolveContext) { - const { controlCategory, controlType, bindingSourceContext } = componentResolveContext; - - // 存储新建的控件dom结构,由designer-view统一追加到DOM结构中 - let domElement = null; - if (componentResolveContext.componentInstance) { - return; - } - switch (controlCategory) { - case 'input': { - if (bindingSourceContext && bindingSourceContext.entityFieldNode) { - domElement = this.resolveControlSchemaByEntityField(componentResolveContext); - - } else if (bindingSourceContext && bindingSourceContext.variableFieldNode) { - domElement = this.resolveControlSchemaByVariableField(componentResolveContext); - } - break; - } - case 'dataCollection': { - if (bindingSourceContext && bindingSourceContext.bindingType === 'entity') { - domElement = this.resolveComponentSchemaByEntity(componentResolveContext); - } - break; - } - default: { - - domElement = this.designerHostSettingServ.controlService.getControlMetaData(controlType, true, componentResolveContext.parentComponentInstance, componentResolveContext.controlFeature); - - this.resolveProcessInstanceForApproval(domElement, controlType); - - // 唯一化id - const radomNum = Math.random().toString().slice(2, 6); - const typePrefix = controlType.toLowerCase(); - if (domElement.type === controlType) { - domElement.id = `${typePrefix}_${radomNum}`; - } - } - } - - if (domElement) { - componentResolveContext.componentSchema = domElement; - } - } - - /** - * 根据实体字段创建控件 - * @param componentResolveContext 上下文 - */ - public resolveControlSchemaByEntityField(componentResolveContext: ComponentResolveContext) { - const { controlType, bindingSourceContext, parentComponentInstance } = componentResolveContext; - - const viewModelId = parentComponentInstance.viewModelId; - const controlCreatorService = this.designerHostSettingServ.controlCreatorService; - const bindingTarget = bindingSourceContext.entityFieldNode; - - let domElement; - // 如果目标父容器是列表,这里不是创建输入控件而是grid列 - if (parentComponentInstance.type === 'DataGrid' || parentComponentInstance.type === 'TreeGrid') { - domElement = controlCreatorService.createGridFieldBySchemaFeild(bindingTarget, bindingTarget.bindingPath, - parentComponentInstance.component.fieldEditable, DgControl.GridField.type, 'Farris', controlType); - - // 因为列表比较特殊,不走统一的容器类添加逻辑,这里单独将新建列添加到grid中 - parentComponentInstance.component.fields.push(domElement); - - } else { - // 创建输入类控件 - const formComponent = this.domService.getComponentByVMId(viewModelId); - const formComponentTypeName = formComponent ? formComponent.componentType : 'form-col-4'; - - domElement = controlCreatorService.createControlBySchemaFeild( - bindingTarget, formComponentTypeName, controlType, parentComponentInstance.componentId); - } - - // 同步viewModel Fields:因为在绑定编辑器里已经添加到dgViewModel了,但是没有分组信息,所以这里先删除,再重新添加 - const dgViewModel = this.designViewModelService.getDgViewModel(viewModelId); - dgViewModel.removeField([bindingSourceContext.entityFieldNode.id]); - dgViewModel.addField(bindingSourceContext.designViewModelField); - if (controlType) { - dgViewModel.changeField(bindingSourceContext.entityFieldNode.id, { editor: { $type: controlType } }); - } - - return domElement; - } - /** - * 根据变量创建控件(变量只能创建卡片区域的控件,不支持DataGrid) - * @param componentResolveContext 上下文 - */ - private resolveControlSchemaByVariableField(componentResolveContext: ComponentResolveContext) { - const { controlType, bindingSourceContext, parentComponentInstance } = componentResolveContext; - const viewModelId = parentComponentInstance.viewModelId; - - const controlCreatorService = this.designerHostSettingServ.controlCreatorService; - const bindingTarget = bindingSourceContext.variableFieldNode; - - const formComponent = this.domService.getComponentByVMId(viewModelId); - const formComponentTypeName = formComponent ? formComponent.componentType : 'form-col-4'; - - const domElement = controlCreatorService.createControlByVariable( - bindingTarget, formComponentTypeName, controlType, parentComponentInstance.componentId); - - const viewModelField = { - type: FormBindingType.Variable, - id: bindingTarget.id, - fieldName: bindingTarget.code, - groupId: bindingTarget.groupId || '', - groupName: bindingTarget.groupName || '' - }; - this.domService.deleteViewModelFieldById(viewModelId, bindingTarget.id); - this.domService.addViewModelField(viewModelId, viewModelField); - - return domElement; - } - /** - * 根据实体创建组件 - * @param componentResolveContext 上下文 - */ - public resolveComponentSchemaByEntity(componentResolveContext: ComponentResolveContext) { - const { bindingSourceContext, parentComponentInstance } = componentResolveContext; - - const componentNode = bindingSourceContext.componentNode; - const componentRefNode = bindingSourceContext.componentRefNode; - const viewModelNode = bindingSourceContext.viewModelNode; - const parentContainer = this.domService.domDgMap.get(parentComponentInstance.id); - if (!parentContainer.contents) { - parentContainer.contents = []; - } - // 插入component和viewmodel节点 - this.domService.addViewModel(viewModelNode); - this.domService.addComponent(componentNode); - - // 将子组件追加到options中 - if (parentComponentInstance.options && parentComponentInstance.options.childComponents) { - parentComponentInstance.options.childComponents.push(componentNode); - } - - // 父容器增加新增 删除按钮 - this.appendAddDeleteBtnToParentContainer(componentResolveContext); - - this.designViewModelService.assembleDesignViewModel(); - - return componentRefNode; - } - - /** - * 触发展示实体绑定窗口 - * @param componentResolveContext 拖拽上下文 - */ - public triggerBindingEntity(componentResolveContext: ComponentResolveContext): Observable { - const bindingSourceResult = new Subject(); - - const { bindingTargetId, allowedEntityLevel, controlType, needExcludeDisplayedFields, bindingTargetInSidebar } = componentResolveContext; - - const componentBindingSourceContext: ComponentBindingSourceContext = { bindingType: 'entity' }; - const editorComponentFactory = this.componentFactoryResolver.resolveComponentFactory(InnerComponentCreatorComponent); - const editorComponentFactoryRef = editorComponentFactory.create(this.injector); - editorComponentFactoryRef.instance.componentType = controlType; - editorComponentFactoryRef.instance.fixedEntityId = bindingTargetId; - editorComponentFactoryRef.instance.allowedEntityLevel = allowedEntityLevel; - editorComponentFactoryRef.instance.needExcludeDisplayedFields = needExcludeDisplayedFields; - editorComponentFactoryRef.instance.bindingTargetInSidebar = bindingTargetInSidebar; - - const modalConfig = { - title: '添加组件', - width: 800, - height: 530, - showButtons: true, - showMaxButton: true, - buttons: editorComponentFactoryRef.instance.btns - }; - switch (controlType) { - case 'FileUploadPreview': { - modalConfig.title = '添加附件'; - modalConfig.width = 520; - modalConfig.height = 340; - modalConfig.showMaxButton = false; - editorComponentFactoryRef.instance.needExcludeDisplayedEntity = true; - break; - } - case 'ListView': { - modalConfig.title = '添加列表'; - modalConfig.width = 520; - modalConfig.height = 340; - modalConfig.showMaxButton = false; - break; - } - case 'DataGrid': { - modalConfig.title = '添加表格'; - break; - } - case 'Form': { - modalConfig.title = '添加卡片'; - break; - } - default: { - if (controlType && controlType.startsWith('form-col-')) { - modalConfig.title = '添加卡片'; - } - } - - } - - const entitySelectorDialog = this.modalService.show(editorComponentFactoryRef, modalConfig); - editorComponentFactoryRef.instance.cancel.subscribe(() => { - entitySelectorDialog.close(); - // 结束 - bindingSourceResult.next(undefined); - }); - editorComponentFactoryRef.instance.save.subscribe((buildInfo: ComponentBuildInfo) => { - entitySelectorDialog.close(); - - buildInfo.parentContainerType = componentResolveContext.parentComponentInstance && componentResolveContext.parentComponentInstance.type; - const componentBindingResult = this.resolveComponentBuildInfo(buildInfo); - componentBindingSourceContext.componentNode = componentBindingResult.componentNode; - componentBindingSourceContext.componentRefNode = componentBindingResult.componentRefNode; - componentBindingSourceContext.viewModelNode = componentBindingResult.viewModelNode; - bindingSourceResult.next(componentBindingSourceContext); - }); - - return bindingSourceResult; - } - - /** - * 组装Component、ViewModel ComponentRef结构 - * @param buildInfo 组件构造信息 - */ - public resolveComponentBuildInfo(buildInfo: ComponentBuildInfo): { - viewModelNode: any; - componentNode: any; - componentRefNode: any; - } { - - const componentCreatorService = new ComponentCreatorService(this.designerHostSettingServ, this.domService); - const componentRefNode = componentCreatorService.createComponentRefNode(buildInfo); - - const componentNode = componentCreatorService.createComponentNode(buildInfo); - - const viewModelNode = componentCreatorService.createViewModeNode(buildInfo); - - return { viewModelNode, componentNode, componentRefNode }; - } - - /** - * 获取控件拖拽后的分组信息,以便于后续记录到视图模型 - * @param parentComponentInstance 拖拽目标组件的实例 - */ - public getFieldGroupInfo(parentComponentInstance: FarrisDesignBaseComponent) { - let groupId: string; - let groupName: string; - if (parentComponentInstance.type === DgControl.FieldSet.type) { - groupId = parentComponentInstance.component.id; - groupName = parentComponentInstance.component.title; - } - return { groupId, groupName }; - } - - /** - * 拖拽DataGrid:父容器追加新增、删除按钮 - * @param componentResolveContext - */ - public appendAddDeleteBtnToParentContainer(componentResolveContext: ComponentResolveContext, parentComponentSchema?: any) { - const { bindingSourceContext, parentComponentInstance, controlType, sourceType } = componentResolveContext; - const { componentNode, viewModelNode } = bindingSourceContext; - - if (!parentComponentSchema && parentComponentInstance) { - parentComponentSchema = parentComponentInstance.component; - } - - // 限制父容器为Tab或Section - if (!parentComponentSchema || ![DgControl.Tab.type, DgControl.TabPage.type, DgControl.Section.type].includes(parentComponentSchema.type)) { - return; - } - // 限制子表 - if (viewModelNode.bindTo === '/') { - return; - } - // 限制列表或卡片 - if (componentNode.componentType !== 'dataGrid' && !componentNode.componentType.includes('form-')) { - return; - } - // 获取新增删除子表命令可用的控制器id。 - const cardControllerId = this.getAddRemoveCommandBelongedControllerId(); - if (!cardControllerId) { - return; - } - // 1、父容器添加新增删除按钮 - const vmPrefix = viewModelNode.id.replace(/-/g, '').replace(/_/g, ''); - const btnType = [DgControl.Tab.type, DgControl.TabPage.type].includes(parentComponentSchema.type) ? 'TabToolbarItem' : 'SectionToolbarItem'; - const btns = [{ - id: `${componentNode.id}-button-add`, - type: btnType, - title: '新增', - disable: "!viewModel.stateMachine['canAddDetail']", - appearance: { - class: 'btn btn-secondary f-btn-ml' - }, - visible: true, - click: `root-viewModel.${viewModelNode.id}.${vmPrefix}AddItem1` - }, - { - id: `${componentNode.id}-button-remove`, - type: btnType, - title: '删除', - disable: "!viewModel.stateMachine['canRemoveDetail']", - appearance: { - class: "btn btn-secondary f-btn-ml" - }, - visible: true, - click: `root-viewModel.${viewModelNode.id}.${vmPrefix}RemoveItem1` - }]; - // let parentComponentSchema = parentComponentInstance.component; - if (parentComponentInstance.type === DgControl.Tab.type && parentComponentSchema && parentComponentSchema.contents && parentComponentSchema.contents.length) { - parentComponentSchema = parentComponentSchema.contents.find(tabPage => tabPage.id === parentComponentInstance.selectedTabPageId); - } - if (!parentComponentSchema) { - return; - } - if (!parentComponentSchema.toolbar) { - parentComponentSchema.toolbar = { - type: [DgControl.Tab.type, DgControl.TabPage.type].includes(parentComponentSchema.type) ? 'TabToolbar' : 'SectionToolbar', - id: `${parentComponentSchema.id}_toolbar`, - position: 'inHead', - contents: [] - }; - } - if (!parentComponentSchema.toolbar.contents) { - parentComponentSchema.toolbar.contents = []; - } - parentComponentSchema.toolbar.contents = parentComponentSchema.toolbar.contents.concat(btns); - - // 2、视图模型增加新增删除命令 - const idService = this.injector.get(IdService); - const addCommandId = idService.generate(); - const deleteCommandId = idService.generate(); - viewModelNode.commands.push( - { - id: addCommandId, - code: `${vmPrefix}AddItem1`, - name: '增加一条子表数据1', - params: [], - handlerName: 'AddItem', - cmpId: cardControllerId, - shortcut: {}, - extensions: [] - }, - { - id: deleteCommandId, - code: `${vmPrefix}RemoveItem1`, - name: '删除一条子表数据1', - params: [ - { - name: 'id', - shownName: '待删除子表数据的标识', - value: `{DATA~/#{${componentNode.id}}${viewModelNode.bindTo}/id}` - } - ], - handlerName: 'RemoveItem', - cmpId: cardControllerId, - shortcut: {}, - extensions: [] - } - ); - - - // 3、记录构件命令 - const webCmds = this.domService.getWebCmds(); - let cardCmd = webCmds.find(webCmd => webCmd.id === cardControllerId); - if (!cardCmd) { - cardCmd = { - id: cardControllerId, - path: '/projects/packages/Inspur.GS.Gsp.Web.WebCmp/webcmd', - name: 'CardController.webcmd', - refedHandlers: [] - }; - webCmds.push(cardCmd); - } - - cardCmd.refedHandlers.push( - { - host: addCommandId, - handler: 'AddItem' - }, - { - host: deleteCommandId, - handler: 'RemoveItem' - } - ); - } - - /** - * 获取新增删除子表命令可用的控制器id。 - */ - private getAddRemoveCommandBelongedControllerId(): string { - const webCmds = this.domService.getWebCmds(); - // 卡片控制器 / 树卡控制器 / 高级列卡控制器 - const optionalControllerId = [ - '8172a979-2c80-4637-ace7-b13074d3f393', - '8fe977a1-2b32-4f0f-a6b3-2657c4d03574', - '45be24f9-c1f7-44f7-b447-fe2ada458a61' - ]; - const availableController = webCmds.find(cmd => optionalControllerId.includes(cmd.id)); - - if (availableController) { - return availableController.id; - } - } - - private getDisplayedFieldsMapBySelectedEntity(componentResolveContext: ComponentResolveContext) { - const displayedFieldsMap = new Map(); - const { bindingTargetId, parentComponentInstance } = componentResolveContext; - const targetViewModel = this.domService.getViewModelById(parentComponentInstance.viewModelId); - const targetEntityInfo = this.schemaService.getTableInfoByViewModelId(targetViewModel.id); - const targetComponent = this.domService.getComponentByVMId(targetViewModel.id); - if (!targetEntityInfo || !targetComponent) { - return displayedFieldsMap; - } - /** 当前组件是否在侧边栏中 */ - const targetComponentInSidebar = this.checkComponentIfInSidebar(targetComponent.id); - - // 根组件和table组件内的输入控件与form内不能重复 - let targetCmpType = targetComponent.componentType; - if (targetCmpType === 'Frame' || targetCmpType === 'table' || (targetCmpType && targetCmpType.startsWith('form'))) { - targetCmpType = 'form'; - } - this.domService.viewmodels.forEach(viewModel => { - if (!viewModel.fields || viewModel.fields.length === 0) { - return; - } - const componentNode = this.domService.getComponentByVMId(viewModel.id); - const entityInfo = this.schemaService.getTableInfoByViewModelId(viewModel.id); - let sourceCmpType = componentNode.componentType; - if (sourceCmpType === 'Frame' || sourceCmpType === 'table' || (sourceCmpType && sourceCmpType.startsWith('form'))) { - sourceCmpType = 'form'; - } - // 绑定同一个实体,并且是同类型的组件(form类、dataGrid类...) - if (sourceCmpType !== targetCmpType || entityInfo.id !== targetEntityInfo.id) { - return; - } - /** 组件是否在侧边栏中 */ - const componentInSidebar = this.checkComponentIfInSidebar(componentNode.id); - - // 若当前组件在侧边栏中,那么只收集同样在侧边栏中的字段。 - if (targetComponentInSidebar && componentInSidebar) { - viewModel.fields.forEach(field => { - displayedFieldsMap.set(field.id, true); - }); - } - - // 若当前组件不在侧边栏中,那么只收集不在侧边栏中的字段 - if (!targetComponentInSidebar && !componentInSidebar) { - viewModel.fields.forEach(field => { - displayedFieldsMap.set(field.id, true); - }); - - } - - }); - - return displayedFieldsMap; - } - - /** - * 检查卡片组件是否在侧边栏中,在侧边栏中的字段可以与非侧边栏中的字段重复。 - */ - private checkComponentIfInSidebar(cmpNodeId: string) { - - const sidebar = this.domService.selectNode(this.domService.components[0], - item => DgControl.Sidebar && item.type === DgControl.Sidebar.type && item.contents && item.contents.length && - item.contents.find(child => child.type === DgControl.ComponentRef.type && child.component === cmpNodeId)); - if (sidebar) { - return true; - } - return false; - } - - /** - * 审批意见、审批记录控件,需要绑定流程实例 - * @param domElement - * @param controlType - */ - private resolveProcessInstanceForApproval(domElement: any, controlType: string) { - if (controlType.includes('Approval') && domElement.contents && domElement.contents.length) { - - let approvalField = this.schemaService.getSchemaField('bindingPath', 'processInstance.processInstance'); - if (approvalField) { - Object.assign(domElement.contents[0], { - binding: { - type: 'Form', - field: approvalField.id, - path: 'processInstance', - }, - path: 'processInstance.processInstance', - }); - } - - } - } -} diff --git a/packages/designer/projects/designer-devkit/src/public-api.ts b/packages/designer/projects/designer-devkit/src/public-api.ts deleted file mode 100644 index 13ee70c522baab99c38ab3cb4a74df6421e59202..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/public-api.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Public API Surface of designer-devkit - */ - -export * from './lib/designer-devkit.module'; -export { DragResolveService } from './lib/services/drag-resolve.service'; -export * from './lib/property-editor/index'; -export * from './lib/components/index'; diff --git a/packages/designer/projects/designer-devkit/src/test.ts b/packages/designer/projects/designer-devkit/src/test.ts deleted file mode 100644 index e11ff1c97b82c411cff67eb2623e12fbf7004b8a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/src/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'core-js/es7/reflect'; -import 'zone.js/dist/zone'; -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/packages/designer/projects/designer-devkit/tsconfig.lib.json b/packages/designer/projects/designer-devkit/tsconfig.lib.json deleted file mode 100644 index 3fe337fcf5323bf91d023d92aa1effd9062209dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/tsconfig.lib.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "module": "es2015", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "inlineSources": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "types": [], - "lib": [ - "dom", - "es2018" - ] - }, - "angularCompilerOptions": { - "annotateForClosureCompiler": true, - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "enableResourceInlining": true - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/designer/projects/designer-devkit/tsconfig.spec.json b/packages/designer/projects/designer-devkit/tsconfig.spec.json deleted file mode 100644 index 16da33db072ce34e8607114c6c705bed73936724..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/packages/designer/projects/designer-devkit/tslint.json b/packages/designer/projects/designer-devkit/tslint.json deleted file mode 100644 index 124133f8499a773c98b161fbc21122698deb6282..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-devkit/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] - } -} diff --git a/packages/designer/projects/designer-element/README.md b/packages/designer/projects/designer-element/README.md deleted file mode 100644 index dcf84a5623d05ec0944995196cbd5f7b137e54a0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DesignerElement - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0. - -## Code scaffolding - -Run `ng generate component component-name --project designer-element` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project designer-element`. -> Note: Don't forget to add `--project designer-element` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `ng build designer-element` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `ng build designer-element`, go to the dist folder `cd dist/designer-element` and run `npm publish`. - -## Running unit tests - -Run `ng test designer-element` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/packages/designer/projects/designer-element/karma.conf.js b/packages/designer/projects/designer-element/karma.conf.js deleted file mode 100644 index 3334664a90b6325a5794a524297258a9d5626f16..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../coverage/designer-element'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/packages/designer/projects/designer-element/ng-package.json b/packages/designer/projects/designer-element/ng-package.json deleted file mode 100644 index 21eef4a7573dc0f226571be67ef3106b36a69e95..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/designer-element", - "lib": { - "entryFile": "src/public-api.ts" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-element/package.json b/packages/designer/projects/designer-element/package.json deleted file mode 100644 index 483b3fb1f10cfe46ae57f205fc322270d8729312..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@farris/designer-element", - "version": "0.0.1", - "peerDependencies": { - "@angular/common": "^7.2.0", - "@angular/core": "^7.2.0", - "@farris/designer-dragula": "0.0.2", - "@farris/ui-treetable": "^0.5.3" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-element/src/lib/base-component/component.ts b/packages/designer/projects/designer-element/src/lib/base-component/component.ts deleted file mode 100644 index 3b6121d27bb01d3c6bf48752a792f39cc62a2ebb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/base-component/component.ts +++ /dev/null @@ -1,840 +0,0 @@ -import { RowNode, TreeNode } from '@farris/ui-treetable'; -import { cloneDeep, debounce, defaults, merge } from 'lodash-es'; -import { BuilderHTMLElement } from '../entity/builder-element'; -import { ComponentSchema } from '../entity/builder-schema'; -import { ComponentCustomToolbarConfig, IControlService } from '../entity/control-entity'; -import { FarrisDesignBaseElement } from './element'; - -/** - * UI控件基类 - */ -export class FarrisDesignBaseComponent extends FarrisDesignBaseElement { - element: HTMLElement; - /** 组件 JSON schema */ - public component: ComponentSchema = null; - /** References to dom elements */ - refs = {} as any; - - /** 记录父级组件 */ - parent: any; - - /** 用于触发单个组件的内部刷新 */ - triggerRedraw; - - /** 是否将控件的样式应用到Component层级 */ - applyClassToComponent = true; - - /** 控件所属组件id */ - componentId: string; - /** 控件所属视图模型 id */ - viewModelId: string; - - /** 控件类型 */ - type: string; - - // 控件所属分类 - category: string; - - /** 控件自定义图标按钮 */ - customToolbarConfigs: ComponentCustomToolbarConfig[]; - - showName: string; - parentPathName: string; - - /** 组件在拖拽时是否需要将所属的Component一起拖拽,用于Form、DataGrid、ListView等控件的拖拽 */ - triggerBelongedComponentToMoveWhenMoved = false; - - /** 是否可以选中 */ - checkable = true; - - /** 控件内部的滚动区域id */ - scrollElementId = null; - - - - /** 组件默认schema元数据 */ - static schema(sources?: any) { - return merge( - {}, sources || {}); - } - - /** 返回组件JSON schema数据 */ - getSchema() { - return this.component; - } - - /** 组件默认schema元数据 */ - getDefaultSchema() { - return FarrisDesignBaseComponent.schema(); - } - - /** - * 合并组件JSON schema数据,可以用于控件添加新属性的场景。 - * @param component 控件实际JSON schema数据 - */ - mergeSchema(component = {}) { - // return defaultsDeep(component, this.getDefaultSchema()); - return defaults(component, cloneDeep(this.getDefaultSchema())); - } - /** - * key值指向组件id - */ - get key() { - return this.component.id; - } - - - /** - * Initialize a new component - * @param component The component JSON you wish to initialize. - * @param options The options for this component. - */ - constructor(component: any, options: any) { - super(Object.assign({}, options || {})); - - // 组件自带的id覆盖掉随机生成的id - if (component && component.id) { - this.id = component.id; - } - - this.component = this.mergeSchema(component || {}); - - this.type = this.component.type; - - this.parent = this.options.parent; - - this.triggerRedraw = debounce(this.redraw.bind(this), 100); - - // 这个判断不能少,否则在拖拽调整控件时会在新容器中创建两次component - if (!this.options.skipInit) { - this.init(); - } - - } - - - init() { } - - rebuild(): Promise { - this.destroy(); - - // 收集组件实例 - this.init(); - - // 渲染表单 - return this.redraw(); - } - - redraw(): Promise { - // Don't bother if we have not built yet. - if (!this.element || !this.element.parentNode) { - // Return a non-resolving promise. - return Promise.resolve(); - } - this.detach(); - this.emit('redraw'); - - // 将拖拽的外部控件DOM结构替换为dragcomponent相关结构,此处不可删 - const parent = this.element.parentNode; - const index = Array.prototype.indexOf.call(parent.children, this.element); - this.element.outerHTML = this.sanitize(this.render()); - this.element = parent.children[index] as HTMLElement; - - this.setPositionOfBtnGroup(); - return this.attach(this.element); - } - - render(children: string = `Unknown component: ${this.component.type}`): string { - return this.renderTemplate('component', { - visible: true, - id: this.id, - classes: this.getClassName(), - styles: this.getComponentStyles(), - children, - canMove: this.checkCanMoveComponent(), - canSelectParent: this.checkCanSelectParentComponent(), - canDelete: this.checkCanDeleteComponent(), - attributes: this.assembleComponentAttributes() - }); - } - - /** - * 渲染模板html - * @param controlType 控件类型 - * @param data 渲染数据 - */ - renderTemplate(controlType: string, data: any = {}) { - const mode = ['form']; - // 记录组件JSON schema - data.component = this.component; - // 记录组件实例 - data.self = this; - - data.label = this.labelInfo; - data.id = data.id || this.id; - - const names = [ - `${controlType}-${this.component.type}-${this.key}`, - `${controlType}-${this.component.type}`, - `${controlType}-${this.key}`, - `${controlType}`, - ]; - - const hookName = `${controlType.charAt(0).toUpperCase() + controlType.substring(1, controlType.length)}`; - - const templateResult = this.interpolate(this.getTemplate(names, mode), data); - return this.hook( - `render${hookName}`, - templateResult, - data, - mode - ); - - } - - /** - * 执行控件模板引擎 - * @param names 控件类型 - * @param modes 渲染模式 - */ - getTemplate(names: string[], modes: string[]) { - modes = Array.isArray(modes) ? modes : [modes]; - names = Array.isArray(names) ? names : [names]; - - if (!modes.includes('form')) { - modes.push('form'); - } - - let result = null; - - // const frameworkTemplates = Templates.current; - const frameworkTemplates = this.getAllUiTemplates() || []; - result = this.checkTemplate(frameworkTemplates, names, modes); - if (result) { - return result; - } - } - /** - * 获取ui中定义的控件类型,一直向上找到顶层webform-builder类 - */ - getAllUiTemplates() { - if (this.parent) { - return this.parent.getAllUiTemplates(); - } - - return {}; - } - - /** - * 获取需要添加到Component层级的属性 - */ - getComponentAttributes(): { [attr: string]: string } { - return null; - } - - /** - * 将组件定义的属性组装为字符串 - */ - private assembleComponentAttributes() { - const attributesObject = this.getComponentAttributes(); - if (!attributesObject) { - return ''; - } - - let attrStr = ''; - Object.keys(attributesObject).forEach(attrKey => { - attrStr += ` ${attrKey}='${attributesObject[attrKey]}'`; - }); - return attrStr; - } - /** - * 获取控件对应的模板引擎 - * @param templates 当前系统支持的所有模板引擎 - * @param names 控件类型 - * @param modes 渲染模式 - */ - checkTemplate(templates: any, names: string[], modes: string[]) { - for (const name of names) { - - const templatesByName = templates[name]; - if (templatesByName) { - const templateByMode = this.checkTemplateMode(templatesByName, modes); - if (templateByMode) { - return templateByMode; - } - } - } - return null; - } - - checkTemplateMode(templatesByName: any, modes: string[]) { - for (const mode of modes) { - const templateByMode = templatesByName[mode]; - // 此处与formio不一样,经过编译后的方法在default里 - if (templateByMode) { - return templateByMode.default ? templateByMode.default : templateByMode; - } - } - return null; - } - - - destroy() { - super.destroy(); - this.detach(); - } - - clear() { - this.detach(); - this.empty(this.getElement()); - } - /** - * Remove all event handlers. - */ - detach() { - this.refs = {}; - this.removeEventListeners(); - - } - - /** - * 将生成的html注册到dom中 - * @param element dom节点 - * @param content html字符串 - * @param forceSanitize 是否安全转换 - */ - setContent(element: HTMLElement, content: string, forceSanitize: boolean = false) { - if (element instanceof HTMLElement) { - element.innerHTML = this.sanitize(content, forceSanitize); - return true; - } - return false; - } - - /** - * 返回安全的html - * @param dirty 原html结构 - * @param forceSanitize 是否强制转换 - */ - sanitize(dirty: string, forceSanitize?: boolean) { - - // 使用DOMPurify安全显示DOM,防网络攻击。这里暂时不用 - // return dompurify.sanitize(string, sanitizeOptions); - - return dirty; - } - - /** - * 记录控件类型和DOM节点的映射 - */ - loadRefs(element, refs) { - for (const ref in refs) { - if (refs[ref] === 'single') { - this.refs[ref] = element.querySelector(`[ref='${ref}']`); - } else { - this.refs[ref] = element.querySelectorAll(`[ref='${ref}']`); - } - } - } - - - /** 可以用于输入控件的label,暂时保留 */ - get labelInfo() { - const label: any = {}; - label.className = ''; - return label; - } - - /** - * 挂载事件,为组件添加事件处理函数 - * @param element 组件对应的DOM节点 - */ - attach(element: BuilderHTMLElement): Promise { - - this.element = element; - element.component = this; - - this.addClickEvent(element); - this.addMouseoverEvent(element) - - // Allow global attach. - this.hook('attachComponent', element, this); - - this.setComponentBasicInfoMap(); - return Promise.resolve(); - } - - - // Allow componets to notify when ready. - get ready(): Promise { - return Promise.resolve(); - } - - /** - * 获取组件外层DOM元素 - */ - getElement(): HTMLElement { - return this.element; - } - - removeEventListeners() { - super.removeEventListeners(); - } - - getClassName() { - let className = ''; - className += ` farris-component farris-component-${this.component.type} `; - - // 包含操作按钮区域,则增加相对位置样式----- - if (this.checkCanMoveComponent() || this.checkCanDeleteComponent() || (this.customToolbarConfigs && this.customToolbarConfigs.length)) { - className += ' position-relative'; - } - - // 某些控件的样式不能设置在component层级,需要设置在内部 - if (this.applyClassToComponent) { - if (this.component.appearance && this.component.appearance.class) { - className = this.component.appearance.class + ' ' + className; - } - } - - // 用于重新渲染组件时,保持选中样式 - if (this.element && this.element.className && this.element.className.includes('dgComponentSelected')) { - className += ' dgComponentSelected'; - } - return className; - } - /** - * 获取组件style样式:组件DOM中定义的样式+组件默认样式 - */ - private getComponentStyles() { - let customStyles = ''; - if (this.component.appearance && this.component.appearance.style) { - customStyles = this.component.appearance.style || ''; - } - if (this.component.size && this.component.size.height) { - customStyles += ';height:' + this.component.size.height + 'px;'; - } - if (this.component.size && this.component.size.width) { - customStyles += ';width:' + this.component.size.width + 'px;'; - } - const innerStyle = this.getStyles(); - - return customStyles ? customStyles + ';' + innerStyle : innerStyle; - } - - /** 组件默认样式 */ - getStyles() { - return ''; - } - /** - * 增加组件点击事件 - * @param element DOM 元素 - */ - private addClickEvent(element: HTMLElement) { - this.checkable && this.addEventListener(element, 'click', this.onComponentClicked.bind(this)); - } - - /** - * 点击事件 - * @param e event - */ - onComponentClicked(e?: PointerEvent) { - if (e) { - e.preventDefault(); - e.stopPropagation(); - } - - if (this.element) { - const currentSelectedElements = document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf; - - // 重复点击 - const duplicateClick = currentSelectedElements && currentSelectedElements.length === 1 && currentSelectedElements[0] === this.element; - if (!duplicateClick) { - for (const element of Array.from(currentSelectedElements)) { - element.classList.remove('dgComponentSelected'); - if (element.componentInstance && element.componentInstance.afterComponentCancelClicked) { - element.componentInstance.afterComponentCancelClicked(e); - } - } - this.element.classList.add('dgComponentSelected'); - - if (this.afterComponentClicked) { - this.afterComponentClicked(e); - } - } - - this.setPositionOfBtnGroup(); - - } - - this.emit('componentClicked', { e, componentInstance: this }); - } - - addMouseoverEvent(element: BuilderHTMLElement) { - if (!this.checkMouseOverActive()) { - return - } - const editorDiv = document.body.querySelector('.editorDiv') - this.addEventListener(editorDiv, 'mouseover', (e: any) => { - if (element.contains(e.toElement)) { - const currentSelectedElements = document.getElementsByClassName('dgComponentHover') as HTMLCollectionOf; - for (const element of Array.from(currentSelectedElements)) { - element.classList.remove('dgComponentHover'); - } - element.classList.add('dgComponentHover'); - } else { - element.classList.remove('dgComponentHover'); - } - }); - } - - /** - * 由外部触发组件内部的点击事件,用于在IDE设计器中点击控件树节点,进而触发组件内部某部分元素的点击 - */ - triggerComponentInsideClick(node?: TreeNode) { - - } - /** - * 由外部触发组件的点击事件,用于在IDE设计器中点击控件树节点,进而触发组件点击的场景 - */ - triggerComponentClick(e?: PointerEvent) { - this.onComponentClicked(e); - } - /** - * 组件被点击后执行方法,各组件可以实现此方法 - */ - afterComponentClicked(e?: PointerEvent) { - - } - /** - * 组件被取消点击后执行方法,各组件可以实现此方法 - */ - afterComponentCancelClicked(e?: PointerEvent) { - - } - - /** - * 校验组件是否支持移动 - */ - checkCanMoveComponent(): boolean { - // 顶层form节点不能移动 - if (!this.key && this.type === 'form') { - return false; - } - - return true; - } - - /** - * 校验组件是否支持选中父级 - */ - checkCanSelectParentComponent(): boolean { - return false; - } - - /** - * 校验组件是否支持删除 - */ - checkCanDeleteComponent() { - // 顶层form节点不能删除 - if (!this.key && this.type === 'form') { - return false; - } - - return true; - } - - /** - * 校验组件是否激活 mouseover 事件 - */ - checkMouseOverActive(): boolean { - return false; - } - - /** - * 控件可以拖拽到的最外层容器,用于限制控件向外层容器拖拽的范围。不写则不限制 - */ - getDragScopeElement(): HTMLElement { - return; - } - - /** 组装控件右键菜单的方法 */ - resolveContextMenuConfig(rowNode: RowNode, parentRowNode?: RowNode) { - return []; - - } - - /** - * 监听滚动事件,重置操作按钮位置 - * @param element HTMLElement - */ - bindingScrollEvent(element: HTMLElement) { - // 一般滚动条是出现在组件层级上的 - this.setPositionOfBtnGroupWhenScroll(element); - - // 有些场景下滚动条出现在drag-container层级 - const dragContainerEle = element.querySelector('.drag-container') as HTMLElement; - if (dragContainerEle) { - this.setPositionOfBtnGroupWhenScroll(dragContainerEle); - } - - } - /** - * 滚动滚动条时计算工具栏位置 - * @param element 监听滚动的元素 - */ - private setPositionOfBtnGroupWhenScroll(element: HTMLElement) { - this.addEventListener(element, 'scroll', (e: Event) => { - - this.recordScrollContainer(element); - - const selectDom = (e.target as any).querySelector('.dgComponentSelected'); - if (selectDom) { - // 获取选中控件所在的滚动区域 - const scrollParentEle = this.getScrollParentElementWhenScroll(selectDom && selectDom.component, element); - - const toolbar = selectDom.querySelector('.component-btn-group'); - - // 判断DOM 是否在可视区域内 - if (this.isElementInViewport(selectDom, scrollParentEle)) { - if (toolbar) { - toolbar.style.display = ''; - const toolbarRect = toolbar.getBoundingClientRect(); - if (!(toolbarRect.top === 0 && toolbarRect.left === 0)) { - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - - divPanel.style.top = toolbarRect.top + 'px'; - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - } - - } - } else { - if (toolbar) { - toolbar.style.display = 'none'; - } - } - } - }); - } - /** - * 滚动滚动条时,计算选中控件所在的直接滚动区域 - */ - private getScrollParentElementWhenScroll(cmp: FarrisDesignBaseComponent, currentScrollContainer: HTMLElement) { - if (!cmp || !window['scrollContainerList']) { - return currentScrollContainer; - } - - const scrollContainerArray = Array.from(window['scrollContainerList']); - if (!scrollContainerArray.length) { - return currentScrollContainer; - } - // 1、若当前只有一个滚动区域:返回当前滚动容器 - if (scrollContainerArray.length === 1) { - return currentScrollContainer; - - } else { - // 2、若当前有多个滚动区域:需要定位到当前点击的控件是直接属于哪个滚动区域 - if (cmp && cmp.element && cmp.scrollElementId) { - if (cmp.element.getAttribute('id') === cmp.scrollElementId) { - return cmp.element; - } else { - return cmp.element.querySelector(`[id=${cmp.scrollElementId}]`); - } - } - if (cmp && cmp.parent) { - return this.getScrollParentElementWhenScroll(cmp.parent, currentScrollContainer); - } - } - - } - /** - * 判断DOM 是否在可视区域内 - * @param el 元素 - * @param containerEl 容器 - */ - private isElementInViewport(el, containerEl) { - const container = containerEl.getBoundingClientRect(); - const box = el.getBoundingClientRect(); - const top = box.top >= container.top; - const bottom = box.top < container.bottom; - return (top && bottom); - } - - - /** - * 点击控件时计算控件工具栏位置 - */ - setPositionOfBtnGroup() { - const toolbar = this.element.querySelector('.component-btn-group') as HTMLElement; - - if (toolbar) { - - // 判断控件是否在可视区域 - let isInView = true; - const scrollParentEle = this.getScrollParentElementWhenClick(this); - if (scrollParentEle) { - isInView = this.isElementInViewport(this.element, scrollParentEle); - } - if (!isInView) { - toolbar.style.display = 'none'; - return; - } - - // 计算位置 - toolbar.style.display = ''; - const toolbarRect = toolbar.getBoundingClientRect(); - - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - - divPanel.style.top = toolbarRect.top + 'px'; - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - } - } - - /** - * 点击控件时,定位控件所在的直接滚动区域。用于判断控件当前是否在可视区域内部,从而判断操作按钮是否显示。 - */ - private getScrollParentElementWhenClick(cmp: FarrisDesignBaseComponent) { - if (!window['scrollContainerList']) { - return; - } - const scrollContainerArray = Array.from(window['scrollContainerList']); - if (!scrollContainerArray.length) { - return; - } - // 1、若当前只有一个滚动区域:返回滚动区域 - if (scrollContainerArray.length === 1) { - const scrollContainerId = scrollContainerArray[0]; - const scrollContainer = document.querySelector(`[id=${scrollContainerId}]`); - - if (scrollContainer && scrollContainer.contains(cmp.element)) { - return scrollContainer; - } - - } else { - // 2、若当前有多个滚动区域:需要定位到当前点击的控件是属于哪个滚动区域 - if (cmp && cmp.element && cmp.scrollElementId) { - if (cmp.element.getAttribute('id') === cmp.scrollElementId) { - return cmp.element; - } else { - return cmp.element.querySelector(`[id=${cmp.scrollElementId}]`); - } - } - if (cmp && cmp.parent) { - return this.getScrollParentElementWhenClick(cmp.parent); - } - } - - } - /** - * 记录滚动区域 - * @param element 组件DOM节点 - */ - private recordScrollContainer(element: HTMLElement) { - if (!window['scrollContainerList']) { window['scrollContainerList'] = new Set(); } - - const id = element.getAttribute('id'); - if (!id) { - return; - } - - window['scrollContainerList'].add(id); - - this.scrollElementId = id; - } - - /** - * 设置控件id,控件基本信息(展示名称、路径)的映射关系。各控件可重写此方法。 - */ - setComponentBasicInfoMap() { - if (!this.component.id) { - return; - } - // 获取控件展示中文名称 - const showName = this.getControlShowName(); - const domService = this.options.designerHost.getService('DomService'); - if (!domService) { - return; - } - this.showName = showName; - - // 控件从根节点开始的中文路径 - this.parentPathName = this.showName; - - // 将路径信息保存到DomService,方便控件树和事件编辑获取 - domService.controlBasicInfoMap.set(this.component.id, { - showName, - parentPathName: this.parentPathName - }); - - } - /** - * 获取控件展示中文名称。包含title等属性的控件取title,不包含的取控件类型的中文名称。 - */ - getControlShowName() { - const title = this.component.text || this.component.name || this.component.title || this.component.caption || this.component.mainTitle; - if (title) { - return title; - } - - if (this.options.designerHost) { - const controlCreatorService = this.options.designerHost.getService('ControlCreatorService'); - const controlService = controlCreatorService.controlService as IControlService; - const DgControl = controlService.getDgControl(); - - - const componentTypeName = DgControl[this.component.type] && DgControl[this.component.type].name; - return componentTypeName || this.component.id; - } - } - /** - * 获取组件在表单DOM中所属的Component的实例 - * @param cmpInstance 组件实例 - */ - getBelongedComponentInstance(componentInstance: any) { - if (!componentInstance) { - return; - } - if (componentInstance.type === 'Component') { - return componentInstance; - } - const grandParent = this.getBelongedComponentInstance(componentInstance.parent); - if (grandParent) { - return grandParent; - } - - } - /** - * 计算页面中选中控件的操作按钮位置。 - * 场景:控件内部点击收折或者切换显示内容后,需要重新计算页面中下方选中控件的按钮位置 - */ - setPositionOfSelectedComponentBtnGroup() { - const selectedEle = document.querySelector('.dgComponentSelected') as HTMLElement; - if (!selectedEle) { - return; - } - const selectedEleRect = selectedEle.getBoundingClientRect(); - const elementRect = this.element.getBoundingClientRect(); - - const toolbar = selectedEle.querySelector('.component-btn-group') as HTMLElement; - if (toolbar) { - toolbar.style.display = ''; - const toolbarRect = toolbar.getBoundingClientRect(); - const isBelow = elementRect.top < selectedEleRect.top; - - // 选中控件已显示并且在基准位置的下方 - if (toolbarRect.top !== 0 && isBelow) { - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - - divPanel.style.top = toolbarRect.top + 'px'; - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - } - - } - - } -} - diff --git a/packages/designer/projects/designer-element/src/lib/base-component/element.ts b/packages/designer/projects/designer-element/src/lib/base-component/element.ts deleted file mode 100644 index 6f473b4917388e592b3a6478e83c39c605dc47bd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/base-component/element.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { forEach } from 'lodash-es'; -import { BuilderOptions } from '../entity/builder-options'; -import FarrisDesignEventEmitter from '../utils/event-emitter'; - -export class FarrisDesignBaseElement { - - /** 创建组件需要的参数,主要是存储一些组件的渲染方法 */ - public options: BuilderOptions; - - /** 创建组件时生成随机数,也可以在传入组件时指定 */ - public id: string; - - /** EventEmitter实例,方便事件的注册和发送 */ - public events: FarrisDesignEventEmitter; - - /** 存储事件列表,方便在组件销毁时将事件一同注销 */ - public eventHandlers: any[]; - - get key(): string { - return ''; - } - - constructor(options: BuilderOptions) { - - this.options = Object.assign({ - namespace: 'farris' - }, options || {}); - - this.id = `e${Math.random().toString(36).substring(7)}`; - this.eventHandlers = []; - this.events = (options && options.events) ? options.events : new FarrisDesignEventEmitter(); - } - - /** - * 生成DOM结构 - * @param allParams - * @returns html字符串 或者 HTMLElement - */ - hook(...allParams: any[]) { - const name = allParams[0]; - if (this.options && this.options.hooks && this.options.hooks[name]) { - const result = this.options.hooks[name].apply(this, Array.prototype.slice.call(allParams, 1)); - // console.log(result); - return result; - } else { - const fn = (typeof allParams[allParams.length - 1] === 'function') ? allParams[allParams.length - 1] : null; - if (fn) { - return fn(null, allParams[1]); - } else { - return allParams[1]; - } - } - } - - /** - * 解析模板结构 - * @param rawTemplate 解析方法 - * @param data 控件json数据 - */ - interpolate(rawTemplate: any, data: any) { - const evaluationData = Object.assign({ - instance: this, - self: this - }, data); - - if (typeof rawTemplate === 'function') { - try { - // console.log(evaluationData); - - const result = rawTemplate(evaluationData); - // console.log(result); - return result; - - } catch (err) { - console.warn('Error interpolating template', err, data); - return err.message; - } - } - } - - /** - * Emit a new event. - * - * @param event - The event to emit. - * @param data - The data to emit with the handler. - */ - emit(event, ...data) { - if (this.events) { - this.events.emit(`${this.options.namespace}.${event}`, data); - - } - - } - - /** - * Wrapper method to add an event listener to an HTML element. - * - * @param obj - * The DOM element to add the event to. - * @param type - * The event name to add. - * @param func - * The callback function to be executed when the listener is triggered. - * @param persistent - * If this listener should persist beyond 'destroy' commands. - */ - addEventListener(obj, type, func, persistent = false) { - if (!obj) { - return; - } - if (!persistent) { - this.eventHandlers.push({ id: this.id, obj, type, func }); - } - if ('addEventListener' in obj) { - obj.addEventListener(type, func, false); - } else if ('attachEvent' in obj) { - obj.attachEvent(`on${type}`, func); - } - - return this; - } - - - on(event, cb) { - if (!this.events) { - return; - } - const type = `${this.options.namespace}.${event}`; - - // Store the component id in the handler so that we can determine which events are for this component. - cb.id = this.id; - cb.key = this.key; - - // Register for this event. - return this.events.on(type, cb); - } - - /** - * Empty's an HTML DOM element. - * - * @param element - The element you wish to empty. - */ - empty(element) { - if (element) { - while (element.firstChild) { - element.removeChild(element.firstChild); - } - } - } - - /** - * Removes all event listeners attached to this component. - */ - destroy() { - this.removeEventListeners(); - this.removeAllEvents(); - } - /** - * 移除指定类型的事件 - * @param type - * @returns - */ - removeEventListener(type: string) { - if (!this.eventHandlers) { - return; - } - - this.eventHandlers.forEach(handler => { - if ((this.id === handler.id) && (type === handler.type) && handler.obj && handler.obj.removeEventListener) { - handler.obj.removeEventListener(handler.type, handler.func); - handler.obj.needRemove = true; - } - }); - this.eventHandlers = this.eventHandlers.filter(handler => handler.needRemove); - } - - removeEventListeners() { - this.eventHandlers.forEach(handler => { - if ((this.id === handler.id) && handler.type && handler.obj && handler.obj.removeEventListener) { - handler.obj.removeEventListener(handler.type, handler.func); - } - }); - this.eventHandlers = []; - } - - removeAllEvents(includeExternal?: any) { - forEach(this.events._events, (events, type) => { - forEach(events, (listener) => { - if (listener && (this.id === listener.id) && (includeExternal || listener.internal)) { - this.events.off(type, listener); - } - }); - }); - } -} diff --git a/packages/designer/projects/designer-element/src/lib/base-component/nested-component.ts b/packages/designer/projects/designer-element/src/lib/base-component/nested-component.ts deleted file mode 100644 index 59c64d43cdff68bab2457420b747121dab671b45..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/base-component/nested-component.ts +++ /dev/null @@ -1,339 +0,0 @@ -import { BuilderOptions } from '../entity/builder-options'; -import { FarrisDesignBaseComponent } from './component'; -import { ComponentSchema } from '../entity/builder-schema'; -import { remove, uniqBy } from 'lodash-es'; -import { BuilderHTMLElement } from '../entity/builder-element'; -import { Observable, of } from 'rxjs'; - -/** - * 嵌套类组件基类 - */ -export class FarrisDesignBaseNestedComponent extends FarrisDesignBaseComponent { - - /** 组件实例集合 */ - public components: any[]; - - /** 容器类组件中需要定义ref="nestedKey"的DOM层级,用来挂载子级组件 */ - get nestedKey() { - return `nested-${this.key}`; - } - - /** 获取子级JSON */ - getComponentContents(): ComponentSchema[] { - return this.component.contents || []; - } - - getTemplateName(): string { - return 'container'; - } - - - getDefaultSchema() { - return FarrisDesignBaseNestedComponent.schema(); - } - - getSchema() { - // const schema = omit(this.component, ['key']); - const schema = this.component; - const components = uniqBy(this.getComponents(), 'component.id'); - schema.contents = []; - components.forEach(c => { - schema.contents.push(c.getSchema()); - }); - return schema; - } - - - constructor(component: any, options: any) { - super(component, options); - } - - init() { - this.components = this.components || []; - this.addComponents(); - return super.init(); - } - - /** - * Perform an iteration over each component within this container component. - * - * @param fn - Called for each component - */ - eachComponent(fn) { - this.getComponents().forEach((component, index) => { - if (fn(component, index) === false) { - return false; - } - }); - } - - hideNestedPaddingInDesginerView() { - return false; - } - getClassName(): string { - - const className: string = super.getClassName() || ''; - - // 容器类组件增加间距 - const hidePadding = this.hideNestedPaddingInDesginerView(); - - return hidePadding ? className : className + ' farris-nested'; - } - /** - * 向组件中添加子组件 - * @param options 配置数据 - */ - addComponents(options?: BuilderOptions) { - // data = data || this.data; - options = options || this.options; - - const componentSchemas = this.hook('addComponents', this.getComponentContents(), this) || []; - // 迭代添加组件 - componentSchemas.forEach((componentSchema) => this.addComponent(componentSchema, false)); - - } - - /** - * 添加组件 - */ - addComponent(componentSchema: ComponentSchema, noAdd: boolean) { - componentSchema = this.hook('addComponent', componentSchema, noAdd); - // 创建组件 - this.createComponent(componentSchema, this.options); - } - - /** - * 创建子组件并添加到组件集合中 - * @param componentSchema JSON schema - * @param options 配置数据 - */ - createComponent(componentSchema: ComponentSchema, options: BuilderOptions, componentId?: string, viewModelId?: string): any { - if (!componentSchema) { - return; - } - options = options || this.options; - options.parent = this; - options.skipInit = true; - const comp = this.createUiComponent(componentSchema, options); - - // 存储组件所属视图模型id和组件id - comp.componentId = componentId || this.componentId; - comp.viewModelId = viewModelId || this.viewModelId; - - comp.init(); - - this.components.push(comp); - - return comp; - } - /** - * 创建组件,统一调用父级(Webform类)的创建方法 - * @param componentSchema 控件JSON 结构 - * @param options 配置参数 - */ - createUiComponent(componentSchema: any, options: any) { - if (this.parent) { - return this.parent.createUiComponent(componentSchema, options); - } - return new FarrisDesignBaseComponent(componentSchema, options); - } - getComponents() { - return this.components || []; - } - - render(children: string) { - // If already rendering, don't re-render. - if (children !== undefined) { - return super.render(children); - } else { - const result = this.renderTemplate(this.getTemplateName(), { - children: this.renderComponents(), - nestedKey: this.nestedKey, - collapsed: false, - }); - return super.render(result); - } - - } - /** - * 渲染子组件 - * @param components 子组件实例列表 - * @returns 模板字符串 - */ - renderComponents(components?: any[]) { - // 确定子组件列表 - components = components || this.getComponents(); - // 渲染子组件获得渲染结果 - const children = components.map(component => component.render()); - // 渲染组件集合模板 - return this.renderTemplate('components', { - children, - components, - }); - } - - destroy() { - this.destroyComponents(); - super.destroy(); - } - - destroyComponents() { - const components = this.getComponents().slice(); - components.forEach((comp) => this.removeComponent(comp, this.components)); - this.components = []; - } - /** - * Remove a component from the components array. - * - * @param component - The component to remove from the components. - * @param components - An array of components to remove this component from. - */ - removeComponent(component: any, components: any) { - components = components || this.components; - component.destroy(); - remove(components, { id: component.id }); - } - - - attach(element: HTMLElement): Promise { - const superPromise = super.attach(element); - - // 定位nestedKey指定的DOM元素,然后挂载子级组件 - this.loadRefs(element, { - [this.nestedKey]: 'single', - }); - - let childPromise = Promise.resolve(); - if (this.refs[this.nestedKey]) { - childPromise = this.attachComponents(this.refs[this.nestedKey]); - } - this.bindingScrollEvent(element); - - return Promise.all([ - superPromise, - childPromise, - ]); - } - - - - /** - * 添加组件集合 - * @param element html dom - */ - attachComponents(element: HTMLElement, components?: any[], container?: any): Promise { - components = components || this.components; - const childrenContents = container || this.component.contents; - - // 获取element下的子组件节点集合,即ref='component'的节点 - const childrenElements = this.hook('attachComponents', element, components, childrenContents, this); - if (!childrenElements || !childrenElements.length) { - // return (new Promise(() => { })); - return Promise.resolve() - } - - let index = 0; - const promises: Promise[] = []; - Array.prototype.slice.call(childrenElements).forEach(child => { - if (!components) { - return; - } - // 鼠标滑过时显示的右上角按钮容器(component-btn-group)有data-noattach标识 - if (!child.getAttribute('data-noattach') && components[index]) { - promises.push(components[index].attach(child)); - index++; - } - }); - return Promise.all(promises); - } - - get ready(): Promise { - return Promise.all(this.getComponents().map(component => component.ready)); - } - - clear() { - if (this.components) { - this.components.forEach(component => { - component.clear(); - }); - } - - super.clear(); - } - - detach() { - if (this.components) { - this.components.forEach(component => { - component.detach(); - }); - } - - super.detach(); - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement, sourceContainer?: BuilderHTMLElement) { - return false; - } - - /** - * 当前容器接收新创建的子控件 - * @param el 移动的源DOM结构 - */ - onAcceptNewChildElement(el: BuilderHTMLElement, targetPosition: number): Observable { - const serviceHost = this.options.designerHost; - if (serviceHost) { - const dragResolveService = serviceHost.getService('DragResolveService'); - if (dragResolveService) { - return dragResolveService.resolveComponentCreationContextByDrop(el, this, targetPosition); - } - } - return of(null); - } - - /** - * 当前容器接收新创建的子控件后事件,用于rebuild之前 - * @param componentResolveContext 控件构造信息 - */ - afterAcceptNewChildElement(componentResolveContext: any) { - - } - /** - * 移动内部控件后事件:在可视化设计器中,容器接收控件后事件 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(el: HTMLElement, soureElement?: HTMLElement) { - - } - /** - * 插入的ComponentSchema结构 - * @param componentSchema ComponentSchema - */ - onAddNewChildElement(componentSchema: ComponentSchema): number { - return -1; - } - /** - * 移动内部控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onChildElementMovedOut(el: HTMLElement) { - - } - /** - * 删除组件的回调方法 - */ - onRemoveComponent() { - if (this.components) { - this.components.forEach(component => { - if (component.onRemoveComponent) { - component.onRemoveComponent(); - } - }); - } - - } -} diff --git a/packages/designer/projects/designer-element/src/lib/builder/components/components.ts b/packages/designer/projects/designer-element/src/lib/builder/components/components.ts deleted file mode 100644 index d8abce731cca3dcc6654b332de8c90305803ee90..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/components/components.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { FarrisDesignBaseComponent } from '../../base-component/component'; -import { FarrisDesignBaseNestedComponent } from '../../base-component/nested-component'; -import { assign } from 'lodash-es'; - -export default class UIComponents { - - static components: any = {}; - - static setComponents(uiComponents) { - const baseComponents = { - FarrisDesignBaseComponent, - FarrisDesignBaseNestedComponent - }; - const allComponents = Object.assign(baseComponents, uiComponents); - assign(UIComponents.components, allComponents); - } - /** - * 根据控件schema创建组件实例 - * @param component 控件json schema - * @param options - */ - static create(component, options): any { - let comp = null; - - const fdCmp = UIComponents.components[component.type]; - - if (fdCmp && fdCmp['component']) { - comp = new fdCmp['component'](component, options); - return comp; - } - - const baseCmp = UIComponents.components.hasOwnProperty('FarrisDesignBase' + component.type); - if (baseCmp) { - if (typeof (fdCmp) === 'object') { - comp = new baseCmp['component'](component, options); - } else { - comp = new baseCmp(component, options); - } - return comp; - } - - return new FarrisDesignBaseComponent(component, options); - } - - -} diff --git a/packages/designer/projects/designer-element/src/lib/builder/designer-builder.ts b/packages/designer/projects/designer-element/src/lib/builder/designer-builder.ts deleted file mode 100644 index 2efcc0a0004c63d8cce64432ac3dade9d4faa9bf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/designer-builder.ts +++ /dev/null @@ -1,39 +0,0 @@ -import Form from './form'; -import UIComponents from './components/components'; -import { BuilderOptions } from '../entity/builder-options'; -import { ComponentSchema } from '../entity/builder-schema'; -import { IDesignerHost } from '../service/designer-host'; -import Templates from './templates/templates'; -/** - * 设计器可视化区域构造类 - */ -export class DesignerBuilder extends Form { - - /** - * 构造设计器 - * @param element 设计器父级DOM元素 - * @param builderSchema 根组件JSON Schema结构 - * @param childComponents 子组件JSON Schema集合 - */ - constructor(element: HTMLElement, builderSchema: ComponentSchema, childComponents: ComponentSchema[], uiComponents: any, designerHost: IDesignerHost) { - // 存储ui组件 - UIComponents.setComponents(uiComponents); - - // 存储ui组件模板 - const uiTemplates = {}; - if (uiComponents) { - Object.keys(uiComponents).forEach(cmpType => { - uiTemplates[cmpType] = uiComponents[cmpType].template; - }); - } - Templates.setTemplates(uiTemplates); - - // 渲染设计器 - builderSchema = builderSchema || {}; - const options: BuilderOptions = {}; - options.childComponents = childComponents || []; - options['designerHost'] = designerHost; - super(element, builderSchema, options); - } - -} diff --git a/packages/designer/projects/designer-element/src/lib/builder/form.ts b/packages/designer/projects/designer-element/src/lib/builder/form.ts deleted file mode 100644 index 3dcb76ff31ca2f52189a78370a7e6f635ae16fa3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/form.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { WebformBuilder } from './webform-builder'; -import { FarrisDesignBaseElement } from '../base-component/element'; -import { BuilderOptions } from '../entity/builder-options'; -import { ComponentSchema } from '../entity/builder-schema'; - -export default class Form extends FarrisDesignBaseElement { - - /** webFormBuilder类实例,用于外部监听表单的渲染后事件、变更事件等 */ - public instance: WebformBuilder; - - private innerForm: any = null; - - ready: Promise; - readyResolve: any; - readyReject: any; - - get form(): any { - return this.innerForm; - } - - set form(value: any) { - this.setForm(value); - } - - constructor(public element: HTMLElement, builderSchema: ComponentSchema, options: BuilderOptions) { - super(options); - this.ready = new Promise((resolve, reject) => { - this.readyResolve = resolve; - this.readyReject = reject; - }); - - if (element instanceof HTMLElement) { - this.element = element; - this.options = options || {}; - // this.options.events = this.events; - this.setForm(builderSchema).then(() => this.readyResolve(this.instance)) - .catch(this.readyReject); - } - } - - /** - * 由外部触发更新子级组件列表,用于新增ComponentRef的场景 - * @param builderSchema 表单完整的DOM JSON - * @param childComponents 子Component - */ - updateChildComponents(builderSchema: ComponentSchema, childComponents: ComponentSchema[]) { - // 更新根组件schema - if (builderSchema) { - // this.instance.webform.component = builderSchema; - this.instance.webform._form = builderSchema; - } - // 更新子级组件 - if (childComponents) { - this.options.childComponents = childComponents || []; - this.instance.webform.options.childComponents = childComponents || []; - } - } - - setForm(formSchema: any): any { - - // 实际会调用子类DesignerBuilder的create方法,创建WebFormBuilder实例 - this.instance = this.instance || new WebformBuilder(this.element, this.options); - - // 为WebFormBuilder.form赋值会触发WebFormBuilder.setForm方法 - this.instance.form = this.innerForm = formSchema; - - const result = this.instance.ready; - - - // a redraw has occurred so save off the new element in case of a setDisplay causing a rebuild. - return result.then(() => { - this.element = this.instance.element; - return this.instance; - }); - } - - destroy(): void { - super.destroy(); - } - - -} \ No newline at end of file diff --git a/packages/designer/projects/designer-element/src/lib/builder/index.ts b/packages/designer/projects/designer-element/src/lib/builder/index.ts deleted file mode 100644 index 62e790bf7b4bcdfbe3689978781538fd4a957f1f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/index.ts +++ /dev/null @@ -1,2 +0,0 @@ - -export { DesignerBuilder } from './designer-builder'; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/form.ts deleted file mode 100644 index fac187170de9c81f7d55ec3466902a4a2f75fca4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/form.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (ctx: any) => { - return `${ctx.html}`; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-component/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/form.ts deleted file mode 100644 index bf4d14852617b68c92dfb24359fa69b38c885a94..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/form.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (ctx: any) => { - return `${ctx.html}`; -}; - - diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-components/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/form.ts deleted file mode 100644 index 0cec38b0d5fdc0cfa8cfbdbd6d51da3b664e9da7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/form.ts +++ /dev/null @@ -1,11 +0,0 @@ - - - -export default (ctx: any) => { - return ` - - `; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder-placeholder/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/form.ts deleted file mode 100644 index d3503bca45322b579f2676479fc68ee85e24c374..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
- ${ctx.form} -
- `; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/builder/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/form.ts deleted file mode 100644 index 00d33d66f2c3c61f2b52e1f4f5e4f82c08ddf166..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/form.ts +++ /dev/null @@ -1,65 +0,0 @@ - -export default (ctx: any) => { - - let iconPanel = ''; - let movePanel = ''; - let deletePanel = ''; - let selectPanel = ''; - let custonPanel = ''; - - // 删除按钮 - if (ctx.canDelete) { - deletePanel = ` -
- -
`; - } - // 移动按钮 - if (ctx.canMove) { - movePanel = ` -
- -
`; - } - - // 父级按钮 - if (ctx.canSelectParent) { - selectPanel = ` -
- -
`; - } - - // 自定义按钮 - if (ctx.instance.customToolbarConfigs && ctx.instance.customToolbarConfigs.length) { - ctx.instance.customToolbarConfigs.forEach(function (btnConfig, index) { - custonPanel += ` -
- -
`; - }); - } - iconPanel = ` -
-
- ${deletePanel} - ${movePanel} - ${selectPanel} - ${custonPanel} -
-
`; - - - // const styles = ctx.styles ? (' style=' + ctx.styles) : ''; - - return ` -
- ${iconPanel} - ${ctx.children} -
- `; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/component/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/form.ts deleted file mode 100644 index 7f518becf1ef1047b107a38b170a44b6b8abdfb6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/form.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export default (ctx: any) => { - return `${ctx.children.join('')}`; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/components/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/index.ts deleted file mode 100644 index e20e26e2da78a3672862dbc2fc9fde4c0764a966..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import builder from './builder'; -import builderComponent from './builder-component'; -import builderComponents from './builder-components'; -import component from './component'; -import components from './components'; -import webform from './webform'; -import builderPlaceholder from './builder-placeholder'; - -export default { - builderComponent, - builderComponents, - component, - components, - webform, - builderPlaceholder, - builder -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/form.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/form.ts deleted file mode 100644 index c720f234dc635c39d5cd623f35d9be18a9665905..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/form.ts +++ /dev/null @@ -1,8 +0,0 @@ - - - -export default (ctx: any) => { - return ` -
${ctx.children}
- `; -}; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/bootstrap/webform/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/index.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/index.ts deleted file mode 100644 index 00ee8e25ac04f524b9b0b3b0a5622fbbca166fe6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import bootstrap from './bootstrap'; - -export default { bootstrap }; diff --git a/packages/designer/projects/designer-element/src/lib/builder/templates/templates.ts b/packages/designer/projects/designer-element/src/lib/builder/templates/templates.ts deleted file mode 100644 index e1e3b15e7f07c652a5377ae879d60f5dc2ada271..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/templates/templates.ts +++ /dev/null @@ -1,14 +0,0 @@ -import templates from './index'; -import { merge } from 'lodash-es'; - -export default class Templates { - - static templates = {}; - - - static setTemplates(uiTemplates) { - const designerTemplates = templates.bootstrap; - Templates.templates = merge(designerTemplates, uiTemplates); - } - -} diff --git a/packages/designer/projects/designer-element/src/lib/builder/webform-builder.ts b/packages/designer/projects/designer-element/src/lib/builder/webform-builder.ts deleted file mode 100644 index f8f5891f9f395032807f7a0998e17fdc64c6c9de..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/webform-builder.ts +++ /dev/null @@ -1,768 +0,0 @@ -import { Webform } from './webform'; -import { FarrisDesignBaseComponent } from '../base-component/component'; -import { FarrisDesignBaseNestedComponent } from '../base-component/nested-component'; -import { BuilderOptions } from '../entity/builder-options'; -import { ComponentSchema } from '../entity/builder-schema'; -import { BuilderHTMLElement } from '../entity/builder-element'; -import Templates from './templates/templates'; -import dragula from '@farris/designer-dragula'; -import { findIndex } from 'lodash-es'; - - - -export class WebformBuilder extends FarrisDesignBaseComponent { - - public webform: Webform; - /** 设计器外层dom节点 */ - public element: HTMLElement; - - public dragula: any; - - - constructor(element: HTMLElement, options: BuilderOptions) { - super(null, options); - - this.element = element; - this.options.hooks = this.options.hooks || {}; - - this.options.hooks.renderComponent = this.renderComponent.bind(this); - this.options.hooks.renderComponents = this.renderComponents.bind(this); - - this.options.hooks.attachComponents = this.attachComponents.bind(this); - this.options.hooks.attachComponent = this.attachComponent.bind(this); - - // 创建WebForm实例 - this.webform = this.webform || this.createForm(this.options); - } - - getSchema(): any { - return this.webform.getSchema(); - } - - /** - * 创建WebForm实例 - * @param options 创建参数 - */ - createForm(options: any): any { - this.webform = new Webform(this.element, options); - if (this.element) { - this.loadRefs(this.element, { - form: 'single' - }); - if (this.refs.form) { - this.webform.element = this.refs.form; - } - } - - return this.webform; - } - - - init() { - if (this.webform) { - this.webform.init(); - } - return super.init(); - } - - get form(): any { - return this.webform.form; - } - set form(value: any) { - this.setForm(value); - } - - /** - * 渲染表单 - * @param form 配置数据,form.contents为json schema数据 - */ - setForm(form: any): any { - if (!form.contents) { - form.contents = []; - } - - if (this.webform) { - this.webform._form = form || { contents: [] }; - return this.rebuild().then(() => { - // this.webform.onChange({}); - - // 追加渲染结束标志 - this.webform.formReadyResolve(); - return this.form; - }); - } - } - - redraw(): any { - // call方法的第一个参数是this,所以调用的webForm.redraw方法内部的this指向webFormBuilder - return Webform.prototype.redraw.call(this); - } - - - /** - * Called when everything is ready. - * - * @returns - Wait for webform to be ready. - */ - getReady(): any { - return this.webform.getReady(); - } - /** - * 渲染外层容器,原formio中builder包含侧边栏和表单左右两个区域,这里只保留form区域 - */ - render(): any { - return this.renderTemplate('builder', { - form: this.webform.render(), - }); - } - /** - * 渲染单个控件的builderComponet层级,目的是支持控件右上角的图标按钮 - * @param html 组件html片段 - * @param param1 component:组件JSON schema;self:组件实例 - * @returns 组件外层builder-component节点,ref='dragComponent' - */ - private renderComponent(html: string, { component, self }): string { - if (self.type === 'form' && !self.key) { - return html; - } - - if (self.parent.noDragDrop) { - return html; - } - - const renderResult = this.renderTemplate('builderComponent', { - html, - childComponent: component - }); - return renderResult; - - } - - /** - * 渲染子组件的集合节点html。 - * 为了方便拖拽,容器内所有的子组件都放在一个父div下。 - * 若容器内没有子组件,则展示提示信息条 - * @param html 子组件html片段 - * @param param1 components: 容器内包含的子组件实例集合;self:容器组件的实例 - * @returns 组件集合节点html片段 class:builder-components drag-container - */ - private renderComponents(html: string, { components, self }): string { - if (self.type === 'datagrid' && components.length > 0 || self.noDragDrop) { - return html; - } - - if (!components || (!components.length && !components.nodrop) || - (self.type === 'form' && components.length <= 1 && (components.length === 0 || components[0].type === 'button')) - ) { - html = this.renderTemplate('builderPlaceholder', { position: 0 }) + html; - } - - const renderResult = this.renderTemplate('builderComponents', { - key: self.key, - type: self.type, - html - }); - return renderResult; - } - - - attach(element: HTMLElement): Promise { - return super.attach(element).then(() => { - this.loadRefs(element, { - form: 'single' - }); - - this.initDragula(); - - // refs.form 是表单最外层DOM容器 - if (this.refs.form) { - return this.webform.attach(this.refs.form); - } - }); - } - - /** - * 子组件JSON结构和当前组件的实例添加到DOM中并注册拖拽容器。节点class= 'builder-components...' - * @param element dom元素 - * @param childrenComponents 容器内的子组件实例集合 - * @param childrenContents 子组件JSON schema集合 - * @param component 容器组件实例 - * @returns 容器类组件的子组件集合 - */ - private attachComponents(element: HTMLElement, childrenComponents: FarrisDesignBaseComponent[], childrenContents: any[], component: Webform) { - - // don't attach if no element was found or component doesn't participate in drag'n'drop. - if (!element) { - return; - } - if (component.noDragDrop) { - return element; - } - // 获取容器中的子组件集合节点 - const containerElement: BuilderHTMLElement = element.querySelector(`[dragref='${component.component.id}-container']`) || element; - - // 将子组件JSON结构和当前组件的实例添加到DOM中,方便后续调用 - containerElement.childrenContents = childrenContents; - containerElement.componentInstance = component; - - // 将容器添加到拖拽列表中,dragula控件会监听容器中元素的拖动事件 - if (this.dragula && containerElement) { - // containerElement 为页面中的容器节点的builder-components层级 - this.dragula.containers.push(containerElement); - } - - // 返回容器的子节点集合,即为ref='component'的节点集合 - return element.children; - } - - /** - * 附加组件实例,注册图标事件 - * @param element 组件dom元素 - * @param component 组件实例,如ButtonComponent - * @returns 组件dom元素 - */ - private attachComponent(element: BuilderHTMLElement, componentInstance: any): BuilderHTMLElement { - // 将组件实例附加到DOM元素上,方便后续调用 - element.componentInstance = componentInstance; - // 将element的右上角图标元素存放到refs中,方便后续调用 - componentInstance.loadRefs(element, { - selectParentComponent: 'single', - removeComponent: 'single', - moveComponent: 'single' - }); - - const parent: BuilderHTMLElement = this.getParentElement(element); - // 注册删除图标点击事件 - if (componentInstance.refs.removeComponent) { - // 保证组件上挂载的删除图标是自己的,而不是子组件的 - if (componentInstance.refs.removeComponent.getAttribute('componentid') === componentInstance.id) { - componentInstance.addEventListener(componentInstance.refs.removeComponent, 'click', () => - this.removeComponent(componentInstance, parent)); - } else { - componentInstance.refs.removeComponent = null; - } - - } - // 拖拽图标 - if (componentInstance.refs.moveComponent) { - // 保证组件上挂载的拖拽图标是自己的,而不是子组件的 - if (componentInstance.refs.moveComponent.getAttribute('componentid') !== componentInstance.id) { - componentInstance.refs.moveComponent = null; - } - } - - // 注册选中父级图标点击事件 - if (componentInstance.refs.selectParentComponent) { - // 保证组件上挂载的删除图标是自己的,而不是子组件的 - if (componentInstance.refs.selectParentComponent.getAttribute('componentid') === componentInstance.id) { - componentInstance.addEventListener(componentInstance.refs.selectParentComponent, 'click', (e: PointerEvent) => { - e.stopPropagation(); - e.preventDefault(); - this.selectParentComponent(componentInstance, e) - }); - } else { - componentInstance.refs.selectParentComponent = null; - } - } - - // 组件的定制按钮:注册点击事件 - if (componentInstance.customToolbarConfigs) { - componentInstance.customToolbarConfigs.forEach(btnConfig => { - - componentInstance.loadRefs(element, { - [btnConfig.id]: 'single' - }); - - const btnEle = componentInstance.refs[btnConfig.id]; - if (btnEle && btnEle.click) { - componentInstance.addEventListener(btnEle, 'click', (e) => - btnConfig.click(e, componentInstance, parent)); - } - }); - - } - - return element; - } - - - /** - * 初始拖拽 - */ - initDragula(): any { - const options: any = this.options; - const self = this; - if (this.dragula) { - this.dragula.destroy(); - } - - if (!dragula) { - return; - } - // 运行环境,区分移动端与PC端 - const envType = this.options.designerHost.getService('FormBasicService').envType - - const formElement = document.body.querySelector('[ref=form]') || document.body; - // 可拖拽容器在attachComponents 方法中添加 - this.dragula = dragula([], { - // 镜像容器 - mirrorContainer: formElement, - direction: 'mixed', - revertOnSpill: true, - dragPositon: envType === 'mobileDesigner' ? 'before' : 'after', - // 判断是否可移动 - moves(el: BuilderHTMLElement, container: HTMLElement, handle: HTMLElement): boolean { - let moves = true; - - // 包含no-drag样式的元素不允许拖动 - if (el.classList.contains('no-drag')) { - moves = false; - } - // 为防止误操作,可视化区域的控件只能通过移动图标来拖拽 - if (el.component && el.componentInstance) { - moves = handle.classList.contains('f-icon-yxs_move') && !!handle.getAttribute('cmpIcon'); - } - - return moves; - }, - // 判断是否可拷贝 - copy(el: HTMLElement): boolean { - // 工具箱里的div需要配置drag-copy - return el.classList.contains('drag-copy'); - }, - // 判断目标区域是否可接收拖拽的控件 - accepts(el: HTMLElement, target: BuilderHTMLElement, source: HTMLElement): boolean { - const canAccept = self.checkCanAcceptDrops(el, target, source); - const guMirrotElement = formElement.lastElementChild; - if (canAccept) { - guMirrotElement.className = guMirrotElement.className.replace('undroppable', ''); - } else if (!guMirrotElement.className.includes('undroppable')) { - guMirrotElement.className += ' undroppable'; - } - return canAccept; - } - }) - .on('over', (el, container) => { - container.className += ' drag-over'; - if (container.componentInstance && container.componentInstance.onDragOver) { - container.componentInstance.onDragOver(); - } - }) - .on('out', (el, container) => { - container.className = container.className.replace('drag-over', ''); - if (container.componentInstance && container.componentInstance.onDragOut) { - container.componentInstance.onDragOut(); - } - }) - .on('drop', (element, target, source, sibling) => this.onDrop(element, target, source, sibling)); - } - - /** - * 定位元素的可拖拽的cotainer类父级节点,即为dragref='xxx-container' class='drag-container'的层级节点 - * @param element DOM元素 - */ - getParentElement(element: BuilderHTMLElement): BuilderHTMLElement { - let container: BuilderHTMLElement = element; - do { - container = container.parentNode as BuilderHTMLElement; - } while (container && !container.componentInstance); - return container; - } - /** - * 判断是否可以接收拖拽的新控件 - * @param el 拖拽的新控件元素 - * @param target 目标位置 - * @returns boolean - */ - private checkCanAcceptDrops(el: BuilderHTMLElement, target: BuilderHTMLElement, sourceContainer?: BuilderHTMLElement): boolean { - - if (!!el.contains(target) || target.classList.contains('no-drop')) { - return false; - } - const result = false; - if (el.componentInstance && el.componentInstance.getDragScopeElement) { - const dragScopEle = el.componentInstance.getDragScopeElement(); - if (dragScopEle) { - if (!dragScopEle.contains(target)) { - return false; - } - } - } - if (target.componentInstance && target.componentInstance.canAccepts) { - return target.componentInstance.canAccepts(el, target, sourceContainer); - } - return result; - - } - /** - * 删除控件 - * @param targetComponentInstance 要删除的控件实例 - * @param parent 可拖拽的父dom节点 - */ - removeComponent(targetComponentInstance: any, parent: BuilderHTMLElement): any { - if (!parent) { - return; - } - const componentSchema = targetComponentInstance.component; - - const msgService = this.options.designerHost.getService('MessagerService'); - - if (!msgService || !msgService.question) { - return; - } - msgService.question('确定删除控件?', () => { - - let parentComponentInstance = parent.componentInstance; - let locatePredicate: any = { id: componentSchema.id }; - - if (componentSchema.type === 'Component') { - // 组件级节点使用component属性定位 - locatePredicate = { component: componentSchema.id }; - } - const index = findIndex(parent.childrenContents, locatePredicate); - if (index !== -1) { - // const path: string = this.getComponentsPath(); - - if (parent.childrenContents) { - parent.childrenContents.splice(index, 1); - } - // 控件的移除回调方法 - if (targetComponentInstance.onRemoveComponent) { - const result = targetComponentInstance.onRemoveComponent(); - if (result && result.parentComponentInstance) { - parentComponentInstance = result.parentComponentInstance; - } - } - - // 触发页面重刷,parent.componentInstance是被删组件的父容器实例 - const rebuild = parentComponentInstance.rebuild() || Promise.resolve(); - rebuild.then(() => { - this.emit('removeComponent'); - // this.emit('change', this.form); - }); - } - }); - } - /** - * 选中父级事件 - * @param targetComponentInstance 要选中的父级控件实例 - */ - selectParentComponent(targetComponentInstance: any, e: PointerEvent) { - this.getParent(targetComponentInstance).triggerComponentClick(e) - } - /** - * 获取父级控件实例 (过滤ComponentRef) - * @param targetComponentInstance 当前控件实例 - * @return parentComponentInstance 父级控件实例 - */ - getParent(targetComponentInstance: any) { - const parent = targetComponentInstance.parent - if (parent.component.type === "ComponentRef") { - return this.getParent(parent) - } - return parent - } - - /** - * 拖拽结束 - * @param element 拖拽的元素 - * @param target 目标容器元素 - * @param source 原容器元素 - * @param sibling 目标位置的下一个同级元素 - */ - onDrop(element: BuilderHTMLElement, target: BuilderHTMLElement, source: BuilderHTMLElement, sibling: BuilderHTMLElement) { - if (!target) { - return; - } - // If you try to drop within itself. - if (element.contains(target)) { - return; - } - const sourceType = element.getAttribute('data-sourceType'); - - switch (sourceType) { - case 'control': case 'field': case 'entity': { - this.createControlFromOutside(element, target, source, sibling); - break; - } - default: { - if (source.childrenContents) { - this.dragBetweenCurrentForm(element, target, source, sibling); - - } else { - // 移除拷贝生成的源DOM - if (target.contains(element)) { - target.removeChild(element); - } - } - } - } - - } - /** - * 在现有的表单中拖拽移动控件位置 - * @param element 拖拽的元素 - * @param target 目标容器元素 - * @param source 源容器元素 - * @param sibling 目标位置的下一个同级元素 - */ - private dragBetweenCurrentForm(element: BuilderHTMLElement, target: BuilderHTMLElement, source: BuilderHTMLElement, sibling: BuilderHTMLElement) { - let sourceControlSchema; - let index = -1; - // Form、DataGrid等控件在拖拽时,需要连同所属Component一起拖拽。 - if (element.componentInstance && element.componentInstance.triggerBelongedComponentToMoveWhenMoved) { - const cmpInstance = element.componentInstance.getBelongedComponentInstance(element.componentInstance); - if (cmpInstance) { - // 将拖拽元素替换为所属Component - element = cmpInstance.element; - // 将源容器元素替换为所属Component的父级元素 - source = cmpInstance.element.parentElement; - } - - } - const elementComponentSchema = element.componentInstance && element.componentInstance.component; - - let locatePredicate: any = { id: elementComponentSchema && elementComponentSchema.id }; - if (elementComponentSchema && elementComponentSchema.type === 'Component') { - // 组件级节点使用component属性定位 - locatePredicate = { component: elementComponentSchema.id }; - } - index = findIndex(source.childrenContents, locatePredicate); - - if (index !== -1) { - // 从源容器schema json中移除 - sourceControlSchema = source.childrenContents.splice(index, 1); - - sourceControlSchema = sourceControlSchema[0]; - } - - this.addNewControlToTarget(target, sourceControlSchema, sibling); - - // 源容器的控件被移除掉 - if (source.componentInstance && source.componentInstance.onChildElementMovedOut) { - source.componentInstance.onChildElementMovedOut(element); - } - - // 目标容器接收新控件 - if (target.componentInstance && target.componentInstance.onAcceptMovedChildElement) { - target.componentInstance.onAcceptMovedChildElement(element, source); - } - - if (!sourceControlSchema) { - return; - } - - // 触发容器的刷新 - let rebuild; - let movedInSameContainer = false; - if (target !== source) { - if (source.childrenContents && source.contains(target)) { - rebuild = source.componentInstance.rebuild(); - } else if (target.contains(source)) { - rebuild = target.componentInstance.rebuild(); - } else { - if (source.childrenContents) { - rebuild = source.componentInstance.rebuild(); - } - rebuild = target.componentInstance.rebuild(); - } - } else { - movedInSameContainer = true; - // 在同一个容器中移动控件,只需要刷新容器本身即可。 - rebuild = target.componentInstance.rebuild(); - } - - if (!rebuild) { - rebuild = Promise.resolve(); - } - - return rebuild.then(() => { - this.emit('change', this.form); - }); - } - - /** - * 从控件工具箱中拖拽新建控件 - * @param element 拖拽的元素 - * @param target 目标容器元素 - * @param source 原容器元素 - * @param sibling 目标位置的下一个同级元素 - */ - private createControlFromOutside(element: BuilderHTMLElement, target: BuilderHTMLElement, source: BuilderHTMLElement, sibling: BuilderHTMLElement) { - - if (target.componentInstance.onAcceptNewChildElement) { - const targetPosition = this.getNewControlTargetPosition(target, sibling); - target.componentInstance.onAcceptNewChildElement(element, targetPosition).subscribe(componentResolveContext => { - if (!componentResolveContext) { - return; - } - - // sourceControlSchema为空代表了DOM插入已经处理,无需更新 - const sourceControlSchema = componentResolveContext.componentSchema; - if (sourceControlSchema) { - this.addNewControlToTarget(target, sourceControlSchema, sibling); - } - - // 执行新增元素的移动后事件 - if (target.componentInstance && target.componentInstance.afterAcceptNewChildElement) { - target.componentInstance.afterAcceptNewChildElement(componentResolveContext); - } - - let rebuild = target.componentInstance.rebuild(); - if (!rebuild) { - rebuild = Promise.resolve(); - } - - return rebuild.then(() => { - this.emit('change', this.form, componentResolveContext); - }); - }); - } - - // 移除拷贝生成的源DOM - if (target.contains(element)) { - target.removeChild(element); - } - } - /** - * 将新控件json添加到新容器schema json中 - * @param element 拖拽的元素 - * @param sourceControlSchema 新控件的JSON schema结构 - * @param sibling 目标位置的下一个同级元素 - */ - private addNewControlToTarget(target: BuilderHTMLElement, sourceControlSchema: ComponentSchema, sibling: BuilderHTMLElement) { - const parent = target.componentInstance; - let index; - if (!sourceControlSchema) { - return; - } - if (target.childrenContents) { - if (target.componentInstance.onAddNewChildElement) { - const position = target.componentInstance.onAddNewChildElement(sourceControlSchema, sibling) - if (position >= 0) { - target.childrenContents.splice(position, 0, sourceControlSchema); - return position - } - } - if (sibling) { - if (!sibling.getAttribute('data-noattach')) { - // 定位目标位置 - const siblingComponentSchema = sibling.componentInstance.component; - let locatePredicate: any = { id: siblingComponentSchema.id }; - if (siblingComponentSchema.type === 'Component') { - locatePredicate = { component: siblingComponentSchema.id }; - } - - index = findIndex(target.childrenContents, locatePredicate); - index = (index === -1) ? 0 : index; - } else { - index = sibling.getAttribute('data-position'); - } - if (index !== -1) { - target.childrenContents.splice(index, 0, sourceControlSchema); - } - } else { - target.childrenContents.push(sourceControlSchema); - } - - } - return index; - } - - /** - * 获取新控件的目标位置 - */ - private getNewControlTargetPosition(target: BuilderHTMLElement, sibling: BuilderHTMLElement) { - - // 不允许放置 - if (!target.childrenContents) { - return -1; - } - - // 空容器:放置第1个位置 - if (target.childrenContents.length === 0) { - return 0; - } - - // 后面没有兄弟控件:放置到最后 - if (!sibling) { - return target.childrenContents.length; - } - - // noattach??? - if (sibling.getAttribute('data-noattach')) { - return sibling.getAttribute('data-position'); - } - - const siblingComponentSchema = sibling.componentInstance.component; - let locatePredicate; - if (siblingComponentSchema.type === 'Component') { - locatePredicate = { component: siblingComponentSchema.id }; - } else { - locatePredicate = { id: siblingComponentSchema.id }; - } - let position = findIndex(target.childrenContents, locatePredicate); - position = (position === -1) ? 0 : position; - - return position; - } - - /** - * 获取当前节点在父容器json中的循环嵌套关键字,默认为“contents” - */ - getComponentsPath(): string { - return 'contents'; - } - - - destroy() { - if (this.webform.initialized) { - this.webform.destroy(); - } - super.destroy(); - } - - - clear() { - if (this.webform.initialized) { - this.webform.clear(); - } - } - detach() { - if (this.dragula) { - this.dragula.destroy(); - } - this.dragula = null; - - super.detach(); - } - - get container() { - return this.webform.form.components; - } - - /** - * 获取表单全部的组件实例,平铺结构。用于外部监听各组件的事件 - */ - getAllComponents() { - const allCmps = []; - this.getChildComponents(this.webform.components, allCmps); - return allCmps; - } - - private getChildComponents(components: FarrisDesignBaseNestedComponent[], allCmps: FarrisDesignBaseComponent[]) { - if (!components) { - return allCmps; - } - for (const cmp of components) { - if (cmp.components && cmp.components.length) { - this.getChildComponents(cmp.components, allCmps); - } - allCmps.push(cmp); - } - } - - getAllUiTemplates() { - return Templates.templates; - } -} diff --git a/packages/designer/projects/designer-element/src/lib/builder/webform.ts b/packages/designer/projects/designer-element/src/lib/builder/webform.ts deleted file mode 100644 index 1791b34949d50ea851821b97b9ceaa4a8262b969..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/builder/webform.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { omit } from 'lodash-es'; -import { FarrisDesignBaseNestedComponent } from '../base-component/nested-component'; -import UIComponents from './components/components'; -import Templates from './templates/templates'; - -export class Webform extends FarrisDesignBaseNestedComponent { - - _form; - - /** The type of this element. */ - type: string; - - /** Promise that executes when the form is ready and rendered. */ - formReady: Promise; - - /** Called when the formReady state of this form has been resolved. */ - formReadyResolve: any; - - - /** 表单是否已初始化,用于清除组件时进行销毁 */ - initialized: boolean; - - /** 不允许拖拽,暂时无用 */ - noDragDrop: any; - - getSchema(): any { - const schema: any = omit(this._form, ['contents']); - schema.contents = []; - this.eachComponent((component) => schema.contents.push(component.getSchema())); - return schema; - } - - constructor(element: HTMLElement, options: any) { - super(null, options); - - this.element = element; - - this.type = 'form'; - if (this.component) { - this.component.id = ''; - } - this.formReady = new Promise((resolve, reject) => { - this.formReadyResolve = resolve; - // this.formReadyReject = reject; - }); - - // this.init 是为了防止重复渲染增加的方法,原formio没有 - this.init(); - } - - - /** - * 表单渲染结束 - * @returns The promise to trigger when both form and submission have loaded. - */ - getReady(): Promise { - return this.formReady.then(() => { - // component渲染结束 - return super['ready']; - }); - } - - /** - * 设计时表单顶层的component节点样式 - */ - getClassName(): string { - return 'farris-designer-form'; - } - - - render(): string { - const renderTemplateResult: any = this.renderTemplate('webform', { - classes: this.getClassName(), - children: this.renderComponents() - }); - return super.render(renderTemplateResult); - } - - redraw(): any { - // Don't bother if we have not built yet. - if (!this.element) { - return Promise.resolve(); - } - // 先消除已有的DOM和事件、拖拽等 - this.clear(); - - this.setContent(this.element, this.render()); - - // 附加拖拽等功能 - return this.attach(this.element); - } - - /** - * 创建控件实例 - */ - init(): any { - - this.componentId = this.form.id; - this.viewModelId = this.form.viewModel; - - // super.init 是为了防止重复渲染增加的方法,原formio没有 - super.init(); - - // remove any existing components. - if (this.components && this.components.length) { - this.destroyComponents(); - this.components = []; - } - - if (this.component) { - this.component.contents = this.form ? this.form.contents : []; - } else { - this.component = this.form; - } - this.component.type = 'form'; - - this.addComponents(); - - - return this.formReady; - } - - /** - * Gets the form object. - * - * @returns - The form JSON schema. - */ - get form(): any { - if (!this._form) { - this._form = { - contents: [] - }; - } - return this._form; - } - - getComponentContents(): any[] { - return this.form.contents; - } - - - destroy(): any { - return super.destroy(); - } - - attach(element: HTMLElement): Promise { - this.element = element; - this.loadRefs(element, { webform: 'single' }); - const childPromise = this.attachComponents(this.refs.webform); - - this.hook('attachWebform', element, this); - return childPromise.then(() => { - this.emit('render', this.element); - - return false; - }); - } - - createUiComponent(component, options) { - return UIComponents.create(component, options); - } - - getAllUiTemplates() { - return Templates.templates; - } -} diff --git a/packages/designer/projects/designer-element/src/lib/entity/builder-element.ts b/packages/designer/projects/designer-element/src/lib/entity/builder-element.ts deleted file mode 100644 index 33a78d218373761f7204f7ea8c2d9437100e3c9c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/entity/builder-element.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { FarrisDesignBaseComponent } from '../base-component/component'; - -/** - * 设计器DOM元素结构 - */ -export class BuilderHTMLElement extends HTMLElement { - /** 记录各子元素对应的控件schema json的集合,用于container类dom节点 */ - public childrenContents?: any[]; - - /** 记录element对应的component实例,用于单个component节点 */ - public componentInstance?: any; - - public component?: FarrisDesignBaseComponent; - -} diff --git a/packages/designer/projects/designer-element/src/lib/entity/builder-options.ts b/packages/designer/projects/designer-element/src/lib/entity/builder-options.ts deleted file mode 100644 index d14389f53c290d39d1dea7fbcf20536cb240a3ae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/entity/builder-options.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { IDesignerHost } from '../service/designer-host'; -import FarrisDesignEventEmitter from '../utils/event-emitter'; -import { ComponentSchema } from './builder-schema'; - -export class BuilderOptions { - - /** 存储渲染组件的方法 */ - hooks?: { - renderComponent?: () => {}, - renderComponents?: () => {}, - attachComponent?: () => {}, - attachComponents?: () => {} - }; - - /** 外部传入的事件,暂时不用 */ - events?: FarrisDesignEventEmitter; - - /** 发送事件的前缀? */ - namespace?: string; - - /** 外部传入的当前表单中禁用的控件,暂时不用 */ - disabled?: any[]; - - /** 外部传入,删除控件时是否需要进行提示,暂时不用 */ - alwaysConfirmComponentRemoval?: boolean; - - /** 外部传入,拖拽添加控件时,是否需要弹出编辑框。若为false,则直接生成控件。考虑把这个属性放在各Component里 */ - noNewEdit?: boolean; - - /** 记录组件的父级组件 */ - parent?: any; - - /** 跳过渲染,目前看用于拖拽新增控件时的第一次render方法 */ - skipInit?: boolean; - - /** 表单子组件 */ - childComponents?: ComponentSchema[]; - - /** 控件需要的服务 */ - designerHost?: IDesignerHost; -} diff --git a/packages/designer/projects/designer-element/src/lib/entity/builder-schema.ts b/packages/designer/projects/designer-element/src/lib/entity/builder-schema.ts deleted file mode 100644 index 33af471f06022a7dba1bfc3b486c6bd2d8ec6812..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/entity/builder-schema.ts +++ /dev/null @@ -1,15 +0,0 @@ - -export class ComponentSchema { - - /** 设计时使用 */ - key?: string; - - id?: string; - - type?: string; - - contents?: ComponentSchema[]; - - // 其他属性 - [propName: string]: any; -} diff --git a/packages/designer/projects/designer-element/src/lib/entity/control-entity.ts b/packages/designer/projects/designer-element/src/lib/entity/control-entity.ts deleted file mode 100644 index 10c731235c054da7f72503bc4c9dd115f525b9a6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/entity/control-entity.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { FarrisDesignBaseComponent } from '../base-component/component'; - -/** - * 描述控件类型、名称、图标的集合列表 - */ -export class IDgControl { - [controlType: string]: { - type: string; - name: string; - icon?: string; - dependentParentControl?: string; - } -} - -/** - * 控件导出实体 - */ -export class ComponentExportEntity { - /** 控件类型 */ - type: string; - - /** 控件实例 */ - component?: any; - - /** 控件模板 */ - template?: any; - - /** 控件schema元数据 */ - metadata: any; - - /** 用于唯一化控件元数据子项的id */ - uniqueMedataItems?: (metadata: any) => void; -} - - - -/** - * UI 控件对外提供的服务类 - */ -export abstract class IControlService { - - /** 获取控件列表 */ - abstract getDgControl(): any; - - /** 根据控件类型获取控件元数据 */ - abstract getControlMetaData(controlType: string, isFromControlBox?: boolean, targetComponentInstance?: FarrisDesignBaseComponent, controlFeature?: string): any; - - /** 获取所有的事件名称 */ - abstract getControlEventPropertyIDList(): any; -} - -/** - * 控件定制图标按钮,显示在右上角 - */ -export class ComponentCustomToolbarConfig { - /** 按钮标识,唯一 */ - id: string; - - /** 按钮提示文本 */ - title: string; - - class?: string; - - /** 按钮图标 */ - icon: string; - - /** 按钮点击事件 */ - click: (e?: PointerEvent, componentInstance?: FarrisDesignBaseComponent, parent?: FarrisDesignBaseComponent) => void; -} diff --git a/packages/designer/projects/designer-element/src/lib/service/designer-host.ts b/packages/designer/projects/designer-element/src/lib/service/designer-host.ts deleted file mode 100644 index 64f0726a11ec38acbdeb46adcf9df1d8caed5209..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/service/designer-host.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * 设计时服务相关基类 - */ -export abstract class IDesignerHost { - abstract addService(serviceType: string, service: any): void; - abstract getService(serviceType: string): any; -} - diff --git a/packages/designer/projects/designer-element/src/lib/utils/event-emitter.ts b/packages/designer/projects/designer-element/src/lib/utils/event-emitter.ts deleted file mode 100644 index 1e408f8a08eb3cf898575d392feff30dc8302977..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/utils/event-emitter.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as em from 'eventemitter3'; -import * as utils from './utils'; -export default class EventEmitter extends em.EventEmitter { - emit: any; - _events: any; - id: any; - constructor(conf: any = {}) { - super(); - const { loadLimit = 1000, eventsSafeInterval = 300 } = conf; - - - const overloadHandler = () => { - console.warn(`There were more than ${loadLimit} events emitted in ${eventsSafeInterval} ms. It might be caused by events' infinite loop`, this.id); - }; - - const dispatch = utils.observeOverload(overloadHandler, { - limit: loadLimit, - delay: eventsSafeInterval - }); - - this.emit = (event, data) => { - super.emit(event, data); - super.emit('any', data); - - dispatch(); - }; - } - - onAny = (fn) => { - this.on('any', fn); - } - - offAny = (fn) => { - this.off('any', fn); - } -} - diff --git a/packages/designer/projects/designer-element/src/lib/utils/utils.ts b/packages/designer/projects/designer-element/src/lib/utils/utils.ts deleted file mode 100644 index ef1b0ac8adc0560624de42c0a62a2e3d3c4413dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/lib/utils/utils.ts +++ /dev/null @@ -1,26 +0,0 @@ - -export function observeOverload(callback: any, options: any = {}): any { - const { limit = 50, delay = 500 } = options; - let callCount: number = 0; - let timeoutID: number = 0; - - const reset = () => callCount = 0; - - return () => { - if (timeoutID !== 0) { - clearTimeout(timeoutID); - timeoutID = 0; - } - - timeoutID = setTimeout(reset, delay) as number; - - callCount += 1; - - if (callCount >= limit) { - clearTimeout(timeoutID); - reset(); - return callback(); - } - }; -} - diff --git a/packages/designer/projects/designer-element/src/public-api.ts b/packages/designer/projects/designer-element/src/public-api.ts deleted file mode 100644 index 8c2cd9e652551c5af16a5c5cf9c5080916e03811..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/public-api.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Public API Surface of farris-designer-base - */ - -export * from './lib/base-component/component'; -export * from './lib/base-component/element'; -export * from './lib/base-component/nested-component'; - -export * from './lib/entity/builder-options'; -export * from './lib/entity/builder-element'; -export * from './lib/entity/builder-schema'; -export * from './lib/entity/control-entity'; - -export * from './lib/utils/utils'; -export * from './lib/service/designer-host'; - -export * from './lib/builder'; diff --git a/packages/designer/projects/designer-element/src/test.ts b/packages/designer/projects/designer-element/src/test.ts deleted file mode 100644 index e11ff1c97b82c411cff67eb2623e12fbf7004b8a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/src/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'core-js/es7/reflect'; -import 'zone.js/dist/zone'; -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/packages/designer/projects/designer-element/tsconfig.lib.json b/packages/designer/projects/designer-element/tsconfig.lib.json deleted file mode 100644 index 3fe337fcf5323bf91d023d92aa1effd9062209dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/tsconfig.lib.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "module": "es2015", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "inlineSources": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "types": [], - "lib": [ - "dom", - "es2018" - ] - }, - "angularCompilerOptions": { - "annotateForClosureCompiler": true, - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "enableResourceInlining": true - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/designer/projects/designer-element/tsconfig.spec.json b/packages/designer/projects/designer-element/tsconfig.spec.json deleted file mode 100644 index 16da33db072ce34e8607114c6c705bed73936724..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/packages/designer/projects/designer-element/tslint.json b/packages/designer/projects/designer-element/tslint.json deleted file mode 100644 index 124133f8499a773c98b161fbc21122698deb6282..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-element/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] - } -} diff --git a/packages/designer/projects/designer-services/README.md b/packages/designer/projects/designer-services/README.md deleted file mode 100644 index 1f24e9b93b4ac25873363076e62100074356b510..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DesignerServices - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0. - -## Code scaffolding - -Run `ng generate component component-name --project designer-services` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project designer-services`. -> Note: Don't forget to add `--project designer-services` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `ng build designer-services` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `ng build designer-services`, go to the dist folder `cd dist/designer-services` and run `npm publish`. - -## Running unit tests - -Run `ng test designer-services` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/packages/designer/projects/designer-services/karma.conf.js b/packages/designer/projects/designer-services/karma.conf.js deleted file mode 100644 index f60c067d6f229a87718694fce87c4305e871a6ae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../coverage/designer-services'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/packages/designer/projects/designer-services/ng-package.json b/packages/designer/projects/designer-services/ng-package.json deleted file mode 100644 index 56b7e615bb4113bc4d60a82b6be76ad413e7e88a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/designer-services", - "lib": { - "entryFile": "src/public-api.ts" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/package.json b/packages/designer/projects/designer-services/package.json deleted file mode 100644 index e3bdad2fab2e6a52f1807fb2bea55ffd4d0dad0d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@farris/designer-services", - "version": "0.0.1", - "peerDependencies": { - "@angular/common": "^7.2.0", - "@angular/core": "^7.2.0" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/designer-services.module.ts b/packages/designer/projects/designer-services/src/lib/designer-services.module.ts deleted file mode 100644 index ebde4e2d20c7eb1ca9292a812c65f424a3bfdcbe..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/designer-services.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { GSP } from '@farris/ide-devkit'; - -@NgModule({ - declarations: [], - imports: [ - ], - exports: [] -}) -export class DesignerServicesModule { } - - -declare global { - var gsp: GSP ; -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/design-viewmodel.ts b/packages/designer/projects/designer-services/src/lib/entity/design-viewmodel.ts deleted file mode 100644 index 9da4d079e32e660917d4ecc197ebf57031b69ba6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/design-viewmodel.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { FormSchemaEntityField } from './schema'; -import { mergeWith } from 'lodash-es'; -import { DomService } from '../services/dom.service'; -import { FormBindingType, FormVariable } from './dom-entity'; - - -// 设计器内部使用 -// 在DesignViewModel中存储一份完整的字段信息。而DOM.viewModel只存储增量的部分(即viewmodel.fieldSchema) -// DesignViewModel中不会存储所有的schema字段,只存储已绑定控件的字段(字段与DOM.viewModel一一对应) -export class DesignViewModel { - public id: string; - public fields: DesignViewModelField[]; - - constructor(viewModelId: string, elements: DesignViewModelField[], private domService: DomService) { - this.id = viewModelId; - this.fields = elements; - } - - - public addField(element: DesignViewModelField) { - this.fields.push(element); - - // 指定updateOn属性,下拉列表和checkbox是change,其他blur - let updateOn = 'blur'; - const type = element.type.name; - if (type === 'Enum' || type === 'Boolean') { - updateOn = 'change'; - } - - // 为了添加字段之后立马能显示更新时机 - element.updateOn = updateOn; - - // 更改DOM ViewModel节点 - const vm = { - type: FormBindingType.Form, - id: element.id, - fieldName: element.bindingField, - groupId: element.groupId || '', - groupName: element.groupName || '', - valueChanging: element.valueChanging || '', - valueChanged: element.valueChanged || '', - updateOn, - fieldSchema: {} - }; - - this.domService.addViewModelField(this.id, vm); - } - public removeField(fieldIdList: string[]) { - if (!fieldIdList || fieldIdList.length === 0) { - return; - } - this.fields = this.fields.filter(f => !fieldIdList.includes(f.id)); - - // 更改DOM ViewModel节点 - fieldIdList.forEach(fieldId => { - this.domService.deleteViewModelFieldById(this.id, fieldId); - }); - } - - /** - * 更改字段属性 - * @param fieldId 字段ID - * @param changeObject 变更集 - * @param isMerge 是否将变更集合并到字段上,若配置为false,则直接替换对象对象 - */ - public changeField(fieldId: string, changeObject, isMerge = true) { - const field = this.fields.find(f => f.id === fieldId); - if (!field || !changeObject) { - return; - } - // 数组类型不再合并,全量替换:用户枚举数据的更改 - function customizer(objValue, srcValue) { - if (!isMerge) { - return srcValue; - } else if (Array.isArray(objValue)) { - return srcValue; - } - } - mergeWith(field, changeObject, customizer); - - // 更改DOM ViewModel节点 - const { valueChanging, valueChanged, groupId, groupName, updateOn, isSchemaRemoved, ...fieldChange } = changeObject; - const vmChangeSet = {}; - if (fieldChange && Object.keys(fieldChange).length > 0) { - vmChangeSet['fieldSchema'] = fieldChange; - } - if (Object.keys(changeObject).includes('valueChanging')) { - vmChangeSet['valueChanging'] = valueChanging; - } - if (Object.keys(changeObject).includes('valueChanged')) { - vmChangeSet['valueChanged'] = valueChanged; - } - if (Object.keys(changeObject).includes('groupId')) { - vmChangeSet['groupId'] = groupId; - } - if (Object.keys(changeObject).includes('groupName')) { - vmChangeSet['groupName'] = groupName; - } - if (Object.keys(changeObject).includes('updateOn')) { - vmChangeSet['updateOn'] = updateOn; - } - - this.domService.modifyViewModelFieldById(this.id, fieldId, vmChangeSet, isMerge); - } - - /** - * 修改分组 - * @param groupId - * @param groupName - */ - public changeGroupName(groupId: string, groupName: string) { - const fields = this.fields.filter(f => f.groupId === groupId); - fields.map(field => { - this.changeField(field.id, { groupName }); - }); - - } - - /** - * 由schema字段替换dgViewModel中的字段信息,并清空VM中的字段增量 - * (目前用于schema更新时字段类型发生变更的场景) - * @param schemaField - * @param dgField - */ - public clearFieldChange(schemaField: FormSchemaEntityField, dgField: DesignViewModelField) { - Object.assign(dgField, schemaField); - - this.domService.clearViewModelFieldSchema(this.id, dgField.id); - } -} -export class DesignViewModelField extends FormSchemaEntityField { - public valueChanging?: string; - public valueChanged?: string; - - public groupId?: string; - public groupName?: string; - - public isSchemaRemoved?: boolean; // 标识schema中已移除字段的场景 - public updateOn?: string; // 字段更新时机。 -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/drag-drop-context.ts b/packages/designer/projects/designer-services/src/lib/entity/drag-drop-context.ts deleted file mode 100644 index 8586167c2c40aed36447c5eac099e74ad6836659..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/drag-drop-context.ts +++ /dev/null @@ -1,188 +0,0 @@ -import { DesignViewModelField } from './design-viewmodel'; -import { FormVariable } from './dom-entity'; -import { FormSchemaEntityField, FormSchemaEntity } from './schema'; - -/** - * 拖拽上下文 - */ -export class ComponentResolveContext { - /** - * 拖拽来源 - * @summary - * 控件工具箱control/实体树字段field/实体树实体entity/ 现有控件移动位置move - */ - sourceType: 'control' | 'field' | 'entity' | 'move'; - - /** - * 拖拽控件类型 - */ - controlType: string; - - /** - * 拖拽控件的中文类型名称 - */ - controlTypeName: string; - /** - * 拖拽控件分类 - */ - controlCategory: string; - - /** - * 绑定对象类型(字段/实体/小部件) - */ - bindingType: 'field' | 'entity' | 'widget'; - - /** - * 字段绑定路径 - */ - bindingPath: string; - - /** - * 绑定字段标识 - */ - bindingTargetId: string; - - /** - * 目标区域是否在侧边栏中 - */ - bindingTargetInSidebar?: boolean; - - /** - * 当前移动的组件实例(用于组件移动位置) - */ - componentInstance?: any; - - /** - * 目标容器的组件实例 - */ - parentComponentInstance?: any; - - /** - * 在父组件中的位置 - */ - positionInParent?: number; - - /** - * 绑定信息 - */ - bindingSourceContext?: ComponentBindingSourceContext; - - /** - * 要添加的控件Schema - */ - componentSchema: any; - - /** - * 允许选择的实体级别,不填则不限制。 - * @summary - * 1:主表;2:从表;3从从表 - */ - allowedEntityLevel?: number; - - /** - * 展示字段列表是否需要排除掉已添加的字段 - * @summary - * 用于添加卡片组件时排除掉其他卡片中已有的字段 - */ - needExcludeDisplayedFields?: boolean; - - /** - * 实体列表是否需要排除掉已使用的实体 - */ - needExcludeDisplayedEntity?: boolean; - - /** 工具箱中的控件,启用的特性 */ - controlFeature: any; - - /** 拖拽组件后需要追加到schema中的实体结构 */ - addedEntity?: FormSchemaEntity; - - /** 拖拽组件后需要追加到schema中的实体结构 */ - addedEntityField?: FormSchemaEntityField; - - /** 控件默认映射的字段类型 */ - defaultFieldType: string; - - /** 控件默认映射的udt */ - defaultUdtId: string; - - /** 控件工具箱是否启用严格的匹配模式。例如严格模式下日期控件只能选择日期字段,非严格模式下,日期控件可以选择日期字段或字符串字段 */ - useStrictMappingRule?: boolean; - - /** 工具箱中的模板类控件信息,目前应用于零代码设计器 */ - controlTemplate?: { - - /** 模板id */ - templateId: string; - - /** 模板类控件DOM 结构 */ - templateDom?: any; - - /** 模板类控件分类:input/container */ - templateCategory?: string; - - /** 控件需要绑定的字段信息 */ - bindingFields?: FormSchemaEntityField[] - } -} - - -/** - * 绑定上下文 - */ -export class ComponentBindingSourceContext { - bindingType: 'field' | 'entity'; - componentNode?: any; - - /** - * 组件引用节点 - */ - componentRefNode?: any; - - /** - * 视图模型节点 - */ - viewModelNode?: any; - - /** 控件绑定的实体schema字段 */ - entityFieldNode?: FormSchemaEntityField; - - /** - * 实体schema字段对应的DesignViewModel结构 - */ - designViewModelField?: DesignViewModelField; - - /** - * 变量字段节点 - */ - variableFieldNode?: DesignFormVariable; - - extendInfo?: { [key: string]: any }; - - /** - * 要绑定的实体 - */ - bindingEntity?: FormSchemaEntity; - - /** - * 要绑定的字段集合 - */ - bindingEntityFields?: FormSchemaEntityField[]; - -} - -/** - * 表单变量 - */ -class DesignFormVariable extends FormVariable { - - /** - * 分组ID - */ - groupId: string; - - /** - * 分组名称 - */ - groupName: string; -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/form-metadata.ts b/packages/designer/projects/designer-services/src/lib/entity/form-metadata.ts deleted file mode 100644 index 1f393c6ff021ed833a5977395ab2a0d07434a537..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/form-metadata.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { - FormDeclaration, Subscription, FormExpression, FormComponent, - FormViewModel, FormExternalComponent, FormWebCmd, FormStateMachine -} from './dom-entity'; -import { FormSchema } from './schema'; - -/** 设计器运行环境 */ -export enum DesignerEnvType { - /** - * 设计时 - */ - designer = 'designer', - /** - * 运行时定制环境 - */ - runtimeCustom = 'runtimeCustom', - /** - * 移动审批环境 - */ - mobileDesigner = 'mobileDesigner', - /** - * 移动审批环境 - */ - mobileApprove = 'mobileApprove', - - /** - * 零代码设计环境 - */ - noCode = 'noCode', - -} - - -export class FormMetaDataContent { - Id: string; - Code: string; - Name: string; - Contents: FormMetadaDataDom; -} - -export class FormMetaDataContentForDB { - Id: string; - Code: string; - Name: string; - Contents: string; - - constructor(content: FormMetaDataContent) { - this.Id = content.Id; - this.Code = content.Code; - this.Name = content.Name; - this.Contents = JSON.stringify(content.Contents); - } -} - -export class FormMetadaDataDom { - module: FormMetaDataModule; - options?: FormOptions; -} - -export class FormMetaDataModule { - id: string; - code: string; - name: string; - caption: string; - type: string; - creator: string; - creationDate: Date; - updateVersion: string; - // 暂时不用 - showTitle: boolean; - // 暂时不用 - bootstrap: string; - // schema - schemas: Array; - - // 状态机 - stateMachines: Array; - - // 视图模型 - viewmodels: Array; - - // 源组件-事件-命令-目标组件的映射关系 - actions: Array; - - // 组件 - components: Array; - - // 构件 - webcmds: Array; - - serviceRefs: Array; - - // 表单所属模板 - templateId: string; - - // 是否组合表单 - isComposedFrm: boolean; - - // 表单所在的工程名 - projectName: string; - - // 自定义样式 - customClass: any; - - // 外部模块声明 - extraImports: Array<{ name: string, path: string }>; - - // 外部组件 - externalComponents: Array; - - // 当前组件声明:事件、变量、命令 - declarations: FormDeclaration; - - // 订阅 - subscriptions: Array; - - /** 表达式配置 */ - expressions: FormExpression[]; - - // 当前表单的展示形式:modal|page|sidebar - showType?: string; - - // 页面级按钮配置(目前用于Header和ModalFooter组件内部的工具栏按钮) - toolbar: { - items: { [viewModelId: string]: any }; - configs: { modal?: any, page?: any, sidebar?: any }, - }; - - qdpInfo: any; - - /** 表单元数据id */ - metadataId?: string; - - /** 用于零代码设计器 */ - oaVersion?: string; -} - - -export class FormOptions { - /** - * 启用静态文本 - */ - enableTextArea?: boolean; - /** - * 启用拖拽调整布局 - */ - enableDragAndDropToModifyLayout?: boolean; - - publishFormProcess?: boolean; - - /** - * 界面渲染模式:编译(生成代码并编译),动态渲染(动态解析,本地不生成代码,不编译) - */ - renderMode?: 'compile' | 'dynamic'; - - /** 变更集提交策略 */ - changeSetPolicy?: 'entire' | 'valid'; - - /** 启用服务器端变更检测:菜单或应用关闭前调用后端接口确认后端缓存中的数据是否已经保存并提示用户 */ - enableServerSideChangeDetection?: boolean; - - /** 生成表单代码时将之前的源码都删除 */ - enableDeleteSourceCode?: boolean; - - /** 表单是否可以被组合 */ - canBeComposed?: boolean; -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/form-template-outline.ts b/packages/designer/projects/designer-services/src/lib/entity/form-template-outline.ts deleted file mode 100644 index 224100e14a2cb6881fdfb7031366df9eca903ee0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/form-template-outline.ts +++ /dev/null @@ -1,52 +0,0 @@ - -export class FormTempateOutlineSchema { - /** 节点id */ - id: string; - - /** 节点类型 */ - type: string; - - /** 节点展示名称 */ - name: string; - - /** 节点在dom中的路径 */ - path: string | string[]; - - /** 图标,用于header区域 */ - icon?: string; - - /** 是否卡片容器(用于卡片模板like-card-container 容器) */ - hasLikeCardContainer?: boolean; - - /** 是否集合节点,用于section列表区域 */ - isGridCollection?: boolean; - - /** 子节点 */ - children?: Array; - - /** 多视图配置,用于列表区域 */ - multiView: { canEnable: boolean }; - - /** 筛选条配置,用于列表区域 */ - listFilter: { canEnable: boolean }; - - /** 筛选方案配置 */ - queryScheme: { - - canEnable: boolean, - - /** 筛选方案放置的位置 */ - position: string, - - /** 添加筛选方案后表单其他的节点需要修改class */ - relatedClass: [{ - - /** 需要增加class 的节点路径 */ - path: string, - /** 增加的class */ - class: string, - /** 追加class或者移除class ---目前没有用到,都是增加class */ - type: string - }] - }; -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/index.ts b/packages/designer/projects/designer-services/src/lib/entity/index.ts deleted file mode 100644 index baa1d30f98b309c377601f9163ed2ced5897f743..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export { DesignViewModel, DesignViewModelField } from './design-viewmodel'; - -export * from './dom-entity'; - -export * from './form-metadata'; - -export * from './schema'; - -export { ComponentResolveContext, ComponentBindingSourceContext } from './drag-drop-context'; - -export { FormTempateOutlineSchema } from './form-template-outline'; -export * from './types'; diff --git a/packages/designer/projects/designer-services/src/lib/entity/schema.ts b/packages/designer/projects/designer-services/src/lib/entity/schema.ts deleted file mode 100644 index 752a4cda150ce99df1c2f7430bf6a0a08ebe3197..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/schema.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { EnumData } from './dom-entity'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; -/** - * schema - */ -export class FormSchema { - // public dataSource: string; - public sourceUri: string; - public id: string; - public code: string; - public name: string; - public entities: FormSchemaEntity[]; - public variables: FormSchemaEntityField[]; - public eapiId: string; - public extendProperties: { enableStdTimeFormat: boolean }; - - public eapiCode?: string; - public eapiName?: string; - public eapiNameSpace?: string; - public voPath?: string; - public voNameSpace?: string; -} - -/** - * 实体 - */ -export class FormSchemaEntity { - public id: string; - public code: string; - public name: string; - public label: string; - public type: FormSchemaEntityType; -} - -/** - * 实体类型对象 - */ -export class FormSchemaEntityType { - public $type = 'EntityType'; - public name: string; - public primary: string; - public fields: FormSchemaEntityField[]; - public entities?: FormSchemaEntity[]; - public displayName?: string; -} - -/** - * 字段 - */ -export class FormSchemaEntityField { - public $type: FormSchemaEntityField$Type; - public id: string; - public originalId: string; - public code: string; - public label: string; - public bindingField: string; - public name: string; - public defaultValue?: any; - public require?: boolean; - public readonly?: boolean; - public type: FormSchemaEntityFieldType; - public editor?: FormSchemaEntityFieldEditor; - public path?: string; - public bindingPath?: string; - public multiLanguage?: boolean; - - // 表达式 - public expression?: any; -} - -/** - * 字段类型对象 - */ -export class FormSchemaEntityFieldType { - public $type: FormSchemaEntityFieldType$Type; - public name: FormSchemaEntityFieldTypeName | any; - public length?: number; - public precision?: number; - public valueType?: FormSchemaEntityFieldType; - public enumValues?: EnumData[]; - public fields?: FormSchemaEntityField[]; - public displayName?: string; - public primary?: string; - public entities?: FormSchemaEntity[]; - // 用于区分日期/日期事件和整型/浮点型数据 - public elementType?: GSPElementDataType; - - - // 扩展属性: 运行时定制用 - public extendProperty?: any; -} - -/** - * 字段编辑器对象 - */ -export class FormSchemaEntityFieldEditor { - public $type: string; - [propName: string]: any; -} - - -/** - * 字段类型枚举 - */ -export enum FormSchemaEntityField$Type { - /** - * 简单类型字段 - */ - SimpleField = 'SimpleField', - /** - * 关联/UDT类型字段 - */ - ComplexField = 'ComplexField' -} - -/** - * 字段类型对象中的类型枚举 - */ -export enum FormSchemaEntityFieldType$Type { - - /** - * 字符串 - */ - StringType = 'StringType', - /** - * 备注 - */ - TextType = 'TextType', - /** - * 数字(整数、浮点数) - */ - NumericType = 'NumericType', - /** - * 布尔 - */ - BooleanType = 'BooleanType', - /** - * 日期 - */ - DateType = 'DateType', - - /** - * 日期时间 - */ - DateTimeType = 'DateTimeType', - - /** - * 枚举 - */ - EnumType = 'EnumType', - /** - * 实体类 - */ - EntityType = 'EntityType', - - /** - * 分级码 - */ - HierarchyType = 'HierarchyType', - - /** - * 对象 - */ - ObjectType = 'ObjectType', - - /** - * 数字(大数据) - */ - BigNumericType = 'BigNumericType' -} - - -/** - * 字段类型中的名称 - */ -export enum FormSchemaEntityFieldTypeName { - /** - * 简单类型字段 - */ - String = 'String', - /** - * 日期时间 - */ - DateTime = 'DateTime', - /** - * 日期 - */ - Date = 'Date', - /** - * 枚举 - */ - Enum = 'Enum', - /** - * 布尔 - */ - Boolean = 'Boolean', - - /** - * 数字 - */ - Number = 'Number', - - /** - * 备注 - */ - Text = 'Text', - - /** - * 大数字 - */ - BigNumber = 'BigNumber' - /** - * 人员 - */ -} diff --git a/packages/designer/projects/designer-services/src/lib/entity/types.ts b/packages/designer/projects/designer-services/src/lib/entity/types.ts deleted file mode 100644 index 337d9b65a0fbe89719829f8f52408c37f6afa106..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/entity/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -export interface Node { - id: string; - type: string; - __parentId__?: string; - contents?: Node[]; - /** - * 组件类型 - */ - componentType?: string; - [prop: string]: any; -} -export enum NodeType { - /** - * 隐藏区域 - */ - HiddenContainer = 'HiddenContainer', - /** - * 帮助控件 - */ - LookupEdit = 'LookupEdit', - /** - * 组件 - */ - Component = 'Component' -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/services/data-states.service.ts b/packages/designer/projects/designer-services/src/lib/services/data-states.service.ts deleted file mode 100644 index c798d9cef150d59e5d5e4aa24d0801256bf0966e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/data-states.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Injectable } from '@angular/core'; -import { cloneDeep } from 'lodash-es'; - - - -/** - * 数据状态服务 - */ - -@Injectable({ - providedIn: 'root' -}) -export class DataStatesService { - constructor() { - } - dataStates: any; - dataStatesBindPath: any; - getDomJson(domJson) { - this.dataStates = []; - domJson.module.schemas[0].entities[0].type.fields.forEach(item => { - // 识别支持数据状态的情况; ComplexField:业务字段的类型 - if (item.$type == 'ComplexField') { - if (item.type.displayName == '状态' && item.type.name.includes('BillState')) { - this.dataStates = cloneDeep(item.type.fields[0].type.enumValues); - const bindingPath = item.type.fields[0].bindingPath || ''; - this.dataStatesBindPath = bindingPath.split('.')[0]; - return this.dataStates, this.dataStatesBindPath; - } - } - }) - return this.dataStates, this.dataStatesBindPath; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/design-viewmodel.service.ts b/packages/designer/projects/designer-services/src/lib/services/design-viewmodel.service.ts deleted file mode 100644 index 031790993de92d5d1075a7ab1683816fc16ea357..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/design-viewmodel.service.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DesignViewModel, DesignViewModelField } from '../entity/design-viewmodel'; -import { merge } from 'lodash-es'; -import { FormBindingType } from '../entity/dom-entity'; -import { FormSchemaEntityField } from '../entity/schema'; -import { TreeNode } from '@farris/ui-treetable'; -import { DomService } from './dom.service'; -import { SchemaService } from './schema.service'; -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; - -/** - * 操作表单设计时ViewModel的工具类 - */ -@Injectable({ - providedIn: 'root' -}) -export class DesignViewModelService { - - private dgViewModels: DesignViewModel[]; - - constructor( - private domService: DomService, - private schemaService: SchemaService) { } - - /** - * 根据viewModelId获取视图模型 - * @param viewModelId 视图模型标识 - */ - getDgViewModel(viewModelId: string): DesignViewModel { - return this.dgViewModels.find(dgVM => dgVM.id === viewModelId); - } - /** - * 获取所有的视图模型 - */ - getDgViewModels(): DesignViewModel[] { - return this.dgViewModels; - } - /** - * 根据ID删除整个ViewModel:用于组件的删除 - * @param viewModelId viewModelId - */ - deleteViewModelById(viewModelId) { - const index = this.dgViewModels.findIndex(vm => vm.id === viewModelId); - if (index > -1) { - this.dgViewModels.splice(index, 1); - - this.domService.deleteViewModelById(viewModelId); - - } - } - /** - * 组装各VM下的字段完整信息:schema字段 + 视图模型记录的变更 + 视图模型的值变化等属性 => 树表数据 - */ - assembleDesignViewModel() { - // 组装过程中可能有设计器补充的属性,用户并不感知这种变更,所以不需要通知IDE框架 - window['suspendChangesOnForm'] = true; - - const dgViewModels = []; - const viewModels = this.domService.viewmodels; - viewModels.forEach(viewModel => { - const fields = []; - if (viewModel.fields) { - viewModel.fields.forEach(field => { - if (field.type !== FormBindingType.Form) { - return; - } - const dgVMField = {}; - const schema = this.schemaService.getFieldByIDAndVMID(field.id, viewModel.id); - if (!schema || !schema.schemaField) { - // 字段已移除 - merge(dgVMField, field, field.fieldSchema || {}, - { - groupId: field.groupId, groupName: field.groupName, - valueChanging: field.valueChanging, valueChanged: field.valueChanged, - isSchemaRemoved: true - }); - - } else { - const schemaField = schema.schemaField; - - this.adaptOldViewModelField(field, schemaField); - - // 组装数据 - merge(dgVMField, schemaField, field.fieldSchema || {}, - { - groupId: field.groupId, groupName: field.groupName, - valueChanging: field.valueChanging, valueChanged: field.valueChanged, - updateOn: field.updateOn - }); - } - - fields.push(dgVMField); - }); - } - - this.adaptOldViewModel(viewModel); - - const dgViewModel = new DesignViewModel(viewModel.id, fields, this.domService); - - dgViewModels.push(dgViewModel); - }); - this.dgViewModels = dgViewModels; - - window['suspendChangesOnForm'] = false; - } - /** - * 获取指定VM下所有的字段,并组装成树结构 - * @param viewModelId 视图模型标识 - */ - getAllFields2TreeByVMId(viewModelId: string): TreeNode[] { - const schemaFields: FormSchemaEntityField[] = this.schemaService.getFieldsByViewModelId(viewModelId); - if (!schemaFields) { - return []; - } - const dgVM = this.dgViewModels.find(d => d.id === viewModelId); - - if (dgVM) { - return this.mergeFields2Tree(schemaFields, dgVM.fields); - } else { - return []; - } - } - - - private mergeFields2Tree(schemaFields: FormSchemaEntityField[], dgVMFields: DesignViewModelField[], bindingPath = ''): TreeNode[] { - const treeData: TreeNode[] = []; - schemaFields.forEach(element => { - // 补充bindingPath属性 - if (!element.bindingPath) { - element.bindingPath = (bindingPath ? bindingPath + '.' : '') + element.label; - } - - // 关联表字段 / UDT字段 - let children: TreeNode[] = []; - if (element.type && element.type.fields && element.type.fields.length > 0) { - children = this.mergeFields2Tree(element.type.fields, dgVMFields, element.bindingPath); - - } - - let dgField = dgVMFields.find(d => d.id === element.id); - if (!dgField) { - dgField = merge({}, element); - } - treeData.push({ - data: dgField, - children, - expanded: true, - selectable: children.length > 0 ? false : true - }); - }); - return treeData; - } - - /** - * 适配旧表单VM属性 - * @param viewModel VM - */ - private adaptOldViewModel(viewModel: any) { - // 补充是否开启校验属性 - if (viewModel.id !== ROOT_VIEW_MODEL_ID && !Object.keys(viewModel).includes('enableValidation')) { - viewModel.enableValidation = false; - } - - // 补充复用会话属性 - if (viewModel.id === ROOT_VIEW_MODEL_ID && !Object.keys(viewModel).includes('enableUnifiedSession')) { - viewModel.enableUnifiedSession = false; - } - - // 旧表单ViewModel的名称为id值,改成对应表的表名 - if (viewModel.id === viewModel.name) { - const tableInfo = this.schemaService.getTableInfoByViewModelId(viewModel.id); - if (tableInfo) { - viewModel.name = tableInfo.name; - } - } - - // 补充列表分页条数 - if (viewModel.pagination && !viewModel.pagination.pageList && viewModel.pagination.pageSize) { - viewModel.pagination.pageList = '10,20,30,50,100'; - if (viewModel.pagination.pageSize && !viewModel.pagination.pageList.includes(viewModel.pagination.pageSize)) { - let pageList = [10, 20, 30, 50, 100, viewModel.pagination.pageSize]; - pageList = pageList.sort((A, B) => A - B); - viewModel.pagination.pageList = pageList.toString(); - } - - } - } - - - /** - * 适配旧表单VM字段属性 - * @param viewModel VM - */ - private adaptOldViewModelField(vmField: any, schemaField: any) { - - // 升级旧表单,补充更新时机属性。 - if (!vmField.updateOn) { - let updateOn = 'blur'; - const editorType = schemaField.editor && schemaField.editor.$type; - if (editorType === 'EnumField' || editorType === 'CheckBox') { - updateOn = 'change'; - } - vmField.updateOn = updateOn; - } - - if (vmField.fieldSchema) { - // ComboList 强制替换为EnumField - if (vmField.fieldSchema.editor && vmField.fieldSchema.editor.$type === 'ComboList') { - vmField.fieldSchema.editor.$type = 'EnumField'; - } - - // DatePicker 强制替换为DateBox - if (vmField.fieldSchema.editor && vmField.fieldSchema.editor.$type === 'DatePicker') { - vmField.fieldSchema.editor.$type = 'DateBox'; - } - } - } - -} diff --git a/packages/designer/projects/designer-services/src/lib/services/designer-host.service.ts b/packages/designer/projects/designer-services/src/lib/services/designer-host.service.ts deleted file mode 100644 index ebcc122d50da92579db572b681e39eff8638d7d6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/designer-host.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Injectable } from '@angular/core'; -import { IDesignerHost, IControlService } from '@farris/designer-element'; - -/** 控件列表 */ -export let DgControl: any = {}; - -/** - * 接收service - */ -@Injectable({ - providedIn: 'root' -}) -export class DesignerHostSettingService { - - public designerHost: IDesignerHost; - - /** 控件相关服务 */ - public controlService: IControlService; - - /** 创建控件相关服务 */ - public controlCreatorService: any; - - - setDesignerHost(designerHost: IDesignerHost) { - this.designerHost = designerHost; - - this.controlService = this.designerHost.getService('ControlService'); - - this.controlCreatorService = this.designerHost.getService('ControlCreatorService'); - - DgControl = this.controlService.getDgControl(); - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/dom.service.ts b/packages/designer/projects/designer-services/src/lib/services/dom.service.ts deleted file mode 100644 index dae2724881634c638d10e82dad7d0795e08e96e4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/dom.service.ts +++ /dev/null @@ -1,1321 +0,0 @@ -import { Injectable } from '@angular/core'; -import { cloneDeep, mergeWith } from 'lodash-es'; -import { Node, NodeType } from '../entity'; -import { FormBindingType, FormComponent, FormDeclaration, FormExpression, FormExternalComponent, FormVariable, FormVariableCategory, FormVariableTypes, FormViewModel, FormViewModelField, FormWebCmd, Subscription } from '../entity/dom-entity'; -import { FormMetadaDataDom, FormMetaDataModule } from '../entity/form-metadata'; -import { FormTempateOutlineSchema } from '../entity/form-template-outline'; -import { FormSchema, FormSchemaEntity, FormSchemaEntityField } from '../entity/schema'; -import { DgControl } from './designer-host.service'; -import onChange from '@farris/on-change'; -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; - -/** - * 操作表单DOM的工具类 - */ -@Injectable({ - providedIn: 'root' -}) -export class DomService { - /** 表单元数据结构,实时 */ - private _domJson: FormMetadaDataDom; - - /** 打开表单设计器时的DOM元数据结构,与be数据保持一致 */ - private previousDomJson: FormMetadaDataDom; - - private nodeTypeCollect: Map = new Map(); - // private nodeIdCollect: Map = new Map(); - - /** 映射JSON结构映射:<控件id, 控件JSON> */ - public domDgMap = new Map(); - - /** 当前表单所属模板的大纲schema结构 */ - templateOutlineSchema: FormTempateOutlineSchema[]; - - /** 控件id与控件展示名称、控件路径的映射 <控件id, {showName:控件展示名称,parentPathName:控件路径} */ - public controlBasicInfoMap = new Map(); - - - constructor() { } - - /** - * 设置DOM JSON 数据 - * @param domJson DOM JSON结构 - * @param domChangedCallback DOM结构变化后的回调事件 - */ - setDomJson(domJson: any, domChangedCallback?: (path: string, newValue: any, previousValue: any) => void) { - if (!domJson || !domJson.module) { - return; - } - this._adaptUpdateVersion(domJson); - - if (domChangedCallback) { - // 设置代理,监听属性变化 - this._domJson = onChange(domJson, (path, value, previousValue, applyData) => { - // JSON变更后的回调 - domChangedCallback(path, value, previousValue); - }); - } else { - this._domJson = domJson; - } - - } - - getDomJson() { - return this._domJson; - } - - get microApp(): any | null { - let appinfor: any | null = null; - try { - appinfor = window.top['ncdp']['applicationInfo']; - } catch (error) { - } - return appinfor; - } - - get viewmodels() { - return this._domJson ? this._domJson.module.viewmodels : null; - } - set viewmodels(value) { - this._domJson.module.viewmodels = value; - } - - get components(): FormComponent[] { - return this._domJson.module.components; - } - set components(value) { - this._domJson.module.components = value; - } - - get options() { - return this._domJson ? this._domJson.options : null; - } - - set options(value) { - this._domJson.options = value; - } - - get module(): FormMetaDataModule { - return this._domJson ? this._domJson.module : null; - } - set module(value) { - this._domJson.module = value; - } - - get webCmds() { - return this._domJson.module.webcmds; - } - - get expressions(): FormExpression[] { - return this._domJson ? this._domJson.module.expressions : null; - } - - set expressions(value) { - this._domJson.module.expressions = value; - } - - /** - * 设置打开表单设计器时的DOM元数据结构,与be数据保持一致 - */ - setPreviousDomJson(domJson) { - if (!domJson || !domJson.module) { - return; - } - this.previousDomJson = domJson; - } - /** - * 获取表单设计器时的DOM元数据结构,与be数据保持一致 - */ - getPreviousDomJson() { - return this.previousDomJson; - } - - /** - * 更新控件JSON结构映射 - * @param componentInstanceList 控件实例列表 - */ - updateDomDgMap(componentInstanceList: any[]) { - this.domDgMap.clear(); - for (const cmp of componentInstanceList) { - this.domDgMap.set(cmp.id, cmp.component); - } - } - /** - * 获取schemas节点下的uri (目前仅支持单一数据源) - */ - getSchemas(): FormSchema { - const schemas = this._domJson.module.schemas; - if (!schemas || schemas.length === 0) { - return; - } - return schemas[0]; - - } - - setSchemas(schemaObject) { - if (!schemaObject) { - return; - } - this._domJson.module.schemas = [schemaObject]; - } - - setSchemaEntity(schemEntities: FormSchemaEntity[]) { - const schema = this.getSchemas(); - schema.entities = schemEntities; - } - - getQDPInfo() { - const qdpInfo = this._domJson.module.qdpInfo; - if (qdpInfo && qdpInfo.qoMetadata && qdpInfo.qoMetadata.length) { - return qdpInfo; - } else { - return null; - } - } - - getUpdateVersion() { - return this._domJson.module.updateVersion; - } - - get extraImports(): Array<{ name: string, path: string }> { - return this._domJson ? this._domJson.module.extraImports : null; - } - - set extraImports(value: Array<{ name: string, path: string }>) { - this._domJson.module.extraImports = value; - } - - /** - * 深层查找控件 - */ - getComponetsByPredicate(predicate: (component) => boolean) { - const targetComponets = []; - const predicateFun = predicate; - const findTarget = (contentComponents) => { - contentComponents.forEach(function (component) { - if (predicateFun(component)) { - targetComponets.push(component); - } - if (component.contents && component.contents.length) { - findTarget(component.contents); - } - }); - }; - - findTarget(this.components); - return targetComponets; - } - - /** - * 根据组件ID获取components下相应的组件节点 - * @param componentId 组件标识 - */ - getComponentById(componentId, deep = false) { - if (!this.components || this.components.length === 0) { - return; - } - if (deep) { - const targetComponet = this.getComponetsByPredicate((item) => item.id === componentId); - return targetComponet ? targetComponet[0] : null; - } else { - return this.components.find(cmp => cmp.id === componentId); - } - } - - /** - * 根据VM ID获取相应组件 - * @param viewModelId VMID - */ - getComponentByVMId(viewModelId: string) { - return this.components.find(cmp => cmp.viewModel === viewModelId); - } - - /** - * 根据viewModelId获取模型节点 - * @param viewModelId 视图模型标识 - */ - getViewModelById(viewModelId): FormViewModel { - if (!this.viewmodels || this.viewmodels.length === 0 || !viewModelId) { - return; - } - return this.viewmodels.find(vm => vm.id === viewModelId); - } - - getViewModelFieldById(viewModelId: string, fieldId: string) { - const vm = this.getViewModelById(viewModelId); - return vm.fields.find(f => f.id === fieldId); - } - getViewModelByFieldId(fieldId: string): FormViewModel { - let viewModel: FormViewModel; - for (const vm of this.viewmodels) { - const field = vm.fields.find(f => f.id === fieldId); - if (field) { - viewModel = vm; - break; - } - } - return viewModel; - } - /** - * 校验指定VM下是否重复绑定字段或变量 - * @param viewModelId 视图模型标识 - * @param newFieldId 字段标识 - */ - checkViewModelDulplicated(viewModelId, newFieldId) { - if (!viewModelId || !newFieldId) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - - // 判断重复绑定 - const exsitVM = viewModel.fields.find(f => f.id === newFieldId); - if (exsitVM) { - return true; - } - return false; - } - /** - * 修改ViewModel Field - * @param viewModelId VM ID - * @param fieldId 修改前binding.field取值 - * @param changeObject 变更集 - */ - modifyViewModelFieldById(viewModelId, fieldId, changeObject, isMerge = true) { - if (!viewModelId || !changeObject) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - let field; - if (fieldId) { - field = viewModel.fields.find(f => f.id === fieldId); - } - function customizer(objValue, srcValue) { - if (!isMerge) { - return srcValue; - } else if (Array.isArray(objValue)) { - return srcValue; - } - } - if (field) { - // 数组类型不再合并,全量替换:用户枚举数据的更改 - mergeWith(field, changeObject, customizer); - } else { - changeObject.groupId = null; - changeObject.groupName = null; - this.addViewModelField(viewModelId, changeObject); - } - } - - /** - * 控件新增绑定添加ViewModel Field - */ - addViewModelField(viewModelId, filedObject: FormViewModelField) { - if (!viewModelId || !filedObject) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - - if (!viewModel.fields.find(field => field.id === filedObject.id)) { - viewModel.fields.push(filedObject); - } - - } - - /** - * 根据VMID修改ViewModel节点 - * @param vmId 视图模型标识 - * @param vmFields 字段集合 - */ - setViewModelFieldsById(vmId, vmFields) { - if (!this.viewmodels || this.viewmodels.length === 0 || !vmId) { - return; - } - const oldVM = this.viewmodels.find(vm => vm.id === vmId); - oldVM.fields = vmFields; - } - - /** - * 修改VM字段的分组名称 - * @param viewModelId 视图模型标识 - * @param groupId 分组标识 - * @param groupName 分组名称 - */ - modifyGroupNameById(viewModelId, groupId, groupName) { - const vm = this.getViewModelById(viewModelId); - vm.fields.forEach(field => { - if (field.groupId !== groupId) { return; } - field.groupName = groupName; - }); - } - - /** - * 根据ID删除ViewModel中的field节点 - * @param viewModelId 视图模型标识 - * @param fieldId 字段标识 - */ - deleteViewModelFieldById(viewModelId: string, fieldId: string) { - if (!viewModelId || !fieldId) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - if (!viewModel) { - return; - } - viewModel.fields = viewModel.fields.filter(f => f.id !== fieldId); - } - - /** - * 清除视图模型中针对字段的修改 - * @param viewModelId 视图模型标识 - * @param fieldId 字段标识 - */ - clearViewModelFieldSchema(viewModelId, fieldId) { - if (!viewModelId) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - let field; - if (fieldId) { - field = viewModel.fields.find(f => f.id === fieldId); - } - if (field) { - field.fieldSchema = {}; - } - } - /** - * 根据ID删除整个ViewModel - * @param viewModelId 视图模型标识 - */ - deleteViewModelById(viewModelId) { - const index = this.viewmodels.findIndex(vm => vm.id === viewModelId); - this.viewmodels.splice(index, 1); - } - - /** - * 删除dom中components下的组件节点 - * @param cmpId 组件ID - */ - deleteComponent(cmpId: string) { - if (!this._domJson || !this._domJson.module || !cmpId || !this._domJson.module.components) { - return []; - } - this._domJson.module.components = this._domJson.module.components.filter(c => c.id !== cmpId); - } - - /* - * 获取表单引用的命令构件信息 - */ - getWebCmds(): FormWebCmd[] { - return this._domJson.module.webcmds; - } - - getServiceRefs(): any[] { - return this._domJson.module.serviceRefs || []; - } - - /** - * 获取表单ViewModel中的命令,构建treetable数据,用于事件的选择窗口 - * 树表中额外增加commandPath属性(命令所在viewModelId.commandCode),用于窗口展开时数据行的回显。 - */ - getCommandsTreeTable(viewModelId: string, showEmptyViewModelNode = false) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - const commandTree = []; - // 获取根ViewModel和其他所有ViewModel的命令 - if (!viewModelId || viewModelId === ROOT_VIEW_MODEL_ID) { - - for (let index = 0; index < this.viewmodels.length; index++) { - const viewModel = this.viewmodels[index]; - if (viewModel.fakeDel) { - continue; - } - const children = []; - - viewModel.commands.forEach(command => { - children.push({ data: { ...command, commandPath: viewModel.id + '.' + command.code }, children: [], selectable: true }); - }); - - - if (showEmptyViewModelNode || children.length) { - commandTree.push({ - data: { id: viewModel.id, code: viewModel.code, name: viewModel.name + '视图模型', commandPath: viewModel.id }, - children, - selectable: false, expanded: true - }); - } - - } - let rootVm; - if (commandTree.length > 1) { - // 根节点 - rootVm = commandTree[0]; - const childVmList = commandTree.slice(1, commandTree.length); - rootVm.children.push(...childVmList); - return [rootVm]; - } - return commandTree; - } - - // 获取指定viewModel的命令 - const selectedViewModel = this.viewmodels.find(vm => vm.id === viewModelId); - selectedViewModel.commands.forEach(command => { - commandTree.push({ - data: { ...command, commandPath: selectedViewModel.id + '.' + command.code }, - children: [], selectable: true - }); - }); - if (commandTree.length) { - return [{ - data: { - id: selectedViewModel.id, code: selectedViewModel.code, name: selectedViewModel.code + '视图模型', - commandPath: selectedViewModel.id - }, - children: commandTree, - selectable: false, - expanded: true - }]; - } - return []; - - - } - - /** - * 获取所有的命令,平铺成数组 - */ - getAllPlainCommands(): any[] { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - const commands = []; - // 获取根ViewModel和其他所有ViewModel的命令 - this.viewmodels.forEach(viewModel => { - viewModel.commands.forEach(command => { - commands.push({ ...command, commandPath: viewModel.id + '.' + command.code }); - }); - }); - return commands; - } - - /** - * 获取ViewModel中组件上下文变量,构建treetable数据,用于变量绑定的选择窗口 - */ - getLocaleVariablesByViewModelId(viewModelId: string) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return []; - } - const viewModel = this.getViewModelById(viewModelId); - if (!viewModel || !viewModel.states || viewModel.states.length === 0) { - return []; - } - - const children = []; - viewModel.states.forEach(variable => { - if (!variable.category || variable.category === FormVariableCategory.locale) { - // 增加中文类型名称,用于界面展示 - let displayTypeName = variable.type; - const vt = FormVariableTypes.find(v => v.value === variable.type); - if (vt) { - displayTypeName = vt.text; - } - - children.push({ data: { ...variable, displayTypeName }, children: [], selectable: true, viewModelId }); - } - }); - - if (!children.length) { - return []; - } - const rootVm = { - data: { id: viewModel.id, name: viewModel.name + '组件' }, - children, - selectable: false, - expanded: true, - nodeType: 'vmNode' - }; - - return [rootVm]; - } - /** - * 获取ViewModel中远程(VO)上下文变量,构建treetable数据,用于变量绑定的选择窗口 - */ - getRemoteVariables() { - if (!this.viewmodels || this.viewmodels.length === 0) { - return []; - } - const viewModel = this.getViewModelById(this.getRootViewModelId()); - if (!viewModel || !viewModel.states || viewModel.states.length === 0) { - return []; - } - - const children = []; - viewModel.states.forEach(variable => { - if (variable.category === FormVariableCategory.remote) { - // 增加中文类型名称,用于界面展示 - let displayTypeName = variable.type; - const vt = FormVariableTypes.find(v => v.value === variable.type); - if (vt) { - displayTypeName = vt.text; - } - - children.push({ data: { ...variable, displayTypeName }, children: [], selectable: true }); - } - }); - return children; - } - - /** - * 更新远程变量 - * @param varList 变量列表 - */ - updateRemoteVariables(varList: FormSchemaEntityField[]) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - const viewModel = this.getViewModelById(this.getRootViewModelId()); - const currentStates = viewModel.states.filter(s => s.category === 'remote'); - const vmVarList = this.changeSchemaVariable2VMVariable(varList); - - // 为了不引起DOM JSON的变更,增加判断 - if (currentStates && vmVarList && JSON.stringify(currentStates) !== JSON.stringify(vmVarList)) { - viewModel.states = viewModel.states.filter(s => !s.category || s.category === 'locale'); - viewModel.states.push(...vmVarList); - } - } - - /** - * schema中的变量转换为VM上的变量 - * @param schemaVarList 变量列表 - */ - private changeSchemaVariable2VMVariable(schemaVarList: FormSchemaEntityField[]) { - if (!schemaVarList || schemaVarList.length === 0) { - return []; - } - const vmVarList: FormVariable[] = []; - schemaVarList.forEach(v => { - const rv: FormVariable = { - id: v.id, - code: v.label, - name: v.name, - defaultValue: v.defaultValue, - type: v.type.name, - category: 'remote' - }; - if (v.$type !== 'SimpleField' && v.type.fields) { - rv.type = 'Object'; - rv.fields = this.changeSchemaVariable2VMVariable(v.type.fields); - } - - vmVarList.push(rv); - }); - return vmVarList; - } - /** - * 保存变量(全量) - * @param states 变量列表 - * @param viewModelId 变量所属viewModel ID - */ - saveVariables(states: FormVariable[], viewModelId: string) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - viewModel.states.length = 0; - viewModel.states.push(...states); - } - - /** - * 获取指定变量 - */ - getVariableByIdAndVMID(varId: string, viewModelId: string) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - const viewModel = this.getViewModelById(viewModelId); - const variable = viewModel.states.find(v => v.id === varId); - return variable; - } - - /** - * 获取指定变量 - */ - getVariableById(varId: string) { - if (!this.viewmodels || this.viewmodels.length === 0) { - return; - } - for (const viewModel of this.viewmodels) { - const variable = viewModel.states.find(v => v.id === varId); - if (variable) { - return variable; - } - } - } - /** - * 获取所有VM下的变量,组装成树结构 - * 树表中额外增加statePath属性(命令所在viewModelId.variableCode),用于窗口展开时数据行的回显。 - */ - getAllVariables() { - if (!this.viewmodels || this.viewmodels.length === 0) { - return []; - } - const vmTree = []; - this.viewmodels.forEach(viewModel => { - if (!viewModel || !viewModel.states || viewModel.states.length === 0) { - return []; - } - - const children = []; - viewModel.states.forEach(variable => { - children.push({ data: { ...variable, statePath: viewModel.id + '.' + variable.code }, children: [], selectable: true }); - }); - - const rootVm = { - data: { id: viewModel.id, code: viewModel.code, name: viewModel.name + '视图模型', statePath: viewModel.id }, - children, - selectable: false, expanded: true - }; - vmTree.push(rootVm); - - }); - return vmTree; - } - - /** - * 获取所有VM下的变量并平铺成数组 - * 额外增加statePath属性(命令所在viewModelId.variableCode),用于唯一标识 - */ - getAllPlainVariables(): any[] { - if (!this.viewmodels || this.viewmodels.length === 0) { - return []; - } - const varArray = []; - this.viewmodels.forEach(viewModel => { - if (!viewModel || !viewModel.states || viewModel.states.length === 0) { - return []; - } - viewModel.states.forEach(variable => { - varArray.push({ ...variable, statePath: viewModel.id + '.' + variable.code }); - }); - }); - return varArray; - } - - /** - * 1月3号以前的盘中缺失updateVersion字段,默认添加181225(上一次执行表单升级工具后的统一版本号) - */ - _adaptUpdateVersion(domJson: any) { - if (!domJson.module.updateVersion) { - domJson.module.updateVersion = '181225'; - } - } - - - /** - * 获取组件声明 - */ - getComponentDeclarations(): FormDeclaration { - if (!this._domJson || !this._domJson.module) { - return {}; - } - return this._domJson.module.declarations; - } - /** - * 修改组件事件声明 - * @param data 组件声明数据 - */ - setComponentDeclarations(data) { - this._domJson.module.declarations = data; - } - - /** - * 获取事件订阅 - */ - getComponentSubscriptions(sourceComponent = ''): Subscription[] { - if (!this._domJson || !this._domJson.module || !this._domJson.module.subscriptions || - this._domJson.module.subscriptions.length === 0) { - return []; - } - if (!sourceComponent) { - return this._domJson.module.subscriptions; - } - const subList = this._domJson.module.subscriptions.filter(sub => sub.sourceComponent === sourceComponent); - return subList; - } - - /** - * 修改事件订阅 - * @param data 事件订阅数据 - */ - setComponentSubscriptions(data = []) { - if (!this._domJson || !this._domJson.module) { - return; - } - this._domJson.module.subscriptions = data; - } - - deleteComponentSubscription(cmpId: string) { - if (!this._domJson || !this._domJson.module || !this._domJson.module.subscriptions) { - return; - } - - const subscriptions = this._domJson.module.subscriptions; - this._domJson.module.subscriptions = subscriptions.filter( - (item) => item.sourceComponent !== cmpId - ); - } - - /** - * 设置外部组件信息 - * @param cmpInfo 组件信息 - * @param cmpId 外部组件id - */ - setExternalComponent(cmpInfo: any, cmpId: string) { - if (!this._domJson || !this._domJson.module) { - return; - } - if (!this._domJson.module.externalComponents) { - this._domJson.module.externalComponents = []; - } - if (!cmpId) { // 新增 - // if (cmpInfo.type === DgControl.ModalContainer.type) { // ModalContainer与内部实体是一对一映射 - // const externalComponentArray = this.getExternalComponentByContainerId(cmpInfo.containerId); - // if (externalComponentArray !== undefined && externalComponentArray !== null && externalComponentArray.length > 0) { - // externalComponentArray.forEach(externalComponent => { - // this.deleteExternalComponent(externalComponent.id); - // }); - // } - // } - this._domJson.module.externalComponents.push(cmpInfo); - } else { - // 修改 - this._domJson.module.externalComponents = this._domJson.module.externalComponents.filter(e => e.id !== cmpId); - this._domJson.module.externalComponents.push(cmpInfo); - - } - - // 更新组合表单标识 - if (this._domJson.module.externalComponents.length === 0) { - this._domJson.module.isComposedFrm = false; - } else { - this._domJson.module.isComposedFrm = true; - } - } - /** - * 根据容器ID获取外部组件节点 - * @param containerId 容器ID - * 由ExternalContainer、ModalContainer引入的外部组件,containerId是容器id - * 筛选方案中智能输入框弹出表单的场景:containerId是绑定字段id - */ - getExternalComponentByContainerId(containerId: string): FormExternalComponent { - if (!this._domJson || !this._domJson.module || !this._domJson.module.externalComponents || !containerId) { - return; - } - return this._domJson.module.externalComponents.find(e => e.containerId === containerId); - } - - /** - * 根据ID获取外部组件 - * @param cmpId 组件ID - */ - getExternalComponent(cmpId = ''): FormExternalComponent[] { - if (!this._domJson || !this._domJson.module || !this._domJson.module.externalComponents) { - return []; - } - - // 筛选当前生效的外部组件:一些场景下externalComponents节点下会出现冗余的组件 TODO 待优化 - // const compStr = JSON.stringify(this._domJson.module.components); - // if (this._domJson.module.externalComponents && this._domJson.module.externalComponents.length) { - // this._domJson.module.externalComponents = this._domJson.module.externalComponents.filter(element => { - // if (compStr.indexOf(element.id) < 0) { - // return false; - // } - // return true; - // }); - // } - - if (!cmpId) { - return this._domJson.module.externalComponents; - } - return this._domJson.module.externalComponents.filter(e => e.id === cmpId); - } - - /** - * 删除外部组件 - * @param cmpId 组件id - */ - deleteExternalComponent(cmpId: string) { - if (!this._domJson || !this._domJson.module || !cmpId || !this._domJson.module.externalComponents) { - return []; - } - this._domJson.module.externalComponents = this._domJson.module.externalComponents.filter(c => c.id !== cmpId); - - // 更新组合表单标识 - if (this._domJson.module.externalComponents.length === 0) { - this._domJson.module.isComposedFrm = false; - } else { - this._domJson.module.isComposedFrm = true; - } - } - - - - /** - * 获取指定VM关联的组件中绑定指定字段的控件(目前只有一个控件) - * @param viewModelId VM标识 - * @param fieldId 字段标识 - */ - getControlsInCmpWidthBinding(viewModelId: string, fieldId: string) { - const cmp = this.components.find(c => c.viewModel === viewModelId); - - return this.getControlsByBinding(cmp.contents, fieldId); - } - - /** - * 获取指定VM关联的组件中绑定指定字段的控件 - * @param contents DOM节点 - * @param fieldId 字段标识 - */ - private getControlsByBinding(contents: any[], fieldId: string) { - let controls = []; - for (const element of contents) { - if ((DgControl.DataGrid && element.type === DgControl.DataGrid.type ) || (DgControl.TreeGrid && element.type === DgControl.TreeGrid.type)) { // 列表 - const childControls = this.getControlsByBinding(element.fields, fieldId); - controls = controls.concat(childControls); - } else if (DgControl.Table && element.type === DgControl.Table.type) { // Table - const tdControls = this.getControlEditorsInTable(element.rows, fieldId); - controls = controls.concat(tdControls); - } else if (element.contents) { // 容器组件 - const childControls = this.getControlsByBinding(element.contents, fieldId); - controls = controls.concat(childControls); - } else if (element.binding && element.binding.type === FormBindingType.Form && element.binding.field === fieldId) { - controls.push(element); - } - } - - return controls; - } - - private getControlEditorsInTable(tableRows: any[], fieldId: string) { - const controls = []; - if (tableRows && tableRows.length) { - tableRows.forEach(row => { - row.columns.forEach(column => { - if (column.tdType === 'editor' && column.editor && column.editor.binding) { - if (column.editor.binding.type && column.editor.binding.type === FormBindingType.Form && column.editor.binding.field === fieldId) { - controls.push(column.editor); - } - } - }); - }); - } - - return controls; - } - - /** - * 获取节点下所有 components ID 列表 - * @param eleContents [] - * @returns string[] - */ - getALLComponentsIDList(eleContents: { type: string, component: any, contents: [] }[]): string[] { - let deIDList = []; - eleContents.forEach(element => { - if (element.type === 'ComponentRef') { - const targetComponents = this.components.find((item) => { - return item.id === element.component; - }); - deIDList.push(targetComponents.id); - // 这段没有必要,因为没有嵌套的component - if (targetComponents && targetComponents.contents) { - if (targetComponents.contents && targetComponents.contents.length) { - deIDList = deIDList.concat(this.getALLComponentsIDList(targetComponents.contents)); - } - } - } - if (element.contents && element.contents.length) { - deIDList = deIDList.concat(this.getALLComponentsIDList(element.contents)); - } - }); - return deIDList; - } - - /** - * 添加component 方法 - */ - addComponent(component: FormComponent): string { - // 不再复用之前删除的Component - // let oldComponentIndex = 0; - // const oldComponent = this.components.find((item, index) => { - // oldComponentIndex = index; - // return item.viewModel === component.viewModel && item.fakeDel; - // }); - // if (oldComponent) { - // component.id = oldComponent.id; - // this.components[oldComponentIndex] = component; - // } else { - this.components.push(component); - // } - return component.id; - } - - /** - * 添加 viewModel 方法 - * @param viewModel:FormViewModel - * @returns string viewModel id - */ - public addViewModel(viewModel: FormViewModel): string { - // 不再复用之前删除的viewModel - // let oldViewModelIndex = 0; - // const oldViewModel = this.viewmodels.find((item, index) => { - // oldViewModelIndex = index; - // return item.bindTo === viewModel.bindTo && item.fakeDel; - // }); - // if (oldViewModel) { - // viewModel.id = oldViewModel.id; - // this.viewmodels[oldViewModelIndex] = viewModel; - // } else { - this.viewmodels.push(viewModel); - // } - return viewModel.id; - } - - /** - * 场景:在表单上删除tabPage/datagrid后,不能真正删除component和viewModel节点,不然会造成编译错误,故将component和viewmodel标记为fakeDel - */ - remarkComponentFakeDel(removedComponentIdList: string[]): void { - removedComponentIdList.forEach(element => { - const targetComponent = this.getComponentById(element); - const targetViewModel = this.getViewModelById(targetComponent.viewModel); - targetViewModel.fakeDel = true; - targetComponent.fakeDel = true; - }); - } - - - /** - * 根据指定的条件遍历查找节点 - * @param rootNode 容器节点 - * @param predict 条件 - */ - selectNode(rootNode: any, predict: (item: any) => boolean) { - if (!rootNode) { - return null; - } - if (predict(rootNode)) { - return rootNode; - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - const found = this.selectNode(item, predict); - if (found) { - return found; - } - } - } - return null; - } - - /** - * 根据指定的条件遍历查找节点,返回节点及其父节点 - * @param rootNode 容器节点 - * @param predict 预设的判断逻辑 - * @param parentNode 父节点 - */ - selectNodeAndParentNode(rootNode: any, predict: (item: any) => boolean, parentNode: any): { node: any, parentNode: any } { - if (!rootNode) { - return null; - } - if (predict(rootNode)) { - return { - node: rootNode, - parentNode - }; - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - const found = this.selectNodeAndParentNode(item, predict, rootNode); - if (found) { - return found; - } - } - } - return null; - } - - /** - * 根据id路径定位节点 - * @param rootNode 根节点 - * @param idPath id路径 - */ - getNodeByIdPath(rootNode: any, idPath: string) { - if (!rootNode || !idPath) { - return null; - } - const idPathArray = idPath.split('.'); - if (idPathArray.length === 0) { - return; - } - const currentId = idPathArray.shift(); - if (rootNode.contents) { - for (const item of rootNode.contents) { - if (currentId === '*') { - // 任意路径 - const nextItem = this.selectNodeByWildcardID(item, idPathArray[0]); - if (nextItem) { - idPathArray.shift(); - if (idPathArray.length === 0) { - return nextItem; - } - const found = this.getNodeByIdPath(nextItem, idPathArray.join('.')); - if (found) { - return found; - } - } - - } else if ((currentId.includes('*') && item.id.startsWith(currentId.slice(0, currentId.length - 1))) - || item.id === currentId) { - - if (idPathArray.length === 0) { - return item; - } else { - const found = this.getNodeByIdPath(item, idPathArray.join('.')); - if (found) { - return found; - } - } - } - } - } - return null; - } - - /** - * 根据id遍历查找节点(id支持带有*号的通配符) - * @param rootNode 容器节点 - * @param predict 条件 - */ - private selectNodeByWildcardID(rootNode: any, id: string) { - if (!rootNode || !id) { - return null; - } - let flag = false; - if (id.includes('*')) { - const newId = id.replace('*', ''); - if (rootNode.id.includes(newId)) { - flag = true; - } - } else if (rootNode.id === id) { - flag = true; - } - - if (flag) { - return rootNode; - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - const found = this.selectNodeByWildcardID(item, id); - if (found) { - return found; - } - } - } - return null; - } - - /** - * 获取指定控件id的父节点 - * @param rootNode 根组件节点 - * @param id 指定控件的ID - */ - getControlParentById(rootNode: any, controlId: string): any { - if (!rootNode) { - return null; - } - - if (rootNode.contents) { - for (const item of rootNode.contents) { - if (item.id === controlId) { - return rootNode; - } else { - const found = this.getControlParentById(item, controlId); - if (found) { - return found; - } - } - - } - } - return null; - } - /** - * 根据ID路径查找所有节点,找到所有符合idPath的最后一位的节点 - * @param rootNode 容器节点 - * @param idPath id路径 - */ - getNodesByIdPath(rootNode: any, idPath: string) { - if (!rootNode || !idPath) { - return null; - } - const idPathArray = idPath.split('.'); - if (idPathArray.length === 0) { - return; - } - const currentId = idPathArray.shift(); - if (rootNode.contents) { - for (const item of rootNode.contents) { - if (currentId === '*') { - - if (idPathArray.length === 1 && item.contents && item.contents.length) { - return item.contents.filter(c => c.id.includes(idPathArray[0].replace('*', ''))); - } - - - // 任意路径 - const nextItem = this.selectNodeByWildcardID(item, idPathArray[0]); - if (nextItem) { - idPathArray.shift(); - if (idPathArray.length === 0) { - return [nextItem]; - } - const found = this.getNodeByIdPath(nextItem, idPathArray.join('.')); - if (found) { - return [found]; - } - } - - } else if ((currentId.includes('*') && item.id.startsWith(currentId.slice(0, currentId.length - 1))) - || item.id === currentId) { - - if (idPathArray.length === 0) { - return [item]; - } else { - const found = this.getNodesByIdPath(item, idPathArray.join('.')); - if (found) { - return found; - } - } - } - } - } - return null; - } - - - /** - * 根据控件所在组件的统一布局配置获取控件样式 - * @param componentId 组件Id - */ - getControlClassByFormUnifiedLayout(controlClass: string, componentId: string) { - const componentNode = this.getComponentById(componentId); - - if (!componentNode || !componentNode.componentType.startsWith('form')) { - return controlClass; - } - const formNode = this.selectNode(componentNode, item => item.type === DgControl.Form.type); - if (!formNode || !formNode.unifiedLayout) { - return controlClass; - } - - const controlClassArray = controlClass.split(' '); - - let colClass = controlClassArray.find(item => /^col-([1-9]|10|11|12)$/.test(item)); - let colMDClass = controlClassArray.find(item => /^col-md-([1-9]|10|11|12)$/.test(item)); - let colXLClass = controlClassArray.find(item => /^col-xl-([1-9]|10|11|12)$/.test(item)); - let colELClass = controlClassArray.find(item => /^col-el-([1-9]|10|11|12)$/.test(item)); - - - colClass = formNode.unifiedLayout.uniqueColClassInSM ? 'col-' + formNode.unifiedLayout.uniqueColClassInSM : colClass; - colMDClass = formNode.unifiedLayout.uniqueColClassInMD ? 'col-md-' + formNode.unifiedLayout.uniqueColClassInMD : colMDClass; - colXLClass = formNode.unifiedLayout.uniqueColClassInLG ? 'col-xl-' + formNode.unifiedLayout.uniqueColClassInLG : colXLClass; - colELClass = formNode.unifiedLayout.uniqueColClassInEL ? 'col-el-' + formNode.unifiedLayout.uniqueColClassInEL : colELClass; - - return colClass + ' ' + colMDClass + ' ' + colXLClass + ' ' + colELClass; - - } - - /** - * 获取所有隐藏帮助 - */ - getHidenLookups() { - const result = []; - this.nodeTypeCollect.clear(); - const nodes = cloneDeep(this._domJson.module.components); - this.collectMetadata(nodes, null); - if (this.nodeTypeCollect && this.nodeTypeCollect.size > 0) { - // 找到所有的隐藏区域 - const hiddenContainers = this.nodeTypeCollect.get(NodeType.HiddenContainer); - if (hiddenContainers && hiddenContainers.length > 0) { - const containerIds = hiddenContainers.map(item => item.id); - const lookupEdits = this.nodeTypeCollect.get(NodeType.LookupEdit); - if (lookupEdits && lookupEdits.length > 0) { - const hiddenHelps = lookupEdits.filter(node => containerIds.includes(node.__parentId__)); - result.push(...hiddenHelps); - } - } - } - return result; - } - /** - * 获取所有子表弹出编辑组件 - * @returns - */ - getPageModalComponents() { - const result = []; - this.nodeTypeCollect.clear(); - const nodes = cloneDeep(this._domJson.module.components); - this.collectMetadata(nodes, null); - if (this.nodeTypeCollect && this.nodeTypeCollect.size > 0) { - // 找到所有的隐藏区域 - const components = this.nodeTypeCollect.get(NodeType.Component); - if (components && components.length > 0) { - const modals = components.filter(item => item.componentType === 'modalFrame'); - if (modals && modals.length > 0) { - result.push(...modals); - } - } - } - return result; - } - /** - * 遍历节点下所有节点 - * @param root 根节点或contents - * @param parentId 父节点id - * @returns - */ - private collectMetadata(root: Node | Node[], parentId?: string) { - if (Array.isArray(root)) { - root.forEach((node: Node) => { - this.collectMetadata(node, parentId); - }); - } else { - const { id = null, type = null, contents = null } = root; - if (!id || !type) { - return; - } - root.__parentId__ = parentId; - const typeValue = this.nodeTypeCollect.get(type) || []; - typeValue.push(root); - this.nodeTypeCollect.set(type, typeValue); - // const idValue = this.nodeIdCollect.get(id) || []; - // idValue.push(root); - // this.nodeIdCollect.set(id, idValue); - if (contents && contents.length > 0) { - this.collectMetadata(root.contents, id); - } - } - } - - public getRootViewModelId(): string { - if (this.viewmodels == null || this.viewmodels.length === 0) { - return ROOT_VIEW_MODEL_ID; - } - - if(this.viewmodels.find(viewmodel=>viewmodel.id === ROOT_VIEW_MODEL_ID)){ - return ROOT_VIEW_MODEL_ID; - - } - - return this.viewmodels[0].id; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/event-editor.service.ts b/packages/designer/projects/designer-services/src/lib/services/event-editor.service.ts deleted file mode 100644 index bf9efeac72bb403e49c15d4b6cb1c7b828650710..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/event-editor.service.ts +++ /dev/null @@ -1,398 +0,0 @@ -import { Injectable } from '@angular/core'; -import { cloneDeep } from 'lodash-es'; -import { Actions, MapItem, ControllerListItem } from './interface'; -import { DomService } from './dom.service'; -/** - * 操作表单DOM的工具类 - */ -@Injectable({ - providedIn: 'root' -}) - -export class EventEditorService { - - constructor(public domService: DomService) { } - - savedViewModel = []; - - /** - * 去重 - * @param itemWithSameValue - * @param comparedPart 需要去重的是控制器还是命令 - * @returns - */ - public getUniqueContent(itemWithSameValue: any, comparedPart: string) { - let value = cloneDeep(itemWithSameValue); - for (let i = 0; i < value.length; i++) { - for (let j = i + 1; j < value.length; j++) { - if (comparedPart == 'controller') { - if (value[i]['controllerName']['id'] == value[j]['controllerName']['id']) { - value.splice(j, 1); - j--; - } - } - else if (comparedPart == 'command') { - if (value[i]['label'] == value[j]['label']) { - value.splice(j, 1); - j--; - } - } - } - } - itemWithSameValue = cloneDeep(value); - return itemWithSameValue; - } - - - /** - * 根据cmpId获取控制器名称 - * @param controller - * @returns - */ - public getControllerName(controller: any) { - const savedViewModelItem = { - controllerName: { - label: '', - name: '', - id: '', - }, - controllerList: [] - } - savedViewModelItem.controllerName = cloneDeep(controller); - this.savedViewModel.push(cloneDeep(savedViewModelItem)); - this.savedViewModel = this.getUniqueContent(this.savedViewModel, 'controller'); - return this.savedViewModel; - } - - /** - * 目标组件下所有可选的vm - * @param domService - * @returns - */ - public allComponentList(domService: any) { - const dom = domService.getDomJson(); - this.domService = domService; - let componentListsItem = { - componentId: '', - viewModelId: '' - } - const allComponentList = []; - for (let i = 0; i < dom.module.components.length; i++) { - //筛选出root-component及form类型的component - componentListsItem.componentId = cloneDeep(dom.module.components[i].id); - componentListsItem.viewModelId = cloneDeep(dom.module.viewmodels[i].id); - allComponentList.push(cloneDeep(componentListsItem)); - } - return allComponentList; - } - - /** - * 处理actions节点的目标组件值 - * @param boundEventItem 绑定事件 - * @param vmid viewModelId - * @returns - */ - public formTargetComponent(boundEventItem: any, vmid: string) { - const allComponentList = this.allComponentList(this.domService); - let targetComponent = { - id: boundEventItem.controllerList.targetComponent, - viewModelId: undefined, - } - if (allComponentList.length && boundEventItem.controllerList.targetComponent != undefined) { - let viewModelId; - allComponentList.forEach(component => { - viewModelId = component.componentId == targetComponent.id ? component.viewModelId : viewModelId; - }); - targetComponent.viewModelId = viewModelId; - } - else if (allComponentList.length) { - //若不存在目标组件,则自动存放至当前viewmodel - const componentList = allComponentList.find(componentListsItem => componentListsItem.viewModelId == vmid); - targetComponent.id = componentList == undefined ? undefined : componentList.componentId; - targetComponent.viewModelId = vmid; - } - return targetComponent; - } - - /** - * 获取actions节点和viewmodel节点的控制器,以便按照控制器分类所有命令 - * @param webCmdService - * @param domJson - * @returns - */ - public getController(webCmdService: any, domJson: any) { - let savedViewModelFromActions = []; - let savedViewModelFromVM; - // 根据actions节点,获取控制器相关(savedViewModelFromActions) - domJson.module.actions.forEach(actionItem => { - actionItem.sourceComponent.map.forEach(mapItem => { - savedViewModelFromActions = cloneDeep(this.getControllerName(mapItem.controller)); - }) - }) - // 根据viewModel节点,匹配cmpId获取控制器(savedViewModelFromVM) - domJson.module.viewmodels.forEach(viewmodelItem => { - viewmodelItem.commands.forEach(commandItem => { - webCmdService.webCmds.forEach(webCmdItem => { - if (commandItem.cmpId == webCmdItem.Id) { - const controller = { - label: webCmdItem.Code, - name: webCmdItem.Name, - id: webCmdItem.Id, - } - savedViewModelFromVM = cloneDeep(this.getControllerName(controller)); - } - }); - }) - }) - - // 合并savedViewModelFromActions及savedViewModelFromVM => savedViewModel - const savedViewModel = savedViewModelFromActions ? this.getUniqueContent(savedViewModelFromActions.concat(savedViewModelFromVM), 'controller') : this.getUniqueContent(savedViewModelFromVM, 'controller'); - return savedViewModel; - } - - /** - * 1. 获取已绑定命令的参数值(来自actions节点) - * 2. 获取暂未绑定的命令参数值(来自viewmodel节点) - * @param savedViewModelItem - * @param controllerListItem - * @param domJson - */ - public getCommandParameter(savedViewModelItem: any, controllerListItem: ControllerListItem, domJson: any) { - const actions = domJson.module.actions; - actions.forEach(actionItem => { - actionItem.sourceComponent.map.forEach(mapItem => { - if (savedViewModelItem.controllerName.id == mapItem.controller.id) { - controllerListItem.label = mapItem.command.label; - controllerListItem.name = mapItem.command.name; - controllerListItem.id = mapItem.command.id; - controllerListItem.handlerName = mapItem.command.handlerName; - controllerListItem.property = cloneDeep(mapItem.command.params); - controllerListItem.cmpId = mapItem.controller.id; - controllerListItem.isNewGenerated = mapItem.controller.isNewGenerated || false; - controllerListItem.isInvalid = mapItem.command.isInvalid || false; - controllerListItem['isRTCmd'] = mapItem.command['isRTCmd']; - controllerListItem.targetComponent = mapItem.targetComponent['id'] ? mapItem.targetComponent['id'] : undefined; - savedViewModelItem.controllerList.push(cloneDeep(controllerListItem)); - } - }) - }) - - const viewmodels = domJson.module.viewmodels; - viewmodels.forEach(viewmodelItem => { - viewmodelItem.commands.forEach(commandsItem => { - if (savedViewModelItem.controllerName.id == commandsItem.cmpId) { - controllerListItem.label = commandsItem.code; - controllerListItem.name = commandsItem.name; - controllerListItem.id = commandsItem.id; - controllerListItem.handlerName = commandsItem.handlerName; - controllerListItem.property = cloneDeep(commandsItem.params); - controllerListItem.cmpId = commandsItem.id; - controllerListItem.isNewGenerated = commandsItem.isNewGenerated || false; - controllerListItem['isRTCmd'] = commandsItem.command['isRTCmd']; - controllerListItem.isInvalid = commandsItem.isInvalid || false; - controllerListItem.targetComponent = commandsItem['targetComponent'] ? commandsItem['targetComponent'] : undefined; - savedViewModelItem.controllerList.push(cloneDeep(controllerListItem)); - } - }) - }) - return savedViewModelItem; - } - - /** - * 获取已绑定命令的路径,并tag该命令 - * @param actionData action节点的数据 - * @param savedViewModelCopy viewModel节点的数据 - */ - public getPathAndTagBoundCommand(actionData: any, savedViewModelCopy: any) { - actionData.forEach(actionItem => { - const id = actionItem.sourceComponent.id; - // 获取已绑定命令的路径 - let path = this.domService.controlBasicInfoMap.get(id) != undefined ? this.domService.controlBasicInfoMap.get(id).parentPathName : undefined; - actionItem['path'] = this.domService.controlBasicInfoMap.get(id) != undefined ? `${path} > ` : ''; - actionItem.sourceComponent.map.forEach(mapItem => { - savedViewModelCopy.forEach(savedViewModelItem => { - savedViewModelItem.controllerList.forEach(commandItem => { - // tag已绑定的命令 - if (commandItem.label == mapItem.command.label) { - commandItem['tag'] = 'notInternal'; - } - }); - }); - }); - }); - return actionData; - } - - /** - * 获取暂未绑定的命令 - * @param propertyDataId - * @param viewModelId - * @param savedViewModelCopy - * @returns - */ - public handlePathOfUnboundCommand(propertyDataId: string, viewModelId: string, savedViewModelCopy: any) { - let viewModelData: Actions = { - sourceComponent: { - id: propertyDataId, - viewModelId: viewModelId, - map: [] - }, - path: '暂未绑定 ' - }; - savedViewModelCopy.forEach(savedViewModelCopyItem => { - const controllerName = savedViewModelCopyItem.controllerName; - savedViewModelCopyItem.controllerList.forEach(commandItem => { - if (!commandItem['tag']) { - let mapItem: MapItem = { - event: { - label: undefined, - name: undefined, - }, - targetComponent: cloneDeep(this.formTargetComponent(savedViewModelCopyItem, commandItem.targetComponent)), - command: { - id: commandItem.id, - label: commandItem.label, - name: commandItem.name, - handlerName: commandItem.handlerName, - params: cloneDeep(commandItem.property), - isNewGenerated: commandItem.isNewGenerated || false, - isRTCmd: commandItem['isRTCmd'], - isInvalid: commandItem.isInvalid || false, - }, - controller: { - id: controllerName.id, - label: controllerName.label, - name: controllerName.name, - } - } - viewModelData.sourceComponent.map.push(cloneDeep(mapItem)); - } - }); - }); - return viewModelData; - } - - /** - * 剔除非组件内的其他命令:root显示全部,其他子组件选自身的vm - * - * @param viewModelId - * @param actionWithPath actions节点及对应的路径 - * @param action - * @returns - */ - public selectedCommandRules(viewModelId: string, actionWithPath: any, action: any) { - if (viewModelId != "root-viewmodel") { - actionWithPath.forEach(actionWithPathItem => { - let mapArray = []; - let mapExist = false; - actionWithPathItem.sourceComponent.map.forEach(mapItem => { - if (mapItem.targetComponent.viewModelId == viewModelId) { - mapArray.push(cloneDeep(mapItem)); - mapExist = true; - } - }) - if (mapExist) { - const actionsItem = { - path: actionWithPathItem.path, - sourceComponent: { - id: actionWithPathItem.sourceComponent.id, - map: cloneDeep(mapArray), - viewModelId: actionWithPathItem.sourceComponent.viewModelId, - } - } - action.push(cloneDeep(actionsItem)); - } - }) - } - else { - action = cloneDeep(actionWithPath); - } - return action; - } - - /** - * 事件编辑器-已有方法-命令路径处理 - * @param propertyDataId 组件id - * @param viewModelId 视图模型id - * @param webCmdService - * @returns - */ - public getEventPath(propertyDataId: string, viewModelId: string, webCmdService: any) { - const domJson = this.domService.getDomJson(); - const actionData = cloneDeep(domJson.module.actions); - - let controllerListItem: ControllerListItem = { - label: '', - name: '', - id: '', - handlerName: '', - showTargetComponent: false, - cmpId: '', - componentLists: [], - targetComponent: undefined, - isNewGenerated: undefined, - isRTCmd: undefined, - isInvalid: false, - property: [] - } - - // 1. 获取已绑定命令的参数值(来自actions节点) - // 2. 获取暂未绑定的命令参数值(来自viewmodel节点) - let savedViewModel = this.getController(webCmdService, domJson); - savedViewModel.forEach(savedViewModelItem => { - const actions = domJson.module.actions; - actions.forEach(actionItem => { - actionItem.sourceComponent.map.forEach(mapItem => { - if (savedViewModelItem.controllerName.id == mapItem.controller.id) { - controllerListItem.label = mapItem.command.label; - controllerListItem.name = mapItem.command.name; - controllerListItem.id = mapItem.command.id; - controllerListItem.handlerName = mapItem.command.handlerName; - controllerListItem.property = cloneDeep(mapItem.command.params); - controllerListItem.cmpId = mapItem.controller.id; - controllerListItem.isNewGenerated = mapItem.controller.isNewGenerated || false; - controllerListItem.isRTCmd = mapItem.command['isRTCmd']; - controllerListItem.isInvalid = mapItem.command.isInvalid || false; - controllerListItem.targetComponent = mapItem.targetComponent['id'] ? mapItem.targetComponent['id'] : undefined; - savedViewModelItem.controllerList.push(cloneDeep(controllerListItem)); - } - }) - }) - - const viewmodels = domJson.module.viewmodels; - viewmodels.forEach(viewmodelItem => { - viewmodelItem.commands.forEach(commandsItem => { - const targetComponent = viewmodelItem.code; - if (savedViewModelItem.controllerName.id == commandsItem.cmpId) { - controllerListItem.label = commandsItem.code; - controllerListItem.name = commandsItem.name; - controllerListItem.id = commandsItem.id; - controllerListItem.handlerName = commandsItem.handlerName; - controllerListItem.property = cloneDeep(commandsItem.params); - controllerListItem.cmpId = commandsItem.id; - controllerListItem.isNewGenerated = commandsItem.isNewGenerated || false; - controllerListItem.isRTCmd = commandsItem.isRTCmd ; - controllerListItem.isInvalid = commandsItem.isInvalid || false; - controllerListItem.targetComponent = commandsItem['targetComponent'] || targetComponent ? commandsItem['targetComponent'] || targetComponent : undefined; - savedViewModelItem.controllerList.push(cloneDeep(controllerListItem)); - } - }) - }) - savedViewModelItem.controllerList = cloneDeep(this.getUniqueContent(savedViewModelItem.controllerList, 'command')); - }) - - const savedViewModelCopy = cloneDeep(savedViewModel); - const actionsData = cloneDeep(this.getPathAndTagBoundCommand(actionData, savedViewModelCopy)); - const viewModelsData = cloneDeep(this.handlePathOfUnboundCommand(propertyDataId, viewModelId, savedViewModelCopy)); - const actionWithPath = actionsData.concat(viewModelsData); - - let action = []; - action = cloneDeep(this.selectedCommandRules(viewModelId, actionWithPath, action)); - - return { - actionWithPath: action, - viewModelDisplay: savedViewModel - } - } - -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/services/form-basic.service.ts b/packages/designer/projects/designer-services/src/lib/services/form-basic.service.ts deleted file mode 100644 index 69fc7a11f307e3f4db513f1a122826abe229b75f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/form-basic.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DesignerEnvType } from '../entity'; -import { FarrisMetadataDto } from './metadata-service'; - -/** - * 存储表单设计器基本信息 - */ -@Injectable({ - providedIn: 'root' -}) -export class FormBasicService { - /** 表单元数据信息基本信息 */ - formMetaBasicInfo: FarrisMetadataDto; - - /** 当前设计器环境 */ - envType: DesignerEnvType | any; - - /** 表单调试状态,零代码设计器专用 */ - debugModel?: boolean; - - /** 零代码设计器驱动模式:form:表单驱动;entity:实体驱动 */ - driveMode?: string; - -} - - diff --git a/packages/designer/projects/designer-services/src/lib/services/index.ts b/packages/designer/projects/designer-services/src/lib/services/index.ts deleted file mode 100644 index 98fe2920f73f2f27234a171c05539b034aa12e75..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export { DomService } from './dom.service'; -export { SchemaService } from './schema.service'; -export { DesignViewModelService } from './design-viewmodel.service'; -export { UniformEditorDataUtil } from './uniform-editor-util'; -export { DesignerHostSettingService, DgControl } from './designer-host.service'; -export { FormBasicService } from './form-basic.service'; -export { StateMachineService } from './state-machine.service'; -export { DataStatesService } from './data-states.service'; -export { WebCmdService } from './web-cmd.service'; -export { EventEditorService } from './event-editor.service'; -export { RefreshFormService } from './refresh-form.service'; -export * from './metadata-service'; diff --git a/packages/designer/projects/designer-services/src/lib/services/interface.ts b/packages/designer/projects/designer-services/src/lib/services/interface.ts deleted file mode 100644 index f05c3a6648acd2a9b8069ebd8430881fb5d52101..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/interface.ts +++ /dev/null @@ -1,54 +0,0 @@ - -export interface Actions { - sourceComponent: { - id: string, - viewModelId: string, - map: MapItem[], - }, - path: string -}; - -export interface MapItem { - event: { - label: string, - name: string, - }, - command: { - id: string, - label: string, - name: string, - handlerName: string, - params?: any, - showTargetComponent?: boolean; - targetComponentId?: string; - isNewGenerated?: boolean, - isInvalid: boolean, - isRTCmd?: boolean, - }, - controller: { - id: string, - label: string, - name: string, - }, - targetComponent: { - id: string, - viewModelId: string, - }, - -} - -export interface ControllerListItem { - label: string, - name: string, - id: string, - handlerName: string, - /** 当前命令需要选择目标组件*/ - showTargetComponent: boolean, - cmpId: string, - componentLists: any, - targetComponent: any, - isNewGenerated: any, - isInvalid: boolean, - property: any, - isRTCmd?: boolean, -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/services/metadata-service.ts b/packages/designer/projects/designer-services/src/lib/services/metadata-service.ts deleted file mode 100644 index 0af0c7fad9ea56b947c715a48cc523bfda97f5f3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/metadata-service.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Subject } from 'rxjs'; -import { Observable } from 'rxjs/Observable'; - -/** - * 统一的元数据服务抽象类。 - * 不同的场景(低代码、零代码、运行时定制、移动)需要使用不同的元数据服务。这里定义了一套统一的元数据服务抽象类,可以在不同的场景做实现,并注入到注入器(providers)中。 - */ -export abstract class FarrisMetadataService { - /** 根据元数据ID获取元数据 */ - abstract getMetadata(metadataId: string): Observable; - /** 保存元数据 */ - abstract saveMetadata?(metadataDto: FarrisMetadataDto): Observable; - - /** 根据类型获取元数据列表 */ - abstract getMetadataList?(typeName: string): Observable; - - /** 查询是否有重名的元数据 */ - abstract validateRepeatName?(relativePath: string, fileName: string): Subject; - - /** 根据名称查询元数据 */ - abstract loadMetadata?(fileName: string, relativePath: string): Subject; - - /** 初始创建元数据 */ - abstract initializeMetadataEntity?(metadatadto: FarrisMetadataDto): Observable; - - /** 创建元数据 */ - abstract createMetadata?(metadatadto: FarrisMetadataDto): Observable; - - - -} - -/** - * 元数据结构 - */ -export class FarrisMetadataDto { - id: string; - nameSpace: string; - code: string; - name: string; - fileName: string; - type: string; - bizobjectID: string; - relativePath: string; - extendProperty: string; - content: string; - extendable: boolean; - - constructor(id: string, nameSpace: string, code: string, name: string, fileName: string, type: string, bizobjectID: string, relativePath: string, extendProperty: string, content: string, extendable: boolean) { - this.id = id; - this.nameSpace = nameSpace; - this.code = code; - this.name = name; - this.fileName = fileName; - this.type = type; - this.bizobjectID = bizobjectID; - this.relativePath = relativePath; - this.extendProperty = extendProperty; - this.content = content; - this.extendable = extendable; - } -} - - -export class FarrisMetadata4RefDto { - packageHeader: MetadataPackageHeader; - metadata: FarrisMetadataDto; -} -export class MetadataPackageHeader { - name: string; - version: MetadataPackageVersion; - location: string; -} -export class MetadataPackageVersion { - versionString: string; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/services/refresh-form.service.ts b/packages/designer/projects/designer-services/src/lib/services/refresh-form.service.ts deleted file mode 100644 index 3a2922918e452e82e45f47a5262cf9801babc46a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/refresh-form.service.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Subject } from 'rxjs'; - -/** - * 触发表单刷新的服务 - */ -@Injectable({ - providedIn: 'root' -}) -export class RefreshFormService { - /** 刷新实体树 */ - public refreshSchamaTree = new Subject(); - - /** 刷新可视化区域、重绘页面 */ - public refreshFormDesigner = new Subject(); - - /** 刷新控件树 */ - public refreshControlTree = new Subject(); - - /** 刷新控件工具箱 */ - public refreshControlBox = new Subject(); - -} diff --git a/packages/designer/projects/designer-services/src/lib/services/schema.service.ts b/packages/designer/projects/designer-services/src/lib/services/schema.service.ts deleted file mode 100644 index a5c56ada4c71879660ab824ddef7f5eb531d5be7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/schema.service.ts +++ /dev/null @@ -1,713 +0,0 @@ -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { Subject } from 'rxjs'; -import { DesignerEnvType } from '../entity'; -import { FormSchemaEntity, FormSchemaEntityField, FormSchemaEntityField$Type, FormSchemaEntityFieldType$Type } from '../entity/schema'; -import { DomService } from './dom.service'; -import { FormBasicService } from './form-basic.service'; -import { FarrisMetadataService } from './metadata-service'; - -/** - * 操作表单DOM Schema的工具类 - */ -@Injectable({ - providedIn: 'root' -}) -export class SchemaService { - - /** 控件工具箱拖拽产生的新增字段,用于零代码场景 */ - public addedFieldsByControlBox = []; - - /** 控件工具箱拖拽产生的关联字段,需要记录与be的关联关系,用于零代码场景 */ - public addedRelatedFieldsByControlBox = {}; - - constructor( - private domService: DomService, - private metadataService: FarrisMetadataService, - private formBasicService: FormBasicService, - private http: HttpClient) { } - - getSchemaEntities(): FormSchemaEntity[] { - const schema = this.domService.getSchemas(); - return schema.entities; - } - - /** - * 获取表字段列表 - * @param entities 实体对象集合 - * @param bindTo 实体绑定路径 - */ - getTableFieldsByBindTo(entities: FormSchemaEntity[], bindTo: string): FormSchemaEntityField[] { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - - for (const entity of entities) { - const entityType = entity.type; - if (!entityType) { - return []; - } - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return entityType.fields; - } - if (entityType.entities && entityType.entities.length > 0) { - const fields = this.getTableFieldsByBindTo(entityType.entities, bindTo); - if (fields) { - return fields; - } - } - } - } - - private extractFieldsFromEntityType(entityType: { fields?: FormSchemaEntityField[] }) { - const fields: FormSchemaEntityField[] = []; - if (entityType && entityType.fields && entityType.fields.length) { - entityType.fields.forEach(field => { - if (field.$type === 'SimpleField') { - fields.push(field); - } else { - const extractedFields = this.extractFieldsFromEntityType(field.type); - if (extractedFields.length) { - extractedFields.forEach(extractedField => fields.push(extractedField)); - } - } - }); - } - return fields; - } - - /** - * 根据bindTo获取对应表基本信息 - * @param viewModelId 数据模型标识 - */ - getTableInfoByViewModelId(viewModelId: string): { id: string, code: string, name: string, label: string } { - const vm = this.domService.getViewModelById(viewModelId); - const entities = this.getSchemaEntities(); - if (entities && entities.length > 0) { - return this._getTableBasicInfoByUri(entities, vm.bindTo); - } - } - - /** - * 根据bindTo获取对应表信息 - * @param entities 实体 - * @param bindTo VM绑定 - */ - private _getTableBasicInfoByUri(entities: FormSchemaEntity[], bindTo: string): any { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - - for (const entity of entities) { - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return { - id: entity.id, - code: entity.code, - name: entity.name, - label: entity.label - }; - } - const entityType = entity.type; - - if (entityType && entityType.entities && entityType.entities.length > 0) { - const basicInfo = this._getTableBasicInfoByUri(entityType.entities, bindTo); - if (basicInfo) { - return basicInfo; - } - } - } - - } - - /** - * 根据VM id获取对应表名 - * @param viewModelId 实体模型标识 - */ - getTableCodeByViewModelID(viewModelId) { - const vm = this.domService.getViewModelById(viewModelId); - - const entities = this.getSchemaEntities(); - if (entities && entities.length > 0) { - return this._getTableCodeByUri(entities, vm.bindTo); - } - return ''; - } - - /** - * 根据bindTo获取对应表名 - * @param entities 实体对象集合 - * @param bindTo 绑定路径 - */ - private _getTableCodeByUri(entities: FormSchemaEntity[], bindTo: string): string { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - - for (const entity of entities) { - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return entity.code; - } - const entityType = entity.type; - - if (entityType && entityType.entities && entityType.entities.length > 0) { - const code = this._getTableCodeByUri(entityType.entities, bindTo); - if (code) { - return code; - } - } - } - } - - /** - * 根据bindTo获取对应表名 - * @param entities 实体对象集合 - * @param bindTo 绑定路径 - */ - private _getTableLabelByUri(entities: FormSchemaEntity[], bindTo: string): string { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - for (const entity of entities) { - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return entity.label; - } - const entityType = entity.type; - - if (entityType && entityType.entities && entityType.entities.length > 0) { - const label = this._getTableLabelByUri(entityType.entities, bindTo); - if (label) { - return label; - } - } - } - } - - /** - * 根据字段ID和ViewModelId获取字段信息(包括关联表字段) - * 返回对象 {实体,是否关联字段,关联字段的dataField} - * @param id 字段标识 - * @param viewModelId 视图模型标识 - */ - getFieldByIDAndVMID(id: string, viewModelId: string): { - schemaField: FormSchemaEntityField, isRefElement: boolean, refElementLabelPath: string - } { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - const vm = this.domService.getViewModelById(viewModelId); - const fields = this.getTableFieldsByBindTo(entities, vm.bindTo); - if (!fields) { - return; - } - return this.getFieldInfoByID(fields, '', id); - } - - /** - * 根据字段path和ViewModelId获取字段信息(包括关联表字段) - * 返回对象 {实体,是否关联字段,关联字段的dataField} - * @param path 字段标识 - * @param viewModelId 视图模型标识 - */ - getFieldByPathAndVMID(path: string, viewModelId: string): { - schemaField: FormSchemaEntityField, isRefElement: boolean, refElementLabelPath: string - } { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - const vm = this.domService.getViewModelById(viewModelId); - const fields = this.getTableFieldsByBindTo(entities, vm.bindTo); - if (!fields) { - return; - } - return this.getFieldInfoByPath(fields, '', path); - } - - - /** - * 根据字段ID获取schema字段信息--用户旧表单适配 - */ - getFieldByID(fieldId: string) { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - for (const viewModel of this.domService.viewmodels) { - if (viewModel.bindTo === '/' && !viewModel.parent) { - continue; - } - const fields = this.getTableFieldsByBindTo(entities, viewModel.bindTo); - if (!fields) { - continue; - } - const result = this.getFieldInfoByID(fields, '', fieldId); - if (result && result.schemaField) { - return result.schemaField; - } - } - } - - - /** - * 递归查询字段 - * @param fields 实体字段集合 - * @param refElementLabelPath 字段路径 - * @param id 字段标识 - */ - getFieldInfoByID(fields: FormSchemaEntityField[], refElementLabelPath = '', id: string): { - schemaField: FormSchemaEntityField, isRefElement: boolean, refElementLabelPath: string - } { - let element: FormSchemaEntityField; let isRefElement = false; - const parentLabel = refElementLabelPath ? refElementLabelPath + '.' : ''; - for (const field of fields) { - if (field.id === id) { - element = field; - refElementLabelPath = parentLabel + field.label; - isRefElement = parentLabel ? true : false; - break; - } else { - // 关联字段/UDT字段 - if (field.type && field.type.fields && field.type.fields.length > 0) { - const childResult = this.getFieldInfoByID(field.type.fields, parentLabel + field.label, id); - if (childResult.schemaField) { - element = childResult.schemaField; - refElementLabelPath = childResult.refElementLabelPath; - isRefElement = childResult.isRefElement; - break; - } - } - } - } - return { schemaField: element, isRefElement, refElementLabelPath }; - } - - /** - * 递归查询字段 - * @param fields 实体字段集合 - * @param refElementLabelPath 字段路径 - * @param path 字段标识 - */ - getFieldInfoByPath(fields: FormSchemaEntityField[], refElementLabelPath = '', path: string): { - schemaField: FormSchemaEntityField, isRefElement: boolean, refElementLabelPath: string - } { - let element: FormSchemaEntityField; let isRefElement = false; - const parentLabel = refElementLabelPath ? refElementLabelPath + '.' : ''; - for (const field of fields) { - if (field.path === path) { - element = field; - refElementLabelPath = parentLabel + field.label; - isRefElement = parentLabel ? true : false; - break; - } else { - // 关联字段/UDT字段 - if (field.type && field.type.fields && field.type.fields.length > 0) { - const childResult = this.getFieldInfoByID(field.type.fields, parentLabel + field.label, path); - if (childResult.schemaField) { - element = childResult.schemaField; - refElementLabelPath = childResult.refElementLabelPath; - isRefElement = childResult.isRefElement; - break; - } - } - } - } - return { schemaField: element, isRefElement, refElementLabelPath }; - } - - - getTableLabelByVMID(viewModelId: string) { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - const vm = this.domService.getViewModelById(viewModelId); - return this._getTableLabelByUri(entities, vm.bindTo); - } - - - /** - * 定位分级码字段(返回第一个类型为HierarchyType的字段) - * @param viewModelId 视图模型标识 - */ - getTreeGridUdtField(viewModelId: string) { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - const vm = this.domService.getViewModelById(viewModelId); - const fields = this.getTableFieldsByBindTo(entities, vm.bindTo); - if (!fields) { - return ''; - } - for (const element of fields) { - if (element.type && element.type.$type === 'HierarchyType') { - return element.label; - } - } - return ''; - } - - /** - * 获取分级码字段(返回所有类型为HierarchyType的字段) - * @param viewModelId VMID - */ - getTreeGridUdtFields(viewModelId: string): any[] { - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - const vm = this.domService.getViewModelById(viewModelId); - const fields = this.getTableFieldsByBindTo(entities, vm.bindTo); - const udtFields = []; - if (!fields) { - return []; - } - for (const element of fields) { - if (element.type && element.type.$type === 'HierarchyType') { - udtFields.push({ key: element.label, value: element.name }); - } - } - return udtFields; - } - - /** - * schema字段集合组装成树 - * @param fields schema字段集合 - */ - assembleFields2Tree(fields: FormSchemaEntityField[], expandRelateNode = true, displayedFieldsMap: Map = null, label = '') { - const treeData = []; - fields.forEach(element => { - // 零代码:不展示id等属性 - if (this.formBasicService && this.formBasicService.envType === DesignerEnvType.noCode && - ['id', "version", "processInstance", "parentID"].includes(element.bindingField)) { - return; - } - // 补充bindingPath属性 - if (!element.bindingPath) { - element.bindingPath = (label ? label + '.' : '') + element.label; - } - - // 关联表字段 / UDT字段 - let children = []; - if (element.type && element.type.fields && element.type.fields.length > 0) { - children = this.assembleFields2Tree(element.type.fields, true, displayedFieldsMap, element.bindingPath); - } - - treeData.push({ - data: element, - children, - expanded: expandRelateNode, - selectable: children.length > 0 ? false : true, - isUsed: displayedFieldsMap && displayedFieldsMap.has(element.id), - tips: element.name + '[' + element.id + ']' - }); - - }); - return treeData; - } - - /** - * VO 转化为表单schema - * @param voId 视图对象标识 - */ - converVO2Schema(voId: string, sessionId: string) { - const subject = new Subject(); - // 1、schema.id 查询VO实体 - this.metadataService.getMetadata(voId).subscribe(data => { - if (data && data.content) { - const voMetadataContent = JSON.parse(data.content); - - // 2、将VO实体转为schema - const schemaUrl = '/api/dev/main/v1.0/designschema/create'; - this.http.post(schemaUrl, voMetadataContent, { - headers: new HttpHeaders({ 'Content-Type': 'application/json', SessionId: sessionId }) - }).subscribe(schema => { - subject.next(schema); - }, error => { - subject.next(); - }); - } - }, error => { - subject.next(); - }); - return subject; - } - - /** - * 零代码设计器:VO 转化为表单schema - */ - convertVoToSchemaForNoCodeForm(voId: string) { - const schemaUrl = '/api/dev/main/v1.0/designschema/create'; - // const loadMetaDataURL = '/api/dev/nocode/v1.0/micro-apps/metadatas'; - - const sessionId = ''; - const headerOptions = { - headers: new HttpHeaders({ 'Content-Type': 'application/json', SessionId: sessionId }) - }; - - const subject = new Subject(); - const sortData = (data) => { - - if (data && data.content) { - const voMetadataContent = JSON.parse(data.content); - - // todo 临时性代码,接口调整后需要删除 - const warpped = { isRuntime: true, viewObject: voMetadataContent }; - this.http.post(schemaUrl, warpped, headerOptions).subscribe(schema => { - subject.next(schema); - }, error => { - subject.next(); - }); - } - - }; - - // 零代码下 执行的是使用获取表单数据的接口 - this.metadataService.getMetadata(voId).subscribe(sortData, error => { - subject.next(); - }); - return subject; - } - - /** - * 获取指定VM下的所有字段 - * @param viewModelId 视图模型标识 - */ - getFieldsByViewModelId(viewModelId: string): FormSchemaEntityField[] { - const vm = this.domService.getViewModelById(viewModelId); - if (!vm) { - return []; - } - const entities = this.getSchemaEntities(); - if (!entities || entities.length === 0) { - return; - } - return this.getTableFieldsByBindTo(entities, vm.bindTo); - } - - - /** - * 根据实体获取VM id,之前用于实体树的拖拽 - * @param entity 实体 - */ - getViewModelIdByEntity(entity: FormSchemaEntity): string { - if (!entity) { - return void 0; - } - const viewModels = this.domService.viewmodels; - const entities = this.getSchemaEntities(); - const mappingViewModel = viewModels.find(viewModel => { - if (viewModel.id === 'root-viewmodel') { - return false; // root viewmodel 不对应任何SchemaEntity - } - const info = this._getTableBasicInfoByUri(entities, viewModel.bindTo); - return info.id === entity.id; - }); - // 找到对应的viewmodel返回id,找不到返回undefined。 - return mappingViewModel && mappingViewModel.id; - } - - /** - * 根据指定的字段key值,获取字段信息。例如获取key=bindingPath,值为xxx的字段 - * @param targetFieldKey 字段key - * @param targetFieldValue 字段key值 - */ - public getSchemaField(targetFieldKey: string, targetFieldValue: string): FormSchemaEntityField | null { - const entities = this.getSchemaEntities(); - let retField: FormSchemaEntityField; - const getTargetFiled = (predicate: (element: FormSchemaEntityField) => {}, fieldsArray: FormSchemaEntityField[]) => { - fieldsArray.find((element: FormSchemaEntityField) => { - const predicateResult = predicate(element); - if (predicateResult) { - retField = element; - return true; - } else { - if (element.type.fields) { - getTargetFiled(predicate, element.type.fields); - } - } - return false; - }); - }; - entities.forEach((entitiesItem: FormSchemaEntity) => { - getTargetFiled((field: FormSchemaEntityField) => field[targetFieldKey] === targetFieldValue, entitiesItem.type.fields); - }); - - return retField; - } - - /** - * 字段名称映射更改 - */ - public fieldsDisplayNameUpdate(entity: FormSchemaEntityField[]) { - entity.forEach((item) => { - if (item.$type === FormSchemaEntityField$Type.SimpleField) { - switch (item.type.$type) { - case FormSchemaEntityFieldType$Type.NumericType: - if (item.type.precision === 0) { - item.type.displayName = '整数'; - } - if (item.type.precision > 0) { - item.type.displayName = '浮点数字'; - } - break; - case FormSchemaEntityFieldType$Type.StringType: - item.type.displayName = '文本'; - break; - case FormSchemaEntityFieldType$Type.TextType: - item.type.displayName = '备注'; - break; - - default: - break; - } - - } - }); - } - - /** - * 删除schema实体 - * @param entityId 实体id - */ - public deleteSchemaEntityById(entityId: string) { - - const schemaEntities = this.getSchemaEntities(); - if (!schemaEntities || schemaEntities.length < 1 || !schemaEntities[0]) { - return; - } - const mainEntity = schemaEntities[0]; - const queue = [mainEntity]; - while (queue.length) { - const current = queue.shift(); - - if (current.type.entities && current.type.entities.length) { - if (current.type.entities.some(entity => entity.id === entityId)) { - current.type.entities = current.type.entities.filter(entity => entity.id !== entityId); - return; - } - queue.push(...current.type.entities); - } - - } - - } - - /** - * 触发删除schema中的字段。 - * 场景:零代码中工具箱拖拽输入类控件会自动新增字段,所以在删除控件的时候需要将字段一起删除。 - * @param fieldIdList 待删除的字段列表 - */ - removeSchemaField(fieldIdList: string[]) { - if (!fieldIdList || !fieldIdList.length) { - return; - } - fieldIdList.forEach(targetFieldId => { - - // 判断删除的字段是新增的字段还是已保存到元数据中的字段 - if (this.addedFieldsByControlBox.length) { - if (this.addedFieldsByControlBox.some(id => id === targetFieldId)) { - - let entityInfo = this.getFieldBelongedEntity(targetFieldId); - if (!entityInfo) { - return; - } - // 若是关联字段,则需要定位到关联的根节点,然后从所属实体中将根节点删除 - if (entityInfo.isRefElement) { - const belongedEntity = entityInfo.entity; - const bindingPath = entityInfo.schemaField.bindingPath; - const refRootLabel = bindingPath.slice(0, bindingPath.indexOf('.')); - const refRootFieldIndex = belongedEntity.type.fields.findIndex(field => field.bindingPath === refRootLabel); - if (refRootFieldIndex > -1) { - const refFieldId = belongedEntity.type.fields[refRootFieldIndex].id; - delete this.addedRelatedFieldsByControlBox[refFieldId]; - - belongedEntity.type.fields.splice(refRootFieldIndex, 1); - - } - - } else { - // 若是简单字段,可以直接按照id删除 - const belongedEntity = entityInfo.entity; - belongedEntity.type.fields = belongedEntity.type.fields.filter(field => field.id !== targetFieldId); - } - - this.addedFieldsByControlBox = this.addedFieldsByControlBox.filter(fieldId => fieldId !== targetFieldId); - } - } - }) - - } - - - /** - * 根据视图模型id删除绑定的schema实体 - * @param viewModelId 视图模型id - */ - removeSchemaEntityByViewModelId(viewModelId: string) { - - if (this.addedFieldsByControlBox && this.addedFieldsByControlBox.length) { - const belongedEntityInfo = this.getTableInfoByViewModelId(viewModelId); - if (!belongedEntityInfo) { - return; - } - // 若当前列表绑定的实体是通过控件树新增的,那么在删除列表时将实体一起删除 - if (this.addedFieldsByControlBox.some(id => id === belongedEntityInfo.id)) { - - this.deleteSchemaEntityById(belongedEntityInfo.id); - - this.addedFieldsByControlBox = this.addedFieldsByControlBox.filter(fieldId => fieldId !== belongedEntityInfo.id); - } - } - } - - /** - * 根据字段id获取所属schema实体和字段 - * @param fieldId 字段id - */ - private getFieldBelongedEntity(fieldId: string): { - entity: FormSchemaEntity, schemaField: FormSchemaEntityField, isRefElement: boolean - } { - const schemaEntities = this.getSchemaEntities(); - if (!schemaEntities || schemaEntities.length < 1 || !schemaEntities[0]) { - return null; - } - const mainEntity = schemaEntities[0]; - let queue = [mainEntity]; - while (queue.length) { - const current = queue.shift(); - if (current.type.fields && current.type.fields.length) { - - const fieldInfo = this.getFieldInfoByID(current.type.fields, '', fieldId); - if (fieldInfo) { - return { - entity: current, - schemaField: fieldInfo.schemaField, - isRefElement: fieldInfo.isRefElement - } - } - } - if (current.type.entities && current.type.entities.length) { - queue = queue.concat(current.type.entities); - } - } - return null; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/state-machine.service.ts b/packages/designer/projects/designer-services/src/lib/services/state-machine.service.ts deleted file mode 100644 index 275df806789abfaf13f187c6d5e5ded6328e9dac..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/state-machine.service.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { FormBasicService } from '../services/form-basic.service'; -import { Injectable } from '@angular/core'; -// import { GSPMetadataService } from '@gsp-lcm/metadata-selector'; -import { cloneDeep } from 'lodash-es'; -import { Observable } from 'rxjs'; -import { DomService } from '../services/dom.service'; -import { DesignerEnvType } from '../entity/form-metadata'; -import { NotifyService } from '@farris/ui-notify'; -// import { GSPMetadataRTService } from '@gsp-lcm/metadatart-selector'; -import { FormStateMachine } from '../entity/dom-entity'; -import { FarrisMetadataService } from './metadata-service'; -class StateMetadaDataDom { - id: string; - name: string; - exist: string; -} - - -/** - * 集成多值属性编辑器组件中的状态机 - */ - -@Injectable({ - providedIn: 'root' -}) -export class StateMachineService { - private _action: { [actionName: string]: { name: string, transitTo: string, description: string } }; - public get action() { - return this._action; - } - stateMachineMiddleData: StateMetadaDataDom = { - id: '', - name: '', - exist: '' - }; - - /** 状态机uri */ - stateMachineID: string; - - /* 状态机数组 */ - stateMachineMetaData: any; - - constructor( - private formBasicService: FormBasicService, - private domService: DomService, - private notifyService: NotifyService, - private metadataService: FarrisMetadataService - ) { } - - - /** - * 获取状态机可选状态数据,用于属性面板配置 - */ - initStateMachineMetaData() { - const stateMachines = this.domService.module.stateMachines; - if (!stateMachines || !stateMachines.length) { - return; - } - const stateMachineID = stateMachines[0].uri; - - this.getStateMachineMetadata(stateMachineID).subscribe(result => { - this.getAllStates(result); - this.buildActions(result); - this.adaptOldStateMachine(result, stateMachines[0]); - }, () => { - this.notifyService.error('获取状态机元数据失败!'); - }); - } - - /** - * 获取状态机元数据:区分运行时定制和设计时环境 - * @param stateMachineID 状态机id - */ - private getStateMachineMetadata(stateMachineID: string): Observable { - return this.metadataService.getMetadata(stateMachineID); - } - - /** - * 根据状态机id获取状态机数组 - * @param result 状态机元数据 - */ - private getAllStates(result) { - this.stateMachineMetaData = []; - Object.keys(JSON.parse(result.content).renderState).forEach(item => { - this.stateMachineMiddleData.id = item; - this.stateMachineMiddleData.name = JSON.parse(result.content).renderState[item].name; - this.stateMachineMiddleData.exist = '是'; - this.stateMachineMetaData.push(cloneDeep(this.stateMachineMiddleData)); - this.stateMachineMiddleData.id = ''; - this.stateMachineMiddleData.name = ''; - }); - return this.stateMachineMetaData; - } - private buildActions(result) { - const object = JSON.parse(result.content); - const actions = object && object.action || {}; - this._action = actions; - } - - private adaptOldStateMachine(result: any, stateMachine: FormStateMachine) { - if (this.formBasicService.envType !== DesignerEnvType.designer) { - return; - } - // 设计器自动补充的属性,不记录变更 - window['suspendChangesOnForm'] = true; - - if (!stateMachine.nameSpace) { - stateMachine.nameSpace = result.nameSpace; - } - if (!stateMachine.code) { - stateMachine.code = result.code; - } - // if (!stateMachine.path) { - // stateMachine.nameSpace = result.code; - // } - - window['suspendChangesOnForm'] = false; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/uniform-editor-util.ts b/packages/designer/projects/designer-services/src/lib/services/uniform-editor-util.ts deleted file mode 100644 index 9820d12966d5ca6a9fea6a4e6b525acda0e4de43..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/uniform-editor-util.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { DomService } from './dom.service'; - -/** - * 多值属性编辑器组件数据服务 - */ -export class UniformEditorDataUtil { - - constructor() { } - - /** - * 获取组件变量和表单变量数组 - */ - static getVariables(viewModelId: string, domService: DomService): any[] { - const vars = []; - // 1、表单变量 - const remoteVars = domService.getRemoteVariables(); - const rootViewModelId = domService.getRootViewModelId(); - const envType = this.getEnvType(); - if(envType !== 'mobileDesigner' ||(envType === 'mobileDesigner' && viewModelId === rootViewModelId)){ - UniformEditorDataUtil._readVariables(remoteVars, vars, 'remote'); - } - - // 2、当前组件的组件变量 - const viewModel = domService.getViewModelById(viewModelId); - const localVars = domService.getLocaleVariablesByViewModelId(viewModelId); - for (const localVar of localVars) { - const children = localVar.children; - UniformEditorDataUtil._readVariables(children, vars, 'local'); - } - - // 3、根组件的组件变量 - if (viewModel.parent && envType !== 'mobileDesigner') { - const rootLocalVars = domService.getLocaleVariablesByViewModelId(viewModel.parent); - for (const rootLocalVar of rootLocalVars) { - const children = rootLocalVar.children; - UniformEditorDataUtil._readVariables(children, vars, 'local', true); - } - } - - return vars; - } - - private static getEnvType(){ - // const metadataPath = gsp.ide.getParam('id'); - // if(metadataPath.includes('.mfrm')){ - // return 'mobileDesigner' - // } - return 'designer' - - } - - static _readVariables(children: any, vars: any[], type: string, isFromParent = false) { - if (!children || !vars) { - return; - } - const envType = this.getEnvType(); - for (const child of children) { - const variable = child.data; - const newVar = { - category: type, - path: envType !== 'mobileDesigner' && (type === 'remote' || isFromParent) ? 'root-component.' + variable.code : variable.code, - name: variable.name, - field: variable.id, - fullPath: variable.code - }; - vars.push(newVar); - UniformEditorDataUtil._readVariables(child.children, vars, type); - } - } - - /** - * 获取控件绑定的字段或变量的编号,作为新生成变量的属性 - * @param propertyData 属性 - * @returns 组件名称(以大驼峰形式返回) - */ - static getControlName(propertyData: any): string { - const prop = propertyData.binding && propertyData.binding.path || propertyData.id || ''; - let name = ''; - let upper = true; - const regx = /^[A-Za-z0-9]$/; - for (let c of prop) { - if (regx.test(c)) { - if (upper) { - c = c.toUpperCase(); - upper = false; - } - name += c; - } else { - upper = true; - } - } - return name; - } - -} diff --git a/packages/designer/projects/designer-services/src/lib/services/web-cmd.service.ts b/packages/designer/projects/designer-services/src/lib/services/web-cmd.service.ts deleted file mode 100644 index b08f2f77e831ede9fdc3d1bf146407809d36fdf1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/web-cmd.service.ts +++ /dev/null @@ -1,1144 +0,0 @@ -import { Injectable, Injector } from '@angular/core'; -import { DomService } from './dom.service'; -import { MessagerService } from '@farris/ui-messager'; -import { FormBasicService } from '../services/form-basic.service'; -import { FormWebCmd } from '../entity'; -import { forkJoin, Observable, of, Subject } from 'rxjs'; -import { retryWhen, scan, delay } from 'rxjs/operators'; -import { catchError, map, switchMap } from 'rxjs/operators'; -import { cloneDeep } from 'lodash-es'; -import { IdService } from '@farris/ui-common'; -import { WebCmpBuilderService } from './web-cmp-builder.service'; -import { IControlService } from '@farris/designer-element'; -import { DesignerHostSettingService } from './designer-host.service'; -import { LoadingService } from '@farris/ui-loading'; -import { FarrisMetadataDto, FarrisMetadataService } from './metadata-service'; -import { WebCommandMetadataConvertor } from '../web-command-converter/web-command-metadata'; - -@Injectable({ - providedIn: 'root' -}) -export class WebCmdService { - controlService: IControlService; - constructor( - public domService: DomService, - public msgService: MessagerService, - public metadataService: FarrisMetadataService, - public formBasicService: FormBasicService, - public idService: IdService, - public webCmpBuilderService: WebCmpBuilderService, - public injector: Injector, - public loadingService: LoadingService, - ) { } - - /** 单个内置构件控制器 */ - internalCommandListItem = { - controllerName: { - label: '', - name: '', - id: '', - }, - controllerList: [ - ] - } - /** 控制器下的命令列表 */ - controllerListItem = { - label: '', - name: '', - id: '', - handlerName: '', - /** 当前命令需要选择目标组件 */ - showTargetComponent: false, - /** 当前命令选择的目标组件的id */ - cmpId: '', - componentLists: [], - isNewGenerated: undefined, - isRTCmd: undefined, - isInvalid: false, - property: [] - } - /** 命令列表下的参数 */ - propertyItem: any; - /** 内置构件控制器 */ - internalCommandList = []; - /** 已绑定事件列表 */ - boundEventsList: any; - /** dom中的webCmds节点 */ - webCmds: any; - /** dom中的视图模型数据 */ - viewModelData: any; - - - newControllerMethodBindingInfo: { - controlData: any, - componentId: string, - viewModelId: string, - eventCode: string, - methodCode: string, - methodName: string, - setPropertyRelates?: any - }; - - /** 0.获取webcmd控制器(其参数为空)*/ - checkCommands(): Observable { - const loading = this.loadingService.show({ message: '数据加载中,请稍候....' }); - const subject = new Subject(); - this.loadWebcmd().subscribe(webCmds => { - // 设计器自动补充的属性,不记录变更 - window['suspendChangesOnForm'] = true; - - this.webCmds = cloneDeep(webCmds); - this.generateInternalCommandList(); - this.checkViewModelCommands(webCmds); - this.syncActions(); - loading.close(); - - window['suspendChangesOnForm'] = false; - - subject.next(true) - }, err => { - this.msgService.warning(err); - loading.close(); - subject.next(true) - }); - return subject; - } - - /** 1.生成webcmd控制器列表 */ - loadWebcmd() { - const retryWithDelay = (count: number, delayTime: number) => { - return retryWhen((errors) => { - return errors.pipe( - scan((errCount) => { - if (errCount >= count) { - throw errors; - } - return errCount + 1; - }, 0), - delay(delayTime) - ); - }); - }; - return this.loadWebCmdsInCurrentPath().pipe( - switchMap(() => { - const webcmdInfos = this.domService.getWebCmds(); - const obs = []; - for (const webcmdInfo of webcmdInfos) { - const metadataServ = this.metadataService.getMetadata(webcmdInfo.id); - const ob = metadataServ.pipe( - // 补充控制器编号、命名空间 - map(metadata => { - // 设计器自动补充的属性,不记录变更 - window['suspendChangesOnForm'] = true; - - webcmdInfo.code = webcmdInfo.code ? webcmdInfo.code : metadata.code; - webcmdInfo.nameSpace = webcmdInfo.nameSpace ? webcmdInfo.nameSpace : metadata.nameSpace; - - window['suspendChangesOnForm'] = false; - return metadata; - }), - retryWithDelay(3, 330), // 如果拉取元数据包失败,可能是后端接口暂时性异常,重试3次均失败再弹出提示 - catchError(() => { - // 1、当前表单中引用了构件中的方法:那么找不到构件时,提示用户是否要移除构件的引用。 - // 2、当前表单没有引用构件中的任何方法:那么找不到构件时,自动移除构件引用信息,没有提示信息。 - if (webcmdInfo.refedHandlers && webcmdInfo.refedHandlers.length) { - this.msgService.question(`获取元数据${webcmdInfo.name}失败,是否移除表单的引用?`, () => { - this.domService.getDomJson().module.webcmds = this.domService.getWebCmds().filter(webCmd => webCmd.id !== webcmdInfo.id); - }); - } else { - this.domService.getDomJson().module.webcmds = this.domService.getWebCmds().filter(webCmd => webCmd.id !== webcmdInfo.id); - } - return of(false); - }) - ); - obs.push(ob); - } - let loadingObservable: Observable; - if (obs.length) { - loadingObservable = forkJoin(obs); - } else { - loadingObservable = of([]); - } - // 每次加载重新请求。 - return loadingObservable.pipe( - map(metadataList => { - return metadataList.filter(item => !!item).map(item => new WebCommandMetadataConvertor().InitFromJobject(JSON.parse(item.content))); - }) - ); - }) - ); - - } - /** 1-1.将当前表单相关的自定义构件追加到webCmds中 */ - private loadWebCmdsInCurrentPath(): Observable { - const webcmdInfos = this.domService.getWebCmds(); - const result = this.metadataService.getMetadataList('.webcmd'); - const subject = new Subject(); - result.subscribe(list => { - if (!list) { - subject.next(); - return; - } - for (const item of list) { - let extendProperty: any; - try { - extendProperty = JSON.parse(item.extendProperty); - } catch (e) { } - - // 比对表单编号,若不匹配说明是其他表单关联的自定义构件 - if (extendProperty && extendProperty.FormCode !== this.formBasicService.formMetaBasicInfo.code) { - continue; - } - - // 只要是属于此表单的都需要加载,除非是已经添加到表单中 - if (!webcmdInfos.find(webcmdInfo => item.id === webcmdInfo.id)) { - // 画布渲染过程中,可能会在控件上补充属性,这种变更用户不感知,所以不需要通知IDE框架 - window['suspendChangesOnForm'] = true; - const webcmd: FormWebCmd = { - id: item.id, - path: item.relativePath, - name: item.fileName, - refedHandlers: [] - }; - webcmdInfos.push(webcmd); - - window['suspendChangesOnForm'] = false; - } - } - subject.next(); - }); - return subject; - } - - /** 2.生成内置构件中的控制器列表数据 */ - generateInternalCommandList() { - this.webCmds = cloneDeep(this.getUniqueValue(this.webCmds, 'Id')); - this.internalCommandList = []; - this.webCmds.forEach(controller => { - this.internalCommandListItem.controllerName = { - label: controller.Code, - name: controller.Name, - id: controller.Id, - } - if (!controller.Commands) { - controller['Commands'] = []; - } - controller.Commands.forEach(command => { - this.controllerListItem.label = command.Code; - this.controllerListItem.name = command.Name; - this.controllerListItem.id = command.Id; - this.controllerListItem.handlerName = command.Code; - if (command.Parameters) { - command.Parameters.forEach(params => { - this.propertyItem = { - id: params.Id, - name: cloneDeep(params.Code), - value: '', - shownName: params.Name, - description: params.Description, - editorType: cloneDeep(params.EditorType), - isRetVal: params.IsRetVal, - parameterType: params.parameterType, - origin: cloneDeep(params) - } - this.controllerListItem.property.push(cloneDeep(this.propertyItem)); - }); - } - else { - command['Parameters'] = []; - this.controllerListItem.property = []; - } - this.internalCommandListItem.controllerList.push(cloneDeep(this.controllerListItem)); - this.controllerListItem.property = []; - }); - this.internalCommandList.push(cloneDeep(this.internalCommandListItem)); - this.internalCommandListItem.controllerList = []; - }); - return this.internalCommandList; - - } - /** 2-1.去重 */ - getUniqueValue(itemWithSameValue, identifier) { - let value = cloneDeep(itemWithSameValue); - for (let i = 0; i < value.length; i++) { - for (let j = i + 1; j < value.length; j++) { - if (value[i][identifier] == value[j][identifier]) { - value.splice(j, 1); - j--; - } - } - } - itemWithSameValue = cloneDeep(value); - return itemWithSameValue; - } - - /** 3.检查视图模型的命令是否符合存储规范 */ - checkViewModelCommands(webCmds) { - - // 设计器自动补充的属性,不记录变更 - window['suspendChangesOnForm'] = true; - - this.domService.viewmodels.forEach(viewModel => { - if (!viewModel.commands) { - return; - } - viewModel.commands.map(curCmd => { - const webCmd = webCmds.find(item => item.Id === curCmd.cmpId); - if (!webCmd) { - curCmd.isInvalid = true; - return; - } - const commandInWebCmd = webCmd.Commands.find(c => c.Code === curCmd.handlerName); - - if (commandInWebCmd) { - curCmd.isInvalid = false; - - // 将表单中记录的参数名称更新为控制器中的参数名称 - if (curCmd.params && curCmd.params.length && commandInWebCmd.Parameters && commandInWebCmd.Parameters.length) { - curCmd.params.forEach((curParam) => { - const paramInWebCmd = commandInWebCmd.Parameters.find(param => param.Code === curParam.name); - if (paramInWebCmd) { - curParam.shownName = paramInWebCmd.Name; - delete curParam.description; - } - }); - } - } else { - curCmd.isInvalid = true; - } - }); - - }); - - window['suspendChangesOnForm'] = false; - } - - /** 4.渲染表单取出所有的已绑定事件,同步至actions节点 */ - syncActions() { - if (this.webCmds) { - let components = cloneDeep(this.domService.module.components); - components = components.filter(c => !c.fakeDel); - let findEvents = []; - let allBoundEvents = this.findBoundEvent(components, findEvents, 'root-viewmodel'); - if (this.domService.module.toolbar) { - allBoundEvents = this.findBoundEventInToolbar(this.domService.module.toolbar, allBoundEvents); - } - this.getUniqueEvent(allBoundEvents); - let array = []; - const viewModel = cloneDeep(this.domService.module.viewmodels); - if (allBoundEvents.length != 0) { - allBoundEvents = this.setActions(this.getComponentId(this.matchWebcmd(this.matchVM(allBoundEvents, viewModel))), 0, array); - } - this.domService.module.actions = cloneDeep(allBoundEvents); - } - } - /** 4-1-1.遍历components节点,找到所有事件 */ - findBoundEvent(components, findEvents, viewModelId, excludedEvents?: string[]) { - this.controlService = this.injector.get(DesignerHostSettingService).controlService; - components.forEach((componentsItem) => { - if (componentsItem['viewModel']) { viewModelId = componentsItem['viewModel'] } - if (componentsItem['contents']) { - this.findBoundEvent(componentsItem['contents'], findEvents, viewModelId); - } - if (componentsItem['items']) { - this.findBoundEvent(componentsItem['items'], findEvents, viewModelId); - } - if (componentsItem['children']) { - this.findBoundEvent(componentsItem['children'], findEvents, viewModelId); - } - if (componentsItem['fields']) { - this.findBoundEvent(componentsItem['fields'], findEvents, viewModelId); - } - if (componentsItem['editor']) { - let editor = []; - editor.push(cloneDeep(componentsItem['editor'])); - this.findBoundEvent(editor, findEvents, viewModelId, ['linkedLabelClick']); - } - if (componentsItem['toolbar']) { - if (componentsItem['toolbar']['contents']) { - this.findBoundEvent(componentsItem['toolbar']['contents'], findEvents, viewModelId); - } - //移动:导航工具栏 - if (componentsItem['toolbar']['items']) { - this.findBoundEvent(componentsItem['toolbar']['items'], findEvents, viewModelId); - } - } - // ListView - if (componentsItem['type'] == "ListView") { - if (componentsItem['contentTemplate']) { - const contentTemplateDom = componentsItem['contentTemplate']; - if (contentTemplateDom['toolbar']) { - if (contentTemplateDom['toolbar']['contents']) { - this.findBoundEvent(contentTemplateDom['toolbar']['contents'], findEvents, viewModelId); - } - } - } - //移动:列表滑动 - if (componentsItem['swipeToolbar'] && componentsItem['swipeToolbar']['items']) { - this.findBoundEvent(componentsItem['swipeToolbar']['items'], findEvents, viewModelId); - } - - } - // table类型 - if (componentsItem['type'] == "Table" && componentsItem['rows']) { - const rows = componentsItem['rows']; - rows.forEach(rowsItem => { - if (rowsItem['columns']) { - const columns = rowsItem['columns']; - columns.forEach(columnsItem => { - if (columnsItem['editor']) { - this.findBoundEvent([columnsItem['editor']], findEvents, viewModelId); - } - }); - } - }) - } - // 筛选方案 - if (componentsItem['fieldConfigs']) { - const fieldConfigs = componentsItem['fieldConfigs']; - fieldConfigs.forEach(fieldConfigsItem => { - if (fieldConfigsItem['control']) { - this.findBoundEvent([fieldConfigsItem['control']], findEvents, viewModelId); - } - }); - } - // 筛选条 - if (componentsItem['filterList']) { - const fieldConfigs = componentsItem['filterList']; - fieldConfigs.forEach(fieldConfigsItem => { - if (fieldConfigsItem['control']) { - this.findBoundEvent([fieldConfigsItem['control']], findEvents, viewModelId); - } - }); - } - - // 侧边栏 - if (componentsItem['type'] == "Sidebar" && componentsItem['toolbar'] && componentsItem['toolbar']['items']) { - this.findBoundEvent(componentsItem['toolbar']['items'], findEvents, viewModelId); - } - - // 智能输入框的弹出表单模式 - if (componentsItem['modalConfig'] && componentsItem['modalConfig']['footerButtons'] && componentsItem['modalConfig']['footerButtons'].length) { - this.findBoundEvent(componentsItem['modalConfig']['footerButtons'], findEvents, viewModelId); - } - - // 列表右键菜单中的按钮 - if (componentsItem['type'] == "DataGrid" && componentsItem['contextMenuItems'] && componentsItem['contextMenuItems'].length) { - this.findBoundEvent(componentsItem['contextMenuItems'], findEvents, viewModelId); - } - - // 查询结果工具栏中的按钮 - if (componentsItem['type'] == "QdpFramework" && componentsItem['inputTemplate'] && componentsItem['inputTemplate'].length) { - this.findBoundEvent(componentsItem['inputTemplate'], findEvents, viewModelId); - } - - const controlEventPropertyIDList = this.controlService.getControlEventPropertyIDList(); - let eventKeys = Object.keys(controlEventPropertyIDList); - for (let i = 0; i < eventKeys.length; i++) { - if (excludedEvents && excludedEvents.length && excludedEvents.includes(eventKeys[i])) { - continue; - } - let exist = componentsItem.hasOwnProperty(eventKeys[i]); - if (exist && componentsItem[eventKeys[i]]) { - // 判定三段式路径 - let paths = componentsItem[eventKeys[i]].includes('.') ? componentsItem[eventKeys[i]].split('.') : undefined; - const vmId = paths != undefined ? paths[1] : viewModelId; - const cmdLabel = paths != undefined ? paths[2] : componentsItem[eventKeys[i]]; - let findEventsItem = { - id: componentsItem['id'], - eventLabel: eventKeys[i], - eventName: controlEventPropertyIDList[eventKeys[i]], - commandLabel: cmdLabel, - viewModelId: vmId - } - findEvents.push(cloneDeep(findEventsItem)); - } - } - }) - return findEvents; - } - /** 4-1-2.遍历查看是否存在toolbar节点,若有,则找到所有事件 */ - findBoundEventInToolbar(toolbar, findEvents) { - if (toolbar['items']) { - const items = toolbar['items']; - const vmKeys = Object.keys(items); - for (let j = 0; j < vmKeys.length; j++) { - const vmValue = items[vmKeys[j]]; - vmValue.forEach(vmValueItem => { - const controlEventPropertyIDList = this.controlService.getControlEventPropertyIDList(); - let eventKeys = Object.keys(controlEventPropertyIDList); - for (let i = 0; i < eventKeys.length; i++) { - let exist = vmValueItem.hasOwnProperty(eventKeys[i]); - if (exist && vmValueItem[eventKeys[i]]) { - // 判定三段式路径 - let paths = vmValueItem[eventKeys[i]].includes('.') ? vmValueItem[eventKeys[i]].split('.') : undefined; - const vmId = paths != undefined ? paths[1] : vmKeys[j]; - const cmdLabel = paths != undefined ? paths[2] : vmValueItem[eventKeys[i]]; - let findEventsItem = { - id: vmValueItem['id'], - eventLabel: eventKeys[i], - eventName: controlEventPropertyIDList[eventKeys[i]], - commandLabel: cmdLabel, - viewModelId: vmId - } - findEvents.push(cloneDeep(findEventsItem)); - } - - // 识别二级按钮 - if (vmValueItem.items && vmValueItem.items.length) { - vmValueItem.items.forEach(childItem => { - if (!childItem[eventKeys[i]]) { - return; - } - const paths = childItem[eventKeys[i]].includes('.') ? childItem[eventKeys[i]].split('.') : undefined; - const vmId = paths !== undefined ? paths[1] : vmKeys[j]; - const cmdLabel = paths !== undefined ? paths[2] : childItem[eventKeys[i]]; - const findEventsItem = { - id: childItem['id'], - eventLabel: eventKeys[i], - eventName: controlEventPropertyIDList[eventKeys[i]], - commandLabel: cmdLabel, - viewModelId: vmId - }; - findEvents.push(cloneDeep(findEventsItem)); - }) - - } - } - }) - } - } - return findEvents; - } - /** 4-2.去重-去除特殊情况下存储的相同事件及命令 */ - getUniqueEvent(allBoundEvents) { - let value = cloneDeep(allBoundEvents); - for (let i = 0; i < value.length; i++) { - for (let j = i + 1; j < value.length; j++) { - if (value[i]['id'] == value[j]['id'] && value[i]['eventLabel'] == value[j]['eventLabel']) { - value.splice(j, 1); - j--; - } - } - } - allBoundEvents = cloneDeep(value); - return allBoundEvents; - } - /** 4-3.根据遍历components和toolbar得出的所有事件,结合viewmodel和webcmd,得到参数值 */ - matchVM(allBoundEvents, viewModel) { - let updatedBoundEvents = []; - allBoundEvents.forEach(boundEvenItem => { - viewModel.forEach(viewModelItem => { - if (viewModelItem.id == boundEvenItem.viewModelId) { - viewModelItem.commands.forEach(commandItem => { - if (commandItem.code == boundEvenItem.commandLabel) { - let event = { - id: boundEvenItem.id, - eventLabel: boundEvenItem.eventLabel, - eventName: boundEvenItem.eventName, - viewModelId: boundEvenItem.viewModelId, - commandId: commandItem.id, - commandLabel: boundEvenItem.commandLabel, - commandName: commandItem.name, - handlerName: commandItem.handlerName, - cmpId: commandItem.cmpId, - isNewGenerated: commandItem.isNewGenerated || false, - isRTCmd: commandItem['isRTCmd'], - isInvalid: commandItem.isInvalid || false, - params: cloneDeep(commandItem.params), - controllerId: '', - controllerLabel: '', - controllerName: '', - } - if (commandItem['targetComponent']) { - event['targetComponent'] = commandItem.targetComponent; - } - updatedBoundEvents.push(cloneDeep(event)); - } - }); - } - }); - }); - return updatedBoundEvents; - } - /** 4-4.根据遍历components得出的所有事件,结合webcmd,得到控制器值 */ - matchWebcmd(allBoundEvents) { - this.webCmds.forEach(webCmdsItem => { - allBoundEvents.forEach(allBoundEventsItem => { - if (webCmdsItem.Id == allBoundEventsItem.cmpId) { - webCmdsItem.Commands.forEach(commandItem => { - if (commandItem.Code == allBoundEventsItem.handlerName) { - allBoundEventsItem.controllerId = webCmdsItem.Id; - allBoundEventsItem.controllerLabel = webCmdsItem.Code; - allBoundEventsItem.controllerName = webCmdsItem.Name; - } - }); - } - }); - }); - allBoundEvents.forEach(function (allBoundEventsItem, index) { - //失效命令 - if (allBoundEventsItem.controllerId == '' && allBoundEventsItem.controllerLabel == '' && allBoundEventsItem.controllerName == '') { - allBoundEvents.splice(index, 1); - } - }) - return allBoundEvents; - } - /** 4-5.根据遍历components得出的事件的viewmodelId,得到componentId值 */ - getComponentId(allBoundEvents) { - const components = this.domService.module.components; - const viewModel = this.domService.module.viewmodels; - for (let i = 0; i < components.length; i++) { - allBoundEvents.forEach(allBoundEventsItem => { - if (viewModel[i] && viewModel[i].id == allBoundEventsItem.viewModelId) { - allBoundEventsItem.componentId = components[i].id; - } - }); - } - return allBoundEvents; - } - /** 4-6.标准样式化actions */ - setActions(allBoundEvents, num, array) { - let action = { - sourceComponent: { - id: '', - viewModelId: '', - map: [] - } - }; - if (!allBoundEvents[num]) { - return; - } - action.sourceComponent.id = allBoundEvents[num].id; - action.sourceComponent.viewModelId = allBoundEvents[num].viewModelId; - let i = num; - while (i < allBoundEvents.length) { - if (allBoundEvents[i].id == action.sourceComponent.id) { - let mapItem = { - event: { - label: allBoundEvents[i].eventLabel, - name: allBoundEvents[i].eventName - }, - targetComponent: { - id: allBoundEvents[i].componentId, - viewModelId: allBoundEvents[i].viewModelId - }, - command: { - id: allBoundEvents[i].commandId, - label: allBoundEvents[i].commandLabel, - name: allBoundEvents[i].commandName, - handlerName: allBoundEvents[i].handlerName, - params: cloneDeep(allBoundEvents[i].params), - cmpId: allBoundEvents[i].cmpId, - isNewGenerated: allBoundEvents[i].isNewGenerated || false, - isRTCmd: allBoundEvents[i]['isRTCmd'], - isInvalid: allBoundEvents[i].isInvalid || false, - }, - controller: { - id: allBoundEvents[i].controllerId, - label: allBoundEvents[i].controllerLabel, - name: allBoundEvents[i].controllerName - } - } - if (allBoundEvents[i]['componentId']) { - mapItem.targetComponent.id = allBoundEvents[i].componentId; - } - action.sourceComponent.map.push(cloneDeep(mapItem)); - i++; - if (i == allBoundEvents.length) { - array.push(cloneDeep(action)); - } - } - else { - array.push(cloneDeep(action)); - this.setActions(allBoundEvents, i, array); - break; - } - } - return array; - } - - /** 更新事件编辑器获取到的webcmds */ - webCmdsChanged(newController) { - newController.forEach(newControllerItem => { - let item = new WebCommandMetadataConvertor().InitFromJobject(newControllerItem); - this.webCmds.push(cloneDeep(item)); - }); - this.checkViewModelCommands(this.webCmds); - } - - - - /** - * 事件面板调用-1 - * a. 合并视图模型带参数的命令&控制器中无参数的命令 - * b. 生成绑定事件列表 - * */ - findParamtersPosition(propertyData: any, events: any, viewModelId: string, allComponentList: any) { - this.boundEventsList = []; - let viewModelData = cloneDeep(this.domService.module.viewmodels); - //1. 遍历当前container的组件dom结构的所有事件的值 - events.forEach(event => { - if (propertyData[event.label]) { - // 三段式path:root-viewmodel.items-component-viewmodel.itemsAddItem1 或 一段path:itemsAddItem1 - let paths = propertyData[event.label].includes('.') ? propertyData[event.label].split('.') : undefined; - let recordCommand = this.handleParams(viewModelData, paths, propertyData[event.label], viewModelId, allComponentList).recordCommand; - let recordController = this.handleParams(viewModelData, paths, propertyData[event.label], viewModelId, allComponentList).recordController; - this.generateBoundEventsList(event, events, recordController, recordCommand); - } - }); - return this.boundEventsList; - } - /** 1-a.在视图模型中找到命令,并填充参数值*/ - handleParams(viewModelData, paths, propCmdLabel, viewModelId, allComponentList) { - const vmId = paths != undefined ? paths[1] : viewModelId; - const cmdLabel = paths != undefined ? paths[2] : propCmdLabel; - let cmpId; - if (allComponentList.length && vmId != undefined) { - const componentList = allComponentList.find(componentListsItem => componentListsItem.viewModelId == vmId); - cmpId = componentList == undefined ? undefined : componentList.componentId; - } - // 若命令不存在,则提示!,并允许用户绑定其他命令 - let recordCommand = { - id: 'abandoned', - code: cmdLabel, - name: cmdLabel, - params: [], - handlerName: cmdLabel, - cmpId: '', - shortcut: {}, - extensions: [], - isInvalid: false, - isNewGenerated: undefined, - showTargetComponent: false, - targetComponent: cmpId, - isRTCmd: undefined, - } - let recordController = { - controllerName: { - label: '', - name: '', - id: '', - }, - controllerList: { - }, - boundEvents: { - } - } - viewModelData.forEach(element => { - //5. 寻找命令-确认itemsAddItem1的位置 - if (element.code.includes(vmId)) { - element.commands.forEach(viewModelcommand => { - //6-1. 若命令存在,且参数不为空 - if (viewModelcommand.code == cmdLabel && viewModelcommand.params.length != 0) { - //判断是否为已失效命令 - if (!viewModelcommand['isInvalid']) { - //7-1. 若存在参数,则合并该命令在VM与控制器中的参数值 - viewModelcommand.params.forEach(param => { - // 7-1-1.handlerName唯一,code为带前后缀的命令英文名,name为中文名,param是当前待合并的参数(有值) - recordController = this.combinedParamters(param, viewModelcommand, recordController, recordCommand, cmpId).recordController; - recordCommand = this.combinedParamters(param, viewModelcommand, recordController, recordCommand, cmpId).recordCommand; - }); - } - else { - //命令已被删除 - recordCommand.id = 'deleted' - } - } - //6-2 若命令存在,且参数为空的处理 - else if (viewModelcommand.code == cmdLabel && viewModelcommand.params.length == 0) { - //判断是否为已失效命令 - if (!viewModelcommand['isInvalid']) { - //7-2. 不需要进行内置构件的处理,仅记录了命令所在的控制器及带前后缀的命令名称 - this.internalCommandList.forEach(controller => { - if (controller.controllerName.id == viewModelcommand.cmpId) { - controller.controllerList.forEach(command => { - if (command.handlerName == viewModelcommand.handlerName) { - recordController = cloneDeep(controller); - recordCommand = this.getRecordController(command, viewModelcommand, recordCommand, cmpId); - } - }) - } - }) - } else { - //命令已被删除 - recordCommand.id = 'deleted' - } - } - }); - - } - }); - return { - recordController, - recordCommand - }; - } - /** 1-a.合并视图模型带参数的命令&控制器中无参数的命令 */ - combinedParamters(paramWithValue: any, viewModelcommand, recordController, recordCommand, cmpId) { - //7-1-2. handlerName唯一,code为带前后缀的命令英文名,paramWithValue是当前待合并的参数(有值) - this.internalCommandList.forEach(controller => { - //控制器相同 - if (controller.controllerName.id == viewModelcommand.cmpId) { - controller.controllerList.forEach(command => { - //7-1-3. command.handlerName来自内置构件;handlerName来自视图模型 - if (command.handlerName == viewModelcommand.handlerName) { - command.property.forEach(paramWithoutValue => { - if (paramWithoutValue.name == paramWithValue.name) { - paramWithoutValue.value = cloneDeep(paramWithValue.value); - } - }); - recordController = cloneDeep(controller); - recordCommand = this.getRecordController(command, viewModelcommand, recordCommand, cmpId); - } - }); - } - }) - return { - recordController, - recordCommand - } - } - /** 1-a.存储绑定事件对应的控制器参数值 */ - getRecordController(command, viewModelcommand, recordCommand, cmpId) { - // 1-a-1. 由于vm未记录控制器,此处根据命令找到控制器,并将有值的参数对应的命令command记录 - recordCommand = cloneDeep(command); - // 1-a-2.记录带前后缀的英文名、中文名/参数 - recordCommand.label = viewModelcommand.code; - recordCommand.name = viewModelcommand.name; - recordCommand.id = viewModelcommand.id; - recordCommand.targetComponent = cmpId; - recordCommand['isRTCmd'] = viewModelcommand['isRTCmd']; - return recordCommand; - } - /** 1-b.生成已绑定的事件列表 */ - generateBoundEventsList(event, events, recordController, recordCommand) { - if (recordController != undefined) { - let boundEventsListItem = { - controllerList: { - }, - controllerName: { - }, - boundEvents: { - } - } - events.forEach(each => { - if (each.label == event.label) { boundEventsListItem.boundEvents = cloneDeep(each); } - }); - boundEventsListItem.controllerName = cloneDeep(recordController.controllerName); - boundEventsListItem.controllerList = cloneDeep(recordCommand); - this.boundEventsList.push(cloneDeep(boundEventsListItem)); - } - } - - /** 事件面板调用-2 - * 2-a.找到视图模型,在视图模型中增删改命令及参数 */ - viewModelDomChanged(propertyData: any, events: any, viewModelId: string, domActions: any) { - let viewModelData = cloneDeep(this.domService.module.viewmodels); - events.forEach(event => { - //1. 遍历当前container的dom结构的所有事件的值 - if (propertyData[event.label]) { - // 三段式path:root-viewmodel.items-component-viewmodel.itemsAddItem1 或 一段path:itemsAddItem1 - let paths = propertyData[event.label].includes('.') ? propertyData[event.label].split('.') : undefined; - this.handleViewModel(viewModelData, paths, propertyData[event.label], viewModelId, domActions, propertyData); - } - }); - this.domService.module.viewmodels = cloneDeep(viewModelData); - } - /** 2-a.在视图模型中增删改命令及参数 */ - handleViewModel(viewModelData, paths, propCmdLabel, viewModelId, domActions, propertyData) { - let newCommand = { - id: '', - code: '', - name: '', - params: [], - handlerName: '', - cmpId: '', - shortcut: {}, - extensions: [], - isInvalid: false, - isNewGenerated: undefined, - targetComponent: undefined, - isRTCmd: undefined, - } - const vmId = paths != undefined ? paths[1] : viewModelId; - const cmdLabel = paths != undefined ? paths[2] : propCmdLabel; - // 4. 遍历找到存储命令的第二层path——path[1],viewModel的items-component-viewmodel - viewModelData.forEach(element => { - if (element.code.includes(vmId)) { - let commandExist = false; - //5. 借助整体dom中的domActions节点,寻找命令-确认itemsAddItem1的位置 - domActions.forEach(action => { - //6. 匹配domActions,取出所有需要的值,包括命令名/事件名/参数/id等等; - if (action.sourceComponent.id == propertyData.id) { - action.sourceComponent.map.forEach(mapItem => { - if (mapItem.command.label == cmdLabel) { - newCommand.id = cloneDeep(mapItem.command.id); - newCommand.code = mapItem.command.label; - newCommand.name = mapItem.command.name; - newCommand.params = this.serializeParameter(mapItem.command.params); - newCommand.handlerName = mapItem.command.handlerName; - newCommand.cmpId = cloneDeep(mapItem.controller.id); - newCommand.shortcut = mapItem.command.shortcut; - newCommand.isRTCmd = mapItem.command['isRTCmd']; - newCommand.isNewGenerated = mapItem.command.isNewGenerated || false; - newCommand.isInvalid = mapItem.command.isInvalid || false; - newCommand.extensions = mapItem.command.extensions; - if (mapItem.command.isInvalid) { - newCommand.isInvalid = mapItem.command.isInvalid; - } - newCommand.targetComponent = mapItem.targetComponent.id; - } - }); - } - }); - //7-1. 匹配viewModel中存储的是否有该命令:itemsAddItem1,若存在该命令,则更新新的值 - element.commands.forEach(function (command, index) { - if (command.code == cmdLabel) { - commandExist = true; - element.commands.splice(index, 1, cloneDeep(newCommand)); - } - }); - //7-2. 若没有该命令,则进行添加 - if (!commandExist) { - element.commands.push(cloneDeep(newCommand)); - } - } - //8-1. 剪切掉其他同名称的命令 - else { - //8-1. 匹配其他viewModel中是否有同名称的命令,若有,则删除; - element.commands.forEach(function (command, index) { - if (command.code == cmdLabel) { - element.commands.splice(index, 1); - } - }); - } - }); - } - - - /** 事件面板调用-3 - * 3-a.存储事件编辑器「视图模型」中所有的viewModel数据 */ - viewModelDisplay() { - let savedViewModel = []; - const savedViewModelItem = { - controllerName: { - label: '', - name: '', - id: '', - }, - controllerList: [ - ] - } - /** 控制器下的命令列表 */ - let controllerListItem = { - label: '', - name: '', - id: '', - handlerName: '', - showTargetComponent: false, - isNewGenerated: undefined, - isRTCmd: undefined, - isInvaild: false, - cmpId: '', - componentLists: [], - targetComponent: undefined, - property: [ - - ] - } - if (!this.domService.module.actions) { - return savedViewModel; - } - this.domService.module.actions.forEach(actionItem => { - actionItem.sourceComponent.map.forEach(mapItem => { - savedViewModelItem.controllerName.id = mapItem.controller.id; - savedViewModelItem.controllerName.name = mapItem.controller.name; - savedViewModelItem.controllerName.label = mapItem.controller.label; - savedViewModel.push(cloneDeep(savedViewModelItem)); - savedViewModel = this.getUniqueController(savedViewModel); - }); - }) - savedViewModel.forEach(savedViewModelItem => { - this.domService.module.actions.forEach(actionItem => { - actionItem.sourceComponent.map.forEach(mapItem => { - if (mapItem.controller.id == savedViewModelItem.controllerName.id) { - controllerListItem.label = mapItem.command.label; - controllerListItem.name = mapItem.command.name; - controllerListItem.id = mapItem.command.id; - controllerListItem.handlerName = mapItem.command.handlerName; - controllerListItem.property = cloneDeep(mapItem.command.params); - controllerListItem.cmpId = mapItem.controller.id; - controllerListItem.isNewGenerated = mapItem.isNewGenerated || false; - controllerListItem.isRTCmd = mapItem['isRTCmd']; - controllerListItem.isInvaild = mapItem.inInvalid || false; - if (mapItem.targetComponent.id) { - controllerListItem.targetComponent = mapItem.targetComponent.id; - } else { - controllerListItem.targetComponent = undefined; - } - savedViewModelItem.controllerList.push(cloneDeep(controllerListItem)) - } - }) - }) - }); - return savedViewModel; - } - - /** 去重 */ - getUniqueController(itemWithSameValue) { - let value = cloneDeep(itemWithSameValue); - for (let i = 0; i < value.length; i++) { - for (let j = i + 1; j < value.length; j++) { - if (value[i]['controllerName']['id'] == value[j]['controllerName']['id']) { - value.splice(j, 1); - j--; - } - } - } - itemWithSameValue = cloneDeep(value); - return itemWithSameValue; - } - - /** 触发新增控制器方法 */ - addControllerMethod(propertyData: any, viewModelId: string, parameters: any) { - const { methodCode, methodName } = this.resolveNewMethodForCodeEditor(propertyData, viewModelId, parameters); - // this.webCmpBuilderService.addControllerMethod(methodCode, methodName); - } - /** - * 序列化视图模型中的命令参数 - * @param parameters 参数 - * @returns - */ - private serializeParameter(parameters: any[]) { - const results = []; - if (parameters && Array.isArray(parameters) && parameters.length > 0) { - parameters.forEach(parameter => { - const item: any = {}; - if (parameter.hasOwnProperty('name')) { - item.name = parameter.name; - } - if (parameter.hasOwnProperty('shownName')) { - item.shownName = parameter.shownName; - } - if (parameter.hasOwnProperty('value')) { - item.value = parameter.value; - } - results.push(item); - }); - } - return results; - } - - /** - * 交互面板跳转到代码视图前,收集控件信息,用于自动绑定新增的方法 - * @param propertyData 控件schema值 - * @param viewModelId 控件所属视图模型id - * @param parameters 点击添加新方法后,交互面板返回的参数 - * @param controlTypeName 控件类型名称 - */ - public resolveNewMethodForCodeEditor(propertyData: any, viewModelId: string, parameters: any): { methodCode: string, methodName: string } { - const eventCode = parameters.newFuncEvents && parameters.newFuncEvents.label || ''; - const eventName = parameters.newFuncEvents && parameters.newFuncEvents.name || ''; - const upperEventCode = eventCode.length > 1 ? (eventCode.slice(0, 1).toUpperCase() + eventCode.slice(1)) : eventCode; - - let methodCode = 'method'; - let methodName = '方法'; - - // 方法编号:控件类型+事件编号;方法名称:控件名称+事件名称 - const controlInfo = parameters.controlInfo; - if (controlInfo) { - const controlType = controlInfo.type; - const controlName = propertyData.title || propertyData.text || propertyData.caption || controlInfo.name; - if (controlType && controlType.length > 1 && controlName) { - const lowerControlType = controlType.slice(0, 1).toLowerCase() + controlType.slice(1); - methodCode = `${lowerControlType}${upperEventCode}`.replace(/_/g, '').replace(/-/g, ''); - methodName = `${controlName}${eventName}`.replace(/_/g, '').replace(/-/g, ''); - - } - } - - this.newControllerMethodBindingInfo = { - controlData: propertyData, - viewModelId, - componentId: this.domService.getComponentByVMId(viewModelId).id, - eventCode, - methodCode, - methodName, - setPropertyRelates: parameters.setPropertyRelates - }; - - return { methodCode, methodName }; - } - - /** - * 代码视图返回新增方法的编号、名称后,由设计器将方法添加到控件上 - * @param methodCode 新增方法的编号 - * @param methodName 新增方法的名称 - */ - bindNewMethodToControl(methodCode: string, methodName: string) { - if (!this.newControllerMethodBindingInfo) { - return; - } - const commandBuildInfo = this.webCmpBuilderService.buildInfo; - if (!commandBuildInfo || !commandBuildInfo.webCmdId) { - return; - } - const { eventCode, viewModelId } = this.newControllerMethodBindingInfo; - const viewModel = this.domService.getViewModelById(viewModelId); - - // 1、控件绑定命令 - this.newControllerMethodBindingInfo.controlData[eventCode] = methodCode; - - // 2、控件绑定命令后,可能会需要联动其他属性的变更 - if (this.newControllerMethodBindingInfo.setPropertyRelates) { - this.newControllerMethodBindingInfo.setPropertyRelates(null, this.newControllerMethodBindingInfo.controlData, null); - } - - // 3、视图模型添加命令 - let commandId = new IdService().generate(); - const viewModelCommand = viewModel.commands.find(co => co.code === methodCode && co.handlerName === methodCode && co.cmpId === commandBuildInfo.webCmdId); - if (!viewModelCommand) { - viewModel.commands.push( - { - id: commandId, - code: methodCode, - name: methodName, - params: [], - handlerName: methodCode, - cmpId: commandBuildInfo.webCmdId, - shortcut: {}, - extensions: [] - } - ); - } else { - commandId = viewModelCommand.id; - } - - - - // 4、webCmd添加构件 - if (this.domService.module.webcmds) { - let customCmd = this.domService.module.webcmds.find(cmd => cmd.id === commandBuildInfo.webCmdId); - if (!customCmd) { - customCmd = { - id: this.webCmpBuilderService.buildInfo.webCmdId, - path: commandBuildInfo.relativePath, - name: `${commandBuildInfo.code}.webcmd`, - refedHandlers: [] - }; - this.domService.module.webcmds.push(customCmd); - } - if (!customCmd.refedHandlers.find(handler => handler.host === commandId && handler.handler === methodCode)) { - customCmd.refedHandlers.push( - { - host: commandId, - handler: methodCode - } - ); - } - } - - this.newControllerMethodBindingInfo = null; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/services/web-cmp-builder.service.ts b/packages/designer/projects/designer-services/src/lib/services/web-cmp-builder.service.ts deleted file mode 100644 index d97a94927653bee8c5a1b14cc2a3056143266e40..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/services/web-cmp-builder.service.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { EventEmitter, Injectable } from '@angular/core'; -import { DomService } from './dom.service'; -import { MessagerService } from '@farris/ui-messager'; -import { FormBasicService } from '../services/form-basic.service'; -import { NotifyService } from '@farris/ui-notify'; -import { switchMap } from 'rxjs/operators'; -import { Observable, of, throwError as observableThrowError } from 'rxjs'; -import { HttpClient } from '@angular/common/http'; -import { DesignerEnvType } from '../entity'; -import { FarrisMetadataDto, FarrisMetadataService } from './metadata-service'; - -/** - * 新增构件、新增构件方法的服务 - */ -@Injectable({ - providedIn: 'root' -}) -export class WebCmpBuilderService { - - /** 构件元数据构造数据 */ - public buildInfo: any; - - /** ts代码文件路径 */ - private tsFilePathName: string; - - /** 新增构件方法,并触发打开代码视图 */ - public openCodeViewWithNewMethod = new EventEmitter(); - - private hasWebCmp = false; - private hasWebCmd = false; - - private methodCode: string; - private methodName: string; - - constructor( - public domService: DomService, - public msgService: MessagerService, - public metadataService: FarrisMetadataService, - public formBasicService: FormBasicService, - private notifyService: NotifyService, - private http: HttpClient, - ) { } - - public addControllerMethod(methodCode: string, methodName: string) { - this.methodCode = methodCode; - this.methodName = methodName; - - this.checkHasController().subscribe((result) => { - // 若不存在构件,先创建构件 - if (!result) { - this.createWebMetadata(); - } else { - if (this.formBasicService.envType === DesignerEnvType.designer) { - this.openCodeViewWithNewMethod.emit({ tsFilePathName: this.tsFilePathName, methodCode, methodName }); - } else { - this.openCodeViewWithNewMethod.emit(this.tsFilePathName); - } - } - }); - } - - /** - * 校验当前表单是否已有web构件和命令构件 - */ - private checkHasController(): Observable { - const formInfo = this.formBasicService.formMetaBasicInfo; - let suffix = '_frm_Controller'; - if (this.formBasicService.envType === DesignerEnvType.mobileDesigner) { - suffix = '_mfrm_Controller'; - - } - // 默认构件命令为'表单编号_frm_Controller' - this.buildInfo = { - code: formInfo.code + suffix, - name: formInfo.name + suffix, - namespace: formInfo.nameSpace, - bizObjId: formInfo.bizobjectID, - relativePath: formInfo.relativePath, - extendProperty: { IsCommon: false, FormCode: formInfo.code } - }; - const webCmpFileName = this.buildInfo.code + '.webcmp'; - const webCmdFileName = this.buildInfo.code + '.webcmd'; - - this.tsFilePathName = '/' + this.buildInfo.relativePath + '/' + this.buildInfo.code + '.ts'; - return this.metadataService.validateRepeatName(this.buildInfo.relativePath, webCmpFileName).pipe( - switchMap(notExsited => { - - this.hasWebCmp = !notExsited; - - // 再检查命令构件是否存在 - return this.metadataService.validateRepeatName(this.buildInfo.relativePath, webCmdFileName); - }), - switchMap(notExsited2 => { - this.hasWebCmd = !notExsited2; - if (this.hasWebCmd) { - // 查询命令构件信息---用于获取命令构件id - return this.metadataService.loadMetadata(webCmdFileName, this.buildInfo.relativePath); - } else { - return of(null); - } - }), - switchMap((data: any) => { - - if (this.hasWebCmd && data) { - this.buildInfo.webCmdId = data.id; - } - return of(this.hasWebCmp && this.hasWebCmd); - }) - ); - } - - - /** - * 创建构件:先创建web构件,再创建命令构件 - */ - private createWebMetadata() { - const fileName = this.buildInfo.code + '.webcmp'; - - const metadatadto = new FarrisMetadataDto('', this.buildInfo.namespace, this.buildInfo.code, this.buildInfo.name, - fileName, 'WebComponent', this.buildInfo.bizObjId, this.buildInfo.relativePath, JSON.stringify(this.buildInfo.extendProperty), '', false); - - // 已存在web构件, 只创建命令构件 - if (this.hasWebCmp) { - this.createWebCommand(); - return; - } - // 不存在web构件,先创建web构件 - this.metadataService.initializeMetadataEntity(metadatadto).pipe( - switchMap(data => { - data.fileName = metadatadto.fileName; - const path = this.buildInfo.relativePath + '/'; - const tsFileName = this.buildInfo.code + '.ts'; - const sourcePath = path + tsFileName; - const webComponent = JSON.parse(data.content) as WebComponentMetadata; - webComponent.Source = sourcePath.toString(); - data.content = JSON.stringify(webComponent); - return this.metadataService.createMetadata(data); - }), - switchMap(result => { - if (result.ok) { - let url = '/api/dev/main/v1.0/tsfile/create?path=' + this.tsFilePathName; - - if (this.formBasicService.envType === DesignerEnvType.mobileDesigner) { - url = '/api/dev/main/v1.0/tsfile/create/mobile?path=' + this.tsFilePathName; - - } - return this.http.post(url, {}); - } else { - this.notifyService.error('Web构件创建失败'); - return observableThrowError('Web构件创建失败'); - } - }) - ).subscribe(data => { - // web构件创建成功,若没有命令构件,则创建命令构件,若已有命令构件,则直接触发打开代码视图 - if (!this.hasWebCmd) { - this.createWebCommand(); - } else { - if (this.formBasicService.envType === DesignerEnvType.designer) { - this.openCodeViewWithNewMethod.emit({ tsFilePathName: this.tsFilePathName, methodCode: this.methodCode, methodName: this.methodName }); - } else { - this.openCodeViewWithNewMethod.emit(this.tsFilePathName); - } - } - }); - } - - /** - * 创建命令构件 - */ - private createWebCommand() { - const fileName = this.buildInfo.code + '.webcmd'; - const metadatadto = new FarrisMetadataDto('', this.buildInfo.namespace, this.buildInfo.code, this.buildInfo.name, - fileName, 'WebCommand', this.buildInfo.bizObjId, this.buildInfo.relativePath, JSON.stringify(this.buildInfo.extendProperty), '', false); - - this.metadataService.initializeMetadataEntity(metadatadto).pipe( - switchMap(data => { - data.fileName = metadatadto.fileName; - this.buildInfo.webCmdId = data.id; - return this.metadataService.createMetadata(data); - }) - ).subscribe(result => { - if (result.ok) { - if (this.formBasicService.envType === DesignerEnvType.designer) { - this.openCodeViewWithNewMethod.emit({ tsFilePathName: this.tsFilePathName, methodCode: this.methodCode, methodName: this.methodName }); - } else { - this.openCodeViewWithNewMethod.emit(this.tsFilePathName); - } - } else { - this.notifyService.error('命令构件创建失败'); - } - }); - } -} -/** - * Web构件元数据 - */ -export declare class WebComponentMetadata { - Id: string; - Code: string; - Description: string; - Source: string; - Operations: Array; - IsCommon: boolean; - ClassName: string; - FormCode: string; - PackageName: string; - PackageVersion: string; - Version: number; -} -/** 构件操作 */ -export declare class Operation { - Id: string; - Code: string; - Name: string; - Description: string; - Parameters: Array; -} -/** 构件操作参数 */ -export declare class Parameter { - Id: string; - Code: string; - Name: string; - Description: string; - ParameterType: string; - IsRetVal: boolean; -} diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/Command.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/Command.ts deleted file mode 100644 index 223bfc2ff70d426f1b7f8e5b5e8e29bab5636cde..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/Command.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { ICommandItem, CommandItemConvertor } from "./icommand-item"; -import { CmdParameter } from "./cmd-parameter"; - -export class WebCommand{ - Id:string; - Code:string; - Name:string; - Description:string; - Parameters:Array; - SourceCode:string; - Items: Array; -} - -export class WebCommandConvertor -{ - ConvertJObject(obj : WebCommand): Object { - - let cmpOp = obj as WebCommand; - let jobj=new Object(); - jobj["Id"]=cmpOp.Id; - jobj["Code"]=cmpOp.Code; - jobj["Name"]=cmpOp.Name; - jobj["Description"]=cmpOp.Description; - jobj["SourceCode"]=cmpOp.SourceCode; - jobj["Parameters"]=cmpOp.Parameters; - let items=[]; - if(cmpOp.Items!=null) - { - let itemConvertor = new CommandItemConvertor(); - cmpOp.Items.forEach(element => { - items.push(itemConvertor.ConvertJObject(element)); - }); - } - jobj["Items"]=items; - return jobj; - } - - InitFromJobject(jsonObj: Object): WebCommand { - let cmpOp = new WebCommand(); - cmpOp.Id = jsonObj["Id"]; - cmpOp.Code = jsonObj["Code"]; - cmpOp.Name = jsonObj["Name"]; - cmpOp.Description = jsonObj["Description"]; - cmpOp.SourceCode = jsonObj["SourceCode"]; - cmpOp.Parameters=jsonObj["Parameters"]; - cmpOp.Items=new Array(); - if(jsonObj["Items"]!=null) - { - let itemConvertor = new CommandItemConvertor(); - jsonObj["Items"].forEach(element => { - cmpOp.Items.push(itemConvertor.InitFromJobject(element)); - }); - } - return cmpOp; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-collection-command-item.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-collection-command-item.ts deleted file mode 100644 index 66785b6feca803e479b4edc4d5f561364083eb68..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-collection-command-item.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { ICommandItem } from "./icommand-item"; -import { CommandItemType } from "./command-item-type"; -import { BranchCommandItem, BranchCommandItemConvertor } from "./branch-command-item"; - -export class BranchCollectionCommandItem implements ICommandItem { - Id: string; - Code:string; - Name: string; - Items: Array; - GetItemId(): string { - return this.Id; - } - GetItemCode(): string { - return this.Code; - } - GetItemName(): string { - return this.Name; - } - GetItemType(): CommandItemType { - return CommandItemType.BranchCollection; - } -} - -export class BranchCollectionCommandItemConvertor { - ConvertJObject(obj: BranchCollectionCommandItem): Object { - let branchCollection = obj as BranchCollectionCommandItem; - let jobj = new Object(); - jobj["Id"] = branchCollection.Id; - jobj["Code"] = branchCollection.Code; - jobj["Name"] = branchCollection.Name; - if (branchCollection.Items != null) { - let itemArray = []; - let itemConvertor = new BranchCommandItemConvertor(); - branchCollection.Items.forEach(element => { - itemArray.push(itemConvertor.ConvertJObject(element)); - }); - jobj["Items"]=itemArray; - } - return jobj; - } - - InitFromJobject(jsonObj: Object): BranchCollectionCommandItem { - let branchCollectionItem = new BranchCollectionCommandItem(); - branchCollectionItem.Id = jsonObj["Id"]; - branchCollectionItem.Code = jsonObj["Code"]; - branchCollectionItem.Name = jsonObj["Name"]; - if (jsonObj["Items"] != null) { - branchCollectionItem.Items=new Array(); - let itemConvertor = new BranchCommandItemConvertor(); - jsonObj["Items"].forEach(element => { - branchCollectionItem.Items.push(itemConvertor.InitFromJobject(element)); - }); - } - return branchCollectionItem; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-command-item.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-command-item.ts deleted file mode 100644 index 9a519dcfc073fa0ea6385a6b7e73a70397c49f1a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/branch-command-item.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { CommandItemType } from "./command-item-type"; -import { ICommandItem, CommandItemConvertor } from "./icommand-item"; -import { ConditionType } from "./condition-type"; - -export class BranchCommandItem implements ICommandItem { - Id: string; - Code:string; - Name: string; - ConditionType: ConditionType; - Express: string; - Items: Array; - - GetItemId(): string { - return this.Id; - } - - GetItemCode(): string { - return this.Code; - } - - GetItemName(): string { - return this.Name; - } - - GetItemType(): CommandItemType { - return CommandItemType.Branch; - } -} - -export class BranchCommandItemConvertor { - ConvertJObject(obj: BranchCommandItem): Object { - let branchItem = obj as BranchCommandItem; - let jobj = new Object(); - jobj["Id"] = branchItem.Id; - jobj["Code"] = branchItem.Code; - jobj["Name"] = branchItem.Name; - jobj["ConditionType"] = branchItem.ConditionType; - jobj["Express"] = branchItem.Express; - if (branchItem.Items != null) { - let itemArray = []; - let itemConvertor = new CommandItemConvertor(); - branchItem.Items.forEach(element => { - itemArray.push(itemConvertor.ConvertJObject(element)); - }); - jobj["Items"]=itemArray; - } - return jobj; - } - - InitFromJobject(jsonObj: Object): BranchCommandItem { - let branchItem = new BranchCommandItem(); - branchItem.Id = jsonObj["Id"]; - branchItem.Code = jsonObj["Code"]; - branchItem.Name = jsonObj["Name"]; - branchItem.ConditionType = jsonObj["ConditionType"]; - branchItem.Express = jsonObj["Express"]; - if (jsonObj["Items"] != null) { - branchItem.Items=new Array(); - let itemConvertor = new CommandItemConvertor(); - jsonObj["Items"].forEach(element => { - branchItem.Items.push(itemConvertor.InitFromJobject(element)); - }); - } - return branchItem; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmd-parameter.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/cmd-parameter.ts deleted file mode 100644 index 0994a54011614d2ce11e787b298a4d30fbe005e3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmd-parameter.ts +++ /dev/null @@ -1,11 +0,0 @@ - -export class CmdParameter{ - Id:string; - Code:string; - Name:string; - Description:string; - ParameterType:string; - IsRetVal:boolean; - EditorType: string; -} - \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-param-config.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-param-config.ts deleted file mode 100644 index 841ffc3d83dbf40e33706f8895c92f47b07d2afc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-param-config.ts +++ /dev/null @@ -1,26 +0,0 @@ - -export class CmpMethodParamConfig{ - ParamCode:string; - ParamName:string; - ParamExpress:string; -} - -export class CmpMethodParamConfigConvert{ - - InitFromJobject(jsonObj: Object): CmpMethodParamConfig { - let cmpMethodParamConfig = new CmpMethodParamConfig(); - cmpMethodParamConfig.ParamCode = jsonObj["ParamCode"]; - cmpMethodParamConfig.ParamName = jsonObj["ParamName"]; - cmpMethodParamConfig.ParamExpress = jsonObj["ParamExpress"]; - return cmpMethodParamConfig; - } - - ConvertJObject(obj: CmpMethodParamConfig): Object { - let cmpMethodParamConfig: CmpMethodParamConfig = obj as CmpMethodParamConfig; - let jobj = new Object(); - jobj["ParamCode"] = cmpMethodParamConfig.ParamCode; - jobj["ParamName"] = cmpMethodParamConfig.ParamName; - jobj["ParamExpress"] = cmpMethodParamConfig.ParamExpress; - return jobj; - } -} diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-refering.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-refering.ts deleted file mode 100644 index 39bd912c484a2722474df22d4a51ce06246adb7e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/cmp-method-refering.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { CmpMethodParamConfig, CmpMethodParamConfigConvert } from "./cmp-method-param-config"; -import { ICommandItem } from "./icommand-item"; -import { CommandItemType } from "./command-item-type"; - -export class CmpMethodRefering implements ICommandItem { - - Id:string; - Code:string; - Name:string; - ComponentId: string; - ComponentCode: string; - ComponentName: string; - ComponentPath: string; - MethodId: string; - MethodCode: string; - MethodName: string; - IsReplaced:boolean; - IsBeforeExpansion:boolean; - IsAfterExpansion:boolean; - ParamConfigs: Array; - - GetItemType(): CommandItemType { - return CommandItemType.MethodRefer; - } - GetItemCode(): string { - return this.Code; - } - GetItemName(): string { - return this.Name; - } - GetItemId(): string { - return this.Id; - } -} - -export class CmpMethodReferingConvert{ - - InitFromJobject(jsonObj: Object): CmpMethodRefering { - let cmpMethodRefering = new CmpMethodRefering(); - cmpMethodRefering.Id = jsonObj["Id"]; - cmpMethodRefering.Code = jsonObj["Code"]; - cmpMethodRefering.Name = jsonObj["Name"]; - cmpMethodRefering.MethodId = jsonObj["MethodId"]; - cmpMethodRefering.MethodCode = jsonObj["MethodCode"]; - cmpMethodRefering.MethodName = jsonObj["MethodName"]; - cmpMethodRefering.ComponentId = jsonObj["ComponentId"]; - cmpMethodRefering.ComponentCode = jsonObj["ComponentCode"]; - cmpMethodRefering.ComponentName = jsonObj["ComponentName"]; - cmpMethodRefering.ComponentPath = jsonObj["ComponentPath"]; - cmpMethodRefering.IsReplaced = jsonObj["IsReplaced"]; - cmpMethodRefering.IsBeforeExpansion = jsonObj["IsBeforeExpansion"]; - cmpMethodRefering.IsAfterExpansion = jsonObj["IsAfterExpansion"]; - if (jsonObj["ParamConfigs"] != null) { - cmpMethodRefering.ParamConfigs=new Array(); - let convertor = new CmpMethodParamConfigConvert(); - jsonObj["ParamConfigs"].forEach(element => { - cmpMethodRefering.ParamConfigs.push(convertor.InitFromJobject(element)); - }); - } - return cmpMethodRefering; - } - - ConvertJObject(obj: CmpMethodRefering): Object { - let cmpMethodRefering: CmpMethodRefering = obj as CmpMethodRefering; - let jobj = new Object(); - jobj["Id"] = cmpMethodRefering.Id; - jobj["Code"] = cmpMethodRefering.Code; - jobj["Name"] = cmpMethodRefering.Name; - jobj["MethodId"] = cmpMethodRefering.MethodId; - jobj["MethodCode"] = cmpMethodRefering.MethodCode; - jobj["MethodName"] = cmpMethodRefering.MethodName; - jobj["ComponentId"] = cmpMethodRefering.ComponentId; - jobj["ComponentCode"] = cmpMethodRefering.ComponentCode; - jobj["ComponentName"] = cmpMethodRefering.ComponentName; - jobj["ComponentPath"] = cmpMethodRefering.ComponentPath; - jobj["IsReplaced"] = cmpMethodRefering.IsReplaced; - jobj["IsBeforeExpansion"] = cmpMethodRefering.IsBeforeExpansion; - jobj["IsAfterExpansion"] = cmpMethodRefering.IsAfterExpansion; - if (cmpMethodRefering.ParamConfigs != null) { - let CommandsJArry = jobj["ParamConfigs"] = []; - let convertor = new CmpMethodParamConfigConvert(); - cmpMethodRefering.ParamConfigs.forEach(paramConfig => { - CommandsJArry.push(convertor.ConvertJObject(paramConfig)); - }); - } - return jobj; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/command-item-type.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/command-item-type.ts deleted file mode 100644 index 8357fd3a2d92b57799414c49a93541749bdf21a4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/command-item-type.ts +++ /dev/null @@ -1,7 +0,0 @@ - - export enum CommandItemType - { - MethodRefer=0, - Branch=1, - BranchCollection=2 - } \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/condition-type.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/condition-type.ts deleted file mode 100644 index 08fd604cb023ccbfb4497599deb84906a667d69e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/condition-type.ts +++ /dev/null @@ -1,7 +0,0 @@ - - export enum ConditionType - { - IF=0, - ELSEIF=1, - ELSE=2 - } \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/extend-property.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/extend-property.ts deleted file mode 100644 index 047b819945372eaa96b0f972baaea2466225f7b9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/extend-property.ts +++ /dev/null @@ -1,23 +0,0 @@ -export class ExtendProperty{ - FormCode:string; - IsCommon:boolean; -} - -export class ExtendsConvert{ - InitFromJobject(jsonObj: Object): ExtendProperty { - if(jsonObj){ - let extendProperty = new ExtendProperty(); - extendProperty.FormCode = jsonObj["FormCode"]; - extendProperty.IsCommon = jsonObj["IsCommon"]; - return extendProperty; - } - } - - ConvertJObject(obj: ExtendProperty): Object { - let extendProperty: ExtendProperty = obj as ExtendProperty; - let jobj = new Object(); - jobj["FormCode"] = extendProperty.FormCode; - jobj["IsCommon"] = extendProperty.IsCommon; - return jobj; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/icommand-item.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/icommand-item.ts deleted file mode 100644 index b4e244242264359e8cc2f1d8090a48156fb3eee6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/icommand-item.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { CommandItemType } from "./command-item-type"; -import { CmpMethodRefering, CmpMethodReferingConvert } from "./cmp-method-refering"; -import { BranchCommandItemConvertor, BranchCommandItem } from "./branch-command-item"; -import { BranchCollectionCommandItemConvertor, BranchCollectionCommandItem } from "./branch-collection-command-item"; -export interface ICommandItem -{ - GetItemType():CommandItemType; - - GetItemCode():string; - - GetItemName():string; - - GetItemId():string; -} - -export class CommandItemConvertor { - ConvertJObject(obj: ICommandItem): Object { - let commandItem = obj as ICommandItem; - let itemType = commandItem.GetItemType(); - let jobj = new Object(); - jobj["Type"] = itemType; - if (itemType == CommandItemType.MethodRefer) { - jobj["Content"] = commandItem; - } - else if (itemType == CommandItemType.Branch) { - let branchConvertor=new BranchCommandItemConvertor(); - jobj["Content"] = branchConvertor.ConvertJObject(commandItem as BranchCommandItem); - } - else if (itemType == CommandItemType.BranchCollection) { - let branchCollectionConvertor=new BranchCollectionCommandItemConvertor(); - jobj["Content"] = branchCollectionConvertor.ConvertJObject(commandItem as BranchCollectionCommandItem); - } - return jobj; - } - - InitFromJobject(jsonObj: Object): ICommandItem { - let itemType=jsonObj["Type"] as CommandItemType; - let content:ICommandItem=jsonObj["Content"]; - if (itemType == CommandItemType.MethodRefer) { - return Object.assign(new CmpMethodRefering(),content as CmpMethodRefering);; - } - else if (itemType == CommandItemType.Branch) { - let branchConvertor=new BranchCommandItemConvertor(); - return branchConvertor.InitFromJobject(jsonObj["Content"]); - } - else if (itemType == CommandItemType.BranchCollection) { - let branchCollectionConvertor=new BranchCollectionCommandItemConvertor(); - return branchCollectionConvertor.InitFromJobject(jsonObj["Content"]); - } - return null; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/index.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/index.ts deleted file mode 100644 index fad9fed20d58c43169b90b3b30377d92cf236dab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { WebCommandMetadataConvertor, WebCommandMetadata } from './web-command-metadata'; -export { WebCommand } from './Command'; -export { ICommandItem } from './icommand-item'; -export { CmpMethodRefering } from './cmp-method-refering'; -export { BranchCollectionCommandItem } from './branch-collection-command-item'; -export { BranchCommandItem } from './branch-command-item'; diff --git a/packages/designer/projects/designer-services/src/lib/web-command-converter/web-command-metadata.ts b/packages/designer/projects/designer-services/src/lib/web-command-converter/web-command-metadata.ts deleted file mode 100644 index cf5d6d0be1b6bf246c6812051b44cdf40fca795d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/lib/web-command-converter/web-command-metadata.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { WebCommand, WebCommandConvertor } from "./command"; -import { ExtendProperty, ExtendsConvert } from "./extend-property"; - -export class WebCommandMetadata { - Id: string; - Code: string; - Name: string; - Description: string; - Extends:ExtendProperty; - Commands: Array; -} - -export class WebCommandMetadataConvertor { - ConvertJObject(obj: WebCommandMetadata): Object { - let metadata: WebCommandMetadata = obj as WebCommandMetadata; - let jobj = new Object(); - jobj["Id"] = metadata.Id; - jobj["Code"] = metadata.Code; - jobj["Name"] = metadata.Name; - jobj["Description"] = metadata.Description; - if (metadata.Commands != null) { - let CommandsJArry = jobj["Commands"] = []; - let convertor = new WebCommandConvertor(); - metadata.Commands.forEach(command => { - CommandsJArry.push(convertor.ConvertJObject(command)); - }); - } - if(metadata.Extends!=null){ - let convertor = new ExtendsConvert(); - jobj["Extends"] =convertor.ConvertJObject(metadata.Extends); - } - return jobj; - } - - InitFromJobject(jsonObj: Object): WebCommandMetadata { - let metadata = new WebCommandMetadata(); - metadata.Id = jsonObj["Id"]; - metadata.Code = jsonObj["Code"]; - metadata.Name = jsonObj["Name"]; - metadata.Description = jsonObj["Description"]; - let CommandsJArry = jsonObj["Commands"]; - if (CommandsJArry != null) { - metadata.Commands = new Array(); - CommandsJArry.forEach(element => { - let cmpOpSerializer = new WebCommandConvertor(); - metadata.Commands.push(cmpOpSerializer.InitFromJobject(element) as WebCommand); - }); - } - let convertor = new ExtendsConvert(); - metadata.Extends=convertor.InitFromJobject(jsonObj["Extends"]); - return metadata; - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-services/src/public-api.ts b/packages/designer/projects/designer-services/src/public-api.ts deleted file mode 100644 index 069090da6daf843447bfadccaf9b044008c72a51..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/public-api.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Public API Surface of designer-services - */ -export * from './lib/entity'; -export * from './lib/services'; -export * from './lib/designer-services.module'; - -export * from './lib/web-command-converter'; diff --git a/packages/designer/projects/designer-services/src/test.ts b/packages/designer/projects/designer-services/src/test.ts deleted file mode 100644 index e11ff1c97b82c411cff67eb2623e12fbf7004b8a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/src/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'core-js/es7/reflect'; -import 'zone.js/dist/zone'; -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/packages/designer/projects/designer-services/tsconfig.lib.json b/packages/designer/projects/designer-services/tsconfig.lib.json deleted file mode 100644 index 3fe337fcf5323bf91d023d92aa1effd9062209dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/tsconfig.lib.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "module": "es2015", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "inlineSources": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "types": [], - "lib": [ - "dom", - "es2018" - ] - }, - "angularCompilerOptions": { - "annotateForClosureCompiler": true, - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "enableResourceInlining": true - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/designer/projects/designer-services/tsconfig.spec.json b/packages/designer/projects/designer-services/tsconfig.spec.json deleted file mode 100644 index 16da33db072ce34e8607114c6c705bed73936724..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/packages/designer/projects/designer-services/tslint.json b/packages/designer/projects/designer-services/tslint.json deleted file mode 100644 index 124133f8499a773c98b161fbc21122698deb6282..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-services/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] - } -} diff --git a/packages/designer/projects/designer-ui/README.md b/packages/designer/projects/designer-ui/README.md deleted file mode 100644 index 1b7ee66f5413bc69fddad669d6abb9901ea8ef76..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DesignerUi - -This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0. - -## Code scaffolding - -Run `ng generate component component-name --project designer-ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project designer-ui`. -> Note: Don't forget to add `--project designer-ui` or else it will be added to the default project in your `angular.json` file. - -## Build - -Run `ng build designer-ui` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Publishing - -After building your library with `ng build designer-ui`, go to the dist folder `cd dist/designer-ui` and run `npm publish`. - -## Running unit tests - -Run `ng test designer-ui` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/packages/designer/projects/designer-ui/karma.conf.js b/packages/designer/projects/designer-ui/karma.conf.js deleted file mode 100644 index 38ca3188bb9e1cfd22b7d63f14e1e0d074f76ed8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../coverage/designer-ui'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/packages/designer/projects/designer-ui/ng-package.json b/packages/designer/projects/designer-ui/ng-package.json deleted file mode 100644 index ef8510b61c6e527722958bbb486ee14777ad99c5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/designer-ui", - "lib": { - "entryFile": "src/public-api.ts" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/package.json b/packages/designer/projects/designer-ui/package.json deleted file mode 100644 index b86c2962deb47c0b2aec02b00d932193b1cb63dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@farris/designer-ui", - "version": "0.0.1", - "peerDependencies": { - "@angular/common": "^7.2.0", - "@angular/core": "^7.2.0" - } -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/component/fd-appointment-calendar.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/component/fd-appointment-calendar.ts deleted file mode 100644 index 28130ae28fbc6019fd00b1a31f0dae961a0882e5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/component/fd-appointment-calendar.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { AppointmentCalendarSchema } from '../schema/appointment-calendar'; -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { AppointmentCalendarProp } from '../property/property-config'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DesignerEnvType } from '@farris/designer-services'; - -export default class FdAppointmentCalendarComponent extends FdCollectionBaseComponent { - - get bodyKey() { - return `calendar-body-${this.key}`; - } - get headerKey() { - return `calendar-header-${this.key}`; - } - get weekBodyKey() { - return `calendar-week-body-${this.key}`; - } - get weekHeaderKey() { - return `calendar-week-header-${this.key}`; - } - - get viewTypeKey() { - return `calendar-view-type-${this.key}`; - } - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - // ControlCssLoaderUtils.loadCss('appointment-calendar.css'); - } - - getDefaultSchema(): any { - return AppointmentCalendarSchema; - } - - getTemplateName(): string { - return 'AppointmentCalendar'; - } - - hideNestedPaddingInDesginerView(): boolean { - return true; - } - render(): any { - if (!this.component.currentViewInDesignerView) { - this.component.currentViewInDesignerView = this.component.viewType || 'day'; - } - - return super.render(this.renderTemplate('AppointmentCalendar', { - component: this.component, - bodyKey: this.bodyKey, - headerKey: this.headerKey, - weekBodyKey: this.weekBodyKey, - weekHeaderKey: this.weekHeaderKey, - viewTypeKey: this.viewTypeKey - })); - } - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - - this.loadRefs(element, { - [this.bodyKey]: 'single', - [this.headerKey]: 'single', - [this.weekBodyKey]: 'single', - [this.weekHeaderKey]: 'single', - [this.viewTypeKey]: 'multiple' - }); - - // 日视图,横向滚动条定位到8:00 - if (this.refs[this.bodyKey]) { - this.refs[this.bodyKey].scrollLeft = 800; - } - if (this.refs[this.headerKey]) { - this.refs[this.headerKey].scrollLeft = 800; - } - - // 日视图,横向滚动条带动头部区域的横向滚动条 - this.addEventListener(this.refs[this.bodyKey], 'scroll', (event) => { - event.preventDefault(); - event.stopPropagation(); - - if (this.refs[this.headerKey]) { - this.refs[this.headerKey].scrollLeft = this.refs[this.bodyKey].scrollLeft; - } - - }); - - // 周视图,横向滚动条带动头部区域的横向滚动条 - this.addEventListener(this.refs[this.weekBodyKey], 'scroll', (event) => { - event.preventDefault(); - event.stopPropagation(); - - if (this.refs[this.weekHeaderKey]) { - this.refs[this.weekHeaderKey].scrollLeft = this.refs[this.weekBodyKey].scrollLeft; - } - - }); - - // 切换日视图、周视图 - if (this.refs[this.viewTypeKey]) { - this.refs[this.viewTypeKey].forEach(buttonEle => { - this.addEventListener(buttonEle, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - - const targetType = buttonEle.getAttribute('viewType'); - if (targetType && targetType !== this.component.currentViewInDesignerView) { - this.component.currentViewInDesignerView = targetType; - this.triggerRedraw(); - } - - }); - }); - } - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - // if (this.envType === DesignerEnvType.noCode) { - // const prop: NoCodeAppointmentCalendarProp = new NoCodeAppointmentCalendarProp(serviceHost, this.viewModelId, this.componentId); - // const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - // return propertyConfig; - // } else { - const prop: AppointmentCalendarProp = new AppointmentCalendarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - // } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - const propIds = ['placeNameWidth', 'rowHeight', 'weekRowHeight', 'weekCellWidth', 'placeTitle']; - - super.onPropertyChanged(changeObject, propIds); - } - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - return false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/export.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/export.ts deleted file mode 100644 index f69786af8308d660017efca99878cf76693db1ec..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AppointmentCalendarSchema } from './schema/appointment-calendar'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdAppointmentCalendarTemplates from './templates'; -import FdAppointmentCalendarComponent from './component/fd-appointment-calendar'; - - -export const AppointmentCalendar: ComponentExportEntity = { - type: 'AppointmentCalendar', - component: FdAppointmentCalendarComponent, - template: FdAppointmentCalendarTemplates, - metadata: AppointmentCalendarSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-field.service.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-field.service.ts deleted file mode 100644 index 759699d937e573cbb4f5c7879352268c0023fd21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-field.service.ts +++ /dev/null @@ -1,345 +0,0 @@ -import { CodeEditorComponent, ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormSchemaEntityField, FormSchemaEntityFieldType$Type, FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; - - -export class AppointmentCalendarField { - id: string; - title: string; - field: string; - binding?: { - path: string; - field: string; - fullPath: string; - }; -} -export class AppointmentCalendarFieldService { - - private propertyConfig: ElementPropertyConfig[]; - constructor() { } - - getCalendarFieldBySchema(schemaField: FormSchemaEntityField) { - - return { - id: schemaField.id, - title: schemaField.name, - field: schemaField.bindingPath, - binding: { - path: schemaField.bindingField, - field: schemaField.id, - fullPath: schemaField.path - }, - formatter: this.getFieldFormatter(schemaField) - }; - } - - - getPropertyConfig(propertyData: any, schemaField: FormSchemaEntityField): ElementPropertyConfig[] { - - this.propertyConfig = []; - const usualConfig = this.getUsualPropertyConfig(propertyData, schemaField); - this.propertyConfig = this.propertyConfig.concat(usualConfig); - - const formatterConfig = this.getFormatterPropertyConfig(propertyData); - this.propertyConfig.push(formatterConfig); - - return this.propertyConfig; - - } - - private getUsualPropertyConfig(propertyData: any, schemaField: FormSchemaEntityField): ElementPropertyConfig[] { - const self = this; - - return [{ - categoryId: 'detailPanel', - categoryName: '字段配置', - properties: [ - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string' - } - ] - }, - // { - // categoryId: 'formatterType', - // categoryName: '格式化类型', - // hide: !propertyData.formatter, - // hideTitle: true, - // enableCascade: true, - // propertyData: propertyData.formatter, - // parentPropertyID: 'formatter', - // properties: [ - // { - // propertyID: 'type', - // propertyName: '格式化类型', - // propertyType: 'select', - // description: '格式化类型选择', - // iterator: [ - // { key: 'none', value: '无' }, - // { key: 'number', value: '数字' }, - // { key: 'boolean', value: '布尔-文本' }, - // { key: 'boolean2', value: '布尔-图标' }, - // { key: 'datetime', value: '日期' }, - // { key: 'enum', value: '枚举' }, - // // { key: 'custom', value: '自定义' } - // ], - // refreshPanelAfterChanged: true - // } - // ], - - // } - ]; - } - - - private getFormatterPropertyConfig(propertyData: any): ElementPropertyConfig { - const self = this; - return { - categoryId: 'formatter', - categoryName: '格式化', - hide: !propertyData.formatter, - enableCascade: true, - propertyData: propertyData.formatter, - parentPropertyID: 'formatter', - properties: [ - { - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'boolean', value: '布尔-文本' }, - { key: 'boolean2', value: '布尔-图标' }, - { key: 'datetime', value: '日期' }, - { key: 'enum', value: '枚举' }, - // { key: 'custom', value: '自定义' } - ], - refreshPanelAfterChanged: true - }, - { - propertyID: 'options', - propertyName: '格式化配置', - propertyType: 'cascade', - hideCascadeTitle: true, - isExpand: true, - visible: propertyData.formatter && propertyData.formatter.type !== 'none', - cascadeConfig: [ - // { - // propertyID: 'customFormat', - // propertyName: '自定义格式化方法', - // propertyType: 'modal', - // description: '自定义格式化方法设置', - // editor: CodeEditorComponent, - // visible: propertyData.formatter && propertyData.formatter.type === 'custom', - // group: 'custom', - // editorParams: { - // language: 'javascript', - // exampleCode: - // '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - // '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - // } - // }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - defaultValue: 0, - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'trueText', - propertyName: 'true文本', - propertyType: 'string', - description: 'true文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'falseText', - propertyName: 'false文本', - propertyType: 'string', - description: 'false文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'format', - propertyName: '日期格式', - propertyType: 'string', - description: '日期格式设置', - visible: propertyData.formatter && (propertyData.formatter.type === 'date' || propertyData.formatter.type === 'datetime'), - group: 'date', - refreshPanelAfterChanged: true - }, - { - propertyID: 'data', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - }, - visible: propertyData.formatter && propertyData.formatter.type === 'enum' - }, - ] - } - - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - // 初始格式化属性 - const newFormatter = self.getFieldFormatter(null, changeObject.propertyValue); - Object.assign(propertyData.formatter.options, newFormatter.options); - - - const formatterConfig = self.getFormatterPropertyConfig(propertyData); - const currentFormatterConfig = self.propertyConfig.find(cat => cat.categoryId === 'formatter'); - Object.assign(currentFormatterConfig, formatterConfig); - - - break; - } - } - } - }; - } - - - - - private getFieldFormatter(schemaField?: FormSchemaEntityField, formtterType?: string) { - let fieldType = formtterType; - if (schemaField && schemaField.type && schemaField.type.name) { - fieldType = schemaField.type.name.toLowerCase(); - } - switch (fieldType) { - case 'date': { - return { - type: 'datetime', - options: { - format: 'yyyy-MM-dd' - } - }; - } - case 'datetime': { - return { - type: 'datetime', - options: { - format: 'yyyy-MM-dd HH:mm:ss' - } - }; - } - case 'enum': { - return { - type: 'enum', - options: { - data: schemaField ? (schemaField.type.enumValues || []) : [], - textField: 'name', - valueField: 'value', - idField: 'value' - } - }; - } - case 'number': { - return { - type: 'number', - options: { - prefix: '', - suffix: '', - precision: schemaField ? schemaField.type.precision : 0, - thousand: ',', - decimal: '.' - } - }; - } - case 'boolean': { - return { - type: 'boolean', - options: { - trueText: '是', - falseText: '否' - } - }; - } - case 'boolean2': { - return { - type: 'boolean', - options: { - trueText: '', - falseText: '' - } - }; - } - default: { - return { - type: 'none', - options: {} - }; - } - } - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-converter.ts deleted file mode 100644 index f9694989c625b27d16e3f6ec8137ac12e7031c4e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-converter.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class CalendarFieldsConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data) { - return '共 ' + data.length + ' 项'; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.html deleted file mode 100644 index aecb4eea9df559077ad88c3741c9879ecca1fcc6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.html +++ /dev/null @@ -1,21 +0,0 @@ -
- - - {{ data.name }} [ {{ data.bindingField }}] - - - -
- -
- - -
- - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.ts deleted file mode 100644 index 5d9ae2a76fa238ed3f1260faebb716a40fbc9587..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, NgZone, OnDestroy -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { AppointmentCalendarField, AppointmentCalendarFieldService } from './calendar-field.service'; -import { cloneDeep } from 'lodash-es'; -import { FormSchemaEntityField$Type, DesignViewModelService } from '@farris/designer-services'; -import { MessagerService } from '@farris/ui-messager'; -import { MultiSelectComponent } from '@farris/ui-multi-select'; - - -@Component({ - selector: 'app-calendar-fields-editor', - templateUrl: './calendar-fields-editor.component.html', - providers: [AppointmentCalendarFieldService] -}) -export class CalendarFieldsEditorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { viewModelId: '' }; - - /** 是否显示属性面板 */ - @Input() showPropertyPanel = true; - - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '展示列编辑器', - width: 1000, - height: 700, - showButtons: true, - showMaxButton: true - }; - // 筛选条字段 - fieldConfigs: Array; - - // 左侧树表数据 - treeData: TreeNode[] = []; - - // 当前可选的所有字段ID - treeNodeIds: string[] = []; - // plainTreeNodes: TreeNode[] = []; - - // 选中的字段 - selectedFieldIds = []; - - // 右侧选中行对应的schema字段信息 - selectedSchemaField; - - - // 属性面板配置 - propertyConfig: ElementPropertyConfig[]; - - // 属性面板值 - propertyData: AppointmentCalendarField; - - @HostBinding('class') - class = 'd-flex h-100'; - - @ViewChild(MultiSelectComponent) multiSelectCmp: MultiSelectComponent; - - timer: any; - - constructor( - private dgVMService: DesignViewModelService, private notifyService: NotifyService, - private calendarFieldServ: AppointmentCalendarFieldService, private msgService: MessagerService, - private ngZone: NgZone) { } - - ngOnInit(): void { - if (!this.editorParams || !this.value) { - this.fieldConfigs = []; - } else { - this.fieldConfigs = cloneDeep(this.value); - } - this.treeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams.viewModelId); - - this.filterAllowedType(this.treeData); - this.selectedFieldIds = this.fieldConfigs.map(v => v.id); - - this.filterSchemFields(); - - // 默认选中第一行 - if (this.selectedFieldIds.length && this.multiSelectCmp['selectItem']) { - this.ngZone.runOutsideAngular(() => { - this.timer = setTimeout(() => { - this.multiSelectCmp['selectItem'](this.selectedFieldIds[0]); - }); - }); - } - } - - ngOnDestroy(): void { - - } - /** - * 过滤筛选条支持的字段 - * @param treeData 树数据 - */ - filterAllowedType(treeData: TreeNode[]) { - treeData.forEach(treeNode => { - - if (treeNode.data.$type === FormSchemaEntityField$Type.SimpleField) { - this.treeNodeIds.push(treeNode.data.id); - // this.plainTreeNodes.push(treeNode); - } - if (treeNode.children && treeNode.children.length > 0) { - this.filterAllowedType(treeNode.children); - } - }); - } - private filterSchemFields() { - const removedFields = []; - this.selectedFieldIds.forEach(id => { - if (!this.treeNodeIds.includes(id)) { - // schema中已移除的字段 - const field = this.fieldConfigs.find(f => f.id === id); - if (field) { - removedFields.push(field.title); - } - this.fieldConfigs = this.fieldConfigs.filter(f => f.id !== id); - this.selectedFieldIds = this.selectedFieldIds.filter(fid => fid !== id); - } - }); - if (removedFields.length > 0) { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.msgService.warning('已选择字段【' + removedFields.toString() + '】已移除、变更或暂不支持添加,点击确定后将自动删除字段'); - }); - }); - } - } - - /** - * 改变选中字段事件 - * @param e 选中的行数据 - */ - changeSelectField(e: any[]) { - if (!e) { - return; - } - const fieldConfigs = []; - if (e.length === 0) { - this.propertyConfig = []; - this.fieldConfigs = []; - return; - } - e.forEach(data => { - const co = this.fieldConfigs.find(c => c.id === data.id); - if (co) { - fieldConfigs.push(co); - } else { - const newConfig = this.calendarFieldServ.getCalendarFieldBySchema(data); - fieldConfigs.push(newConfig); - - } - }); - this.fieldConfigs = fieldConfigs; - - - if (this.selectedSchemaField && !fieldConfigs.find(f => f.id === this.selectedSchemaField.id)) { - this.propertyConfig = []; - } - } - - /** - * 切换右侧行 - * @param e 行数据 - */ - changeRightSelect(e) { - if (!e.selected || !e.data) { - return; - } - this.triggerShowPropertyPanel(e.data); - } - - triggerShowPropertyPanel(rowData: any) { - this.selectedSchemaField = rowData; - - this.propertyData = this.fieldConfigs.find(f => f.id === rowData.id); - this.propertyConfig = this.calendarFieldServ.getPropertyConfig(this.propertyData, this.selectedSchemaField); - - } - - clickCancel() { - - this.closeModal.emit(); - } - - clickConfirm() { - if (this.fieldConfigs.length === 0) { - this.notifyService.warning('请选择字段'); - return; - } - - this.submitModal.emit({ value: this.fieldConfigs }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-converter.ts deleted file mode 100644 index 2a1e2d4e77d67e6b2fb86753d609332eb92e9bdb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-converter.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class PlaceDataSourceConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - - if (data && data.voId && data.voName) { - return data.voName; - } - if (data && data.formId && data.formName) { - return data.formName; - } - return data; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.html deleted file mode 100644 index cc09305c00fe340a57c3a5a64c45c775eefd3e04..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.html +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.ts deleted file mode 100644 index 21ca81183a1ec6b739618509b4ffa73a077fc25b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, NgZone, OnDestroy -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { FormBasicService } from '@farris/designer-services'; - -@Component({ - selector: 'app-place-datasource-selector', - templateUrl: './place-datasource-selector.component.html' -}) -export class PlaceDataSourceSelectorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { placeDataSource: { id: '', name: '' }, placeDataSourceUrl: '', placeDataSourceUrlType: '' }; - - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '地点数据源选择器', - width: 1000, - height: 700, - showButtons: false, - showMaxButton: true - }; - - /** 选择元数据的组件需要的入参 */ - selectorEditorParams; - - constructor( - private formBasicServ: FormBasicService, private notifyService: NotifyService) { } - - ngOnInit(): void { - this.selectorEditorParams = { - relativePath: this.formBasicServ.formMetaBasicInfo.relativePath, - range: 'Su', - source: 'vo' - }; - } - - ngOnDestroy(): void { - - } - afterSelectMatadata(e) { - if (!e.metadata) { - return; - } - // let placeDataSource = this.editorParams.placeDataSource ? cloneDeep(this.editorParams.placeDataSource) : null; - const placeDataSource = { - voId: e.metadata.id, - voName: e.metadata.name - }; - - const paths = e.metadata.relativePath.split('/'); - this.editorParams.placeDataSourceUrl = `/api/${paths[0]}/${paths[1]}/v1.0/${e.metadata.code}`.toLowerCase(); - this.editorParams.placeDataSourceUrlType = 'GET'; - - this.submitModal.emit({ value: placeDataSource }); - } - - afterCancelMetadata() { - - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.html deleted file mode 100644 index 979f51906ff430a0d2a622e8782a7060cd750f34..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.ts deleted file mode 100644 index 56462b22be7e2db86412bd06ad01a79923a904db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, NgZone, Injector -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { FormBasicService, DesignerEnvType, SchemaService, FormSchemaEntity, FormSchemaEntityField } from '@farris/designer-services'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { FarrisMetadataDto } from '@farris/designer-services'; - - -@Component({ - selector: 'app-place-field-selector', - templateUrl: './place-field-selector.component.html' -}) -export class PlaceFieldSelectorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { voId: null, formId: null }; - - @ViewChild('modalFooter') modalFooter: TemplateRef; - modalConfig = { - title: '字段选择器', - width: 1000, - height: 700, - showButtons: true, - showMaxButton: true - }; - fieldsTreeData: TreeNode[]; - - // 树表列配置 - treeCols = [{ field: 'name', title: '名称' }, { field: 'label', title: '编号' }, { field: 'bindingPath', title: '绑定字段' }]; - - // 树表实例 - @ViewChild('treeTable') treeTable: TreeTableComponent; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100 px-3'; - - /** 零代码元数据接口 */ - private loadMetaDataURL = '/api/dev/nocode/v1.0/micro-apps/metadatas'; - - /** 请求服务 */ - private http: HttpClient; - private headerOptions = { - headers: new HttpHeaders({ - 'Content-Type': 'application/json' - }) - }; - - constructor( - private formBasicServ: FormBasicService, - private notifyService: NotifyService, - private injector: Injector, - private schemaServ: SchemaService, - private ngZone: NgZone) { - this.http = this.injector.get(HttpClient); - - } - - ngOnInit(): void { - switch (this.formBasicServ.envType) { - case DesignerEnvType.designer: { - this.getSchemaFieldsFromVo(); - break; - } - case DesignerEnvType.noCode: { - this.getSchemaFieldsFromForm(); - break; - } - default: { - this.notifyService.warning('暂不支持。'); - } - } - - } - - /** - * 低代码:根据地点VO元数据id,获取VO对应的schema字段列表 - */ - private getSchemaFieldsFromVo() { - if (!this.editorParams.voId) { - return; - } - - const sessionId = ''; - this.schemaServ.converVO2Schema(this.editorParams.voId, sessionId).subscribe(data => { - if (data) { - const mainEntity = data.entities[0] as FormSchemaEntity; - this.assembleFieldsToTree(mainEntity.type.fields); - } - }, () => { - this.notifyService.error('获取视图对象元数据失败'); - }); - } - /** - * 零代码:根据地点表单form元数据id,获取表单中记录的voId,然后根据voId获取vo对应的schema字段列表 - */ - private getSchemaFieldsFromForm() { - - this.http.get(`${this.loadMetaDataURL}/${this.editorParams.formId}`, this.headerOptions).subscribe((data: FarrisMetadataDto) => { - if (data && data.content) { - let domJson; - if ('' + data.content === data.content) { - domJson = JSON.parse(data.content); - } else { - domJson = data.content; - } - const schema = domJson.Contents.module.schemas[0]; - const voId = schema.id; - - this.schemaServ.convertVoToSchemaForNoCodeForm(voId).subscribe(newSchema => { - const mainEntity = newSchema.entities[0] as FormSchemaEntity; - this.assembleFieldsToTree(mainEntity.type.fields); - }, () => { - this.notifyService.error('获取视图对象元数据失败'); - }); - - } - }, () => { - this.notifyService.error('获取表单元数据失败'); - }); - } - /** - * schema字段集合组装成树 - * @param fields schema字段集合 - */ - private assembleFields2Tree(fields: FormSchemaEntityField[]) { - const treeData = []; - fields.forEach(element => { - // 关联表字段 / UDT字段 - let children = []; - if (element.type && element.type.fields && element.type.fields.length > 0) { - children = this.assembleFields2Tree(element.type.fields); - - } - - treeData.push({ - data: element, - children, - expanded: true, - selectable: children.length > 0 ? false : true - }); - }); - return treeData; - } - - private assembleFieldsToTree(mainFields: FormSchemaEntityField[]) { - - this.fieldsTreeData = this.assembleFields2Tree(mainFields); - - // 默认选中行 - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - if (!this.value) { return; } - try { - this.treeTable.selectNode(this.value); - } catch (e) { - this.treeTable.clearSelections(); - } - }); - }); - } - clickConfirm() { - if (!this.treeTable.selectedRow) { - this.notifyService.warning('请选择字段'); - return; - } - - const selectedData = this.treeTable.selectedRow.data; - - this.submitModal.emit({ value: selectedData.bindingPath }); - } - - clickCancel() { - - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.html deleted file mode 100644 index fe2dd3642a59edcdac85841a41aee04084b70378..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.ts deleted file mode 100644 index 61f9c4b960b98b243b43ed095d1ca7fbd79f0970..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, OnDestroy, Injector -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { FormBasicService, DesignerEnvType, SchemaService } from '@farris/designer-services'; -import { FarrisMetadataDto } from '@farris/designer-services'; -import { ResolveTemplateFieldUtil } from '../resolve-template-fields'; -import { TemplateBindingEditorComponent } from '../../../../list-view/property/editor/template-binding-editor/template-binding-editor.component'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; - - -@Component({ - selector: 'app-place-template-editor', - templateUrl: './place-template-editor.component.html' -}) -export class PlaceTemplateEditorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { id: null, placeDataSource: { voId: '', formId: '' }, placeDataSourceUrl: '', placeDataSourceUrlType: '' }; - - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '模板编辑器', - width: 1000, - height: 700, - showButtons: true, - showMaxButton: true - }; - - @ViewChild(TemplateBindingEditorComponent) templateCmp: TemplateBindingEditorComponent; - - /** 模板编辑器的组件需要的入参 */ - templateBindingEditorParams; - - /** 零代码元数据接口 */ - private loadMetaDataURL = '/api/dev/nocode/v1.0/micro-apps/metadatas'; - - /** 请求服务 */ - private http: HttpClient; - private headerOptions = { - headers: new HttpHeaders({ - 'Content-Type': 'application/json' - }) - }; - - constructor( - private formBasicServ: FormBasicService, - private notifyService: NotifyService, - private injector: Injector, - private schemaServ: SchemaService,) { - - this.http = this.injector.get(HttpClient); - } - - ngOnInit(): void { - - this.templateBindingEditorParams = { - listViewId: this.editorParams.id, - templateUri: 'assets/form/preset-template/appointment-calendar-template.json', - schemaFields: [], - viewModelId: null - }; - switch (this.formBasicServ.envType) { - case DesignerEnvType.designer: { - this.getSchemaFieldsFromVo(); - break; - } - case DesignerEnvType.noCode: { - this.getSchemaFieldsFromForm(); - break; - } - default: { - this.notifyService.warning('暂不支持。'); - } - } - - this.templateCmp.submitModal.subscribe(data => { - this.submitModal.emit(data); - }); - } - - ngOnDestroy(): void { - - } - - /** - * 低代码:根据地点VO元数据id,获取VO对应的schema字段列表 - */ - private getSchemaFieldsFromVo() { - if (!this.editorParams.placeDataSource || !this.editorParams.placeDataSource.voId) { - return; - } - - const sessionId = ''; - this.schemaServ.converVO2Schema(this.editorParams.placeDataSource.voId, sessionId).subscribe(data => { - if (data) { - const fieldServ = new ResolveTemplateFieldUtil(); - const schemaFields = fieldServ.getSimpleTableFieldsByBindTo(data.entities, '/'); - this.templateBindingEditorParams.schemaFields = schemaFields; - } - }, () => { - this.notifyService.error('获取视图对象元数据失败'); - }); - } - /** - * 零代码:根据地点表单form元数据id,获取表单中记录的voId,然后根据voId获取vo对应的schema字段列表 - */ - private getSchemaFieldsFromForm() { - - this.http.get(`${this.loadMetaDataURL}/${this.editorParams.placeDataSource.formId}`, this.headerOptions).subscribe((data: FarrisMetadataDto) => { - if (data && data.content) { - let domJson; - if ('' + data.content === data.content) { - domJson = JSON.parse(data.content); - } else { - domJson = data.content; - } - const schema = domJson.Contents.module.schemas[0]; - - const voId = schema.id; - this.schemaServ.convertVoToSchemaForNoCodeForm(voId).subscribe(newSchema => { - const fieldServ = new ResolveTemplateFieldUtil(); - const schemaFields = fieldServ.getSimpleTableFieldsByBindTo(newSchema.entities, '/'); - this.templateBindingEditorParams.schemaFields = schemaFields || []; - }, () => { - this.notifyService.error('获取视图对象元数据失败'); - }); - - } - }, () => { - this.notifyService.error('获取表单元数据失败'); - }); - } - - - clickConfirm() { - this.templateCmp.clickConfirm(); - } - - clickCancel() { - this.templateCmp.clickCancel(); - this.closeModal.emit(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/resolve-template-fields.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/resolve-template-fields.ts deleted file mode 100644 index 1dd5ca197d1f19249e55744274f9f48096652bc2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/editor/resolve-template-fields.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { FormSchemaEntity, FormSchemaEntityField } from '@farris/designer-services'; - -export class ResolveTemplateFieldUtil { - - /** - * 获取实体中的所有简单字段 - */ - getSimpleTableFieldsByBindTo(entities: FormSchemaEntity[], bindTo: string): FormSchemaEntityField[] { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - - for (const entity of entities) { - const entityType = entity.type; - if (!entityType) { - return []; - } - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return this.extractFieldsFromEntityType(entity.type); - } - if (entityType.entities && entityType.entities.length > 0) { - const fields = this.getSimpleTableFieldsByBindTo(entityType.entities, bindTo); - if (fields) { - return fields; - } - } - } - } - - private extractFieldsFromEntityType(entityType: { fields?: FormSchemaEntityField[] }) { - const fields: FormSchemaEntityField[] = []; - if (entityType && entityType.fields && entityType.fields.length) { - entityType.fields.forEach(field => { - if (field.$type === 'SimpleField') { - fields.push(field); - } else { - const extractedFields = this.extractFieldsFromEntityType(field.type); - if (extractedFields.length) { - extractedFields.forEach(extractedField => fields.push(extractedField)); - } - } - }); - } - return fields; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/property-config.ts deleted file mode 100644 index 90f36bbd0f2ee0cd22c6e8c0e08fb5e61abe2a60..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/property/property-config.ts +++ /dev/null @@ -1,491 +0,0 @@ -import { CollectionProp } from '../../common/property/collection-property-config'; -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormSchemaEntity, FormSchemaEntityField } from '@farris/designer-services'; -import { GroupFieldEditorComponent } from '../../common/property/editor/group-field-editor/group-field-editor.component'; -import { GroupFieldConverter } from '../../common/property/editor/group-field-editor/group-field-converter'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { ControlAppearancePropertyConfig } from '../../../../utils/appearance-property-config'; -import { TemplateBindingEditorComponent } from '../../list-view/property/editor/template-binding-editor/template-binding-editor.component'; -import { CalendarFieldsEditorComponent } from './editor/calendar-fields-editor/calendar-fields-editor.component'; -import { CalendarFieldsConverter } from './editor/calendar-fields-editor/calendar-fields-converter'; -import { PlaceDataSourceConverter } from './editor/place-datasource-selector/place-datasource-converter'; -import { PlaceDataSourceSelectorComponent } from './editor/place-datasource-selector/place-datasource-selector.component'; -import { PlaceTemplateEditorComponent } from './editor/place-template-editor/place-template-editor.component'; -import { PlaceFieldSelectorComponent } from './editor/place-field-selector/place-field-selector.component'; -import { ResolveTemplateFieldUtil } from './editor/resolve-template-fields'; - -export class AppointmentCalendarProp extends CollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - const viewModelId = this.viewModelId; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 样式属性 - const appearanceStylePropConfig = ControlAppearancePropertyConfig.getAppearanceStylePropConfigs(propertyData); - this.propertyConfig = this.propertyConfig.concat(appearanceStylePropConfig); - - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 地点属性 - const placePropConfig = this.getPlacePropConfig(propertyData, viewModelId); - this.propertyConfig.push(placePropConfig); - - // 日视图属性 - const dayViewPropConfig = this.getDayViewPropConfig(propertyData, viewModelId); - this.propertyConfig.push(dayViewPropConfig); - - // 预定配置属性 - const appointmentPropConfig = this.getAppointmentPropConfig(propertyData, viewModelId); - this.propertyConfig.push(appointmentPropConfig); - - // 预定配置属性 - const detailPanelPropConfig = this.detailPanelPropConfig(propertyData, viewModelId); - this.propertyConfig.push(detailPanelPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - private getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl.AppointmentCalendar.name }], - } - ], - }; - } - - getAppearanceProperties(propertyData: any): ElementPropertyConfig { - const self = this; - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'viewType', - propertyName: '默认视图类型', - propertyType: 'select', - description: '组件默认显示的视图类型', - iterator: [{ key: 'day', value: '日视图' }, { key: 'week', value: '周视图' }] - }, - { - propertyID: 'placeNameWidth', - propertyName: '地点列宽度', - propertyType: 'number', - decimals: 0, - min: 150 - }, - { - propertyID: 'rowHeight', - propertyName: '日视图行高', - propertyType: 'number', - decimals: 0, - min: 62 - }, - { - propertyID: 'weekRowHeight', - propertyName: '周视图行高', - propertyType: 'number', - decimals: 0, - min: 85 - }, - { - propertyID: 'weekCellWidth', - propertyName: '周视图列宽度', - propertyType: 'number', - decimals: 0, - min: 150 - }, - ] - }; - } - - getBehaviorProperties(propertyData: any, viewModelId: string) { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - getDayViewPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'dayView', - categoryName: '日视图配置', - properties: [ - { - propertyID: 'contentTemplate', - propertyName: '日视图预定信息模板', - propertyType: 'modal', - editor: TemplateBindingEditorComponent, - editorParams: { - listViewId: propertyData.id, - templateUri: 'assets/form/preset-template/appointment-calendar-template.json', - schemaFields: [], - viewModelId: this.viewModelId - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取字段最新值 - this.editorParams.schemaFields = self.getPanelMappingFields(); - return { result: true, message: '' }; - } - }, - { - propertyID: 'dayViewCls', - propertyName: '日视图自定义样式', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(item) => {\r\n const data = item.data;\r\n return {\r\n gray: data.level === \'1\',\r\n blue: data.level === \'2\',\r\n ' + - 'pink: data.level === \'3\',\r\n red: data.level === \'4\'\r\n };\r\n}\r\n\r\n注:根据预定类型返回不同的样式,其中level为预定类型字段在数据库中的字段编号。' - } - }, - { - propertyID: 'reservationTitle', - propertyName: '新增预定文本', - propertyType: 'string', - description: '鼠标滑过日视图空白单元格时显示的文本' - } - ] - }; - } - getPlacePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const viewModel = self.domService.getViewModelById(viewModelId); - - return { - categoryId: 'place', - categoryName: '地点配置', - properties: [ - { - propertyID: 'placeTitle', - propertyName: '地点列标题', - propertyType: 'string', - description: '地点的展示文本' - }, - { - propertyID: 'placeDataSource', - propertyName: '地点数据源', - propertyType: 'modal', - description: '选择地点数据源视图对象', - editor: PlaceDataSourceSelectorComponent, - editorParams: propertyData, - converter: new PlaceDataSourceConverter() - }, - { - propertyID: 'placeDataSourceUrl', - propertyName: '地点数据源请求url', - propertyType: 'string', - description: '获取地点列表的API地址', - readonly: true, - visible: propertyData.placeDataSource - }, - { - propertyID: 'placeDataSourceUrlType', - propertyName: '地点数据源请求类型', - propertyType: 'select', - description: '地点数据源请求类型', - iterator: [{ key: 'PUT', value: 'PUT' }, { key: 'POST', value: 'POST' }, { key: 'GET', value: 'GET' }], - readonly: true, - visible: propertyData.placeDataSource - }, - { - propertyID: 'placeNameTemplate', - propertyName: '地点展示模板', - propertyType: 'modal', - editor: PlaceTemplateEditorComponent, - editorParams: propertyData, - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.placeDataSource) { - return { result: false, message: '请先选择地点数据源' }; - } - this.editorParams = propertyData; - return { result: true, message: '' }; - }, - visible: propertyData.placeDataSource - - }, - { - propertyID: 'placeIdField', - propertyName: '地点标识字段', - propertyType: 'modal', - editor: PlaceFieldSelectorComponent, - editorParams: { - voId: propertyData.placeDataSource && propertyData.placeDataSource.voId - }, - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.placeDataSource) { - return { result: false, message: '请先选择地点数据源' }; - } - this.editorParams.voId = propertyData.placeDataSource && propertyData.placeDataSource.voId; - return { result: true, message: '' }; - }, - visible: propertyData.placeDataSource - }, - { - propertyID: 'placeNameField', - propertyName: '地点名称字段', - propertyType: 'modal', - editor: PlaceFieldSelectorComponent, - editorParams: { - voId: propertyData.placeDataSource && propertyData.placeDataSource.voId - }, - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.placeDataSource) { - return { result: false, message: '请先选择地点数据源' }; - } - this.editorParams.voId = propertyData.placeDataSource && propertyData.placeDataSource.voId; - return { result: true, message: '' }; - }, - visible: propertyData.placeDataSource - } - ], - setPropertyRelates(changeObject, data, parameters?) { - switch (changeObject.propertyID) { - case 'placeDataSource': { - this.properties.forEach(prop => { - if (prop.propertyID !== 'placeTitle' && prop.propertyID !== 'placeDataSource') { - prop.visible = changeObject.propertyValue ? true : false; - } - }); - break; - } - - case 'placeIdField': case 'placeNameField': { - // 修改地点标识、名称列后需要同步命令中的地点参数 - const placeIdParam = propertyData.placeIdField; - const placeNameParam = propertyData.placeNameField; - const addNode = viewModel.commands.find(item => item.handlerName === 'OpenAppAndAdd' && (item.cmpId === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72')); - if (addNode && addNode.params) { - addNode.params.find(item => item.name === 'params').value = - "{\"action\":\"LoadAndAdd1\",\"start\":\"{EVENTPARAM~/start}\",\"end\":\"{EVENTPARAM~/end}\",\"placeId\":\"{EVENTPARAM~/place/" + placeIdParam + "}\",\"placeName\":\"{EVENTPARAM~/place/" + placeNameParam + "}\"}"; - } - break; - } - } - }, - }; - } - - getAppointmentPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'appointment', - categoryName: '预定配置', - enableCascade: true, - parentPropertyID: 'reserveInfoFields', - propertyData: propertyData.reserveInfoFields, - properties: [ - { - propertyID: 'idField', - propertyName: '标识字段', - propertyType: 'modal', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter() - }, - { - propertyID: 'placeid', - propertyName: '地点标识字段', - propertyType: 'modal', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter() - }, - { - propertyID: 'title', - propertyName: '预定主题名称字段', - propertyType: 'modal', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter() - }, - { - propertyID: 'startDate', - propertyName: '开始时间字段', - propertyType: 'modal', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter() - }, - { - propertyID: 'endDate', - propertyName: '结束时间字段', - propertyType: 'modal', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter() - } - ] - }; - } - - detailPanelPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'detailPanel', - categoryName: '详情卡片配置', - properties: [ - { - propertyID: 'detailColumns', - propertyName: '展示列', - propertyType: 'modal', - editor: CalendarFieldsEditorComponent, - editorParams: { - viewModelId - }, - converter: new CalendarFieldsConverter() - }, - { - propertyID: 'detailBadgeTemplate', - propertyName: '详情徽章模板', - propertyType: 'modal', - editor: TemplateBindingEditorComponent, - editorParams: { - listViewId: propertyData.id, - templateUri: 'assets/form/preset-template/appointment-calendar-template.json', - schemaFields: [], - viewModelId: this.viewModelId - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取字段最新值 - this.editorParams.schemaFields = self.getPanelMappingFields(); - return { result: true, message: '' }; - } - }, - { - propertyID: 'detailCls', - propertyName: '详情卡片自定义样式', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(item) => {\r\n const data = item.data;\r\n return {\r\n gray: data.level === \'1\',\r\n blue: data.level === \'2\',\r\n ' + - 'pink: data.level === \'3\',\r\n red: data.level === \'4\'\r\n };\r\n}\r\n\r\n\r\n注:根据预定类型返回不同的样式,其中level为预定类型字段在数据库中的字段编号。' - } - } - ] - }; - } - - getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'filterChange', - name: '日期变化后事件' - }, - { - label: 'selectChange', - name: '选中事件' - }, - { - label: 'editHandler', - name: '详情卡片编辑事件' - }, - { - label: 'removeHandler', - name: '详情卡片删除事件' - }, - { - label: 'reservation', - name: '日视图新增预定事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - - } - }; - } - - private getPanelMappingFields(): FormSchemaEntityField[] { - if (this.viewModelId) { - const viewModel = this.domService.getViewModelById(this.viewModelId); - if (!viewModel) { - return []; - } - const entities = this.schemaService.getSchemaEntities(); - if (!entities || !entities.length) { - return []; - } - const fieldServ = new ResolveTemplateFieldUtil(); - const allFieldsInSpecialEntity = fieldServ.getSimpleTableFieldsByBindTo(entities, viewModel.bindTo); - return allFieldsInSpecialEntity; - } - return []; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/schema/appointment-calendar.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/schema/appointment-calendar.ts deleted file mode 100644 index b89a96b4684d8be815f6dc8551bd1defef4f1037..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/schema/appointment-calendar.ts +++ /dev/null @@ -1,37 +0,0 @@ -export const AppointmentCalendarSchema = { - id: 'appointmentCalendar', - type: 'AppointmentCalendar', - appearance: { - class: 'f-utils-fill-flex-row' - }, - dataSource: '', - placeDataSource: null, - placeDataSourceUrl: '', - placeDataSourceUrlType: 'GET', - placeTitle: '地点名称', - placeNameField: '', - placeIdField: 'id', - placeNameTemplate: '', - contentTemplate: '', - viewType: 'day', - reservationTitle: '我要预定', - rowHeight: 62, - placeNameWidth: 200, - weekRowHeight: 85, - weekCellWidth: 180, - reserveInfoFields: { - startDate: null, - endDate: null, - idField: 'id', - placeid: null, - title: null - }, - dayViewCls: null, - detailCls: null, - filterChange: null, - selectChange: null, - editHandler: null, - removeHandler: null, - reservation: null, - visible: true -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/form.ts deleted file mode 100644 index f43bdb3b0922327c4aab532d13cdf553aa9d9a1c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/form.ts +++ /dev/null @@ -1,70 +0,0 @@ -import getDayViewTemplate from './views/day-view.form'; -import getWeekViewTemplate from './views/week-view.form'; - -export default (ctx: any) => { - - const currentView = ctx.component.currentViewInDesignerView || 'day'; - const isDayView = currentView === 'day'; - const dayButtonCls = isDayView ? 'btn-active' : ''; - const weekButtonCls = !isDayView ? 'btn-active' : ''; - const viewTemplate = isDayView ? getDayViewTemplate(ctx) : getWeekViewTemplate(ctx); - - const dateTemplate = isDayView ? getSingleDateTemplate() : getDateRangeTemplate(); - - return ` -
-
- -
-
- - -
- -
- -
- - -
-
-
-
-
-
- ${dateTemplate} -
- -
-
-
- -
-
-
-
-
- ${viewTemplate} -
-
-
-`; - -}; - -/** 单日期显示文本 */ -function getSingleDateTemplate() { - return '2023年02月27日'; -} - -/** 日期区间显示文本 */ -function getDateRangeTemplate() { - return ` -
- 2023年02月26日 - - 2023年03月04日 -
- `; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/day-view.form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/day-view.form.ts deleted file mode 100644 index 39b2ca74dc39aa83285de152e0403e6b9cc6fbdf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/day-view.form.ts +++ /dev/null @@ -1,391 +0,0 @@ -/** - * 获取日视图模板 - */ -export default (ctx: any) => { - return ` - -
-
-
${ctx.component.placeTitle || '地点名称'} -
-
-
00:00
-
01:00
-
02:00
-
03:00
-
04:00
-
05:00
-
06:00
-
07:00
-
08:00
-
09:00
-
10:00
-
11:00
-
12:00
-
13:00
-
14:00
-
15:00
-
16:00
-
17:00
-
18:00
-
19:00
-
20:00
-
21:00
-
22:00
-
23:00
-
-
-
- -
-
- -
-
-
地点1
-
- 20人 - 白板、音响、麦克风 -
-
-
-
-
-
- -
-
- -
-
-
- 中层会议 - 关于开展“我与企业文化”主题征文和演讲比赛的会议 -
-
- 综合办公室 - 09:30~12:00 -
-
-
-
-
-
-
-
-
-
- 专项会议 - 关于员工健康体检工作的准备会议 -
-
- 综合办公室 - 13:05~16:25 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
地点2
-
- 200人 - 投影仪、白板、音响、麦克风 -
-
-
-
-
-
- -
-
- -
-
-
- 专项会议 - 关于迎新春活动的准备会议 -
-
- - 17:45~20:15 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
地点3
-
- 40人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
-
-
-
-
-
-
- 培训会议 - 【因分享 更热爱】Spotlight第二十四期活动 -
-
- 技术创新部 - 08:00~11:25 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
地点4
-
- 50人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
- -
-
-
地点5
-
- 10人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
-
-
-
-
-
-
- 普通会议 - 关于宣传全国“消防日”活动的准备会议 -
-
- 综合办公室 - 10:00~12:00 -
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
-
-
地点6
-
- 100人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `; -}; - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/week-view.form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/week-view.form.ts deleted file mode 100644 index 8f2ba26f973301a6991bdf5a8542802b1ca65cc7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/appointment-calendar/templates/views/week-view.form.ts +++ /dev/null @@ -1,481 +0,0 @@ -/** - * 获取周视图模板 - */ -export default (ctx: any) => { - return ` -
-
-
-
${ctx.component.placeTitle || '地点名称'} -
-
- -
26周日
-
27周一
-
28周二
-
1周三
-
2周四
-
3周五
-
4周六
-
-
-
-
- -
-
- - -
-
-
地点1
-
- 20人 - 白板、音响、麦克风 -
-
-
-
-
- -
-
-
    -
-
-
-
-
-
    - -
  • -
    -
    - 关于开展“我与企业文化”主题征文和演讲比赛的会议
    -
    09:30
    -
    -
  • -
  • -
    -
    - 关于员工健康体检工作的准备会议
    -
    13:05
    -
    -
  • -
-
-
-
-
-
    - -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
-
-
-
-
地点2
-
- 200人 - 投影仪、白板、音响、麦克风 -
-
-
-
-
- -
-
-
    - -
-
-
-
-
-
    -
  • -
    -
    - 关于迎新春活动的准备会议
    -
    17:45
    -
    -
  • -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
-
- - -
-
-
地点3
-
- 40人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
- -
-
-
    -
-
-
-
-
-
    -
  • -
    -
    - 【因分享 更热爱】Spotlight第二十四期活动
    -
    08:00
    -
    -
  • -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
    -
-
-
-
-
-
-
- - -
-
-
地点4
-
- 50人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
- -
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    -
  • -
    -
    - 关于安全隐患大排查工作的准备会议
    -
    10:45
    -
    -
  • -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
-
- - -
-
-
地点5
-
- 10人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
- -
-
-
    - -
-
-
-
-
-
    -
  • -
    -
    - 关于宣传全国“消防日”活动的准备会议
    -
    10:00
    -
    -
  • -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
-
- - -
-
-
地点6
-
- 100人 - 电视、投影仪、白板、音响、麦克风 -
-
-
-
-
- -
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    -
-
-
-
-
-
    - -
-
-
-
-
-
    - -
-
-
-
-
-
    -
  • -
    -
    - 关于开展安全生产专项教育全员学习活动的通知会议
    -
    10:00
    -
    -
  • - -
-
-
-
-
-
    - -
-
-
-
-
- -
-
- `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/collection-base/fd-collection-base.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/collection-base/fd-collection-base.ts deleted file mode 100644 index 2a4dfc229db1e32908a66b33b88f90ff80ae5f69..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/collection-base/fd-collection-base.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { FarrisDesignBaseNestedComponent, FarrisDesignBaseComponent } from '@farris/designer-element'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import Sortable from 'sortablejs'; -import { DesignerEnvType, FormBasicService, RefreshFormService, SchemaService } from '@farris/designer-services'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { GridFieldEditorComponent } from '../../common/property/editor/grid-field-editor/grid-field-editor.component'; -import { NotifyService } from '@farris/ui-notify'; - -export default class FdCollectionBaseComponent extends FarrisDesignBaseNestedComponent { - envType: DesignerEnvType; - - triggerBelongedComponentToMoveWhenMoved = true; - - /** DataGrid所属的Component实例 */ - belongedCmpInstance: FarrisDesignBaseNestedComponent; - - constructor(component: any, options: any) { - super(component, options); - - // 组件所属分类为“集合类” - this.category = 'dataCollection'; - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - } - - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - let dynamicPropertyIDs = ['appearance.class', 'appearance.style', 'size.width', 'size.height', 'inlineStyle']; - if (propertyIDs) { - dynamicPropertyIDs = dynamicPropertyIDs.concat(propertyIDs); - } - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - if (changeObject.propertyID === 'fields') { - const refreshService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - const cmpToRefresh = this.parent ? this.parent.component.id : this.component.id; - refreshService.refreshFormDesigner.next(cmpToRefresh); - } - - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - const serviceHost = this.options.designerHost; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this); - - - // 接收实体树中拖拽来的字段,需要判断是否属于当前组件绑定的实体 - if (resolveContext.sourceType === 'field') { - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - const fieldInfo = schemaService.getFieldByIDAndVMID(resolveContext.bindingTargetId, this.viewModelId); - if (!fieldInfo || !fieldInfo.schemaField) { - return false; - } else { - return true; - } - } - // 接收工具箱中拖拽来的输入类控件 - if (resolveContext.sourceType === 'control') { - return resolveContext.controlCategory === 'input'; - } - return false; - } - - /** - * 注册列表头的拖拽,用于调整列顺序 - */ - registerGridFieldDnd() { - const dragToolBarContainer = this.element.querySelector('.f-datagrid-header'); - if (dragToolBarContainer) { - // tslint:disable-next-line:no-unused-expression - new Sortable(dragToolBarContainer, { - direction: 'horizontal', - animation: 150, - onEnd: (evt) => { - this.dragGridFieldEnd(evt); - } - }); - } - } - /** - * 调整列顺序后同步修改DOM结构 - */ - dragGridFieldEnd(e: any) { - const oldIndex = e.oldIndex; - const newIndex = e.newIndex; - - if (oldIndex !== newIndex) { - const field = this.component.fields[oldIndex]; - this.component.fields.splice(oldIndex, 1); - this.component.fields.splice(newIndex, 0, field); - } - - } - - /** - * 不允许单独删除集合类控件,若要删除需要定位到所属Component去删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - - /** - * 是否支持移动取决于所属Component是否支持移动 - */ - checkCanMoveComponent(): boolean { - this.belongedCmpInstance = this.getBelongedComponentInstance(this); - return this.belongedCmpInstance.checkCanMoveComponent(); - } - - /** - * 弹出字段维护窗口 - */ - showFieldManager() { - - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - const notifyService = injector.get(NotifyService) as NotifyService; - - const compFactory = resolver.resolveComponentFactory(GridFieldEditorComponent); - const compRef = compFactory.create(injector); - const modalConfig = { - title: '维护显示列', - width: 950, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.value = this.component.fields || []; - compRef.instance.editorParams = { - fieldEditable: this.component.fieldEditable, - viewModelId: this.viewModelId, - gridType: this.component.type, - controlSource: this.component.controlSource - }; - - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - this.component.fields = data.value; - const refreshService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - // 因为dataGrid涉及到弹出编辑区域,这里不能只重构dataGrid - const cmpToRefresh = this.parent ? this.parent.component.id : this.component.id; - refreshService.refreshFormDesigner.next(cmpToRefresh); - - if (this.component.enableHeaderGroup) { - notifyService.info('修改显示列后请重新配置多表头'); - } - modalPanel.close(); - }); - - } - - /** - * 删除后事件,用于连带删除schema实体表的场景 - */ - onRemoveComponent(): void { - const serviceHost = this.options.designerHost; - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - - schemaService.removeSchemaEntityByViewModelId(this.viewModelId) - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/collection-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/collection-property-config.ts deleted file mode 100644 index c3e968798b749050b4192ccc116f28ad1cedcc11..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/collection-property-config.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { ExpressionProp } from '../../../input/common/property/expression/expression-property-config'; -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { EventEditorService, WebCmdService, DomService, SchemaService, FormBasicService, RefreshFormService, UniformEditorDataUtil, StateMachineService, DesignViewModelService } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { NotifyService } from '@farris/ui-notify'; -import { DgControl } from '../../../../utils/dg-control'; -import { NumericBoxProp } from '../../../input/numeric-box/property/property-config'; -import { NumberRangeProp } from '../../../input/number-range/property/property-config'; -import { TimePickerProp } from '../../../input/time-picker/property/property-config'; -import { CheckBoxProp } from '../../../input/checkbox/property/property-config'; -import { InputGroupProp } from '../../../input/input-group/property/property-config'; -import { LanguageTextBoxProp } from '../../../input/language-text-box/property/property-config'; -import { TextBoxProp } from '../../../input/text-box/property/property-config'; -import { SwitchFieldProp } from '../../../input/switch/property/property-config'; -import { MultiTextBoxProp } from '../../../input/multi-text-box/property/property-config'; -import { EnumFieldProp } from '../../../input/select/property/property-config'; -import { DateBoxProp } from '../../../input/date-box/property/property-config'; -// import { LookupEditProp } from '../../../input/lookup-edit/property/property-config'; -// import { PersonnelSelectorProp } from '../../../input/personnel-selector/property/property-config'; -import { AvatarProp } from '../../../input/avatar/property/property-config'; -import { ImageProp } from '../../../input/image/property/property-config'; -import { CheckGroupProp } from '../../../input/check-group/property/property-config'; -import { RadioGroupProp } from '../../../input/radio-group/property/property-config'; -import { RichTextBoxProp } from '../../../input/rich-text-box/property/property-config'; -import { TagsProp } from '../../../input/tags/property/property-config'; -// import { OrganizationSelectorProp } from '../../../input/organization-selector/property/property-config'; -// import { AdminOrganizationSelectorProp } from '../../../input/admin-org-selector/property/property-config'; -// import { EmployeeSelectorProp } from '../../../input/employee-selector/property/property-config'; -// import { OaRelationProp } from '../../../input/oa-relation/property/property-config'; -import { MessagerService } from '@farris/ui-messager'; -// import { ExtIntergrationProp } from '../../../input/extintergration-input/property/property-config'; -import { ImageUploadProp } from '../../../input/image-upload/property/property-config'; -export class CollectionProp extends ExpressionProp { - public formBasicService: FormBasicService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public eventEditorService: EventEditorService; - public notifyService: NotifyService; - public schemaService: SchemaService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - public msgService: MessagerService; - public stateMachineService: StateMachineService; - public dgVMService: DesignViewModelService; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost.getService('DomService')); - this.viewModelId = viewModelId; - this.componentId = componentId; - this.webCmdService = serviceHost.getService('WebCmdService'); - this.domService = serviceHost.getService('DomService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.schemaService = serviceHost.getService('SchemaService'); - this.stateMachineService = serviceHost.getService('StateMachineService'); - const injector = serviceHost.getService('Injector'); - this.notifyService = injector.get(NotifyService); - this.msgService = injector.get(MessagerService); - this.dgVMService = serviceHost.getService('DesignViewModelService'); - - } - - - - getCommonAppearanceProperties(): PropertyEntity[] { - - return [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string', - description: '组件的CSS样式' - }, - { - propertyID: 'style', - propertyName: 'style样式', - propertyType: 'modal', - description: '组件的内容样式', - editor: StyleEditorComponent, - showClearButton: true - } - ] - }, - // { - // propertyID: 'size', - // propertyName: '尺寸', - // propertyType: 'cascade', - // cascadeConfig: [ - // { - // propertyID: 'width', - // propertyName: '宽度(px)', - // propertyType: 'number', - // description: '组件的宽度', - // min: 0, - // decimals: 0 - // }, - // { - // propertyID: 'height', - // propertyName: '高度(px)', - // propertyType: 'number', - // description: '组件的高度', - // min: 0, - // decimals: 0 - // } - // ] - // } - ]; - - } - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - } - - - /** - * 列编辑器属性 - * @param propertyData 列属性值 - * @param viewModelId viewModelId - */ - getFieldEditorProp(propertyData: any, showPosition = 'gridFieldEditor', isSimpleTable = false) { - let inputPropInstance; - switch (propertyData.editor.type) { - case DgControl.NumericBox.type: { - inputPropInstance = new NumericBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.NumberRange.type: { - inputPropInstance = new NumberRangeProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.TimePicker.type: { - inputPropInstance = new TimePickerProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.CheckBox.type: { - inputPropInstance = new CheckBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.InputGroup.type: { - inputPropInstance = new InputGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.LanguageTextBox.type: { - inputPropInstance = new LanguageTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.MultiTextBox.type: { - inputPropInstance = new MultiTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.SwitchField.type: { - inputPropInstance = new SwitchFieldProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.TextBox.type: { - inputPropInstance = new TextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.EnumField.type: { - inputPropInstance = new EnumFieldProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.DateBox.type: { - inputPropInstance = new DateBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - // case DgControl.LookupEdit.type: { - // inputPropInstance = new LookupEditProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.PersonnelSelector.type: { - // inputPropInstance = new PersonnelSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - case DgControl.Avatar.type: { - inputPropInstance = new AvatarProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.CheckGroup.type: { - inputPropInstance = new CheckGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.Image.type: { - inputPropInstance = new ImageProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RadioGroup.type: { - inputPropInstance = new RadioGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RadioGroup.type: { - inputPropInstance = new RadioGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RichTextBox.type: { - inputPropInstance = new RichTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.Tags.type: { - inputPropInstance = new TagsProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - // case DgControl.OrganizationSelector.type: { - // inputPropInstance = new OrganizationSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.AdminOrganizationSelector.type: { - // inputPropInstance = new AdminOrganizationSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.ExtIntergration.type: { - // inputPropInstance = new ExtIntergrationProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - - // case DgControl.EmployeeSelector.type: { - // inputPropInstance = new EmployeeSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.OaRelation.type: { - // inputPropInstance = new OaRelationProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - case DgControl.ImageUpload.type: { - inputPropInstance = new ImageUploadProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - } - - if (inputPropInstance) { - if (showPosition === 'gridFieldEditor' && inputPropInstance.getGridFieldEdtiorPropConfig) { - return inputPropInstance.getGridFieldEdtiorPropConfig(propertyData, this.viewModelId); - } - if (showPosition === 'tableTdEditor' && inputPropInstance.getTableTdEdtiorPropConfig) { - return inputPropInstance.getTableTdEdtiorPropConfig(propertyData, this.viewModelId, isSimpleTable); - } - } - - return []; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.css deleted file mode 100644 index 376f60c7e6d90f372bc7281d56c7055e3fadf1e3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.css +++ /dev/null @@ -1,21 +0,0 @@ -:host { - display: block; -} - -.col-form-label { - width: 52px !important; -} - -.col-form-label.datetime { - width: 40px !important; -} - -.applyBtn { - margin-top: 5px; - display: flex; - justify-content: center; -} - -.applyBtn .btn { - width: 110px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.html deleted file mode 100644 index 408610832cac3d62b505e0293c279380b7f1b00e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.html +++ /dev/null @@ -1,90 +0,0 @@ -
- -
- 类型 - - -
- - -
-
- 精度 - -
- -
- 格式 - - -
- - -
- -
- -
- - -
-
- 格式 - - -
- -
- -
- -
- - - - -
-
- 图标集 - - -
- -
- -
-
- -
- - -
-
- -
- -
- -
- - -
- - - - - - {{item.text}} - - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.ts deleted file mode 100644 index 5ec9a2caf0a957b29ccd82452bb36eecae8065e4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/field-style-config/field-style-config.component.ts +++ /dev/null @@ -1,455 +0,0 @@ -import { ChangeDetectorRef, Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { PropertyEntity } from '@farris/ide-property-panel'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { cloneDeep } from 'lodash-es'; - -@Component({ - selector: 'app-field-style-config', - templateUrl: './field-style-config.component.html', - styleUrls: ['./field-style-config.component.css'] -}) -export class FieldStyleConfigComponent implements OnInit { - @Output() valueChanged = new EventEmitter(); - - - private _elementConfig: PropertyEntity; - - /** 列表列数据 */ - private gridFieldData: any; - - get elementConfig() { - return this._elementConfig; - } - - set elementConfig(value) { - this._elementConfig = value; - this.gridFieldData = value.editorParams.propertyData; - this.init(); - } - - - styleTypes = [ - { value: 'number', text: '数字' }, - { value: 'date', text: '日期' }, - { value: 'datetime', text: '日期时间' }, - { value: 'icon', text: '图标' }, - { value: 'none', text: '自定义' } - ]; - styleType = 'none'; - - numberPrecision = 2; - numberFormats = []; - standardNumberFormats = [ - { value: '{\"precision\":2,\"prefix\":\"\",\"suffix\":\"\",\"decimal\":\".\",\"thousand\":\",\"}', text: '1,234.00' }, - { value: '{\"precision\":2,\"prefix\":\"\",\"suffix\":\"元\",\"decimal\":\".\",\"thousand\":\",\"}', text: '1,234.00元' }, - { value: '{\"precision\":2,\"prefix\":\"¥\",\"suffix\":\"\",\"decimal\":\".\",\"thousand\":\",\"}', text: '¥1,234.00' }, - { value: '{\"precision\":2,\"prefix"\:\"$\",\"suffix\":\"\",\"decimal\":\".\",\"thousand\":\",\"}', text: '$1,234.00' } - ]; - numberFormat; - - - dateFormats = []; - standardDateFormats = [ - { value: 'yyyy-MM-dd', text: '2021-11-30' }, - { value: 'yyyy年MM月dd日', text: '2021年11月30日' }, - { value: 'yyyy/MM/dd', text: '2021/11/30' }, - // { value: 'yyyyMMdd', text: '20211130' }, - { value: 'MM/dd/yyyy', text: '11/30/2021' } - ]; - dateFormat; - - standardDatetimeFormats = [ - { value: 'yyyy-MM-dd HH:mm:ss', text: '2021-11-30 08:30:00' }, - { value: 'yyyy/MM/dd HH:mm:ss', text: '2021/11/30 08:30:00' }, - { value: 'yyyy年MM月dd日 HH时mm分ss秒', text: '2021年11月30日 08时30分00秒' }, - ]; - - selectedIconType; - iconTypes = []; - standardIconTypes2 = [ - { - value: 'flag', - text: '标记', - iconClass: [ - { - id: 'warningFlag', - class: 'f-icon-flag_urgent text-warning' - }] - }, - { - value: 'process', - text: '形状', - iconClass: [ - { - id: 'dangerRound', - class: 'badge-round-danger' - }, { - id: 'infoRound', - class: 'badge-round-info' - }, - { - id: 'successRound', - class: 'badge-round-success' - }] - }, - { - value: 'none', - text: '自定义' - } - ]; - /** 是否显示枚举配置的确定按钮:切换为新的图标集或者需要清除原图标集时显示按钮。若之前没有配置过图标集且没有切换新图标集,则不显示按钮。 */ - showEnumIconOkBtn = true; - - /** - * 某一系列图标包含的图标 - */ - iconClassEnums: Array<{ id: string, class: string }> = []; - - /** 枚举数据 */ - enumData: Array<{ value: string, name: string, iconClass: string }> = []; - - /** 图标id:枚举值 */ - iconEnumMapping = {}; - - - constructor(private msgService: MessagerService, private notifyService: NotifyService, private cd: ChangeDetectorRef) { } - - ngOnInit() { - this.styleTypes = []; - switch (this.gridFieldData.dataType) { - case 'number': { - this.styleTypes.push({ value: 'number', text: '数字' }); - this.styleType = 'number'; - break; - } - case 'date': case 'datetime': { - this.styleTypes.push({ value: 'date', text: '日期' }); - this.styleType = 'date'; - break; - } - case 'enum': { - this.styleTypes.push({ value: 'icon', text: '图标' }); - this.styleType = 'icon'; - - break; - } - default: { - this.styleTypes.push({ value: 'none', text: '自定义' }); - this.styleType = 'none'; - } - } - } - - - init() { - switch (this.gridFieldData.dataType) { - case 'number': { - this.initNumberFormat(); - break; - } - case 'date': { - this.initDateFormat(); - break; - } - case 'datetime': { - this.initDatetimeFormat(); - break; - } - case 'enum': { - this.initEnumFormat(); - - break; - } - } - - } - - private initNumberFormat() { - const gridFieldFormatter = this.gridFieldData.formatter; - - this.numberPrecision = gridFieldFormatter.precision; - this.numberFormats = cloneDeep(this.standardNumberFormats); - this.onNumberPrecisionChanged(); - - const fieldNumberFormatter = { - precision: gridFieldFormatter.precision, - prefix: gridFieldFormatter.prefix || '', - suffix: gridFieldFormatter.suffix || '', - decimal: gridFieldFormatter.decimal || '', - thousand: gridFieldFormatter.thousand || '' - }; - const numberFormatValue = JSON.stringify(fieldNumberFormatter); - if (gridFieldFormatter.type !== 'number' || !this.numberFormats.find(f => f.value === numberFormatValue)) { - this.numberFormat = null; - this.numberFormats.push({ value: null, text: '自定义' }); - } else { - this.numberFormat = numberFormatValue; - } - - this.cd.detectChanges(); - } - private initDateFormat() { - const gridFieldFormatter = this.gridFieldData.formatter; - - const gridDateFormat = gridFieldFormatter.dateFormat; - this.dateFormats = cloneDeep(this.standardDateFormats); - - - if (gridFieldFormatter.type !== 'date' || !this.dateFormats.find(f => f.value === gridDateFormat)) { - this.dateFormat = null; - this.dateFormats.push({ value: null, text: '自定义' }); - } else { - this.dateFormat = gridDateFormat; - } - this.cd.detectChanges(); - } - - private initDatetimeFormat() { - const gridFieldFormatter = this.gridFieldData.formatter; - - const gridDateFormat = gridFieldFormatter.dateFormat; - this.dateFormats = cloneDeep(this.standardDatetimeFormats); - this.dateFormats.push(...this.standardDateFormats); - - - if (gridFieldFormatter.type !== 'date' || !this.dateFormats.find(f => f.value === gridDateFormat)) { - this.dateFormat = null; - this.dateFormats.push({ value: null, text: '自定义' }); - } else { - this.dateFormat = gridDateFormat; - } - this.cd.detectChanges(); - } - - private initEnumFormat() { - if (this.elementConfig.editorParams.needClearConfig) { - this.selectedIconType = null; - } - if (this.selectedIconType) { - return; - } - this.enumData = cloneDeep(this.gridFieldData.enumData || []); - const iconConfigForEnumData = this.gridFieldData.iconConfigForEnumData || {}; - - this.iconTypes = cloneDeep(this.standardIconTypes2); - this.selectedIconType = iconConfigForEnumData.type || ''; - if (!this.selectedIconType) { - this.selectedIconType = 'none'; - this.showEnumIconOkBtn = false; - } else { - this.showEnumIconOkBtn = true; - } - this.iconTypes.push(); - this.iconEnumMapping = iconConfigForEnumData.iconEnumMapping || {}; - - // 枚举值被删掉的场景下,要清除mapping里的数据 - const enumValues = this.enumData.map(e => e.value); - Object.keys(this.iconEnumMapping).forEach(iconId => { - if (!enumValues.includes(this.iconEnumMapping[iconId])) { - this.iconEnumMapping[iconId] = null; - } - }); - this.changeIconClassEnums(); - } - - - onNumberPrecisionChanged() { - let decimal = '.'; - for (let i = 0; i < this.numberPrecision; i++) { - decimal = decimal + '0'; - } - if (decimal === '.') { - decimal = ''; - } - this.numberFormats.forEach(format => { - if (format.value) { - format.text = format.text.replace(/[.,0]/g, '').replace('4', '4' + decimal); - - let isSelected = false; - if (this.numberFormat === format.value) { - isSelected = true; - } - - const value = JSON.parse(format.value); - value.precision = this.numberPrecision; - format.value = JSON.stringify(value); - - if (isSelected) { - this.numberFormat = format.value; - } - } - }); - } - - /** - * 切换图标集 - */ - onIconTypeChanged() { - this.changeIconClassEnums(); - this.iconEnumMapping = {}; - - const iconConfigForEnumData = this.gridFieldData.iconConfigForEnumData || {}; - - this.showEnumIconOkBtn = (iconConfigForEnumData.type || this.selectedIconType !== 'none') ? true : false; - } - - /** - * 变更图标的枚举数据 - */ - changeIconClassEnums() { - - const selectedIcon = this.iconTypes.find(t => t.value === this.selectedIconType); - this.iconClassEnums = selectedIcon ? selectedIcon.iconClass : []; - } - - sumbitStyle() { - if (this.styleType === 'icon') { - this.submitIconTemplateStyle(); - } else { - this.submitFormatStyle(); - } - - - } - - private submitFormatStyle() { - this.msgService.question('应用快捷配置,将重置列格式化属性,确定应用?', () => { - - let finalValue; - - switch (this.styleType) { - case 'number': { - if (this.numberFormat) { - const numberFormatValue = JSON.parse(this.numberFormat); - const fieldNumberFormatter = { - type: 'number', - precision: numberFormatValue.precision, - prefix: numberFormatValue.prefix || '', - suffix: numberFormatValue.suffix || '', - decimal: numberFormatValue.decimal || '', - thousand: numberFormatValue.thousand || '' - }; - finalValue = { formatter: fieldNumberFormatter }; - } - - this.valueChanged.emit({ elementValue: finalValue }); - break; - } - case 'date': { - if (this.dateFormat) { - finalValue = { - formatter: { - type: 'date', - dateFormat: this.dateFormat - } - }; - } - this.valueChanged.emit({ elementValue: finalValue }); - break; - } - } - }); - - } - - - /** - * 校验是否有选中的枚举值 - */ - private getSelectedIconEnum() { - const selectedEnums = []; - for (const iconValue of Object.keys(this.iconEnumMapping)) { - if (this.iconEnumMapping[iconValue]) { - selectedEnums.push(this.iconEnumMapping[iconValue]); - } - } - return selectedEnums; - } - private submitIconTemplateStyle() { - // 自定义图标--不影响列模板结构 - if (!this.selectedIconType) { - this.valueChanged.emit({ elementValue: null }); - return; - } - if (this.selectedIconType === 'none') { - this.clearEnumTemplate(); - return; - - } - const selectedEnums = this.getSelectedIconEnum(); - if (selectedEnums.length === 0) { - this.notifyService.warning('请先选择图标对应的枚举项'); - return; - } - - const keySet = new Set(selectedEnums); - if (Array.from(keySet).length !== selectedEnums.length) { - this.notifyService.warning('不能重复配置枚举项,请修改'); - return; - } - - this.msgService.question('应用图标配置,将重置列模板属性,确定应用?', () => { - - // tslint:disable-next-line:quotemark - const originTemplate = "\r\n ${iconClassName}${enumName}\r\n"; - - const { type: controlType, id: controlId, dataField } = this.gridFieldData; - - const enumTemplateArray = []; - this.enumData.forEach(enumData => { - - // 定位图标id对应的图标class - enumData.iconClass = ''; - for (const iconId of Object.keys(this.iconEnumMapping)) { - if (this.iconEnumMapping[iconId] === enumData.value) { - enumData.iconClass = this.iconClassEnums.find(c => c.id === iconId).class; - break; - } - } - let templateItem = originTemplate; - - templateItem = templateItem.replace('${bindingPath}', dataField.replace('.', '?.')); - templateItem = templateItem.replace('${enumValue}', enumData.value); - - templateItem = templateItem.replace('${enumName}', '{{\'' + controlType + '/' + controlId + '/enumData/' + enumData.value + '\'|lang:lang:\'' + enumData.name + '\'}}'); - - if (enumData.iconClass) { - templateItem = templateItem.replace('${iconClassName}', ''); - } else { - templateItem = templateItem.replace('${iconClassName}', ''); - } - - enumTemplateArray.push(templateItem); - }); - - - - const finalTemplate = enumTemplateArray.join('\r\n'); - - this.valueChanged.emit({ - elementValue: { - colTemplate: finalTemplate, - enumIconConfig: { - type: this.selectedIconType, - iconEnumMapping: this.iconEnumMapping - } - } - }); - }); - } - /** - * 枚举图标配置,切换为自定义,将清除原模板配置 - */ - private clearEnumTemplate() { - this.msgService.question('切换自定义,将清除列模板属性,确定应用?', () => { - - this.valueChanged.emit({ - elementValue: { - colTemplate: '', - enumIconConfig: null - } - }); - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-converter.ts deleted file mode 100644 index 00f202c6598f572e7a071801e5f6708fd5be0c54..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-converter.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class GridFieldConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data && Array.isArray(data)) { - return '共 ' + data.length + ' 列'; - } else { - return data; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.css deleted file mode 100644 index d8ea19207c3c378b2f0b9925f49a9b242a43afdd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.css +++ /dev/null @@ -1,24 +0,0 @@ -.gridFieldEditor { - user-select: none; -} - -.gridFieldEditor .listPanel { - overflow: auto; -} - -.gridFieldEditor .listPanel .list-group { - height: 100%; -} - -.gridFieldEditor .listPanel .list-group-item { - padding: .35rem .625rem; - overflow: initial; -} - -.gridFieldEditor .listPanel .list-group-item.inValidBinding { - color: rgb(162, 162, 162); -} - -.gridFieldEditor .listPanel .list-group-item.inValidBinding.active { - color: #fff; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.html deleted file mode 100644 index 3563c42a10f72ec91f009602a1dd156c440ed06f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.html +++ /dev/null @@ -1,84 +0,0 @@ -
-
- - -
- - 未选择 -
- - - - - - - {{rowData['name']}} [{{ rowData['bindingField'] }}] - - - - -
-
- - -
- -
- - - - -
-
-
- - 已选择 - -
-
    -
  • - {{ col.name }} - [{{ col.bindingField }}] - [{{ col.inValidTip }}] -
  • -
- -
- -
-
-
- - - - -
-
- - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.ts deleted file mode 100644 index cb2ec97f834d0b8cd9711d5787001343d3a87ca5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-editor/grid-field-editor.component.ts +++ /dev/null @@ -1,486 +0,0 @@ -import { - Component, EventEmitter, HostBinding, Input, OnDestroy, OnInit, - Output, TemplateRef, ViewChild -} from '@angular/core'; -import { EventEditorService, DesignerEnvType, DesignerHostSettingService, DesignViewModelService, DomService, FormBasicService, SchemaService, FormSchemaEntityField, FormSchemaEntityField$Type } from '@farris/designer-services'; -import { constants, ContainerOptions, DropResult, smoothDnD } from '@farris/smooth-dnd'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { DgControl } from '../../../../../../utils/dg-control'; - - -const SELECT_MOVE_COLUMN_MESSAGE = '请选择要移动显示的列。'; - -/** - * 列表/树列表的列选择器,生成GridField/TreeGridField - */ -@Component({ - selector: 'app-grid-field-editor', - templateUrl: './grid-field-editor.component.html', - styleUrls: ['./grid-field-editor.component.css'] -}) -export class GridFieldEditorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; // datagrid控件 fields字段 - @Input() editorParams: any = {}; - @ViewChild('gridFieldFooter') modalFooter: TemplateRef; - modalConfig = { - title: '列编辑器', - width: 900, - height: 500, - showButtons: true - }; - - @ViewChild('tt') sourceTree: TreeTableComponent; - idField = 'id'; - - @HostBinding('class') - cls = 'h-100 d-flex flex-column p-2 flex-fill'; - - // 左侧选中的列 - get leftCheckeds() { - if (this.sourceTree.selections) { - return this.sourceTree.selections.map(n => { - return n.data; - }); - } else { - return []; - } - } - - // 右侧显示列 - selectedColumns = []; - - // 右侧选中的列 - rightCheckeds: any = {}; - - // 左侧树 - sourceColumnsTreeData: TreeNode[] = []; - - // 打平关联字段后的列数据 - plainColumns: TreeNode[] = []; - - // 列表是否需要列编辑器 - fieldEditable = false; - - /** 控件创建服务 */ - private controlCreatorService: any; - - /** 同一个实体,已经在其他列表中使用过的字段id */ - private fieldIdsInOhterGrids: string[] = []; - - constructor( - private dgVMService: DesignViewModelService, - private notifyService: NotifyService, - private domService: DomService, - private designerHost: DesignerHostSettingService, - private formBasicService: FormBasicService, - private schemaService: SchemaService, - private eventEditorService: EventEditorService) { - this.controlCreatorService = this.designerHost.designerHost.getService('ControlCreatorService'); - - } - - ngOnInit(): void { - if (!this.editorParams) { - return; - } - this.sourceColumnsTreeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams['viewModelId']); - - this.fieldEditable = this.editorParams['fieldEditable']; - this.getSelectedColumns(); - - this.getFieldIdsInOtherForms(); - } - - - - ngOnDestroy() { - if (this['sourceTreeContainer']) { - this['sourceTreeContainer'].dispose(); - } - } - - /** - * 获取已选择的列 - */ - getSelectedColumns() { - this.plainColumns = this.convertTreeNodes2PlainObject(this.sourceColumnsTreeData); - if (!this.value || this.value.length === 0) { - return []; - } - - this.value.forEach(value => { - if (value.binding && value.binding.field) { - const element = this.plainColumns.find(el => el.data.id === value.binding.field); - if (element) { - if (element.data.$type === FormSchemaEntityField$Type.ComplexField) { - this.selectedColumns.push(Object.assign({ isInValidBinding: true, inValidTip: '绑定字段已失效,请手动移除列' }, element.data)); - - } else { - this.selectedColumns.push(Object.assign({}, element.data)); - - } - } else { - this.selectedColumns.push({ - id: value.binding.field, - name: value.caption, - bindingField: null, - isInValidBinding: true, - inValidTip: '绑定字段不存在,请手动移除列' - }); - } - - } - - }); - - - } - - - /** - * 获取在其他列表中已使用的字段id,这些字段在当前列表中不允许再添加 - */ - private getFieldIdsInOtherForms() { - this.fieldIdsInOhterGrids = []; - const currentVM = this.domService.getViewModelById(this.editorParams.viewModelId); - const currentCmp = this.domService.getComponentByVMId(this.editorParams.viewModelId); - - this.domService.viewmodels.forEach(vm => { - - // 绑定同一个实体,且都为卡片组件 - if (vm.id === this.editorParams.viewModelId || !vm.fields || !vm.fields.length || vm.bindTo !== currentVM.bindTo) { - return; - } - const cmpNode = this.domService.getComponentByVMId(vm.id); - if (currentCmp.componentType === cmpNode.componentType) { - const fieldIds = vm.fields.map(f => f.id); - this.fieldIdsInOhterGrids = this.fieldIdsInOhterGrids.concat(fieldIds); - } - - }); - - - } - - isChecked(col: any, direction: string): boolean { - if (direction === 'l') { - return this.leftCheckeds[col['id']] !== undefined; - } else { - return this.rightCheckeds[col['id']] !== undefined; - } - } - - /** - * 字段是否可勾选 - * 1、已选字段不可勾选 - * 2、主表的udt字段、关联字段不可勾选 - * @param col - */ - canChecked(col) { - if (col.type && col.type.fields && col.type.fields.length > 0) { - return false; - } - if (this.fieldIdsInOhterGrids.includes(col['id'])) { - return false; - } - if (this.selectedColumns.length === 0) { - return true; - } - if (this.selectedColumns.findIndex(c => c['id'] === col['id']) === -1) { - return true; - } - - - } - - - - hasCheckeds(side: string) { - if (side === 'l') { - return this.leftCheckeds.length > 0; - } else { - return Object.keys(this.rightCheckeds).length > 0; - } - } - - rightColumnChecked(col) { - if (this.isChecked(col, 'r')) { - this.rightCheckeds = {}; - return; - } else { - this.rightCheckeds = {}; - this.rightCheckeds[col['id']] = col; - } - } - - //#region 左右移动 - - /** 右移 */ - moveToRight() { - if (this.hasCheckeds('l')) { - this.leftCheckeds.forEach(col => { - if (this.selectedColumns.findIndex(selectedCo => selectedCo.id === col.id) === -1) { - // this.selectedColumns.push(col); - this.selectedColumns.push(Object.assign({}, col)); - } - }); - this.clearSelections(); - } else { - this.notifyService.warning('请选择要显示的列。'); - } - } - - private clearSelections() { - this.sourceTree.selectedRow = undefined; - this.sourceTree.clearAll(); - } - - /** - * 全部右移:主表的关联、udt字段不可右移 - */ - // bug fix - moveAllToRight() { - this.plainColumns.filter(col => { - const data = col.data; - if (data.type && data.type.fields && data.type.fields.length > 0) { - return false; - } - if (this.fieldIdsInOhterGrids.includes(col.id)) { - return false; - } - return this.selectedColumns.findIndex(selectedCo => selectedCo.id === col.id) === -1; - }).forEach(col => { - // this.selectedColumns.push(col.data); - this.selectedColumns.push(Object.assign({}, col.data)); - }); - - this.clearSelections(); - } - - /** 左移 */ - moveToLeft() { - if (this.hasCheckeds('r')) { - this.selectedColumns = this.selectedColumns.filter(v => { - return Object.values(this.rightCheckeds).indexOf(v) === -1; - }); - - this.rightCheckeds = {}; - } else { - this.notifyService.warning('请选择要取消显示的列。'); - } - } - - /** 全部左移 */ - moveAllToLeft() { - this.selectedColumns = []; - - } - - //#endregion - - //#region 上下移动显示列顺序 - - _getSelectColumnInfo() { - if (this.hasCheckeds('r')) { - const cols = Object.values(this.rightCheckeds); - const index = this.selectedColumns.findIndex(c => c === cols[0]); - return { - cols, index - }; - } - - return null; - } - /** 置顶 */ - moveTop() { - const obj = this._getSelectColumnInfo(); - if (obj) { - this.selectedColumns.unshift(this.selectedColumns[obj.index]); - this.selectedColumns.splice(obj.index + 1, 1); - - } else { - this.notifyService.warning(SELECT_MOVE_COLUMN_MESSAGE); - } - } - - /** 上移 */ - moveUp() { - if (this.hasCheckeds('r')) { - const obj = this._getSelectColumnInfo(); - if (obj) { - const len = obj.cols.length; - const index = obj.index; - if (index !== 0) { - const tempArr = this.selectedColumns.splice(index, len); - this.selectedColumns.splice(index - 1, 0, ...tempArr); - } - - } - } else { - this.notifyService.warning(SELECT_MOVE_COLUMN_MESSAGE); - } - } - - /** 下移 */ - moveDown() { - if (this.hasCheckeds('r')) { - const obj = this._getSelectColumnInfo(); - if (obj) { - const len = this.selectedColumns.length; - const index = obj.index; - if (index === 0 || index !== len - 1) { - const tempArr = this.selectedColumns.splice(index, 1); - this.selectedColumns.splice(index + 1, 0, ...tempArr); - } - - } - } else { - this.notifyService.warning(SELECT_MOVE_COLUMN_MESSAGE); - } - } - - /** 置底 */ - moveBottom() { - const obj = this._getSelectColumnInfo(); - if (obj) { - this.selectedColumns.push(obj.cols[0]); - this.selectedColumns.splice(obj.index, 1); - } else { - this.notifyService.warning(SELECT_MOVE_COLUMN_MESSAGE); - } - } - - //#endregion - - private convertTreeNodes2PlainObject(nodes: TreeNode[], r: any[] = []): TreeNode[] { - if (nodes) { - nodes.forEach(n => { - r.push(n); - if (n.children) { - this.convertTreeNodes2PlainObject(n.children, r); - } - }); - } - - return r; - } - - getTreeNodeByID(fieldId: string) { - return this.plainColumns.find(column => column.data.id === fieldId); - } - /** - * 确定 - */ - clickConfirm() { - const dgViewModel = this.dgVMService.getDgViewModel(this.editorParams.viewModelId); - const newFields = []; - const newFieldIds = []; - // 组装GridField数据 - this.selectedColumns.forEach(co => { - delete co.inValidTip; - delete co.isInValidBinding; - let value = this.value.find(v => { - if (v.binding && v.binding.field) { - return v.binding.field === co.id; - } - }); - if (!value) { - // 关联字段/UDT字段设置dataField - const treeNode = this.sourceTree.findRowNode(co.id); - const dataField = this._getDataField(treeNode, co.label); - const fieldType = this.editorParams.gridType === DgControl.DataGrid.type ? DgControl.GridField.type : DgControl.TreeGridField.type; - value = this.controlCreatorService.createGridFieldBySchemaFeild(co, dataField, this.fieldEditable, - fieldType, this.editorParams.controlSource); - - dgViewModel.addField(co); // DgVM增加字段 - } - newFields.push(value); - newFieldIds.push(co.id); - }); - - // DgVM 删除字段 - const deletedFields = dgViewModel.fields.filter(f => !newFieldIds.includes(f.id)); - if (deletedFields && deletedFields.length > 0) { - const deletedFieldIds = deletedFields.map(f => f.id); - dgViewModel.removeField(deletedFieldIds); - - // 删除schema字段---零代码场景 - if (this.formBasicService.envType === DesignerEnvType.noCode) { - this.schemaService.removeSchemaField(deletedFieldIds); - } - - // 若字段配置了表达式,需要删除表达式 - if (this.domService.expressions && this.domService.expressions.length && deletedFieldIds.length) { - this.domService.expressions = this.domService.expressions.filter(e => !deletedFieldIds.includes(e.fieldId)); - } - } - - this.submitModal.emit({ value: newFields }); // 属性编辑器自动将newFields赋值给对应控件value - } - - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - - - private _getDataField(treeNode, label) { - let dataField; - if (treeNode.parent) { - dataField = treeNode.parent.data.label + '.' + label; - dataField = this._getDataField(treeNode.parent, dataField); - } else { - dataField = label; - } - return dataField; - } - - - onDrop({ removedIndex, addedIndex, payload }: DropResult) { - let itemToAdd = payload; - if (removedIndex !== null) { - itemToAdd = this.selectedColumns.splice(removedIndex, 1)[0]; - } - if (addedIndex !== null && itemToAdd) { - this.selectedColumns.splice(addedIndex, 0, itemToAdd); - } - } - - getGhostParent() { - return window.document.body; - } - - getSourceTreeChildPayload(index: number) { - return this.sourceTree.serializedValue[index].node.data; - } - - private makeSourceTreeDraggable() { - const tbodyList = this.sourceTree.el.nativeElement.getElementsByTagName('tbody'); - if (!tbodyList.length) { - return; - } - const containerElement = tbodyList[0]; - const containerOptions: ContainerOptions = { - behaviour: 'copy', - getGhostParent: this.getGhostParent, - groupName: 'selectColumn', - nonDragAreaSelector: '[ng-reflect-select-row-disabled=true]', - getChildPayload: this.getSourceTreeChildPayload.bind(this) - }; - this['sourceTreeContainer'] = smoothDnD(containerElement, containerOptions); - const children = containerElement.children; - // for (let i = 0; i < children.length; i++) { - // children[i].classList.add(constants.wrapperClass); - // } - - Array.prototype.forEach.call(children, (item: HTMLElement) => { - item.classList.add(constants.wrapperClass); - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-formatter-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-formatter-converter.ts deleted file mode 100644 index a5a986f08e391f66589480a0f339b3dd2e15483b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/grid-field-formatter-converter.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class GridFieldFormatterConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (!data) { - return ''; - } - if (data.type) { - const iterator = [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'boolean', value: '布尔-文本' }, - { key: 'boolean2', value: '布尔-图标' }, - { key: 'date', value: '日期' }, - { key: 'enum', value: '枚举' }, - { key: 'custom', value: '自定义' }, - { key: 'timeago', value: '相对时间' } - ]; - const item = iterator.find(i => i.key === data.type); - if (item) { - return item.value; - } - return JSON.stringify(data); - } else { - return JSON.stringify(data); - } - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-converter.ts deleted file mode 100644 index 46f282bac241e87ff632288c0f638885ef4eebed..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-converter.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class GroupFieldConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data && Array.isArray(data)) { - return '共 ' + data.length + ' 列'; - } else { - return data; - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.css deleted file mode 100644 index be5ce9caa9e3b405d728e22c7f6f50ad73cb44f5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.css +++ /dev/null @@ -1,7 +0,0 @@ -.gridFieldEditor .listPanel { - overflow: auto; -} - -.gridFieldEditor .listPanel .list-group-item { - padding: .35rem .625rem; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.html deleted file mode 100644 index 0d3618bdb8cf1418f70838dd1b0478da865c038d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.html +++ /dev/null @@ -1,59 +0,0 @@ -
-
-
- - 可选列 -
- - - - - - - {{rowData['name']}} [{{ rowData['bindingField'] }}] - - - - -
- - - -
-
-
- - -
-
-
- - 已选列 -
-
    -
  • - {{ col.name }} [{{ col.bindingField }}] -
  • -
- -
- -
-
-
- - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.spec.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.spec.ts deleted file mode 100644 index f98f8a75fa93cb533c8f6fdadfea473e3fd6cd91..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { GroupFieldEditorComponent } from './group-field-editor.component'; - -describe('GroupFieldEditorComponent', () => { - let component: GroupFieldEditorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ GroupFieldEditorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(GroupFieldEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.ts deleted file mode 100644 index ef8055a518fb4f100a71fe0a4660c1d18020abab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/editor/group-field-editor/group-field-editor.component.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, HostBinding } from '@angular/core'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { DesignViewModelService } from '@farris/designer-services'; - - -/** - * 列表、树表的列选择器:生成字段bindingPath的数组或字符串 - */ -@Component({ - selector: 'app-group-field-editor', - templateUrl: './group-field-editor.component.html', - styleUrls: ['./group-field-editor.component.css'] -}) -export class GroupFieldEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams: any = { viewModelId: '', selectNumber: null, resultType: 'array' }; - @ViewChild('gridFieldFooter') modalFooter: TemplateRef; - modalConfig = { - title: '列选择器', - width: 900, - height: 500, - showButtons: true - }; - - @ViewChild('tt') sourceTree: TreeTableComponent; - idField = 'id'; - @HostBinding('class') - cls = 'h-100 d-flex flex-column p-2 flex-fill'; - - // 左侧选中的列 - get leftCheckeds() { - if (this.sourceTree.selections) { - return this.sourceTree.selections.map(n => { - return n.data; - }); - } else { - return []; - } - } - - // 右侧显示列 - selectedColumns = []; - - // 右侧选中的列 - rightCheckeds: any = {}; - - // 左侧树 - sourceColumnsTreeData: TreeNode[] = []; - - // 打平关联字段后的列数据 - plainColumns: TreeNode[] = []; - - - constructor( - private dgVMService: DesignViewModelService, private notifyService: NotifyService) { } - - ngOnInit(): void { - if (!this.editorParams) { - return; - } - this.sourceColumnsTreeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams.viewModelId); - - this.getSelectedColumns(); - } - - /** - * 获取已选择的列 - */ - getSelectedColumns() { - if (!this.value) { - return []; - } - let fieldArray = []; - if (this.editorParams.resultType === 'string') { - fieldArray = this.value.split(','); - } else { - fieldArray = this.value; - } - - this.plainColumns = this.convertTreeNodes2PlainObject(this.sourceColumnsTreeData); - fieldArray.forEach(value => { - const element = this.plainColumns.find(e => e.data.bindingPath === value); - if (element) { - this.selectedColumns.push(element.data); - } - }); - - - } - - isChecked(col: any, direction: string): boolean { - if (direction === 'l') { - return this.leftCheckeds[col['id']] !== undefined; - } else { - return this.rightCheckeds[col['id']] !== undefined; - } - } - - /** - * 字段是否可勾选 - * 1、已选字段不可勾选 - * 2、主表的udt字段、关联字段不可勾选 - * @param col - */ - canChecked(col) { - if (col.type && col.type.fields && col.type.fields.length > 0) { - return false; - } - if (this.selectedColumns.length === 0) { - return true; - } - if (this.selectedColumns.findIndex(c => c['id'] === col['id']) === -1) { - return true; - } - - - } - - - - hasCheckeds(side: string) { - if (side === 'l') { - return this.leftCheckeds.length > 0; - } else { - return Object.keys(this.rightCheckeds).length > 0; - } - } - - rightColumnChecked(col) { - if (this.isChecked(col, 'r')) { - this.rightCheckeds = {}; - return; - } else { - this.rightCheckeds = {}; - this.rightCheckeds[col['id']] = col; - } - } - - //#region 左右移动 - - /** 右移 */ - // 1:若右边已有选中的分组列,如何处理,覆盖?还是提示先将右边的移到左边再进行操作? - moveToRight() { - if (!this.hasCheckeds('l')) { - this.notifyService.warning('请选择要移动的列。'); - return; - } - - if (this.editorParams.selectNumber && this.leftCheckeds.length > this.editorParams.selectNumber) { - this.notifyService.warning('最多允许选择' + this.editorParams.selectNumber + '列!'); - return; - } - - if (this.editorParams.selectNumber && this.selectedColumns.length + this.leftCheckeds.length > this.editorParams.selectNumber) { - this.notifyService.warning('最多允许选择' + this.editorParams.selectNumber + '列,请先移除部分已选列!'); - return; - } - // this.selectedColumns = []; - this.leftCheckeds.forEach(col => { - if (this.selectedColumns.indexOf(col) === -1) { - this.selectedColumns.push(col); - } - }); - this.clearSelections(); - } - - private clearSelections() { - this.sourceTree.selectedRow = undefined; - this.sourceTree.clearAll(); - } - - /** 左移 */ - moveToLeft() { - if (!this.hasCheckeds('r')) { - this.notifyService.warning('请选择要取消的列。'); - return; - } - if (this.hasCheckeds('r')) { - this.selectedColumns = this.selectedColumns.filter(v => { - return Object.values(this.rightCheckeds).indexOf(v) === -1; - }); - - this.rightCheckeds = {}; - } - } - - - private convertTreeNodes2PlainObject(nodes: TreeNode[], r: any[] = []): TreeNode[] { - if (nodes) { - nodes.forEach(n => { - r.push(n); - if (n.children) { - this.convertTreeNodes2PlainObject(n.children, r); - } - }); - } - - return r; - } - - getTreeNodeByID(fieldId: string) { - return this.plainColumns.find(column => column.data.id === fieldId); - } - /** - * 确定 - */ - clickConfirm() { - const tmp = []; - - for (const col of this.selectedColumns) { - if (col.bindingPath) { - tmp.push(col.bindingPath); - } else { - this.notifyService.error('选定的字段没有bindingPath属性,请先更新表单schema再选择列。'); - return; - } - } - - // 区分返回的数据类型 - if (this.editorParams.resultType === 'string') { - this.submitModal.emit({ value: tmp.toString() }); - } else { - this.submitModal.emit({ value: tmp }); - } - } - - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/nocode-collection-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/nocode-collection-property-config.ts deleted file mode 100644 index 82d37ea6dd586979e1189f0ed449bc35b502ea07..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/property/nocode-collection-property-config.ts +++ /dev/null @@ -1,271 +0,0 @@ -import { ExpressionProp } from '../../../input/common/property/expression/expression-property-config'; -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { EventEditorService, WebCmdService, DomService, SchemaService, FormBasicService, RefreshFormService, UniformEditorDataUtil, StateMachineService, DesignViewModelService } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { NotifyService } from '@farris/ui-notify'; -import { DgControl } from '../../../../utils/dg-control'; -import { NoCodeNumericBoxProp } from '../../../input/numeric-box/property/nocode-property-config'; -import { NoCodeNumberRangeProp } from '../../../input/number-range/property/nocode-property-config'; -import { NoCodeTimePickerProp } from '../../../input/time-picker/property/nocode-property-config'; -import { NoCodeCheckBoxProp } from '../../../input/checkbox/property/nocode-property-config'; -import { InputGroupProp } from '../../../input/input-group/property/property-config'; -import { LanguageTextBoxProp } from '../../../input/language-text-box/property/property-config'; -import { NoCodeTextBoxProp } from '../../../input/text-box/property/nocode-property-config'; -import { NoCodeSwitchFieldProp } from '../../../input/switch/property/nocode-property-config'; -import { NoCodeMultiTextBoxProp } from '../../../input/multi-text-box/property/nocode-property-config'; -import { EnumFieldProp } from '../../../input/select/property/property-config'; -import { NoCodeDateBoxProp } from '../../../input/date-box/property/nocode-property-config'; -// import { NoCodeLookupEditProp } from '../../../input/lookup-edit/property/nocode-property-config'; -// import { PersonnelSelectorProp } from '../../../input/personnel-selector/property/property-config'; -import { AvatarProp } from '../../../input/avatar/property/property-config'; -import { ImageProp } from '../../../input/image/property/property-config'; -import { NoCodeCheckGroupProp } from '../../../input/check-group/property/nocode-property-config'; -import { NoCodeRadioGroupProp } from '../../../input/radio-group/property/nocode-property-config'; -import { NoCodeRichTextBoxProp } from '../../../input/rich-text-box/property/nocode-property-config'; -import { NoCodeTagsProp } from '../../../input/tags/property/nocode-property-config'; -// import { NoCodeOrganizationSelectorProp } from '../../../input/organization-selector/property/nocode-property-config'; -import { MessagerService } from '@farris/ui-messager'; -// import { EmployeeSelectorProp } from '../../../input/employee-selector/property/property-config'; -// import { AdminOrganizationSelectorProp } from '../../../input/admin-org-selector/property/property-config'; -// import { ExtIntergrationProp } from '../../../input/extintergration-input/property/property-config'; -import { NoCodeCitySelectorProp } from '../../../input/city-selector/property/nocode-property-config'; -import { ImageUploadProp } from '../../../input/image-upload/property/property-config'; -// import { NoCodeOaRelationProp } from '../../../input/oa-relation/property/nocode-property-config'; - -// TODO: 这里应该是对CollectionProp的继承,否则后面添加任何低零代码的共同特性,都需要加两遍。 -export class NoCodeCollectionProp extends ExpressionProp { - public formBasicService: FormBasicService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public notifyService: NotifyService; - public schemaService: SchemaService; - public webCmdService: WebCmdService; - public eventEditorService: EventEditorService; - public viewModelId: string; - public componentId: string; - public msgService: MessagerService; - public stateMachineService: StateMachineService; - public dgVMService: DesignViewModelService; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost.getService('DomService')); - this.viewModelId = viewModelId; - this.componentId = componentId; - this.webCmdService = serviceHost.getService('WebCmdService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.domService = serviceHost.getService('DomService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.schemaService = serviceHost.getService('SchemaService'); - this.stateMachineService = serviceHost.getService('StateMachineService'); - const injector = serviceHost.getService('Injector'); - this.notifyService = injector.get(NotifyService); - this.msgService = injector.get(MessagerService); - } - - - - getCommonAppearanceProperties(): PropertyEntity[] { - - return [ - // { - // propertyID: 'appearance', - // propertyName: '样式', - // propertyType: 'cascade', - // cascadeConfig: [ - // { - // propertyID: 'class', - // propertyName: 'class样式', - // propertyType: 'string', - // description: '组件的CSS样式' - // }, - // { - // propertyID: 'style', - // propertyName: 'style样式', - // propertyType: 'modal', - // description: '组件的内容样式', - // editor: StyleEditorComponent, - // showClearButton: true - // } - // ] - // }, - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - } - ]; - - } - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - } - - - /** - * 列编辑器属性 - * @param propertyData 列属性值 - * @param viewModelId viewModelId - */ - getNoCodeFieldEditorProp(propertyData: any, showPosition = 'gridFieldEditor', isSimpleTable = false) { - let inputPropInstance; - switch (propertyData.editor.type) { - case DgControl.NumericBox.type: { - inputPropInstance = new NoCodeNumericBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.NumberRange.type: { - inputPropInstance = new NoCodeNumberRangeProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.TimePicker.type: { - inputPropInstance = new NoCodeTimePickerProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.CheckBox.type: { - inputPropInstance = new NoCodeCheckBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.InputGroup.type: { - inputPropInstance = new InputGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.LanguageTextBox.type: { - inputPropInstance = new LanguageTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.MultiTextBox.type: { - inputPropInstance = new NoCodeMultiTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.SwitchField.type: { - inputPropInstance = new NoCodeSwitchFieldProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.TextBox.type: { - inputPropInstance = new NoCodeTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.EnumField.type: { - inputPropInstance = new EnumFieldProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.DateBox.type: { - inputPropInstance = new NoCodeDateBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - // case DgControl.LookupEdit.type: { - // inputPropInstance = new NoCodeLookupEditProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.PersonnelSelector.type: { - // inputPropInstance = new PersonnelSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - case DgControl.Avatar.type: { - inputPropInstance = new AvatarProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.CheckGroup.type: { - inputPropInstance = new NoCodeCheckGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.Image.type: { - inputPropInstance = new ImageProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RadioGroup.type: { - inputPropInstance = new NoCodeRadioGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RadioGroup.type: { - inputPropInstance = new NoCodeRadioGroupProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.RichTextBox.type: { - inputPropInstance = new NoCodeRichTextBoxProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.Tags.type: { - inputPropInstance = new NoCodeTagsProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - // case DgControl.OrganizationSelector.type: { - // inputPropInstance = new NoCodeOrganizationSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.EmployeeSelector.type: { - // inputPropInstance = new EmployeeSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.AdminOrganizationSelector.type: { - // inputPropInstance = new AdminOrganizationSelectorProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.ExtIntergration.type: { - // inputPropInstance = new ExtIntergrationProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - // case DgControl.OaRelation.type: { - // inputPropInstance = new NoCodeOaRelationProp(this.serviceHost, this.viewModelId, this.componentId); - // break; - // } - case DgControl.CitySelector.type: { - inputPropInstance = new NoCodeCitySelectorProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - case DgControl.ImageUpload.type: { - inputPropInstance = new ImageUploadProp(this.serviceHost, this.viewModelId, this.componentId); - break; - } - } - - if (inputPropInstance) { - if (showPosition === 'gridFieldEditor' && inputPropInstance.getGridFieldEdtiorPropConfig) { - return inputPropInstance.getGridFieldEdtiorPropConfig(propertyData, this.viewModelId); - } - if (showPosition === 'tableTdEditor' && inputPropInstance.getTableTdEdtiorPropConfig) { - return inputPropInstance.getTableTdEdtiorPropConfig(propertyData, this.viewModelId, isSimpleTable); - } - } - - return []; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/form.ts deleted file mode 100644 index 70c25f10a518f472f7a051957bd0d5c2bf29c13a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/form.ts +++ /dev/null @@ -1,24 +0,0 @@ - -export default (ctx: any) => { - const require = ctx.component.editor && ctx.component.editor.require ? '*' : ''; - - // 绑定字段失效提示信息 - const inValidBindingTips = getInValidBindingTipsAfterLabel(ctx); - const labelTitle = inValidBindingTips ? '绑定信息已失效,请手动移除列' : ''; - const labelColor = inValidBindingTips ? ` style='color:red;'` : ''; - - const fieldWidth = ctx.component.size && ctx.component.size.width ? ctx.component.size.width : 120; - return ` -
-
${inValidBindingTips}${require} ${ctx.component.caption}
-
`; -}; - -/** 绑定字段失效提示,用于卡片内的输入控件 */ -function getInValidBindingTipsAfterLabel(ctx: any) { - if (ctx.isValidBinding) { - return ''; - } - return ``; -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/index.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid-field/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/form.ts deleted file mode 100644 index f8996361198eed297fcc2f5a9c278590b3567503..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/form.ts +++ /dev/null @@ -1,85 +0,0 @@ - -export default (ctx: any) => { - - // 列表模板 - const gridTpl = getGridTpl(ctx); - - // 卡片式编辑相关模板 - const cardEditTpl = getCardEditTpl(ctx); - - return ` - ${gridTpl} - ${cardEditTpl} - `; -}; - - -/** - * 组装列表模板 - */ -function getGridTpl(ctx) { - - const headers = ctx.gridFieldInstances.map((gridFieldInstance) => gridFieldInstance.render()); - const minWith = getDataGridHeaderMinWidth(ctx.component.fields || []); - const displayNoneCls = ctx.isEnableCardEdit && ctx.component.currentViewShowType !== 'grid' ? 'none !important' : ''; - - return ` -
-
- ${headers.join('')} -
- -
- -
-
暂无数据
-
- -
-`; -} - -function getDataGridHeaderMinWidth(fields: any[]) { - let minWidth = 0; - fields.forEach(field => { - let fieldWidth = 120; - if (field && field.size && field.size.width) { - fieldWidth = field.size.width; - } - minWidth += fieldWidth; - }) - - return minWidth; -} -/** - * 组装卡片式编辑需要的切换按钮和卡片视图 - */ -function getCardEditTpl(ctx: any) { - - if (!ctx.isEnableCardEdit) { - return ''; - } - - let iconPanel = ''; - ctx.toolbarIconData.forEach(iconItem => { - const activeCls = iconItem.type === ctx.component.currentViewShowType ? 'tile-btn-active' : ''; - - iconPanel += ` -
- -
- `; - }); - - const displayNoneCls = ctx.component.currentViewShowType === 'grid' ? 'none !important' : 'flex'; - return ` -
-
-
- ${iconPanel} -
-
-
-
${ctx.cardEditTemplates}
- `; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/index.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/common/templates/grid/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/component/fd-datagrid-field.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/component/fd-datagrid-field.ts deleted file mode 100644 index b061272618a77e35befa7f16425810004465e913..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/component/fd-datagrid-field.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { GridFieldSchema } from '../../../schema/datagrid'; -import { GridFieldProp } from '../property/property-config'; -import { NoCodeGridFieldProp } from '../property/nocode-property-config'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { DesignViewModelService, DesignerEnvType, DomService, FormSchemaEntityField$Type, FormBasicService, DgControl } from '@farris/designer-services'; -import FdInputGroupComponent from '../../../../../../components/input/input-group/component/fd-input-group'; - - -export default class FdDataGridFieldComponent extends FarrisDesignBaseComponent { - envType: DesignerEnvType; - /** 单列所属的父级DataGrid实例 */ - public parentGridInstance: FarrisDesignBaseComponent; - - public focusedFieldId: string; - - /** 列的绑定信息是否有效 */ - isValidBinding = true; - - constructor(component: any, options: any, parentGridInstance: FarrisDesignBaseComponent) { - super(component, options); - this.parentGridInstance = parentGridInstance; - - this.viewModelId = this.parentGridInstance.viewModelId; - this.componentId = this.parentGridInstance.componentId; - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - - this.adaptOldControlSchema(); - } - getDefaultSchema(): any { - return GridFieldSchema; - } - - render(): any { - this.init(); - this.checkBindingFormFieldValidation(); - - return this.renderTemplate('GridField', { - component: this.component, - focusedFieldId: this.focusedFieldId, - className: this.getSelectedClassName(), - isValidBinding: this.isValidBinding - }); - } - - attach(element: HTMLElement): Promise { - this.element = element; - const superAttach = super.attach(element); - - this.addGridFieldClickEvent(); - - return superAttach; - } - /** - * 设置列、列编辑器的展示名称和路径,用于交互面板已绑定事件窗口 - */ - setComponentBasicInfoMap() { - const domService = this.options.designerHost.getService('DomService') as DomService; - - let parentPath = '表格'; - - // 先取父级表格上的路径信息 - const dataGridBasicInfo = domService.controlBasicInfoMap.get(this.parentGridInstance.id); - if (dataGridBasicInfo && dataGridBasicInfo.parentPathName) { - parentPath = dataGridBasicInfo.parentPathName; - } - - // 列的展示名称和路径 - domService.controlBasicInfoMap.set(this.component.id, { - showName: this.component.caption, - parentPathName: `${parentPath} > ${this.component.caption}` - }); - - // 列编辑器的展示名称及路径 - if (this.component.editor) { - domService.controlBasicInfoMap.set(this.component.editor.id, { - showName: this.component.caption, - parentPathName: `${parentPath} > ${this.component.caption}` - }); - - // 智能输入框内部嵌套的弹窗按钮路径信息 - if (this.component.editor.type === DgControl.InputGroup.type) { - const inputGroupControl = new FdInputGroupComponent(this.component.editor, this.options); - inputGroupControl.setComponentExtendInfoMap(); - } - } - - - } - /** - * 增加单列的点击事件,用于触发属性面板 - */ - private addGridFieldClickEvent() { - this.addEventListener(this.element, 'click', (event) => { - event.stopPropagation(); - event.preventDefault(); - - // 选中当前列 - this.focusGridField(); - - // 手动触发点击组件事件 展示属性面板 - if (this.parentGridInstance) { - this.parentGridInstance.emit('componentClicked', { componentInstance: this }); - } - }); - } - - - /** - * 选中单列状态 - * @param itemElement 按钮元素 - */ - private focusGridField() { - const currentSelectedElements = document.getElementsByClassName('dgComponentSelected'); - for (const ele of Array.from(currentSelectedElements)) { - ele.classList.remove('dgComponentSelected'); - } - this.element.classList.add('dgComponentSelected'); - - this.focusedFieldId = this.component.id; - } - - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeGridFieldProp = new NoCodeGridFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component, this.parentGridInstance.component); - return propertyConfig; - } else { - const prop: GridFieldProp = new GridFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component, this.parentGridInstance.component); - return propertyConfig; - } - } - - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const dynamicPropertyIDs = ['caption', 'editor.require']; - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.redraw(); - } - - // 列编辑器内切换控件类型后,需要重新组装属性面板配置数据 - if (propertyPath + changeObject.propertyID === 'editor.type' && this.parentGridInstance) { - this.parentGridInstance.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true }); - return; - } - - // 切换绑定后,列编辑器分类下的属性需要重构 - if (changeObject.propertyID === 'binding' && this.component.editor && this.parentGridInstance) { - this.parentGridInstance.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true }); - return; - } - - // 绑定无效字段的列,切换绑定后,需要重绘,并重新组装属性面板配置数据 - if (!this.isValidBinding && changeObject.propertyID === 'binding' && this.parentGridInstance) { - this.redraw(); - this.parentGridInstance.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true }); - return; - } - // 修改列宽度后,需要触发整个datagrid的重绘 - if (propertyPath + changeObject.propertyID === 'size.width' && this.parentGridInstance) { - this.parentGridInstance.redraw(); - return; - } - } - - /** - * 获取当前列的选中样式,用于在redraw时,保持选中样式 - */ - getSelectedClassName() { - let className = ''; - - // 用于重新渲染组件时,保持选中样式 - if (this.element && this.element.className && this.element.className.includes('dgComponentSelected')) { - className += 'dgComponentSelected'; - } - return className; - } - - private adaptOldControlSchema() { - - if (['date', 'string'].includes(this.component.dataType) && !this.component.hasOwnProperty('localizationType')) { - this.component.localizationType = 'Date'; - } - if ('datetime' === this.component.dataType && !this.component.hasOwnProperty('localizationType')) { - this.component.localizationType = 'DateTime'; - } - - // 列编辑器内部的title要与外部一致 - if (this.component.editor && this.component.editor.title !== this.component.caption) { - this.component.editor.title = this.component.caption; - } - } - - checkBindingFormFieldValidation() { - this.isValidBinding = true; - const dgVMService = this.options.designerHost.getService('DesignViewModelService') as DesignViewModelService; - const dgViewModel = dgVMService.getDgViewModel(this.viewModelId); - const dgVMField = dgViewModel.fields.find(f => f.id === this.component.binding.field); - - // schema中已移除的字段 - if (!dgVMField) { - this.isValidBinding = false; - } - // 在schema中类型已发生变更的字段,例如由普通文本字段改成了关联字段 - if (dgVMField.$type !== FormSchemaEntityField$Type.SimpleField) { - this.isValidBinding = false; - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/nocode-property-config.ts deleted file mode 100644 index e7e7cbcd7aa2324054d3029641bd5e25b3132582..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/nocode-property-config.ts +++ /dev/null @@ -1,1289 +0,0 @@ -import { ElementPropertyConfig, KeyMap, PropertyEntity } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { - BindingEditorComponent, BindingEditorConverter, CodeEditorComponent, - ItemCollectionConverter, ItemCollectionEditorComponent, JavaScriptBooleanConverter, JavaScriptBooleanEditorComponent, - StyleEditorComponent -} from '@farris/designer-devkit'; -import { GridFieldDataType } from '@farris/designer-services'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { NoCodeCollectionProp } from '../../../../common/property/nocode-collection-property-config'; -import { FieldStyleConfigComponent } from '../../../../common/property/editor/field-style-config/field-style-config.component'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; -// import { EntityFilterConditionComponent } from '../../../../common/property/editor/filter-condition/entity-filter-condition.component' -// import { EntityFilterConditionConverter } from '../../../../common/property/editor/filter-condition/entity-filter-condition-converter' - -export class NoCodeGridFieldProp extends NoCodeCollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any, gridData: any): ElementPropertyConfig[] { - const viewModelId = this.viewModelId; - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId, gridData); - this.propertyConfig.push(basicPropConfig); - - // 快捷配置属性 - const fieldStyleConfig = this.getFieldStyleProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(fieldStyleConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(behaviorPropConfig); - - if (propertyData.controlSource === 'Farris') { - // 分组合计属性 - const groypAggregateProperties = this.getGroupAggregateProperties(propertyData); - this.propertyConfig.push(groypAggregateProperties); - - // 汇总合计属性 - const aggregateProperties = this.getAggregateProperties(propertyData); - this.propertyConfig.push(aggregateProperties); - } - - // 可编辑的列表: - if (gridData.fieldEditable && propertyData.editor) { - // 列编辑器属性 - const editorProp = this.getNoCodeFieldEditorProp(propertyData); - - if (editorProp.length > 0) { - this.propertyConfig = this.propertyConfig.concat(editorProp); - } - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData.editor, viewModelId, 'gridFieldEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - } else { - // 事件属性(标签超链,可编辑列表的标签超链属性与编辑器合并了,不再单独分类) - // const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId); - // this.propertyConfig.push(eventPropConfig); - } - - - return this.propertyConfig; - } - - private getBasicPropConfig(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - // { - // propertyID: 'id', - // propertyName: '标识', - // propertyType: 'string', - // description: '组件的id', - // readonly: true - // }, - { - propertyID: 'caption', - propertyName: '标题', - propertyType: 'string', - description: '列标题名称' - } - ] - }; - } - - private getFieldStyleProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - return { - categoryId: 'fieldStyleShortcutConfig', - categoryName: '快捷配置', - hide: !['date', 'datetime', 'enum', 'number'].includes(propertyData.dataType), - properties: [ - { - propertyID: 'fieldStyleConfig', - propertyType: 'custom', - editor: FieldStyleConfigComponent, - editorParams: { - propertyData, - needClearConfig: false - }, - description: '提供常用的日期、数字展示格式,提供带图标的枚举数据模板', - refreshPanelAfterChanged: true - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'fieldStyleConfig': { - // 数字、日期重置格式化属性 - if (changeObject.propertyValue && changeObject.propertyValue.formatter) { - const formatterValue = changeObject.propertyValue.formatter; - Object.assign(propertyData.formatter, formatterValue); - } - // 枚举重置列模板属性 - if (changeObject.propertyValue) { - propertyData.colTemplate = changeObject.propertyValue.colTemplate || ''; - - propertyData.iconConfigForEnumData = changeObject.propertyValue.enumIconConfig; - - const fieldStyleConfig = this.properties.find((p: PropertyEntity) => p.propertyID === 'fieldStyleConfig'); - fieldStyleConfig.editorParams.propertyData = propertyData; - fieldStyleConfig.editorParams.needClearConfig = false; - } - delete propertyData.fieldStyleConfig; - - break; - } - } - } - }; - } - - private getAppearanceProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - const appearanceProperties: PropertyEntity[] = [ - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - } - ] - }, - // { - // propertyID: 'linkedLabelEnabled', - // propertyName: '启用标签超链接', - // propertyType: 'boolean', - // description: '是否启用标签超链接', - // }, - // { - // propertyID: 'showTips', - // propertyName: '显示单元格提示', - // propertyType: 'boolean', - // description: '是否显示单元格提示', - // visible: propertyData.controlSource === 'Farris', - // defaultValue: false - // }, - // { - // propertyID: 'tipContent', - // propertyName: '单元格提示内容', - // propertyType: 'modal', - // description: '单元格提示内容设置', - // editor: CodeEditorComponent, - // visible: propertyData.showTips, - // editorParams: { - // language: 'javascript', - // exampleCode: - // '(value, rowData, column) => {\r\n return value + \'的提示\';\r\n}\r\n\r\n\r\n ' + - // '注:\r\n value:单元格数据 \r\n rowData:行数据\r\n column:列数据' - // } - // }, - { - propertyID: 'captionTipContent', - propertyName: '标签提示内容', - propertyType: 'string', - description: '标签提示内容设置', - notAllowedChars: [/[\[\"\'\‘\“\]\*,]/g] //[ \"\'‘“]* - }, - { - propertyID: 'tipMode', - propertyName: '提示模式', - propertyType: 'select', - description: '提示模式选择', - iterator: [ - { key: 'allways', value: '鼠标滑过提示' }, - { key: 'auto', value: '宽度不足时鼠标滑过提示' } - ], - visible: propertyData.showTips - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'boolean', value: '布尔-文本' }, - { key: 'boolean2', value: '布尔-图标' }, - { key: 'date', value: '日期' }, - { key: 'enum', value: '枚举' }, - { key: 'custom', value: '自定义' } - ], - refreshPanelAfterChanged: true - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - visible: propertyData.formatter && propertyData.formatter.type === 'custom', - group: 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - defaultValue: 0, - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'trueText', - propertyName: 'true文本', - propertyType: 'string', - description: 'true文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'falseText', - propertyName: 'false文本', - propertyType: 'string', - description: 'false文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'dateFormat', - propertyName: '日期格式', - propertyType: 'string', - description: '日期格式设置', - visible: propertyData.formatter && propertyData.formatter.type === 'date', - group: 'date', - refreshPanelAfterChanged: true - } - ], - // visible: propertyData.controlSource === 'Farris' - visible: false - }, - { - propertyID: 'colTemplate', - propertyName: '列模板', - propertyType: 'modal', - description: '列模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html', - exampleCode: '' - }, - // visible: propertyData.controlSource === 'Farris', - visible: false, - refreshPanelAfterChanged: true - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n \'color\': \'red\',\r\n' + - ' \'font-weight\': 800\r\n }\r\n };\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n ' + - 'rowData:行数据 \r\n rowIndex:当前行索引' - }, - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式选择', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }], - visible: propertyData.controlSource === 'Farris' - }, { - propertyID: 'vAlign', - propertyName: '数据垂直对齐方式', - propertyType: 'select', - description: '数据垂直对齐方式选择', - defaultValue: 'middle', - iterator: [{ key: 'top', value: '靠上' }, { key: 'middle', value: '居中' }, { key: 'bottom', value: '靠下' }], - visible: propertyData.controlSource === 'Farris' - }, { - propertyID: 'hAlign', - propertyName: '表头对齐方式', - propertyType: 'select', - description: '表头对齐方式选择', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }], - visible: propertyData.controlSource === 'Farris' - }, - // { - // propertyID: 'headerStyler', - // propertyName: '表头样式', - // propertyType: 'modal', - // description: '表头样式设置', - // editor: StyleEditorComponent, - // showClearButton: true, - // visible: propertyData.controlSource === 'Farris' - // } - ]; - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'linkedLabelEnabled': { - const linkedLabelClick = this.properties.find((p: PropertyEntity) => p.propertyID === 'linkedLabelClick'); - if (linkedLabelClick) { - linkedLabelClick.visible = changeObject.propertyValue; - } - break; - } - case 'type': { - // 列格式化属性 - if (changeObject.parentPropertyID === 'formatter') { - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - if (p.group === 'boolean') { - p.visible = changeObject.propertyValue.indexOf(p.group) > -1; - } else { - p.visible = p.group === changeObject.propertyValue; - } - }); - } - - propertyData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propertyData.formatter); - - // 联动修改列样式的快捷配置 - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - break; - } - case 'showTips': { - const tipContent = this.properties.find(p => p.propertyID === 'tipContent'); - if (tipContent) { - tipContent.visible = changeObject.propertyValue; - } - const tipMode = this.properties.find(p => p.propertyID === 'tipMode'); - if (tipMode) { - tipMode.visible = changeObject.propertyValue; - } - break; - } - case 'colTemplate': { - // 联动修改列样式的快捷配置 - self.clearIconConfigAfterColTemplateChanged(propertyData, changeObject, parameters); - - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - fieldStyleProp.editorParams.needClearConfig = true; - } - } - - break; - } - default: { - // 联动修改列样式的快捷配置 - if (changeObject.parentPropertyID === 'formatter') { - - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - - private getBehaviorProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - - const behaviorProperties = [ - { - propertyID: 'binding', - propertyName: '绑定', - propertyType: 'modal', - description: '绑定的表单字段', - visible: false, - editor: BindingEditorComponent, - editorParams: { - viewModelId, - componentId: propertyData.componentId, - controlType: propertyData.type, - allowedBindingType: 'Form' - }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'modal', - description: '运行时组件是否可见', - ...this.getVisiblePropertyConfig(propertyData, viewModelId) - }, - { - propertyID: 'readonly', - propertyName: '只读', - description: '是否只读', - ...this.getReadonlyPropertyConfig(propertyData, viewModelId) - }, - { - propertyID: 'multiLanguage', - propertyName: '启用多语字段', - propertyType: 'boolean', - description: '是否启用多语字段', - readonly: true, - visible: false - }, - { - propertyID: 'languages', - propertyName: '语言列表', - propertyType: 'modal', - description: '语言列表设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'code', title: '编号', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '名称', editor: { type: EditorTypes.TEXTBOX } }], - requiredFields: ['code', 'name'], - uniqueFields: ['code', 'name'], - modalTitle: '语言编辑器', - canEmpty: false - }, - converter: new ItemCollectionConverter(), - visible: propertyData.multiLanguage - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: this.checkEnumDataVisible(propertyData) - }, - - { - propertyID: 'frozen', - propertyName: '固定列', - propertyType: propertyData.controlSource === 'Farris' ? 'select' : 'boolean', - description: '固定列选择', - iterator: [ - { key: 'none', value: '不固定' }, - { key: 'left', value: '固定左侧' }, - { key: 'right', value: '固定右侧' } - ], - readonly: propertyData.controlSource === 'Farris' && (gridData.groupable || gridData.enableHeaderGroup) - }, - { - propertyID: 'sortable', - propertyName: '允许排序', - propertyType: 'select', - description: '是否允许排序', - iterator: [{ key: false, value: '是' },{ key: true, value: '否' }] - }, - { - propertyID: 'enableFilter', - propertyName: '允许过滤', - propertyType: 'select', - description: '是否允许过滤', - defaultValue: false, - readonly: gridData.filterType === 'none', - visible: propertyData.controlSource === 'Farris', - iterator: [{ key: false, value: '是' },{ key: true, value: '否' }] - }, - { - propertyID: 'aggregate', - propertyName: '汇总合计', - propertyType: 'cascade', - visible: propertyData.controlSource === 'Kendo', - cascadeConfig: [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }, { key: 'count', value: '计数' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行模版', - propertyType: 'string', - description: '合计行模版设置', - } - ], - }, - // { - // propertyID: 'localization', - // propertyName: '启用数据国际化', - // propertyType: 'boolean', - // description: '是否启用数据国际化', - // visible: this.checkLocalizationVisible(propertyData) - // }, - // { - // propertyID: 'localizationType', - // propertyName: '数据国际化类型', - // propertyType: 'select', - // description: '数据国际化类型选择', - // visible: this.checkLocalizationVisible(propertyData) && propertyData.localization, - // controlSource: 'Farris', - // iterator: this.getLocalizationTypes(propertyData) - // }, - { - propertyID: 'allowGrouping', - propertyName: '允许分组', - propertyType: 'select', - description: '是否允许分组', - visible: propertyData.controlSource === 'Farris', - iterator: [{ key: false, value: '是' },{ key: true, value: '否' }] - }, - // { - // propertyID: 'conditions', - // propertyName: '过滤条件', - // propertyType: 'modal', - // description: '列表过滤条件设置', - // editor: EntityFilterConditionComponent, - // converter: new EntityFilterConditionConverter(), - // editorParams: { - // viewModelId - // }, - // visible: false - // } - ]; - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - - case 'frozen': { - if (propertyData.controlSource === 'Farris') { - if (changeObject.propertyValue !== 'none') { - self.notifyService.warning('请确保列表未启用分组、未启用多表头!'); - } - } - break; - } - case 'enumData': { - if (enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.idField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - if (changeObject.propertyValue && changeObject.propertyValue.length) { - propertyData.formatter.type = 'enum'; - } else { - if (['string', 'text'].includes(propertyData.dataType)) { - propertyData.formatter.type = 'none'; - } - } - break; - } - case 'localization': { - const localizationType = this.properties.find(p => p.propertyID === 'localizationType'); - if (localizationType) { - localizationType.visible = self.checkLocalizationVisible(propertyData) && changeObject.propertyValue; - localizationType.iterator = self.getLocalizationTypes(propertyData); - } - break; - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'linkedLabelClick', - name: '标签超链事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService,formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService,formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - - // 联动修改【启用标签超链接】属性 - propertyData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - } - }; - } - - /** - * 枚举类型字段,在变更列模板后需要重置图标配置数据 - * @param propertyData 列数据 - * @param changeObject 属性变更集 - * @param parameters 变更参数 - */ - private clearIconConfigAfterColTemplateChanged(propertyData: any, changeObject: FormPropertyChangeObject, parameters: any) { - if (propertyData.dataType !== 'enum' || !propertyData.iconConfigForEnumData) { - return; - } - - if (changeObject.propertyValue !== parameters.oldValue) { - propertyData.iconConfigForEnumData = null; - this.notifyService.warning('变更列模板后,自动重置列样式快捷配置!'); - } - } - /** - * Farris 列 分组合计属性 - * @param propertyData 属性值 - */ - private getGroupAggregateProperties(propertyData: any) { - const self = this; - const groupProperties = [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行文本', - propertyType: 'string', - description: '合计行文本设置', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type === 'none' - }, - { - propertyID: 'align', - propertyName: '对齐方式', - propertyType: 'select', - description: '对齐方式选择', - iterator: [{ key: 'left', value: '靠左' }, { key: 'center', value: '居中' }, { key: 'right', value: '靠右' }], - defaultValue: 'left' - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - visible: false, - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '\r\n(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n' + - ' \'color\': \'red\',\r\n \'font-weight\': 800\r\n }\r\n };' + - '\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n rowIndex:当前行索引' - } - }, - { - propertyID: 'formatter', - propertyName: '数据格式化', - propertyType: 'cascade', - description: '数据格式化设置', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none', - cascadeConfig: [{ - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'custom', value: '自定义方法' }] - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - group: 'custom', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - group: 'number', - defaultValue: 0, - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }] - } - ]; - return { - categoryId: 'groupAggregate', - categoryName: '分组合计', - properties: groupProperties, - propertyData: propertyData.groupAggregate, - enableCascade: true, - parentPropertyID: 'groupAggregate', - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - - switch (changeObject.propertyID) { - case 'type': { - - if (!changeObject.parentPropertyID) { - // 切换合计类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter) { - formatter.visible = changeObject.propertyValue !== 'none'; - } - const aggrTemplate = this.properties.find(p => p.propertyID === 'aggrTemplate'); - if (aggrTemplate) { - aggrTemplate.visible = changeObject.propertyValue === 'none'; - } - - } else if (changeObject.parentPropertyID === 'formatter') { - // 切换格式化类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - p.visible = p.group === changeObject.propertyValue; - }); - } - propData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propData.formatter); - } - - break; - } - } - - - - } - }; - } - - /** - * 汇总合计属性 - * @param propertyData 属性值 - */ - private getAggregateProperties(propertyData: any) { - const self = this; - const aggregateProperties = [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }, { key: 'count', value: '计数' }, - { key: 'max', value: '最大值' }, { key: 'min', value: '最小值' }, { key: 'average', value: '平均值' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行文本', - propertyType: 'string', - description: '合计行文本设置', - visible: propertyData.aggregate && propertyData.aggregate.type === 'none' - }, - { - propertyID: 'align', - propertyName: '对齐方式', - propertyType: 'select', - description: '对齐方式选择', - iterator: [{ key: 'left', value: '靠左' }, { key: 'center', value: '居中' }, { key: 'right', value: '靠右' }], - defaultValue: 'left' - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '\r\n(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n' + - ' \'color\': \'red\',\r\n \'font-weight\': 800\r\n }\r\n };' + - '\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n rowIndex:当前行索引' - } - }, - { - propertyID: 'formatter', - propertyName: '数据格式化', - propertyType: 'cascade', - description: '数据格式化设置', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none', - cascadeConfig: [{ - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'custom', value: '自定义方法' }] - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - group: 'custom', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - group: 'number', - defaultValue: 0, - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }] - } - ]; - return { - categoryId: 'GridAggregate', - categoryName: '汇总合计', - properties: aggregateProperties, - propertyData: propertyData.aggregate, - enableCascade: true, - parentPropertyID: 'aggregate', - setPropertyRelates(changeObject, propData, parameters) { - if (changeObject.propertyID !== 'type') { - return; - } - if (!changeObject.parentPropertyID) { - // 切换合计类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter) { - formatter.visible = changeObject.propertyValue !== 'none'; - } - const aggrTemplate = this.properties.find(p => p.propertyID === 'aggrTemplate'); - if (aggrTemplate) { - aggrTemplate.visible = changeObject.propertyValue === 'none'; - } - - } else if (changeObject.parentPropertyID === 'formatter') { - // 切换格式化类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - p.visible = p.group === changeObject.propertyValue; - }); - } - propData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propData.formatter); - } - } - }; - } - - /** - * farris datagrid 列 设置格式默认值 - * @param type 格式化类型 - * @param col 列格式值 - */ - private setDataGridFormatterDefaults(type: string, col: any) { - switch (type) { - case 'number': { - col = Object.assign({ - precision: 0, - thousand: ',', - prefix: '', - suffix: '', - decimal: '.' - }, col); - break; - } - case 'boolean': { - col = Object.assign(col, { - trueText: '是', - falseText: '否' - }); - break; - } - case 'boolean2': { - col = Object.assign(col, { - trueText: '', - falseText: '' - }); - break; - } - case 'date': { - col = Object.assign({ - dateFormat: 'yyyy-MM-dd', - }, col); - break; - } - case 'none': { - col = { - type: 'none' - }; - } - } - return col; - } - - - /** - * 设置列表列和编辑器的属性联动(目前树表没有列编辑器) - * @param propertyData 属性值 - * @param changeObject 变更集 - */ - private setGridFieldEditorPropSync(propertyData, changeObject) { - // 同步列编辑器 - if (propertyData.editor) { - if (changeObject.propertyID === 'format' || - changeObject.propertyID === 'binding' || changeObject.propertyID === 'languages') { - propertyData.editor[changeObject.propertyID] = changeObject.propertyValue; - } - if (changeObject.propertyID === 'enumData') { - propertyData.editor.enumData = changeObject.propertyValue; - propertyData.editor.idField = propertyData.idField; - propertyData.editor.textField = propertyData.textField; - } - } - } - - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - private getEnumDataConfig(fieldData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!fieldData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - } - }; - if (fieldData.controlSource !== 'Farris' || (fieldData.editor && fieldData.editor.controlSource !== 'Farris')) { - return { editorConfig, dynamicMappingKeys: false }; - } - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (fieldData.dataType === 'enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - - // 绑定字符串的下拉控件,枚举的键值可以自定义 - editorConfig.editorParams.dynamicMappingKeys = true; - if (fieldData.editor) { - editorConfig.editorParams.valueField = fieldData.idField || fieldData.editor.idField; - editorConfig.editorParams.nameField = fieldData.textField || fieldData.editor.textField; - } else { - editorConfig.editorParams.valueField = fieldData.idField; - editorConfig.editorParams.nameField = fieldData.textField; - } - - - return { editorConfig, dynamicMappingKeys: true }; - } - - private checkEnumDataVisible(propertyData: any): boolean { - if (propertyData.dataType === 'enum') { - return true; - } - - if (propertyData.dataType === 'string') { - if (!propertyData.editor) { - return true; - } else if (propertyData.editor && propertyData.editor.type === DgControl.EnumField.type) { - return true; - } - } - return false; - } - - private getLocalizationTypes(propertyData: any): KeyMap[] { - switch (propertyData.dataType) { - case GridFieldDataType.date: { - return [{ key: 'Date', value: '日期' }]; - } - case GridFieldDataType.datetime: { - return [{ key: 'DateTime', value: '日期时间' }]; - } - default: { - return [{ key: 'Date', value: '日期' }, { key: 'DateTime', value: '日期时间' }]; - } - } - } - - /** - * 限定数据国际化类型属性展示范围: - * 1、日期、日期时间类型字段---显示 - * 2、可编辑的列表:编辑器配置成了日期控件---显示 - * 3、不可编辑的列表:格式化属性配置成日期---显示 - */ - private checkLocalizationVisible(propertyData: any): boolean { - if (propertyData.controlSource !== 'Farris') { - return false; - } - switch (propertyData.dataType) { - // 日期类型字段 - case 'date': case 'datetime': { - return true; - } - // 字符串类型字段 - case 'string': { - // 可编辑列表 - if (propertyData.editor && propertyData.editor.type === DgControl.DateBox.type) { - return true; - } - // 不可编辑列表 - if (!propertyData.editor && propertyData.formatter && propertyData.formatter.type === 'date') { - return true; - } - } - } - return false; - } - - private getReadonlyPropertyConfig(propertyData: any, viewModelId: string) { - if (propertyData.controlSource === 'Farris') { - return { - propertyType: 'modal', - editor: JavaScriptBooleanEditorComponent, - converter: new JavaScriptBooleanConverter(this.domService, propertyData.binding), - editorParams: { - modalTitle: '只读编辑器', - viewModelId, - showExpression: true, - bindingFieldId: propertyData.binding.field, - expressionType: 'readonly', - showJavascript: true, - exampleCode: '(rowData) => { \r\n // ...\r\n return true;\r\n}\r\n参数:\r\n' + - 'rowData:行数据\r\n\r\n\r\n函数返回布尔类型:\r\ntrue: 只读\r\nfalse: 可编辑' - - } - }; - } else { - return { - propertyType: 'editableSelect', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }; - - } - - } - - private getVisiblePropertyConfig(propertyData: any, viewModelId: string) { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - if (propertyData.controlSource === 'Farris') { - return { - editor: JavaScriptBooleanEditorComponent, - converter: new JavaScriptBooleanConverter(this.domService, propertyData.binding), - editorParams: { - modalTitle: '可见编辑器', - viewModelId, - showExpression: true, - bindingFieldId: propertyData.binding.field, - expressionType: 'visible', - showJavascript: true, - exampleCode: '(rowData) => { \r\n // ...\r\n return true;\r\n}\r\n\r\n参数:\r\nrowData:行数据' + - '\r\n\r\n\r\n函数返回布尔类型:\r\ntrue: 可见\r\nfalse: 隐藏' - - } - }; - } else { - return visibleProp; - - } - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/property-config.ts deleted file mode 100644 index 3810df1814c5bd412560fd6d4139ccee24b99cf5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/datagrid-field/property/property-config.ts +++ /dev/null @@ -1,1398 +0,0 @@ -import { ElementPropertyConfig, KeyMap, PropertyEntity } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { - BindingEditorComponent, BindingEditorConverter, CodeEditorComponent, - ItemCollectionConverter, ItemCollectionEditorComponent, JavaScriptBooleanConverter, JavaScriptBooleanEditorComponent, - StyleEditorComponent -} from '@farris/designer-devkit'; -import { FormBindingType, GridFieldDataType } from '@farris/designer-services'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { CollectionProp } from '../../../../common/property/collection-property-config'; -import { FieldStyleConfigComponent } from '../../../../common/property/editor/field-style-config/field-style-config.component'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; -import { GridFieldFormatterConverter } from '../../../../common/property/editor/grid-field-formatter-converter'; - -export class GridFieldProp extends CollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any, gridData: any): ElementPropertyConfig[] { - const viewModelId = this.viewModelId; - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId, gridData); - this.propertyConfig.push(basicPropConfig); - - // 快捷配置属性 - const fieldStyleConfig = this.getFieldStyleProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(fieldStyleConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(behaviorPropConfig); - - if (propertyData.controlSource === 'Farris') { - // 分组合计属性 - const groypAggregateProperties = this.getGroupAggregateProperties(propertyData); - this.propertyConfig.push(groypAggregateProperties); - - // 汇总合计属性 - const aggregateProperties = this.getAggregateProperties(propertyData); - this.propertyConfig.push(aggregateProperties); - } - - // 可编辑的列表: - if (gridData.fieldEditable && propertyData.editor) { - // 列编辑器属性 - const editorProp = this.getFieldEditorProp(propertyData); - if (editorProp.length > 0) { - this.propertyConfig = this.propertyConfig.concat(editorProp); - } - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData.editor, viewModelId, 'gridFieldEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - } else { - // 事件属性(标签超链,可编辑列表的标签超链属性与编辑器合并了,不再单独分类) - const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId); - this.propertyConfig.push(eventPropConfig); - } - - - return this.propertyConfig; - } - - private getBasicPropConfig(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'caption', - propertyName: '标题', - propertyType: 'string', - description: '列标题名称' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters?) { - switch (changeObject.propertyID) { - case 'caption': { - if (propertyData.editor) { - propertyData.editor.title = changeObject.propertyValue; - } - } - } - }, - }; - } - - private getFieldStyleProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - return { - categoryId: 'fieldStyleShortcutConfig', - categoryName: '快捷配置', - hide: !['date', 'datetime', 'enum', 'number'].includes(propertyData.dataType), - properties: [ - { - propertyID: 'fieldStyleConfig', - propertyType: 'custom', - editor: FieldStyleConfigComponent, - editorParams: { - propertyData, - needClearConfig: false - }, - description: '提供常用的日期、数字展示格式,提供带图标的枚举数据模板', - refreshPanelAfterChanged: true, - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'fieldStyleConfig': { - // 数字、日期重置格式化属性 - if (changeObject.propertyValue && changeObject.propertyValue.formatter) { - const formatterValue = changeObject.propertyValue.formatter; - Object.assign(propertyData.formatter, formatterValue); - } - // 枚举重置列模板属性 - if (changeObject.propertyValue) { - propertyData.colTemplate = changeObject.propertyValue.colTemplate || ''; - - propertyData.iconConfigForEnumData = changeObject.propertyValue.enumIconConfig; - - const fieldStyleConfig = this.properties.find((p: PropertyEntity) => p.propertyID === 'fieldStyleConfig'); - fieldStyleConfig.editorParams.propertyData = propertyData; - fieldStyleConfig.editorParams.needClearConfig = false; - } - delete propertyData.fieldStyleConfig; - - - // 变更【外观分类】下的格式化属性 - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - const formatterProp = currentAppearanceConfig.properties.find(p => p.propertyID === 'formatter'); - if (formatterProp) { - const newFormattterProps = self.getFormatterProps(propertyData); - Object.assign(formatterProp.cascadeConfig, newFormattterProps); - } - - break; - } - } - } - }; - } - - private getAppearanceProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - - const formatterProps = this.getFormatterProps(propertyData); - const appearanceProperties: PropertyEntity[] = [ - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'cascade', - cascadeConfig: formatterProps, - visible: propertyData.controlSource === 'Farris', - cascadeConverter: new GridFieldFormatterConverter() - }, - { - propertyID: 'captionTipContent', - propertyName: '标题提示内容', - propertyType: 'modal', - description: '列标题提示信息的模板配置', - editor: CodeEditorComponent, - editorParams: { - language: 'html', - exampleCode: '' - }, - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'captionTipStyler', - propertyName: '标题提示样式', - propertyType: 'modal', - description: '列标题提示信息的样式设置', - editor: StyleEditorComponent, - showClearButton: true, - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'showTips', - propertyName: '显示单元格提示', - propertyType: 'boolean', - description: '是否显示单元格提示', - visible: propertyData.controlSource === 'Farris', - defaultValue: false - }, - { - propertyID: 'tipContent', - propertyName: '单元格提示内容', - propertyType: 'modal', - description: '单元格提示内容设置', - editor: CodeEditorComponent, - visible: propertyData.showTips, - editorParams: { - language: 'javascript', - exampleCode: - '(value, rowData, column) => {\r\n return value + \'的提示\';\r\n}\r\n\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据\r\n column:列数据' - } - }, - { - propertyID: 'tipMode', - propertyName: '提示模式', - propertyType: 'select', - description: '提示模式选择', - iterator: [ - { key: 'allways', value: '鼠标滑过提示' }, - { key: 'auto', value: '宽度不足时鼠标滑过提示' } - ], - visible: propertyData.showTips - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n \'color\': \'red\',\r\n' + - ' \'font-weight\': 800\r\n }\r\n };\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n ' + - 'rowData:行数据 \r\n rowIndex:当前行索引' - }, - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'colTemplate', - propertyName: '列模板', - propertyType: 'modal', - description: '列模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html', - exampleCode: '' - }, - visible: propertyData.controlSource === 'Farris', - refreshPanelAfterChanged: true - }, - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式选择', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }], - visible: propertyData.controlSource === 'Farris' - }, { - propertyID: 'vAlign', - propertyName: '数据垂直对齐方式', - propertyType: 'select', - description: '数据垂直对齐方式选择', - defaultValue: 'middle', - iterator: [{ key: 'top', value: '靠上' }, { key: 'middle', value: '居中' }, { key: 'bottom', value: '靠下' }], - visible: propertyData.controlSource === 'Farris' - }, { - propertyID: 'hAlign', - propertyName: '表头对齐方式', - propertyType: 'select', - description: '表头对齐方式选择', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }], - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'headerStyler', - propertyName: '表头样式', - propertyType: 'modal', - description: '表头样式设置', - editor: StyleEditorComponent, - showClearButton: true, - visible: propertyData.controlSource === 'Farris' - } - ]; - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'linkedLabelEnabled': { - const linkedLabelClick = this.properties.find((p: PropertyEntity) => p.propertyID === 'linkedLabelClick'); - if (linkedLabelClick) { - linkedLabelClick.visible = changeObject.propertyValue; - } - break; - } - case 'type': { - // 列格式化属性 - if (changeObject.parentPropertyID === 'formatter') { - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - if (p.group === 'boolean') { - p.visible = changeObject.propertyValue.indexOf(p.group) > -1; - } else { - p.visible = p.group === changeObject.propertyValue; - } - }); - } - - propertyData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propertyData.formatter); - - // 联动修改列样式的快捷配置 - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - break; - } - case 'showTips': { - const tipContent = this.properties.find(p => p.propertyID === 'tipContent'); - if (tipContent) { - tipContent.visible = changeObject.propertyValue; - } - const tipMode = this.properties.find(p => p.propertyID === 'tipMode'); - if (tipMode) { - tipMode.visible = changeObject.propertyValue; - } - break; - } - case 'colTemplate': { - // 联动修改列样式的快捷配置 - self.clearIconConfigAfterColTemplateChanged(propertyData, changeObject, parameters); - - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - fieldStyleProp.editorParams.needClearConfig = true; - } - } - - break; - } - default: { - // 联动修改列样式的快捷配置 - if (changeObject.parentPropertyID === 'formatter') { - - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - /** - * 组装列格式化属性 - */ - private getFormatterProps(propertyData: any): PropertyEntity[] { - return [ - { - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: this.getDateFormatter(propertyData), - refreshPanelAfterChanged: true - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - visible: propertyData.formatter && propertyData.formatter.type === 'custom', - group: 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - defaultValue: 0, - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'trueText', - propertyName: 'true文本', - propertyType: 'string', - description: 'true文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'falseText', - propertyName: 'false文本', - propertyType: 'string', - description: 'false文本设置', - visible: propertyData.formatter && - (propertyData.formatter.type === 'boolean' || propertyData.formatter.type === 'boolean2'), - group: 'boolean' - }, - { - propertyID: 'dateFormat', - propertyName: '日期格式', - propertyType: 'string', - description: '日期格式设置', - visible: propertyData.formatter && propertyData.formatter.type === 'date', - group: 'date', - refreshPanelAfterChanged: true - } - ]; - } - private getBehaviorProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - - // 获取绑定字段类型 - let dgVMField; - let dgVMFieldType; - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - if (propertyData.binding && dgViewModel) { - dgVMField = dgViewModel.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField) { - dgVMFieldType = dgVMField.multiLanguage ? 'multiLanguage' : dgVMField.type.name; - } - } - - const behaviorProperties: PropertyEntity[] = [ - { - propertyID: 'binding', - propertyName: '绑定', - propertyType: 'modal', - description: '绑定的表单字段', - editor: BindingEditorComponent, - editorParams: { - viewModelId, - componentId: propertyData.componentId, - controlType: propertyData.type, - allowedBindingType: 'Form', - gridFielType: dgVMFieldType, - unusedOnly: true - }, - converter: new BindingEditorConverter(), - readonly: !dgVMFieldType // 失效的字段,不允许切换类型,只能删除 - }, - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'modal', - description: '运行时组件是否可见', - ...this.getVisiblePropertyConfig(propertyData, viewModelId) - }, - { - propertyID: 'readonly', - propertyName: '只读', - description: '是否只读', - ...this.getReadonlyPropertyConfig(propertyData, viewModelId) - }, - { - propertyID: 'multiLanguage', - propertyName: '启用多语字段', - propertyType: 'boolean', - description: '是否启用多语字段', - readonly: true - }, - { - propertyID: 'languages', - propertyName: '语言列表', - propertyType: 'modal', - description: '语言列表设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'code', title: '编号', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '名称', editor: { type: EditorTypes.TEXTBOX } }], - requiredFields: ['code', 'name'], - uniqueFields: ['code', 'name'], - modalTitle: '语言编辑器', - canEmpty: false - }, - converter: new ItemCollectionConverter(), - visible: propertyData.multiLanguage - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: this.checkEnumDataVisible(propertyData) - }, - - { - propertyID: 'frozen', - propertyName: '固定列', - propertyType: propertyData.controlSource === 'Farris' ? 'select' : 'boolean', - description: '固定列选择', - iterator: [ - { key: 'none', value: '不固定' }, - { key: 'left', value: '固定左侧' }, - { key: 'right', value: '固定右侧' } - ], - readonly: propertyData.controlSource === 'Farris' && (gridData.groupable || gridData.enableHeaderGroup) - }, - { - propertyID: 'sortable', - propertyName: '允许排序', - propertyType: 'boolean', - description: '是否允许排序', - }, - { - propertyID: 'enableFilter', - propertyName: '允许过滤', - propertyType: 'boolean', - description: '是否允许过滤', - defaultValue: false, - readonly: gridData.filterType === 'none', - visible: propertyData.controlSource === 'Farris' - }, - { - propertyID: 'aggregate', - propertyName: '汇总合计', - propertyType: 'cascade', - visible: propertyData.controlSource === 'Kendo', - cascadeConfig: [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }, { key: 'count', value: '计数' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行模版', - propertyType: 'string', - description: '合计行模版设置', - } - ], - }, - { - propertyID: 'localization', - propertyName: '启用数据国际化', - propertyType: 'boolean', - description: '是否启用数据国际化', - visible: this.checkLocalizationVisible(propertyData) - }, - { - propertyID: 'localizationType', - propertyName: '数据国际化类型', - propertyType: 'select', - description: '数据国际化类型选择', - visible: this.checkLocalizationVisible(propertyData) && propertyData.localization, - controlSource: 'Farris', - iterator: this.getLocalizationTypes(propertyData) - }, - { - propertyID: 'allowGrouping', - propertyName: '允许分组', - propertyType: 'boolean', - description: '是否允许分组', - visible: propertyData.controlSource === 'Farris' - } - ]; - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'binding': { - // 修改绑定后需要同步其他字段 - self.updateControlDomAfterChangingBinding(propertyData, parameters, viewModelId); - - // 刷新实体树 - self.refreshFormService.refreshSchamaTree.next(); - break; - } - case 'frozen': { - if (propertyData.controlSource === 'Farris') { - if (changeObject.propertyValue !== 'none') { - self.notifyService.warning('请确保列表未启用分组、未启用多表头!'); - } - } - break; - } - case 'enumData': { - if (enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.idField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - changeObject.relateChangeProps = [{ - propertyID: 'idField', - propertyValue: propertyData.idField - }, - { - propertyID: 'textField', - propertyValue: propertyData.textField - }]; - - break; - } - case 'localization': { - const localizationType = this.properties.find(p => p.propertyID === 'localizationType'); - if (localizationType) { - localizationType.visible = self.checkLocalizationVisible(propertyData) && changeObject.propertyValue; - localizationType.iterator = self.getLocalizationTypes(propertyData); - } - break; - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'linkedLabelClick', - name: '标签超链事件' - } - ]; - const self = this; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - if (parameters) { - parameters.setPropertyRelates = this.setPropertyRelates; // 添加自定义方法后,调用此回调方法,用于处理联动属性 - parameters.controlInfo = { type: (propertyData.binding && propertyData.binding.path) || propertyData.type, name: propertyData.caption }; // 暂存控件信息,用于自动创建新方法的方法编号和名称 - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - - // 联动修改【启用标签超链接】属性 - const previousLinkedLabelEnabled = propertyData.linkedLabelEnabled; - propertyData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - if (!previousLinkedLabelEnabled && propertyData.linkedLabelEnabled) { - self.notifyService.warning('启用标签超链事件后,列模板失效!'); - } - } - }; - } - - /** - * 枚举类型字段,在变更列模板后需要重置图标配置数据 - * @param propertyData 列数据 - * @param changeObject 属性变更集 - * @param parameters 变更参数 - */ - private clearIconConfigAfterColTemplateChanged(propertyData: any, changeObject: FormPropertyChangeObject, parameters: any) { - if (propertyData.dataType !== 'enum' || !propertyData.iconConfigForEnumData) { - return; - } - - if (changeObject.propertyValue !== parameters.oldValue) { - propertyData.iconConfigForEnumData = null; - this.notifyService.warning('变更列模板后,自动重置列样式快捷配置!'); - } - } - /** - * Farris 列 分组合计属性 - * @param propertyData 属性值 - */ - private getGroupAggregateProperties(propertyData: any) { - const self = this; - const groupProperties: PropertyEntity[] = [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行文本', - propertyType: 'string', - description: '合计行文本设置', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type === 'none' - }, - { - propertyID: 'align', - propertyName: '对齐方式', - propertyType: 'select', - description: '对齐方式选择', - iterator: [{ key: 'left', value: '靠左' }, { key: 'center', value: '居中' }, { key: 'right', value: '靠右' }], - defaultValue: 'left' - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '\r\n(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n' + - ' \'color\': \'red\',\r\n \'font-weight\': 800\r\n }\r\n };' + - '\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n rowIndex:当前行索引' - } - }, - { - propertyID: 'formatter', - propertyName: '数据格式化', - propertyType: 'cascade', - description: '数据格式化设置', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none', - cascadeConverter: new GridFieldFormatterConverter(), - cascadeConfig: [{ - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'custom', value: '自定义' }] - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - group: 'custom', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - group: 'number', - defaultValue: 0, - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - group: 'number', - visible: propertyData.groupAggregate && propertyData.groupAggregate.type !== 'none' && - propertyData.groupAggregate.formatter && propertyData.groupAggregate.formatter.type === 'number' - }] - } - ]; - return { - categoryId: 'groupAggregate', - categoryName: '分组合计', - properties: groupProperties, - propertyData: propertyData.groupAggregate, - enableCascade: true, - parentPropertyID: 'groupAggregate', - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - - switch (changeObject.propertyID) { - case 'type': { - - if (!changeObject.parentPropertyID) { - // 切换合计类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter) { - formatter.visible = changeObject.propertyValue !== 'none'; - } - const aggrTemplate = this.properties.find(p => p.propertyID === 'aggrTemplate'); - if (aggrTemplate) { - aggrTemplate.visible = changeObject.propertyValue === 'none'; - } - - } else if (changeObject.parentPropertyID === 'formatter') { - // 切换格式化类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - p.visible = p.group === changeObject.propertyValue; - }); - } - propData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propData.formatter); - } - - break; - } - } - - - - } - }; - } - - /** - * 汇总合计属性 - * @param propertyData 属性值 - */ - private getAggregateProperties(propertyData: any) { - const self = this; - const aggregateProperties: PropertyEntity[] = [ - { - propertyID: 'type', - propertyName: '合计类型', - propertyType: 'select', - description: '合计类型选择', - iterator: [{ key: 'none', value: '无' }, { key: 'sum', value: '求和' }, { key: 'count', value: '计数' }, - { key: 'max', value: '最大值' }, { key: 'min', value: '最小值' }, { key: 'average', value: '平均值' }] - }, - { - propertyID: 'aggrTemplate', - propertyName: '合计行文本', - propertyType: 'string', - description: '合计行文本设置', - visible: propertyData.aggregate && propertyData.aggregate.type === 'none' - }, - { - propertyID: 'align', - propertyName: '对齐方式', - propertyType: 'select', - description: '对齐方式选择', - iterator: [{ key: 'left', value: '靠左' }, { key: 'center', value: '居中' }, { key: 'right', value: '靠右' }], - defaultValue: 'left' - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '\r\n(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n' + - ' \'color\': \'red\',\r\n \'font-weight\': 800\r\n }\r\n };' + - '\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n rowIndex:当前行索引' - } - }, - { - propertyID: 'formatter', - propertyName: '数据格式化', - propertyType: 'cascade', - description: '数据格式化设置', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none', - cascadeConverter: new GridFieldFormatterConverter(), - cascadeConfig: [{ - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化类型选择', - iterator: [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'custom', value: '自定义' }] - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - group: 'custom', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - group: 'number', - defaultValue: 0, - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - group: 'number', - visible: propertyData.aggregate && propertyData.aggregate.type !== 'none' && propertyData.aggregate.formatter - && propertyData.aggregate.formatter.type === 'number' - }] - } - ]; - return { - categoryId: 'GridAggregate', - categoryName: '汇总合计', - properties: aggregateProperties, - propertyData: propertyData.aggregate, - enableCascade: true, - parentPropertyID: 'aggregate', - setPropertyRelates(changeObject, propData, parameters) { - if (changeObject.propertyID !== 'type') { - return; - } - if (!changeObject.parentPropertyID) { - // 切换合计类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter) { - formatter.visible = changeObject.propertyValue !== 'none'; - } - const aggrTemplate = this.properties.find(p => p.propertyID === 'aggrTemplate'); - if (aggrTemplate) { - aggrTemplate.visible = changeObject.propertyValue === 'none'; - } - - } else if (changeObject.parentPropertyID === 'formatter') { - // 切换格式化类型 - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - p.visible = p.group === changeObject.propertyValue; - }); - } - propData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propData.formatter); - } - } - }; - } - - /** - * farris datagrid 列 设置格式默认值 - * @param type 格式化类型 - * @param col 列格式值 - */ - private setDataGridFormatterDefaults(type: string, col: any) { - switch (type) { - case 'number': { - col = Object.assign({ - precision: 0, - thousand: ',', - prefix: '', - suffix: '', - decimal: '.' - }, col); - break; - } - case 'boolean': { - col = Object.assign(col, { - trueText: '是', - falseText: '否' - }); - break; - } - case 'boolean2': { - col = Object.assign(col, { - trueText: '', - falseText: '' - }); - break; - } - case 'date': { - col = Object.assign({ - dateFormat: 'yyyy-MM-dd', - }, col); - break; - } - case 'none': { - col = { - type: 'none' - }; - } - } - return col; - } - - - /** - * 设置列表列和编辑器的属性联动(目前树表没有列编辑器) - * @param propertyData 属性值 - * @param changeObject 变更集 - */ - private setGridFieldEditorPropSync(propertyData: any, changeObject: FormPropertyChangeObject) { - // 同步列编辑器 - if (propertyData.editor) { - if (changeObject.propertyID === 'format' || changeObject.propertyID === 'languages') { - propertyData.editor[changeObject.propertyID] = changeObject.propertyValue; - } - if (changeObject.propertyID === 'enumData') { - propertyData.editor.enumData = changeObject.propertyValue; - propertyData.editor.idField = propertyData.idField; - propertyData.editor.textField = propertyData.textField; - } - - } - - } - /** - * 修改绑定后要同步变更控件path等属性,若是帮助控件还要变更数据源属性并同步viewModel - */ - updateControlDomAfterChangingBinding(propertyData: any, parameters: any, viewModelId: string) { - const selectedData = parameters && parameters.selectedData; - if (!selectedData) { - return; - } - - // 变更dataField和path属性 - propertyData.dataField = selectedData.bindingPath; - propertyData.path = selectedData.bindingPath; - - if (!propertyData.editor) { - return; - } - - // 同步列编辑器 - propertyData.editor.binding = propertyData.binding; - propertyData.editor.path = selectedData.bindingPath; - - - // 帮助控件变更dataSource.uri属性 - if (propertyData.editor.type === DgControl.LookupEdit.type && propertyData.editor.dataSource && propertyData.editor.dataSource.uri) { - const uri = propertyData.editor.dataSource.uri; - const index = uri.indexOf('.'); - if (index < 0) { - return; - } - - if (propertyData.editor.binding.type === FormBindingType.Form) { - const newUri = uri.slice(0, index) + '.' + selectedData.bindingField; - propertyData.editor.dataSource.uri = newUri; - - // 同步viewModel Field - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(propertyData.binding.field, { editor: { dataSource: propertyData.editor.dataSource } }); - } - - } - } - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - private getEnumDataConfig(fieldData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!fieldData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - } - }; - if (fieldData.controlSource !== 'Farris' || (fieldData.editor && fieldData.editor.controlSource !== 'Farris')) { - return { editorConfig, dynamicMappingKeys: false }; - } - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (fieldData.dataType === 'enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - - // 绑定字符串的下拉控件,枚举的键值可以自定义 - editorConfig.editorParams.dynamicMappingKeys = true; - if (fieldData.editor) { - editorConfig.editorParams.valueField = fieldData.idField || fieldData.editor.idField; - editorConfig.editorParams.nameField = fieldData.textField || fieldData.editor.textField; - } else { - editorConfig.editorParams.valueField = fieldData.idField; - editorConfig.editorParams.nameField = fieldData.textField; - } - - - return { editorConfig, dynamicMappingKeys: true }; - } - - private checkEnumDataVisible(propertyData: any): boolean { - // 多语字段:不展示枚举属性 - if (propertyData.multiLanguage) { - return false; - } - // 枚举字段:展示 - if (propertyData.dataType === 'enum') { - return true; - } - // 字符串字段:配置成枚举控件,展示 - if (propertyData.dataType === 'string') { - if (!propertyData.editor) { - return true; - } else if (propertyData.editor && propertyData.editor.type === DgControl.EnumField.type) { - return true; - } - } - return false; - } - - private getLocalizationTypes(propertyData: any): KeyMap[] { - switch (propertyData.dataType) { - case GridFieldDataType.date: { - return [{ key: 'Date', value: '日期' }]; - } - case GridFieldDataType.datetime: { - return [{ key: 'DateTime', value: '日期时间' }]; - } - default: { - return [{ key: 'Date', value: '日期' }, { key: 'DateTime', value: '日期时间' }]; - } - } - } - - /** - * 限定数据国际化类型属性展示范围: - * 1、日期、日期时间类型字段---显示 - * 2、可编辑的列表:编辑器配置成了日期控件---显示 - * 3、不可编辑的列表:格式化属性配置成日期---显示 - */ - private checkLocalizationVisible(propertyData: any): boolean { - if (propertyData.controlSource !== 'Farris') { - return false; - } - switch (propertyData.dataType) { - // 日期类型字段 - case 'date': case 'datetime': { - return true; - } - // 字符串类型字段 - case 'string': { - // 可编辑列表 - if (propertyData.editor && propertyData.editor.type === DgControl.DateBox.type) { - return true; - } - // 不可编辑列表 - if (!propertyData.editor && propertyData.formatter && propertyData.formatter.type === 'date') { - return true; - } - } - } - return false; - } - - private getReadonlyPropertyConfig(propertyData: any, viewModelId: string) { - if (propertyData.controlSource === 'Farris') { - return { - propertyType: 'modal', - editor: JavaScriptBooleanEditorComponent, - converter: new JavaScriptBooleanConverter(this.domService, propertyData.binding), - editorParams: { - modalTitle: '只读编辑器', - viewModelId, - showExpression: true, - bindingFieldId: propertyData.binding.field, - expressionType: 'readonly', - showJavascript: true, - exampleCode: '(rowData) => { \r\n // ...\r\n return true;\r\n}\r\n参数:\r\n' + - 'rowData:行数据\r\n\r\n\r\n函数返回布尔类型:\r\ntrue: 只读\r\nfalse: 可编辑' - - } - }; - } else { - return { - propertyType: 'editableSelect', - iterator: [{ key: true, value: 'true' }, { key: false, value: 'false' }] - }; - - } - - } - - private getVisiblePropertyConfig(propertyData: any, viewModelId: string) { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - if (propertyData.controlSource === 'Farris') { - return { - editor: JavaScriptBooleanEditorComponent, - converter: new JavaScriptBooleanConverter(this.domService, propertyData.binding), - editorParams: { - modalTitle: '可见编辑器', - viewModelId, - showExpression: true, - bindingFieldId: propertyData.binding.field, - expressionType: 'visible', - showJavascript: true, - exampleCode: '(rowData) => { \r\n // ...\r\n return true;\r\n}\r\n\r\n参数:\r\nrowData:行数据' + - '\r\n\r\n\r\n函数返回布尔类型:\r\ntrue: 可见\r\nfalse: 隐藏' - - } - }; - } else { - return visibleProp; - - } - - } - /** - * 获取列格式化类型 - */ - private getDateFormatter(propertyData: any) { - - const iterator = [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'boolean', value: '布尔-文本' }, - { key: 'boolean2', value: '布尔-图标' }, - { key: 'date', value: '日期' }, - { key: 'enum', value: '枚举' }, - { key: 'custom', value: '自定义' } - ]; - - // 绑定字段为日期时,支持相对时间格式 - if (propertyData.dataType === GridFieldDataType.date || propertyData.dataType === GridFieldDataType.datetime) { - const timego = { key: 'timeago', value: '相对时间' }; - iterator.splice(5, 0, timego); - } - - return iterator; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/fd-datagrid.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/fd-datagrid.ts deleted file mode 100644 index 185f341e5812d7da5e4e8db8a97619b1c1152940..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/component/fd-datagrid.ts +++ /dev/null @@ -1,519 +0,0 @@ -import { DataGridSchema } from '../schema/datagrid'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DataGridProp } from '../property/property-config'; -import FdDataGridFieldComponent from './datagrid-field/component/fd-datagrid-field'; -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import { RowNode } from '@farris/ui-treetable'; -import { DataGridContextMenuManager } from '../context-menu/context-menu.manager'; -import { DesignerEnvType, DesignViewModelService, DomService, FormComponent } from '@farris/designer-services'; -import { ControlService } from '../../../../service/control.service'; -import { defaultsDeep } from 'lodash-es'; -import { NoCodeDataGridProp } from '../property/nocode-property-config'; -import { DgControl } from '../../../../utils/dg-control'; - -export default class FdDataGridComponent extends FdCollectionBaseComponent { - - /** 单列实例集合 */ - gridFieldInstances: FdDataGridFieldComponent[]; - - /** 是否启用了卡片式编辑(弹出编辑/侧边栏编辑) */ - private isEnableCardEdit: boolean; - - /** 列表若启用了卡片编辑视图,需要记录当前展示的视图类型 */ - private currentViewShowType = 'grid'; - - /** 弹出/侧边栏组件实例 */ - private cardEditComponentInstance: FdCollectionBaseComponent; - - /** 启用卡片式编辑后的视图切换按钮 */ - private toolbarIconData = []; - - get gridViewPanelKey() { - return 'gridViewPanel'; - } - get cardViewPanelKey() { - return 'cardViewPanel'; - } - get gridViewChangeBtnKey() { - return 'gridViewChangeBtn'; - } - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return DataGridSchema; - } - - getStyles(): string { - return 'display: flex; flex: 1; padding:0;border:0;position:relative'; - } - - init() { - this.adaptOldControlSchema(); - this.components = []; - this.gridFieldInstances = []; - if (this.component.fields) { - const options = Object.assign({}, this.options, { parent: this }); - - this.component.fields.map(item => { - const fieldInstance = new FdDataGridFieldComponent(item, options, this); - this.gridFieldInstances.push(fieldInstance); - }); - } - this.components = this.components.concat(this.gridFieldInstances); - - } - render(): any { - const cardEditTemplates = this.renderCardEditPanel(); - - this.getCustomToolbarConfigs(); - - return super.render(this.renderTemplate('DataGrid', { - component: this.component, - gridFieldInstances: this.gridFieldInstances, - - isEnableCardEdit: this.isEnableCardEdit, - currentViewShowType: this.currentViewShowType, - cardEditTemplates, - gridViewChangeBtnKey: this.gridViewChangeBtnKey, - cardViewPanelKey: this.cardViewPanelKey, - toolbarIconData: this.toolbarIconData, - gridViewPanelKey: this.gridViewPanelKey - })); - } - - /** - * 元素扩展事件 - */ - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - - // 挂载单列的点击事件 - this.gridFieldInstances.forEach(gridFieldInstance => { - const itemId = gridFieldInstance.component.id; - this.loadRefs(element, { - [itemId]: 'multiple' - }); - gridFieldInstance.attach(this.refs[itemId][0]); - }); - - // 挂载可拖拽区域,用于从控件工具箱和实体树中拖拽节点 - this.hook('attachComponents', element, [], [], this); - - this.attachCardEditPanel(element); - - this.registerGridFieldDnd(); - - this.setContextMenuBasicInfoMap(); - return superAttach; - } - - private getCustomToolbarConfigs() { - this.customToolbarConfigs = [ - { - id: 'gridFieldManager', - title: '字段维护', - icon: 'f-icon f-icon-home-setup', - click: (e) => { - e.stopPropagation(); - this.showFieldManager(); - } - } - ]; - } - - onComponentClicked(e?: PointerEvent): void { - super.onComponentClicked(e); - // 控件右上角的配置字段图标:只有当前显示Grid视图时才展示 - if (this.element) { - const fieldManagerBtn = this.element.querySelector('[ref=gridFieldManager].component-settings-button') as HTMLElement; - if (fieldManagerBtn) { - fieldManagerBtn.style.visibility = this.isEnableCardEdit && this.component.currentViewShowType !== 'grid' ? 'hidden' : 'visible'; - } - } - } - /** - * 渲染卡片式编辑视图模板 - */ - private renderCardEditPanel() { - - // 列表启用了卡片式编辑(弹出编辑或者侧边栏编辑):这种场景里需要同时展示列表和卡片视图。使用浮动的图标来支持切换 - this.isEnableCardEdit = false; - if (this.component.enableEditByCard !== 'none' && this.component.modalComponentId) { - const serviceHost = this.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - - const modalComponent = domService.getComponentById(this.component.modalComponentId); - if (!modalComponent) { - return; - } - this.isEnableCardEdit = true; - this.currentViewShowType = this.component.currentViewShowType || 'grid'; - - // 创建弹出组件实例,这里不能重复创建 - if (!this.cardEditComponentInstance) { - this.cardEditComponentInstance = this.createComponent(modalComponent, this.options, modalComponent.id, modalComponent.viewModel); - } - } - - - let cardEditTemplates = ''; - if (this.isEnableCardEdit && this.cardEditComponentInstance) { - cardEditTemplates = this.cardEditComponentInstance.renderComponents([this.cardEditComponentInstance]); - this.initEditByCardViewChangeToolbar(); - } - - return cardEditTemplates; - } - - /** - * 挂载卡片式式编辑视图 - */ - private attachCardEditPanel(element: HTMLElement) { - - if (this.isEnableCardEdit && this.cardEditComponentInstance) { - // 挂载视图切换按钮 - this.loadRefs(element, { - gridViewChangeBtn: 'multiple' - }); - // 注册视图切换事件 - const changeBtnEles = this.refs[this.gridViewChangeBtnKey]; - if (changeBtnEles && changeBtnEles.length) { - changeBtnEles.forEach((changeBtnEle, index) => { - this.addEventListener(changeBtnEle, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - - this.changeCurrentViewShowType(index); - }); - }); - - } - - // 挂载卡片视图内控件 - this.loadRefs(element, { - [this.gridViewPanelKey]: 'single', - [this.cardViewPanelKey]: 'single' - }); - const cardEditEle = this.refs[this.cardViewPanelKey]; - if (cardEditEle) { - this.cardEditComponentInstance.attach(cardEditEle); - } - } - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeDataGridProp = new NoCodeDataGridProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: DataGridProp = new DataGridProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new DataGridContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - - /** - * 初始展示类型切换按钮 - */ - private initEditByCardViewChangeToolbar() { - switch (this.component.enableEditByCard) { - case 'modal': { - this.toolbarIconData = [ - { - type: 'grid', - title: '表格视图', - icon: 'f-icon f-icon-grid-layout' - }, - { - type: 'modal', - title: '弹出卡片视图', - icon: 'f-icon f-icon-group' - } - ]; - break; - } - case 'sidebar': { - this.toolbarIconData = [ - { - type: 'grid', - title: '表格视图', - icon: 'f-icon f-icon-grid-layout' - }, - { - type: 'sidebar', - title: '侧边栏卡片视图', - icon: 'f-icon f-icon-group' - } - ]; - break; - } - default: { - this.toolbarIconData = []; - } - } - } - /** - * 切换显示类型 - * @param index 图标索引 - */ - private changeCurrentViewShowType(index: number) { - const type = this.toolbarIconData[index].type; - if (this.currentViewShowType === type) { - return; - } - this.currentViewShowType = type; - this.component.currentViewShowType = type; - - // 切换显示类型 - const gridDiv = this.refs[this.gridViewPanelKey]; - const cardDiv = this.refs[this.cardViewPanelKey]; - switch (type) { - case 'grid': { - if (gridDiv) { - gridDiv.style = 'display:unset'; - } - if (cardDiv) { - cardDiv.style = 'display:none !important'; - } - break; - } - case 'sidebar': case 'modal': { - - if (gridDiv) { - gridDiv.style = 'display:none !important'; - } - if (cardDiv) { - cardDiv.style = 'display:flex'; - } - break; - } - } - - // 切换图标样式 - const changeBtnEles = this.refs[this.gridViewChangeBtnKey]; - if (changeBtnEles && changeBtnEles.length) { - changeBtnEles.forEach((changeBtnEle: HTMLElement) => { - const key = changeBtnEle.getAttribute('key'); - if (key === type) { - changeBtnEle.classList.add('tile-btn-active'); - } else { - changeBtnEle.classList.remove('tile-btn-active'); - } - }); - } - - // 控件右上角的配置字段图标:只有当前显示Grid视图时才展示 - if (this.element) { - const fieldManagerBtn = this.element.querySelector('[ref=gridFieldManager].component-settings-button') as HTMLElement; - if (fieldManagerBtn) { - fieldManagerBtn.style.visibility = type === 'grid' ? 'visible' : 'hidden'; - } - } - - - } - - /** - * 调整列顺序后同步修改DOM结构 - */ - dragGridFieldEnd(e: any) { - super.dragGridFieldEnd(e); - - const oldIndex = e.oldIndex; - const newIndex = e.newIndex; - const item = this.gridFieldInstances[oldIndex]; - this.gridFieldInstances.splice(oldIndex, 1); - this.gridFieldInstances.splice(newIndex, 0, item); - } - - /** - * 适配表单控件的元数据变更 - */ - private adaptOldControlSchema() { - if (this.component.multiSelect === null) { - this.component.multiSelect = false; - } - if (this.component.fields && this.component.fieldEditable) { - const injector = this.options.designerHost.getService('Injector'); - const controlService = injector.get(ControlService) as ControlService; - - this.component.fields.forEach(field => { - if (!field.editor) { - return; - } - const metadata = controlService.getControlMetaData(field.editor.type); - field.editor = defaultsDeep(field.editor, metadata); - }); - } - - } - - /** - * 设置子表DataGrid展示名称和路径,用于交互面板已绑定事件窗口 - */ - setComponentBasicInfoMap() { - super.setComponentBasicInfoMap(); - - if (!this.belongedCmpInstance || !this.belongedCmpInstance.parent) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - - const viewModel = domService.getViewModelById(this.belongedCmpInstance.component.viewModel); - if (!viewModel || viewModel.bindTo === '/') { - return; - } - // 定位父级容器:Tab或者Section - const cmpRef = this.belongedCmpInstance.parent; - const cmpRefParent = cmpRef && cmpRef.parent; - if (!cmpRefParent) { - return; - } - let parentTitle = ''; - let cmpRefParentSchema = cmpRefParent.component; - // 父级为Tab,需要定位到具体的TabPage - if (cmpRefParent.type === DgControl.Tab.type && cmpRefParentSchema && cmpRefParentSchema.contents && cmpRefParentSchema.contents.length) { - cmpRefParentSchema = cmpRefParentSchema.contents.find(tabPage => tabPage.contents && tabPage.contents.find(co => co.id === cmpRef.id)); - if (cmpRefParentSchema) { - parentTitle = cmpRefParentSchema.title; - } - } - // 父级为Section,直接取section的主标题 - if (cmpRefParent.type === DgControl.Section.type && cmpRefParentSchema.showHeader) { - parentTitle = cmpRefParentSchema.mainTitle || ''; - } - - - if (parentTitle) { - const showName = this.getControlShowName(); - domService.controlBasicInfoMap.set(this.component.id, { - showName, - parentPathName: `${parentTitle} > ${showName}` - }); - } - - } - - /** - * 设置列表右键菜单按钮的展示名称和路径,用于交互面板已绑定事件窗口 - */ - private setContextMenuBasicInfoMap() { - if (!this.component.contextMenuItems || !this.component.contextMenuItems.length) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - const dataGridPath = domService.controlBasicInfoMap.get(this.component.id); - this.component.contextMenuItems.forEach(menuItem => { - domService.controlBasicInfoMap.set(menuItem.id, { - showName: menuItem.title, - parentPathName: `${dataGridPath.parentPathName} > ${menuItem.title}` - }); - }); - - } - - /** - * 列表删除后事件:若列表启用了弹出编辑,在删除列表时,需要将弹出页面相关的component/viewmodel一起删除 - */ - onRemoveComponent(): void { - if (!this.component.modalComponentId) { - return; - } - - const serviceHost = this.options.designerHost; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - const domService = serviceHost.getService('DomService') as DomService; - - const modalCmp = domService.getComponentById(this.component.modalComponentId); - if (!modalCmp) { - return; - } - - // 删除弹窗内部的全局按钮 - this.deleteGlobalToolbarInModal(modalCmp, domService); - - // 删除弹出组件内部的子组件 - this.deleteModalComponent(modalCmp.contents, dgViewModelService, domService); - - // 删除弹出组件 - dgViewModelService.deleteViewModelById(modalCmp.viewModel); - domService.deleteComponent(this.component.modalComponentId); - - - - } - - /** - * 删除弹出组建内部的子组件 - */ - private deleteModalComponent(contents: any[], dgViewModelService: DesignViewModelService, domService: DomService) { - - if (contents && contents.length) { - contents.forEach(c => { - if (c.contents) { - this.deleteModalComponent(c.contents, dgViewModelService, domService); - } - - if (c.type !== DgControl.ComponentRef.type) { - return; - } - const modalFormCmp = domService.getComponentById(c.component); - - // 删除弹出子组件 - dgViewModelService.deleteViewModelById(modalFormCmp.viewModel); - domService.deleteComponent(modalFormCmp.id); - }); - } - } - - /** - * 删除弹窗内部的全局按钮 - */ - private deleteGlobalToolbarInModal(modalCmp: FormComponent, domService: DomService) { - const header = domService.selectNode(modalCmp, item => item.type === DgControl.Header.type); - const footer = domService.selectNode(modalCmp, item => item.type === DgControl.ModalFooter.type); - - if (!header && !footer) { - return; - } - const toolbar = domService.module.toolbar; - - - if (toolbar && toolbar.items && toolbar.items[modalCmp.viewModel]) { - delete toolbar.items[modalCmp.viewModel]; - } - if (toolbar && toolbar.configs) { - Object.keys(toolbar.configs).forEach(showMode => { - if (toolbar.configs[showMode]) { - if (header) { - delete toolbar.configs[showMode][header.id]; - } - if (footer) { - delete toolbar.configs[showMode][footer.id]; - } - } - }); - - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu-config.ts deleted file mode 100644 index 82e4421c22d832523f1e9e084e5093f76c928209..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu-config.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const contextMenu = [ - { - title: '筛选条', - id: 'ListFilter' - }, - { - title: '筛选方案', - id: 'QueryScheme' - }, - { - title: '多视图', - id: 'MultiViewContainer' - }, - { - title: '弹出编辑', - id: 'EditInModalCard', - category: 'editInCard', - type: 'modal' - }, - { - title: '侧边栏编辑', - id: 'EditInSidebarCard', - category: 'editInCard', - type: 'sidebar' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu.manager.ts deleted file mode 100644 index 0fc543b430efc3edbd9e1d615ab2eaa930efee78..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { DataGridMultiViewContextMenuService } from './services/multi-view.service'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DataGridFilterContextMenuService } from './services/list-filter.service'; -import { DataGridQuerySchemeContextMenuService } from './services/query-scheme.service'; -import { DataGridEditByCardContextMenuService } from './services/card-edit.service'; - -export class DataGridContextMenuManager extends ContextMenuManager { - - filterContextMenuSerivice: DataGridFilterContextMenuService; - multiViewContextMenuService: DataGridMultiViewContextMenuService; - querySchemeContextMenuService: DataGridQuerySchemeContextMenuService; - cardEditService: DataGridEditByCardContextMenuService; - - private controlCreatorService: any; - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.controlCreatorService = this.serviceHost.getService('ControlCreatorService'); - - this.filterContextMenuSerivice = new DataGridFilterContextMenuService(this.injector); - this.multiViewContextMenuService = new DataGridMultiViewContextMenuService(this.injector); - this.querySchemeContextMenuService = new DataGridQuerySchemeContextMenuService(this.injector); - this.cardEditService = new DataGridEditByCardContextMenuService(this.injector, this.controlCreatorService); - - - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - menuConfig = this.filterContextMenuSerivice.assembleListFilterMenu(this.cmpInstance.viewModelId, menuConfig); - menuConfig = this.querySchemeContextMenuService.assembleQuerySchemeMenu(this.cmpInstance.componentId, menuConfig); - menuConfig = this.multiViewContextMenuService.assembleMultiViewMenu(menuConfig, this.cmpInstance.id, this.cmpInstance.componentId);; - menuConfig = this.cardEditService.assembleCardEditMenu(menuConfig, this.cmpInstance); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig || []; - } - - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - const viewModelId = this.cmpInstance.viewModelId; - switch (menu.id) { - // 启用筛选条 - case 'enableListFilter': { - this.filterContextMenuSerivice.openListFilterModal(viewModelId, this.cmpInstance.id); - break; - } - // 移除筛选条 - case 'removeListFilter': { - this.filterContextMenuSerivice.removeListFilter(viewModelId, this.cmpInstance); - break; - } - // 启用筛选方案 - case 'enableQueryScheme': { - this.querySchemeContextMenuService.openQuerySchemeModal(viewModelId); - break; - } - // 移除筛选方案 - case 'removeQueryScheme': { - this.querySchemeContextMenuService.removeQueryScheme(this.cmpInstance); - break; - } - // 启用多视图 - case 'enableMultiViewContainer': { - this.multiViewContextMenuService.enableMultiViewContainer(viewModelId, this.cmpInstance.component); - break; - } - // 移除多视图 - case 'removeMultiViewContainer': { - this.multiViewContextMenuService.removeMultiViewContainer(this.cmpInstance); - break; - } - case 'EnableEditInModalCard': case 'EnableEditInSidebarCard': { - this.cardEditService.createCardEdit(menu, this.cmpInstance); - break; - } - case 'DisableEditInModalCard': case 'DisableEditInSidebarCard': { - this.cardEditService.disableCardEdit(menu, this.cmpInstance); - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/card-edit.service.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/card-edit.service.ts deleted file mode 100644 index ef866ab3f93a798c7142a82c9b70430a8a11905e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/card-edit.service.ts +++ /dev/null @@ -1,904 +0,0 @@ -import { Injectable, Injector } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { EventEditorService, DomService, RefreshFormService, DesignViewModelService, FormComponentType, FormViewModel, WebCmdService } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { ControlService } from '../../../../../service/control.service'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { IdService } from '@farris/ui-common'; -import { cloneDeep } from 'lodash-es'; - -const DATAGRID_Edit_IN_CARD_COMMAND = 'editInCard'; -const DATAGRID_Edit_IN_SIDEBAR_COMMAND = 'EditInSidebarCard'; -const DATAGRID_Edit_IN_MODAL_COMMAND = 'EditInModalCard'; - -/** - * 子表启用弹窗编辑/侧边栏编辑构造实体类 - */ -export class CreateModalCardBuildInfo { - /** 弹窗组件id */ - componentId: string; - /** 组件id后缀 */ - componentIdPrefix: string; - /** 组件展示名称 */ - componentName: string; - /** 组件类型 */ - componentType: string; - /** 组件样式 */ - componentAppearance: string; - - /** 列表组件的列 */ - selectedFields: any[]; - /** 列表组件的数据源 */ - dataSource: string; - - /** 列表组件的ViewModelId */ - gridViewModelId: string; - - /** 列表组件的ComponenentId */ - gridComponentId: string; - - /** 展示方式:弹窗|侧边栏 */ - showType: 'modal' | 'sidebar'; -} - -/** - * 列表启用/移除侧边栏编辑、弹出卡片式编辑相关服务 - */ -export class DataGridEditByCardContextMenuService { - private domService: DomService; - private messagerService: MessagerService; - public refreshFormService: RefreshFormService; - private notifyService: NotifyService; - private controlService: ControlService; - private dgVMService: DesignViewModelService; - private webCmdService: WebCmdService; - private eventEditorService: EventEditorService; - - // 按钮命令 - btnCommand = { - Add: 'ModalAddItem1', - Remove: 'ModalRemoveItem1', - Cancel: 'ModalCancel1', - Save: 'ModalConfirm1', - SaveAndClose: 'ModalConfirmAndClose1', - Load: 'ModalLoad1', - LoadAndAdd: 'ModalLoadAndAdd1', - LoadAndEdit: 'ModalLoadAndEdit1', - LoadAndView: 'ModalLoadAndView1', - PopUpEdit: 'ModalPopUpEdit1', - PopUpAdd: 'ModalPopUpAdd1' - }; - /** 弹窗命令所属构件id。构件在webcmp包中 */ - popUpCmpId = '8d21e69c-70b3-44f6-88b5-fd6a8d3ce11b'; - - /** 创建组件所需的构造信息 */ - buildInfo: CreateModalCardBuildInfo; - - constructor( - private injector: Injector, private controlCreatorService: any) { - this.domService = this.injector.get(DomService); - this.notifyService = this.injector.get(NotifyService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.controlService = this.injector.get(ControlService); - this.messagerService = this.injector.get(MessagerService); - this.dgVMService = this.injector.get(DesignViewModelService); - this.webCmdService = this.injector.get(WebCmdService); - this.eventEditorService = this.injector.get(EventEditorService); - } - - assembleCardEditMenu(menuConfig: ControlContextMenuItem[], dataGridInstance: FarrisDesignBaseComponent) { - const multiViewMenu = menuConfig.find(menu => menu.category === DATAGRID_Edit_IN_CARD_COMMAND); - if (!multiViewMenu) { - return menuConfig; - } - // 只支持子表 - const viewModel = this.domService.getViewModelById(dataGridInstance.viewModelId); - if (viewModel.bindTo === '/') { - menuConfig = menuConfig.filter(menu => menu.category !== DATAGRID_Edit_IN_CARD_COMMAND); - return menuConfig; - } - - // 父级要有f-grid-is-sub样式,否则设计器显示卡片面板有高度样式问题---暂时用样式来判断,后续看能否优化,或者是否能通过模板来判断 - const parentCmpSchema = dataGridInstance.parent && dataGridInstance.parent.component; - if (parentCmpSchema && parentCmpSchema.appearance && parentCmpSchema.appearance.class && !parentCmpSchema.appearance.class.includes('f-grid-is-sub')) { - menuConfig = menuConfig.filter(menu => menu.category !== DATAGRID_Edit_IN_CARD_COMMAND); - return menuConfig; - } - - const modalEditMenu = menuConfig.find(menu => menu.id === DATAGRID_Edit_IN_MODAL_COMMAND); - const sidebarMenu = menuConfig.find(menu => menu.id === DATAGRID_Edit_IN_SIDEBAR_COMMAND); - const enableEditByCard = dataGridInstance.component.enableEditByCard; - switch (enableEditByCard) { - // 已启用弹出编辑 - case 'modal': { - modalEditMenu.id = 'Disable' + modalEditMenu.id; - modalEditMenu.title = '关闭' + modalEditMenu.title; - - sidebarMenu.id = 'Enable' + sidebarMenu.id; - sidebarMenu.title = '启用' + sidebarMenu.title; - break; - } - // 已启用侧边栏编辑 - case 'sidebar': { - modalEditMenu.id = 'Enable' + modalEditMenu.id; - modalEditMenu.title = '启用' + modalEditMenu.title; - - sidebarMenu.id = 'Disable' + sidebarMenu.id; - sidebarMenu.title = '关闭' + sidebarMenu.title; - break; - } - // 未启用弹出或侧边栏编辑 - default: { - modalEditMenu.id = 'Enable' + modalEditMenu.id; - modalEditMenu.title = '启用' + modalEditMenu.title; - - sidebarMenu.id = 'Enable' + sidebarMenu.id; - sidebarMenu.title = '启用' + sidebarMenu.title; - } - } - return menuConfig; - } - - /** - * 停用卡片式编辑 - * @param menu 菜单 - * @param dataGridInstance 列表组件实例 - */ - disableCardEdit(menu: ControlContextMenuItem, dataGridInstance: FarrisDesignBaseComponent) { - dataGridInstance.component.enableEditByCard = 'none'; - dataGridInstance.component.currentViewShowType = 'grid'; - // 停用: 不会将 弹窗组件和VM删除,是为了再次启用后不会丢失组件的改动 - const modalFrameComponent = this.domService.getComponentById(dataGridInstance.component.modalComponentId); - if (modalFrameComponent) { - modalFrameComponent.fakeDel = true; - this.changeFakeDelStateInModalComponent(true, modalFrameComponent.contents); - - } - this.refreshFormService.refreshFormDesigner.next(); - this.notifyService.success('已' + menu.title); - } - - createCardEdit(menu: ControlContextMenuItem, dataGridInstance: FarrisDesignBaseComponent) { - dataGridInstance.component.currentViewShowType = 'grid'; - dataGridInstance.component.enableEditByCard = menu.type; - - let modalComponentId = dataGridInstance.component.modalComponentId; - if (!modalComponentId) { - modalComponentId = dataGridInstance.component.id; - if (modalComponentId.includes('-component')) { - modalComponentId = modalComponentId.replace('-component', '-modal-component'); - } else { - modalComponentId = modalComponentId + '-modal'; - } - } - - - // 判断是否已经创建过弹窗组件 - const modalFrameComponent = this.domService.getComponentById(modalComponentId); - if (modalFrameComponent) { - - if (modalFrameComponent.showType !== menu.type) { - // 启用过卡片式编辑,需要切换modal或sidebar - const modifyInfo = { - componentId: modalComponentId, - showType: dataGridInstance.component.enableEditByCard, - gridViewModelId: dataGridInstance.viewModelId, - dataSource: dataGridInstance.component.dataSource, - oldShowType: modalFrameComponent.showType - }; - this.modifyCardShowType(modifyInfo); - - } - - modalFrameComponent.fakeDel = false; - this.changeFakeDelStateInModalComponent(false, modalFrameComponent.contents); - - this.refreshFormService.refreshFormDesigner.next(); - this.notifyService.success('切换成功'); - } else { - - // 没有启用过卡片式编辑 - const modalComponentBuildInfo = new CreateModalCardBuildInfo(); - const gridViewModel = this.domService.getViewModelById(dataGridInstance.viewModelId); - Object.assign(modalComponentBuildInfo, { - componentId: modalComponentId, - componentType: FormComponentType.modalFrame, - componentName: gridViewModel.name, - selectedFields: dataGridInstance.component.fields || [], - gridViewModelId: dataGridInstance.viewModelId, - gridComponentId: dataGridInstance.componentId, - dataSource: dataGridInstance.component.dataSource, - showType: dataGridInstance.component.enableEditByCard - }); - - this.createModalCard(modalComponentBuildInfo); - - dataGridInstance.component.modalComponentId = modalComponentId; - - // 因为涉及到新增【弹出控制器】,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - - this.refreshFormService.refreshFormDesigner.next(); - this.notifyService.success('启用成功'); - } - } - - changeFakeDelStateInModalComponent(flag: boolean, contents: any[]) { - - if (contents && contents.length) { - contents.forEach(c => { - if (c.contents) { - this.changeFakeDelStateInModalComponent(flag, c.contents); - } - - if (c.type !== DgControl.ComponentRef.type) { - return; - } - const modalFormCmp = this.domService.getComponentById(c.component); - if (modalFormCmp) { - modalFormCmp.fakeDel = flag; - } - - }); - } - } - /** - * 创建一个ModalFrame组件,内部包含Header控件、Form组件、ModalFooter控件 - * @param buildInfo 创建组件所需的构造信息 - */ - private createModalCard(buildInfo: CreateModalCardBuildInfo) { - - this.buildInfo = buildInfo; - - Object.keys(this.btnCommand).forEach(key => { - this.btnCommand[key] = buildInfo.dataSource + this.btnCommand[key]; - }); - - this.createComponentNode(); - this.createViewModeNode(); - - this.addPopupCommandToGridViewModel(); - } - /** - * 添加ModalFrame组件节点 - */ - private createComponentNode() { - const componentNode = this.controlService.getControlMetaData(DgControl.Component.type); - - const formComponentRef = this.createFormComponentContents(); - - const rootContainer = this.getModalCardContainer(formComponentRef); - Object.assign(componentNode, { - id: `${this.buildInfo.componentId}`, - viewModel: `${this.buildInfo.componentId}-viewmodel`, - componentType: this.buildInfo.componentType, - contents: [rootContainer], - dynamic: true, - showType: this.buildInfo.showType, - onInit: this.btnCommand.Load - }); - this.domService.components.push(componentNode); - - } - - /** - * 创建Form组件内容:component-section-form-controls - */ - private createFormComponentContents() { - - - let modalFormComponentId = ''; - if (this.buildInfo.componentId.includes('-component')) { - modalFormComponentId = this.buildInfo.componentId.replace('-component', '-form-component'); - } else { - modalFormComponentId = this.buildInfo.componentId + '-form-modal'; - } - - // 1、创建section - const section = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(section, { - id: 'form-section-' + this.buildInfo.componentId, - appearance: { - class: 'f-section-form f-section-in-mainsubcard' - }, - mainTitle: this.buildInfo.componentName, - showHeader: false - }); - // 2、创建form - const layoutForm = this.controlService.getControlMetaData(DgControl.Form.type); - const controls = []; - Object.assign(layoutForm, { - id: 'form-layout-' + this.buildInfo.componentId, - appearance: { - class: 'f-form-layout farris-form farris-form-controls-inline' - }, - contents: controls - }); - section.contents = [layoutForm]; - const { selectedFields, gridViewModelId } = this.buildInfo; - const gridDgViewModel = this.dgVMService.getDgViewModel(gridViewModelId); - // 3、创建控件 - selectedFields.forEach(gridFieldColumn => { - const dgVMField = gridDgViewModel.fields.find(dgField => dgField.id === gridFieldColumn.binding.field); - if (!dgVMField) { - return; - } - - const controlMetadata = this.controlCreatorService.createControlBySchemaFeild(dgVMField, 'form-col-4'); - controls.push(controlMetadata); - }); - - // 4、创建form组件节点 - const componentNode = this.controlService.getControlMetaData(DgControl.Component.type); - Object.assign(componentNode, { - id: modalFormComponentId, - viewModel: `${modalFormComponentId}-viewmodel`, - componentType: 'form-col-4', - contents: [section] - }); - this.domService.components.push(componentNode); - - - // 5、创建viewModel节点 - const gridViewModel = this.domService.getViewModelById(this.buildInfo.gridViewModelId); - const viewModelNode = new FormViewModel(); - Object.assign(viewModelNode, gridViewModel, { - id: `${modalFormComponentId}-viewmodel`, - code: `${modalFormComponentId}-viewmodel`, - name: this.buildInfo.componentName, - commands: [], - states: [], - fields: cloneDeep(gridViewModel.fields), - enableValidation: true - }); - this.domService.viewmodels.push(viewModelNode); - - // 6、创建组件引用节点 - const componentNodeRef = this.controlService.getControlMetaData(DgControl.ComponentRef.type); - Object.assign(componentNodeRef, { - id: `${modalFormComponentId}-ref`, - component: modalFormComponentId - }); - - return componentNodeRef; - - } - - /** - * 添加ModalFrame的viewModel节点 - */ - private createViewModeNode(): any { - const stateMachines = this.domService.module.stateMachines; - - const gridDgViewModel = this.domService.getViewModelById(this.buildInfo.gridViewModelId); - - const viewModelNode = new FormViewModel(); - Object.assign(viewModelNode, gridDgViewModel, { - id: `${this.buildInfo.componentId}-viewmodel`, - code: `${this.buildInfo.componentId}-viewmodel`, - name: this.buildInfo.componentName, - commands: this.createCommands(this.buildInfo.gridViewModelId, this.buildInfo.gridComponentId, this.buildInfo.componentId), - states: [], - fields: [], - stateMachine: stateMachines && stateMachines.length && stateMachines[0].id, - enableValidation: true - }); - - this.domService.viewmodels.push(viewModelNode); - - // 在命令构件的引用信息中记录子表的命令对构件方法的引用。 - const webcmds = this.domService.getWebCmds(); - let popupWebcmd = webcmds.find(item => item.id === this.popUpCmpId); - if (!popupWebcmd) { - popupWebcmd = { - id: this.popUpCmpId, - path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd', - name: 'PopController.webcmd', - refedHandlers: [] - }; - webcmds.push(popupWebcmd); - } - for (const command of viewModelNode.commands) { - popupWebcmd.refedHandlers.push({ host: command.id, handler: command.handlerName }); - } - } - - /** - * 创建弹窗根节点 - */ - private getModalCardContainer(formComponentRef: any) { - const controlIdPostfix = '-' + this.buildInfo.dataSource + '-modal'; - - const viewModelId = `${this.buildInfo.componentId}-viewmodel`; - this.createModalCardButtons(this.buildInfo.dataSource, viewModelId, controlIdPostfix); - - - - return { - id: 'root-layout' + controlIdPostfix, - type: 'ContentContainer', - appearance: - { - class: 'f-page f-page-card f-page-is-mainsubcard f-page-in-dialog bg-white' - }, - size: null, - contents: [ - { - id: 'page-header' + controlIdPostfix, - type: 'Header', - visible: true, - appearance: null, - size: null, - mainTitle: this.buildInfo.componentName, - subTitle: '', - showIcon: true, - iconName: 'f-icon-page-title-record', - iconCls: 'f-text-orna-bill', - pgShow: false, - pgPreDisabled: true, - pgNextDisabled: true, - pgPreClick: null, - pgNextClick: null, - showViewChange: false, - viewType: 'dropdown', - toolbarCls: 'col-6', - toolbarDatas: '', - toolbarBtnSize: 'lg', - toolbarPopDirection: 'default' - }, - { - id: 'main-container' + controlIdPostfix, - type: 'ContentContainer', - appearance: - { - class: 'f-page-main f-utils-overflow-auto' - }, - size: null, - contents: [ - { - id: 'like-card-container' + controlIdPostfix, - type: 'ContentContainer', - appearance: - { - class: 'f-struct-like-card' - }, - size: null, - contents: [formComponentRef], - visible: true, - draggable: false, - isLikeCardContainer: true, - isScrollspyContainer: false - } - ], - visible: true, - isScrollspyContainer: false, - draggable: false - }, - { - id: 'page-footer' + controlIdPostfix, - type: 'ModalFooter', - visible: true, - appearance: null, - size: null, - toolbarCls: 'col-6', - toolbarDatas: null, - toolbarBtnSize: 'lg', - toolbarPopDirection: 'top' - } - ], - visible: true, - isScrollspyContainer: false, - draggable: false - }; - - } - - /** - * 创建弹窗header和footer按钮 - */ - private createModalCardButtons(dataSource: string, viewModelId: string, controlIdPostfix: string) { - - const modalHeaderControlId = 'page-header' + controlIdPostfix; - const modalFooterControlId = 'page-footer' + controlIdPostfix; - - - this.createModalToolbar(dataSource, modalHeaderControlId, viewModelId, 'Add', '新增'); - this.createModalToolbar(dataSource, modalHeaderControlId, viewModelId, 'Remove', '删除'); - - this.createModalToolbar(dataSource, modalFooterControlId, viewModelId, 'Cancel', '取消'); - this.createModalToolbar(dataSource, modalFooterControlId, viewModelId, 'Save', '保存'); - this.createModalToolbar(dataSource, modalFooterControlId, viewModelId, 'SaveAndClose', '保存并关闭'); - - } - - private createModalToolbar(dataSource: string, controlId: string, viewModelId: string, buttonType: string, buttonText: string) { - - // 1、创建按钮 - const toolbarItem = this.controlService.getControlMetaData(DgControl.ToolBarItem.type); - - toolbarItem.id = dataSource + buttonType + 'Button'; - toolbarItem.text = buttonText; - toolbarItem.click = this.btnCommand[buttonType]; - toolbarItem.disable = '!viewModel.stateMachine[\'editable\']'; - - if (buttonType === 'Add') { - toolbarItem.appearance = { class: 'btn-primary' }; - } - - // 2、在DOM中记录按钮结构:toolbar.items.[viewModelId].XXX - if (!this.domService.module.toolbar.items[viewModelId]) { - this.domService.module.toolbar.items[viewModelId] = []; - } - this.domService.module.toolbar.items[viewModelId].push(toolbarItem); - - // 3、记录控件对按钮的引用信息:toolbar.configs.[showType].[controlId] - const toolbarConfigs = this.domService.module.toolbar.configs; - const currentShowType = this.buildInfo.showType; - if (!toolbarConfigs[currentShowType]) { - toolbarConfigs[currentShowType] = { - [controlId]: [] - }; - } - if (!toolbarConfigs[currentShowType][controlId]) { - toolbarConfigs[currentShowType][controlId] = []; - } - - toolbarConfigs[currentShowType][controlId].push(toolbarItem.id); - } - - /** - * 创建弹窗组件命令 - * @param gridViewModelId 子表所属viewModel id - * @param gridComponentId 列表组件id - * @param modalComponentId 弹窗组件id - */ - private createCommands(gridViewModelId: string, gridComponentId: string, modalComponentId: string) { - const idService = new IdService(); - - const gridVM = this.domService.getViewModelById(gridViewModelId); - if (!gridVM || !gridVM.commands) { - return; - } - - return [ - { - id: idService.generate(), - code: this.btnCommand.Add, - name: '增加一条子表数据', - params: [ - { - name: 'action', - shownName: '状态机动作', - value: 'Create' - } - ], - handlerName: 'AddItem', - cmpId: this.popUpCmpId, - extensions: [], - isInvalid: false - }, - { - id: idService.generate(), - code: this.btnCommand.Remove, - name: '删除一条子表数据', - params: [ - { - name: 'id', - shownName: '待删除子表数据的标识', - value: `{DATA~/#{${gridComponentId}}${gridVM.bindTo}/id}` - } - ], - handlerName: 'RemoveItem', - cmpId: this.popUpCmpId, - extensions: [], - isInvalid: false - }, - { - id: idService.generate(), - code: this.btnCommand.Cancel, - name: '取消', - params: [ - { - name: 'frameId', - shownName: '目标组件', - value: modalComponentId - }, - { - name: 'id', - shownName: '当前数据标识', - value: '' - } - ], - handlerName: 'Cancel', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [], - isInvalid: false - }, - { - id: idService.generate(), - code: this.btnCommand.Save, - name: '确认', - params: [], - handlerName: 'Confirm', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.SaveAndClose, - name: '确认并关闭', - params: [], - handlerName: 'ConfirmAndClose', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.LoadAndAdd, - name: '新增一条数据', - params: [ - { - name: 'action', - shownName: '状态机动作', - value: 'Create' - } - ], - handlerName: 'LoadAndAdd', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.LoadAndEdit, - name: '编辑当前数据', - params: [ - { - name: 'action', - shownName: '状态机动作', - value: 'Edit' - } - ], - handlerName: 'LoadAndEdit', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.LoadAndView, - name: '查看一条数据', - params: [ - { - name: 'action', - shownName: '状态机动作', - value: 'Cancel' - } - ], - handlerName: 'LoadAndView', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.Load, - name: '加载', - params: [ - { - name: 'commandName', - shownName: '待执行方法名称', - value: '{UISTATE~/#{' + modalComponentId + '}/action}' - }, - { - name: 'frameId', - shownName: '目标组件', - value: '#{' + modalComponentId + '}' - } - ], - handlerName: 'Load', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - } - ]; - } - - /** - * 列表组件内预置打开弹窗的命令 - */ - private addPopupCommandToGridViewModel() { - const { gridViewModelId, componentId: modalComponentId, gridComponentId } = this.buildInfo; - - const gridVM = this.domService.getViewModelById(gridViewModelId); - if (!gridVM || !gridVM.commands) { - return; - } - - const idService = new IdService(); - const popupCommands = [{ - id: idService.generate(), - code: this.btnCommand.PopUpEdit, - name: '在弹出窗口中编辑数据', - params: [ - { - name: 'mode', - shownName: '打开方式', - value: this.buildInfo.showType - }, - { - name: 'modalId', - shownName: '弹出窗口标识', - value: modalComponentId - }, - { - name: 'configs', - shownName: '弹出窗口配置', - value: this.buildInfo.showType === 'modal' ? '{\"width\":900,\"height\":500}' : '{\"width\":\"60%\"}' - }, - { - name: 'params', - shownName: '参数', - value: '{\"action\":"' + this.btnCommand.LoadAndEdit + '\"}' - }, - { - name: 'idToEdit', - shownName: '待编辑数据的标识', - value: '{DATA~/#{' + gridComponentId + '}' + gridVM.bindTo + '/id}' - } - ], - handlerName: 'PopUpAndEdit', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }, - { - id: idService.generate(), - code: this.btnCommand.PopUpAdd, - name: '弹出窗口并新增数据', - params: [ - { - name: 'mode', - shownName: '打开方式', - value: this.buildInfo.showType - }, - { - name: 'modalId', - shownName: '弹出窗口标识', - value: modalComponentId - }, - { - name: 'configs', - shownName: '弹出窗口配置', - value: this.buildInfo.showType === 'modal' ? '{\"width\":900,\"height\":500}' : '{\"width\":\"60%\"}' - }, - { - name: 'params', - shownName: '参数', - value: '{\"action\":"' + this.btnCommand.LoadAndAdd + '\"}' - } - ], - handlerName: 'PopUp', - cmpId: this.popUpCmpId, - shortcut: {}, - extensions: [] - }]; - - - - // 在命令构件的引用信息中记录子表的命令对构件方法的引用。 - const webcmds = this.domService.getWebCmds(); - let popupWebcmd = webcmds.find(item => item.id === this.popUpCmpId); - if (!popupWebcmd) { - popupWebcmd = { - id: this.popUpCmpId, - path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd', - name: 'PopController.webcmd', - refedHandlers: [] - }; - webcmds.push(popupWebcmd); - } - popupCommands.forEach(c => { - gridVM.commands.push(c); - popupWebcmd.refedHandlers.push({ host: c.id, handler: c.handlerName }); - }); - - - // 安装PopController的maven包 - } - - - /** - * 切换编辑方式:在弹窗和侧边栏之间切换 - */ - private modifyCardShowType(modifyInfo: { - componentId: string, showType: string, gridViewModelId: string, dataSource: string, oldShowType: string - }) { - const modalFrameComponent = this.domService.getComponentById(modifyInfo.componentId); - modalFrameComponent.showType = modifyInfo.showType; - - // 1、修改列表组件中预置的打开弹窗的命令:前提是用户没有自行修改过预置命令的编号 - const gridVM = this.domService.getViewModelById(modifyInfo.gridViewModelId); - if (!gridVM || !gridVM.commands) { - return; - } - const popupAddCommandCode = modifyInfo.dataSource + this.btnCommand.PopUpAdd; - const popupAddCommand = gridVM.commands.find(command => - command.cmpId === this.popUpCmpId && command.handlerName === 'PopUp' && command.code === popupAddCommandCode); - if (popupAddCommand && popupAddCommand.params) { - popupAddCommand.params.forEach(param => { - if (param.name === 'mode') { - param.value = modifyInfo.showType; - } - if (param.name === 'configs') { - param.value = modifyInfo.showType === 'modal' ? '{\"width\":900,\"height\":500}' : '{\"width\":\"60%\"}'; - } - }); - } - - const popupEditCommandCode = modifyInfo.dataSource + this.btnCommand.PopUpEdit; - const popupEditCommand = gridVM.commands.find(command => - command.cmpId === this.popUpCmpId && command.handlerName === 'PopUpAndEdit' && command.code === popupEditCommandCode); - if (popupEditCommand && popupEditCommand.params) { - popupEditCommand.params.forEach(param => { - if (param.name === 'mode') { - param.value = modifyInfo.showType; - } - if (param.name === 'configs') { - param.value = modifyInfo.showType === 'modal' ? '{\"width\":900,\"height\":500}' : '{\"width\":\"60%\"}'; - } - }); - } - - - // 2、修改按钮:例如将sidebar模式下的头部和底部按钮移动到modal模式下 - const toolbar = this.domService.module.toolbar; - if (!toolbar || !toolbar.configs || !toolbar.configs[modifyInfo.oldShowType]) { - return; - } - const oldToolbarConfigShowType = toolbar.configs[modifyInfo.oldShowType]; - if (!oldToolbarConfigShowType) { - return; - } - if (!toolbar.configs[modifyInfo.showType]) { - toolbar.configs[modifyInfo.showType] = {}; - } - const controlIdPostfix = '-' + modifyInfo.dataSource + '-modal'; - - const modalHeaderControlId = 'page-header' + controlIdPostfix; - const modalFooterControlId = 'page-footer' + controlIdPostfix; - - - toolbar.configs[modifyInfo.showType][modalHeaderControlId] = oldToolbarConfigShowType[modalHeaderControlId]; - toolbar.configs[modifyInfo.showType][modalFooterControlId] = oldToolbarConfigShowType[modalFooterControlId]; - - delete oldToolbarConfigShowType[modalHeaderControlId]; - delete oldToolbarConfigShowType[modalFooterControlId]; - - } - - /** - * 安装popController所属元数据包 - * @param packageNames 待安装的元数据包 - */ - // checkAndRestoreMetadataPackages() { - // const qdpMetadataPackages = 'Inspur.GS.Gsp.QDP.QdpCmp.mdpkg,Inspur.GS.Gsp.QDP.QdpCommonCmp.mdpkg,Inspur.Gsp.Common.CommonCmp.mdpkg'; - // const formMetadataPath = this.formBasicService.formMetaBasicInfo.relativePath; - - // let projPath: string; - // return this.metadataService.GetProjPath(formMetadataPath).pipe( - // switchMap(path => { - // projPath = path; - // return this.metadataService.getMavenStatus(projPath); - // }), - // switchMap(isMaven => { - // return this.metadataService.addDependencyAndRestore(projPath, qdpMetadataPackages, isMaven); - // }) - // ); - // } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/list-filter.service.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/list-filter.service.ts deleted file mode 100644 index 73cc9d9852f36c541eb2f4a93b476c1f3fc3583c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/list-filter.service.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { NotifyService } from '@farris/ui-notify'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { EventEditorService,DomService, RefreshFormService } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ListFilterFieldsEditorComponent } from '../../../../filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component'; -import { ListFilterBuilderService } from '../../../../filter/list-filter/context-menu/filter-builder'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; - -/** - * 列表启用/移除筛选条相关服务 - */ -export class DataGridFilterContextMenuService { - - private domService: DomService; - private messagerService: MessagerService; - public refreshFormService: RefreshFormService; - private notifyService: NotifyService; - private modalService: BsModalService; - private resolver: ComponentFactoryResolver; - private eventEditorService:EventEditorService; - constructor(private injector: Injector) { - - this.domService = this.injector.get(DomService); - this.eventEditorService = this.injector.get(EventEditorService); - this.notifyService = this.injector.get(NotifyService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.messagerService = this.injector.get(MessagerService); - this.modalService = this.injector.get(BsModalService); - this.resolver = this.injector.get(ComponentFactoryResolver); - } - - /** - * 组装筛选条菜单 - * @param viewModelId 列表所在视图模型id - * @param menuConfig 当前菜单数据 - */ - assembleListFilterMenu(viewModelId: string, menuConfig: ControlContextMenuItem[]) { - const listFilterMenu = menuConfig.find(menu => menu.id === DgControl.ListFilter.type); - if (!listFilterMenu) { - return menuConfig; - } - - // 若不能启用筛选条,则移除菜单(表格绑定子实体,不支持启用筛选条) - if (!this.checkCanEnableListFilter(viewModelId)) { - menuConfig = menuConfig.filter(menu => menu.id !== DgControl.ListFilter.type); - return menuConfig; - } - - const gridComponent = this.domService.getComponentByVMId(viewModelId); - let listFilterExisted = false; - - // 筛选条(目前的表单筛选条认为在列表组件内部) - if (this.checkControlExistByType(DgControl.ListFilter.type, gridComponent.id)) { - listFilterExisted = true; - } - - if (listFilterExisted) { - listFilterMenu.title = '移除' + listFilterMenu.title; - listFilterMenu.id = 'remove' + listFilterMenu.id; - } else { - listFilterMenu.title = '启用' + listFilterMenu.title; - listFilterMenu.id = 'enable' + listFilterMenu.id; - } - - return menuConfig; - } - - - /** - * 弹出筛选条配置编辑器 - */ - openListFilterModal(viewModelId: string, dataGridId: string) { - - const compFactory = this.resolver.resolveComponentFactory(ListFilterFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选条字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.value = []; - compRef.instance.editorParams = { - viewModelId, - controlSource: 'normal' - }; - compRef.instance.showPropertyPanel = false; - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - const filterBuilderService = new ListFilterBuilderService(this.injector); - filterBuilderService.createListFilterInDocument(data.value, viewModelId, dataGridId); - - this.notifyService.success('启用成功'); - this.refreshFormService.refreshFormDesigner.next(); - } - modalPanel.close(); - }); - } - - - /** - * 校验是否可以启用筛选条 - */ - private checkCanEnableListFilter(viewModelId: string) { - // 限定只有绑定主表的列表可以启用筛选条 - const viewModel = this.domService.getViewModelById(viewModelId); - if (viewModel.bindTo !== '/') { - return false; - } - - // 校验是否启用过筛选方案,筛选方案和筛选条互斥,不能同时启用 - const querySchemeExisted = this.checkControlExistByType(DgControl.QueryScheme.type); - - return !querySchemeExisted; - } - - /** - * 移除列表上方的筛选条 - * @param viewModelId 列表所属视图模型ID - * @param dataGridId 列表控件id - */ - removeListFilter(viewModelId: string, cmpInstance: FarrisDesignBaseComponent) { - this.messagerService.question('确定移除筛选条?', () => { - const filterBuilderService = new ListFilterBuilderService(this.injector); - filterBuilderService.removeListFilterInDocument(viewModelId); - - cmpInstance.emit('clearPropertyPanel'); - - this.notifyService.success('已移除筛选条'); - this.refreshFormService.refreshFormDesigner.next(); - }); - - } - - /** - * 在指定组件内根据类型校验控件是否存在 - * @param controlType 控件类型 - * @param componentId 组件ID - */ - private checkControlExistByType(controlType: string, componentId = 'root-component') { - const rootCmp = this.domService.getComponentById(componentId); - return this.domService.selectNode(rootCmp, item => item.type === controlType); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/multi-view.service.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/multi-view.service.ts deleted file mode 100644 index 4354e07db999c7925fa986e65f1985e62f40960f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/multi-view.service.ts +++ /dev/null @@ -1,408 +0,0 @@ -import { Injector } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { EventEditorService, DomService, RefreshFormService, FormTempateOutlineSchema } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { ControlService } from '../../../../../service/control.service'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; - - -const DATAGRID_MULTI_VIEW_COMMAND = 'MultiViewContainer'; - -/** - * 列表启用/移除多视图相关服务 - */ -export class DataGridMultiViewContextMenuService { - - /** 列表组件Ref节点的父节点 */ - gridRefParentNode: any; - private eventEditorService: EventEditorService; - private domService: DomService; - private messagerService: MessagerService; - public refreshFormService: RefreshFormService; - private notifyService: NotifyService; - private controlService: ControlService; - - constructor( - private injector: Injector) { - this.domService = this.injector.get(DomService); - this.eventEditorService = this.injector.get(EventEditorService); - this.notifyService = this.injector.get(NotifyService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.controlService = this.injector.get(ControlService); - this.messagerService = this.injector.get(MessagerService); - } - - /** - * 组装多视图菜单项 - * @param menuConfig 多视图菜单 - * @param dataGridId 列表id - * @param componentId 列表所属组件id - */ - assembleMultiViewMenu(menuConfig: ControlContextMenuItem[], dataGridId: string, componentId: string) { - const multiViewMenu = menuConfig.find(menu => menu.id === DATAGRID_MULTI_VIEW_COMMAND); - if (!multiViewMenu) { - return menuConfig; - } - // 若检测到模板schema配置节,则根据配置节中是否包含多视图配置节来判断;若没有检测到配置节,则默认允许启用多视图 - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const dataGridSchemaItem = this.findOutlineSchemaNodeByControlId(templateOutlineSchema, dataGridId, componentId); - if (dataGridSchemaItem && (!dataGridSchemaItem.multiView || !dataGridSchemaItem.multiView.canEnable)) { - menuConfig = menuConfig.filter(menu => menu.id !== DATAGRID_MULTI_VIEW_COMMAND); - return menuConfig; - } - - // 双列表标签页模板,不支持启用多视图 - if (this.domService && this.domService.module && this.domService.module.templateId === 'double-list-in-tab-template') { - menuConfig = menuConfig.filter(menu => menu.id !== DATAGRID_MULTI_VIEW_COMMAND); - return menuConfig; - } - - const rootCmp = this.domService.getComponentById('root-component'); - const nodeInfo = this.domService.selectNodeAndParentNode(rootCmp, item => item.type === DgControl.ComponentRef.type && item.component === componentId, rootCmp); - this.gridRefParentNode = nodeInfo.parentNode; - - if (this.gridRefParentNode.type === DgControl.MultiViewItem.type) { - multiViewMenu.title = '移除多视图'; - multiViewMenu.id = 'remove' + multiViewMenu.id; - } else { - multiViewMenu.title = '启用多视图'; - multiViewMenu.id = 'enable' + multiViewMenu.id; - } - - return menuConfig; - } - - - /** - * 根据控件所属组件id判断控件在schema中所属的区域 - * @param controlId 控件id - */ - private findOutlineSchemaNodeByControlId(outlineSchema: FormTempateOutlineSchema[], controlId: string, componentId: string) { - if (!outlineSchema || outlineSchema.length === 0) { - return; - } - - for (const schemaItem of outlineSchema) { - - if (schemaItem.children && schemaItem.children.length > 0) { - const item = this.findOutlineSchemaNodeByControlId(schemaItem.children, controlId, componentId); - if (item) { - return item; - } - } - if (schemaItem.type !== 'DataGrid') { - continue; - } - const rootCmp = this.domService.getComponentById('root-component'); - if (typeof (schemaItem.path) === 'object' && schemaItem.path.length) { - for (const path of schemaItem.path) { - const containerNode = this.domService.getNodeByIdPath(rootCmp, path); - const gridCmpRefNode = this.domService.selectNode(containerNode, - item => item.type === DgControl.ComponentRef.type && item.component === componentId); - if (gridCmpRefNode) { - return schemaItem; - } - } - } else { - if (schemaItem.isGridCollection) { - const containerNodes = this.domService.getNodesByIdPath(rootCmp, schemaItem.path as string); - for (const containerNode of containerNodes) { - const gridCmpRefNode = this.domService.selectNode(containerNode, - item => item.type === DgControl.ComponentRef.type && item.component === componentId); - if (gridCmpRefNode) { - return schemaItem; - } - } - - } else { - const containerNode = this.domService.getNodeByIdPath(rootCmp, schemaItem.path as string); - const gridCmpRefNode = this.domService.selectNode(containerNode, - item => item.type === DgControl.ComponentRef.type && item.component === componentId); - if (gridCmpRefNode) { - return schemaItem; - } - } - - } - } - } - - /** - * 启用多视图 - * @param viewModelId 视图模型id - * @param dataSource 绑定数据源 - */ - enableMultiViewContainer(viewModelId: string, dataGrid: any) { - this.enableGridMultiView(this.gridRefParentNode, viewModelId, dataGrid); - - // 刷新页面 - this.refreshFormService.refreshFormDesigner.next(); - this.notifyService.success('启用成功'); - } - - /** - * 移除多视图 - */ - removeMultiViewContainer(cmpInstance: FarrisDesignBaseComponent) { - - this.messagerService.question('确定移除多视图?', () => { - this.removeGridMultiView(this.gridRefParentNode); - - cmpInstance.emit('clearPropertyPanel'); - - // 刷新页面 - this.refreshFormService.refreshFormDesigner.next(); - this.notifyService.success('已移除多视图'); - }); - - } - - - /** - * 启用多视图 - * @param componentContainer 列表组件ComponentRef节点的父容器 - * @param viewModelId 列表组件所在ViewModelId - * @param dataSource 列表组件数据源 - */ - private enableGridMultiView(componentContainer: any, viewModelId: string, dataGrid: any) { - - const radomNum = Math.random().toString().slice(2, 6); - const dataGridComponentRefIndex = componentContainer.contents.findIndex(co => co.type === DgControl.ComponentRef.type); - const dataGridComponentRef = componentContainer.contents[dataGridComponentRefIndex]; - const dataridViewModel = this.domService.getViewModelById(viewModelId); - const multiviewContainer = this.controlService.getControlMetaData(DgControl.MultiViewContainer.type); - const dataGridMultiviewItem = this.controlService.getControlMetaData(DgControl.MultiViewItem.type); - const viewChange = this.controlService.getControlMetaData(DgControl.ViewChange.type); - - // 创建多视图组件 - let multiViewContainerClass = ''; - if (dataridViewModel.bindTo === '/') { - multiViewContainerClass += 'f-utils-fill-flex-column'; - } - if (dataGrid.isChildFill) { - multiViewContainerClass += ' f-multiview-fill'; // 子表启用容器填充 - } - Object.assign(multiviewContainer, { - id: `${componentContainer.id}-multiview`, - appearance: { - class: multiViewContainerClass - }, - contents: [dataGridMultiviewItem], - viewGroupIdentify: componentContainer.id, - defaultType: `viewItem_${radomNum}`, - dataSource: dataGrid.dataSource - }); - - - // 创建多视图项,存放原datagrid 组件引用节点 - const multiViewClass = dataridViewModel.bindTo === '/' ? - 'f-viewchange-content-item f-utils-fill-flex-column' : 'f-viewchange-content-item'; - Object.assign(dataGridMultiviewItem, { - id: `viewItem_${radomNum}`, - appearance: { - class: multiViewClass - }, - title: `表格视图`, - icon: 'f-icon f-icon-table_view', - contents: [dataGridComponentRef] - }); - - // 创建视图切换图标组件 - Object.assign(viewChange, { - id: `${componentContainer.id}-viewchange`, - appearance: { - class: 'f-btn-ml' - }, - defaultType: `viewItem_${radomNum}`, - toolbarData: [ - { - type: `viewItem_${radomNum}`, - title: `表格视图`, - iconName: 'f-icon f-icon-table_view' - } - ], - viewGroupIdentify: componentContainer.id - }); - - componentContainer.contents[dataGridComponentRefIndex] = multiviewContainer; - - // 在标签页中追加多视图属性 - if (componentContainer.type === DgControl.TabPage.type || componentContainer.type === DgControl.Section.type) { - viewChange.viewType = 'tile'; - componentContainer.multiViews = true; - componentContainer.views = viewChange; - } - - // 在表单header容器中追加多视图组件 - if (componentContainer.type === DgControl.ContentContainer.type) { - const componentContainerAppearance = componentContainer.appearance || {}; - const componentContainerClass: string = componentContainerAppearance.class || ''; - if (componentContainerClass.indexOf('f-page-main') > -1) { - const rootComponentElement = this.domService.getComponentById('root-component'); - const { pageHeaderElement, path } = this.findPageHeaderElement(rootComponentElement); - if (pageHeaderElement) { - this.updatePageHeader(pageHeaderElement, viewChange, multiviewContainer, path); - } - } - } - - } - /** - * 关闭多视图 - * @param componentContainer 列表组件ComponentRef节点的父容器,多视图状态下父容器是MultiViewItem - */ - private removeGridMultiView(componentContainer: any) { - const rootComponentElement = this.domService.getComponentById('root-component'); - - const multiviewItemElement = componentContainer; - let gridComponentRefElement = null; - let gridComponentRefElementIndex; - if (multiviewItemElement && multiviewItemElement.contents && multiviewItemElement.contents.length) { - gridComponentRefElementIndex = multiviewItemElement.contents.findIndex(co => co.type === DgControl.ComponentRef.type); - gridComponentRefElement = multiviewItemElement.contents[gridComponentRefElementIndex]; - } - - const multiviewInfo = this.domService.selectNodeAndParentNode(rootComponentElement, - (item) => - item.type === DgControl.MultiViewContainer.type && item.contents && item.contents.find(i => i.id === componentContainer.id) - , null); - if (!multiviewInfo) { - return; - } - // 多视图组件节点 - const multiviewContainerElement = multiviewInfo.node; - // 多视图组件的父节点,用于存放DataGrid ComponentRef节点 - const componentContainerElement = multiviewInfo.parentNode; - - if (componentContainerElement && gridComponentRefElement) { - const index = componentContainerElement.contents.findIndex(element => element.id === multiviewContainerElement.id); - componentContainerElement.contents.splice(index, 1, ...multiviewItemElement.contents); - - // 移除标签页下的viewChange按钮 - if (componentContainerElement.type === DgControl.TabPage.type || componentContainerElement.type === DgControl.Section.type) { - if (componentContainerElement.multiViews) { - componentContainerElement.multiViews = false; - } - if (componentContainerElement.views) { - componentContainerElement.views = {}; - } - } - } - - // 移除header区域viewChagne按钮 - let viewChangeElement; - if (multiviewContainerElement && multiviewContainerElement.viewChangeBar && gridComponentRefElement) { - // componentContainerElement.contents = [gridComponentRefElement]; - const rootComponentJson = this.domService.getComponentById('root-component'); - viewChangeElement = this.domService.getNodeByIdPath(rootComponentJson, multiviewContainerElement.viewChangeBar); - const headerToolbarContainer = this.domService.domDgMap.get('header-nav'); - - headerToolbarContainer.contents = headerToolbarContainer.contents.filter(co => co.id !== viewChangeElement.id); - } - - multiviewContainerElement.contents.forEach(multiViewItem => { - this.removeRedundantNodeInMultiViewItem(multiViewItem, gridComponentRefElement.id); - }); - - return componentContainerElement; - } - - /** - * 多视图项中若包含除DataGrid ComponentRef节点外的其他componentRef或ExternalContainer,则需要删除组件节点和外部组件的声明节点 - * @param multiviewContainerElement 多视图组件节点 - */ - private removeRedundantNodeInMultiViewItem(multiViewItem: any, gridComponentRefElementId: string) { - - - // 删除组件节点和viewModel节点 - const cmpRefNode = this.domService.selectNode(multiViewItem, - (item) => item.type === DgControl.ComponentRef.type && item.id !== gridComponentRefElementId); - if (cmpRefNode) { - const cmp = this.domService.getComponentById(cmpRefNode.component); - if (cmp) { - this.domService.deleteComponent(cmp.id); - this.domService.deleteViewModelById(cmp.viewModel); - } - } - - // 删除外部组件的声明节点和订阅节点 - const externalContainerNode = this.domService.selectNode(multiViewItem, - (item) => item.type === DgControl.ExternalContainer.type); - if (externalContainerNode && externalContainerNode.externalCmp) { - this.domService.deleteExternalComponent(externalContainerNode.externalCmp); - this.deleteComponentSubscription(externalContainerNode.externalCmp); - } - - - } - private deleteComponentSubscription(cmpId: string) { - const subscriptions = this.domService.module.subscriptions; - if (subscriptions && subscriptions.length) { - this.domService.module.subscriptions = subscriptions.filter( - (item) => item.sourceComponent !== cmpId && item.targetComponent !== cmpId - ); - } - - } - /** - * 定位页头 (TODO:页头有header容器和header组件两种可能) - * @param rootComponentElement 根组件 - */ - private findPageHeaderElement(rootComponentElement): { pageHeaderElement: any, path: string } { - const rootLayoutElement = rootComponentElement.contents[0]; - let pageHeaderElement = rootLayoutElement.contents.find((element) => element.id === 'page-header'); - if (pageHeaderElement) { - const path = 'root-layout.page-header'; - return { pageHeaderElement, path }; - } else { - const rootLayoutContentElement = rootLayoutElement.contents.find((element) => element.id === 'root-layout-content'); - if (rootLayoutContentElement) { - const pageContentElement = rootLayoutContentElement.contents.find((element) => element.id === 'page-content'); - if (pageContentElement) { - const pageContentMainElement = pageContentElement.contents.find((element) => element.id === 'page-content-main'); - if (pageContentMainElement) { - const pageContentLayoutElement = pageContentMainElement.contents - .find((element) => element.id === 'page-content-layout'); - if (pageContentLayoutElement) { - pageHeaderElement = pageContentLayoutElement.contents.find((element) => element.id === 'page-header'); - if (pageHeaderElement) { - // tslint:disable-next-line:max-line-length - const path = 'root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-header'; - return { pageHeaderElement, path }; - } - } - } - } - } - } - } - - private updatePageHeader(pageHeaderElement: any, viewChange: any, multiviewContainer: any, pathHeaderPath: string) { - if (pageHeaderElement.type === DgControl.ContentContainer.type) { - const pageHeaderNavElement = pageHeaderElement.contents.find((element) => element.id === 'header-nav'); - if (pageHeaderNavElement) { - const pageHeaderNavElementContents: any[] = pageHeaderNavElement.contents || []; - const toolbarElementIndex = pageHeaderNavElementContents.findIndex( - (element: any) => element.type === DgControl.ToolBar.type); - if (toolbarElementIndex > -1) { - const toolbarElement = pageHeaderNavElementContents[toolbarElementIndex]; - Object.assign(toolbarElement, { - appearance: { - class: 'col-7 f-toolbar ml-auto' - } - }); - } - pageHeaderNavElementContents.push(viewChange); - - // 在多视图组件中记录viewChange图标的路径 - const path = `${pathHeaderPath}.header-nav.${viewChange.id}`; - multiviewContainer.viewChangeBar = path; - } - } else if (pageHeaderElement.type === DgControl.Header.type) { - - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/query-scheme.service.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/query-scheme.service.ts deleted file mode 100644 index ba0c0dc5993b2007f8363b908af65f4629b13122..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/context-menu/services/query-scheme.service.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { NotifyService } from '@farris/ui-notify'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { EventEditorService, DomService, RefreshFormService } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { QuerySchemeBuilderService } from '../../../../filter/queryScheme/context-menu/query-scheme-builder'; -import { QuerySchemeFieldsEditorComponent } from '../../../../filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component'; -import { QuerySchemePresetFieldsEditorComponent } from '../../../../filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; - -/** - * 列表启用/移除筛选方案相关服务 - */ -export class DataGridQuerySchemeContextMenuService { - - private domService: DomService; - private messagerService: MessagerService; - public refreshFormService: RefreshFormService; - private notifyService: NotifyService; - private modalService: BsModalService; - private eventEditorService: EventEditorService; - private resolver: ComponentFactoryResolver; - - // 筛选方案相关配置 - querySchemeConfig: any; - - constructor(private injector: Injector) { - this.eventEditorService = this.injector.get(EventEditorService); - this.domService = this.injector.get(DomService); - this.notifyService = this.injector.get(NotifyService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.messagerService = this.injector.get(MessagerService); - this.modalService = this.injector.get(BsModalService); - this.resolver = this.injector.get(ComponentFactoryResolver); - } - - - /** - * 组装筛选方案菜单 - */ - assembleQuerySchemeMenu(gridComponentId: string, menuConfig: ControlContextMenuItem[]) { - const querySchemeMenu = menuConfig.find(menu => menu.id === DgControl.QueryScheme.type); - if (!querySchemeMenu) { - return menuConfig; - } - // 若不能启用筛选方案,则移除菜单 - if (!this.checkCanEnableQueryScheme(gridComponentId)) { - menuConfig = menuConfig.filter(menu => menu.id !== DgControl.QueryScheme.type); - return menuConfig; - } - - if (this.checkControlExistByType(DgControl.QueryScheme.type)) { - querySchemeMenu.title = '移除' + querySchemeMenu.title; - querySchemeMenu.id = 'remove' + querySchemeMenu.id; - - } else { - querySchemeMenu.title = '启用' + querySchemeMenu.title; - querySchemeMenu.id = 'enable' + querySchemeMenu.id; - } - - return menuConfig; - } - - /** - * 校验是否允许启用筛选方案 - */ - checkCanEnableQueryScheme(gridComponentId: string) { - // 根据模板schema中是否包含筛选方案配置来判断 - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - this.querySchemeConfig = templateOutlineSchema.find(schema => schema.queryScheme && schema.queryScheme.canEnable); - if (!this.querySchemeConfig) { - return false; - } - - // 子表不支持启用筛选方案 - const gridCmp = this.domService.getComponentById(gridComponentId); - const gridVM = this.domService.getViewModelById(gridCmp.viewModel); - if (gridVM && gridVM.bindTo !== '/') { - return false; - } - - // 校验是否已启用筛选条,筛选方案和筛选条互斥,不能同时启用 - let listFilterExisted = false; - if (this.checkControlExistByType(DgControl.ListFilter.type, gridComponentId)) { - listFilterExisted = true; - } - - - return !listFilterExisted; - } - - /** - * 弹出筛选方案字段配置编辑器 - */ - openQuerySchemeModal(viewModelId: string) { - const compFactory = this.resolver.resolveComponentFactory(QuerySchemeFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选方案字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.value = []; - compRef.instance.editorParams = { - viewModelId: 'root-viewmodel', - presetFieldConfigs: [] - }; - compRef.instance.showPropertyPanel = false; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - this.openQuerySchemePresetModal(data.value); - } - modalPanel.close(); - }); - - } - /** - * 弹出筛选方案预置字段配置编辑器 - */ - private openQuerySchemePresetModal(fieldConfigs: any[]) { - const compFactory = this.resolver.resolveComponentFactory(QuerySchemePresetFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选方案预置字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.value = []; - compRef.instance.editorParams = { - fieldConfigs - }; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - const builderService = new QuerySchemeBuilderService(this.injector); - builderService.createQuerySchemeInDocument(fieldConfigs, data.value); - - this.notifyService.success('启用成功'); - this.refreshFormService.refreshFormDesigner.next(); - } - modalPanel.close(); - }); - - } - - - /** - * 在指定组件内根据类型校验控件是否存在 - * @param controlType 控件类型 - * @param componentId 组件ID - */ - private checkControlExistByType(controlType: string, componentId = 'root-component') { - const rootCmp = this.domService.getComponentById(componentId); - return this.domService.selectNode(rootCmp, item => item.type === controlType); - } - - - /** - * 移除筛选方案 - */ - removeQueryScheme(cmpInstance: FarrisDesignBaseComponent) { - this.messagerService.question('确定移除筛选方案?', () => { - const builderService = new QuerySchemeBuilderService(this.injector); - builderService.removeQuerySchemeInDocument(); - - cmpInstance.emit('clearPropertyPanel'); - - this.notifyService.success('已移除筛选方案'); - this.refreshFormService.refreshFormDesigner.next(); - }); - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/export.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/export.ts deleted file mode 100644 index 2cb1cd6dbf8970468c223ccaa3a1837b3fe41252..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/export.ts +++ /dev/null @@ -1,26 +0,0 @@ -import FdDataGridComponent from './component/fd-datagrid'; -import { DataGridContextMenuItemSchema, DataGridSchema, GridFieldSchema } from './schema/datagrid'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdDataGridTemplates from '../common/templates/grid'; -import FdDataGridFieldComponent from './component/datagrid-field/component/fd-datagrid-field'; -import FdDataGridFieldTemplates from '../common/templates/grid-field'; - - -export const DataGrid: ComponentExportEntity = { - type: 'DataGrid', - component: FdDataGridComponent, - template: FdDataGridTemplates, - metadata: DataGridSchema -}; - -export const GridField: ComponentExportEntity = { - type: 'GridField', - component: FdDataGridFieldComponent, - template: FdDataGridFieldTemplates, - metadata: GridFieldSchema -}; - -export const DataGridContextMenuItem: ComponentExportEntity = { - type: 'DataGridContextMenuItem', - metadata: DataGridContextMenuItemSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/context-menu-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/context-menu-property-config.ts deleted file mode 100644 index e2fdb4cd6bad6f8a87fc4bd1c1f4b8ac47711d71..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/context-menu-property-config.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TreeNode } from '@farris/ui-treetable'; -import { EventEditorService, WebCmdService, FormBasicService, DomService, UniformEditorDataUtil } from '@farris/designer-services'; -import { IconSelectEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { MessagerService } from '@farris/ui-messager'; - - -export class GridContextMenuProp { - propertyConfig: ElementPropertyConfig[]; - - /** 在弹窗中使用按钮配置时,交互面板若要跳转到代码视图,需要先关闭弹窗 */ - triggerModalSave?: any; - - constructor( - private domService: DomService, - public formBasicService: FormBasicService, - public webCmdService: WebCmdService, - private msgService: MessagerService, - private eventEditorService: EventEditorService) { } - - getPropConfig(viewModelId: string, selectedNode: TreeNode, triggerModalSave: any): ElementPropertyConfig[] { - this.propertyConfig = []; - this.triggerModalSave = triggerModalSave; - - const propertyData = selectedNode.data; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - this.propertyConfig.push(basicPropConfig); - - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventProperties(propertyData, viewModelId, selectedNode); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - private getBasicPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '菜单的id', - readonly: true - } - ] - }; - } - private getAppearanceProperties(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'title', - propertyName: '名称', - propertyType: 'string', - description: '菜单标题名称' - }, - { - propertyID: 'icon', - propertyName: '图标', - propertyType: 'modal', - description: '菜单名称前面的图标', - editor: IconSelectEditorComponent, - editorParams: { needIconClass: true } - } - ] - }; - } - - private getBehaviorProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时菜单是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'disable', - propertyName: '是否禁用', - propertyType: 'unity', - description: '运行时菜单是否禁用', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - } - ] - }; - } - - private getEventProperties(propertyData: any, viewModelId: string, selectedNode: TreeNode): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - - // 暂存控件信息,用于自动创建新方法的方法编号和名称 - parameters.controlInfo = { type: 'DataGridContextMenu', name: '列表右键菜单' }; - - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭; - if (parameters.isAddControllerMethod && self.triggerModalSave) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - self.triggerModalSave(); - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - } - }; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/nocode-property-config.ts deleted file mode 100644 index 38a909af3173b9b553582dbf07d74342b1b2b6ea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/nocode-property-config.ts +++ /dev/null @@ -1,1786 +0,0 @@ -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ColumnGroupEditorComponent } from '@farris/header-group-editor'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from '../../../../utils/dg-control'; -// import { EntityFilterConditionConverter } from '../../common/property/editor/filter-condition/entity-filter-condition-converter'; -// import { EntityFilterConditionComponent } from '../../common/property/editor/filter-condition/entity-filter-condition.component'; -import { GridFieldConverter } from '../../common/property/editor/grid-field-editor/grid-field-converter'; -import { GridFieldEditorComponent } from '../../common/property/editor/grid-field-editor/grid-field-editor.component'; -import { GroupFieldConverter } from '../../common/property/editor/group-field-editor/group-field-converter'; -import { GroupFieldEditorComponent } from '../../common/property/editor/group-field-editor/group-field-editor.component'; -import { NoCodeCollectionProp } from '../../common/property/nocode-collection-property-config'; - -export class NoCodeDataGridProp extends NoCodeCollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - const viewModelId = this.viewModelId; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData, viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 分组属性 - // const groupPropConfig = this.getGroupProperties(propertyData, viewModelId); - // this.propertyConfig.push(groupPropConfig); - - // if (propertyData.controlSource === 'Farris') { - // // 操作列属性 - // const operationPropConfig = this.getOperationProperties(propertyData, viewModelId); - // this.propertyConfig.push(operationPropConfig); - - // // 合计属性 - // const footerPropConfig = this.getFooterPropConfig(propertyData, viewModelId); - // this.propertyConfig.push(footerPropConfig); - - // // 过滤行属性 - // const filterRowProperties = this.getFilterRowConfig(propertyData, viewModelId); - // this.propertyConfig.push(filterRowProperties); - - // // 分页属性 - // const paginationPropertyConfig = this.getPaginationCofig(propertyData, viewModelId); - // this.propertyConfig.push(paginationPropertyConfig); - - // // 右键菜单 - // const contextMenuPropertyConfig = this.getContextMenuCofig(propertyData, viewModelId); - // this.propertyConfig.push(contextMenuPropertyConfig); - // } - - // 事件属性 - // const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - // this.propertyConfig.push(eventPropConfig); - return this.propertyConfig; - - } - - private getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - // { - // propertyID: 'id', - // propertyName: '标识', - // propertyType: 'string', - // description: '组件的id', - // readonly: true - // }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件类型', - iterator: [{ key: propertyData.type, value: DgControl.DataGrid.name }], - }, - // { - // propertyID: 'controlSource', - // propertyName: '控件来源', - // propertyType: 'select', - // description: '组件的控件来源', - // iterator: [{ key: 'Kendo', value: 'Kendo' }, { key: 'Farris', value: 'Farris' }], - // refreshPanelAfterChanged: true, - // visible: propertyData.controlSource !== 'Farris' - // }, - // { - // propertyID: 'dataSource', - // propertyName: '数据源', - // propertyType: 'modal', - // description: '数据来源' - // } - ], - // setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - // switch (changeObject && changeObject.propertyID) { - // case 'controlSource': { - // this.properties.forEach(p => { - // if (p.controlSource) { - // p.visible = changeObject.propertyValue === p.controlSource; - // } - // }); - - // propertyData.fields.forEach(field => { - // field.controlSource = changeObject.propertyValue; - - // // 切换frozen的值 - // if (changeObject.propertyValue === 'Kendo') { - // if (field.frozen === 'right') { - // field.frozen = true; - // } else { - // field.frozen = false; - // } - // } - // }); - - - // // 变更【外观分类】下的属性 - // const newAppearancePropConfig = self.getAppearanceProperties(propertyData, viewModelId); - // const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - // Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // // 变更【行为分类】下的属性 - // const newBehaviorPropConfig = self.getBehaviorProperties(propertyData, viewModelId); - // const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - // Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - // // 变更【操作列分类】的隐现 - // const operationConfig = self.propertyConfig.find(cat => cat.categoryId === 'operation'); - // if (operationConfig) { operationConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // // 变更【分组分类】下的属性 - // const newGroupPropConfig = self.getGroupProperties(propertyData, viewModelId); - // const currentGroupConfig = self.propertyConfig.find(cat => cat.categoryId === 'gridGroup'); - // Object.assign(currentGroupConfig, newGroupPropConfig); - - // // 变更【合计分类】的显隐 - // const footerConfig = self.propertyConfig.find(cat => cat.categoryId === 'footer'); - // if (footerConfig) { footerConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // // 变更【过滤行分类】的显隐 - // const filterRowConfig = self.propertyConfig.find(cat => cat.categoryId === 'filterRow'); - // if (filterRowConfig) { filterRowConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // // 变更【分页分类】的显隐 - // const paginationConfig = self.propertyConfig.find(cat => cat.categoryId === 'pagination'); - // if (paginationConfig) { paginationConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // // 变更【事件分类】的显隐 - // const newEventPropConfig = self.getEventPropConfig(propertyData, viewModelId); - // const currentEventConfig = self.propertyConfig.find(cat => cat.categoryId === 'commands'); - // Object.assign(currentEventConfig, newEventPropConfig); - - // // 变更【右键菜单分类】的显隐 - // const contextMenuConfig = self.propertyConfig.find(cat => cat.categoryId === 'contextMenu'); - // if (contextMenuConfig) { contextMenuConfig.hide = changeObject.propertyValue !== 'Farris'; } - // } - // } - // } - }; - } - - private getAppearanceProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const props = this.getCommonAppearanceProperties(); - props.push( - { - propertyID: 'fields', - propertyName: '列', - propertyType: 'modal', - description: '列设置', - editor: GridFieldEditorComponent, - editorParams: { - fieldEditable: propertyData.fieldEditable, - viewModelId, - gridType: propertyData.type, - controlSource: propertyData.controlSource - }, - converter: new GridFieldConverter() - }, - { - propertyID: 'showBorder', - propertyName: '显示线条', - propertyType: 'select', - description: '是否显示线条', - visible: false, - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'showLineNumber', - propertyName: '显示行号', - propertyType: 'select', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'lineNumberTitle', - propertyName: '行号标题', - propertyType: 'string', - description: '行号标题设置', - // visible: propertyData.showLineNumber - visible: false - }, - { - propertyID: 'lineNumberWidth', - propertyName: '行号列宽', - propertyType: 'number', - description: '行号列宽设置', - min: 0, - max: 100, - visible: propertyData.showLineNumber - }, - { - propertyID: 'showBorder', - propertyName: '是否显示线条', - visible: false, - propertyType: 'select', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'striped', - propertyName: '斑马线效果', - visible: false, - propertyType: 'select', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'rowHeight', - propertyName: '行高', - propertyType: 'number', - description: '行高设置', - visible: false, - // visible: propertyData.controlSource === 'Farris', - min: 30, - max: 200 - }, - { - propertyID: 'useBlankWhenDataIsEmpty', - propertyName: '空数据表格显示空白行', - propertyType: 'select', - defaultValue: false, - visible: this.domService.module.templateId === 'card-template', // 只有卡片中才会有此属性 - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'emptyDataHeight', - propertyName: '空白行高度', - propertyType: 'number', - min: 36, - defaultValue: 36, - visible: propertyData.useBlankWhenDataIsEmpty - }, - { - propertyID: 'fitColumns', - propertyName: '自动列宽', - propertyType: 'select', - description: '是否自动列宽', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - controlSource: 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'autoFitColumns', - propertyName: '自适应表格宽度', - propertyType: 'select', - description: '表格是否自适应宽度', - visible: propertyData.controlSource === 'Farris' && propertyData.fitColumns, - defaultValue: false, - controlSource: 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'autoHeight', - propertyName: '自动高度', - propertyType: 'select', - description: '是否自动高度', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'maxHeight', - propertyName: '最大高度', - propertyType: 'number', - min: 100, - defaultValue: 300, - visible: propertyData.autoHeight - }, - { - propertyID: 'enableEditCellStyle', - propertyName: '标识可编辑单元格', - propertyType: 'select', - description: '是否标识可编辑的单元格', - defaultValue: false, - visible: true, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'enableHighlightCell', - propertyName: '高亮显示选中单元格', - propertyType: 'boolean', - description: '是否高亮显示选中单元格', - visible: false, - }, - { - propertyID: 'mergeCell', - propertyName: '合并单元格', - propertyType: 'boolean', - description: '是否合并单元格', - visible: false, - // visible: propertyData.controlSource === 'Farris', - defaultValue: false, - refreshPanelAfterChanged: true, // 更新分组属性 - controlSource: 'Farris' - }, - { - propertyID: 'mergeFields', - propertyName: '合并单元格字段', - propertyType: 'modal', - description: '合并单元格字段', - // visible: propertyData.controlSource === 'Farris' && propertyData.mergeCell, - visible: false, - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - }, - converter: new GroupFieldConverter()// 更新分组属性 - }, - { - propertyID: 'styler', - propertyName: '行样式', - propertyType: 'modal', - description: '行样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(rowData) => {\r\n return {\r\n style: {\r\n color: \'#5A8129\',\r\n' + - ' background: \'#CCE7A4\'\r\n }\r\n };\r\n}\r\n\r\n注: rowData 行数据' - }, - visible: false, - // visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'emptyTemplate', - propertyName: '空数据模板', - propertyType: 'modal', - description: '空数据模板设置', - editor: CodeEditorComponent, - // visible: propertyData.controlSource === 'Farris', - visible: false, - editorParams: { - language: 'html' - }, - controlSource: 'Farris', - showClearButton: true - }, - { - propertyID: 'emptyDataHeight', - propertyName: '空数据模板高度', - propertyType: 'number', - description: '空数据模板高度设置', - visible: false, - // visible: propertyData.controlSource === 'Farris', - min: 1, - max: 1000 - }, - // { - // propertyID: 'scrollBarShowMode', - // propertyName: '滚动条显示模式', - // propertyType: 'select', - // description: '滚动条显示模式设置', - // visible: propertyData.controlSource === 'Farris', - // iterator: [{ key: 'auto', value: '鼠标划过时显示' }, { key: 'allways', value: '始终显示' }], - // controlSource: 'Farris' - // }, - // { - // propertyID: 'showScrollArrow', - // propertyName: '显示滚动条微调按钮', - // propertyType: 'boolean', - // description: '是否显示滚动条微调按钮', - // visible: propertyData.controlSource === 'Farris' && propertyData.scrollBarShowMode === 'allways', - // controlSource: 'Farris', - // defaultValue: false - // } - - ); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'fields': { - // changeObject.needRefreshForm = true; - break; - } - case 'mergeCell': { - const mergeFields = this.properties.find(p => p.propertyID === 'mergeFields'); - if (mergeFields) { - mergeFields.visible = changeObject.propertyValue; - } - if (changeObject.propertyValue) { - self.notifyService.info('启用合并单元格后自动取消分组'); - propertyData.groupable = false; - const groupCategoryConfig = self.propertyConfig.find(cat => cat.categoryId === 'gridGroup'); - if (groupCategoryConfig && groupCategoryConfig.properties) { - groupCategoryConfig.properties.forEach(p => { - if (p.propertyID !== 'groupable') { - p.visible = false; - } - }); - } - } - break; - } - case 'fitColumns': { - const autoFitColumns = this.properties.find(p => p.propertyID === 'autoFitColumns'); - if (autoFitColumns) { - autoFitColumns.visible = changeObject.propertyValue; - } - break; - } - case 'showLineNumber': { - const lineNumber = this.properties.filter(p => p.propertyID === 'lineNumberTitle' || - p.propertyID === 'lineNumberWidth'); - if (lineNumber && lineNumber.length) { - lineNumber.forEach(element => { - element.visible = changeObject.propertyValue; - }); - } - break; - } - case 'scrollBarShowMode': { - const showScrollArrow = this.properties.find(p => p.propertyID === 'showScrollArrow'); - if (showScrollArrow) { - showScrollArrow.visible = changeObject.propertyValue === 'allways'; - } - break; - } - case 'useBlankWhenDataIsEmpty': { - const emptyData = this.properties.filter(p => p.propertyID === 'emptyDataHeight'); - if (emptyData && emptyData.length) { - emptyData.forEach(element => { - element.visible = changeObject.propertyValue; - }) - } - break; - } - case 'autoHeight': { - const maxHeight = this.properties.find(p => p.propertyID === 'maxHeight'); - if (maxHeight) { - maxHeight.visible = changeObject.propertyValue; - } - break; - } - default: - break; - } - } - }; - - } - - private getBehaviorProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const viewModel = this.domService.getViewModelById(viewModelId); - - let gridfieldSchema; - if (this.domService.module.templateId !== 'list-template') { - - try { - const schemas = this.domService.getSchemas(); - gridfieldSchema = schemas.entities[0].type.entities.find((schemaItem) => schemaItem.label === viewModel.bindTo.slice(1)); - - } catch (error) { - - } - } - // const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const self = this; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - // visibleProp, - // { - // propertyID: 'disable', - // propertyName: '禁用', - // propertyType: 'modal', - // description: '是否禁用' - // }, - // { - // propertyID: 'enableSimpleMode', - // propertyID: 'enableSimpleMode', - // propertyName: '启用简洁列设置模式', - // propertyType: 'boolean', - // description: '列设置是否启用简洁模式', - // visible: propertyData.useControlPanel, - // defaultValue: false - // }, - // { - // propertyID: 'enableScheme', - // propertyName: '启用列设置方案', - // propertyType: 'boolean', - // description: '列设置是否启用方案', - // visible: propertyData.useControlPanel && propertyData.enableSimpleMode, - // defaultValue: false - // }, - { - propertyID: 'multiSelect', - propertyName: '是否启用多选', - propertyType: 'unity', - description: '是否允许多选', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'stateMachine', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - }, - { - propertyID: 'showCheckbox', - propertyName: '显示复选框', - propertyType: 'unity', - description: '是否显示复选框', - visible: propertyData.controlSource === 'Farris', - readonly: propertyData.multiSelect === true, - controlSource: 'Farris', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - - }, - } - }, - { - propertyID: 'showAllCheckbox', - propertyName: '显示全选', - propertyType: 'unity', - description: '是否显示全选', - visible: propertyData.controlSource === 'Farris', - readonly: !propertyData.multiSelect, - controlSource: 'Farris', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - - } - } - }, - // { - // propertyID: 'selectionMode', - // propertyName: '选择模式', - // propertyType: 'select', - // description: '编辑方式选择', - // iterator: [{ key: 'default', value: 'Windows模式' }, { key: 'custom', value: '自定义模式' }], - // visible: propertyData.controlSource === 'Farris' && propertyData.multiSelect, - // controlSource: 'Farris' - // }, - { - propertyID: 'useControlPanel', - propertyName: '启用列设置', - propertyType: 'select', - description: '是否启用列设置', - defaultValue: false, - visible: this.domService.module.templateId === 'list-template', // 只有卡片中才会有此属性 - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'allowEmpty', - propertyName: '必填', - propertyType: 'select', - defaultValue: true, - visible: this.domService.module.templateId === 'card-template', // 只有卡片中才会有此属性 - iterator: [{ key: false, value: '是' }, { key: true, value: '否' }] - }, - { - propertyID: 'checkOnSelect', - propertyName: '选中当前行并勾选', - propertyType: 'select', - description: '是否启用选中并勾选当前行', - visible: propertyData.multiSelect && propertyData.selectionMode === 'custom', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'selectOnCheck', - propertyName: '勾选并选中当前行', - propertyType: 'select', - description: '是否启用勾选并选中当前行', - visible: propertyData.multiSelect && propertyData.selectionMode === 'custom', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - // { - // propertyID: 'keepSelect', - // propertyName: '保持选中', - // propertyType: 'boolean', - // description: '选中后再次点击不会取消选中状态', - // visible: propertyData.multiSelect && propertyData.selectionMode === 'custom' - // }, - { - propertyID: 'showSelectedList', - propertyName: '显示已选记录列表', - propertyType: 'select', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - // visible: propertyData.multiSelect, - visible: false, - }, - { - propertyID: 'selectedItemFormatter', - propertyName: '已选记录格式化', - propertyType: 'modal', - description: '是否将已选记录格式化', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(rowData) => {\r\n return rowData[\'id\'] + rowData[\'namd\'][\'dtname\'];\r\n}\r\n' - }, - // visible: propertyData.controlSource === 'Farris' && propertyData.multiSelect && propertyData.showSelectedList, - visible: false, - controlSource: 'Farris' - }, - { - propertyID: 'enableMorePageSelect', - propertyName: '启用跨页多选', - propertyType: 'select', - defaultValue: false, - // visible: propertyData.multiSelect, - visible: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - - { - propertyID: 'enableHeaderGroup', - propertyName: '启用多表头', - propertyType: 'select', - description: '是否启用多表头', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'headerGroup', - propertyName: '多表头设置', - propertyType: 'modal', - description: '多表头设置', - editor: ColumnGroupEditorComponent, - editorParams: { - fields: propertyData.fields - }, - visible: propertyData.enableHeaderGroup, - }, - // { - // propertyID: 'headerWrap', - // propertyName: '允许表头折行', - // propertyType: 'boolean', - // description: '是否允许表头折行', - // visible: false, - // }, - { - propertyID: 'AutoColumnWidthUseDblclick', - propertyName: '启用双击表头适应内容', - propertyType: 'select', - description: '启用双击表头适应内容', - visible: false, - defaultValue: true, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - controlSource: 'Farris' - }, - { - propertyID: 'nowrap', - propertyName: '数据禁止折行', - visible: true, - propertyType: 'select', - description: '数据是否禁止折行', - defaultValue: false, - // visible: propertyData.controlSource === 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - controlSource: 'Farris' - }, - // { - // propertyID: 'draggable', - // propertyName: '允许拖拽布局', - // propertyType: 'boolean', - // description: '是否允许拖拽的方式改变布局', - // defaultValue: false - // }, - { - propertyID: 'enableDragColumn', - propertyName: '允许拖拽表头', - propertyType: 'select', - description: '是否允许拖拽表头位置', - defaultValue: false, - visible: true, - controlSource: 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - // visible: propertyData.controlSource === 'Farris' && !propertyData.enableHeaderGroup - }, - { - propertyID: 'virtualized', - propertyName: '启用虚拟加载机制', - propertyType: 'select', - description: '是否启用虚拟加载机制', - defaultValue: false, - // visible: propertyData.controlSource === 'Farris', - visible: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - controlSource: 'Farris' - }, - { - propertyID: 'virtualizedAsyncLoad', - propertyName: '启用异步加载数据', - propertyType: 'select', - description: '是否启用异步加载数据', - visible: false, - // visible: propertyData.controlSource === 'Farris', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - controlSource: 'Farris' - }, - { - propertyID: 'idField', - propertyName: '主键字段', - propertyType: 'string', - description: '主键字段设置', - defaultValue: 'id', - visible: false, - // visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'editMode', - propertyName: '编辑方式', - propertyType: 'select', - description: '编辑方式选择', - // iterator: [{ key: 'cell', value: '编辑单元格' }, { key: 'row', value: '行内编辑' }], - iterator: [{ key: 'cell', value: '编辑单元格' }], - visible: propertyData.controlSource === 'Farris', - defaultValue: 'cell', - controlSource: 'Farris' - }, - { - propertyID: 'disableRow', - propertyName: '禁止行选中或勾选', - propertyType: 'modal', - description: '是否禁止行选中或勾选', - visible: false, - // visible: propertyData.controlSource === 'Farris', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(row, index) => {\r\n return row[\'sex\'] === \'女\';\r\n}\r\n\r\n\r\n参数:\r\n ' + - 'row:行数据 \r\n index:行索引\r\n\r\n返回值:\r\n true:禁止选择\r\n false:可选中' - }, - controlSource: 'Farris' - }, - { - propertyID: 'multiSort', - propertyName: '允许多列排序', - propertyType: 'select', - description: '是否允许多列排序', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - controlSource: 'Farris' - }, - // { - // propertyID: 'clearSelectionsWhenDataIsEmpty', - // propertyName: '数据源为空时清空已选记录', - // propertyType: 'boolean', - // description: '数据源为空时是否清空已选记录', - // visible: false - // }, - // { - // propertyID: 'selectOnEditing', - // propertyName: '编辑时选中文本', - // propertyType: 'boolean', - // description: '进入编辑态后是否将单元格内文本全选中' - // }, - // { - // propertyID: 'remoteSort', - // propertyName: '是否启用远端排序', - // propertyType: 'boolean', - // visible: false, - // defaultValue: false - // }, - // { - // propertyID: 'conditions', - // propertyName: '过滤条件', - // propertyType: 'modal', - // description: '列表过滤条件设置', - // editor: EntityFilterConditionComponent, - // converter: new EntityFilterConditionConverter(), - // editorParams: { - // viewModelId - // }, - // visible: true - // // visible: propertyData.controlSource === 'Farris' && viewModel.bindTo === '/' - // } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'enableHeaderGroup': { - const headerGroup = this.properties.find(p => p.propertyID === 'headerGroup'); - if (headerGroup) { - headerGroup.visible = changeObject.propertyValue; - } - - // farris 列表启用多表头后 取消所有列的固定列属性 - if (propertyData.controlSource === 'Farris' && changeObject.propertyValue) { - self.notifyService.info('启用多表头后自动取消固定列'); - propertyData.fields.forEach(field => { - field.frozen = 'none'; - }); - } - - const enableDragColumn = this.properties.find(p => p.propertyID === 'enableDragColumn'); - if (enableDragColumn) { - enableDragColumn.visible = !changeObject.propertyValue; - propertyData.enableDragColumn = changeObject.propertyValue ? false : propertyData.enableDragColumn; - } - - // changeObject.relateChangeProps = [{ - // propertyID: 'enableDragColumn', - // propertyValue: propertyData.enableDragColumn - // }]; - break; - } - case 'multiSelect': { - this.properties.forEach(p => { - if (p.propertyID === 'checkOnSelect' || p.propertyID === 'selectOnCheck') { - p.visible = !!changeObject.propertyValue && propertyData.selectionMode === 'custom'; - } - if (p.propertyID === 'showSelectedList') { - p.visible = !!changeObject.propertyValue; - } - // 多选时必须显示复选框并且不可勾掉 - if (p.propertyID === 'showCheckbox') { - p.readonly = changeObject.propertyValue === true; - propertyData.showCheckbox = (changeObject.propertyValue === true) || propertyData.showCheckbox; - } - // 不启用多选时必须隐藏全选 - if (p.propertyID === 'showAllCheckbox') { - p.readonly = !changeObject.propertyValue; - if (p.readonly) { - propertyData.showAllCheckbox = !!changeObject.propertyValue; - } - } - - if (p.propertyID === 'selectedItemFormatter') { - p.visible = !!changeObject.propertyValue && propertyData.showSelectedList; - } - if (p.propertyID === 'enableMorePageSelect') { - p.visible = !!changeObject.propertyValue; - propertyData.enableMorePageSelect = !changeObject.propertyValue ? false : propertyData.enableMorePageSelect; - } - // 多选时才显示选择模式 - if (p.propertyID === 'selectionMode') { - p.visible = propertyData.controlSource === 'Farris' && changeObject.propertyValue; - } - // 多选时才显示选择模式 - if (p.propertyID === 'keepSelect') { - p.visible = changeObject.propertyValue && propertyData.selectionMode === 'custom'; - } - }); - break; - } - case 'allowEmpty': { - viewModel['allowEmpty'] = changeObject.propertyValue; - gridfieldSchema['allowEmpty'] = changeObject.propertyValue; - break; - } - case 'nowrap': { - if (!changeObject.propertyValue) { - self.notifyService.info('启用数据折行后自动取消虚拟加载'); - propertyData.virtualized = false; - } - break; - } - case 'virtualized': { - if (changeObject.propertyValue && !propertyData.nowrap) { - self.notifyService.info('启用虚拟加载后自动取消数据折行'); - propertyData.nowrap = true; - } - break; - } - // case 'virtualizedAsyncLoad': { - // const scrollYLoad = this.properties.find(p => p.propertyID === 'scrollYLoad'); - // if (scrollYLoad) { - // scrollYLoad.visible = changeObject.propertyValue; - // } - // break; - // } - case 'showSelectedList': { - const selectedItemFormatter = this.properties.find(p => p.propertyID === 'selectedItemFormatter'); - if (selectedItemFormatter) { - selectedItemFormatter.visible = changeObject.propertyValue; - } - break; - } - case 'selectionMode': { - const keepSelect = this.properties.find(p => p.propertyID === 'keepSelect'); - if (keepSelect) { - keepSelect.visible = propertyData.multiSelect && changeObject.propertyValue === 'custom'; - } - const checkOnSelect = this.properties.find(p => p.propertyID === 'checkOnSelect'); - if (checkOnSelect) { - checkOnSelect.visible = changeObject.propertyValue === 'custom'; - } - const selectOnCheck = this.properties.find(p => p.propertyID === 'selectOnCheck'); - if (selectOnCheck) { - selectOnCheck.visible = changeObject.propertyValue === 'custom'; - } - break; - } - case 'useControlPanel': { - propertyData.enableSimpleMode = changeObject.propertyValue; - propertyData.enableScheme = changeObject.propertyValue; - - const enableSimpleMode = this.properties.find(p => p.propertyID === 'enableSimpleMode'); - if (enableSimpleMode) { - enableSimpleMode.visible = changeObject.propertyValue; - } - const enableScheme = this.properties.find(p => p.propertyID === 'enableScheme'); - if (enableScheme) { - enableScheme.visible = changeObject.propertyValue && propertyData.enableSimpleMode; - } - break; - } - case 'enableSimpleMode': { - const enableScheme = this.properties.find(p => p.propertyID === 'enableScheme'); - if (enableScheme) { - enableScheme.visible = changeObject.propertyValue; - } - if (!changeObject.propertyValue) { - propertyData.enableScheme = false; - } - } - } - } - }; - } - - // private getOperationProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - // return { - // categoryId: 'operation', - // categoryName: '操作列', - // properties: [ - // { - // propertyID: 'enableCommandColumn', - // propertyName: '启用操作列', - // propertyType: 'select', - // description: '是否启用操作列', - // detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - // iterator: [{ key: false, value: '不启用' }, { key: true, value: '启用默认操作列' }, { key: 'custom', value: '自定义操作列' }], - // visible: false, - // // visible: propertyData.controlSource === 'Farris', - // defaultValue: false, - // controlSource: 'Farris' - // }, - // { - // propertyID: 'customCommandColumnTempl', - // propertyName: '自定义操作列模板', - // propertyType: 'modal', - // description: '自定义操作列模板设置', - // editor: CodeEditorComponent, - // visible:false, - // // visible: propertyData.controlSource === 'Farris' && propertyData.enableCommandColumn === 'custom', - // editorParams: { - // language: 'html' - // }, - // controlSource: 'Farris' - // }, - // { - // propertyID: 'commandColumnWidth', - // propertyName: '操作列宽度(px)', - // propertyType: 'number', - // description: '操作列宽度设置', - // min: 0, - // decimals: 0, - // visible: propertyData.controlSource === 'Farris' && !!propertyData.enableCommandColumn, - // controlSource: 'Farris' - // }, - // ], - // setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - // switch (changeObject && changeObject.propertyID) { - - // case 'enableCommandColumn': - // this.properties.forEach(p => { - // const propId = p.propertyID; - // if (propId === 'onEditClicked' || propId === 'onDeleteClicked') { - // p.visible = changeObject.propertyValue === true; - // } - // if (propId === 'customCommandColumnTempl') { - // p.visible = changeObject.propertyValue === 'custom'; - // } - // if (propId === 'commandColumnWidth') { - // p.visible = !!changeObject.propertyValue; - // } - // }); - // break; - - - // default: - // break; - // } - // } - // }; - - // } - - // private getGroupProperties(propertyData: any, viewModelId: string) { - // const self = this; - // return { - // categoryId: 'gridGroup', - // categoryName: '分组', - // properties: [ - // { - // propertyID: 'groupable', - // propertyName: '启用分组', - // propertyType: 'boolean', - // description: '是否启用分组', - // detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - // refreshPanelAfterChanged: true // 更新常规分类下的合并单元格属性、固定列属性 - // }, { - // propertyID: 'group', - // propertyName: '分组列', - // propertyType: 'modal', - // description: '分组列选择', - // visible: propertyData.groupable, - // editor: GroupFieldEditorComponent, - // editorParams: { - // viewModelId, - // selectNumber: propertyData.controlSource === 'Farris' ? 2 : 1 // farrisgrid支持选择两列 - // }, - // converter: new GroupFieldConverter() - // }, - // { - // propertyID: 'showGroupColumn', - // propertyName: '显示分组列', - // propertyType: 'boolean', - // description: '是否显示分组列', - // visible: propertyData.groupable && propertyData.controlSource === 'Farris', - // defaultValue: true - // }, - // { - // propertyID: 'groupTotalText', - // propertyName: '分组合计文本', - // propertyType: 'string', - // description: '分组合计文本设置', - // visible: propertyData.groupable && propertyData.controlSource === 'Kendo' - // }, - // { - // propertyID: 'groupFormatter', - // propertyName: '分组格式化', - // propertyType: 'modal', - // description: '分组格式化设置', - // editor: CodeEditorComponent, - // editorParams: { - // language: 'javascript', - // exampleCode: - // '(rowData) => {\r\n if (rowData.field === \'name\') {\r\n return `姓名' + - // ': ${rowData.value} [${rowData.total}]`;\r\n } else {\r\n return `婚否' + - // ':${rowData.value} [${rowData.total}]`;\r\n }\r\n}\r\n\r\n\r\n注:\r\n rowData: 行数据' - // }, - // visible: propertyData.groupable && propertyData.controlSource === 'Farris' - // }, - // { - // propertyID: 'groupStyler', - // propertyName: '分组样式', - // propertyType: 'modal', - // description: '分组样式设置', - // editor: CodeEditorComponent, - // editorParams: { - // language: 'javascript', - // exampleCode: - // '(rowData) => {\r\n if (rowData.field === \'name\') {\r\n return {\r\n ' + - // 'style: {\r\n background: \'#EFF5E5\',\r\n color: \'#5A8129\'\r\n' + - // ' }\r\n };\r\n } else if (rowData.field === \'sex\') {\r\n return {\r\n' + - // ' style: {\r\n background: \'#FFEAC1\',\r\n color: \'#E99100\'\r\n' + - // ' }\r\n };\r\n }\r\n}\r\n\r\n\r\n注:\r\n rowData: 行数据' - // }, - // visible: propertyData.groupable && propertyData.controlSource === 'Farris' - // }, - // { - // propertyID: 'groupFooter', - // propertyName: '启用分组合计行', - // propertyType: 'boolean', - // description: '是否启用分组合计行', - // visible: propertyData.groupable && propertyData.controlSource === 'Farris', - // defaultValue: false - // }, - // { - // propertyID: 'showRowGroupPanel', - // propertyName: '启用分组面板', - // propertyType: 'boolean', - // description: '是否启用分组面板', - // visible: propertyData.groupable && propertyData.controlSource === 'Farris', - // defaultValue: false - // }, - // { - // propertyID: 'groupSummaryPosition', - // propertyName: '合计数据显示位置', - // propertyType: 'select', - // description: '合计数据显示位置设置', - // iterator: [{ key: 'groupFooterRow', value: '独占一行' }, { key: 'inGroupRow', value: '分组行内' }], - // visible: propertyData.groupable && propertyData.controlSource === 'Farris' - // }, - // { - // propertyID: 'disableGroupOnEditing', - // propertyName: '编辑时取消分组', - // propertyType: 'boolean', - // description: '进入编辑态后是否取消表格分组', - // visible: propertyData.groupable && propertyData.controlSource === 'Farris' - // } - // ], - // setPropertyRelates(changeObject, data) { - // switch (changeObject && changeObject.propertyID) { - // case 'groupable': { - // this.properties.forEach(p => { - // if (p.propertyID === 'group') { - // p.visible = changeObject.propertyValue; - // } - // if (p.propertyID === 'groupTotalText') { - // p.visible = changeObject.propertyValue && propertyData.controlSource === 'Kendo'; - // } - // if (p.propertyID === 'groupFormatter' || p.propertyID === 'groupStyler' - // || p.propertyID === 'showGroupColumn' || p.propertyID === 'groupFooter' - // || p.propertyID === 'showRowGroupPanel' || p.propertyID === 'groupSummaryPosition' - // || p.propertyID === 'disableGroupOnEditing') { - // p.visible = changeObject.propertyValue && propertyData.controlSource === 'Farris'; - // } - // }); - // // farris 列表启用分组后 取消所有列的固定列属性、取消合并单元格属性 - // if (propertyData.controlSource === 'Farris' && changeObject.propertyValue) { - // self.notifyService.info('启用分组后自动取消合并单元格和固定列'); - // propertyData.fields.forEach(field => { - // field.frozen = 'none'; - // }); - // propertyData.mergeCell = false; - - // const customCategoryConfig = self.propertyConfig.find(cat => cat.categoryId === 'custom'); - // if (customCategoryConfig && customCategoryConfig.properties) { - // const mergeFields = customCategoryConfig.properties.find(p => p.propertyID === 'mergeFields'); - // if (mergeFields) { - // mergeFields.visible = false; - // } - // } - - // } - - // // changeObject.relateChangeProps = [{ - // // propertyID: 'fields', - // // propertyValue: propertyData.fields - // // }, { - // // propertyID: 'mergeCell', - // // propertyValue: propertyData.mergeCell - // // }]; - // break; - // } - // default: - // break; - // } - // } - // }; - - // } - - // private getFooterPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const footerProprites: PropertyEntity[] = [ - // { - // propertyID: 'showFooter', - // propertyName: '显示合计行', - // propertyType: 'boolean', - // description: '是否显示合计行', - // detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - // defaultValue: false - // }, - // { - // propertyID: 'footerTemplate', - // propertyName: '合计行模板', - // propertyType: 'modal', - // description: '合计行模板设置', - // editor: CodeEditorComponent, - // editorParams: { - // language: 'html' - // }, - // visible: propertyData.showFooter - // }, - // { - // propertyID: 'footerDataFrom', - // propertyName: '合计行数据来源', - // propertyType: 'select', - // description: '合计行数据来源选择', - // defaultValue: 'client', - // visible: propertyData.showFooter, - // iterator: [{ key: 'client', value: '客户端' }, { key: 'server', value: '服务端' }] - // }, - // { - // propertyID: 'footerHeight', - // propertyName: '合计行行高', - // propertyType: 'number', - // description: '合计行行高设置', - // min: 0, - // visible: propertyData.showFooter - // }, - // { - // propertyID: 'footerPosition', - // propertyName: '合计行显示位置', - // propertyType: 'select', - // iterator: [{ key: 'top', value: '顶部' }, { key: 'bottom', value: '底部' }, { key: 'both', value: '同时显示' }], - // description: '合计行显示位置设置', - // visible: propertyData.showFooter - // } - // ]; - - // return { - // categoryId: 'footer', - // categoryName: '合计', - // properties: footerProprites, - // setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - // switch (changeObject && changeObject.propertyID) { - // case 'showFooter': { - // this.properties.forEach(p => { - // if (p.propertyID === 'showFooter') { return; } - - // p.visible = changeObject.propertyValue; - // if (p.propertyID === 'footerDataCommand') { - // p.visible = changeObject.propertyValue && propertyData.footerDataFrom === 'server'; - // } - // }); - // break; - // } - // case 'footerDataFrom': { - // const footerDataCommand = this.properties.find(p => p.propertyID === 'footerDataCommand'); - // if (footerDataCommand) { - // footerDataCommand.visible = changeObject.propertyValue === 'server'; - // propertyData.footerDataCommand = changeObject.propertyValue === 'server' ? - // propertyData.footerDataCommand : null; - // } - // // changeObject.relateChangeProps = [{ - // // propertyID: 'footerDataCommand', - // // propertyValue: propertyData.footerDataCommand - // // }]; - // } - // } - // } - // }; - // } - - /** - * 过滤。使用filterType属性控制过滤的类型(enableFilterRow/enableSmartFilter) - * filterType属性是设计器自用的,不对应datagrid控件属性 - */ - // private getFilterRowConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const filterRowProperties: PropertyEntity[] = [ - // { - // propertyID: 'filterType', - // propertyName: '启用过滤行', - // propertyType: 'select', - // description: '是否启用过滤行', - // iterator: [ - // { key: 'none', value: '不启用' }, - // { key: 'enableFilterRow', value: '启用过滤行' }, - // { key: 'enableSmartFilter', value: '启用智能过滤' } - // ] - // }, - // { - // propertyID: 'remoteFilter', - // propertyName: '服务器端过滤', - // propertyType: 'boolean', - // description: '是否启用服务器端过滤', - // defaultValue: false, - // visible: propertyData.filterType !== 'none' - // }, - // { - // propertyID: 'showFilterBar', - // propertyName: '显示过滤条件工具条', - // propertyType: 'boolean', - // description: '是否显示过滤条件工具条', - // defaultValue: false, - // visible: propertyData.filterType !== 'none' - // } - // ]; - // return { - // categoryId: 'filterRow', - // categoryName: '过滤行', - // properties: filterRowProperties, - // setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - // if (!changeObject) { - // return; - // } - // switch (changeObject.propertyID) { - // case 'filterType': { - // this.properties.map(p => { - // if (p.propertyID !== 'filterType') { - // p.visible = changeObject.propertyValue !== 'none'; - // } - // }); - - // // 关联变更:同步属性值 - // propertyData.enableFilterRow = changeObject.propertyValue === 'enableFilterRow'; - // propertyData.enableSmartFilter = changeObject.propertyValue === 'enableSmartFilter'; - - // // changeObject.relateChangeProps = [ - // // { - // // propertyID: 'enableFilterRow', - // // propertyValue: changeObject.propertyValue === 'enableFilterRow' - // // }, - // // { - // // propertyID: 'enableSmartFilter', - // // propertyValue: changeObject.propertyValue === 'enableSmartFilter' - // // } - // // ]; - - // // 启用过滤行后自动配置列的是否过滤属性 - // propertyData.fields.forEach(field => { - // field.enableFilter = changeObject.propertyValue !== 'none'; - // }); - // break; - // } - // } - // } - // }; - // } - - // 事件编辑器集成 - // private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const self = this; - // const domService = this.domService; - // const webCmdService = this.webCmdService; - // const formBasicService = this.formBasicService; - // let eventList = [ - // { - // label: 'onSelectionChange', - // name: '行切换事件' - // }, { - // label: 'rowClick', - // name: '行点击事件' - // }, { - // label: 'appendRow', - // name: '回车新增行事件' - // }, { - // label: 'pageChange', - // name: '切换页码事件' - // }, { - // label: 'pageSizeChanged', - // name: '分页条数变化事件' - // }, { - // label: 'beforeSelect', - // name: '选中前事件' - // }, { - // label: 'beforeUnSelect', - // name: '取消选中前事件' - // }, { - // label: 'beforeCheck', - // name: '勾选前事件' - // }, { - // label: 'checked', - // name: '勾选后事件' - // }, { - // label: 'beforeUnCheck', - // name: '取消勾选前事件' - // }, { - // label: 'unChecked', - // name: '取消勾选后事件' - // }, { - // label: 'dblClickRow', - // name: '行双击事件' - // }, { - // label: 'beforeEdit', - // name: '编辑前事件' - // }, { - // label: 'checkAll', - // name: '全选事件' - // }, { - // label: 'unCheckAll', - // name: '取消全选事件' - // }, { - // label: 'filterChanged', - // name: '过滤事件', - // }, { - // label: 'columnSorted', - // name: '排序事件', - // }]; - // eventList = self.switchEvents(propertyData, eventList); - // return { - // categoryId: 'eventsEditor', - // categoryName: '事件', - // hideTitle: true, - // properties: EventsEditorFuncUtils.formProperties(formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - // tabId: 'commands', - // tabName: '交互', - // setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - // delete propertyData[viewModelId]; - // EventsEditorFuncUtils.saveRelatedParameters(domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - // this.properties = EventsEditorFuncUtils.formProperties(formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - // if (propertyData['columnSorted']) { - // propertyData.remoteSort = true; - // } - // else { - // propertyData.remoteSort = false; - // } - // } - // }; - // } - - // private switchEvents(propertyData, eventList) { - // if (propertyData.controlSource === 'Farris' && propertyData.virtualizedAsyncLoad) { - // let eventListExist = eventList.find(eventListItem => eventListItem.label == 'scrollYLoad') - // if (eventListExist == undefined) { - // eventList.push( - // { - // label: 'scrollYLoad', - // name: '滚动加载事件' - // } - // ); - // } - // } else { - // eventList = eventList.filter(eventListItem => { - // if (eventListItem.label != 'scrollYLoad') - // return true; - // }) - // } - // if (propertyData.controlSource === 'Farris' && propertyData.enableCommandColumn) { - // let eventListExist = eventList.find(eventListItem => eventListItem.label == 'onEditClicked') - // if (eventListExist == undefined) { - // eventList.push( - // { - // label: 'onEditClicked', - // name: '操作列点击编辑' - // }, - // { - // label: 'onDeleteClicked', - // name: '操作列点击删除' - // } - // ); - // } - // } else { - // eventList = eventList.filter(eventListItem => { - // if (eventListItem.label != 'onEditClicked') - // return true; - // }) - // eventList = eventList.filter(eventListItem => { - // if (eventListItem.label != 'onDeleteClicked') - // return true; - // }) - // } - - - // if (propertyData.controlSource === 'Farris' && propertyData.virtualizedAsyncLoad) { - // let eventListExist = eventList.find(eventListItem => eventListItem.label == 'footerDataCommand') - // if (eventListExist == undefined) { - // eventList.push( - // { - // label: 'footerDataCommand', - // name: '合计命令' - // }); - // } - // } else { - // eventList = eventList.filter(eventListItem => { - // if (eventListItem.label != 'footerDataCommand') - // return true; - // }) - // } - // return eventList; - // } - - - /** - * 分页属性(子表暂不支持) - */ - // private getPaginationCofig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const self = this; - // const viewModel = this.domService.getViewModelById(viewModelId); - - // if (!viewModel.pagination) { - // viewModel.pagination = { - // enable: false - // }; - // } - // const vmPagination = viewModel.pagination; - // // 这三个属性是存在vm中,但是需要在datagrid控件上编辑 - // propertyData.pagination = vmPagination.enable; - // propertyData.pageList = vmPagination.pageList; - // propertyData.pageSize = vmPagination.pageSize; - - // const pageSizeIterator = this.getPageSizeIterator(propertyData.pageList); - // return { - // categoryId: 'pagination', - // categoryName: '分页', - // properties: [ - // { - // propertyID: 'pagination', - // propertyName: '启用分页', - // propertyType: 'boolean', - // description: '是否启用分页', - // defaultValue: true, - // readonly: viewModel.bindTo !== '/' - // }, - // { - // propertyID: 'lockPagination', - // propertyName: '锁定分页', - // propertyType: 'unity', - // description: '是否锁定分页', - // visible: propertyData.pagination, - // editorParams: { - // controlName: UniformEditorDataUtil.getControlName(propertyData), - // constType: 'enum', - // editorOptions: { - // types: ['const', 'custom'], - // enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }] - // } - // } - // }, - // { - // propertyID: 'showPageSize', - // propertyName: '显示分页条数', - // propertyType: 'boolean', - // description: '是否显示分页条数', - // defaultValue: false, - // visible: propertyData.pagination - // }, - // { - // propertyID: 'pageList', - // propertyName: '分页条数', - // propertyType: 'string', - // description: '请输入以英文逗号分开的数字,最大值为1000。例如:10,20,30,50,100', - // visible: propertyData.pagination && propertyData.showPageSize, - // notAllowedChars: [/[^\d,]/g] - // }, - // { - // propertyID: 'pageSize', - // propertyName: '默认分页条数', - // propertyType: 'select', - // description: '默认分页条数设置', - // iterator: pageSizeIterator, - // visible: propertyData.pagination - // }, - // { - // propertyID: 'showGotoInput', - // propertyName: '显示页码输入框', - // propertyType: 'boolean', - // description: '是否显示页码输入框', - // visible: propertyData.pagination, - // defaultValue: false - // }, - // { - // propertyID: 'pagerContentTemplate', - // propertyName: '扩展区域模板', - // propertyType: 'modal', - // editor: CodeEditorComponent, - // editorParams: { - // language: 'html' - // }, - // description: '分页条扩展区域模板', - // visible: propertyData.pagination, - // showClearButton: true - // } - // ], - // setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - // if (!changeObject) { - // return; - // } - // switch (changeObject.propertyID) { - // case 'pagination': { - // this.properties.map(p => { - // if (p.propertyID !== 'pagination') { - // p.visible = changeObject.propertyValue; - // } - // if (p.propertyID === 'pageList') { - // p.visible = changeObject.propertyValue && propertyData.showPageSize; - // } - // }); - // vmPagination.enable = changeObject.propertyValue; - // if (changeObject.propertyValue) { - // if (!propertyData.pageSize) { - // propertyData.pageSize = 20; - // vmPagination.pageSize = 20; - // } - // self.setDefaultPageList(propertyData, vmPagination); - // const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - // if (pageSize) { - // pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - // } - - // // 配置切换页码事件 - // if (!propertyData.pageChange) { - // const changePageCmdCode = self.setChangePageEvent(propertyData, viewModelId); - // propertyData.pageChange = changePageCmdCode; - // } - - // } - // break; - // } - // case 'pageList': { - // vmPagination.pageList = changeObject.propertyValue; - // const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - // if (pageSize) { - // pageSize.iterator = self.getPageSizeIterator(changeObject.propertyValue); - // } - // if (!changeObject.propertyValue.includes(propertyData.pageSize)) { - // vmPagination.pageSize = propertyData.pageSize = null; - // } - // break; - // } - // case 'pageSize': { - // vmPagination.pageSize = changeObject.propertyValue; - // break; - // } - // case 'showPageSize': { - // const pageList = this.properties.find(p => p.propertyID === 'pageList'); - // if (pageList) { - // pageList.visible = changeObject.propertyValue; - // } - - // if (changeObject.propertyValue) { - // self.setDefaultPageList(propertyData, vmPagination); - // const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - // if (pageSize) { - // pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - // } - - // // 默认配置分页条数变化事件 - // if (!propertyData.pageSizeChanged) { - // propertyData.pageSizeChanged = propertyData.pageChange; - // } - - - // } - - - // } - // } - // } - - // }; - // } - - // private setDefaultPageList(propertyData: any, vmPagination: any) { - - // if (!propertyData.pageList) { - // propertyData.pageList = '10,20,30,50,100'; - // if (propertyData.pageSize && !propertyData.pageList.includes(propertyData.pageSize)) { - // let pageList = [10, 20, 30, 50, 100, propertyData.pageSize]; - // pageList = pageList.sort((A, B) => A - B); - // propertyData.pageList = pageList.toString(); - // } - - // vmPagination.pageList = propertyData.pageList; - // } - // } - - - // getPageSizeIterator(pageList: string) { - // if (!pageList) { - // pageList = '10,20,30,50,100'; - // } - // const iterator = []; - // pageList.split(',').forEach(pageSize => { - // iterator.push({ - // key: Number.parseInt(pageSize, 10), - // value: pageSize - // }); - // }); - // return iterator; - // } - /** - * 启用分页后自动配置切换页码事件 - */ - // private setChangePageEvent(propertyData: any, viewModelId: string) { - // // 检查视图模型中是否有handlerName=ChangePage的命令 - // const vm = this.domService.getViewModelById(viewModelId); - // if (!vm || !vm.commands || vm.commands.length === 0) { - // return; - // } - // const changePageCmd = vm.commands.find(command => command.handlerName === 'ChangePage'); - // if (changePageCmd) { - // return changePageCmd.code; - // } - // } - - - // private getContextMenuCofig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const contextMenuProp = new GridContextMenuProp(this.domService, this.formBasicService, this.webCmdService); - // return { - // categoryId: 'contextMenu', - // categoryName: '右键菜单', - // hide: propertyData.controlSource !== 'Farris', - // properties: [ - // { - // propertyID: 'enableContextMenu', - // propertyName: '启用右键菜单', - // propertyType: 'unity', - // description: '是否启用右键菜单', - // editorParams: { - // controlName: UniformEditorDataUtil.getControlName(propertyData), - // constType: 'enum', - // editorOptions: { - // types: ['const', 'variable'], - // enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - // variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - // getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - // newVariableType: 'Boolean', - // newVariablePrefix: 'is' - // } - // } - // }, - // { - // propertyID: 'contextMenuItems', - // propertyName: '右键菜单配置', - // propertyType: 'modal', - // description: '配置右键菜单项', - // visible: propertyData.enableContextMenu, - // editor: CollectionWithPropertyEditorComponent, - // converter: new CollectionWithPropertyConverter(), - // editorParams: { - // modalTitle: '右键菜单编辑器', - // viewModelId, - // idKey: 'id', - // textKey: 'title', - // childrenKey: 'children', - // maxCascadeLevel: 2, - // controlType: 'DataGridContextMenuItem', - // defaultControlValue: { - // id: 'menu', - // title: '菜单' - // }, - // getPropertyConfig: (selectedNode) => contextMenuProp.getPropConfig(viewModelId, selectedNode) - // } - // } - // ], - // setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - // if (!changeObject) { - // return; - // } - // switch (changeObject.propertyID) { - // case 'enableContextMenu': { - // const contextMenuItems = this.properties.find(p => p.propertyID === 'contextMenuItems'); - // if (contextMenuItems) { - // contextMenuItems.visible = changeObject.propertyValue; - // } - // } - // } - // } - // }; - // } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/property-config.ts deleted file mode 100644 index 09de6ebb17127af9a72182dc187d3feee8fecbc4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/property/property-config.ts +++ /dev/null @@ -1,1793 +0,0 @@ -import { CollectionProp } from '../../common/property/collection-property-config'; -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent } from '@farris/designer-devkit'; -import { GridContextMenuProp } from './context-menu-property-config'; -import { GridFieldEditorComponent } from '../../common/property/editor/grid-field-editor/grid-field-editor.component'; -import { GridFieldConverter } from '../../common/property/editor/grid-field-editor/grid-field-converter'; -import { GroupFieldEditorComponent } from '../../common/property/editor/group-field-editor/group-field-editor.component'; -import { GroupFieldConverter } from '../../common/property/editor/group-field-editor/group-field-converter'; -import { ColumnGroupEditorComponent } from '@farris/header-group-editor'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -// import { EntityFilterConditionComponent } from '../../common/property/editor/filter-condition/entity-filter-condition.component'; -// import { EntityFilterConditionConverter } from '../../common/property/editor/filter-condition/entity-filter-condition-converter'; - -export class DataGridProp extends CollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - const viewModelId = this.viewModelId; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData, viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 分组属性 - const groupPropConfig = this.getGroupProperties(propertyData, viewModelId); - this.propertyConfig.push(groupPropConfig); - - if (propertyData.controlSource === 'Farris') { - // 操作列属性 - const operationPropConfig = this.getOperationProperties(propertyData, viewModelId); - this.propertyConfig.push(operationPropConfig); - - // 合计属性 - const footerPropConfig = this.getFooterPropConfig(propertyData, viewModelId); - this.propertyConfig.push(footerPropConfig); - - // 过滤行属性 - const filterRowProperties = this.getFilterRowConfig(propertyData, viewModelId); - this.propertyConfig.push(filterRowProperties); - - // 分页属性 - const paginationPropertyConfig = this.getPaginationCofig(propertyData, viewModelId); - this.propertyConfig.push(paginationPropertyConfig); - - // 右键菜单 - const contextMenuPropertyConfig = this.getContextMenuCofig(propertyData, viewModelId); - this.propertyConfig.push(contextMenuPropertyConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - } - - private getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件类型', - iterator: [{ key: propertyData.type, value: DgControl.DataGrid.name }], - }, - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Kendo', value: 'Kendo' }, { key: 'Farris', value: 'Farris' }], - refreshPanelAfterChanged: true, - visible: propertyData.controlSource !== 'Farris' - }, - { - propertyID: 'dataSource', - propertyName: '数据源', - propertyType: 'modal', - description: '数据来源' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - switch (changeObject && changeObject.propertyID) { - case 'controlSource': { - this.properties.forEach(p => { - if (p.controlSource) { - p.visible = changeObject.propertyValue === p.controlSource; - } - }); - - propertyData.fields.forEach(field => { - field.controlSource = changeObject.propertyValue; - - // 切换frozen的值 - if (changeObject.propertyValue === 'Kendo') { - if (field.frozen === 'right') { - field.frozen = true; - } else { - field.frozen = false; - } - } - }); - - - // 变更【外观分类】下的属性 - const newAppearancePropConfig = self.getAppearanceProperties(propertyData, viewModelId); - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = self.getBehaviorProperties(propertyData, viewModelId); - const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - // 变更【操作列分类】的隐现 - const operationConfig = self.propertyConfig.find(cat => cat.categoryId === 'operation'); - if (operationConfig) { operationConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // 变更【分组分类】下的属性 - const newGroupPropConfig = self.getGroupProperties(propertyData, viewModelId); - const currentGroupConfig = self.propertyConfig.find(cat => cat.categoryId === 'gridGroup'); - Object.assign(currentGroupConfig, newGroupPropConfig); - - // 变更【合计分类】的显隐 - const footerConfig = self.propertyConfig.find(cat => cat.categoryId === 'footer'); - if (footerConfig) { footerConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // 变更【过滤行分类】的显隐 - const filterRowConfig = self.propertyConfig.find(cat => cat.categoryId === 'filterRow'); - if (filterRowConfig) { filterRowConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // 变更【分页分类】的显隐 - const paginationConfig = self.propertyConfig.find(cat => cat.categoryId === 'pagination'); - if (paginationConfig) { paginationConfig.hide = changeObject.propertyValue !== 'Farris'; } - - // 变更【事件分类】的显隐 - const newEventPropConfig = self.getEventPropConfig(propertyData, viewModelId); - const currentEventConfig = self.propertyConfig.find(cat => cat.categoryId === 'commands'); - Object.assign(currentEventConfig, newEventPropConfig); - - // 变更【右键菜单分类】的显隐 - const contextMenuConfig = self.propertyConfig.find(cat => cat.categoryId === 'contextMenu'); - if (contextMenuConfig) { contextMenuConfig.hide = changeObject.propertyValue !== 'Farris'; } - } - } - } - }; - } - - private getAppearanceProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const props = this.getCommonAppearanceProperties(); - props.push( - { - propertyID: 'fields', - propertyName: '列', - propertyType: 'modal', - description: '列设置', - editor: GridFieldEditorComponent, - editorParams: { - fieldEditable: propertyData.fieldEditable, - viewModelId, - gridType: propertyData.type, - controlSource: propertyData.controlSource - }, - converter: new GridFieldConverter() - }, - { - propertyID: 'showBorder', - propertyName: '显示线条', - propertyType: 'boolean', - description: '是否显示线条', - defaultValue: false - }, - { - propertyID: 'showLineNumber', - propertyName: '显示行号', - propertyType: 'boolean', - description: '是否显示行号', - defaultValue: false - }, - { - propertyID: 'lineNumberTitle', - propertyName: '行号标题', - propertyType: 'string', - description: '行号标题设置', - visible: propertyData.showLineNumber - }, - { - propertyID: 'lineNumberWidth', - propertyName: '行号列宽', - propertyType: 'number', - description: '行号列宽设置', - min: 0, - max: 100, - visible: propertyData.showLineNumber - }, - { - propertyID: 'striped', - propertyName: '显示斑马线', - propertyType: 'boolean', - description: '是否显示斑马线', - visible: propertyData.controlSource === 'Farris', - defaultValue: true, - controlSource: 'Farris' - }, - { - propertyID: 'rowHeight', - propertyName: '行高', - propertyType: 'number', - description: '行高设置', - visible: propertyData.controlSource === 'Farris', - min: 30, - max: 200 - }, - { - propertyID: 'fitColumns', - propertyName: '填充列宽', - propertyType: 'boolean', - description: '根据列比例自动填充表格宽度,不会出现滚动条。', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - controlSource: 'Farris' - }, - { - propertyID: 'autoFitColumns', - propertyName: '自适应表格宽度', - propertyType: 'boolean', - description: '表格是否自适应宽度', - visible: propertyData.controlSource === 'Farris' && propertyData.fitColumns, - defaultValue: false, - controlSource: 'Farris' - }, - { - propertyID: 'enableEditCellStyle', - propertyName: '标识可编辑单元格', - propertyType: 'boolean', - description: '是否标识可编辑的单元格', - defaultValue: false - }, - { - propertyID: 'enableHighlightCell', - propertyName: '高亮显示选中单元格', - propertyType: 'boolean', - description: '是否高亮显示选中单元格', - }, - { - propertyID: 'mergeCell', - propertyName: '合并单元格', - propertyType: 'boolean', - description: '是否合并单元格', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - refreshPanelAfterChanged: true, // 更新分组属性 - controlSource: 'Farris' - }, - { - propertyID: 'mergeFields', - propertyName: '合并单元格字段', - propertyType: 'modal', - description: '合并单元格字段', - visible: propertyData.controlSource === 'Farris' && propertyData.mergeCell, - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - }, - converter: new GroupFieldConverter()// 更新分组属性 - }, - { - propertyID: 'styler', - propertyName: '行样式', - propertyType: 'modal', - description: '行样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(rowData) => {\r\n return {\r\n style: {\r\n color: \'#5A8129\',\r\n' + - ' background: \'#CCE7A4\'\r\n }\r\n };\r\n}\r\n\r\n注: rowData 行数据' - }, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'emptyTemplate', - propertyName: '空数据模板', - propertyType: 'modal', - description: '空数据模板设置', - editor: CodeEditorComponent, - visible: propertyData.controlSource === 'Farris', - editorParams: { - language: 'html' - }, - controlSource: 'Farris', - showClearButton: true - }, - { - propertyID: 'autoHeight', - propertyName: '自动高度', - propertyType: 'boolean', - description: '是否自动高度', - defaultValue: false, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'maxHeight', - propertyName: '最大高度', - propertyType: 'number', - description: '启用自动高度时,设置表格的最大高度。值为0时,表示不限制高度。', - visible: propertyData.controlSource === 'Farris' && propertyData.autoHeight, - min: 0 - }, - { - propertyID: 'useBlankWhenDataIsEmpty', - propertyName: '空数据表格显示空白行', - propertyType: 'boolean', - description: '表格没有数据时是否显示空白行', - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris', - defaultValue: false - }, - { - propertyID: 'emptyDataHeight', - propertyName: '空白行高度', - propertyType: 'number', - description: '空数据行高度设置', - visible: propertyData.controlSource === 'Farris', - min: 1, - max: 1000 - }, - { - propertyID: 'scrollBarShowMode', - propertyName: '滚动条显示模式', - propertyType: 'select', - description: '滚动条显示模式设置', - visible: propertyData.controlSource === 'Farris', - iterator: [{ key: 'auto', value: '鼠标划过时显示' }, { key: 'allways', value: '始终显示' }], - controlSource: 'Farris' - }, - { - propertyID: 'showScrollArrow', - propertyName: '显示滚动条微调按钮', - propertyType: 'boolean', - description: '是否显示滚动条微调按钮', - visible: propertyData.controlSource === 'Farris' && propertyData.scrollBarShowMode === 'allways', - controlSource: 'Farris', - defaultValue: false - } - - ); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'fields': { - if (propertyData.enableHeaderGroup) { - self.notifyService.info('修改显示列后请重新配置多表头'); - } - break; - } - case 'mergeCell': { - const mergeFields = this.properties.find(p => p.propertyID === 'mergeFields'); - if (mergeFields) { - mergeFields.visible = changeObject.propertyValue; - } - if (changeObject.propertyValue) { - self.notifyService.info('启用合并单元格后自动取消分组'); - propertyData.groupable = false; - const groupCategoryConfig = self.propertyConfig.find(cat => cat.categoryId === 'gridGroup'); - if (groupCategoryConfig && groupCategoryConfig.properties) { - groupCategoryConfig.properties.forEach(p => { - if (p.propertyID !== 'groupable') { - p.visible = false; - } - }); - } - } - break; - } - case 'fitColumns': { - const autoFitColumns = this.properties.find(p => p.propertyID === 'autoFitColumns'); - if (autoFitColumns) { - autoFitColumns.visible = changeObject.propertyValue; - } - break; - } - case 'showLineNumber': { - const lineNumber = this.properties.filter(p => p.propertyID === 'lineNumberTitle' || - p.propertyID === 'lineNumberWidth'); - if (lineNumber && lineNumber.length) { - lineNumber.forEach(element => { - element.visible = changeObject.propertyValue; - }); - } - break; - } - case 'scrollBarShowMode': { - const showScrollArrow = this.properties.find(p => p.propertyID === 'showScrollArrow'); - if (showScrollArrow) { - showScrollArrow.visible = changeObject.propertyValue === 'allways'; - } - break; - } - case 'autoHeight': { - const maxHeight = this.properties.find(p => p.propertyID === 'maxHeight'); - if (maxHeight) { - maxHeight.visible = changeObject.propertyValue; - } - break; - } - default: - break; - } - } - }; - - } - - private getBehaviorProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const self = this; - // 补充是否允许为空属性 - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.hasOwnProperty('allowEmpty')) { - viewModel.allowEmpty = true; - } - - propertyData.allowEmpty = viewModel.allowEmpty; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'allowEmpty', - propertyName: '是否允许为空', - propertyType: 'unity', - description: '运行时表格数据是否允许为空', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'stateMachine', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - stateMachine: this.stateMachineService.stateMachineMetaData - } - }, - visible: propertyData.fieldEditable - }, - { - propertyID: 'useControlPanel', - propertyName: '启用列设置', - propertyType: 'boolean', - description: '是否启用列设置', - defaultValue: false, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'enableSimpleMode', - propertyName: '启用简洁列设置模式', - propertyType: 'boolean', - description: '列设置是否启用简洁模式', - visible: propertyData.useControlPanel, - defaultValue: false - }, - { - propertyID: 'enableScheme', - propertyName: '启用列设置方案', - propertyType: 'boolean', - description: '列设置是否启用方案', - visible: propertyData.useControlPanel && propertyData.enableSimpleMode, - defaultValue: false - }, - { - propertyID: 'multiSelect', - propertyName: '允许多选', - propertyType: 'unity', - description: '是否允许多选', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'stateMachine', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - }, - { - propertyID: 'showCheckbox', - propertyName: '显示复选框', - propertyType: 'unity', - description: '是否显示复选框', - visible: propertyData.controlSource === 'Farris', - readonly: propertyData.multiSelect === true, - controlSource: 'Farris', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - - }, - } - }, - { - propertyID: 'showAllCheckbox', - propertyName: '显示全选', - propertyType: 'unity', - description: '是否显示全选', - visible: propertyData.controlSource === 'Farris', - readonly: !propertyData.multiSelect, - controlSource: 'Farris', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - - } - } - }, - { - propertyID: 'selectionMode', - propertyName: '选择模式', - propertyType: 'select', - description: '编辑方式选择', - iterator: [{ key: 'default', value: 'Windows模式' }, { key: 'custom', value: '自定义模式' }], - visible: propertyData.controlSource === 'Farris' && propertyData.multiSelect, - controlSource: 'Farris' - }, - { - propertyID: 'checkOnSelect', - propertyName: '选中并勾选当前行', - propertyType: 'boolean', - description: '是否启用选中并勾选当前行', - visible: propertyData.multiSelect && propertyData.selectionMode === 'custom', - defaultValue: false - }, - { - propertyID: 'selectOnCheck', - propertyName: '勾选并选中当前行', - propertyType: 'boolean', - description: '是否启用勾选并选中当前行', - visible: propertyData.multiSelect && propertyData.selectionMode === 'custom', - defaultValue: false - }, - { - propertyID: 'keepSelect', - propertyName: '保持选中', - propertyType: 'boolean', - description: '选中后再次点击不会取消选中状态', - visible: propertyData.multiSelect && propertyData.selectionMode === 'custom' - }, - { - propertyID: 'enableMorePageSelect', - propertyName: '启用跨页多选', - propertyType: 'boolean', - description: '是否启用跨页多选', - visible: propertyData.multiSelect, - controlSource: 'Farris' - }, - { - propertyID: 'showSelectedList', - propertyName: '显示已选记录列表', - propertyType: 'boolean', - description: '是否显示已选记录列表', - visible: propertyData.multiSelect, - controlSource: 'Farris' - }, - { - propertyID: 'selectedItemFormatter', - propertyName: '已选记录格式化', - propertyType: 'modal', - description: '是否将已选记录格式化', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(rowData) => {\r\n return rowData[\'id\'] + rowData[\'namd\'][\'dtname\'];\r\n}\r\n' - }, - visible: propertyData.controlSource === 'Farris' && propertyData.multiSelect && propertyData.showSelectedList, - controlSource: 'Farris' - }, - { - propertyID: 'enableHeaderGroup', - propertyName: '启用多表头', - propertyType: 'boolean', - description: '是否启用多表头', - defaultValue: false, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'headerGroup', - propertyName: '多表头设置', - propertyType: 'modal', - description: '多表头设置', - editor: ColumnGroupEditorComponent, - editorParams: { - fields: propertyData.fields - }, - visible: propertyData.controlSource === 'Farris' && propertyData.enableHeaderGroup - }, - { - propertyID: 'headerWrap', - propertyName: '允许表头折行', - propertyType: 'boolean', - description: '是否允许表头折行' - }, - { - propertyID: 'AutoColumnWidthUseDblclick', - propertyName: '启用双击表头适应内容', - propertyType: 'boolean', - description: '启用双击表头适应内容', - visible: true, - defaultValue: true, - controlSource: 'Farris' - }, - { - propertyID: 'nowrap', - propertyName: '数据禁止折行', - propertyType: 'boolean', - description: '数据是否禁止折行', - defaultValue: true, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - // { - // propertyID: 'draggable', - // propertyName: '允许拖拽布局', - // propertyType: 'boolean', - // description: '是否允许拖拽的方式改变布局', - // defaultValue: false - // }, - { - propertyID: 'enableDragColumn', - propertyName: '允许拖拽表头', - propertyType: 'boolean', - description: '是否允许拖拽表头位置', - defaultValue: false, - visible: propertyData.controlSource === 'Farris' && !propertyData.enableHeaderGroup - }, - { - propertyID: 'virtualized', - propertyName: '启用虚拟加载机制', - propertyType: 'boolean', - description: '是否启用虚拟加载机制', - defaultValue: false, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'virtualizedAsyncLoad', - propertyName: '启用异步加载数据', - propertyType: 'boolean', - description: '是否启用异步加载数据', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - controlSource: 'Farris' - }, - { - propertyID: 'idField', - propertyName: '主键字段', - propertyType: 'string', - description: '主键字段设置', - defaultValue: 'id', - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'editMode', - propertyName: '编辑方式', - propertyType: 'select', - description: '编辑方式选择', - // iterator: [{ key: 'cell', value: '编辑单元格' }, { key: 'row', value: '行内编辑' }], - iterator: [{ key: 'cell', value: '编辑单元格' }], - visible: propertyData.controlSource === 'Farris', - defaultValue: 'cell', - controlSource: 'Farris' - }, - { - propertyID: 'disableRow', - propertyName: '禁止行选中或勾选', - propertyType: 'modal', - description: '是否禁止行选中或勾选', - visible: propertyData.controlSource === 'Farris', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(row, index) => {\r\n return row[\'sex\'] === \'女\';\r\n}\r\n\r\n\r\n参数:\r\n ' + - 'row:行数据 \r\n index:行索引\r\n\r\n返回值:\r\n true:禁止选择\r\n false:可选中' - }, - controlSource: 'Farris' - }, - { - propertyID: 'multiSort', - propertyName: '允许多列排序', - propertyType: 'boolean', - description: '是否允许多列排序', - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - controlSource: 'Farris' - }, - { - propertyID: 'clearSelectionsWhenDataIsEmpty', - propertyName: '数据源为空时清空已选记录', - propertyType: 'boolean', - description: '数据源为空时是否清空已选记录' - }, - { - propertyID: 'selectOnEditing', - propertyName: '编辑时选中文本', - propertyType: 'boolean', - description: '进入编辑态后是否将单元格内文本全选中' - }, - { - propertyID: 'remoteSort', - propertyName: '是否启用远端排序', - propertyType: 'boolean', - defaultValue: false - }, - // { - // propertyID: 'conditions', - // propertyName: '过滤条件', - // propertyType: 'modal', - // description: '列表过滤条件设置', - // editor: EntityFilterConditionComponent, - // converter: new EntityFilterConditionConverter(), - // editorParams: { - // viewModelId - // }, - // visible: propertyData.controlSource === 'Farris' && viewModel.bindTo === '/' - // } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - - case 'enableHeaderGroup': { - const headerGroup = this.properties.find(p => p.propertyID === 'headerGroup'); - if (headerGroup) { - headerGroup.visible = changeObject.propertyValue; - } - - // farris 列表启用多表头后 取消所有列的固定列属性 - if (propertyData.controlSource === 'Farris' && changeObject.propertyValue) { - self.notifyService.info('启用多表头后自动取消固定列'); - propertyData.fields.forEach(field => { - field.frozen = 'none'; - }); - } - - const enableDragColumn = this.properties.find(p => p.propertyID === 'enableDragColumn'); - if (enableDragColumn) { - enableDragColumn.visible = !changeObject.propertyValue; - propertyData.enableDragColumn = changeObject.propertyValue ? false : propertyData.enableDragColumn; - } - - // changeObject.relateChangeProps = [{ - // propertyID: 'enableDragColumn', - // propertyValue: propertyData.enableDragColumn - // }]; - break; - } - case 'multiSelect': { - this.properties.forEach(p => { - if (p.propertyID === 'checkOnSelect' || p.propertyID === 'selectOnCheck') { - p.visible = !!changeObject.propertyValue && propertyData.selectionMode === 'custom'; - } - if (p.propertyID === 'showSelectedList') { - p.visible = !!changeObject.propertyValue; - } - // 多选时必须显示复选框并且不可勾掉 - if (p.propertyID === 'showCheckbox') { - p.readonly = changeObject.propertyValue === true; - propertyData.showCheckbox = (changeObject.propertyValue === true) || propertyData.showCheckbox; - } - // 不启用多选时必须隐藏全选 - if (p.propertyID === 'showAllCheckbox') { - p.readonly = !changeObject.propertyValue; - if (p.readonly) { - propertyData.showAllCheckbox = !!changeObject.propertyValue; - } - } - - if (p.propertyID === 'selectedItemFormatter') { - p.visible = !!changeObject.propertyValue && propertyData.showSelectedList; - } - if (p.propertyID === 'enableMorePageSelect') { - p.visible = !!changeObject.propertyValue; - propertyData.enableMorePageSelect = !changeObject.propertyValue ? false : propertyData.enableMorePageSelect; - } - // 多选时才显示选择模式 - if (p.propertyID === 'selectionMode') { - p.visible = propertyData.controlSource === 'Farris' && changeObject.propertyValue; - } - // 多选时才显示选择模式 - if (p.propertyID === 'keepSelect') { - p.visible = changeObject.propertyValue && propertyData.selectionMode === 'custom'; - } - }); - break; - } - case 'nowrap': { - if (!changeObject.propertyValue) { - self.notifyService.info('启用数据折行后自动取消虚拟加载'); - propertyData.virtualized = false; - } - break; - } - case 'virtualized': { - if (changeObject.propertyValue && !propertyData.nowrap) { - self.notifyService.info('启用虚拟加载后自动取消数据折行'); - propertyData.nowrap = true; - } - break; - } - // case 'virtualizedAsyncLoad': { - // const scrollYLoad = this.properties.find(p => p.propertyID === 'scrollYLoad'); - // if (scrollYLoad) { - // scrollYLoad.visible = changeObject.propertyValue; - // } - // break; - // } - case 'showSelectedList': { - const selectedItemFormatter = this.properties.find(p => p.propertyID === 'selectedItemFormatter'); - if (selectedItemFormatter) { - selectedItemFormatter.visible = changeObject.propertyValue; - } - break; - } - case 'selectionMode': { - const keepSelect = this.properties.find(p => p.propertyID === 'keepSelect'); - if (keepSelect) { - keepSelect.visible = propertyData.multiSelect && changeObject.propertyValue === 'custom'; - } - const checkOnSelect = this.properties.find(p => p.propertyID === 'checkOnSelect'); - if (checkOnSelect) { - checkOnSelect.visible = changeObject.propertyValue === 'custom'; - } - const selectOnCheck = this.properties.find(p => p.propertyID === 'selectOnCheck'); - if (selectOnCheck) { - selectOnCheck.visible = changeObject.propertyValue === 'custom'; - } - break; - } - case 'useControlPanel': { - propertyData.enableSimpleMode = changeObject.propertyValue; - propertyData.enableScheme = changeObject.propertyValue; - - const enableSimpleMode = this.properties.find(p => p.propertyID === 'enableSimpleMode'); - if (enableSimpleMode) { - enableSimpleMode.visible = changeObject.propertyValue; - } - const enableScheme = this.properties.find(p => p.propertyID === 'enableScheme'); - if (enableScheme) { - enableScheme.visible = changeObject.propertyValue && propertyData.enableSimpleMode; - } - break; - } - case 'enableSimpleMode': { - const enableScheme = this.properties.find(p => p.propertyID === 'enableScheme'); - if (enableScheme) { - enableScheme.visible = changeObject.propertyValue; - } - if (!changeObject.propertyValue) { - propertyData.enableScheme = false; - } - break; - } - case 'allowEmpty': { - viewModel.allowEmpty = changeObject.propertyValue; - - self.syncAllowEmptyToModalComponent(propertyData, changeObject.propertyValue); - break; - } - } - } - }; - } - - private getOperationProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'operation', - categoryName: '操作列', - properties: [ - { - propertyID: 'enableCommandColumn', - propertyName: '启用操作列', - propertyType: 'select', - description: '是否启用操作列', - detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - iterator: [{ key: false, value: '不启用' }, { key: true, value: '启用默认操作列' }, { key: 'custom', value: '自定义操作列' }], - visible: propertyData.controlSource === 'Farris', - defaultValue: false, - controlSource: 'Farris' - }, - { - propertyID: 'showCommandColumn', - propertyName: '显示操作列', - propertyType: 'unity', - description: '是否显示操作列,可以根据场景动态配置是否显示操作列', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - }, - visible: propertyData.controlSource === 'Farris' && !!propertyData.enableCommandColumn, - - }, - { - propertyID: 'customCommandColumnTempl', - propertyName: '自定义操作列模板', - propertyType: 'modal', - description: '自定义操作列模板设置', - editor: CodeEditorComponent, - visible: propertyData.controlSource === 'Farris' && propertyData.enableCommandColumn === 'custom', - editorParams: { - language: 'html' - }, - controlSource: 'Farris' - }, - { - propertyID: 'commandColumnWidth', - propertyName: '操作列宽度(px)', - propertyType: 'number', - description: '操作列宽度设置', - min: 0, - decimals: 0, - visible: propertyData.controlSource === 'Farris' && !!propertyData.enableCommandColumn, - controlSource: 'Farris' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - - case 'enableCommandColumn': - this.properties.forEach(p => { - const propId = p.propertyID; - if (propId === 'enableCommandColumn') { - return; - } - if (propId === 'customCommandColumnTempl') { - p.visible = changeObject.propertyValue === 'custom'; - } else { - p.visible = !!changeObject.propertyValue; - } - }); - break; - - - default: - break; - } - } - }; - - } - - private getGroupProperties(propertyData: any, viewModelId: string) { - const self = this; - return { - categoryId: 'gridGroup', - categoryName: '分组', - properties: [ - { - propertyID: 'groupable', - propertyName: '启用分组', - propertyType: 'boolean', - description: '是否启用分组', - detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - refreshPanelAfterChanged: true // 更新常规分类下的合并单元格属性、固定列属性 - }, { - propertyID: 'group', - propertyName: '分组列', - propertyType: 'modal', - description: '分组列选择', - visible: propertyData.groupable, - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: propertyData.controlSource === 'Farris' ? 2 : 1 // farrisgrid支持选择两列 - }, - converter: new GroupFieldConverter() - }, - { - propertyID: 'showGroupColumn', - propertyName: '显示分组列', - propertyType: 'boolean', - description: '是否显示分组列', - visible: propertyData.groupable && propertyData.controlSource === 'Farris', - defaultValue: true - }, - { - propertyID: 'groupTotalText', - propertyName: '分组合计文本', - propertyType: 'string', - description: '分组合计文本设置', - visible: propertyData.groupable && propertyData.controlSource === 'Kendo' - }, - { - propertyID: 'groupFormatter', - propertyName: '分组格式化', - propertyType: 'modal', - description: '分组格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(rowData) => {\r\n if (rowData.field === \'name\') {\r\n return `姓名' + - ': ${rowData.value} [${rowData.total}]`;\r\n } else {\r\n return `婚否' + - ':${rowData.value} [${rowData.total}]`;\r\n }\r\n}\r\n\r\n\r\n注:\r\n rowData: 行数据' - }, - visible: propertyData.groupable && propertyData.controlSource === 'Farris' - }, - { - propertyID: 'groupStyler', - propertyName: '分组样式', - propertyType: 'modal', - description: '分组样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - '(rowData) => {\r\n if (rowData.field === \'name\') {\r\n return {\r\n ' + - 'style: {\r\n background: \'#EFF5E5\',\r\n color: \'#5A8129\'\r\n' + - ' }\r\n };\r\n } else if (rowData.field === \'sex\') {\r\n return {\r\n' + - ' style: {\r\n background: \'#FFEAC1\',\r\n color: \'#E99100\'\r\n' + - ' }\r\n };\r\n }\r\n}\r\n\r\n\r\n注:\r\n rowData: 行数据' - }, - visible: propertyData.groupable && propertyData.controlSource === 'Farris' - }, - { - propertyID: 'groupFooter', - propertyName: '启用分组合计行', - propertyType: 'boolean', - description: '是否启用分组合计行', - visible: propertyData.groupable && propertyData.controlSource === 'Farris', - defaultValue: false - }, - { - propertyID: 'showRowGroupPanel', - propertyName: '启用分组面板', - propertyType: 'boolean', - description: '是否启用分组面板', - visible: propertyData.groupable && propertyData.controlSource === 'Farris', - defaultValue: false - }, - { - propertyID: 'groupSummaryPosition', - propertyName: '合计数据显示位置', - propertyType: 'select', - description: '合计数据显示位置设置', - iterator: [{ key: 'groupFooterRow', value: '独占一行' }, { key: 'inGroupRow', value: '分组行内' }], - visible: propertyData.groupable && propertyData.controlSource === 'Farris' - }, - { - propertyID: 'disableGroupOnEditing', - propertyName: '编辑时取消分组', - propertyType: 'boolean', - description: '进入编辑态后是否取消表格分组', - visible: propertyData.groupable && propertyData.controlSource === 'Farris' - }, - { - propertyID: 'expandGroupRows', - propertyName: '默认展开分组行', - propertyType: 'boolean', - description: '数据加载后,分组行是否处于展开状态', - visible: propertyData.groupable && propertyData.controlSource === 'Farris' - } - ], - setPropertyRelates(changeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'groupable': { - this.properties.forEach(p => { - if (p.propertyID === 'groupable') { - return; - } - if (p.propertyID === 'group') { - p.visible = changeObject.propertyValue; - } - if (p.propertyID === 'groupTotalText') { - p.visible = changeObject.propertyValue && propertyData.controlSource === 'Kendo'; - } else { - p.visible = changeObject.propertyValue && propertyData.controlSource === 'Farris'; - } - // if (p.propertyID === 'groupFormatter' || p.propertyID === 'groupStyler' - // || p.propertyID === 'showGroupColumn' || p.propertyID === 'groupFooter' - // || p.propertyID === 'showRowGroupPanel' || p.propertyID === 'groupSummaryPosition' - // || p.propertyID === 'disableGroupOnEditing') { - // p.visible = changeObject.propertyValue && propertyData.controlSource === 'Farris'; - // } - }); - // farris 列表启用分组后 取消所有列的固定列属性、取消合并单元格属性 - if (propertyData.controlSource === 'Farris' && changeObject.propertyValue) { - self.notifyService.info('启用分组后自动取消合并单元格和固定列'); - propertyData.fields.forEach(field => { - field.frozen = 'none'; - }); - propertyData.mergeCell = false; - - const customCategoryConfig = self.propertyConfig.find(cat => cat.categoryId === 'custom'); - if (customCategoryConfig && customCategoryConfig.properties) { - const mergeFields = customCategoryConfig.properties.find(p => p.propertyID === 'mergeFields'); - if (mergeFields) { - mergeFields.visible = false; - } - } - - } - - break; - } - default: - break; - } - } - }; - - } - - private getFooterPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const footerProprites: PropertyEntity[] = [ - { - propertyID: 'showFooter', - propertyName: '显示合计行', - propertyType: 'boolean', - description: '是否显示合计行', - detail: 'https://igix.inspures.com/igixword/main.html#datagrid', - defaultValue: false - }, - { - propertyID: 'footerTemplate', - propertyName: '合计行模板', - propertyType: 'modal', - description: '合计行模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.showFooter - }, - { - propertyID: 'footerDataFrom', - propertyName: '合计行数据来源', - propertyType: 'select', - description: '合计行数据来源选择', - defaultValue: 'client', - visible: propertyData.showFooter, - iterator: [{ key: 'client', value: '客户端' }, { key: 'server', value: '服务端' }] - }, - { - propertyID: 'footerHeight', - propertyName: '合计行行高', - propertyType: 'number', - description: '合计行行高设置', - min: 0, - visible: propertyData.showFooter - }, - { - propertyID: 'footerPosition', - propertyName: '合计行显示位置', - propertyType: 'select', - iterator: [{ key: 'top', value: '顶部' }, { key: 'bottom', value: '底部' }, { key: 'both', value: '同时显示' }], - description: '合计行显示位置设置', - visible: propertyData.showFooter - }, - { - propertyID: 'footerStyler', - propertyName: '合计行样式', - propertyType: 'modal', - description: '合计行样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: "() => {\r\n return {\r\n style: {\r\n color: '#5A8129',\r\n background: '#CCE7A4'\r\n }\r\n };\r\n}" - }, - visible: propertyData.showFooter - } - ]; - - return { - categoryId: 'footer', - categoryName: '合计', - properties: footerProprites, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'showFooter': { - this.properties.forEach(p => { - if (p.propertyID === 'showFooter') { return; } - - p.visible = changeObject.propertyValue; - if (p.propertyID === 'footerDataCommand') { - p.visible = changeObject.propertyValue && propertyData.footerDataFrom === 'server'; - } - }); - break; - } - case 'footerDataFrom': { - const footerDataCommand = this.properties.find(p => p.propertyID === 'footerDataCommand'); - if (footerDataCommand) { - footerDataCommand.visible = changeObject.propertyValue === 'server'; - propertyData.footerDataCommand = changeObject.propertyValue === 'server' ? - propertyData.footerDataCommand : null; - } - } - } - } - }; - } - - /** - * 过滤。使用filterType属性控制过滤的类型(enableFilterRow/enableSmartFilter) - * filterType属性是设计器自用的,不对应datagrid控件属性 - */ - private getFilterRowConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const filterRowProperties: PropertyEntity[] = [ - { - propertyID: 'filterType', - propertyName: '启用过滤行', - propertyType: 'select', - description: '是否启用过滤行', - iterator: [ - { key: 'none', value: '不启用' }, - { key: 'enableFilterRow', value: '启用过滤行' }, - { key: 'enableSmartFilter', value: '启用智能过滤' } - ] - }, - { - propertyID: 'remoteFilter', - propertyName: '服务器端过滤', - propertyType: 'boolean', - description: '是否启用服务器端过滤', - defaultValue: false, - visible: propertyData.filterType !== 'none' - }, - { - propertyID: 'showFilterBar', - propertyName: '显示过滤条件工具条', - propertyType: 'boolean', - description: '是否显示过滤条件工具条', - defaultValue: false, - visible: propertyData.filterType !== 'none' - } - ]; - return { - categoryId: 'filterRow', - categoryName: '过滤行', - properties: filterRowProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'filterType': { - this.properties.map(p => { - if (p.propertyID !== 'filterType') { - p.visible = changeObject.propertyValue !== 'none'; - } - }); - - // 关联变更:同步属性值 - propertyData.enableFilterRow = changeObject.propertyValue === 'enableFilterRow'; - propertyData.enableSmartFilter = changeObject.propertyValue === 'enableSmartFilter'; - - // 启用过滤行后自动配置列的是否过滤属性 - propertyData.fields.forEach(field => { - field.enableFilter = changeObject.propertyValue !== 'none'; - }); - break; - } - } - } - }; - } - - // 事件编辑器集成 - private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'onSelectionChange', - name: '行切换事件' - }, { - label: 'rowClick', - name: '行点击事件' - }, { - label: 'appendRow', - name: '回车新增行事件' - }, { - label: 'pageChange', - name: '切换页码事件' - }, { - label: 'pageSizeChanged', - name: '分页条数变化事件' - }, { - label: 'beforeSelect', - name: '选中前事件' - }, { - label: 'beforeUnSelect', - name: '取消选中前事件' - }, { - label: 'beforeCheck', - name: '勾选前事件' - }, { - label: 'checked', - name: '勾选后事件' - }, { - label: 'beforeUnCheck', - name: '取消勾选前事件' - }, { - label: 'unChecked', - name: '取消勾选后事件' - }, { - label: 'dblClickRow', - name: '行双击事件' - }, { - label: 'beforeEdit', - name: '编辑前事件' - }, { - label: 'checkAll', - name: '全选事件' - }, { - label: 'unCheckAll', - name: '取消全选事件' - }, { - label: 'filterChanged', - name: '过滤事件', - }, { - label: 'columnSorted', - name: '排序事件', - }]; - eventList = self.switchEvents(propertyData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - if (parameters) { - parameters.setPropertyRelates = this.setPropertyRelates; // 添加自定义方法后,调用此回调方法,用于处理联动属性 - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - - } - // 联动修改排序开关 - propertyData.remoteSort = propertyData.columnSorted ? true : false; - - } - }; - } - - private switchEvents(propertyData, eventList) { - if (propertyData.controlSource === 'Farris' && propertyData.virtualizedAsyncLoad) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'scrollYLoad'); - if (eventListExist === undefined) { - eventList.push( - { - label: 'scrollYLoad', - name: '滚动加载事件' - } - ); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'scrollYLoad'); - } - if (propertyData.controlSource === 'Farris' && propertyData.enableCommandColumn) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'onEditClicked'); - if (eventListExist === undefined) { - eventList.push( - { - label: 'onEditClicked', - name: '操作列点击编辑' - }, - { - label: 'onDeleteClicked', - name: '操作列点击删除' - } - ); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'onEditClicked'); - eventList = eventList.filter(eventListItem => eventListItem.label !== 'onDeleteClicked'); - } - - - if (propertyData.controlSource === 'Farris' && propertyData.virtualizedAsyncLoad) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'footerDataCommand'); - if (eventListExist === undefined) { - eventList.push( - { - label: 'footerDataCommand', - name: '合计命令' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'footerDataCommand'); - } - return eventList; - } - - - /** - * 分页属性(子表暂不支持) - */ - private getPaginationCofig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const viewModel = this.domService.getViewModelById(viewModelId); - - if (!viewModel.pagination) { - viewModel.pagination = { - enable: false - }; - } - const vmPagination = viewModel.pagination; - // 这三个属性是存在vm中,但是需要在datagrid控件上编辑 - propertyData.pagination = vmPagination.enable; - propertyData.pageList = vmPagination.pageList; - propertyData.pageSize = vmPagination.pageSize; - - const pageSizeIterator = this.getPageSizeIterator(propertyData.pageList); - return { - categoryId: 'pagination', - categoryName: '分页', - properties: [ - { - propertyID: 'pagination', - propertyName: '启用分页', - propertyType: 'boolean', - description: '是否启用分页', - defaultValue: true, - readonly: viewModel.bindTo !== '/' - }, - { - propertyID: 'lockPagination', - propertyName: '锁定分页', - propertyType: 'unity', - description: '是否锁定分页', - visible: propertyData.pagination, - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - } - } - }, - { - propertyID: 'showPageSize', - propertyName: '显示分页条数', - propertyType: 'boolean', - description: '是否显示分页条数', - defaultValue: false, - visible: propertyData.pagination - }, - { - propertyID: 'pageList', - propertyName: '分页条数', - propertyType: 'string', - description: '请输入以英文逗号分开的数字,最大值为1000。例如:10,20,30,50,100', - visible: propertyData.pagination && propertyData.showPageSize, - notAllowedChars: [/[^\d,]/g] - }, - { - propertyID: 'pageSize', - propertyName: '默认分页条数', - propertyType: 'select', - description: '默认分页条数设置', - iterator: pageSizeIterator, - visible: propertyData.pagination - }, - { - propertyID: 'showGotoInput', - propertyName: '显示页码输入框', - propertyType: 'boolean', - description: '是否显示页码输入框', - visible: propertyData.pagination, - defaultValue: false - }, - { - propertyID: 'pagerContentTemplate', - propertyName: '扩展区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - description: '分页条扩展区域模板', - visible: propertyData.pagination, - showClearButton: true - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'pagination': { - this.properties.map(p => { - if (p.propertyID !== 'pagination') { - p.visible = changeObject.propertyValue; - } - if (p.propertyID === 'pageList') { - p.visible = changeObject.propertyValue && propertyData.showPageSize; - } - }); - vmPagination.enable = changeObject.propertyValue; - if (changeObject.propertyValue) { - if (!propertyData.pageSize) { - propertyData.pageSize = 20; - vmPagination.pageSize = 20; - } - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - - // 配置切换页码事件 - if (!propertyData.pageChange) { - const changePageCmdCode = self.setChangePageEvent(propertyData, viewModelId); - propertyData.pageChange = changePageCmdCode; - } - - } - break; - } - case 'pageList': { - vmPagination.pageList = changeObject.propertyValue; - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(changeObject.propertyValue); - } - if (!changeObject.propertyValue.includes(propertyData.pageSize)) { - vmPagination.pageSize = propertyData.pageSize = null; - } - break; - } - case 'pageSize': { - vmPagination.pageSize = changeObject.propertyValue; - break; - } - case 'showPageSize': { - const pageList = this.properties.find(p => p.propertyID === 'pageList'); - if (pageList) { - pageList.visible = changeObject.propertyValue; - } - - if (changeObject.propertyValue) { - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - - // 默认配置分页条数变化事件 - if (!propertyData.pageSizeChanged) { - propertyData.pageSizeChanged = propertyData.pageChange; - } - - - } - - - } - } - } - - }; - } - - private setDefaultPageList(propertyData: any, vmPagination: any) { - - if (!propertyData.pageList) { - propertyData.pageList = '10,20,30,50,100'; - if (propertyData.pageSize && !propertyData.pageList.includes(propertyData.pageSize)) { - let pageList = [10, 20, 30, 50, 100, propertyData.pageSize]; - pageList = pageList.sort((A, B) => A - B); - propertyData.pageList = pageList.toString(); - } - - vmPagination.pageList = propertyData.pageList; - } - } - - - getPageSizeIterator(pageList: string) { - if (!pageList) { - pageList = '10,20,30,50,100'; - } - const iterator = []; - pageList.split(',').forEach(pageSize => { - iterator.push({ - key: Number.parseInt(pageSize, 10), - value: pageSize - }); - }); - return iterator; - } - /** - * 启用分页后自动配置切换页码事件 - */ - private setChangePageEvent(propertyData: any, viewModelId: string) { - // 检查视图模型中是否有handlerName=ChangePage的命令 - const vm = this.domService.getViewModelById(viewModelId); - if (!vm || !vm.commands || vm.commands.length === 0) { - return; - } - const changePageCmd = vm.commands.find(command => command.handlerName === 'ChangePage'); - if (changePageCmd) { - return changePageCmd.code; - } - } - - - private getContextMenuCofig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const contextMenuProp = new GridContextMenuProp(this.domService, this.formBasicService, this.webCmdService, this.msgService, this.eventEditorService); - return { - categoryId: 'contextMenu', - categoryName: '右键菜单', - hide: propertyData.controlSource !== 'Farris', - properties: [ - { - propertyID: 'enableContextMenu', - propertyName: '启用右键菜单', - propertyType: 'unity', - description: '是否启用右键菜单', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'contextMenuItems', - propertyName: '右键菜单配置', - propertyType: 'modal', - description: '配置右键菜单项', - visible: propertyData.enableContextMenu, - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '右键菜单编辑器', - viewModelId, - idKey: 'id', - textKey: 'title', - childrenKey: 'children', - maxCascadeLevel: 2, - controlType: 'DataGridContextMenuItem', - defaultControlValue: { - id: 'menu', - title: '菜单' - }, - parentNodeId: propertyData.id, - getPropertyConfig: (selectedNode, triggerModalSave: any) => contextMenuProp.getPropConfig(viewModelId, selectedNode, triggerModalSave) - } - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enableContextMenu': { - const contextMenuItems = this.properties.find(p => p.propertyID === 'contextMenuItems'); - if (contextMenuItems) { - contextMenuItems.visible = changeObject.propertyValue; - } - } - } - } - }; - } - - /** - * 同步弹出组件内部的子组件的allowEmpty属性 - */ - private syncAllowEmptyToModalComponent(propertyData: any, allowEmpty: boolean) { - if (!propertyData.modalComponentId) { - return; - } - - const modalCmp = this.domService.getComponentById(propertyData.modalComponentId); - if (!modalCmp) { - return; - } - - // 同步弹出组件的视图模型 - const modalVM = this.domService.getViewModelById(modalCmp.viewModel); - if (modalVM) { - modalVM.allowEmpty = allowEmpty; - } - - // 同步弹出子组件 - this.syncAllowEmptyToModalChildComponent(modalCmp.contents, allowEmpty); - } - - /** - * 同步弹出组件内部的子组件的allowEmpty属性 - */ - private syncAllowEmptyToModalChildComponent(contents: any[], allowEmpty: boolean) { - - if (contents && contents.length) { - contents.forEach(c => { - if (c.contents) { - this.syncAllowEmptyToModalChildComponent(c.contents, allowEmpty); - } - - if (c.type !== DgControl.ComponentRef.type) { - return; - } - const modalFormCmp = this.domService.getComponentById(c.component); - const modalVM = this.domService.getViewModelById(modalFormCmp.viewModel); - if (modalVM) { - modalVM.allowEmpty = allowEmpty; - } - - }); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/schema/datagrid.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/schema/datagrid.ts deleted file mode 100644 index 49e729107ae21737e7f9e418e8284e88ca88b690..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/datagrid/schema/datagrid.ts +++ /dev/null @@ -1,175 +0,0 @@ -export const DataGridSchema = { - id: 'dataGrid', - type: 'DataGrid', - controlSource: 'Farris', - appearance: null, - disable: false, - dataSource: null, - fields: [], - focusedItem: null, - focusedIndex: null, - pagination: true, - lockPagination: 'viewModel.stateMachine&&viewModel.stateMachine[\'editable\']', - showPageSize: false, - identifyField: null, - multiSelect: false, - showCheckbox: false, - selectable: null, - itemTemplate: null, - toolBar: null, - summary: null, - showAllCheckbox: false, - fieldEditable: false, - editable: null, - groupable: false, - group: null, - showGroupColumn: true, - groupFormatter: null, - groupStyler: null, - groupFooter: false, - fitColumns: false, - onSelectionChange: '', - styler: '', - fixedColumns: [], - enableCommandColumn: false, - onEditClicked: '', - onDeleteClicked: '', - commandColumnWidth: 120, - showCommandColumn: true, - checkedChange: null, - disableRow: null, - beforeSelect: null, - beforeUnSelect: null, - beforeCheck: null, - beforeUnCheck: null, - multiSort: false, - autoFitColumns: false, - showFooter: false, - footerTemplate: '', - footerDataFrom: 'client', - footerDataCommand: null, - footerHeight: 29, - filterType: 'none', - enableFilterRow: false, - enableSmartFilter: false, - remoteFilter: false, - showFilterBar: false, - showBorder: false, - striped: true, - showLineNumber: false, - lineNumberTitle: '', - appendRow: null, - pageChange: null, - dblClickRow: null, - useControlPanel: false, - autoHeight: false, - rowClick: null, - showSelectedList: false, - selectedItemFormatter: null, - lineNumberWidth: 36, - enableMorePageSelect: false, - headerWrap: false, - emptyTemplate: null, - emptyDataHeight: 36, - maxHeight: 300, - rowHeight: 30, - enableHighlightCell: false, - enableEditCellStyle: false, - showRowGroupPanel: false, - enableDragColumn: false, - groupSummaryPosition: 'groupFooterRow', - clearSelectionsWhenDataIsEmpty: true, - keepSelect: true, - enableEditByCard: 'none', - pageSizeChanged: null, - visible: true, - showGotoInput: false, - scrollBarShowMode: 'auto', - showScrollArrow: false, - footerPosition: 'bottom', - footerStyler: null, - selectOnEditing: false, - selectionMode: 'default', - enableContextMenu: false, - disableGroupOnEditing: true, - enableSimpleMode: false, - enableScheme: false, - beforeEdit: null, - nowrap: true, - mergeCell: false, - remoteSort: false, - columnSorted: null, - checkOnSelect: false, - selectOnCheck: false, - enableHeaderGroup: false, - headerGroup: null, - AutoColumnWidthUseDblclick: true, - virtualized: false, - virtualizedAsyncLoad: false, - scrollYLoad: null, - pagerContentTemplate: null, - expandGroupRows: true, - useBlankWhenDataIsEmpty: false, - checked: null, - unChecked: null, - checkAll: null, - unCheckAll: null, - filterChanged: null -}; - -/** 单列元数据 */ -export const GridFieldSchema = { - id: 'col', - type: 'GridField', - controlSource: 'Farris', - caption: '', - binding: null, - appearance: null, - size: { - width: 120 - }, - readonly: false, - dataField: '', - dataType: '', - displayTemplate: null, - captionTemplate: null, - editor: null, - draggable: false, - frozen: 'none', - sortable: true, - enumData: null, - idField: 'value', - textField: 'name', - aggregate: { type: 'none', formatter: { type: 'none' } }, - groupAggregate: { type: 'none', formatter: { type: 'none' } }, - linkedLabelEnabled: false, - linkedLabelClick: null, - textAlign: 'left', - hAlign: 'left', - vAlign: 'middle', - formatter: { type: 'none' }, - showTips: false, - tipContent: null, - multiLanguage: false, - visible: true, - enableFilter: false, - headerStyler: '', - styler: '', - localization: false, - allowGrouping: true, - tipMode: 'auto', - captionTipContent: '', - captionTipStyler: '' -}; -/** - * DataGrid右键菜单项元数据 - */ -export const DataGridContextMenuItemSchema = { - id: '', - title: '', - icon: '', - visible: true, - disable: false, - children: [], - click: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/component/fd-list-view.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/component/fd-list-view.ts deleted file mode 100644 index 843a26a84e30e57e9f644849261a85dd2bd2c418..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/component/fd-list-view.ts +++ /dev/null @@ -1,108 +0,0 @@ -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import { ListViewSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ListViewProp } from '../property/property'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { DesignerEnvType, DomService, RefreshFormService } from '@farris/designer-services'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class FdListViewComponent extends FdCollectionBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('list-view.css'); - } - - getDefaultSchema(): any { - return ListViewSchema; - } - - getClassName(): string { - let clsName = super.getClassName(); - if (this.component.fill) { - clsName += ' f-listview-fill'; - } - return clsName; - } - init(): void { - this.adaptOldControlSchema(); - super.init(); - } - render(): any { - this.setToolbarComponentBasicInfoMap(); - - return super.render(this.renderTemplate('ListView', { - component: this.component - })); - } - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - return false; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ListViewProp = new ListViewProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject); - - // 模板中可能有按钮,需要更新map信息 - if (changeObject.propertyID === 'contentTemplate') { - this.setToolbarComponentBasicInfoMap(); - - // 刷新实体树,更新字段前方的图标颜色---暂时只有低代码显示图标 - if (this.envType === DesignerEnvType.designer) { - const refreshService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - refreshService.refreshSchamaTree.next(); - } - - } - } - /** - * 主体Html模板中若配置了按钮,需要设置按钮所在的路径信息,用于交互面板的显示 - */ - private setToolbarComponentBasicInfoMap() { - if (!this.component.contentTemplate || !this.component.contentTemplate.toolbar || - !this.component.contentTemplate.toolbar.contents || !this.component.contentTemplate.toolbar.contents.length) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - - this.component.contentTemplate.toolbar.contents.forEach(button => { - domService.controlBasicInfoMap.set(button.id, { - showName: button.text, - parentPathName: `列表 > ${button.text}` - }); - - }); - - - } - /** - * 适配表单控件的元数据变更 - */ - private adaptOldControlSchema() { - // 补充旧表单中ListView 的viewmodel没有保存分页信息 - const domService = this.options.designerHost.getService('DomService') as DomService; - const viewModel = domService.getViewModelById(this.viewModelId); - if (!this.component.supportPaging || !viewModel) { - return; - } - - viewModel.pagination = Object.assign(viewModel.pagination, { - enable: true, - pageList: this.component.pageList, - pageSize: this.component.pageSize - }); - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/export.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/export.ts deleted file mode 100644 index 652ac12fd60b2c7e917f8a8ebc7574474afb7216..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/export.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ComponentExportEntity } from "@farris/designer-element"; -import { FdListViewComponent } from "./component/fd-list-view"; -import { ListViewSchema } from "./schema/schema"; -import FdListViewTemplates from './templates'; - -export const ListView: ComponentExportEntity = { - type: 'TreeGrid', - component: FdListViewComponent, - template: FdListViewTemplates, - metadata: ListViewSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.css deleted file mode 100644 index 36bb6db2cd4808856cd4605f322e9ca6f439a24d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.css +++ /dev/null @@ -1,36 +0,0 @@ -.tplItem { - cursor: pointer; -} - -.tplItem.active { - background-color: #E7F1FF !important; -} - -.tplDiv { - height: 140px; - width: 400px; - display: table-cell; - text-align: center; - vertical-align: middle; -} - -.tmplImg { - max-width: 100%; - max-height: 100%; - cursor: pointer; -} - -.preview-template-image { - position: absolute; - height: 100%; - width: 100%; - background-color: rgba(0, 0, 0, .2); -} - -.preview-template-image>img { - width: initial !important; - max-width: 100%; - margin: 0 auto; - display: block; - margin-top: 10%; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.html deleted file mode 100644 index 9906e926e643c4187288d73ef72930e39e3e46b6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
- {{tpl.title}}
-
-
-
- -
- -
-
-
- -
- - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.ts deleted file mode 100644 index 5eb5df175d19a856bc8854a5dec69c74979a4c35..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Component, Input, Output, EventEmitter, ViewChild, TemplateRef, OnInit, HostBinding } from '@angular/core'; - -@Component({ - selector: 'app-preset-template-selector', - templateUrl: './preset-template-selector.component.html', - styleUrls: ['./preset-template-selector.component.css'] -}) -export class PresetTemplateSelectorComponent implements OnInit { - - @Input() templateUri; - - @Input() defaultSelectedTemplateId; - - @Output() cancel = new EventEmitter(); - - @Output() submit = new EventEmitter(); - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - /** - * 可选的模板列表 - */ - presetTplList: any[]; - - /** - * 选中的模板 - */ - selectedTpl: any; - - showPreview = false; - - constructor(private http: HttpClient) { - } - - ngOnInit() { - this.getTemplate(); - } - - getTemplate() { - const self = this; - this.http.get(this.templateUri).subscribe(data => { - self.presetTplList = data || []; - if (data.length) { - const defaultSelectedTemplate = self.presetTplList.find(template => template.id === self.defaultSelectedTemplateId); - if (defaultSelectedTemplate) { - self.selectedTpl = defaultSelectedTemplate; - } else { - self.selectedTpl = self.presetTplList[0]; - } - } - }); - } - - changeTpl(tplId: string) { - this.selectedTpl = this.presetTplList.find(t => t.id === tplId); - } - - clickCancel() { - this.cancel.emit(); - } - - clickConfirm() { - this.submit.emit({ - id: this.selectedTpl.id, - html: this.selectedTpl.templateHtml, - presetsTemplateFragements: this.selectedTpl.presetsTemplateFragements, - presetFields: this.selectedTpl.presetFields, - customClass: this.selectedTpl.customClass, - toolbarButtonClass: this.selectedTpl.toolbarButtonClass, - toolbarButtonFragement: this.selectedTpl.toolbarButtonFragement, - toolbarButtonIcons: this.selectedTpl.toolbarButtonIcons, - toolbarFragement: this.selectedTpl.toolbarFragement, - toolbarType: this.selectedTpl.toolbarType, - toolbarWrapperFragement: this.selectedTpl.toolbarWrapperFragement - }); - } - - showPreviewImage() { - this.showPreview = true; - } - - hidePreviewImage() { - this.showPreview = false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.css deleted file mode 100644 index 39f166a469479b97b6b75c8229b26a4e07133bee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.css +++ /dev/null @@ -1,17 +0,0 @@ -.editor { - position: relative; - width: 60%; - /* flex: 1; */ -} - -.editor .custom-monaco-editor { - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} - -.varMappingTab { - width: 40%; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.html deleted file mode 100644 index c6a1e271224469c6decd0bdc2a223cd29f9a67e0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.html +++ /dev/null @@ -1,60 +0,0 @@ -
- - - -
- -
-
- - -
- - - - - - - - - -
-
- -
- -
-
-
-
-
- - - - - - -
-
- - - - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.ts deleted file mode 100644 index 886f6e606c972fdb0e3fdae2321ec648537ea7c1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component.ts +++ /dev/null @@ -1,728 +0,0 @@ -import { Component, Input, Output, EventEmitter, ViewChild, TemplateRef, OnInit, HostBinding } from '@angular/core'; -import { IdService } from '@farris/ui-common'; -import { BsModalRef, BsModalService } from '@farris/ui-modal'; -import { cloneDeep } from 'lodash-es'; -import { NotifyService } from '@farris/ui-notify'; -import { DesignViewModelService, DomService, FormSchemaEntityField } from '@farris/designer-services'; -import { HttpClient } from '@angular/common/http'; -import { ControlService } from '../../../../../../service/control.service'; -import { merge } from 'lodash-es'; - -export interface TemplateButton { - id: string; - type: string; - appearance: { class: string }; - text: string; - click: string; -} - -export interface TemplateFragemnt { - id: string; - name: string; - category: string; - content: string; - contentItem?: string; -} - -export interface TemplateField { - id: string; - type: string; - name: string; - presetType: string; - category: string; - binding: { - field: string; - path: string; - }; - enumData: any[]; - guid?: string; -} - -export interface TemplateEditorColumn { - field: string; - title: string; - editor: any; - formatter: any; -} - -export interface MappingField { - value: string; - text: string; -} - -@Component({ - selector: 'app-template-binding-editor', - templateUrl: './template-binding-editor.component.html', - styleUrls: ['./template-binding-editor.component.css'] - -}) -export class TemplateBindingEditorComponent implements OnInit { - - @Output() closeModal = new EventEmitter(); - - @Output() submitModal = new EventEmitter(); - - @Input() value; - - @Input() editorParams: { - listViewId: string, - schemaFields: FormSchemaEntityField[], - templateUri: string, - viewModelId: string - } = { - listViewId: '', - schemaFields: [], - templateUri: '', - viewModelId: '' - }; - - @ViewChild('bindingFooter') modalFooter: TemplateRef; - - modalConfig = { - title: '模板编辑器', - width: 900, - height: 700, - showButtons: true - }; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - // 代码编辑器配置 - codeEditorOptions = { - theme: 'vs-dark', - language: 'html', - formatOnType: true, - foldingStrategy: 'indentation', // 显示缩进 - folding: true, // 启用代码折叠功能 - showFoldingControls: 'always', // 默认显示装订线 - automaticLayout: true // 监测父容器变化 - }; - - presetTemplateId: string; - - templateFragements: TemplateFragemnt[]; - - templateFragementCategory: Set; - - templateFragementMap: Map; - - templateFragementCategoryMap: Map; - - fieldTemplateMapGroupedByCategory = new Map>(); - - fields: TemplateField[]; - - templateEditorColumns = []; - - // 模板HTML - templateHtml = ''; - - // 模板定义的样式 - templateCustomClass = ''; - - // 代码编辑器实例 - monacoEditor: any; - - toolbar = { id: '', type: '', contents: [] }; - - toolbarTemplate = ''; - - toolbarFragement = ''; - - toolbarButtonFragement = ''; - - toolbarButtonClass = ''; - - toolbarButtonIcons = []; - - toolbarType = ''; - - toolbarWrapperFragement = ''; - - defaultButtonClass: string; - - showTemplate = 'listItem'; - - bindingTemplate = ''; - - /** 模板单选组的枚举值 */ - templateRadioGroups = [{ value: 'listItem', name: '行模板' }, { value: 'buttons', name: '按钮模板' }]; - - // 内置模板窗口 - @ViewChild('presetTplRef') presetTplRef: TemplateRef; - - presetTplModal: BsModalRef; - - /** 编辑器使用的模板数据 */ - currentValue; - - /** 触发编辑器的保存操作 */ - triggerModalSave: any; - - /** 记录编辑器刚打开时的DOM actions数据。编辑器内部交互面板在操作过程中可能会修改actions节点,导致点击【取消】按钮时无法还原actions数据。所以这里记录一份原始数据,方便还原。 */ - private previousActions: any[]; - - /** 记录编辑器刚打开时的DOM viewmodels数据。编辑器内部交互面板在操作过程中可能会修改viewmodels节点,导致点击【取消】按钮时无法还原viewmodels数据。所以这里记录一份原始数据,方便还原。 */ - private previousViewModels: any[]; - - - constructor( - private modalServ: BsModalService, - private notifyServ: NotifyService, - private idService: IdService, - private http: HttpClient, - private domService: DomService, - private dgVMService: DesignViewModelService, - private controlService: ControlService) { - } - - ngOnInit() { - - this.checkMappingFields(); - if (this.value && this.value.html) { - - // 不影响原数据 - this.currentValue = cloneDeep(this.value); - - this.presetTemplateId = this.currentValue.presetTemplateId; - this.templateCustomClass = this.currentValue.customClass || ''; - this.templateHtml = this.currentValue.html; - if (this.currentValue.toolbar) { - this.toolbar = this.currentValue.toolbar; - } - this.toolbarTemplate = this.currentValue.toolbarTemplate; - this.bindingTemplate = this.templateHtml; - this.loadPresetTemplateFragements(this.presetTemplateId, this.editorParams.templateUri, this.currentValue.fields); - - } - this.checkHasToolbarTemplate(); - - this.triggerModalSave = () => this.clickConfirm(); - - this.previousActions = cloneDeep(this.domService.module.actions); - this.previousViewModels = cloneDeep(this.domService.module.viewmodels); - } - - /** - * 检查当前行模板中是否包含的占位符。 - * jit生成的逻辑是将按钮模板放在字符串的位置,所以若不包含此占位符,则页面上不展示按钮相关配置 - */ - private checkHasToolbarTemplate() { - const listViewHtmlToolbarKey = ''; - - if (this.templateHtml && this.templateHtml.includes(listViewHtmlToolbarKey)) { - this.templateRadioGroups = [{ value: 'listItem', name: '行模板' }, { value: 'buttons', name: '按钮模板' }]; - } else { - this.templateRadioGroups = [{ value: 'listItem', name: '行模板' }]; - this.showTemplate = 'listItem'; - } - } - private loadPresetTemplateFragements(presetTemplateId: string, templateUri: string, templateFields: TemplateField[]) { - this.http.get(templateUri).subscribe(presetTemplates => { - if (presetTemplates || presetTemplates.length) { - const presetTemplate = presetTemplates.find(template => template.id === presetTemplateId); - if (presetTemplate) { - this.updatePresetTemplateFragements(presetTemplate); - this.fields = templateFields; - } - } - }); - } - - showPresetTplModal() { - const modalConfig = { - title: '选择内置模板', - width: 800, - height: 500, - showButtons: false, - showMaxButton: false - }; - - this.presetTplModal = this.modalServ.show(this.presetTplRef, modalConfig); - } - - private updatePresetTemplateFragements(presetTemplate: any) { - const { - presetsTemplateFragements, - toolbarFragement, - toolbarButtonFragement, - toolbarButtonClass, - toolbarButtonIcons, - toolbarType, - toolbarWrapperFragement - } = presetTemplate; - this.templateFragements = presetsTemplateFragements; - this.templateFragementCategory = this.buildPresetTempateCategorys(presetsTemplateFragements); - this.templateFragementMap = this.buildPresetTempateFragementMap(presetsTemplateFragements); - this.templateFragementCategoryMap = this.buildPresetTemplateFragementCategoryMap(presetsTemplateFragements); - this.toolbarFragement = toolbarFragement; - this.toolbarButtonFragement = toolbarButtonFragement; - this.toolbarButtonClass = toolbarButtonClass; - this.toolbarButtonIcons = toolbarButtonIcons; - this.toolbarType = toolbarType; - this.toolbarWrapperFragement = toolbarWrapperFragement; - this.toolbar.id = `${this.editorParams.listViewId.replace(/\-/g, '')}toolbar`; - this.toolbar.type = this.toolbarType; - } - - /** - * 选择内置模板 - */ - selectPresetTpl(data) { - if (!data) { - return; - } - const { id, html, presetsTemplateFragements, presetFields, customClass } = data; - this.presetTemplateId = id; - this.updatePresetTemplateFragements(data); - this.templateHtml = data.html; - this.templateCustomClass = data.customClass || ''; - - this.showTemplate = 'listItem'; - this.fields = this.buildPresetTemplateFields(presetFields); - this.toolbar.contents = []; - this.updateTemplateHtml(); - - this.presetTplModal.close(); - } - - private buildPresetTempateFragementMap(presetsTemplateFragements: TemplateFragemnt[]) { - const presetTempateFragementMap = new Map(); - presetsTemplateFragements - .reduce>((fragementMap: Map, fragement: TemplateFragemnt) => { - if (!fragementMap.has(fragement.id)) { - fragementMap.set(fragement.id, fragement); - } - return fragementMap; - }, presetTempateFragementMap); - return presetTempateFragementMap; - } - - private buildPresetTempateCategorys(presetsTemplateFragements: TemplateFragemnt[]) { - const categorys: Set = new Set(); - presetsTemplateFragements - .reduce>((fragementCategory: Set, fragement: TemplateFragemnt) => { - fragementCategory.add(fragement.category); - return fragementCategory; - }, categorys); - return categorys; - } - - private buildPresetTemplateFragementCategoryMap(presetsTemplateFragements: TemplateFragemnt[]) { - const fragementCategoryMap: Map = new Map(); - presetsTemplateFragements - .reduce>((currentMap: Map, fragement: TemplateFragemnt) => { - if (!currentMap.has(fragement.category)) { - currentMap.set(fragement.category, []); - } - const fragments = currentMap.get(fragement.category); - fragments.push(fragement); - return currentMap; - }, fragementCategoryMap); - return fragementCategoryMap; - } - - private generateTemplateHtml( - template: string, - presetsTemplateFragements: TemplateFragemnt[], - templateFields: TemplateField[], - changedField: TemplateField): string { - const fieldsGroupedByCategory = new Map(); - - templateFields.reduce>((groups, field) => { - const { category } = field; - if (!groups.has(category)) { - groups.set(category, []); - } - const fieldsInSpecialCategory = groups.get(category); - fieldsInSpecialCategory.push(field); - return groups; - }, fieldsGroupedByCategory); - - const fieldTemplateMapGroupedByCategory = this.parseFieldTemplates(template, fieldsGroupedByCategory); - this.templateFragementCategory.forEach(category => { - let fieldsFragementsInSpecialCategory = ['']; - if (fieldsGroupedByCategory.has(category)) { - const fieldsInSpecialCategory = fieldsGroupedByCategory.get(category); - const fieldTempalteMapInSpecialCategory = fieldTemplateMapGroupedByCategory.get(category); - fieldsFragementsInSpecialCategory = fieldsInSpecialCategory.map(field => { - if (fieldTempalteMapInSpecialCategory && fieldTempalteMapInSpecialCategory.has(field.id)) { - const fieldTemplateItem = fieldTempalteMapInSpecialCategory.get(field.id); - if (fieldTemplateItem && (!changedField || changedField.id !== field.id)) { - return fieldTemplateItem.template; - } - } - const fragementType = field.presetType; - const fragement = this.templateFragementMap.get(fragementType); - if (fragement) { - let fieldContent = fragement.content; - if (fragement.contentItem) { - const contentItem = fragement.contentItem; - if (field.enumData && field.enumData.length) { - const contentItemFragements = field.enumData.map(({ value, name }) => { - return contentItem.replace('${preset:enumValue}', value) - .replace('${preset:enumText}', `\${${field.id}:${value}:text}`); - }); - fieldContent = fieldContent.replace('${preset:items}', contentItemFragements.join('')); - } - } - return fieldContent.replace('${preset:field}', field.id) - .replace('${preset:value}', '${' + field.id + ':value}') - .replace('${preset:label}', '${' + field.id + ':label}') - .replace('${preset:field}', field.id); - } - }); - } - const fieldsContentInSpecialCategory = fieldsFragementsInSpecialCategory.join(''); - const regString = `[\\S\\s]*`; - const replaceRegExp = new RegExp(regString, 'g'); - template = template.replace(replaceRegExp, - `${fieldsContentInSpecialCategory}`); - }); - return template; - } - - private parseFieldTemplates(template: string, fieldsGroupedByCategory: Map) - : Map> { - const fieldTemplateMapGroupedByCategory = new Map>(); - fieldsGroupedByCategory.forEach((fieldsInSpecialCategory, category) => { - const fieldTemplateMap = new Map(); - fieldsInSpecialCategory.reduce>((previousValue, field) => { - const regString = `[\\S\\s]*`; - const searchingRegExp = new RegExp(regString); - const matchingResult = template.match(searchingRegExp); - if (matchingResult && matchingResult.length) { - const matchedTemplate = matchingResult[0]; - if (matchedTemplate) { - previousValue.set(field.id, { bindingPath: field.binding.path, template: matchedTemplate }); - } - } - return previousValue; - }, fieldTemplateMap); - fieldTemplateMapGroupedByCategory.set(category, fieldTemplateMap); - }); - return fieldTemplateMapGroupedByCategory; - } - - private buildPresetTemplateFields(presetFields: TemplateField[]): TemplateField[] { - const fields: TemplateField[] = []; - presetFields.forEach(presetField => { - fields.push({ - id: presetField.id, - type: 'TemplateField', - name: presetField.name, - presetType: presetField.presetType, - category: presetField.category, - binding: { - field: '', - path: '' - }, - enumData: [] - }); - }); - return fields; - } - - private generateToolbarTemplate( - toolbarWrapperFragement: string, - toolbarFragement: string, - toolbarButtonFragement: string, - buttons: TemplateButton[] - ): string { - let toolbarTemplate = toolbarFragement; - let buttonsFragment = ['']; - if (toolbarButtonFragement && buttons && buttons.length) { - buttonsFragment = buttons.map(button => { - return toolbarButtonFragement.replace('${preset:button-class}', button.appearance.class) - .replace('${preset:button-text}', '${' + button.id + ':text}') - .replace('${preset:toolbar-click-callback}', `${this.toolbar.id}ClickHandler`) - .replace('${preset:button-id}', button.id); - // .replace('${preset:button-action}', button.click); - }); - } - const buttonsTemplate = buttonsFragment.join(''); - - if (toolbarTemplate && buttonsFragment.length) { - const regString = `[\\S\\s]*`; - const replaceRegExp = new RegExp(regString, 'g'); - toolbarTemplate = toolbarTemplate.replace(replaceRegExp, - `${buttonsTemplate}`); - } - - if (toolbarTemplate) { - toolbarTemplate = toolbarTemplate.replace('${preset:toolbar-config-variable}', `${this.toolbar.id}config`) - .replace('${preset:toolbar-click-callback}', `${this.toolbar.id}ClickHandler`); - } - - if (toolbarWrapperFragement && toolbarTemplate.length) { - const regString = `[\\S\\s]*`; - const replaceRegExp = new RegExp(regString, 'g'); - toolbarTemplate = toolbarWrapperFragement.replace(replaceRegExp, - `${toolbarTemplate}`); - } - - return toolbarTemplate; - } - - cancelPresetTpl() { - this.presetTplModal.close(); - } - - onMonacoInit($event) { - this.monacoEditor = $event.editor; - // 监听代码编辑器的文本变化,重新组装变量映射 - this.monacoEditor.onDidChangeModelContent(() => { - if (this.showTemplate === 'listItem') { - this.templateHtml = this.bindingTemplate; - } else { - this.toolbarTemplate = this.bindingTemplate; - } - - this.checkHasToolbarTemplate(); - }); - } - - clickCancel() { - this.domService.module.actions = this.previousActions; - this.domService.module.viewmodels = this.previousViewModels; - this.closeModal.emit(); - } - - /** - * 点击确定,保存并关闭弹窗。 - * 返回是否成功保存,用于交互面板判断是否能跳转到代码视图。 - */ - clickConfirm(): boolean { - - if (!this.templateHtml) { - this.submitModal.emit({ value: null }); - return true; - } - - const tplVarList = []; - const bindingSchemaFields = []; - if (this.fields) { - for (const field of this.fields) { - if (!field.binding.field) { - this.notifyServ.warning('请选择变量【' + field.id + '】的绑定字段'); - return false; - } - const schemaField = this.editorParams.schemaFields.find(targetField => targetField.id === field.binding.field); - bindingSchemaFields.push(schemaField); - if (schemaField) { - field.binding.path = schemaField.bindingPath; - field.enumData = schemaField.type.enumValues; - } - if (!field.binding.path) { - this.notifyServ.warning('请选择变量【' + field.id + '】的绑定字段'); - return false; - } - if (tplVarList.includes(field.id)) { - this.notifyServ.warning('变量【' + field.id + '】重复,请修改'); - return false; - } - tplVarList.push(field.id); - } - } - - // 将绑定字段同步到视图模型 - this.addBindingFieldsToViewModel(bindingSchemaFields); - - // 删除视图模型中已被移除的字段 - this.removeBindingFieldsInViewModel(bindingSchemaFields); - - this.submitModal.emit({ - value: { - html: this.templateHtml, - fields: this.fields || [], - customClass: this.templateCustomClass, - toolbar: this.toolbar, - toolbarTemplate: this.toolbarTemplate, - presetTemplateId: this.presetTemplateId, - } - }); - return true; - } - - private addBindingFieldsToViewModel(bindingSchemaFields: FormSchemaEntityField[]) { - const dgVM = this.dgVMService.getDgViewModel(this.editorParams.viewModelId); - if (!dgVM) { - return; - } - bindingSchemaFields.forEach(bindingField => { - if (!dgVM.fields.find(f => f.id === bindingField.id)) { - const newField = merge({}, bindingField, { groupId: null, groupName: null }); - - dgVM.addField(newField); - } - }); - } - - private removeBindingFieldsInViewModel(bindingSchemaFields: FormSchemaEntityField[]) { - const dgVM = this.dgVMService.getDgViewModel(this.editorParams.viewModelId); - if (!dgVM) { - return; - } - const newFieldIds = bindingSchemaFields.map(field => field.id); - const deletedFields = dgVM.fields.filter(f => !newFieldIds.includes(f.id)); - if (deletedFields && deletedFields.length > 0) { - const deletedFieldIds = deletedFields.map(field => field.id); - dgVM.removeField(deletedFieldIds); - } - } - private checkMappingFields() { - for (const field of this.editorParams.schemaFields) { - if (!field.bindingPath) { - this.notifyServ.warning('字段缺少bindingPath属性,请先更新表单Schema。'); - this.closeModal.emit(); - return; - } - } - } - - private updateTemplateField(rowData: any, rowIndex: number) { - // const id = rowData.id; - const templateField = this.fields[rowIndex]; - if (templateField) { - Object.assign(templateField, rowData); - const presetFieldFragement = this.templateFragementMap.get(rowData.presetType); - if (presetFieldFragement) { - templateField.category = presetFieldFragement.category; - } - if (templateField.binding && templateField.binding.field) { - const schemaField = this.editorParams.schemaFields.find(targetField => targetField.id === templateField.binding.field); - if (schemaField) { - templateField.binding.path = schemaField.bindingPath; - templateField.enumData = cloneDeep(schemaField.type.enumValues); - } - } - } - } - - private updateTemplateHtml(variableItem?: TemplateField) { - this.templateHtml = this.generateTemplateHtml(this.templateHtml, this.templateFragements, this.fields, variableItem); - this.toolbarTemplate = this.generateToolbarTemplate(this.toolbarWrapperFragement, this.toolbarFragement, - this.toolbarButtonFragement, this.toolbar.contents); - this.bindingTemplate = this.showTemplate === 'listItem' ? this.templateHtml : this.toolbarTemplate; - - this.checkHasToolbarTemplate(); - } - - private onEndEdit({ column, rowData, rowIndex, value }) { - this.updateTemplateField(rowData, rowIndex); - this.updateTemplateHtml(); - } - - onVariableFieldChanged(variableItem: TemplateField) { - const index = this.fields.findIndex(field => field.id === variableItem.id); - this.updateTemplateField(variableItem, index); - this.updateTemplateHtml(variableItem); - } - - onVariableFieldAdded(category: string) { - const prefix = this.idService.guid().substr(0, 4); - const id = `${category}-${prefix}`; - const newItem = { - id, - type: 'TemplateField', - name: '', - presetType: '', - category, - binding: { - field: '', - path: '' - }, - enumData: [] - }; - this.fields = [...this.fields, newItem]; - // this.fields.push(newItem); - } - - onVariableFieldRemoved(variableItem: TemplateField) { - const index = this.fields.findIndex(field => field.id === variableItem.id); - if (index > -1) { - this.fields.splice(index, 1); - this.fields = [...this.fields]; - this.updateTemplateHtml(); - } - } - - moveUpVariableField(variableItem: TemplateField) { - const index = this.fields.findIndex(field => field.id === variableItem.id); - if (index > 0) { - const currentVariableField = this.fields[index]; - const preVariableField = this.fields[index - 1]; - this.fields[index - 1] = currentVariableField; - this.fields[index] = preVariableField; - this.fields = [...this.fields]; - this.updateTemplateHtml(); - } - } - - moveDownVariableField(variableItem: TemplateField) { - const index = this.fields.findIndex(field => field.id === variableItem.id); - if (index < this.fields.length - 1) { - const currentVariableField = this.fields[index]; - const nextVariableField = this.fields[index + 1]; - this.fields[index + 1] = currentVariableField; - this.fields[index] = nextVariableField; - this.fields = [...this.fields]; - this.updateTemplateHtml(); - } - } - - onButtonAdded() { - let presetButtonIcon = ''; - if (this.toolbarButtonIcons && this.toolbarButtonIcons.length) { - const iconIndex = Math.min(this.toolbar.contents.length, this.toolbarButtonIcons.length - 1); - presetButtonIcon = this.toolbarButtonIcons[iconIndex]; - } - const metadata = this.controlService.getControlMetaData('ToolBarItem'); - const radomNum = Math.random().toString().substr(2, 4); - metadata.id = 'toolBarItem_' + radomNum; - metadata.text = '按钮_' + radomNum; - metadata.appearance = { - class: this.toolbarButtonClass ? `${this.toolbarButtonClass} ${presetButtonIcon}` : '' - }; - this.toolbar.contents = [...this.toolbar.contents, metadata]; - this.updateTemplateHtml(); - } - - onButtonRemoved(templateButton: TemplateButton) { - const index = this.toolbar.contents.findIndex(item => item.id === templateButton.id); - if (index > -1) { - this.toolbar.contents.splice(index, 1); - this.toolbar.contents = [...this.toolbar.contents]; - this.updateTemplateHtml(); - } - } - - moveUpTemplateButton(templateButton: TemplateButton) { - const index = this.toolbar.contents.findIndex(item => item.id === templateButton.id); - if (index > 0) { - const currentButton = this.toolbar.contents[index]; - const preButton = this.toolbar.contents[index - 1]; - this.toolbar.contents[index - 1] = currentButton; - this.toolbar.contents[index] = preButton; - this.toolbar.contents = [...this.toolbar.contents]; - this.updateTemplateHtml(); - } - } - - moveDownTemplateButton(templateButton: TemplateButton) { - const index = this.toolbar.contents.findIndex(item => item.id === templateButton.id); - if (index < this.toolbar.contents.length - 1) { - const currentButton = this.toolbar.contents[index]; - const nextButton = this.toolbar.contents[index + 1]; - this.toolbar.contents[index + 1] = currentButton; - this.toolbar.contents[index] = nextButton; - this.toolbar.contents = [...this.toolbar.contents]; - this.updateTemplateHtml(); - } - } - - changeShowTemplateMode() { - this.bindingTemplate = this.showTemplate === 'listItem' ? this.templateHtml : this.toolbarTemplate; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.css deleted file mode 100644 index 111c3c5268f7f4da6ccdaa429710db645e8c3d7b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.css +++ /dev/null @@ -1,26 +0,0 @@ -:host { - flex: 1; -} - -.button-list-footer { - margin: 8px 0 0; - border: 1px dashed #D9D9D9; - height: 28px; -} - -.button-list-footer>button { - display: block; - text-align: center; - width: 100%; - height: 100%; -} - -.templat-button-wrapper { - display: flex; - flex: 1; - padding: 5px 10px; -} - -.templat-button-wrapper.active { - background-color: aliceblue; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.html deleted file mode 100644 index 5b5af0666e4678b89b66d5816e5202aa2cdbac95..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
-
-
-
-
-
{{button.text}}
-
-
- - - -
-
-
- -
-
- - -
-
-
\ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.spec.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.spec.ts deleted file mode 100644 index 577a6707436365808758d5f6fcf76216fa6a16a4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TemplateButtonEditorComponent } from './template-button-editor.component'; - -describe('TemplateButtonEditorComponent', () => { - let component: TemplateButtonEditorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ TemplateButtonEditorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TemplateButtonEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.ts deleted file mode 100644 index 6fe9b360473c9b7be0365d1e702e0f634cd903c8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { EventEditorService, DomService, WebCmdService, FormBasicService } from '@farris/designer-services'; -import { TemplateButton } from '../template-binding-editor.component'; -import { EventsEditorFuncUtils } from '../../../../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../../../../entity/property-change-entity'; -import { MessagerService } from '@farris/ui-messager'; - -@Component({ - selector: 'template-button-editor', - templateUrl: './template-button-editor.component.html', - styleUrls: ['./template-button-editor.component.css'] -}) -export class TemplateButtonEditorComponent implements OnInit, OnChanges { - - @Input() viewModelId: string; - - @Input() buttons: TemplateButton[]; - - /** 触发模板编辑器的保存方法 */ - @Input() triggerModalSave: any; - - @Output() buttonAdded = new EventEmitter(); - - @Output() buttonRemoved = new EventEmitter(); - - @Output() moveUpButton = new EventEmitter(); - - @Output() moveDownButton = new EventEmitter(); - - selectedButton: any; - - propertyConfig; - - propertyData; - - - constructor( - private domService: DomService, - private webCmdService: WebCmdService, - private formBasicService: FormBasicService, - private eventEditorService: EventEditorService, - private msgService: MessagerService) { } - - ngOnInit() { - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes.buttons) { - this.updateButtons(); - } - } - - private updateButtons() { - if (this.buttons && this.buttons.length) { - if (this.buttons.indexOf(this.selectedButton) < 0) { - this.selectedButton = this.buttons[0]; - } - } else { - this.selectedButton = {}; - } - this.updatePropertyPanel(); - } - - /** - * 更新属性面板 - */ - private updatePropertyPanel() { - // 属性面板 - this.propertyData = this.selectedButton; - this.propertyConfig = this.getPropertyConfig(); - } - - selectButtonChanged(button: TemplateButton) { - this.selectedButton = button; - this.updatePropertyPanel(); - } - - private getPropertyConfig(): ElementPropertyConfig[] { - const eventConfig = this.getEventPropertyConfig(this.propertyData, this.viewModelId); - return [ - { - categoryId: 'usual', - categoryName: '常规', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true - }, - { - propertyID: 'text', - propertyName: '文本', - propertyType: 'string', - readonly: false - }, - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: '按钮样式', - propertyType: 'string' - } - ] - }] - }, - eventConfig - ]; - } - // 事件编辑器集成 - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - const result = self.triggerModalSave(); - if (result) { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - } - }; - } - /** - * 新增节点 - * @param isRoot 是否一级节点 - */ - addItem() { - this.buttonAdded.emit(); - } - - /** - * 删除节点 - */ - removeItem(button: TemplateButton) { - this.buttonRemoved.emit(button); - } - - /** - * 上移 - */ - moveUpItem(button: TemplateButton) { - this.moveUpButton.emit(button); - } - - /** - * 下移 - */ - moveDownItem(button: TemplateButton) { - this.moveDownButton.emit(button); - } - - trackById(index: number, button: TemplateButton): string { return button.id; } - - propertyChanged(changeObject: PropertyChangeObject) { - if (changeObject.propertyID === 'text') { - this.updateControlMap(); - } - } - onPropertyModalChanged(e) { - this.addControlMapForEventPath(e); - } - - private addControlMapForEventPath(e) { - const changeObject: PropertyChangeObject = e.changeObject; - const param = e.parameters; - - // 交互面板有变更时,触发更新事件路径 - if (changeObject.categoryId !== 'eventsEditor' || !param || !param.events || !param.events.length) { - return; - } - // 若没有父级控件id,则不设置事件路径 - this.updateControlMap(); - } - - /** - * 更新按钮的路径信息,用于交互面板显示 - */ - private updateControlMap() { - - const nodeText = this.propertyData.text; - this.domService.controlBasicInfoMap.set(this.propertyData.id, { - showName: nodeText, - parentPathName: `列表 > ${nodeText}` - }); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.css deleted file mode 100644 index 3696a295148733ea282c7b1e3a13bbc07cfd53fb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.css +++ /dev/null @@ -1,7 +0,0 @@ -:host { - display: flex; -} - -:host.active { - background-color: aliceblue; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.html deleted file mode 100644 index 182d68c10113a4cc32af242db1f1d2e4e710272d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.html +++ /dev/null @@ -1,55 +0,0 @@ -
-
-
-
-
- - -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- - -
-
-
-
-
-
- - - -
\ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.spec.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.spec.ts deleted file mode 100644 index fd81a72ea1b4bf677f440835dbff36d43b318dff..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { VariableListItemComponent } from './variable-list-item.component'; - -describe('VariableListItemComponent', () => { - let component: VariableListItemComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ VariableListItemComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(VariableListItemComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.ts deleted file mode 100644 index a294d3bcb1b17df591141a58c61a02a0cc336da2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { TemplateField } from '../template-binding-editor.component'; -import { FormSchemaEntityField, FormSchemaEntityFieldType } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; - -export interface BindingSchemaField { - id: string; - code: string; - name: string; - displayName: string; - bindingPath: string; - type: FormSchemaEntityFieldType; -} - -@Component({ - selector: 'variable-list-item', - templateUrl: './variable-list-item.component.html', - styleUrls: ['./variable-list-item.component.css'] -}) -export class VariableListItemComponent implements OnInit, OnChanges { - - @Input() active: boolean; - - @Input() item: TemplateField; - - @Input() schemaFields: FormSchemaEntityField[]; - - @Input() presetTypes: string[]; - - @Output() itemChanged = new EventEmitter(); - - @Output() itemRemoved = new EventEmitter(); - - @Output() moveUpItem = new EventEmitter(); - - @Output() moveDownItem = new EventEmitter(); - - bindingSchemaFields: BindingSchemaField[]; - - constructor() { } - - ngOnInit() { - - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes.schemaFields) { - this.bindingSchemaFields = this.getBindableFields(); - } - if (changes.item) { - if (changes.item.currentValue.presetType === 'badge' || changes.item.currentValue.presetType === 'status') { - this.bindingSchemaFields = this.getEnumableFields(); - } - } - } - - onBindingFieldChanged($event) { - const selectedField = $event.data as FormSchemaEntityField; - this.item.binding.field = selectedField.id; - this.item.binding.path = selectedField.bindingPath; - if (selectedField.type && selectedField.type.name === 'Enum' && selectedField.type.enumValues) { - this.item.enumData = cloneDeep(selectedField.type.enumValues); - } - this.itemChanged.emit(this.item); - } - - onPresetTypeChanged($event) { - const { id: selectedPresetType } = $event.data as { id: string, name: string }; - if (selectedPresetType === 'badge' || selectedPresetType === 'status') { - this.bindingSchemaFields = this.getEnumableFields(); - } else { - this.bindingSchemaFields = this.getBindableFields(); - } - this.item.presetType = selectedPresetType; - this.item.binding.field = ''; - this.item.binding.path = ''; - this.item.enumData = []; - this.itemChanged.emit(this.item); - } - - removeItem() { - this.itemRemoved.emit(this.item); - } - - moveUp() { - this.moveUpItem.emit(this.item); - } - - moveDown() { - this.moveDownItem.emit(this.item); - } - - private getEnumableFields(): BindingSchemaField[] { - return this.schemaFields - .filter(item => !!item.type.enumValues) - .map(item => { - return { - id: item.id, - code: item.code, - name: item.name, - displayName: `${item.name}(${item.label})`, - bindingPath: item.bindingPath, - type: item.type - }; - }); - } - - private getBindableFields(): BindingSchemaField[] { - return this.schemaFields - .map(item => { - return { - id: item.id, - code: item.code, - name: item.name, - displayName: `${item.name}(${item.label})`, - bindingPath: item.bindingPath, - type: item.type - }; - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.css b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.css deleted file mode 100644 index 8fb6a7006e04b725af135d621dc0bf30a6c53825..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.css +++ /dev/null @@ -1,12 +0,0 @@ -.variable-group-footer { - margin: 8px 0 0; - border: 1px dashed #D9D9D9; - height: 28px; -} - -.variable-group-footer>button { - display: block; - text-align: center; - width: 100%; - height: 100%; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.html b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.html deleted file mode 100644 index 59ae66f3660bbd0b601cfc5eeb72398ffd66c8bc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
-

{{group.id}}

-
-
-
- - -
- -
\ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.spec.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.spec.ts deleted file mode 100644 index 9139cb2b7f3312612e07f52a78e93744b3d2c192..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { VariableListComponent } from './variable-list.component'; - -describe('VariableListComponent', () => { - let component: VariableListComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ VariableListComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(VariableListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.ts deleted file mode 100644 index b3fe2cf95803e16026cf9903df21526dd3f8568c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { TemplateField } from '../template-binding-editor.component'; -import { FormSchemaEntityField } from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; - -export interface VariableGroup { - id: string; - name: string; - items: TemplateField[]; - canAdd: boolean; - presetTypes: { id: string, name: string }[]; -} - -@Component({ - selector: 'variable-list', - templateUrl: './variable-list.component.html', - styleUrls: ['./variable-list.component.css'] -}) -export class VariableListComponent implements OnInit, OnChanges { - - @Input() variables: TemplateField[]; - - @Input() schemaFields: FormSchemaEntityField[]; - - @Output() variableChanged = new EventEmitter(); - - @Output() variableAdded = new EventEmitter(); - - @Output() variableRemoved = new EventEmitter(); - - @Output() moveUpVariable = new EventEmitter(); - - @Output() moveDownVariable = new EventEmitter(); - - variableGroups: VariableGroup[] = []; - - selectItem: any; - - constructor(private idService: IdService) { } - - ngOnInit() { - this.updateVariableGroup(this.variables); - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes.variables) { - this.updateVariableGroup(this.variables); - } - } - - private updateVariableGroup(variables: TemplateField[]) { - const groups: VariableGroup[] = []; - if (variables && variables.length) { - variables.reduce((currentGroups, variableField) => { - const variableCategory = variableField.category; - let specialCategoryGroup = currentGroups.find(group => group.id === variableCategory); - if (!specialCategoryGroup) { - specialCategoryGroup = { - id: variableCategory, - name: variableCategory, - items: [], - canAdd: true, - presetTypes: [] - }; - currentGroups.push(specialCategoryGroup); - } - variableField.guid = this.idService.guid(); - specialCategoryGroup.items.push(variableField); - if (specialCategoryGroup.presetTypes.findIndex(preset => preset.id === variableField.presetType) < 0) { - specialCategoryGroup.presetTypes.push({ - id: variableField.presetType, - name: variableField.presetType - }); - } - return currentGroups; - }, groups); - } - this.variableGroups = groups; - } - - trackById(index: number, group: VariableGroup): string { return group.id; } - - trackByItemId(index: number, item: TemplateField): string { return item.guid; } - - onVariableItemChanged(variableItem: TemplateField) { - this.variableChanged.emit(variableItem); - } - - addItem(groupId: string) { - this.variableAdded.emit(groupId); - } - - removeItem(variableItem: TemplateField) { - this.variableRemoved.emit(variableItem); - } - - moveUp(variableItem: TemplateField) { - const variableGroup = this.variableGroups.find(group => group.id === variableItem.category); - if (variableGroup && variableGroup.items.findIndex(item => item.id === variableItem.id) > 0) { - this.moveUpVariable.emit(variableItem); - } - } - - moveDown(variableItem: TemplateField) { - const variableGroup = this.variableGroups.find(group => group.id === variableItem.category); - if (variableGroup && variableGroup.items.findIndex(item => item.id === variableItem.id) < variableGroup.items.length - 1) { - this.moveDownVariable.emit(variableItem); - } - } - - selectItemChanged(templateFieldItem: TemplateField) { - this.selectItem = templateFieldItem; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/property.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/property.ts deleted file mode 100644 index a82433d448d7e0e2c0e6b63a73a46e394f11aaf0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/property/property.ts +++ /dev/null @@ -1,473 +0,0 @@ -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormSchemaEntity, FormSchemaEntityField } from '@farris/designer-services'; -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { CollectionProp } from '../../common/property/collection-property-config'; -import { TemplateBindingEditorComponent } from './editor/template-binding-editor/template-binding-editor.component'; - -export class ListViewProp extends CollectionProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const viewModelId = this.viewModelId; - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - propertyConfig.push(eventPropConfig); - - // 分页属性 - const pagePropConfig = this.getPagePropConfig(propertyData, viewModelId); - propertyConfig.push(pagePropConfig); - - - return propertyConfig; - } - getBasicPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - } - ] - }; - } - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const commonProps = this.getCommonAppearanceProperties(); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - ...commonProps, - { - propertyID: 'listClassName', - propertyName: '列表自定义样式', - propertyType: 'string', - description: '列表自定义样式设置' - }, - { - propertyID: 'headerTemplate', - propertyName: '头部Html模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'contentTemplate', - propertyName: '主体Html模板', - propertyType: 'modal', - editor: TemplateBindingEditorComponent, - editorParams: { - listViewId: propertyData.id, - templateUri: 'assets/form/preset-template/listview-template.json', - schemaFields: this.getPanelMappingFields(propertyData), - viewModelId: this.viewModelId - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取字段最新值 - this.editorParams.schemaFields = self.getPanelMappingFields(propertyData); - return { result: true, message: '' }; - } - }, - { - propertyID: 'footerTemplate', - propertyName: '底部Html模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - } - ] - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string) { - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'fill', - propertyName: '填充', - propertyType: 'boolean', - description: '是否填充' - }, - { - propertyID: 'cardLayout', - propertyName: '横向排列', - propertyType: 'boolean', - description: '是否横向排列', - defaultValue: false - }, - { - propertyID: 'showEmpty', - propertyName: '空数据展示', - propertyType: 'boolean', - description: '数据为空时是否展示', - defaultValue: true - }, - { - propertyID: 'emptyTemplate', - propertyName: '空数据时的展示模板', - propertyType: 'modal', - description: '数据为空时的展示模板', - visible: propertyData.showEmpty, - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'sortable', - propertyName: '允许排序', - propertyType: 'boolean', - description: '是否允许排序' - }, - { - propertyID: 'sort', - propertyName: '排序字段', - propertyType: 'string', - description: '排序字段设置' - }, - { - propertyID: 'multiSelect', - propertyName: '是否启用多选', - propertyType: 'boolean', - defaultValue: false - } - - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - if (changeObject.propertyID === 'showEmpty') { - const emptyTemplate = this.properties.find(p => p.propertyID === 'emptyTemplate'); - if (emptyTemplate) { - emptyTemplate.visible = changeObject.propertyValue; - } - } - } - }; - } - - private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'listClick', - name: '行点击事件' - } - ]; - eventList = self.switchEvents(propertyData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - }; - } - private switchEvents(propertyData, eventList) { - if (propertyData.supportPaging) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'pageChanged'); - if (!eventListExist) { - eventList.push( - { - label: 'pageChanged', - name: '切换分页事件' - }, - { - label: 'pageSizeChanged', - name: '每页显示条数变化事件' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'pageChanged' && eventListItem.label !== 'pageSizeChanged') - } - - - if (propertyData.multiSelect) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'checkChange'); - if (!eventListExist) { - eventList.push( - { - label: 'checkChange', - name: '多选改变事件' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'checkChange'); - } - - return eventList; - } - - private getPagePropConfig(propertyData: any, viewModelId: string) { - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.pagination) { - viewModel.pagination = { - enable: false - }; - } - const vmPagination = viewModel.pagination; - // 这三个属性是存在vm中,但是需要在datagrid控件上编辑 - // propertyData.supportPaging = vmPagination.enable; - propertyData.pageList = vmPagination.pageList ? vmPagination.pageList : propertyData.pageList; - propertyData.pageSize = vmPagination.pageSize ? vmPagination.pageSize : propertyData.pageSize; - - const pageSizeIterator = this.getPageSizeIterator(propertyData.pageList); - const self = this; - return { - categoryId: 'page', - categoryName: '分页', - properties: [{ - propertyID: 'supportPaging', - propertyName: '启用分页', - propertyType: 'boolean', - defaultValue: false, - readonly: viewModel.bindTo !== '/' - }, - { - propertyID: 'showPageSize', - propertyName: '显示分页条数', - propertyType: 'boolean', - description: '是否显示分页条数', - visible: propertyData.supportPaging - }, - { - propertyID: 'pageList', - propertyName: '分页条数', - propertyType: 'string', - description: '请输入以英文逗号分开的数字,最大值为1000。例如:10,20,30,50,100', - visible: propertyData.supportPaging && propertyData.showPageSize, - notAllowedChars: [/[^\d,]/g] - }, - { - propertyID: 'pageSize', - propertyName: '默认分页条数', - propertyType: 'select', - description: '默认分页条数设置', - iterator: pageSizeIterator, - visible: propertyData.supportPaging - }, - { - propertyID: 'pageTemplate', - propertyName: '分页导航模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.supportPaging - }], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'supportPaging': { - this.properties.map(p => { - if (p.propertyID !== 'supportPaging') { - p.visible = changeObject.propertyValue; - } - if (p.propertyID === 'pageList') { - p.visible = changeObject.propertyValue && propertyData.showPageSize; - } - }); - vmPagination.enable = changeObject.propertyValue; - - if (changeObject.propertyValue) { - if (!propertyData.pageSize) { - propertyData.pageSize = 20; - vmPagination.pageSize = 20; - } - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - } - break; - } - case 'pageList': { - vmPagination.pageList = changeObject.propertyValue; - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(changeObject.propertyValue); - } - if (!changeObject.propertyValue.includes(propertyData.pageSize)) { - vmPagination.pageSize = propertyData.pageSize = null; - } - break; - } - case 'pageSize': { - vmPagination.pageSize = changeObject.propertyValue; - break; - } - case 'showPageSize': { - const pageList = this.properties.find(p => p.propertyID === 'pageList'); - if (pageList) { - pageList.visible = changeObject.propertyValue; - } - - if (changeObject.propertyValue) { - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - - // 默认配置分页条数变化事件 - if (!propertyData.pageSizeChanged) { - propertyData.pageSizeChanged = propertyData.pageChanged; - } - - - } - - - } - } - } - }; - } - getPageSizeIterator(pageList: string) { - if (!pageList) { - pageList = '10,20,30,50,100'; - } - const iterator = []; - pageList.split(',').forEach(pageSize => { - iterator.push({ - key: Number.parseInt(pageSize, 10), - value: pageSize - }); - }); - return iterator; - } - - private setDefaultPageList(propertyData: any, vmPagination: any) { - - if (!propertyData.pageList) { - propertyData.pageList = '10,20,30,50,100'; - if (propertyData.pageSize && !propertyData.pageList.includes(propertyData.pageSize)) { - let pageList = [10, 20, 30, 50, 100, propertyData.pageSize]; - pageList = pageList.sort((A, B) => A - B); - propertyData.pageList = pageList.toString(); - } - vmPagination.pageList = propertyData.pageList; - } - } - - private getPanelMappingFields(propertyData: any): FormSchemaEntityField[] { - if (this.viewModelId) { - const displayFieldsInViewModel = this.getDisplayFieldsInViewModel(this.viewModelId); - return displayFieldsInViewModel; - } - return []; - } - - /** - * 获取当前视图模型对应实体中的所有字段 - * @param viewModelId 视图模型id - */ - private getDisplayFieldsInViewModel(viewModelId: string): FormSchemaEntityField[] { - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel) { - return []; - } - const entities = this.schemaService.getSchemaEntities(); - if (!entities || !entities.length) { - return []; - } - const allFieldsInSpecialEntity = this._getSimpleTableFieldsByBindTo(entities, viewModel.bindTo); - // const viewModelFieldsMap = new Map(); - // viewModel.fields.forEach(field => viewModelFieldsMap.set(field.id, true)); - // const displayEntityFieldInViewModel = allFieldsInSpecialEntity.filter(field => viewModelFieldsMap.has(field.id)); - return allFieldsInSpecialEntity; - } - - private _getSimpleTableFieldsByBindTo(entities: FormSchemaEntity[], bindTo: string): FormSchemaEntityField[] { - if (!entities || entities.length === 0) { - return; - } - const splitIndex = bindTo.indexOf('/'); - if (splitIndex > -1) { - bindTo = bindTo.slice(splitIndex + 1, bindTo.length); - } - - for (const entity of entities) { - const entityType = entity.type; - if (!entityType) { - return []; - } - if (bindTo === '' || bindTo === entity.code || bindTo === entity.label) { - return this.extractFieldsFromEntityType(entity.type); - } - if (entityType.entities && entityType.entities.length > 0) { - const fields = this._getSimpleTableFieldsByBindTo(entityType.entities, bindTo); - if (fields) { - return fields; - } - } - } - } - private extractFieldsFromEntityType(entityType: { fields?: FormSchemaEntityField[] }) { - const fields: FormSchemaEntityField[] = []; - if (entityType && entityType.fields && entityType.fields.length) { - entityType.fields.forEach(field => { - if (field.$type === 'SimpleField') { - fields.push(field); - } else { - const extractedFields = this.extractFieldsFromEntityType(field.type); - if (extractedFields.length) { - extractedFields.forEach(extractedField => fields.push(extractedField)); - } - } - }); - } - return fields; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/schema/schema.ts deleted file mode 100644 index 4835edc88cfebd690fa359f6fce9369629018206..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/schema/schema.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const ListViewSchema = { - id: 'listView', - type: 'ListView', - appearance: null, - dataSource: null, - disable: false, - fill: false, - cardLayout: false, - listClassName: '', - headerTemplate: null, - contentTemplate: null, - footerTemplate: null, - showEmpty: false, - emptyTemplate: null, - listClick: null, - multiSelect: false, - checkChange: null, - supportPaging: false, - showPageSize: true, - pageChanged: null, - pageTemplate: null, - sortable: false, - sort: null, - visible: true, - pageSizeChanged: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/form.ts deleted file mode 100644 index 5c9215f32b7f43c8c224cdf6746ba43f2cbd6660..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/form.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; - - -export default (ctx: any) => { - return ` -
-
-
-
    -
  • -
    -
    -
    -
    -
    -

    华东地区项目的物资采购

    -
    关于华东地区项目的物资采购订购的一些说明描述
    -
    -
    -
    -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    -

    集团本部食材采购部

    -
    关于集团本部食材采购部的一些说明描述
    -
    -
    -
    -
    -
    -
  • - -
  • -
    -
    -
    -
    -
    -

    集团运输服务票据

    -
    关于集团运输服务票据的一些说明描述
    -
    -
    -
    -
    -
    -
  • -
-
-
-
- - `; -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/list-view/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-empty-td.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-empty-td.ts deleted file mode 100644 index 94cdda4c0255cd81fb6a20d8ebd237eab23975a0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-empty-td.ts +++ /dev/null @@ -1,266 +0,0 @@ -import { ComponentResolveContext, DomService, FormBindingType, SchemaService } from '@farris/designer-services'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdTableTdComponent from './fd-table-td'; - -export default class FdTableEmptyTdComponent extends FdTableTdComponent { - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement, sourceContainer?: BuilderHTMLElement): boolean { - const serviceHost = this.options.designerHost; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this); - - - // 接收实体树中拖拽来的字段,需要判断是否属于当前组件绑定的实体 - if (resolveContext.sourceType === 'field') { - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - const fieldInfo = schemaService.getFieldByIDAndVMID(resolveContext.bindingTargetId, this.viewModelId); - if (!fieldInfo || !fieldInfo.schemaField) { - return false; - } else { - return true; - } - } - // 接收工具箱中拖拽来的输入类控件 - if (resolveContext.sourceType === 'control') { - return resolveContext.controlCategory === 'input'; - } - - // 单元格之间的拖拽,需要判断是否为同一个table的单元格 - if (resolveContext.sourceType === 'move' && sourceContainer) { - const sourceTdComponent = sourceContainer && sourceContainer.componentInstance; - - if (!sourceTdComponent || !sourceTdComponent.parent || sourceTdComponent.parent.id !== this.parent.id) { - return false; - } - // 为了进入拖拽drop方法,暂时为childrenContents赋值 - sourceContainer.childrenContents = []; - return true; - - } - return false; - } - - - /** - * 点击单元格后将同组的单元格都加上边框 - */ - afterComponentClicked() { - const { tdElements: tdElementsInSameGroup, activeEditorTdElement } = this.parent.getTdElementsInSameGroup(this.component.groupId); - - if (!tdElementsInSameGroup || !activeEditorTdElement) { - return; - } - // 增加边框 - const currentSelectedElements = document.getElementsByClassName('dgComponentSelected'); - for (const ele of Array.from(currentSelectedElements)) { - ele.classList.remove('dgComponentSelected'); - } - tdElementsInSameGroup.forEach(td => { - td.classList.add('dgComponentSelected'); - }); - } - - /** - * 触发整个面板的刷新 - */ - rebuild(): Promise { - return this.parent.rebuild(); - } - - /** - * 单元格接收新控件后事件(来源为控件工具箱或者实体树) - * @param componentResolveContext 新控件构造信息 - */ - afterAcceptNewChildElement(componentResolveContext: ComponentResolveContext) { - if (!componentResolveContext.bindingSourceContext) { - return; - } - - - // 根据字段信息组装单元格编辑器信息 - const editor = this.resolveTdEditorFromBindingContext(componentResolveContext); - - // 当前目标单元格是编辑器 - if (this.component.tdType === 'editor') { - this.component.editor = editor; - this.setLabelTdProperty(); - - } else if (this.component.tdType === 'staticText' && this.component.staticText) { - // 当前目标单元格是标签 - this.component.staticText.text = editor.title || ''; - this.component.staticText.require = editor.require === true; - - this.setEditorTdProperty(editor); - } - - // 切换到单元格的属性面板 - this.parent.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true }); - - } - - /** - * 根据字段信息组装单元格编辑器信息 - * @param componentResolveContext 新控件构造信息 - */ - private resolveTdEditorFromBindingContext(componentResolveContext: ComponentResolveContext) { - // 获取绑定字段或变量 - let bindingType; - let selectedField; - const variableFieldNode = componentResolveContext.bindingSourceContext.variableFieldNode; - if (variableFieldNode) { - bindingType = FormBindingType.Variable; - selectedField = variableFieldNode; - } - const entityFieldNode = componentResolveContext.bindingSourceContext.entityFieldNode; - if (entityFieldNode) { - bindingType = FormBindingType.Form; - selectedField = entityFieldNode; - } - - // 设置单元格编辑器 - const controlCreatorSerivice = this.options.designerHost.getService('ControlCreatorService'); - const domService = this.options.designerHost.getService('DomService'); - - const hasStateMachine = domService.module.stateMachines && domService.module.stateMachines.length > 0; - let editor; - if (bindingType === FormBindingType.Form) { - editor = controlCreatorSerivice.createTableTdControlBySchemaFeild(selectedField, componentResolveContext.controlType); - } else { - editor = controlCreatorSerivice.createTableTdControlByVariable(selectedField, componentResolveContext.controlType); - } - if (!editor.readonly && hasStateMachine) { - editor.readonly = '!viewModel.stateMachine[\'editable\']'; - } - - return editor; - } - /** - * 拖拽滑进单元格时,将同组的单元格都增加drag-over的样式,在视觉上让用户认为标签单元格和编辑器单元格为一个整体 - */ - onDragOver() { - const { tdElements: tdElementsInSameGroup } = this.parent.getTdElementsInSameGroup(this.component.groupId); - if (!tdElementsInSameGroup) { - return; - } - - tdElementsInSameGroup.forEach(td => { - if (td.className && !td.className.includes('drag-over')) { - td.classList.add('drag-over'); - } - }); - } - - /** - * 拖拽滑过离开单元格时,将同组的单元格都移除drag-over的样式,在视觉上让用户认为标签单元格和编辑器单元格为一个整体 - */ - onDragOut() { - const { tdElements: tdElementsInSameGroup } = this.parent.getTdElementsInSameGroup(this.component.groupId); - if (!tdElementsInSameGroup) { - return; - } - tdElementsInSameGroup.forEach(td => { - if (td.className) { - td.className = td.className.replace('drag-over', ''); - } - - }); - } - - /** - * 单元格之间拖拽后事件 - * @param elemnt 目标单元格元素 - * @param sourceElement 源标签单元格元素 - */ - onAcceptMovedChildElement(elemnt: BuilderHTMLElement, sourceElement: BuilderHTMLElement) { - // sourceElement.componentInstance是源单元格实例,需要获取源单元格同组的编辑器单元格实例,并将绑定信息设置到当前新单元格中 - const sourceLableTdComponentInstance = sourceElement.componentInstance; - if (!sourceLableTdComponentInstance) { - return; - } - - const { activeEditorTdElement: sourceActiveEditorTdElement } = this.parent.getTdElementsInSameGroup(sourceLableTdComponentInstance.component.groupId); - const sourceEditorTdId = sourceActiveEditorTdElement && sourceActiveEditorTdElement.getAttribute('id'); - if (!sourceEditorTdId) { - return; - } - let sourceTdEditor; - - // 1、清除源单元格及其对应编辑器的绑定信息 - if (sourceEditorTdId && this.parent.component && this.parent.component.rows) { - for (const row of this.parent.component.rows) { - if (row.columns && row.columns.length) { - - const tdComponent = row.columns.find(co => co.tdType === 'editor' && co.id === sourceEditorTdId); - if (tdComponent) { - sourceTdEditor = Object.assign({}, tdComponent.editor); - - tdComponent.editor = { - type: null, - binding: null - }; - const labelComponent = row.columns.find(co => co.tdType === 'staticText' && co.id === sourceLableTdComponentInstance.id); - labelComponent.staticText = { - text: '', - require: false - }; - break; - } - - } - } - } - if (!sourceTdEditor) { - return; - } - - // 2、设置目标单元格的绑定信息 - if (this.component.tdType === 'editor') { // 当前目标单元格是编辑器 - this.component.editor = sourceTdEditor; - this.setLabelTdProperty(); - - } else if (this.component.tdType === 'staticText' && this.component.staticText) { // 当前目标单元格是标签 - this.component.staticText.text = sourceTdEditor.title || ''; - this.component.staticText.require = sourceTdEditor.require === true; - - this.setEditorTdProperty(sourceTdEditor); - } - - // 若源单元格是选中状态,需要更新他的属性面板 - if (sourceActiveEditorTdElement.className.includes('dgComponentSelected')) { - this.parent.emit('componentClicked', { componentInstance: sourceActiveEditorTdElement.componentInstance, needUpdatePropertyPanel: true }); - } else if (this.element.className.includes('dgComponentSelected')) { - // 若当前目标单元格是选中状态,需要更新他的属性面板 - const { activeEditorTdElement: targetActiveEditorTdElement } = this.parent.getTdElementsInSameGroup(this.component.groupId); - this.parent.emit('componentClicked', { componentInstance: targetActiveEditorTdElement.componentInstance, needUpdatePropertyPanel: true }); - } - - // 重构表格 - this.parent.rebuild(); - } - - /** - * 设置同组编辑器单元格的属性 - * @param sourceTdEditor 编辑器绑定信息 - */ - private setEditorTdProperty(sourceTdEditor: any) { - - const { activeEditorTdElement: targetActiveEditorTdElement } = this.parent.getTdElementsInSameGroup(this.component.groupId); - const targetEditorTdId = targetActiveEditorTdElement && targetActiveEditorTdElement.getAttribute('id'); - - if (targetEditorTdId && this.parent.component && this.parent.component.rows) { - for (const row of this.parent.component.rows) { - if (row.columns && row.columns.length) { - - const tdComponent = row.columns.find(co => co.tdType === 'editor' && co.id === targetEditorTdId); - if (tdComponent) { - tdComponent.editor = sourceTdEditor; - break; - } - } - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-td.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-td.ts deleted file mode 100644 index 4c4ebb6e3dbcf809271145147ce13960a4b3ac76..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table-td.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import { TableTdProp } from '../property/td-property-config'; -import { DgControl, DomService } from '@farris/designer-services'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdInputGroupComponent from '../../../input/input-group/component/fd-input-group'; - -/** - * 单元格组件 - */ -export default class FdTableTdComponent extends FdCollectionBaseComponent { - - triggerBelongedComponentToMoveWhenMoved = false; - - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componentId; - - - - this.components = []; - } - - - attach(element: HTMLElement): Promise { - const superAttach: any = super.attach(element); - - // 为了拖拽过程中获取标签单元格的实例,在可拖拽元素上注册组件实例 - if (this.parent.component.devMode === 'simple') { - const tdLabelElement = element.getElementsByClassName('tdLabel'); - if (tdLabelElement && tdLabelElement[0]) { - (tdLabelElement[0] as BuilderHTMLElement).componentInstance = this; - } - } - - this.setTdEditorBasicInfoMap(); - - return superAttach; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(el: BuilderHTMLElement) { - return false; - } - - - /** - * 获取单元格可以拖拽的最外层容器:即为当前所属表格table - */ - getDragScopeElement(): HTMLElement { - return this.parent.element; - } - - /** - * 点击事件 - * @param e d - */ - onComponentClicked(e?: PointerEvent) { - if (e) { - e.preventDefault(); - e.stopPropagation(); - } - - return; - } - /** - * 外部触发的单元格点击事件 - */ - triggerComponentClick(): void { - super.triggerComponentClick(); - const tdEle = this.options.parent.getTdElement(this.component.id); - this.options.parent.triggerTdClick(tdEle); - - } - - /** - * 点击单元格触发的事件:用于高级表格 - * @param tdEle 单元格DOM元素 - * @param e 事件 - */ - triggerComponentClicked(tdEle?: HTMLElement, e?: MouseEvent) { - this.parent.clearSelected(); - if (tdEle) { - tdEle.classList.add('dgComponentSelected'); - - if (!tdEle.getAttribute('style').includes('border-width')) { - const borderWidth = (this.parent.component.border && this.parent.component.border.width ? this.parent.component.border.width : 1) + 1; - - let tdStyle = tdEle.getAttribute('style'); - tdStyle += ';border-width:' + borderWidth + 'px !important;'; - tdEle.setAttribute('style', tdStyle); - } - } - - // 切换到单元格的属性面板 - this.parent.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true, e }); - } - - /** - * 取消选中后,需要移除单元格上附加的边框宽度样式 - */ - afterComponentCancelClicked() { - const tdStyle = this.element.getAttribute('style'); - const styleWithoutBorderWidth = tdStyle.split(';').filter(style => style && !style.startsWith('border-')); - this.element.setAttribute('style', styleWithoutBorderWidth.join(';')); - - this.parent.tdManager.targetTdId = null; - this.parent.tdManager.targetMergedTdIds = []; - } - - afterComponentClicked(e?: PointerEvent): void { - - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: TableTdProp = new TableTdProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component, this.parent.component.devMode === 'simple'); - - return propertyConfig; - } - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - // 简单列表修改编辑器单元格的必填、标签、以及更换绑定字段、控件类型后,要同步到标签单元格 - if (this.parent.component.devMode === 'simple' && this.component.groupId) { - if (['require', 'title', 'binding', 'type', 'placeHolder'].includes(changeObject.propertyID)) { - this.setLabelTdProperty(); - } - } - this.parent.onPropertyChanged(changeObject); - } - - /** - * 设置标签单元格的属性 - */ - setLabelTdProperty() { - const { labelTdElement } = this.parent.getTdElementsInSameGroup(this.component.groupId); - const labelTdId = labelTdElement && labelTdElement.getAttribute('id'); - - if (labelTdId && this.parent.component && this.parent.component.rows) { - for (const row of this.parent.component.rows) { - if (row.columns && row.columns.length) { - - const tdComponent = row.columns.find(co => co.tdType === 'staticText' && co.id === labelTdId); - if (tdComponent) { - tdComponent.staticText.text = this.component.editor.title || ''; - tdComponent.staticText.require = this.component.editor.require; - return; - } - - } - - } - } - - } - /** - * 设置单元格内编辑器的映射信息,用于交互面板已绑定事件窗口 - */ - private setTdEditorBasicInfoMap() { - if (this.component.tdType !== 'editor' || !this.component.editor || !this.component.editor.binding) { - return; - } - const editor = this.component.editor; - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 列的展示名称和路径 - domService.controlBasicInfoMap.set(editor.id, { - showName: editor.title || '', - parentPathName: `表格 > 单元格 > ${editor.title}` - }); - - // 智能输入框内部嵌套的弹窗按钮路径信息 - if (editor.type === DgControl.InputGroup.type) { - const inputGroupControl = new FdInputGroupComponent(editor, this.parent.options); - inputGroupControl.setComponentExtendInfoMap(); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table.ts deleted file mode 100644 index 9f1b25402fd3232e941345b00be43ea3dc527362..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/fd-table.ts +++ /dev/null @@ -1,592 +0,0 @@ -import { TableSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TableProp } from '../property/table-property-config'; -import { BuilderHTMLElement, BuilderOptions } from '@farris/designer-element'; -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import FdTableTdComponent from './fd-table-td'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { TableTdManager } from './td-manager/td-manager'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { SimpleTableTdManager } from './td-manager/td-manager-simple'; -import FdTableEmptyTdComponent from './fd-table-empty-td'; -import { DesignerEnvType, DesignViewModelService, FormBasicService, FormBindingType, SchemaService } from '@farris/designer-services'; - -export default class FdTableComponent extends FdCollectionBaseComponent { - - /** 单元格实例 */ - private tdComponents = []; - - /** 单元格模板 */ - private tdComponentElements = []; - - /* 标识td的key值 */ - get tdLinkKey(): string { - return `td-${this.key}`; - } - get tdWidgetLinkKey(): string { - return `td-widget-${this.key}`; - } - - private tdManager: TableTdManager; - - constructor(component: any, options: BuilderOptions) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('table.css'); - - this.applyClassToComponent = false; - - const injector = options.designerHost.getService('Injector'); - - if (this.component.devMode === 'simple') { - this.tdManager = new SimpleTableTdManager(component, injector); - } else { - this.tdManager = new TableTdManager(component, injector); - } - - this.tdManager.redrawTable.subscribe((data: any) => { - - if (data && data.refreshPropertyPanel) { - this.triggerTdClick(this.tdManager.targetTdElement); - } - if (data && data.clearPropertyPanel) { - this.emit('clearPropertyPanel'); - } - this.rebuild(); - }); - } - - - getDefaultSchema(): any { - return TableSchema; - } - - - getTemplateName(): string { - return 'Table'; - } - /** padding是为了解决table不显示边框的问题 */ - getStyles(): string { - return ' display: block;padding:1px;'; - } - - - getClassName(): string { - let clsName = super.getClassName(); - if (this.component.devMode === 'simple') { - clsName += ' simpleTable'; - } - return clsName; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(el: BuilderHTMLElement) { - return false; - } - /** - * 去掉间距和线条 - */ - hideNestedPaddingInDesginerView(): boolean { - return true; - } - - getInnerComponentInstance() { - return this.tdComponents; - } - init(): void { - this.adaptOldControlSchema(); - this.components = []; - this.tdComponents = []; - this.tdManager.viewModelId = this.viewModelId; - - const isSimpleTable = this.component.devMode === 'simple'; - const options = Object.assign({}, this.options, { parent: this }); - this.component.rows.forEach((row, rowIndex) => { - if (!row.columns || !row.columns.length) { - return; - } - this.tdComponents[rowIndex] = {}; - this.tdComponentElements[rowIndex] = {}; - - row.columns.forEach((column, columnIndex) => { - let isEmptyTd = true; - if (column.tdType === 'editor' && column.editor && column.editor.type) { - const editorComponent: any = this.createComponent(column.editor, options, null); - - this.tdComponentElements[rowIndex][columnIndex] = this.renderComponents([editorComponent]); - - isEmptyTd = false; - } - if (column.tdType === 'staticText' && column.staticText.text) { - isEmptyTd = false; - } - const columnCmp = isSimpleTable && isEmptyTd ? new FdTableEmptyTdComponent(column, options) : new FdTableTdComponent(column, options); - - this.tdComponents[rowIndex][columnIndex] = columnCmp; - this.components.push(columnCmp); - }); - - }); - - } - - render(): any { - return super.render(this.renderTemplate('Table', { - tdComponents: this.tdComponentElements, - tdLinkKey: this.tdLinkKey, - targetTdId: this.tdManager.targetTdId, - targetMergedTdIds: this.tdManager.targetMergedTdIds, - tdWidgetLinkKey: this.tdWidgetLinkKey, - nestedKey: this.nestedKey, - checkTdCanDragAndDrop: (column: any, tdELement: string, devMode: string) => this.checkTdCanDragAndDrop(column, tdELement, devMode), - getSelectedBorderStyle: (column: any) => this.getSelectedBorderStyle(column) - })); - } - - attach(element: HTMLElement): Promise { - this.loadRefs(element, { - [this.tdLinkKey]: 'multiple', - [this.tdWidgetLinkKey]: 'multiple', - contextMenu: 'single' - }); - - const superAttach: any = super.attach(element); - - // 注册单元格选中事件 - if (this.refs[this.tdLinkKey] && this.refs[this.tdLinkKey].length) { - this.refs[this.tdLinkKey].forEach((tdEle, index) => { - - this.addEventListener(tdEle, 'click', (event: MouseEvent) => { - event.preventDefault(); - event.stopPropagation(); - - this.triggerTdClick(tdEle, event); - }); - }); - } - - // 注册单元格操作图标的点击事件 - if (this.refs[this.tdWidgetLinkKey] && this.refs[this.tdWidgetLinkKey].length) { - this.refs[this.tdWidgetLinkKey].forEach((widgetEle, index) => { - - this.addEventListener(widgetEle, 'click', (event: MouseEvent) => { - this.showTdManageContext(event, widgetEle); - }); - }); - } - - // 简单类表格要支持拖拽,所以给单元格附加操作 - // if (this.component.devMode === 'simple') { - this.component.rows.forEach((row, rowIndex: number) => { - if (!row.columns || !row.columns.length) { - return; - } - row.columns.forEach((column, columnIndex) => { - if (this.tdComponents[rowIndex] && this.tdComponents[rowIndex][columnIndex]) { - - const tdElement = Array.from(this.refs[this.tdLinkKey]).find((tdEle: HTMLElement) => tdEle.getAttribute('id') === column.id); - if (tdElement) { - this.tdComponents[rowIndex][columnIndex].attach(tdElement); - } - } - }); - - }); - // } - - return superAttach; - } - - /** - * 点击单元格 - * @param tdEle 单元格DOM元素 - * @param event 事件 - */ - triggerTdClick(tdEle: HTMLElement, event?: MouseEvent) { - // 简单表格 - if (this.component.devMode === 'simple') { - this.triggerMegedTdClick(tdEle, event); - return; - } - - // 高级表格 - this.tdManager.targetTdElement = tdEle; - this.tdManager.targetTdId = tdEle.getAttribute('id'); - this.getTargetColumnData(this.tdManager.targetTdId); - - this.tdComponents[this.tdManager.selectedRowIndex][this.tdManager.selectedColumnIndex].triggerComponentClicked(tdEle, event); - } - - /** - * 简单类表格在点击单元格时,要同时选中标签类单元格和编辑器类单元格,视觉上认为标签和编辑器是一个单元格 - * @param tdEle 用户点击的单元格DOM元素 - * @param event 事件 - */ - triggerMegedTdClick(tdEle: HTMLElement, event?: MouseEvent) { - - const groupId = tdEle.getAttribute('groupid'); - const { tdElements: tdElementsInSameGroup, activeEditorTdElement } = this.getTdElementsInSameGroup(groupId); - - if (!tdElementsInSameGroup || !activeEditorTdElement) { - return; - } - // 增加边框 - this.tdManager.targetMergedTdIds = []; - this.clearSelected(); - tdElementsInSameGroup.forEach(td => { - this.tdManager.targetMergedTdIds.push(td.getAttribute('id')); - td.classList.add('dgComponentSelected'); - this.addSelectedBorderToSimpleTableTd(td); - }); - - // 定位组内编辑器类型的单元格实例,即实际选中单元格 - this.tdManager.targetTdElement = activeEditorTdElement; - this.tdManager.targetTdId = activeEditorTdElement.getAttribute('id'); - this.getTargetColumnData(this.tdManager.targetTdId); - - - - - // 简单类表格的静态文本类单元格,支持直接在画布中修改文本 - const staticTd = tdElementsInSameGroup.find(tdEle => tdEle.component && tdEle.component.component && tdEle.component.component.tdType === 'staticText'); - if (staticTd && this.envType === DesignerEnvType.noCode) { - this.registerStaticTdContentEditable(staticTd, activeEditorTdElement); - } - - - // 切换到组内编辑器单元格的属性面板 - this.emit('componentClicked', { - componentInstance: this.tdComponents[this.tdManager.selectedRowIndex][this.tdManager.selectedColumnIndex], - needUpdatePropertyPanel: true, - e: event - }); - } - /** - * 清除页面上之前的选中状态 - */ - clearSelected() { - const currentSelectedElements = document.getElementsByClassName('dgComponentSelected'); - for (const ele of Array.from(currentSelectedElements)) { - ele.classList.remove('dgComponentSelected'); - - // 移除选中状态下的边框宽度 - if (ele && ele['componentInstance'] && ele['componentInstance'].type === 'TableTd') { - const tdStyle = ele.getAttribute('style'); - if (tdStyle) { - const styleWithoutBorderWidth = tdStyle.split(';').filter(style => style && !style.startsWith('border-')); - ele.setAttribute('style', styleWithoutBorderWidth.join(';')); - - } - } - - } - } - - /** - * 单元格选中状态下增加边框宽度,宽度需要比table配置的边框宽度大1px,否则页面无法显示蓝色边框 - * @param td 单元格元素 - */ - addSelectedBorderToSimpleTableTd(td: HTMLElement) { - if (!td.getAttribute('style').includes('border-top-width')) { - const borderWidth = this.component.border && !this.isEmptyValue(this.component.border.width) ? this.component.border.width : 1; - const selectedborderWidth = borderWidth + 1; - - let tdStyle = td.getAttribute('style'); - tdStyle += ';border-top-width:' + selectedborderWidth + 'px !important;'; - tdStyle += 'border-bottom-width:' + selectedborderWidth + 'px !important;'; - - // 标签单元格显示左边线,编辑器单元格显示右边框 - if (td.getAttribute('tdtype') === 'staticText') { - tdStyle += 'border-left-width:' + selectedborderWidth + 'px !important;'; - } - if (td.getAttribute('tdtype') === 'editor') { - tdStyle += 'border-right-width:' + selectedborderWidth + 'px !important;'; - } - td.setAttribute('style', tdStyle); - } - } - - /** - * 单元格选中状态下增加边框宽度,用于模板form.ts中使用 - * @param column 单元格schema - */ - getSelectedBorderStyle(column: any): string { - const borderWidth = this.component.border && !this.isEmptyValue(this.component.border.width) ? this.component.border.width : 1; - const selectedborderWidth = borderWidth + 1; - let borderStyle = ''; - // 简单表格的单元格的选中边框 - if (this.component.devMode === 'simple') { - borderStyle = - ';border-top-width:' + selectedborderWidth + 'px !important' + - ';border-bottom-width:' + selectedborderWidth + 'px !important'; - - // 标签单元格显示左边线,编辑器单元格显示右边框 - if (column.tdType === 'staticText') { - borderStyle += ';border-left-width:' + selectedborderWidth + 'px !important'; - } - if (column.tdType === 'editor') { - borderStyle += ';border-right-width:' + selectedborderWidth + 'px !important'; - } - - } else { - // 高级表格的单元格选中边框 - borderStyle = ';border-width:' + selectedborderWidth + 'px !important'; - } - - return borderStyle; - } - - /** - * 获取单元格DOM元素 - * @param targetTdId 单元格id - */ - getTdElement(targetTdId: string) { - if (this.refs[this.tdLinkKey] && this.refs[this.tdLinkKey].length) { - for (const tdEle of this.refs[this.tdLinkKey]) { - const tdId = tdEle.getAttribute('id'); - if (tdId === targetTdId) { - return tdEle; - } - } - - } - } - - /** - * 获取同组的单元格DOM元素 - * @param targetTdId 单元格id - */ - getTdElementsInSameGroup(targetGroupId: string): { - tdElements: BuilderHTMLElement[], - activeEditorTdElement: HTMLElement, - labelTdElement: HTMLElement - } { - const tdElements = []; - let activeEditorTdElement; - let labelTdElement; - if (this.refs[this.tdLinkKey] && this.refs[this.tdLinkKey].length) { - for (const tdEle of this.refs[this.tdLinkKey]) { - const groupId = tdEle.getAttribute('groupid'); - const tdType = tdEle.getAttribute('tdtype'); - const tdCls = tdEle.getAttribute('class'); - if (groupId && groupId === targetGroupId) { - tdElements.push(tdEle); - // 取当前显示在界面上的编辑器单元格 - if (tdType === 'editor' && tdCls && !tdCls.includes('d-none')) { - activeEditorTdElement = tdEle; - } - if (tdType === 'staticText' && tdCls && !tdCls.includes('d-none')) { - labelTdElement = tdEle; - } - } - } - } - - return { tdElements, activeEditorTdElement, labelTdElement }; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: TableProp = new TableProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component, this.tdManager); - return propertyConfig; - } - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - // 触发重绘 - const dynamicPropIds = ['staticText.require', 'staticText.text', 'tdType', 'editor.require', 'editor.title', 'editor.placeHolder']; - super.onPropertyChanged(changeObject, dynamicPropIds); - - // 切换编辑器:因为涉及变动的属性太多,故触发属性面板的整体重绘 - if (changeObject.categoryId === 'tdType' || changeObject.categoryId.includes('editorBinding')) { - this.triggerTdClick(this.tdManager.targetTdElement); - } - - // 切换编辑器需要触发重构 - if (changeObject['controlEditorChanged']) { - this.rebuild(); - } - // 修改扩展区域、枚举项需要触发重构 - if (['enableAppend', 'inputAppendText', 'inputAppendType', 'enumData', 'items'].includes(changeObject.propertyID)) { - this.rebuild(); - } - // 修改边框、字体等需要触发重构 - if (['font', 'border'].includes(changeObject.categoryId)) { - this.rebuild(); - } - } - - /** - * 获取选中单元格的行、列信息 - * @param targetTdId 单元格id - */ - private getTargetColumnData(targetTdId: string) { - if (!this.component.rows) { - return; - } - - for (let rowIndex = 0; rowIndex < this.component.rows.length; rowIndex++) { - const row = this.component.rows[rowIndex]; - for (let colIndex = 0; colIndex < row.columns.length; colIndex++) { - const column = row.columns[colIndex]; - if (column.id === targetTdId) { - this.tdManager.selectedColumnIndex = colIndex; - this.tdManager.selectedRowIndex = rowIndex; - - this.tdManager.targetColumn = column; - this.tdManager.targetRow = row; - } - } - } - } - /** - * 显示菜单 - * @param event 点击事件 - * @param widgetEle 图标元素 - */ - private showTdManageContext(event: MouseEvent, widgetEle: HTMLElement) { - event.preventDefault(); - event.stopPropagation(); - - if (!this.tdManager.targetColumn || !this.tdManager.targetRow) { - return; - } - this.tdManager.showContextMenu(event, widgetEle); - } - - /** - * 简单类表格的单元格是否可以拖拽,是否可以接收拖拽内容 - * @param column 单元格元数据 - * @param tdElement 单元格元素 - */ - private checkTdCanDragAndDrop(column: any, tdElement: string, devMode: string) { - - if (!tdElement) { - return ''; - } - - // 高级表格不允许拖动 - if (devMode !== 'simple') { - tdElement = tdElement.replace('inputInTable', 'inputInTable no-drag no-drop'); - tdElement = tdElement.replace('farris-label-wrap', 'farris-label-wrap no-drag no-drop'); - return tdElement || ''; - } - - // 1、标签类单元格 - if (column.tdType === 'staticText') { - // 有值:可以拖走,不接收外部拖拽 - if (column.staticText && column.staticText.text) { - tdElement = tdElement.replace('farris-label-wrap', 'farris-label-wrap no-drop'); - } else { - // 空白单元格:不支持拖走,可以接收外部拖拽 - tdElement = tdElement.replace('farris-label-wrap', 'farris-label-wrap no-drag'); - } - } else { - // 2、编辑器单元格:不支持拖走,不接收外部拖拽 - tdElement = tdElement.replace('inputInTable', 'inputInTable no-drag no-drop'); - } - - return tdElement || ''; - - } - - isEmptyValue(value: any) { - if (value === null || value === undefined) { - return true; - } - } - - /** - * 适配表单控件的元数据变更 - */ - private adaptOldControlSchema() { - if (!this.component) { - return; - } - delete this.component.borderWidth; - delete this.component.borderColor; - } - - - - /** - * 注册label标签的编辑事件 - */ - private registerStaticTdContentEditable(staticTd: BuilderHTMLElement, editorTd: BuilderHTMLElement) { - if (!staticTd || !editorTd) { - return; - } - const labelSpanEle = staticTd.querySelector('.farris-label-text'); - if (!labelSpanEle) { - return; - } - if (labelSpanEle.getAttribute('contenteditable')) { - return; - } - // 启用标签编辑属性 - labelSpanEle.setAttribute('contenteditable', 'true'); - - // 监听标签blur事件 - this.addEventListener(labelSpanEle, 'blur', (e) => { - const newTitle = e.target.innerText; - const staticTdSchema = staticTd.component.component; - const editorTdSchema = editorTd.component.component; - - if (staticTdSchema.staticText.text !== newTitle) { - - // 更新控件DOM - staticTdSchema.staticText.text = newTitle; - editorTdSchema.editor.title = newTitle; - - // 更新属性面板 - this.emit('componentClicked', { - componentInstance: this.tdComponents[this.tdManager.selectedRowIndex][this.tdManager.selectedColumnIndex], - needUpdatePropertyPanel: true, - e - }); - - - // 控件绑定字段:触发更新schema变更 - if (editorTdSchema.editor.binding && editorTdSchema.editor.binding.type === FormBindingType.Form) { - this.syncSchemaFieldAfterControlTitleChanged(editorTdSchema.editor.binding.field, newTitle); - } - - } - - }); - } - /** - * 修改控件标签后,同步schema字段 - */ - private syncSchemaFieldAfterControlTitleChanged(fieldId: string, newTitle: string) { - // 1、同步viewModel字段增量 - const dgVMService = this.options.designerHost.getService('DesignViewModelService') as DesignViewModelService; - const dgViewModel = dgVMService.getDgViewModel(this.viewModelId); - const dgVMField = dgViewModel && dgViewModel.fields.find(f => f.id === fieldId); - if (dgVMField) { - dgViewModel.changeField(dgVMField.id, { name: newTitle }); - } - - // 2、若是零代码表单驱动模板,还需要更改schema里的字段信息 - const formBasicServ = this.options.designerHost.getService('FormBasicService') as FormBasicService; - if (this.envType === DesignerEnvType.noCode && formBasicServ.driveMode === 'form') { - const schemaService = this.options.designerHost.getService('SchemaService') as SchemaService; - - // 判断是否为拖拽新增的字段 - const schemaField = schemaService.getFieldByID(dgVMField.id); - if (schemaField && schemaService.addedFieldsByControlBox.includes(dgVMField.id)) { - schemaField.name = newTitle; - } - } - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-helper.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-helper.ts deleted file mode 100644 index 3b34cf78083b91eb94af8eafb52c4835a79b6d9a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-helper.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { IdService } from '@farris/ui-common'; -import { cloneDeep } from 'lodash-es'; -import { TableTdSchema } from '../../schema/schema'; - -export class TableTdWidgetHelper { - - constructor() { } - - private getTableTdMetadata(): any { - const metadata = cloneDeep(TableTdSchema); - metadata.id = new IdService().generate(); - return metadata; - } - insertColumns(rows: any[], targetColumnIndex: number) { - - for (let e = 0; e < rows.length; e++) { - const n = this.findPrevColIndex(e, targetColumnIndex, rows); - if (n !== targetColumnIndex && rows[e].columns[targetColumnIndex].invisible) { - const tdMetadata = this.getTableTdMetadata(); - tdMetadata.invisible = true; - rows[e].columns.splice(targetColumnIndex, 0, tdMetadata); - const i = rows[e].columns[n].colspan; - rows[e].columns[n].colspan = i + 1; - for (let o = 0; o < i + 1; o++) { - rows[e].columns[n + o].markCol = o; - } - } else { - const tdMetadata = this.getTableTdMetadata(); - rows[e].columns.splice(targetColumnIndex, 0, tdMetadata); - } - - } - } - - findPrevColIndex(t: number, e: number, rows: any[]) { - return e >= rows[t].columns.length || !rows[t].columns[e].markCol ? e : this.findPrevColIndex(t, e - 1, rows); - } - findNextColIndex(t: number, e: number, rows: any[]) { - return e >= rows[t].columns.length || !rows[t].columns[e].markCol ? e : this.findNextColIndex(t, e + 1, rows); - } - - findPrevRowIndex(t: number, e: number, rows: any[]) { - return t >= rows.length || !rows[t].columns[e].markRow ? t : this.findPrevRowIndex(t - 1, e, rows); - } - - findNextRowIndex(t: number, e: number, rows: any[]) { - return t >= rows.length || !rows[t].columns[e].markRow ? t : this.findNextRowIndex(t + 1, e, rows); - } - insertRow(t: number, rows: any[]) { - const n = []; - for (let i = 0; i < rows[0].columns.length; i++) { - const o = this.findPrevRowIndex(t, i, rows); - const tdMetadata = this.getTableTdMetadata(); - - if (o !== t && rows[t].columns[i].invisible) { - tdMetadata.invisible = true; - n.push(tdMetadata), - rows[o].columns[i].rowspan = rows[o].columns[i].rowspan + 1; - } else { - n.push(tdMetadata); - } - - } - rows.splice(t, 0, { - id: new IdService().generate(), - type: 'TableRow', - columns: n - }); - - for (let e = 0; e < rows[t].columns.length; e++) { - if (rows[t].columns[e].invisible) { - const i = this.findPrevRowIndex(t - 1, e, rows); - if (!rows[i].columns[e].invisible) { - this.markTableItem(i, e, rows); - } - - } - } - - } - markTableItem(t: number, e: number, rows: any[]) { - for (let n = rows[t].columns[e].colspan, i = rows[t].columns[e].rowspan, o = 0; o < i; o++) { - for (let r = 0; r < n; r++) { - rows[t + o].columns[e + r].markCol = r; - rows[t + o].columns[e + r].markRow = o; - } - - } - - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager-simple.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager-simple.ts deleted file mode 100644 index 81990875b6fc742a26bb6419bdcb3c51ea3a34e8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager-simple.ts +++ /dev/null @@ -1,523 +0,0 @@ -import { RefreshFormService } from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; -import { MessagerService } from '@farris/ui-messager'; -import { TableTdManager } from './td-manager'; - -/** - * 简单表格单元格菜单管理类 - */ -export class SimpleTableTdManager extends TableTdManager { - - - /** - * 获取菜单配置 - */ - getMenuConfig() { - - this.menuConfig = [] as any[]; - - this.menuConfig.push( - { - id: 'insertColumnToLeft', - title: '左插入列', - handle: () => this.insertColumnToLeft(), - }, - { - id: 'insertColumnToRight', - title: '右插入列', - handle: () => this.insertColumnToRight() - }, - { - id: 'insertRowToTop', - title: '上插入行', - handle: () => this.insertRowToTop() - }, - { - id: 'insertRowToBottom', - title: '下插入行', - handle: () => this.insertRowToBottom() - }, - '-', - { - id: 'mergeColumnToRight', - title: '向右合并', - divider: true, - handle: () => this.mergeColumnsToRight(), - disable: !this.showMergeColumnToRight() - }, - '-', - { - id: 'splitColumns', - title: '拆分成列', - divider: true, - handle: () => this.splitColumns(), - disable: !this.showSplitColumns() - - }, - '-', - { - id: 'removeColumn', - title: '删除当前列', - divider: true, - handle: () => this.removeColumn(), - disable: !this.showRemoveColumn() - }, - { - id: 'removeRow', - title: '删除当前行', - handle: () => this.removeRow(), - disable: !this.showRemoveRow() - }, - '-', - { - id: 'clearBinding', - title: '清空内容', - handle: () => this.clearTdBinding(), - disable: !this.showClearTdBinding() - } - ); - - } - /** - * 向左插入列 - */ - insertColumnToLeft() { - const idService = this.injector.get(IdService); - - const staticTextTdIndex = this.selectedColumnIndex - 1; - if (staticTextTdIndex < 0) { - return; - } - - // 在标签类单元格的左侧插入三列,作为一个分组 - this.tableTdHelper.insertColumns(this.component.rows, staticTextTdIndex); - this.tableTdHelper.insertColumns(this.component.rows, staticTextTdIndex); - this.tableTdHelper.insertColumns(this.component.rows, staticTextTdIndex); - - for (let rowIndex = 0; rowIndex < this.component.rows.length; rowIndex++) { - let groupId = idService.generate(); - const newStaticTextTd = this.component.rows[rowIndex].columns[staticTextTdIndex]; - const newEditorTd = this.component.rows[rowIndex].columns[staticTextTdIndex + 1]; - const newInvisibleTd = this.component.rows[rowIndex].columns[staticTextTdIndex + 2]; - - newStaticTextTd.tdType = 'staticText'; - newStaticTextTd.appearance.class = 'farris-group-wrap--label'; - newEditorTd.colspan = 2; - - // 若同列没有合并分组的情况,markCol就是空的,这时候需要手动配置markCol和markRow - if (!newStaticTextTd.markCol) { - newEditorTd.markCol = 0; - newEditorTd.markRow = 0; - - newInvisibleTd.markCol = 1; - newInvisibleTd.markRow = 0; - newInvisibleTd.invisible = true; - - } else { - // 若同列有合并分组的情况,这时候markCol已经是计算好的,不需要再手动配置。因为新增的列被自动合并了,所以groupId要取前一列的值 - if (staticTextTdIndex - 1 >= 0) { - const preColumn = this.component.rows[rowIndex].columns[staticTextTdIndex - 1]; - groupId = preColumn.groupId; - } - } - - newStaticTextTd.groupId = groupId; - newEditorTd.groupId = groupId; - newInvisibleTd.groupId = groupId; - } - - this.selectedColumnIndex = this.selectedColumnIndex + 3; - this.redrawTable.next(); - } - - /** - * 向右插入列 - */ - insertColumnToRight() { - const targetColumnIndex = this.targetColumn.colspan > 1 ? - this.tableTdHelper.findNextColIndex(this.selectedRowIndex, this.selectedColumnIndex + 1, this.component.rows) : - this.selectedColumnIndex + 1; - - // 在右侧插入三列,作为一个分组 - this.tableTdHelper.insertColumns(this.component.rows, targetColumnIndex); - this.tableTdHelper.insertColumns(this.component.rows, targetColumnIndex); - this.tableTdHelper.insertColumns(this.component.rows, targetColumnIndex); - - const idService = this.injector.get(IdService); - - for (let rowIndex = 0; rowIndex < this.component.rows.length; rowIndex++) { - let groupId = idService.generate(); - const newStaticTextTd = this.component.rows[rowIndex].columns[targetColumnIndex]; - const newEditorTd = this.component.rows[rowIndex].columns[targetColumnIndex + 1]; - const newInvisibleTd = this.component.rows[rowIndex].columns[targetColumnIndex + 2]; - - newStaticTextTd.tdType = 'staticText'; - newStaticTextTd.appearance.class = 'farris-group-wrap--label'; - newEditorTd.colspan = 2; - - // 若同列没有合并分组的情况,markCol就是空的,这时候需要手动配置markCol和markRow - if (!newStaticTextTd.markCol) { - newEditorTd.markCol = 0; - newEditorTd.markRow = 0; - - newInvisibleTd.markCol = 1; - newInvisibleTd.markRow = 0; - newInvisibleTd.invisible = true; - - } else { - // 若同列有合并分组的情况,这时候markCol已经是计算好的,不需要再手动配置。因为新增的列被自动合并了,所以groupId要取前一列的值 - if (targetColumnIndex - 1 >= 0) { - const preColumn = this.component.rows[rowIndex].columns[targetColumnIndex - 1]; - groupId = preColumn.groupId; - } - } - - newStaticTextTd.groupId = groupId; - newEditorTd.groupId = groupId; - newInvisibleTd.groupId = groupId; - } - - this.redrawTable.next(); - } - - /** - * 向上插入行 - */ - insertRowToTop() { - this.tableTdHelper.insertRow(this.selectedRowIndex, this.component.rows); - - // 将新增行改造为【1个标签单元格+2个编辑器单元格的】分组 - this.changeTableTdIntoGroup(this.component.rows[this.selectedRowIndex].columns); - - - this.selectedRowIndex++; - this.redrawTable.next(); - } - - /** - * 向下插入行 - */ - insertRowToBottom() { - const targetRowIndex = this.targetColumn.rowspan > 1 ? - this.tableTdHelper.findNextRowIndex(this.selectedRowIndex + 1, this.selectedColumnIndex, this.component.rows) : - this.selectedRowIndex + 1; - this.tableTdHelper.insertRow(targetRowIndex, this.component.rows); - - // 将新增行改造为【1个标签单元格+2个编辑器单元格的】分组 - this.changeTableTdIntoGroup(this.component.rows[targetRowIndex].columns); - - this.redrawTable.next(); - } - - /** - * 将新增行改造为【1个标签单元格+2个编辑器单元格的】分组 - * @param columns 新增行的列配置 - */ - private changeTableTdIntoGroup(columns: any[]) { - const idService = this.injector.get(IdService); - - if (columns.length && columns.length % 3 === 0) { - for (let index = 0; index < columns.length; index += 3) { - const groupId = idService.generate(); - - const staticTextTd = columns[index]; - const editorTd = columns[index + 1]; - const invisibleTd = columns[index + 2]; - - staticTextTd.tdType = 'staticText'; - staticTextTd.appearance.class = 'farris-group-wrap--label'; - staticTextTd.groupId = groupId; - - editorTd.colspan = 2; - editorTd.markCol = 0; - editorTd.markRow = 0; - editorTd.groupId = groupId; - - invisibleTd.markCol = 1; - invisibleTd.markRow = 0; - invisibleTd.invisible = true; - invisibleTd.groupId = groupId; - - } - } - - } - /** - * 向右合并列:按分组合并 - */ - mergeColumnsToRight() { - const targetColspan = this.targetColumn.colspan; - const o = this.selectedColumnIndex + targetColspan; - const rightColumn = this.component.rows[this.selectedRowIndex].columns[o]; - - // 定位到右侧所有同组的的单元格 - const rightColumnsInSameGroup = this.component.rows[this.selectedRowIndex].columns.filter(column => column.groupId && column.groupId === rightColumn.groupId); - - // 检测右侧同组的单元格中是否包含编辑器类的单元格,若有,需要进行提示 - const editorTd = rightColumnsInSameGroup.find(column => column.tdType === 'editor' && column.editor && column.editor.type); - - if (editorTd) { - const msgService = this.injector.get(MessagerService); - msgService.question('合并后将重置右侧单元格的编辑器,确定合并?', () => { - this.confirmMergeColumnsToRight(rightColumnsInSameGroup); - }); - } else { - this.confirmMergeColumnsToRight(rightColumnsInSameGroup); - - } - - } - - /** - * 确认向右合并列:按分组合并 - */ - confirmMergeColumnsToRight(rightColumnsInSameGroup: any[]) { - rightColumnsInSameGroup.forEach(column => { - // 被合并列的分组id设置为当前列的分组id - column.groupId = this.targetColumn.groupId; - - // 若单元格是显式的,需要触发合并单个单元格 - if (!column.invisible) { - const targetColspan = this.targetColumn.colspan; - const o = this.selectedColumnIndex + targetColspan; - const rightColumn = this.component.rows[this.selectedRowIndex].columns[o]; - if (rightColumn.editor && rightColumn.editor.type) { - - // 同步ViewModel - this.removeDesignViewModelFieldInColumns([rightColumn]); - - this.confirmToMergeColumnToRight(rightColumn, targetColspan); - - } else { - this.confirmToMergeColumnToRight(rightColumn, targetColspan); - } - } - }); - } - - /** - * 拆分成列是否可用:判断单元格所在的分组是否为6/9/12...列,若是,可以拆分成2/3/4...个组 - */ - showSplitColumns(): boolean { - const columnsInSameGroup = this.component.rows[this.selectedRowIndex].columns.filter(column => column.groupId && column.groupId === this.targetColumn.groupId); - - if (columnsInSameGroup && columnsInSameGroup.length && columnsInSameGroup.length > 3 && columnsInSameGroup.length % 3 === 0) { - return true; - } - return false; - - } - - /** - * 拆分成列:三个单元格为一个分组 - */ - splitColumns() { - const idService = this.injector.get(IdService); - this.targetMergedTdIds = []; - - // 同组的的单元格 - const columnsInSameGroup = this.component.rows[this.selectedRowIndex].columns.filter(column => column.groupId && column.groupId === this.targetColumn.groupId); - - for (let index = 0; index < columnsInSameGroup.length; index += 3) { - const groupId = idService.generate(); - - const staticTextTd = columnsInSameGroup[index]; - const editorTd = columnsInSameGroup[index + 1]; - const invisibleTd = columnsInSameGroup[index + 2]; - - staticTextTd.tdType = 'staticText'; - staticTextTd.invisible = false; - staticTextTd.colspan = 1; - staticTextTd.markCol = 0; - staticTextTd.markRow = 0; - staticTextTd.groupId = groupId; - - editorTd.tdType = 'editor'; - editorTd.invisible = false; - editorTd.colspan = 2; - editorTd.markCol = 0; - editorTd.markRow = 0; - editorTd.groupId = groupId; - - invisibleTd.invisible = true; - invisibleTd.markCol = 1; - invisibleTd.markRow = 0; - invisibleTd.groupId = groupId; - - if (index === 0) { - this.targetMergedTdIds.push(staticTextTd.id); - this.targetMergedTdIds.push(editorTd.id); - this.targetMergedTdIds.push(invisibleTd.id); - } - } - - this.redrawTable.next(); - } - - /** - * 是否支持删除列:合并后的列分组不支持移除;若同列的单元格有合并分组的情况,也不支持删除列 - * @returns boolean - */ - showRemoveColumn(): boolean { - const rows = this.component.rows; - // 只有一个列分组,不能删除 - if (rows[this.selectedRowIndex].columns && rows[this.selectedRowIndex].columns.length === 3) { - return false; - } - - // 校验同列的单元格是否为1个分组 - for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) { - const targetColumn = rows[rowIndex].columns[this.selectedColumnIndex]; - // 同组的的单元格 - const columnsInSameGroup = rows[rowIndex].columns.filter(co => co.groupId && co.groupId === targetColumn.groupId); - - if (!columnsInSameGroup || !columnsInSameGroup.length || columnsInSameGroup.length !== 3) { - return false; - } - } - - return true; - - } - - /** - * 移除当前列分组 - */ - removeColumn() { - - const hasEditor = this.checkIfHasEditorInColumn(); - if (hasEditor) { - const msgService = this.injector.get(MessagerService); - msgService.question('确定移除当前列所有的编辑器配置?', () => { - this.confirmRemoveColumn(); - }); - } else { - this.confirmRemoveColumn(); - } - } - - /** - * 确定移除当前列 - */ - confirmRemoveColumn() { - const rows = this.component.rows; - - let deletedColumns = []; - for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) { - const targetColumn = rows[rowIndex].columns[this.selectedColumnIndex]; - deletedColumns = deletedColumns.concat(rows[rowIndex].columns.filter(co => co.groupId && co.groupId === targetColumn.groupId)); - - rows[rowIndex].columns = rows[rowIndex].columns.filter(co => co.groupId !== targetColumn.groupId); - } - - - this.removeDesignViewModelFieldInColumns(deletedColumns); - - this.redrawTable.next({ - clearPropertyPanel: true - }); - } - - /** - * 是否支持移除行:合并后的行不支持移除 - * @returns boolean - */ - showRemoveRow(): boolean { - const rows = this.component.rows; - // 若只有一行,不能删除 - if (rows.length < 2) { - return false; - } - // 若同行的单元格有合并行的情况,也不支持删除 - for (let colIndex = 0; colIndex < rows[this.selectedRowIndex].columns.length; colIndex++) { - const column = rows[this.selectedRowIndex].columns[colIndex]; - - // 被合并的单元格 - if (column.invisible && column.markRow > 0) { - return false; - } - - // 合并单元格 - if (!column.invisible && !column.markRow && column.rowspan > 1) { - return false; - } - } - - return true; - } - - /** - * 移除当前行 - */ - removeRow() { - - const hasEditor = this.checkIfHasEditorInRow(); - if (hasEditor) { - const msgService = this.injector.get(MessagerService); - msgService.question('确定移除当前行所有的编辑器配置?', () => { - this.confirmRemoveRow(); - }); - } else { - this.confirmRemoveRow(); - } - - } - - /** - * 确认移除当前行 - */ - confirmRemoveRow() { - const rows = this.component.rows; - - this.removeDesignViewModelFieldInColumns(rows[this.selectedRowIndex].columns); - - rows.splice(this.selectedRowIndex, 1); - - this.redrawTable.next({ - clearPropertyPanel: true - }); - } - - /** - * 清除单元格的绑定内容 - */ - private showClearTdBinding() { - - const rows = this.component.rows; - const editorTd = rows[this.selectedRowIndex].columns[this.selectedColumnIndex]; - if (editorTd && editorTd.tdType === 'editor' && editorTd.editor && editorTd.editor.binding) { - return true; - } - - return false; - } - private clearTdBinding() { - const rows = this.component.rows; - const editorTd = rows[this.selectedRowIndex].columns[this.selectedColumnIndex]; - - // 清除编辑器 - this.removeDesignViewModelFieldInColumns([editorTd]); - editorTd.editor = { binding: null, type: null }; - - // 定位到所有同组的标签单元格,清除文本内容 - const labelTdsInSameGroup = this.component.rows[this.selectedRowIndex].columns.filter(column => column.groupId && column.groupId === editorTd.groupId && column.tdType === 'staticText'); - if (labelTdsInSameGroup && labelTdsInSameGroup.length) { - labelTdsInSameGroup.forEach(labelTd => { - if (labelTd && labelTd.staticText) { - labelTd.staticText.text = ''; - labelTd.staticText.require = false; - } - }); - } - - // 重绘 - this.redrawTable.next({ - refreshPropertyPanel: true - }); - - // 刷新实体树 - const refreshFormService = this.injector.get(RefreshFormService); - refreshFormService.refreshSchamaTree.next(); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager.ts deleted file mode 100644 index b9a1a038a2adc7cf19a715c635d256101cf16b23..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/component/td-manager/td-manager.ts +++ /dev/null @@ -1,525 +0,0 @@ -import { Injector } from '@angular/core'; -import { DesignViewModelService } from '@farris/designer-services'; -import { FarrisContextMenuService } from '@farris/ui-context-menu'; -import { MessagerService } from '@farris/ui-messager'; -import { Subject } from 'rxjs'; -import { TableTdWidgetHelper } from './td-helper'; - -/** - * 单元格菜单管理类 - */ -export class TableTdManager { - - /** 重绘表格 */ - redrawTable = new Subject(); - - /** 右键菜单服务类 */ - private contextMenuService: FarrisContextMenuService; - - /** 选中的单元格所在的列 */ - targetColumn: any; - /** 选中单元格所在的行 */ - targetRow: any; - /** 选中单元格列索引 */ - selectedColumnIndex: number; - /** 选中单元格行索引 */ - selectedRowIndex: number; - /** 选中单元格DOM节点 */ - targetTdElement: HTMLElement; - /** 选中单元格id */ - targetTdId: string; - - /** 右键菜单配置 */ - menuConfig: any[] = []; - /** 单元格菜单的服务类 */ - tableTdHelper: TableTdWidgetHelper; - - viewModelId: string; - - /** 简单表格下设计时合并的单元格:标签类单元格和编辑器类单元格为一组 */ - targetMergedTdIds: string[] = []; - - constructor(public component: any, public injector: Injector) { - this.contextMenuService = this.injector.get(FarrisContextMenuService); - this.tableTdHelper = new TableTdWidgetHelper(); - } - /** - * 获取菜单配置 - */ - getMenuConfig() { - this.menuConfig = [] as any[]; - this.menuConfig.push( - { - id: 'insertColumnToLeft', - title: '左插入列', - handle: () => this.insertColumnToLeft(), - }, - { - id: 'insertColumnToRight', - title: '右插入列', - handle: () => this.insertColumnToRight() - }, - { - id: 'insertRowToTop', - title: '上插入行', - handle: () => this.insertRowToTop() - }, - { - id: 'insertRowToBottom', - title: '下插入行', - handle: () => this.insertRowToBottom() - }, - '-', - { - id: 'mergeColumnToRight', - title: '向右合并', - divider: true, - handle: () => this.mergeColumnToRight(), - disable: !this.showMergeColumnToRight() - }, - { - id: 'mergeRowToBottom', - title: '向下合并', - handle: () => this.mergeRowToBottom(), - disable: !this.showMergeRowToBottom() - }, - '-', - { - id: 'splitColumns', - title: '拆分成列', - divider: true, - handle: () => this.splitColumns(), - disable: !this.showSplitColumns() - - }, - { - id: 'splitRows', - title: '拆分成行', - handle: () => this.splitRows(), - disable: !this.showSplitRows() - }, - '-', - { - id: 'removeColumn', - title: '删除当前列', - divider: true, - handle: () => this.removeColumn(), - disable: !this.showRemoveColumn() - }, - { - id: 'removeRow', - title: '删除当前行', - handle: () => this.removeRow(), - disable: !this.showRemoveRow() - } - ); - } - - showContextMenu($event, widgetPanelElement: HTMLElement) { - this.getMenuConfig(); - if (!this.menuConfig || this.menuConfig.length === 0) { - this.contextMenuService.hide(); - return; - } - $event.preventDefault(); - - // 动态创建自定义右键菜单 - this.contextMenuService.show({ - id: this.component.id, - activeDom: widgetPanelElement, - menuItems: this.menuConfig, - event: $event, - highlight: false - }); - - $event.stopPropagation(); - } - /** - * 向左插入列 - */ - insertColumnToLeft() { - this.tableTdHelper.insertColumns(this.component.rows, this.selectedColumnIndex); - this.selectedColumnIndex++; - this.redrawTable.next(); - } - - /** - * 向右插入列 - */ - insertColumnToRight() { - const targetColumnIndex = this.targetColumn.colspan > 1 ? - this.tableTdHelper.findNextColIndex(this.selectedRowIndex, this.selectedColumnIndex + 1, this.component.rows) : - this.selectedColumnIndex + 1; - - this.tableTdHelper.insertColumns(this.component.rows, targetColumnIndex); - - this.redrawTable.next(); - } - /** - * 向上插入行 - */ - insertRowToTop() { - this.tableTdHelper.insertRow(this.selectedRowIndex, this.component.rows); - this.selectedRowIndex++; - - this.redrawTable.next(); - } - /** - * 向下插入行 - */ - insertRowToBottom() { - const targetRowIndex = this.targetColumn.rowspan > 1 ? - this.tableTdHelper.findNextRowIndex(this.selectedRowIndex + 1, this.selectedColumnIndex, this.component.rows) : - this.selectedRowIndex + 1; - this.tableTdHelper.insertRow(targetRowIndex, this.component.rows); - - this.redrawTable.next(); - } - - /** - * 向右合并是否可用 - * @returns boolean - */ - showMergeColumnToRight(): boolean { - const rowspan = this.targetColumn.rowspan; - const colspan = this.targetColumn.colspan; - if (this.selectedColumnIndex + colspan < this.targetRow.columns.length) { - const n = this.targetRow.columns[colspan + this.selectedColumnIndex]; - if (!n.invisible && rowspan === n.rowspan) { - return true; - } - } - return false; - } - - /** - * 向右合并列 - */ - mergeColumnToRight() { - const targetColspan = this.targetColumn.colspan; - const o = this.selectedColumnIndex + targetColspan; - const rightColumn = this.component.rows[this.selectedRowIndex].columns[o]; - if (rightColumn.editor && rightColumn.editor.type) { - const msgService = this.injector.get(MessagerService); - msgService.question('合并后将重置右侧单元格的编辑器,确定合并?', () => { - - // 同步ViewModel - this.removeDesignViewModelFieldInColumns([rightColumn]); - - this.confirmToMergeColumnToRight(rightColumn, targetColspan); - }); - } else { - this.confirmToMergeColumnToRight(rightColumn, targetColspan); - } - - } - /** - * 确认向右合并列 - * @param rightColumn 右侧列 - * @param targetColspan 当前单元格列数 - */ - confirmToMergeColumnToRight(rightColumn: any, targetColspan: number) { - const r = rightColumn.colspan; - this.targetColumn.colspan = targetColspan + r; - rightColumn.invisible = true; - - // 被合并的单元格中editor废弃。 - this.resetTd(rightColumn); - - this.tableTdHelper.markTableItem(this.selectedRowIndex, this.selectedColumnIndex, this.component.rows); - - this.redrawTable.next(); - } - - /** - * 向下合并是否可用 - * @returns boolean - */ - private showMergeRowToBottom(): boolean { - const t = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].rowspan; - const e = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].colspan; - if (t + this.selectedRowIndex < this.component.rows.length) { - const n = this.component.rows[t + this.selectedRowIndex].columns[this.selectedColumnIndex]; - if (!n.invisible && e === n.colspan) { - return true; - - } - } - return false; - } - /** - * 向下合并行 - */ - private mergeRowToBottom() { - - const targetRowspan = this.targetColumn.rowspan; - const o = this.selectedRowIndex + targetRowspan; - - const bottomColumn = this.component.rows[o].columns[this.selectedColumnIndex]; - if (bottomColumn.editor && bottomColumn.editor.type) { - const msgService = this.injector.get(MessagerService); - msgService.question('合并后将重置下方单元格的编辑器,确定合并?', () => { - - // 同步ViewModel - this.removeDesignViewModelFieldInColumns([bottomColumn]); - - this.confirmToMergeRowToBottom(bottomColumn, targetRowspan); - }); - } else { - this.confirmToMergeRowToBottom(bottomColumn, targetRowspan); - - } - - } - - /** - * 确定向下合并 - * @param bottomColumn 下方单元格 - * @param targetRowspan 当前单元格占用行数 - */ - private confirmToMergeRowToBottom(bottomColumn: any, targetRowspan: number) { - this.targetColumn.rowspan = targetRowspan + bottomColumn.rowspan; - bottomColumn.invisible = true; - - this.resetTd(bottomColumn); - - this.tableTdHelper.markTableItem(this.selectedRowIndex, this.selectedColumnIndex, this.component.rows); - - this.redrawTable.next(); - } - /** - * 重置单元格,默认静态文本,清除已有的编辑器 - * @param column 单元格 - */ - private resetTd(column: any) { - column.staticText = { - text: '', - require: false - }; - - column.editor = { - type: null, - binding: null - }; - } - /** - * 移除单元格中绑定的字段,适用于单元格被合并或者移除 - * @param columns 单元格列表 - */ - removeDesignViewModelFieldInColumns(columns: any[]) { - const dgVMService = this.injector.get(DesignViewModelService); - const dgViewModel = dgVMService.getDgViewModel(this.viewModelId); - const fieldIds = []; - columns.forEach(co => { - if (co.editor && co.editor.binding && co.editor.binding.field) { - const fieldId = co.editor.binding.field; - fieldIds.push(fieldId); - } - }); - dgViewModel.removeField(fieldIds); - } - /** - * 拆分成列是否可用 - */ - showSplitColumns(): boolean { - return this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].colspan > 1; - - } - /** - * 拆分成列 - */ - splitColumns() { - const colspan = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].colspan; - const rowspan = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].rowspan; - for (let i = 0; i < colspan; i++) { - this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex + i].invisible = false; - this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex + i].colspan = 1; - this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex + i].rowspan = rowspan; - this.tableTdHelper.markTableItem(this.selectedRowIndex, this.selectedColumnIndex + i, this.component.rows); - } - - this.redrawTable.next(); - } - /** - * 拆分成行是否可用 - */ - private showSplitRows(): boolean { - return this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].rowspan > 1; - - } - /** - * 拆分成行 - */ - private splitRows() { - - const colspan = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].colspan; - const rowspan = this.component.rows[this.selectedRowIndex].columns[this.selectedColumnIndex].rowspan; - for (let i = 0; i < rowspan; i++) { - this.component.rows[this.selectedRowIndex + i].columns[this.selectedColumnIndex].invisible = false; - this.component.rows[this.selectedRowIndex + i].columns[this.selectedColumnIndex].rowspan = 1; - this.component.rows[this.selectedRowIndex + i].columns[this.selectedColumnIndex].colspan = colspan; - this.tableTdHelper.markTableItem(this.selectedRowIndex, this.selectedColumnIndex + i, this.component.rows); - } - - this.redrawTable.next(); - } - /** - * 是否支持删除列:合并后的列不支持移除 - * @returns boolean - */ - showRemoveColumn(): boolean { - const rows = this.component.rows; - if (rows[this.selectedRowIndex].columns.length > 1) { - const t = rows[this.selectedRowIndex].columns[this.selectedColumnIndex].colspan; - if (1 === t) { - return true; - } - - } - return false; - } - /** - * 移除当前列 - */ - removeColumn() { - - const hasEditor = this.checkIfHasEditorInColumn(); - if (hasEditor) { - const msgService = this.injector.get(MessagerService); - msgService.question('确定移除当前列所有的编辑器配置?', () => { - this.confirmRemoveColumn(); - }); - } else { - this.confirmRemoveColumn(); - } - } - /** - * 确定移除当前列 - */ - confirmRemoveColumn() { - const rows = this.component.rows; - const deletedColumns = []; - for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) { - const colspan = rows[rowIndex].columns[this.selectedColumnIndex].colspan; - const rowspan = rows[rowIndex].columns[this.selectedColumnIndex].rowspan; - if (rows[rowIndex].columns[this.selectedColumnIndex].invisible) { - const r = this.tableTdHelper.findPrevColIndex(rowIndex, this.selectedColumnIndex, rows); - if (r !== this.selectedColumnIndex && rows[rowIndex].columns[r].colspan > 1) { - rows[rowIndex].columns[r].colspan = rows[rowIndex].columns[r].colspan - 1; - } - } else { - if (colspan > 1) { - rows[rowIndex].columns[this.selectedColumnIndex + 1].invisible = false; - rows[rowIndex].columns[this.selectedColumnIndex + 1].colspan = colspan - 1; - rows[rowIndex].columns[this.selectedColumnIndex + 1].rowspan = rowspan; - this.tableTdHelper.markTableItem(rowIndex, this.selectedColumnIndex + 1, rows); - } - } - deletedColumns.push(rows[rowIndex].columns[this.selectedColumnIndex]); - - rows[rowIndex].columns.splice(this.selectedColumnIndex, 1); - - } - - this.removeDesignViewModelFieldInColumns(deletedColumns); - - this.redrawTable.next({ - clearPropertyPanel: true - }); - } - /** - * 校验同列的单元格中是否包含编辑器配置 - */ - checkIfHasEditorInColumn() { - const rows = this.component.rows; - for (const row of rows) { - const column = row.columns[this.selectedColumnIndex]; - if (column && column.tdType === 'editor' && column.editor && column.editor.binding) { - return true; - } - } - - return false; - } - /** - * 是否支持移除行:合并后的行不支持移除 - * @returns boolean - */ - showRemoveRow(): boolean { - const rows = this.component.rows; - if (rows.length > 1) { - const t = rows[this.selectedRowIndex].columns[this.selectedColumnIndex].rowspan; - if (1 === t) { - return true; - } - - } - return false; - } - /** - * 移除当前行 - */ - removeRow() { - - const hasEditor = this.checkIfHasEditorInRow(); - if (hasEditor) { - const msgService = this.injector.get(MessagerService); - msgService.question('确定移除当前行所有的编辑器配置?', () => { - this.confirmRemoveRow(); - }); - } else { - this.confirmRemoveRow(); - } - - } - /** - * 校验同列的单元格中是否包含编辑器配置 - */ - checkIfHasEditorInRow() { - const rows = this.component.rows; - for (const column of rows[this.selectedRowIndex].columns) { - if (column && column.tdType === 'editor' && column.editor && column.editor.binding) { - return true; - } - } - - return false; - } - /** - * 确认移除当前行 - */ - confirmRemoveRow() { - const rows = this.component.rows; - - for (let e = 0; e < rows[this.selectedRowIndex].columns.length; e++) { - const n = rows[this.selectedRowIndex].columns[e].rowspan; - const o = rows[this.selectedRowIndex].columns[e].colspan; - if (rows[this.selectedRowIndex].columns[e].invisible) { - const r = this.tableTdHelper.findPrevRowIndex(this.selectedRowIndex, e, rows); - if (r !== this.selectedRowIndex && rows[r].columns[e].rowspan > 1) { - rows[r].columns[e].rowspan = rows[r].columns[e].rowspan - 1; - } - - } else { - if (n > 1) { - // 暂不支持合并行后的单元格删除行 - rows[this.selectedRowIndex + 1].columns[e].invisible = false, - rows[this.selectedRowIndex + 1].columns[e].rowspan = n - 1; - rows[this.selectedRowIndex + 1].columns[e].colspan = o; - this.tableTdHelper.markTableItem(this.selectedRowIndex + 1, e, rows) - } - - } - - } - this.removeDesignViewModelFieldInColumns(rows[this.selectedRowIndex].columns); - - rows.splice(this.selectedRowIndex, 1); - - this.redrawTable.next({ - clearPropertyPanel: true - }); - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/export.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/export.ts deleted file mode 100644 index 0b3f5d23ecc883f4637c4073b1f944063081ed7e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/export.ts +++ /dev/null @@ -1,18 +0,0 @@ -import FdTableComponent from './component/fd-table'; -import { TableSchema, TableTdSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdTableTemplates from './templates'; - - -export const Table: ComponentExportEntity = { - type: 'Table', - component: FdTableComponent, - template: FdTableTemplates, - metadata: TableSchema -}; - - -export const TableTd: ComponentExportEntity = { - type: 'TableTd', - metadata: TableTdSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/table-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/table-property-config.ts deleted file mode 100644 index 5ff8cb048a23f66ea65f2b888a8fbb5ed203fbac..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/table-property-config.ts +++ /dev/null @@ -1,189 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { CollectionProp } from '../../common/property/collection-property-config'; -import { DgControl } from '../../../../utils/dg-control'; -import { TableTdManager } from '../component/td-manager/td-manager'; -import { FarrisColorpickerPlusComponent } from '@farris/colorpicker-plus'; - -export class TableProp extends CollectionProp { - - getPropConfig(propertyData: any, tdManager: TableTdManager): ElementPropertyConfig[] { - - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, tdManager); - propertyConfig.push(appearancePropConfig); - - // 边框属性 - const borderPropConfig = this.getBorderPropConfig(propertyData, tdManager); - propertyConfig.push(borderPropConfig); - - // 字体属性 - const fontPropConfig = this.getFontPropConfigg(propertyData, tdManager); - propertyConfig.push(fontPropConfig); - - return propertyConfig; - - } - - private getBasicPropConfig(propertyData: any): ElementPropertyConfig { - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件类型', - iterator: [{ key: propertyData.type, value: DgControl.Table.name }], - readonly: true - } - ] - }; - } - - private getAppearancePropConfig(propertyData: any, tdManager: TableTdManager): ElementPropertyConfig { - const props = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props - }; - } - - - private getBorderPropConfig(propertyData: any, tdManager: TableTdManager): ElementPropertyConfig { - - return { - categoryId: 'border', - categoryName: '边框', - propertyData: propertyData.border, - enableCascade: true, - parentPropertyID: 'border', - properties: [ - { - propertyID: 'width', - propertyName: '宽度', - description: '设置表格边框宽度,单位px', - propertyType: 'number', - min: 0, - max: 10, - decimals: 0 - }, - { - propertyID: 'enableColor', - propertyName: '启用自定义颜色', - propertyType: 'boolean', - description: '是否启用自定义颜色', - defaultValue: false - }, - { - propertyID: 'color', - propertyName: '自定义颜色', - propertyType: 'custom', - description: '统一设置表格边框颜色', - editor: FarrisColorpickerPlusComponent, - editorParams: { - preColor: propertyData.border && propertyData.border.color, - presets: ['#eaecf3', '#F44336', '#E91E63', '#9C27B0', '#673AB7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800', '#ff5722 ', '#9e9e9e'] - }, - visible: propertyData.border.enableColor || false, - } - ], - setPropertyRelates(changeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'enableColor': { - const color = this.properties.find(p => p.propertyID === 'color'); - if (color) { - color.visible = changeObject.propertyValue; - } - break; - } - default: - break; - } - } - }; - } - - private getFontPropConfigg(propertyData: any, tdManager: TableTdManager): ElementPropertyConfig { - - const supportedFontFamily = ['sans-serif', 'simsun', 'SimHei', 'arial', 'FangSong']; - const fontIteraterList = []; - supportedFontFamily.forEach(font => { - fontIteraterList.push({ key: font, value: font }); - }); - return { - categoryId: 'font', - categoryName: '字体', - propertyData: propertyData.font, - enableCascade: true, - parentPropertyID: 'font', - properties: [ - { - propertyID: 'size', - propertyName: '大小', - description: '设置字体大小,单位px', - propertyType: 'number', - min: 10, - max: 20, - decimals: 0 - }, - { - propertyID: 'enableColor', - propertyName: '启用自定义颜色', - propertyType: 'boolean', - description: '是否启用自定义颜色', - defaultValue: false - }, - { - propertyID: 'color', - propertyName: '自定义颜色', - propertyType: 'custom', - description: '设置字体框颜色', - editor: FarrisColorpickerPlusComponent, - editorParams: { - preColor: propertyData.font && propertyData.font.color, - presets: ['#2d2f33', '#F44336', '#E91E63', '#9C27B0', '#673AB7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800', '#ff5722 ', '#9e9e9e'] - }, - visible: propertyData.font.enableColor || false, - }, - { - propertyID: 'family', - propertyName: '字体类别', - propertyType: 'select', - description: '设置表格字体类别', - iterator: fontIteraterList - } - ], - setPropertyRelates(changeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'enableColor': { - const color = this.properties.find(p => p.propertyID === 'color'); - if (color) { - color.visible = changeObject.propertyValue; - } - break; - } - default: - break; - } - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/td-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/td-property-config.ts deleted file mode 100644 index 78e532c8354a41444c1957c2b709a2006c2537f3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/property/td-property-config.ts +++ /dev/null @@ -1,452 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DesignerEnvType, DesignViewModelService, FormBasicService, FormBindingType, UniformEditorDataUtil } from '@farris/designer-services'; -import { CollectionProp } from '../../common/property/collection-property-config'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { BindingEditorComponent, BindingEditorConverter } from '@farris/designer-devkit'; -import { BuilderOptions, IDesignerHost } from '@farris/designer-element'; -import { NoCodeCollectionProp } from '../../common/property/nocode-collection-property-config'; - -export class TableTdProp extends CollectionProp { - envType: DesignerEnvType; - propertyConfig: ElementPropertyConfig[]; - - private controlCreatorSerivice: any; - private schemaDOMMapping: any; - private serviceHosts: any; - constructor(serviceHosts: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHosts, viewModelId, componentId); - this.serviceHosts = serviceHosts; - this.dgVMService = serviceHosts.getService('DesignViewModelService'); - this.schemaDOMMapping = serviceHosts.getService('SchemaDOMMapping'); - this.controlCreatorSerivice = serviceHosts.getService('ControlCreatorService'); - - const formBasicService = serviceHosts.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - } - - getPropConfig(propertyData: any, isSimpleTable = false): ElementPropertyConfig[] { - this.propertyConfig = []; - - if (!isSimpleTable) { - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - this.propertyConfig.push(appearancePropConfig); - - // 单元格属性 - const tdTypePropConfig = this.getTdTypePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(tdTypePropConfig); - } - - - // 编辑器绑定、类型 - const editorPropConfigs = this.getEditorProperties(propertyData, this.viewModelId, isSimpleTable); - this.propertyConfig = this.propertyConfig.concat(editorPropConfigs); - - return this.propertyConfig; - - } - - private getBasicPropConfig(): ElementPropertyConfig { - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - } - ] - }; - } - - private getAppearancePropConfig() { - const props = this.getCommonAppearanceProperties(); - // props.push( - // { - // propertyID: 'colspan', - // propertyName: '占用列数', - // propertyType: 'string', // 数字控件变更检测可能有问题,先改成string - // description: '单元格占用的列个数', - // // min: 0, - // // max: 100, - // // decimals: 0, - // readonly: true - // }, - // { - // propertyID: 'rowspan', - // propertyName: '占用行数', - // propertyType: 'string', - // description: '单元格占用的行个数', - // // min: 0, - // // max: 100, - // // decimals: 0, - // readonly: true - // } - // ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props - }; - } - - private getTdTypePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'tdType', - categoryName: '单元格类型', - tabId: 'tableTdEditor', - tabName: '编辑器', - properties: [ - { - propertyID: 'tdType', - propertyName: '单元格类型', - propertyType: 'select', - description: '单元格类型选择', - iterator: [{ key: 'staticText', value: '静态文本' }, { key: 'editor', value: '编辑框' }], - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - - propertyData.staticText = { - text: '', - require: false - }; - if (propertyData.editor && propertyData.editor.binding) { - // 清除字段绑定 - const dgViewModel = self.dgVMService.getDgViewModel(viewModelId); - dgViewModel.removeField([propertyData.editor.binding.field]); - } - propertyData.editor = { - type: null, - binding: null - }; - if (!propertyData.appearance) { - propertyData.appearance = { class: '' }; - } - propertyData.appearance.class = propertyData.appearance.class.replace('farris-group-wrap--label', '').replace('farris-group-wrap--input', ''); - propertyData.appearance.class += changeObject.propertyValue === 'staticText' ? - ' farris-group-wrap--label' : ' farris-group-wrap--input'; - } - }; - } - - private getEditorProperties(propertyData: any, viewModelId: string, isSimpleTable: boolean): ElementPropertyConfig[] { - if (propertyData.tdType === 'staticText') { - return this.getStaticTextPropConfig(propertyData, viewModelId); - - } - - if (propertyData.tdType === 'editor') { - let configs = []; - const editorTypes = this.getEditorPropConfig(propertyData, viewModelId); - configs = configs.concat(editorTypes); - - if (propertyData.editor && propertyData.editor.type) { - let editorProp; - if (this.envType === DesignerEnvType.noCode) { - const noCodeColectionPro = new NoCodeCollectionProp(this.serviceHosts, this.viewModelId, this.componentId) - editorProp = noCodeColectionPro.getNoCodeFieldEditorProp(propertyData, 'tableTdEditor', isSimpleTable); - } else { - editorProp = this.getFieldEditorProp(propertyData, 'tableTdEditor', isSimpleTable); - - } - if (editorProp && editorProp.length > 0) { - configs = configs.concat(editorProp); - } - } - return configs; - } - } - /** - * 静态文本属性 - * @param propertyData 属性值 - * @param viewModelId Viewmodel id - * @returns ElementPropertyConfig[] - */ - private getStaticTextPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig[] { - return [{ - categoryId: 'text', - categoryName: '文本', - tabId: 'tableTdEditor', - tabName: '编辑器', - hide: propertyData.tdType !== 'staticText', - enableCascade: true, - parentPropertyID: 'staticText', - propertyData: propertyData.staticText, - properties: [ - { - propertyID: 'text', - propertyName: '单元格文本', - propertyType: 'string', - description: '单元格文本' - }, - { - propertyID: 'require', - propertyName: '是否显示必填图标', - propertyType: 'unity', - description: '单元格是否显示必填图标', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - } - ] - }]; - } - - /** - * 编辑器单元格绑定属性 - * @param propertyData 属性值 - * @param viewModelId Viewmodel id - */ - private getEditorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig[] { - const self = this; - - const { dgVMField, controlTypeList } = this.getControlTypeEnumData(propertyData, viewModelId); - - return [{ - categoryId: 'tableTdEditor_editorBinding', - categoryName: '绑定', - tabId: 'tableTdEditor', - tabName: '编辑器', - hide: propertyData.tdType !== 'editor', - enableCascade: true, - parentPropertyID: 'editor', - propertyData: propertyData.editor, - properties: [ - { - propertyID: 'binding', - propertyName: '绑定', - propertyType: 'modal', - description: '绑定的表单字段', - editor: BindingEditorComponent, - editorParams: { - viewModelId, - componentId: this.componentId, - controlType: propertyData.editor.type, - canChangeFieldType: true, - unusedOnly: true - }, - converter: new BindingEditorConverter(), - showClearButton: true, - afterClickClearButton(oldValue: string) { - self.clearControlAfterBindingCleared(oldValue, viewModelId, propertyData); - } - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: controlTypeList, - visible: controlTypeList && controlTypeList.length > 0 - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'binding': { - // 变更字段类型:修改原控件DOM结构 - self.changeControlAfterBindingChanged(changeObject, propertyData, parameters, viewModelId); - - const typeProp = this.properties.find(prop => prop.propertyID === 'type'); - if (typeProp) { - typeProp.iterator = self.getControlTypeEnumData(propertyData, viewModelId); - typeProp.visible = typeProp.iterator.length > 0; - } - // 刷新实体树 - self.refreshFormService.refreshSchamaTree.next(); - break; - } - case 'type': { - if (propertyData.editor && propertyData.editor.binding) { - const bindingType = propertyData.editor.binding.type; - propertyData.editor = self.createControl(bindingType, dgVMField, changeObject.propertyValue, propertyData.editor); - - changeObject['controlEditorChanged'] = true; - } - - } - } - - } - }]; - } - - /** - * 根据选择的绑定字段获取可选的控件类型 - * @param propertyData td属性值 - * @param viewModelId 所属视图模型id - */ - private getControlTypeEnumData(propertyData: any, viewModelId: string) { - if (!propertyData.editor || !propertyData.editor.binding) { - return { dgVMField: null, controlTypeList: [] }; - } - - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - let controlTypeList = []; - let dgVMField; - if (propertyData.editor.binding.type === FormBindingType.Form) { - dgVMField = dgViewModel.fields.find(f => f.id === propertyData.editor.binding.field); - if (dgVMField) { - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(dgVMField.type.name, dgVMField.multiLanguage, 'form', this.formBasicService.envType); - } - } else { - dgVMField = this.domService.getVariableById(propertyData.editor.binding.field); - if (dgVMField) { - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(dgVMField.type, false, 'form', this.formBasicService.envType); - } - } - - return { dgVMField, controlTypeList }; - } - - private changeControlAfterBindingChanged( - changeObject: FormPropertyChangeObject, propertyData: any, parameters: any, viewModelId: string) { - - // 清除绑定:触发界面更新 - if (!changeObject.propertyValue) { - changeObject['controlEditorChanged'] = true; - return; - } - - // 若变更字段类型:清除原控件DOM结构;若当前没有配置控件,则新建控件 - if ((parameters && parameters.fieldTypeChanged) || !propertyData.editor.type) { - const selectedField = parameters.selectedData; - const bindingType = changeObject.propertyValue.type; - propertyData.editor = this.createControl(bindingType, selectedField); - - changeObject['controlEditorChanged'] = true; - } else { - // 没有变更字段类型:不需要清除原控件结构,只需要同步更新path属性和帮助相关属性 - this.updateControlDomAfterChangingBinding(changeObject, propertyData.editor, parameters, viewModelId); - } - - - } - - private createControl(bindingType: string, selectedField: any, editorType?: string, oldControl?: any) { - let editor; - if (!bindingType) { - return; - } - const hasStateMachine = this.domService.module.stateMachines && this.domService.module.stateMachines.length > 0; - - if (bindingType === FormBindingType.Form) { - editor = this.controlCreatorSerivice.createTableTdControlBySchemaFeild(selectedField, editorType); - } else { - editor = this.controlCreatorSerivice.createTableTdControlByVariable(selectedField, editorType); - } - if (!editor.readonly && hasStateMachine) { - editor.readonly = '!viewModel.stateMachine[\'editable\']'; - } - - if (oldControl) { - Object.assign(editor, { - id: oldControl.id, - isRTControl: !!oldControl.isRTControl, - appearance: oldControl.appearance, - size: oldControl.size, - titleSourceType: oldControl.titleSourceType, - title: oldControl.title, - titleDataSource: oldControl.titleDataSource, - titleWidth: oldControl.titleWidth, - enableTitleTips: oldControl.enableTitleTips, - titleTipsTemplate: oldControl.titleTipsTemplate, - isTextArea: editor.isTextArea && oldControl.isTextArea, - placeHolder: oldControl.placeHolder, - holdPlace: oldControl.holdPlace, - readonly: oldControl.readonly, - require: oldControl.require, - visible: oldControl.visible - }); - } - return editor; - } - private clearControlAfterBindingCleared(oldValue: any, viewModelId: string, propertyData: any) { - // 清除绑定 - if (oldValue && oldValue.field) { - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - if (!dgViewModel) { return; } - - dgViewModel.removeField([oldValue.field]); - - // 若绑定字段配置了表达式,需要删除表达式 - if (this.domService.expressions && this.domService.expressions.length) { - const expFieldIndex = this.domService.expressions.findIndex(e => e.fieldId === oldValue.field); - if (expFieldIndex > -1) { - this.domService.expressions.splice(expFieldIndex, 1); - } - - } - } - - propertyData.editor = { binding: null, type: null }; - } - - /** - * 修改绑定后要同步变更控件path属性,若是帮助控件还要变更数据源属性并同步viewModel - */ - private updateControlDomAfterChangingBinding( - changeObject: FormPropertyChangeObject, propertyData: any, parameters: any, viewModelId: string) { - if (!parameters || !parameters.selectedData) { - return; - } - const selectedData = parameters.selectedData; - // 变更path属性 - propertyData.path = selectedData.bindingPath; - changeObject.relateChangeProps = [ - { - propertyID: 'path', - propertyValue: propertyData.path - } - ]; - - // 帮助控件变更dataSource.uri属性 - if (propertyData.type === DgControl.LookupEdit.type && propertyData.dataSource && propertyData.dataSource.uri) { - const uri = propertyData.dataSource.uri; - const index = uri.indexOf('.'); - if (index < 0) { - return; - } - - if (propertyData.binding.type === FormBindingType.Form) { - const newUri = uri.slice(0, index) + '.' + selectedData.bindingField; - propertyData.dataSource.uri = newUri; - - // 同步viewModel Field - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(propertyData.binding.field, { editor: { dataSource: propertyData.dataSource } }); - } else { - const newUri = uri.slice(0, index) + '.' + selectedData.code; - propertyData.dataSource.uri = newUri; - } - - changeObject.relateChangeProps.push( - { - propertyID: 'dataSource', - propertyValue: propertyData.dataSource - } - ); - - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/schema/schema.ts deleted file mode 100644 index aeff21cdda68c68c9c05f12bfa04ca90280607b2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/schema/schema.ts +++ /dev/null @@ -1,47 +0,0 @@ - -export const TableSchema = { - id: 'table', - type: 'Table', - appearance: { - class: 'table table-bordered f-table-has-form' - }, - size: null, - border: { - width: 1, - enableColor: false, - color: '#eaecf3' - }, - font: { - size: 13, - enableColor: false, - color: '#2d2f33', - family: 'sans-serif', - }, - rows: [], - visible: true -}; - -export const TableTdSchema = { - id: '', - type: 'TableTd', - tdType: 'editor', - staticText: { - text: '', - require: false - }, - editor: { - type: null, - binding: null - }, - colspan: 1, - rowspan: 1, - align: 'right', - valign: 'top', - appearance: { - class: 'farris-group-wrap--input', - style: '' - }, - size: null - -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/form.ts deleted file mode 100644 index a856941ae8e20be8230e19ffb6eab23683986f83..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/form.ts +++ /dev/null @@ -1,167 +0,0 @@ -export default (ctx: any) => { - /** 收集表格行模板 */ - let trEls = ''; - ctx.component.rows.forEach((trEle, rowIndex) => { - if (!trEle.columns || !trEle.columns.length) { - return ''; - } - - /** 收集单元格模板 */ - let tdEles = ''; - trEle.columns.forEach((tdEle, columnIndex) => { - const tdEleStr = getTableTdElementStr(tdEle, columnIndex, rowIndex, ctx); - tdEles += tdEleStr; - }); - - trEls += `${tdEles}`; - - }); - - const tableClass = (ctx.component.appearance && ctx.component.appearance.class || '') + ' ide-cmp-table'; - const tableStyle = getTableStyle(ctx); - - return ` -
- - ${trEls} -
-
- `; -}; - - -/** - * 获取表格层级的内联样式 - * @param ctx 模板构造信息 - */ -function getTableStyle(ctx: any): string { - // 定制边框宽度、颜色 - const borderWidth = getBorderWidth(ctx.component.border); - - const borderColor = ctx.component.border.enableColor && ctx.component.border && ctx.component.border.color ? ctx.component.border.color : '#eaecf3'; - - let tableStyle = ctx.component.appearance && ctx.component.appearance.style || ''; - if (ctx.component.size && ctx.component.size.width) { - tableStyle = tableStyle + ';width:' + ctx.component.size.width + 'px'; - } - if (ctx.component.size && ctx.component.size.height) { - tableStyle = tableStyle + ';height:' + ctx.component.size.height + 'px'; - } - - // 为了防止table外层出现两层边框,区分宽度并设置不同的样式 - if (borderWidth === 1) { - tableStyle = tableStyle + ';box-shadow:0px 0px 0px 1px ' + borderColor; - } else { - tableStyle = tableStyle + ';box-shadow:none;border:none'; - } - - return tableStyle; -} - - -/** - * 获取单元格td层级的内联样式 - * @param tdEle 单元格schema对象 - * @param columnIndex 列索引 - * @param rowIndex 行索引 - * @param ctx 模板构造信息 - */ -function getTableTdElementStr(tdEle: any, columnIndex: number, rowIndex: number, ctx: any): string { - let tdContent = ''; - - const tdStyle = getTableTdStyle(ctx, tdEle); - const tdClass = getTableTdClass(ctx, tdEle); - - // 静态文本类单元格 - if (tdEle.tdType === 'staticText' && tdEle.staticText && tdEle.staticText.text) { - const require = tdEle.staticText.require === true ? `*` : ''; - tdContent = ` -
- -
`; - } else if (tdEle.tdType === 'editor' && tdEle.editor && tdEle.editor.type) { - // 编辑器类单元格 - tdContent = ctx.tdComponents[rowIndex][columnIndex]; - } - - // 给单元格增加拖拽限制 - if (ctx.checkTdCanDragAndDrop) { - tdContent = ctx.checkTdCanDragAndDrop(tdEle, tdContent, ctx.component.devMode); - } - // 返回单元格DOM - return ` - -
- ${tdContent} -
- -
-
- - `; - -} - - -/** - * 获取单元格td层级的内联样式 - * @param ctx 模板构造信息 - * @param tdEle 单元格schema对象 - */ -function getTableTdStyle(ctx: any, tdEle: any): string { - - // 获取定制边框宽度、颜色 - const borderWidth = getBorderWidth(ctx.component.border); - const borderColor = ctx.component.border.enableColor && ctx.component.border && ctx.component.border.color ? ctx.component.border.color : '#eaecf3'; - const fontSize = ctx.component.font && ctx.component.font.size ? ctx.component.font.size : 13; - - const fontColor = ctx.component.font.enableColor && ctx.component.font && ctx.component.font.color ? ctx.component.font.color : '#2d2f33'; - const fontFamily = ctx.component.font && ctx.component.font.family ? ctx.component.font.family : 'sans-serif'; - - // 应用appearance 中定义的宽高 - let tdStyle = tdEle.appearance && tdEle.appearance.style ? tdEle.appearance.style : ''; - if (tdEle.size && tdEle.size.width) { - tdStyle = tdStyle + ';width:' + tdEle.size.width + 'px'; - } - if (tdEle.size && tdEle.size.width) { - tdStyle = tdStyle + ';height:' + tdEle.size.height + 'px'; - } - - // 应用表格上定义的边框、字体 - tdStyle = tdStyle + ';border:' + borderWidth + 'px solid ' + borderColor; - tdStyle = tdStyle + ';font-size:' + fontSize + 'px'; - tdStyle = tdStyle + ';color:' + fontColor; - tdStyle = tdStyle + ';font-family:' + fontFamily; - - // 选中状态下的单元格需要设置边框宽度 - if (tdEle.id === ctx.targetTdId || (ctx.targetMergedTdIds && ctx.targetMergedTdIds.includes(tdEle.id))) { - tdStyle += ctx.getSelectedBorderStyle ? ctx.getSelectedBorderStyle(tdEle) : ''; - } - - return tdStyle; -} - -/** - * 获取单元格td层级的class样式 - * @param ctx 模板构造信息 - * @param tdEle 单元格schema对象 - */ -function getTableTdClass(ctx: any, tdEle: any): string { - let tdClass = tdEle.appearance && tdEle.appearance.class ? tdEle.appearance.class : ''; - if (tdEle.invisible) { - tdClass += tdEle.invisible ? ' d-none' : ''; - } - if (tdEle.id === ctx.targetTdId || (ctx.targetMergedTdIds && ctx.targetMergedTdIds.includes(tdEle.id))) { - tdClass += ' dgComponentSelected'; - } - - return tdClass; -} - -function getBorderWidth(border: any) { - - return border && border.width !== null && border.width !== undefined ? border.width : 1; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/table/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/fd-treegrid.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/fd-treegrid.ts deleted file mode 100644 index cab2f77d0a6824a5ba53ae4b210a92ff6db3b698..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/fd-treegrid.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { TreeGridSchema } from '../schema/treegrid'; -import FdCollectionBaseComponent from '../../common/collection-base/fd-collection-base'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TreeGridProp } from '../property/property-config'; -import FdTreeGridFieldComponent from './treegrid-field/component/fd-treegrid-field'; -import { ControlService } from '../../../../service/control.service'; -import { defaultsDeep } from 'lodash-es'; -import { SchemaService } from '@farris/designer-services'; - -export default class FdTreeGridComponent extends FdCollectionBaseComponent { - - /** 单列实例集合 */ - gridFieldInstances: FdTreeGridFieldComponent[]; - - constructor(component: any, options: any) { - super(component, options); - - this.customToolbarConfigs = [ - { - id: 'fieldManager', - title: '字段维护', - icon: 'f-icon f-icon-home-setup', - click: (e) => { - e.stopPropagation(); - this.showFieldManager(); - } - } - ]; - } - - getDefaultSchema(): any { - return TreeGridSchema; - } - - getStyles(): string { - return 'display: flex; flex: 1; padding:0;border:0;'; - } - - init() { - this.adaptOldControlSchema(); - this.components = []; - this.gridFieldInstances = []; - if (this.component.fields) { - const options = Object.assign({}, this.options, { parent: this }); - - this.component.fields.map(item => { - const fieldInstance = new FdTreeGridFieldComponent(item, options, this); - this.gridFieldInstances.push(fieldInstance); - }); - } - - } - render(): any { - - return super.render(this.renderTemplate('TreeGrid', { - component: this.component, - gridFieldInstances: this.gridFieldInstances - })); - } - /** - * 元素扩展事件 - */ - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - - // 挂载单列的点击事件 - this.gridFieldInstances.forEach(gridFieldInstance => { - const itemId = gridFieldInstance.component.id; - this.loadRefs(element, { - [itemId]: 'multiple' - }); - gridFieldInstance.attach(this.refs[itemId][0]); - }); - - // 挂载可拖拽区域,用于从控件工具箱和实体树中拖拽节点 - this.hook('attachComponents', element, [], [], this); - - this.registerGridFieldDnd(); - - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: TreeGridProp = new TreeGridProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 调整列顺序后同步修改DOM结构 - */ - dragGridFieldEnd(e: any) { - super.dragGridFieldEnd(e); - - const oldIndex = e.oldIndex; - const newIndex = e.newIndex; - const item = this.gridFieldInstances[oldIndex]; - this.gridFieldInstances.splice(oldIndex, 1); - this.gridFieldInstances.splice(newIndex, 0, item); - } - - - /** - * 适配表单控件的元数据变更 - */ - private adaptOldControlSchema() { - // 适配列编辑器内的控件元数据 - if (this.component.fields && this.component.fieldEditable) { - const injector = this.options.designerHost.getService('Injector'); - const controlService = injector.get(ControlService) as ControlService; - - this.component.fields.forEach(field => { - if (!field.editor) { - return; - } - const metadata = controlService.getControlMetaData(field.editor.type); - field.editor = defaultsDeep(field.editor, metadata); - }); - } - // 适配旧表单中展开层级为null的情况 - if (this.component.expandLevel === null) { - this.component.expandLevel = -1; - } - - // 适配实体中分级码字段修改label的场景 - const schemaService = this.options.designerHost.getService('SchemaService') as SchemaService; - const udtFields = schemaService.getTreeGridUdtFields(this.viewModelId); - if (udtFields && udtFields.length) { - const udtExisted = udtFields.find(f => f.key === this.component.udtField); - if (!udtExisted) { - this.component.udtField = udtFields[0].key; - } - } else { - this.component.udtField = ''; - } - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/component/fd-treegrid-field.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/component/fd-treegrid-field.ts deleted file mode 100644 index 4fdc4242e7b40521341766404a21d60e38dd29f8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/component/fd-treegrid-field.ts +++ /dev/null @@ -1,54 +0,0 @@ -import FdDataGridFieldComponent from '../../../../datagrid/component/datagrid-field/component/fd-datagrid-field'; -import { TreeGridFieldSchema } from '../../../schema/treegrid'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TreeGridFieldProp } from '../property/property-config'; -import { DomService } from '@farris/designer-services'; - -export default class FdTreeGridFieldComponent extends FdDataGridFieldComponent { - - getDefaultSchema(): any { - return TreeGridFieldSchema; - } - - render(): any { - this.init(); - this.checkBindingFormFieldValidation(); - return this.renderTemplate('TreeGridField', { - component: this.component, - focusedFieldId: this.focusedFieldId, - className: this.getSelectedClassName(), - isValidBinding: this.isValidBinding - }); - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop: TreeGridFieldProp = new TreeGridFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component, this.parentGridInstance.component); - return propertyConfig; - } - - /** - * 设置列的展示名称和路径,用于交互面板已绑定事件窗口 - */ - setComponentBasicInfoMap() { - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 列的展示名称和路径 - domService.controlBasicInfoMap.set(this.component.id, { - showName: this.component.caption, - parentPathName: `树表格 > ${this.component.caption}` - }); - - // 列编辑器的展示名称及路径 - if (this.component.editor) { - domService.controlBasicInfoMap.set(this.component.editor.id, { - showName: this.component.caption, - parentPathName: `树表格 > ${this.component.caption}` - }); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/property/property-config.ts deleted file mode 100644 index f968cbb09ba1826c1d22057e6fc6eb39dd0283e3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/component/treegrid-field/property/property-config.ts +++ /dev/null @@ -1,715 +0,0 @@ -import { CollectionProp } from '../../../../common/property/collection-property-config'; -import { ElementPropertyConfig, KeyMap, PropertyEntity } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FieldStyleConfigComponent } from '../../../../common/property/editor/field-style-config/field-style-config.component'; -import { DesignerEnvType, GridFieldDataType } from '@farris/designer-services'; -import { - BindingEditorComponent, BindingEditorConverter, - ItemCollectionConverter, ItemCollectionEditorComponent, JavaScriptBooleanEditorComponent -} from '@farris/designer-devkit'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { GridFieldFormatterConverter } from '../../../../common/property/editor/grid-field-formatter-converter'; - -export class TreeGridFieldProp extends CollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any, gridData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - const viewModelId = this.viewModelId; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 快捷配置属性 - const fieldStyleConfig = this.getFieldStyleProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(fieldStyleConfig); - - // 外观属性 - const appearanceProperties = this.getAppearanceProperties(propertyData, viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorProperties = this.getBehaviorProperties(propertyData, viewModelId, gridData); - this.propertyConfig.push(behaviorProperties); - - // 列编辑器属性 - if (gridData.fieldEditable && propertyData.editor) { - const editorProp = this.getFieldEditorProp(propertyData); - if (editorProp.length > 0) { - this.propertyConfig = this.propertyConfig.concat(editorProp); - } - } - return this.propertyConfig; - } - - private getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'caption', - propertyName: '标题', - propertyType: 'string', - description: '列标题名称' - } - ] - }; - } - - - private getFieldStyleProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - return { - categoryId: 'fieldStyleShortcutConfig', - categoryName: '快捷配置', - hide: !['date', 'datetime', 'enum', 'number'].includes(propertyData.dataType), - properties: [ - { - propertyID: 'fieldStyleConfig', - propertyType: 'custom', - editor: FieldStyleConfigComponent, - editorParams: { - propertyData, - needClearConfig: false - }, - - description: '提供常用的日期、数字展示格式,提供带图标的枚举数据模板', - refreshPanelAfterChanged: true - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'fieldStyleConfig': { - // 数字、日期重置格式化属性 - if (changeObject.propertyValue && changeObject.propertyValue.formatter) { - const formatterValue = changeObject.propertyValue.formatter; - Object.assign(propertyData.formatter, formatterValue); - } - // 枚举重置列模板属性 - if (changeObject.propertyValue && changeObject.propertyValue.colTemplate) { - propertyData.colTemplate = changeObject.propertyValue.colTemplate; - - propertyData.iconConfigForEnumData = changeObject.propertyValue.enumIconConfig; - - const fieldStyleConfig = this.properties.find((p: PropertyEntity) => p.propertyID === 'fieldStyleConfig'); - fieldStyleConfig.editorParams.propertyData = propertyData; - fieldStyleConfig.editorParams.needClearConfig = false; - } - delete propertyData.fieldStyleConfig; - - - // 变更【外观分类】下的格式化属性 - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - const formatterProp = currentAppearanceConfig.properties.find(p => p.propertyID === 'formatter'); - if (formatterProp) { - const newFormattterProps = self.getFormatterProps(propertyData); - Object.assign(formatterProp.cascadeConfig, newFormattterProps); - } - break; - } - } - } - }; - } - private getAppearanceProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const formatterProps = this.getFormatterProps(propertyData); - - const appearanceProperties: PropertyEntity[] = [ - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'showTips', - propertyName: '显示单元格提示', - propertyType: 'boolean', - description: '是否显示单元格提示', - defaultValue: false - }, - { - propertyID: 'tipContent', - propertyName: '单元格提示内容', - propertyType: 'modal', - description: '单元格提示内容设置', - editor: CodeEditorComponent, - visible: propertyData.showTips, - editorParams: { - language: 'javascript', - exampleCode: - '(value, rowData, column) => {\r\n return value + \'的提示\';\r\n}\r\n\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据\r\n column:列数据' - } - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'cascade', - cascadeConfig: formatterProps, - cascadeConverter: new GridFieldFormatterConverter() - }, - { - propertyID: 'colTemplate', - propertyName: '列模板', - propertyType: 'modal', - description: '列模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html', - exampleCode: '' - }, - refreshPanelAfterChanged: true - }, - { - propertyID: 'styler', - propertyName: '单元格样式', - propertyType: 'modal', - description: '单元格样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(value, rowData, rowIndex) => {\r\n return {\r\n style: {\r\n \'color\': \'red\',\r\n' + - ' \'font-weight\': 800\r\n }\r\n };\r\n}\r\n\r\n\r\n注:\r\n value:单元格数据 \r\n ' + - 'rowData:行数据 \r\n rowIndex:当前行索引' - } - }, - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式设置', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - }, - { - propertyID: 'hAlign', - propertyName: '表头对齐方式', - propertyType: 'select', - description: '表头对齐方式设置', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - } - ]; - - if (propertyData.controlSource === 'Primeng') { - const allowedProps = ['appearance', 'size', 'formatter']; - appearanceProperties.map(p => { - if (!allowedProps.includes(p.propertyID)) { - p.visible = false; - } - }); - } - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject, data, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - // 列格式化属性 - if (changeObject.parentPropertyID === 'formatter') { - const formatter = this.properties.find(p => p.propertyID === 'formatter'); - if (formatter && formatter.cascadeConfig) { - formatter.cascadeConfig.filter(p => p.group).forEach(p => { - p.visible = p.group === changeObject.propertyValue; - }); - } - - propertyData.formatter = self.setDataGridFormatterDefaults(changeObject.propertyValue, propertyData.formatter); - - - // 联动修改列样式的快捷配置 - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - break; - } - case 'colTemplate': { - // 联动修改列样式的快捷配置 - self.clearIconConfigAfterColTemplateChanged(propertyData, changeObject, parameters); - - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - fieldStyleProp.editorParams.needClearConfig = true; - } - } - - break; - } - case 'showTips': { - const tipContent = this.properties.find(p => p.propertyID === 'tipContent'); - if (tipContent) { - tipContent.visible = changeObject.propertyValue; - } - break; - } - default: { - // 联动修改列样式的快捷配置 - if (changeObject.parentPropertyID === 'formatter') { - const fieldStyleShortcutConfig = self.propertyConfig.find(c => c.categoryId === 'fieldStyleShortcutConfig'); - if (fieldStyleShortcutConfig && fieldStyleShortcutConfig.properties && fieldStyleShortcutConfig.properties.length) { - const fieldStyleProp = fieldStyleShortcutConfig.properties.find(p => p.propertyID === 'fieldStyleConfig'); - if (fieldStyleProp) { - fieldStyleProp.editorParams.propertyData = propertyData; - } - } - } - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - - /** - * 组装列格式化属性 - */ - private getFormatterProps(propertyData: any): PropertyEntity[] { - return [ - { - propertyID: 'type', - propertyName: '格式化类型', - propertyType: 'select', - description: '格式化', - iterator: this.getDateFormatter(propertyData), - refreshPanelAfterChanged: true - }, - { - propertyID: 'customFormat', - propertyName: '自定义格式化方法', - propertyType: 'modal', - description: '自定义格式化方法设置', - editor: CodeEditorComponent, - visible: propertyData.formatter && propertyData.formatter.type === 'custom', - group: 'custom', - editorParams: { - language: 'javascript', - exampleCode: - '\r\n (value, rowData) => {\r\n return value + \'的奖金\';\r\n }\r\n\r\n ' + - '注:\r\n value:单元格数据 \r\n rowData:行数据 \r\n' - } - }, - { - propertyID: 'prefix', - propertyName: '前置字符', - propertyType: 'string', - description: '数字前置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'suffix', - propertyName: '后置字符', - propertyType: 'string', - description: '数字后置字符设置', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - defaultValue: 0, - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'decimal', - propertyName: '小数分隔符', - propertyType: 'string', - description: '数字小数分隔符设置', - defaultValue: '.', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, { - propertyID: 'thousand', - propertyName: '千分位', - propertyType: 'string', - description: '数字千分位设置', - defaultValue: ',', - visible: propertyData.formatter && propertyData.formatter.type === 'number', - group: 'number', - refreshPanelAfterChanged: true - }, - { - propertyID: 'trueText', - propertyName: 'true文本', - propertyType: 'string', - description: 'true文本设置', - visible: propertyData.formatter && propertyData.formatter.type === 'boolean', - group: 'boolean' - }, - { - propertyID: 'falseText', - propertyName: 'false文本', - propertyType: 'string', - description: 'false文本设置', - visible: propertyData.formatter && propertyData.formatter.type === 'boolean', - group: 'boolean' - }, - { - propertyID: 'dateFormat', - propertyName: '日期格式', - propertyType: 'string', - description: '日期格式设置', - visible: propertyData.formatter && propertyData.formatter.type === 'date', - group: 'date', - refreshPanelAfterChanged: true - } - ]; - } - private getBehaviorProperties(propertyData: any, viewModelId: string, gridData: any): ElementPropertyConfig { - const self = this; - // 获取绑定字段类型 - let dgVMField; - let dgVMFieldType; - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - if (propertyData.binding && dgViewModel) { - dgVMField = dgViewModel.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField) { - dgVMFieldType = dgVMField.multiLanguage ? 'multiLanguage' : dgVMField.type.name; - } - } - - const behaviorProperties = [ - { - propertyID: 'binding', - propertyName: '绑定', - propertyType: 'modal', - description: '绑定的表单字段', - editor: BindingEditorComponent, - editorParams: { - viewModelId, - componentId: propertyData.componentId, - controlType: propertyData.type, - allowedBindingType: 'Form', - gridFielType: dgVMFieldType, - unusedOnly: true - }, - converter: new BindingEditorConverter(), - readonly: !dgVMFieldType // 失效的字段,不允许切换类型,只能删除 - }, - // { - // propertyID: 'multiLanguage', - // propertyName: '是否多语字段', - // propertyType: 'boolean', - // readonly: true - // }, - // { - // propertyID: 'languages', - // propertyName: '语言列表', - // propertyType: 'modal', - // editor: ItemCollectionEditorComponent, - // editorParams: { - // columns: [ - // { field: 'code', title: '编号', editor: { type: EditorTypes.TEXTBOX } }, - // { field: 'name', title: '名称', editor: { type: EditorTypes.TEXTBOX } }], - // requiredFields: ['code', 'name'], - // uniqueFields: ['code', 'name'], - // modalTitle: '语言编辑器', - // canEmpty: false - // }, - // converter: new ItemCollectionConverter(), - // visible: propertyData.multiLanguage - // }, - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'modal', - description: '运行时组件是否可见', - editor: JavaScriptBooleanEditorComponent, - editorParams: { - modalTitle: '可见编辑器', - viewModelId, - showJavascript: true, - exampleCode: '(rowData) => { \r\n // ...\r\n return true;\r\n}\r\n\r\n参数:\r\nrowData:行数据' + - '\r\n\r\n\r\n函数返回布尔类型:\r\ntrue: 可见\r\nfalse: 隐藏' - } - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: false - }, - visible: propertyData.dataType === 'enum' - }, - { - propertyID: 'frozen', - propertyName: '固定列', - propertyType: 'select', - description: '固定列选择', - iterator: [ - { key: false, value: '不固定' }, - { key: 'left', value: '固定左侧' }, - { key: 'right', value: '固定右侧' } - ], - readonly: gridData.enableHeaderGroup - }, - { - propertyID: 'sortable', - propertyName: '允许排序', - propertyType: 'boolean', - description: '是否可排序' - }, - { - propertyID: 'localization', - propertyName: '启用数据国际化', - propertyType: 'boolean', - description: '是否启用数据国际化', - visible: this.checkLocalizationVisible(propertyData) - }, - { - propertyID: 'localizationType', - propertyName: '数据国际化类型', - propertyType: 'select', - description: '数据国际化类型选择', - visible: this.checkLocalizationVisible(propertyData) && propertyData.localization, - iterator: this.getLocalizationTypes(propertyData) - } - ]; - - if (propertyData.controlSource === 'Primeng') { - const allowedProps = ['binding', 'enumData', 'sortable']; - behaviorProperties.map(p => { - if (!allowedProps.includes(p.propertyID)) { - p.visible = false; - } - }); - } - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject, data) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'binding': { - // 修改绑定后需要刷新实体树 - self.refreshFormService.refreshSchamaTree.next(); - break; - } - case 'localization': { - const localizationType = this.properties.find(p => p.propertyID === 'localizationType'); - if (localizationType) { - localizationType.visible = changeObject.propertyValue; - } - break; - } - case 'frozen': { - if (propertyData.controlSource === 'Farris') { - if (changeObject.propertyValue) { - self.notifyService.warning('请确保树列表未启用多表头!'); - } - } - break; - } - } - - self.setGridFieldEditorPropSync(propertyData, changeObject); - } - }; - } - - - /** - * farris datagrid 列 设置格式默认值 - * @param type 格式化类型 - * @param col 列格式值 - */ - private setDataGridFormatterDefaults(type: string, col: any) { - switch (type) { - case 'number': { - col = Object.assign({ - precision: 0, - thousand: ',', - prefix: '', - suffix: '', - decimal: '.' - }, col); - break; - } - case 'boolean': { - col = Object.assign({ - trueText: '是', - falseText: '否' - }, col); - break; - } - case 'date': { - col = Object.assign({ - dateFormat: 'yyyy-MM-dd', - }, col); - break; - } - } - return col; - } - - - /** - * 设置列表列和编辑器的属性联动(目前树表没有列编辑器) - * @param propertyData 属性值 - * @param changeObject 变更集 - */ - private setGridFieldEditorPropSync(propertyData, changeObject) { - // 同步列编辑器 - if (propertyData.editor) { - if (changeObject.propertyID === 'format' || changeObject.propertyID === 'enumData' || - changeObject.propertyID === 'binding' || changeObject.propertyID === 'languages') { - propertyData.editor[changeObject.propertyID] = changeObject.propertyValue; - } - } - } - - - private getLocalizationTypes(propertyData: any): KeyMap[] { - switch (propertyData.dataType) { - case GridFieldDataType.date: { - return [{ key: 'Date', value: '日期' }]; - } - case GridFieldDataType.datetime: { - return [{ key: 'DateTime', value: '日期时间' }]; - } - default: { - return [{ key: 'Date', value: '日期' }, { key: 'DateTime', value: '日期时间' }]; - } - } - } - - - /** - * 限定数据国际化类型属性展示范围: - * 1、日期、日期时间类型字段---显示 - * 2、可编辑的列表:编辑器配置成了日期控件---显示 - * 3、不可编辑的列表:格式化属性配置成日期---显示 - */ - private checkLocalizationVisible(propertyData: any): boolean { - if (propertyData.controlSource !== 'Farris') { - return false; - } - if (this.formBasicService.envType === DesignerEnvType.noCode) { - return false; - } - switch (propertyData.dataType) { - // 日期类型字段 - case 'date': case 'datetime': { - return true; - } - // 字符串类型字段 - case 'string': { - // 可编辑列表 - if (propertyData.editor && propertyData.editor.type === DgControl.DateBox.type) { - return true; - } - // 不可编辑列表 - if (!propertyData.editor && propertyData.formatter && propertyData.formatter.type === 'date') { - return true; - } - } - } - return false; - } - - /** - * 枚举类型字段,在变更列模板后需要重置图标配置数据 - * @param propertyData 列数据 - * @param changeObject 属性变更集 - * @param parameters 变更参数 - */ - private clearIconConfigAfterColTemplateChanged(propertyData: any, changeObject: FormPropertyChangeObject, parameters: any) { - if (propertyData.dataType !== 'enum' || !propertyData.iconConfigForEnumData) { - return; - } - - if (changeObject.propertyValue !== parameters.oldValue) { - propertyData.iconConfigForEnumData = null; - this.notifyService.warning('变更列模板后,自动重置列样式快捷配置!'); - } - } - /** - * 获取列格式化类型 - */ - private getDateFormatter(propertyData: any) { - - const iterator = [ - { key: 'none', value: '无' }, - { key: 'number', value: '数字' }, - { key: 'boolean', value: '布尔-文本' }, - { key: 'boolean2', value: '布尔-图标' }, - { key: 'date', value: '日期' }, - { key: 'enum', value: '枚举' }, - { key: 'custom', value: '自定义' } - ]; - - // 绑定字段为日期时,支持相对时间格式 - if (propertyData.dataType === GridFieldDataType.date || propertyData.dataType === GridFieldDataType.datetime) { - const timego = { key: 'timeago', value: '相对时间' }; - iterator.splice(5, 0, timego); - } - - return iterator; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/export.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/export.ts deleted file mode 100644 index a9203377ff203ffec3c234474dcf311605b074f9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/export.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { TreeGridSchema, TreeGridFieldSchema } from './schema/treegrid'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdTreeGridTemplates from '../common/templates/grid'; -import FdTreeGridComponent from './component/fd-treegrid'; -import FdTreeGridFieldTemplates from '../common/templates/grid-field'; -import FdTreeGridFieldComponent from './component/treegrid-field/component/fd-treegrid-field'; - - -export const TreeGrid: ComponentExportEntity = { - type: 'TreeGrid', - component: FdTreeGridComponent, - template: FdTreeGridTemplates, - metadata: TreeGridSchema -}; - -export const TreeGridField: ComponentExportEntity = { - type: 'TreeGridField', - component: FdTreeGridFieldComponent, - metadata: TreeGridFieldSchema, - template: FdTreeGridFieldTemplates, -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/property/property-config.ts deleted file mode 100644 index cd33794a787fb0317c07ff63ebf01ded14cb63b4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/property/property-config.ts +++ /dev/null @@ -1,908 +0,0 @@ -import { CollectionProp } from '../../common/property/collection-property-config'; -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { GridFieldEditorComponent } from '../../common/property/editor/grid-field-editor/grid-field-editor.component'; -import { GridFieldConverter } from '../../common/property/editor/grid-field-editor/grid-field-converter'; -import { GroupFieldEditorComponent } from '../../common/property/editor/group-field-editor/group-field-editor.component'; -import { GroupFieldConverter } from '../../common/property/editor/group-field-editor/group-field-converter'; -import { ColumnGroupEditorComponent } from '@farris/header-group-editor'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { cloneDeep } from 'lodash-es'; -// import { EntityFilterConditionComponent } from '../../common/property/editor/filter-condition/entity-filter-condition.component'; -// import { EntityFilterConditionConverter } from '../../common/property/editor/filter-condition/entity-filter-condition-converter'; - -export class TreeGridProp extends CollectionProp { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - const viewModelId = this.viewModelId; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceProperties(propertyData, viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorProperties(propertyData, viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - if (propertyData.controlSource === 'Farris') { - // 图标属性 - const iconPropConfig = this.getIconProperties(propertyData, viewModelId); - this.propertyConfig.push(iconPropConfig); - - // 分页属性 - const paginationPropertyConfig = this.getPaginationCofig(propertyData, viewModelId); - this.propertyConfig.push(paginationPropertyConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - private getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl.TreeGrid.name }], - }, - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'string', - readonly: true, - visible: propertyData.controlSource !== 'Farris' - }, - { - propertyID: 'dataSource', - propertyName: '数据源', - propertyType: 'modal', - description: '数据来源' - } - ], - }; - } - - private getAppearanceProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const appearanceProperties: PropertyEntity[] = this.getCommonAppearanceProperties(); - appearanceProperties.push( - { - propertyID: 'fields', - propertyName: '列', - propertyType: 'modal', - description: '列设置', - editor: GridFieldEditorComponent, - editorParams: { - fieldEditable: propertyData.fieldEditable, - viewModelId, - gridType: propertyData.type, - controlSource: propertyData.controlSource - }, - converter: new GridFieldConverter() - }, - { - propertyID: 'fit', - propertyName: '填充', - propertyType: 'boolean', - description: '是否填充' - }, - { - propertyID: 'showBorder', - propertyName: '显示边框', - propertyType: 'boolean', - description: '是否显示边框', - defaultValue: false - }, - { - propertyID: 'fitColumns', - propertyName: '填充列宽', - propertyType: 'boolean', - description: '根据列比例自动填充表格宽度,不会出现滚动条。请先关闭【自动列宽】,再启用此属性!', - readonly: propertyData.autoWidth - }, - { - propertyID: 'autoWidth', - propertyName: '自动列宽', - propertyType: 'boolean', - description: '根据单元格内容自动调整列宽,超出表格宽度后出现滚动条。请先关闭【填充列宽】【表头列允许拖动】和【启用多表头】,再启用此属性!', - readonly: propertyData.fitColumns || propertyData.resizableColumns || propertyData.enableHeaderGroup, - refreshPanelAfterChanged: true - }, - { - propertyID: 'showHeader', - propertyName: '显示表头', - propertyType: 'boolean', - description: '是否显示表头', - defaultValue: false - }, - { - propertyID: 'striped', - propertyName: '斑马线效果', - propertyType: 'boolean', - description: '是否显示斑马线', - defaultValue: true - }, - { - propertyID: 'styler', - propertyName: '行样式', - propertyType: 'modal', - description: '行样式设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: '(rowData) => {\r\n return {\r\n style: {\r\n color: \'#5A8129\',\r\n' + - ' background: \'#CCE7A4\'\r\n }\r\n };\r\n}\r\n\r\n注: rowData 行数据' - }, - } - ); - - if (propertyData.controlSource === 'Primeng') { - // primeng支持显示的属性 - const primengProps = ['appearance', 'size', 'fields']; - appearanceProperties.map(p => { - if (!primengProps.includes(p.propertyID)) { - p.visible = false; - } - }); - } - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'fields': { - if (propertyData.enableHeaderGroup) { - self.notifyService.info('修改显示列后请重新配置多表头'); - } - break; - } - case 'autoWidth': { - const fitColumns = this.properties.find(p => p.propertyID === 'fitColumns'); - if (fitColumns) { - fitColumns.readonly = changeObject.propertyValue; - } - const behavior = self.propertyConfig.find(c => c.categoryId === 'behavior'); - if (behavior && behavior.properties) { - const resizableColumns = behavior.properties.find(p => p.propertyID === 'resizableColumns'); - if (resizableColumns) { - resizableColumns.readonly = changeObject.propertyValue; - } - const enableHeaderGroup = behavior.properties.find(p => p.propertyID === 'enableHeaderGroup'); - if (enableHeaderGroup) { - enableHeaderGroup.readonly = changeObject.propertyValue; - } - } - if (changeObject.propertyValue) { - propertyData.fitColumns = false; - propertyData.resizableColumns = false; - propertyData.enableHeaderGroup = false; - self.notifyService.warning('启用自动列宽后,填充列宽失效,不允许拖动表头列,不允许启用多表头!'); - } - break; - } - case 'fitColumns': { - const autoWidth = this.properties.find(p => p.propertyID === 'autoWidth'); - if (autoWidth) { - autoWidth.readonly = changeObject.propertyValue || propertyData.resizableColumns || propertyData.enableHeaderGroup; - } - if (changeObject.propertyValue) { - propertyData.autoWidth = false; - self.notifyService.warning('启用填充列宽后,自动列宽失效!'); - } - break; - } - } - } - }; - } - - private getBehaviorProperties(propertyData: any, viewModelId: string) { - const self = this; - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const viewModel = this.domService.getViewModelById(viewModelId); - const behaviorProperties: PropertyEntity[] = [ - visibleProp, - { - propertyID: 'multiSelect', - propertyName: '允许多选', - propertyType: propertyData.controlSource === 'Primeng' ? 'boolean' : 'unity', - description: '是否允许多选', - defaultValue: false, - readonly: propertyData.controlSource === 'Primeng', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - }, - refreshPanelAfterChanged: true - }, - { - propertyID: 'showCheckbox', - propertyName: '显示复选框', - propertyType: propertyData.controlSource === 'Primeng' ? 'boolean' : 'unity', - description: '是否显示复选框', - defaultValue: false, - readonly: propertyData.multiSelect === true, - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'showAllCheckbox', - propertyName: '显示全选', - propertyType: propertyData.controlSource === 'Primeng' ? 'boolean' : 'unity', - description: '是否显示全选', - defaultValue: false, - readonly: !propertyData.multiSelect, - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'checkOnSelect', - propertyName: '选中当前行并勾选', - propertyType: 'boolean', - description: '是否启用选中当前行并勾选', - visible: propertyData.multiSelect, - defaultValue: false - }, - { - propertyID: 'selectOnCheck', - propertyName: '勾选并选中当前行', - propertyType: 'boolean', - description: '是否启用勾选并选中当前行', - visible: propertyData.multiSelect, - defaultValue: false - }, - { - propertyID: 'cascadeCheck', - propertyName: '启用级联选中功能', - propertyType: 'boolean', - description: '是否启用级联选中功能', - defaultValue: true - }, - { - propertyID: 'cascadeDown', - propertyName: '启用向下级联', - propertyType: 'boolean', - description: '是否启用向下级联', - defaultValue: true - }, - { - propertyID: 'cascadeUp', - propertyName: '启用向上级联', - propertyType: 'boolean', - description: '是否启用向上级联', - defaultValue: true - }, - { - propertyID: 'keepSelect', - propertyName: '保持选中状态', - propertyType: 'boolean', - description: '选中后再次点击不会取消选中状态', - defaultValue: true - }, { - propertyID: 'onlySelectSelf', - propertyName: '仅当前行选中', - propertyType: 'boolean', - description: '是否仅当前行选中', - defaultValue: true - }, - { - propertyID: 'virtualized', - propertyName: '启用虚拟加载机制', - propertyType: 'boolean', - description: '是否启用虚拟加载机制', - defaultValue: false - }, - { - propertyID: 'udtField', - propertyName: '分级码字段', - propertyType: 'select', - description: '分级码字段设置', - iterator: this.schemaService.getTreeGridUdtFields(viewModelId) - }, - { - propertyID: 'expandLevel', - propertyName: '展开层次', - propertyType: 'number', - description: '树节点展开层次:-1不展开;0全部展开', - decimals: 0, - min: -1 - }, - { - propertyID: 'showLines', - propertyName: '启用节点连接线', - propertyType: 'boolean', - description: '是否启用节点连接线', - defaultValue: false - }, - { - propertyID: 'showLinesOnHover', - propertyName: '节点连接线显示方式', - propertyType: 'select', - description: '节点连接线显示方式选择', - defaultValue: false, - visible: propertyData.showLines, - iterator: [{ key: true, value: '鼠标滑过' }, { key: false, value: '一直显示' }] - }, - { - propertyID: 'nowrap', - propertyName: '数据禁止折行', - propertyType: 'boolean', - description: '数据是否禁止折行', - defaultValue: true - }, - { - propertyID: 'resizableColumns', - propertyName: '表头列允许拖动', - propertyType: 'boolean', - description: '表头列是否允许拖动。请先关闭【填充列宽】,再启用此属性!', - defaultValue: true, - refreshPanelAfterChanged: true, - readonly: propertyData.autoWidth - }, - { - propertyID: 'headerWrap', - propertyName: '允许表头折行', - propertyType: 'boolean', - description: '是否允许表头折行', - }, - { - propertyID: 'enableHeaderGroup', - propertyName: '启用多表头', - propertyType: 'boolean', - defaultValue: false, - readonly: propertyData.autoWidth, - description: '是否启用多表头,请先关闭【自动列宽】,再启用此属性!' - }, - { - propertyID: 'headerGroup', - propertyName: '多表头设置', - propertyType: 'modal', - editor: ColumnGroupEditorComponent, - editorParams: { - fields: propertyData.fields - }, - visible: !propertyData.autoWidth && propertyData.enableHeaderGroup - }, - // { - // propertyID: 'conditions', - // propertyName: '过滤条件', - // propertyType: 'modal', - // description: '列表过滤条件设置', - // editor: EntityFilterConditionComponent, - // converter: new EntityFilterConditionConverter(), - // editorParams: { - // viewModelId - // }, - // visible: propertyData.controlSource === 'Farris' && viewModel.bindTo === '/' - // } - ]; - - if (propertyData.controlSource === 'Primeng') { - this.handlePrimeNGProps(behaviorProperties, propertyData); - } - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'showLines': - this.properties.forEach(p => { - if (p.propertyID === 'showLinesOnHover') { - p.visible = changeObject.propertyValue; - data.showLinesOnHover = false; - } - }); - break; - case 'multiSelect': { - this.properties.forEach(p => { - if (p.propertyID === 'checkOnSelect' || p.propertyID === 'selectOnCheck') { - p.visible = !!changeObject.propertyValue; - } - // 多选时必须显示复选框并且不可勾掉 - if (p.propertyID === 'showCheckbox') { - p.readonly = changeObject.propertyValue === true; - if (p.readonly) { - propertyData.showCheckbox = true; - } - } - // 不启用多选时必须隐藏全选 - if (p.propertyID === 'showAllCheckbox') { - p.readonly = !changeObject.propertyValue; - if (p.readonly) { - propertyData.showAllCheckbox = false; - } - } - }); - - break; - } - case 'nowrap': { - if (!changeObject.propertyValue) { - self.notifyService.info('启用数据折行后自动取消虚拟加载'); - propertyData.virtualized = false; - } - break; - } - case 'virtualized': { - if (changeObject.propertyValue && !propertyData.nowrap) { - self.notifyService.info('启用虚拟加载后自动取消数据折行'); - propertyData.nowrap = true; - } - break; - } - case 'enableHeaderGroup': { - const headerGroup = this.properties.find(p => p.propertyID === 'headerGroup'); - if (headerGroup) { - headerGroup.visible = !propertyData.autoWidth && changeObject.propertyValue; - } - // farris 列表启用多表头后 取消所有列的固定列属性 - if (propertyData.controlSource === 'Farris' && changeObject.propertyValue) { - self.notifyService.info('启用多表头后自动取消固定列'); - propertyData.fields.forEach(field => { - field.frozen = false; - }); - } - // farris 列表启用多表头后 禁用填充列宽属性 - if (propertyData.controlSource === 'Farris') { - if (changeObject.propertyValue) { - self.notifyService.info('启用多表头后自动取消自动列宽'); - propertyData.autoWidth = false; - } - const appearance = self.propertyConfig.find(c => c.categoryId === 'appearance'); - if (appearance && appearance.properties) { - const autoWidth = appearance.properties.find(p => p.propertyID === 'autoWidth'); - if (autoWidth) { - autoWidth.readonly = changeObject.propertyValue; - } - } - } - break; - } - case 'resizableColumns': { - const appearance = self.propertyConfig.find(c => c.categoryId === 'appearance'); - if (appearance && appearance.properties) { - const autoWidth = appearance.properties.find(p => p.propertyID === 'autoWidth'); - if (autoWidth) { - autoWidth.readonly = propertyData.fitColumns || propertyData.resizableColumns || propertyData.enableHeaderGroup; - } - } - - if (changeObject.propertyValue) { - propertyData.autoWidth = false; - - self.notifyService.warning('启用表头拖动后,填充列宽失效!'); - } - break; - } - default: - break; - } - } - }; - } - - private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'onSelectionChange', - name: '行切换事件' - } - ]; - eventList = self.switchEvents(propertyData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - }; - } - - private switchEvents(propertyData, eventList) { - let events = [ - { - label: 'expandNode', - name: '节点展开事件' - }, - { - label: 'beforeClickNode', - name: '选中前事件' - }, - { - label: 'nodeUnSelected', - name: '取消选中事件' - }, - { - label: 'nodeChecked', - name: '勾选事件' - }, - { - label: 'nodeUnChecked', - name: '取消勾选事件' - }, - { - label: 'beforeCheckAll', - name: '全选前事件' - }, - { - label: 'checkAll', - name: '全选事件' - }, - { - label: 'unCheckAll', - name: '取消全选' - }, - { - label: 'beforeUnCheckAll', - name: '取消全选前事件' - }, - { - label: 'pageChange', - name: '切换页码事件' - }, - { - label: 'pageSizeChanged', - name: '分页条数变化事件' - }, - { - label: 'childsPageChanged', - name: '子级节点分页事件' - }]; - if (propertyData.controlSource === 'Farris') { - const eventListExist = eventList.find(eventListItem => eventListItem.label == 'expandNode') - if (eventListExist == undefined) { - events.forEach(event => { eventList.push(cloneDeep(event)); }) - } - } else { - events.forEach(event => { - eventList = eventList.filter(eventListItem => { - if (eventListItem.label != event.label) { - return true; - } - }); - }); - } - return eventList; - } - - private getIconProperties(propertyData: any, viewModelId: string): ElementPropertyConfig { - const customProperties: PropertyEntity[] = [ - { - propertyID: 'showIcon', - propertyName: '启用图标', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'useIconFromData', - propertyName: '图标来源', - propertyType: 'select', - iterator: [{ key: true, value: '动态设置' }, { key: false, value: '固定设置' }], - defaultValue: false, - visible: propertyData.showIcon - }, - { - propertyID: 'leafIcon', - propertyName: '叶子图标', - propertyType: propertyData.useIconFromData ? 'modal' : 'string', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter(), - visible: propertyData.showIcon - }, - { - propertyID: 'expandIcon', - propertyName: '展开图标', - propertyType: propertyData.useIconFromData ? 'modal' : 'string', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter(), - visible: propertyData.showIcon - }, - { - propertyID: 'collapseIcon', - propertyName: '折叠图标', - propertyType: propertyData.useIconFromData ? 'modal' : 'string', - editor: GroupFieldEditorComponent, - editorParams: { - viewModelId, - selectNumber: 1, - resultType: 'string' - }, - converter: new GroupFieldConverter(), - visible: propertyData.showIcon - } - ]; - return { - categoryId: 'icon', - categoryName: '图标', - properties: customProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'showIcon': { - this.properties.forEach(p => { - if (p.propertyID !== 'showIcon') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - case 'useIconFromData': { - this.properties.forEach(p => { - if ('leafIcon,expandIcon,collapseIcon'.includes(p.propertyID)) { - p.propertyType = changeObject.propertyValue ? 'modal' : 'string'; - propertyData[p.propertyID] = null; - } - }); - } - } - } - - }; - } - - private handlePrimeNGProps(properties: PropertyEntity[], propertyData: any) { - // primeng支持显示的属性 - const primengProps = ['udtField', 'resizableColumns', 'idField', 'enableHeaderGroup', 'headerGroup']; - properties.map(p => { - if (!primengProps.includes(p.propertyID)) { - p.visible = false; - } - }); - - } - - /** - * 分页属性(子表暂不支持) - */ - private getPaginationCofig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const viewModel = this.domService.getViewModelById(viewModelId); - - if (!viewModel.pagination) { - viewModel.pagination = { - enable: false - }; - } - const vmPagination = viewModel.pagination; - // 这三个属性是存在vm中,但是需要在treegrid控件上编辑 - propertyData.pagination = vmPagination.enable; - propertyData.pageList = vmPagination.pageList; - propertyData.pageSize = vmPagination.pageSize; - - const pageSizeIterator = this.getPageSizeIterator(propertyData.pageList); - return { - categoryId: 'pagination', - categoryName: '分页', - properties: [ - { - propertyID: 'pagination', - propertyName: '启用分页', - propertyType: 'boolean', - defaultValue: false, - readonly: viewModel.bindTo !== '/' - }, - { - propertyID: 'showPageSize', - propertyName: '显示分页条数', - propertyType: 'boolean', - defaultValue: false, - visible: propertyData.pagination - }, - { - propertyID: 'pageList', - propertyName: '分页条数', - propertyType: 'string', - description: '请输入以英文逗号分开的数字,最大值为1000。例如:10,20,30,50,100', - visible: propertyData.pagination && propertyData.showPageSize, - notAllowedChars: [/[^\d,]/g] - }, - { - propertyID: 'pageSize', - propertyName: '默认分页条数', - propertyType: 'select', - iterator: pageSizeIterator, - visible: propertyData.pagination - }, - { - propertyID: 'showGotoInput', - propertyName: '显示页码输入框', - propertyType: 'boolean', - description: '是否显示页码输入框', - visible: propertyData.pagination, - defaultValue: false - }, - { - propertyID: 'paginationForChildren', - propertyName: '启用分页加载子级节点', - propertyType: 'boolean', - description: '是否启用分页加载子级节点', - defaultValue: false - }, - { - propertyID: 'showTotalForChildren', - propertyName: '显示子级分页总记录数', - propertyType: 'boolean', - description: '是否显示子级分页总记录数', - defaultValue: false, - visible: propertyData.paginationForChildren - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'pagination': { - this.properties.map(p => { - if (!['pagination', 'paginationForChildren', 'showTotalForChildren'].includes(p.propertyID)) { - p.visible = changeObject.propertyValue; - } - if (p.propertyID === 'pageList') { - p.visible = changeObject.propertyValue && propertyData.showPageSize; - } - }); - vmPagination.enable = changeObject.propertyValue; - if (changeObject.propertyValue) { - if (!propertyData.pageSize) { - propertyData.pageSize = 20; - vmPagination.pageSize = 20; - } - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - } - break; - } - case 'pageList': { - vmPagination.pageList = changeObject.propertyValue; - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(changeObject.propertyValue); - } - if (!changeObject.propertyValue.includes(propertyData.pageSize)) { - vmPagination.pageSize = propertyData.pageSize = null; - } - break; - } - case 'pageSize': { - vmPagination.pageSize = changeObject.propertyValue; - break; - } - case 'showPageSize': { - const pageList = this.properties.find(p => p.propertyID === 'pageList'); - if (pageList) { - pageList.visible = changeObject.propertyValue; - } - - if (changeObject.propertyValue) { - self.setDefaultPageList(propertyData, vmPagination); - const pageSize = this.properties.find(p => p.propertyID === 'pageSize'); - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(propertyData.pageList); - } - } - break; - - } - case 'paginationForChildren': { - const showTotalForChildren = this.properties.find(p => p.propertyID === 'showTotalForChildren'); - if (showTotalForChildren) { - showTotalForChildren.visible = changeObject.propertyValue; - } - break; - } - } - } - - }; - } - - private setDefaultPageList(propertyData: any, vmPagination: any) { - - if (!propertyData.pageList) { - propertyData.pageList = '10,20,30,50,100'; - if (propertyData.pageSize && !propertyData.pageList.includes(propertyData.pageSize)) { - let pageList = [10, 20, 30, 50, 100, propertyData.pageSize]; - pageList = pageList.sort((A, B) => A - B); - propertyData.pageList = pageList.toString(); - } - - vmPagination.pageList = propertyData.pageList; - } - } - - - getPageSizeIterator(pageList: string) { - if (!pageList) { - pageList = '10,20,30,50,100'; - } - const iterator = []; - pageList.split(',').forEach(pageSize => { - iterator.push({ - key: Number.parseInt(pageSize, 10), - value: pageSize - }); - }); - return iterator; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/schema/treegrid.ts b/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/schema/treegrid.ts deleted file mode 100644 index a641307f3ee3ca68325e9664401792907cbc46a3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/collection/treegrid/schema/treegrid.ts +++ /dev/null @@ -1,92 +0,0 @@ -export const TreeGridSchema = { - id: 'treeGrid', - type: 'TreeGrid', - controlSource: 'Farris', - appearance: null, - size: null, - dataSource: '', - fields: [], - fixedHeader: true, - fit: true, - idField: 'id', - udtField: '', - fieldEditable: false, - editable: false, - multiSelect: false, - expendAll: null, - expandLevel: -1, - onSelectionChange: null, - disable: false, - expandNode: null, - styler: null, - nowrap: true, - virtualized: false, - showBorder: false, - showHeader: true, - showCheckbox: false, - showAllCheckbox: false, - checkOnSelect: false, - selectOnCheck: false, - cascadeCheck: true, - cascadeDown: true, - cascadeUp: true, - keepSelect: true, - onlySelectSelf: true, - striped: true, - showIcon: false, - useIconFromData: false, - leafIcon: null, - expandIcon: null, - collapseIcon: null, - headerWrap: false, - fitColumns: true, - autoWidth: false, - visible: true, - resizableColumns: true, - checkAll: null, - unCheckAll: null, - nodeChecked: null, - nodeUnChecked: null, - showGotoInput: false, - enableHeaderGroup: false, - headerGroup: null, - paginationForChildren: false, - showTotalForChildren: false, - beforeClickNode: null, - nodeUnSelected: null, - beforeCheckAll: null, - beforeUnCheckAll: null, - pageChange: null, - pageSizeChanged: null, - childsPageChanged: null - -}; - -/** 单列元数据 */ -export const TreeGridFieldSchema = { - id: 'col', - type: 'TreeGridField', - controlSource: 'Farris', - caption: '', - binding: null, - appearance: null, - size: null, - dataField: '', - displayTemplate: null, - captionTemplate: null, - editor: null, - draggable: false, - frozen: false, - sortable: false, - sortOrder: null, - resizeable: true, - format: '', - localization: false, - colTemplate: '', - visible: true, - textAlign: 'left', - hAlign: 'left', - vAlign: 'middle', - formatter: { type: 'none' }, - styler: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/component/fd-button.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/component/fd-button.ts deleted file mode 100644 index 27b88254eabbea3c770639df943949f4f245b0cd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/component/fd-button.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { cloneDeep } from 'lodash-es'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from '../../../../utils/dg-control'; -import { ButtonProp } from '../property/property-config'; -import { ButtonSchema } from '../schema/schema'; - -export default class ButtonComponent extends FarrisDesignBaseComponent { - - component; - constructor(component: any, options: any) { - super(component, options); - this.applyClassToComponent = false; - this.customToolbarConfigs = [ - { - id: 'cloneItem', - title: '复制按钮', - icon: 'f-icon f-icon-yxs_copy text-white', - click: (e) => { - e.stopPropagation(); - this.cloneItem(); - } - } - ]; - } - - getDefaultSchema(): any { - - return ButtonSchema; - } - - getStyles(): string { - - return 'display: inline-block;'; - } - - render(): any { - - return super.render(this.renderTemplate('Button', { - component: this.component - })); - } - - - attach(element: HTMLElement): Promise { - this.loadRefs(element, { - button: 'single' - }); - - const superAttach = super.attach(element); - return superAttach; - } - - cloneItem() { - const parent = this.parent; - - const random = Math.random().toString(36).slice(2, 6); - - // 点击事件不复制 - const clonedBtn = Object.assign(cloneDeep(this.component), - { - id: `${this.type}-cloned-${random}`, - click: null - }); - - const index = parent.component.contents.findIndex(child => child.id === this.component.id); - if (index > -1) { - parent.component.contents.splice(index + 1, 0, clonedBtn); - parent.rebuild().then(() => { - // 触发父容器的重构,并刷新控件树 - this.emit('componentChanged', null); - }); - } - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ButtonProp = new ButtonProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const dynamicPropertyIDs = ['appearance.class', 'appearance.style', 'size.width', 'size.height', 'text']; - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - } - - /** - * 控件可以向外拖拽的顶层容器 - */ - getDragScopeElement() { - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 填报模板底部按钮不能拖拽到父容器外部,只能在内部移动位置 - if (parent.type === DgControl.ContentContainer.type && parentClassList.includes('f-btn-wrapper')) { - return this.parent.element; - } - // OA的批量填报模板底部按钮不能拖拽到父容器外部,只能在内部移动位置 - if (parent.type === DgControl.ContentContainer.type && parentClassList.includes('f-subgrid-by-table-footer')) { - return this.parent.element; - } - - } -} - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/export.ts deleted file mode 100644 index 74a433e43404b0f8540e844c20d5106ede9e515b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdButtonComponent from './component/fd-button'; -import { ButtonSchema } from './schema/schema'; -import FdButtonTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; - - -export const Button: ComponentExportEntity = { - type: 'Button', - component: FdButtonComponent, - template: FdButtonTemplates, - metadata: ButtonSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/property/property-config.ts deleted file mode 100644 index 49aa4988d81f0a186e7c08a981f4360b11ef161f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/property/property-config.ts +++ /dev/null @@ -1,163 +0,0 @@ - -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil, DataStatesService } from '@farris/designer-services'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { IDesignerHost } from '@farris/designer-element'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { CommandUsualProp } from '../../common/property/command-property-config'; - -export class ButtonProp extends CommandUsualProp { - - dataStatesService: DataStatesService; - - constructor(serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - - super(serviceHost, viewModelId, componentId); - - this.dataStatesService = serviceHost.getService('DataStatesService'); - - } - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const bahaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(bahaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const props = this.getCommonAppearanceProperties(); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'disable', - propertyName: '禁用', - propertyType: 'unity', - description: '是否禁用', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: this.dataStatesService.dataStates.length != 0 ? ['const', 'stateMachine', 'dataStates'] : ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData, - dataStates: this.dataStatesService.dataStates, - dataStatesBindPath: this.dataStatesService.dataStatesBindPath, - } - }, - }, - { - propertyID: 'dataSourceType', - propertyName: '文本数据源类型', - propertyType: 'select', - description: '文本数据源类型选择', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - defaultValue: 'static' - }, - { - propertyID: 'bindDataSource', - propertyName: '文本', - propertyType: 'unity', - description: '动态文本数据源文本设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - }, - - }, - visible: propertyData.dataSourceType === 'dynamic', - }, - { - propertyID: 'text', - propertyName: '文本', - propertyType: 'string', - description: '静态文本数据源文本设置', - visible: propertyData.dataSourceType === 'static' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'dataSourceType': { - const text = this.properties.find(p => p.propertyID === 'text'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - - if (text) { - text.visible = changeObject.propertyValue === 'static'; - } - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - - break; - } - case 'text': { - if (propertyData.titleChanged) { - propertyData.titleChanged.next(changeObject); - } - break; - } - } - } - }; - } - - // 事件编辑器集成 - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/schema/schema.ts deleted file mode 100644 index 628468af11518e3c8fe2f5549859c39465d208cc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/schema/schema.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const ButtonSchema = { - id: 'button', - type: 'Button', - dataSourceType: 'static', - text: '按钮', - appearance: { - class: 'btn btn-secondary' - }, - usageMode: 'button', - disable: false, - visible: true -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/form.ts deleted file mode 100644 index 15f3e0f1cbae865c032b1a4c28bf8e87a82ead41..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/form.ts +++ /dev/null @@ -1,14 +0,0 @@ - -export default (ctx: any) => { - let cls = ''; - if (ctx.component.appearance && ctx.component.appearance.class) { - cls = ` class="${ctx.component.appearance.class}" `; - } - if (ctx.component.appearance && ctx.component.appearance.style) { - cls += ` style="${ctx.component.appearance.style}" `; - } - return ` - - `; -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/button/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/common/commandBase/commandBase.ts b/packages/designer/projects/designer-ui/src/lib/components/command/common/commandBase/commandBase.ts deleted file mode 100644 index ffc0223a9fc40883bda5cef1aafcd7df5b185937..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/common/commandBase/commandBase.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdCommandBaseComponent extends FarrisDesignBaseComponent { - - envType: DesignerEnvType; - constructor(component: any, options: any) { - super(component, options); - - // 组件所属分类为“命令” - this.category = 'command'; - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs: string[]): void { - let dynamicPropertyIDs = ['appearance.class', 'appearance.style', 'size.width', 'size.height']; - if (propertyIDs) { - dynamicPropertyIDs = dynamicPropertyIDs.concat(propertyIDs); - } - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/common/property/command-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/common/property/command-property-config.ts deleted file mode 100644 index b93f5637e1860595a4049b85770711c701dcd3bf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/common/property/command-property-config.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { PropertyEntity } from '@farris/ide-property-panel'; -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { EventEditorService, UniformEditorDataUtil, DomService, FormBasicService, WebCmdService, StateMachineService } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; - - -export class CommandUsualProp { - - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - public domService: DomService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - public stateMachineService: StateMachineService; - - constructor(serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.webCmdService = serviceHost.getService('WebCmdService'); - this.domService = serviceHost.getService('DomService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.stateMachineService = serviceHost.getService('StateMachineService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - } - public getBasicPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ - key: propertyData.type, - value: (DgControl[propertyData.type] && DgControl[propertyData.type].name) || propertyData.type - }], - readonly: true - } - ] - }; - } - - - public getCommonAppearanceProperties(): PropertyEntity[] { - return [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string', - description: '组件的CSS样式' - }, - { - propertyID: 'style', - propertyName: 'style样式', - propertyType: 'modal', - description: '组件的内容样式', - editor: StyleEditorComponent, - showClearButton: true - } - ] - }, - // { - // propertyID: 'size', - // propertyName: '尺寸', - // propertyType: 'cascade', - // cascadeConfig: [ - // { - // propertyID: 'width', - // propertyName: '宽度(px)', - // propertyType: 'number', - // description: '组件的宽度', - // min: 0, - // decimals: 0 - // }, - // { - // propertyID: 'height', - // propertyName: '高度(px)', - // propertyType: 'number', - // description: '组件的高度', - // min: 0, - // decimals: 0 - // } - // ] - // } - ]; - } - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/component/fd-nav-tab.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/component/fd-nav-tab.ts deleted file mode 100644 index 3d3a400d257dfafc32d13387aa8cb9689ecbc626..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/component/fd-nav-tab.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { NavTabSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { NavTabProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdCommandBaseComponent from '../../common/commandBase/commandBase'; -import { cloneDeep } from 'lodash-es'; - -export default class FdNavTabComponent extends FdCommandBaseComponent { - // 静态数据或者动态数据下的默认值 - private navData = []; - // 绑定固定值,非变量 - private activeNavId = ''; - // 列表标记 - get NavTabKey(): string { - return `NavTab-${this.key}`; - } - /** - * 从工具箱拖拽生成的控件,默认三个标签配置 - */ - // static getMetadataInControlBox() { - // const navTabSchema = cloneDeep(NavTabSchema); - // navTabSchema.navData = [{ id: 'tab1', text: '标签一' }, { id: 'tab2', text: '标签二' }, { id: 'tab3', text: '标签三' }]; - - // return navTabSchema; - // } - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('nav-tab.css'); - } - - getDefaultSchema(): any { - return NavTabSchema; - } - - private initNavTab() { - if (this.component.dataSourceType === 'dynamic') { - this.navData = [{ id: 'tab1', text: '标签一', num: 10 }, { id: 'tab2', text: '标签二', num: 20 }, { id: 'tab3', text: '标签三', num: 30 }]; - this.activeNavId = 'tab1'; - } else { - this.navData = this.component.navData || []; - } - // 排除绑定变量 - if (this.component.activeNavId && typeof this.component.activeNavId == 'string') { - this.activeNavId = this.component.activeNavId; - } else { - this.activeNavId = this.navData.length > 0 ? this.navData[0]['id'] : ''; - } - } - - // 渲染模板 - render(): any { - this.initNavTab(); - - return super.render(this.renderTemplate('NavTab', { - component: this.component, - activeNavId: this.activeNavId, - navData: this.navData, - NavTabKey: this.NavTabKey - })); - } - // 绑定事件 - attach(element: HTMLElement): Promise { - this.loadRefs(element, { - [this.NavTabKey]: 'single' - }); - const superAttach = super.attach(element); - const navList = this.refs[this.NavTabKey]; - const navItems = navList.querySelectorAll('.farris-nav-item'); - navItems.forEach(navItem => { - this.addEventListener(navItem, 'click', (event) => { - event.stopPropagation(); - if (OperateUtils.hasClass(navItem, 'disable')) { - return; - } else if (this.activeNavId != navItem.id) { - let oldActiveEl = navList.querySelector('#' + this.activeNavId); - oldActiveEl && OperateUtils.removeClass(oldActiveEl, 'active'); - OperateUtils.addClass(navItem, 'active'); - this.activeNavId = navItem.id; - } - }); - }); - - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: NavTabProp = new NavTabProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const propIds = ['horizontal', 'navData', 'dataSourceType', 'maxNum']; - - super.onPropertyChanged(changeObject, propIds); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/export.ts deleted file mode 100644 index b3f730710f6d5ab02f9d35e27e66fa42e4610889..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdNavTabComponent from './component/fd-nav-tab'; -import { NavTabSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdNavTabTemplates from './templates'; - - -export const NavTab: ComponentExportEntity = { - type: 'NavTab', - component: FdNavTabComponent, - template: FdNavTabTemplates, - metadata: NavTabSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/property/property-config.ts deleted file mode 100644 index 07bd5f636f982b5972f79b8e3196f647094da369..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/property/property-config.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { CommandUsualProp } from '../../common/property/command-property-config'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class NavTabProp extends CommandUsualProp { - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonPops = this.getCommonAppearanceProperties(); - commonPops.push( - { - propertyID: 'horizontal', - propertyName: '水平布局', - propertyType: 'boolean', - description: '是否水平布局' - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonPops - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const visbileProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visbileProp, - { - propertyID: 'dataSourceType', - propertyName: '数据源类型', - propertyType: 'select', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - description: '若要配置标签数值,请使用动态数据源。' - }, - { - propertyID: 'navData', - propertyName: '数据源', - propertyType: 'modal', - description: '静态类型数据源选择', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - editorParams: { - columns: [ - { field: 'id', title: '编号', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'text', title: '文本', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['id', 'text'], - uniqueFields: ['id', 'text'], - modalTitle: '数据源编辑器', - canEmpty: false - }, - visible: propertyData.dataSourceType === 'static' - }, - { - propertyID: 'bindDataSource', - propertyName: '绑定数据源', - propertyType: 'unity', - description: '动态类型绑定数据源选择', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - visible: propertyData.dataSourceType === 'dynamic' - }, - { - propertyID: 'activeNavId', - propertyName: '默认选中标签页', - propertyType: 'unity', - description: '默认选中的标签页', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: this.getActiveNavEnums(propertyData), - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - }, - { - propertyID: 'maxNum', - propertyName: '显示数字最大值', - propertyType: 'number', - visible: propertyData.dataSourceType === 'dynamic', - description: '超过最大值后以【maxNum+】显示,仅支持动态数据源场景。' - } - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'dataSourceType': { - const navData = this.properties.find(p => p.propertyID === 'navData'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - const maxNum = this.properties.find(p => p.propertyID === 'maxNum'); - - if (navData) { - navData.visible = changeObject.propertyValue === 'static'; - } - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - if (maxNum) { - maxNum.visible = changeObject.propertyValue === 'dynamic'; - } - break; - } - case 'navData': { - - const activeNavId = this.properties.find(p => p.propertyID === 'activeNavId'); - if (activeNavId) { - activeNavId.editorParams.editorOptions.enums = self.getActiveNavEnums(propertyData); - } - // 重置默认标签页 - const newEnumData = activeNavId.editorParams.editorOptions.enums; - const active = newEnumData.find(e => e.key === propertyData.activeNavId); - if (!active) { - propertyData.activeNavId = newEnumData.length > 0 ? newEnumData[0].key : null; - } - break; - } - } - } - }; - } - - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'navPicking', - name: '切换前事件' - }, - { - label: 'navChange', - name: '切换事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - - } - }; - - } - - /** - * 将数据源数组转换为多值属性编辑器支持的key-value格式 - * @param propertyData 属性值 - */ - private getActiveNavEnums(propertyData: any) { - if (!propertyData.navData || !propertyData.navData.length) { - return []; - } - const enums = []; - propertyData.navData.forEach(data => { - enums.push({ - key: data.id, - value: data.text - }); - }); - return enums; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/schema/schema.ts deleted file mode 100644 index 6cb6a087aa152d7340dab176da8cf56e97d76f08..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/schema/schema.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const NavTabSchema = { - id: '', - type: 'NavTab', - visible: true, - dataSourceType: 'static', - navData: [{ id: 'tab1', text: '标签一' }, { id: 'tab2', text: '标签二' }, { id: 'tab3', text: '标签三' }], - horizontal: true, - activeNavId: 'tab1', - maxNum: null, - navChange: null, - navPicking: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/form.ts deleted file mode 100644 index 4d6b93e35dbf44aee4141f9282e59cd6097b4020..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/form.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default (ctx: any) => { - let navItemStr = ''; - for (let k = 0; k < ctx.navData.length; k++) { - let navItem = ctx.navData[k]; - let itemCls = navItem['id'] == ctx.activeNavId ? ' active' : ''; - itemCls += navItem.hasOwnProperty('disable') && navItem['disable'] ? navItem['disable'] : ''; - let numStr = ''; - if (navItem.hasOwnProperty('num')) { - numStr = `
`; - numStr += !ctx.component.maxNum || navItem['num'] <= ctx.component.maxNum ? `${navItem.num}` : `${ctx.component.maxNum}+`; - numStr += `
`; - } - navItemStr += `
- -
`; - } - return `
- ${navItemStr} -
`; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/nav-tab/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/component/fd-scrollspy.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/component/fd-scrollspy.ts deleted file mode 100644 index 16fb411265dc444cf23582199b18e982517268f7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/component/fd-scrollspy.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { ScrollspySchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ScrollspyProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdCommandBaseComponent from '../../common/commandBase/commandBase'; - -export default class FdScrollspyComponent extends FdCommandBaseComponent { - // 跟随类型 - private followType = 'side'; - // 当前监听Id - private currentSpyId = ''; - // 类型为side时,可以设置宽度 - private sidetabWidth = 145; - // 列表标记 - get scrollSpyListKey(): string { - return `scrollSpyList-${this.key}`; - } - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('scrollspy.css'); - } - - getStyles(): string { - return 'display: block;'; - } - getDefaultSchema(): any { - - return ScrollspySchema; - } - // 不支持移动 - checkCanMoveComponent(): boolean { - return false; - } - // 不支持删除(若要支持删除,是否需要修改配套的容器?) - checkCanDeleteComponent(): boolean { - return false; - } - // 渲染模板 - render(): any { - this.initComponentParam(); - - return super.render(this.renderTemplate('Scrollspy', { - component: this.component, - followType: this.followType, - currentSpyId: this.currentSpyId, - sidetabWidth: this.sidetabWidth, - scrollSpyListKey: this.scrollSpyListKey - })); - } - // 绑定事件 - attach(element: HTMLElement): Promise { - const parent = element.parentElement; - if (!parent.style.position && parent.style.position !== 'relative' && this.followType === 'side') { - parent.style.position = 'relative'; - } - this.loadRefs(element, { - [this.scrollSpyListKey]: 'single' - }); - - const superAttach = super.attach(element); - const spyList = this.refs[this.scrollSpyListKey]; - const spyBtns = spyList.querySelectorAll('.f-scrollspy-monitor-btn'); - spyBtns.forEach(spyBtn => { - this.addEventListener(spyBtn, 'click', (event) => { - event.stopPropagation(); - if (this.currentSpyId !== spyBtn.id) { - const oldCurrentBtn = spyList.querySelector('#scrollspy-' + this.currentSpyId); - oldCurrentBtn && OperateUtils.removeClass(oldCurrentBtn, 'active'); - OperateUtils.addClass(spyBtn, 'active'); - this.currentSpyId = spyBtn.id.replace('scrollspy-', ''); - } - // 此处不刷新界面 - // this.redraw(); - }); - }); - - return superAttach; - } - /** - * 获取当前生效的属性配置 - */ - private initComponentParam() { - this.currentSpyId = this.component.currentSectionId; - - // 跟随样式属性若配置为动态值,设计器里统一展示到侧边 - if (this.component.followType) { - this.followType = ['side', 'tab', 'fixedTab'].includes(this.component.followType) ? this.component.followType : 'side'; - } - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ScrollspyProp = new ScrollspyProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['followType', 'currentSectionId', 'items']); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/export.ts deleted file mode 100644 index a830441639c3ab61b1a35531588b3f668837eae2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdScrollspyComponent from './component/fd-scrollspy'; -import { ScrollspySchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdScrollspyTemplates from './templates'; - - -export const Scrollspy: ComponentExportEntity = { - type: 'Scrollspy', - component: FdScrollspyComponent, - template: FdScrollspyTemplates, - metadata: ScrollspySchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/property/property-config.ts deleted file mode 100644 index 726e86421626c5dba37b586640c46bd725ae6d34..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/property/property-config.ts +++ /dev/null @@ -1,189 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { CommandUsualProp } from '../../common/property/command-property-config'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class ScrollspyProp extends CommandUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const bahaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(bahaviorPropConfig); - - return propertyConfig; - } - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const props = this.getCommonAppearanceProperties(); - props.push( - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'followType', - propertyName: '跟随样式', - propertyType: 'unity', - description: '运行时组件显示位置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: 'side', value: '侧面' }, { key: 'tab', value: '顶部' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - } - ); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const self = this; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'itemsType', - propertyName: '滚动跟随项数组类型', - propertyType: 'select', - iterator: [{ key: 'static', value: '常量' }, { key: 'dynamic', value: '变量' }] - }, - { - propertyID: 'items', - propertyName: '滚动跟随项数组', - propertyType: 'modal', - description: '滚动跟随项数据', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'id', title: '值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'title', title: '名称', editor: { type: EditorTypes.TEXTBOX } }], - requiredFields: ['title', 'id'], - uniqueFields: ['title', 'id'], - modalTitle: '滚动跟随项编辑器', - canEmpty: false - }, - converter: new ItemCollectionConverter(), - visible: propertyData.itemsType === 'static' - }, - { - propertyID: 'dynamicItems', - propertyName: '滚动跟随项数组', - propertyType: 'unity', - description: '滚动跟随项数据', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - visible: propertyData.itemsType === 'dynamic' - }, - { - propertyID: 'currentSectionId', - propertyName: '活动节点', - propertyType: 'unity', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: this.getCurrentSectionIterators(propertyData), - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'itemsType': { - const items = this.properties.find(p => p.propertyID === 'items'); - if (items) { - items.visible = changeObject.propertyValue === 'static'; - } - - const dynamicItems = this.properties.find(p => p.propertyID === 'dynamicItems'); - if (dynamicItems) { - dynamicItems.visible = changeObject.propertyValue === 'dynamic'; - } - - propertyData.currentSectionId = null; - break; - } - case 'items': { - if (propertyData.currentSectionId && (typeof propertyData.currentSectionId === 'string')) { - const currentConfig = self.getCurrentSectionIterators(propertyData); - // 更新当前活动节点枚举选项 - const currentSectionProp = this.properties.find(p => p.propertyID === 'currentSectionId'); - if (currentSectionProp) { - currentSectionProp.editorParams.editorOptions.enums = currentConfig; - } - - - // 更新当前活动节点值 - const sectionKeys = currentConfig.map(c => c.key); - if (!sectionKeys.includes(propertyData.currentSectionId)) { - propertyData.currentSectionId = null; - } - } - - } - } - } - }; - } - - private getCurrentSectionIterators(propertyData: any) { - if (!propertyData.items || !propertyData.items.length) { - return []; - } - const keyValues = []; - propertyData.items.forEach(item => { - keyValues.push({ - key: item.id, - value: item.title - }); - }); - return keyValues; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/schema/schema.ts deleted file mode 100644 index 0dc904056a4ee66552d39c27ca6f8ada2da7d073..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/schema/schema.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const ScrollspySchema ={ - id: '', - type: 'Scrollspy', - appearance: { - class: '' - }, - currentSectionId: '', - followType: 'side', - items: [], - itemsType: 'static', - visible: true -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/form.ts deleted file mode 100644 index bc7abaf7a5b060fd684a64c0689526382aff94f4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/form.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default (ctx: any) => { - // 不考虑模板的问题 - let scrollListStr = ''; - let scrollItemsStr = ''; - ctx.component.items.forEach(item => { - let btnCls = item.id == ctx.currentSpyId ? 'f-scrollspy-monitor-btn active' : 'f-scrollspy-monitor-btn'; - scrollItemsStr += `
  • - ${item.title} -
  • `; - }); - scrollListStr = `
      ${scrollItemsStr}
    `; - - if (ctx.followType == 'side') { - let innerStyle = 'width:' + ctx.sidetabWidth / 16 + 'rem;transform:translateX(' + ctx.sidetabWidth / 16 + 'rem)'; - return `
    -
    - ${scrollListStr} -
    -
    -
    - - 导航 - - -
    -
    -
    `; - } - let scrollspyCls = ctx.followType == 'tab' ? ' f-scrollspy-tabs' : ' f-scrollspy-fixedTab'; - return `
    - ${scrollListStr} -
    `; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/scrollspy/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/component/fd-steps.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/component/fd-steps.ts deleted file mode 100644 index 1f98ec555e9671ac3284c54fa045318231898eb3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/component/fd-steps.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { StepsSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { StepsProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import FdCommandBaseComponent from '../../common/commandBase/commandBase'; - -export default class FdStepsComponent extends FdCommandBaseComponent { - // 步骤条数据,步骤条一般是绑定变量,此处用默认的数据 - // 后期数据来源可能会变 - private stepsData = [ - { id: 'plan', title: '发货计划' }, - { id: 'out', title: '出库' }, - { id: 'settlement', title: '结算' }, - { id: 'voucher', title: '凭证' } - ]; - // 当前数据索引 - private activeIndex = 1; - // 没有方向属性,假定 - private direction = 'horizontal'; - // fHeight 应用纵向时高度变量,未支持 - component; - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('progress-steps.css'); - } - - getStyles(): string { - return 'display: block;'; - } - getDefaultSchema(): any { - - return StepsSchema; - } - - // 渲染模板 - render(): any { - return super.render(this.renderTemplate('Steps', { - component: this.component, - stepsData: this.stepsData, - activeIndex: this.activeIndex, - direction: this.direction - })); - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: StepsProp = new StepsProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const notAppliedProps = ['visible', 'currentId', 'stepsMessage']; - if (!notAppliedProps.includes(changeObject.propertyID)) { - this.triggerRedraw(); - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/export.ts deleted file mode 100644 index 05cb4db16dad62d56f154fd0e517848ddf5c1eab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdStepsComponent from './component/fd-steps'; -import { StepsSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdStepsTemplates from './templates'; - - -export const Steps: ComponentExportEntity = { - type: 'Steps', - component: FdStepsComponent, - template: FdStepsTemplates, - metadata: StepsSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/property/property-config.ts deleted file mode 100644 index 2c5dc196741f6a20c6d81fc7853347b4bcb0a52f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/property/property-config.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent, StyleEditorComponent } from '@farris/designer-devkit'; -import { CommandUsualProp } from '../../common/property/command-property-config'; - -export class StepsProp extends CommandUsualProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const appearanceInfo = this.getCommonAppearanceProperties() as PropertyEntity[]; - appearanceInfo.push( - { - propertyID: 'fill', - propertyName: '是否填充', - propertyType: 'boolean' - }, - { - propertyID: 'extendTemplate', - propertyName: '扩展区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'stepsCls', - propertyName: '单步骤Class样式', - propertyType: 'string' - }, - { - propertyID: 'stepStyle', - propertyName: '单步骤Style样式', - propertyType: 'modal', - editor: StyleEditorComponent, - showClearButton: true - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceInfo, - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'currentId', - propertyName: '当前步骤变量', - propertyType: 'unity', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - - }, - { - propertyID: 'stepsMessage', - propertyName: '步骤信息变量', - propertyType: 'unity', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/schema/schema.ts deleted file mode 100644 index 5f71920331ec33b5233a9fd3c49b6c2a3b316456..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/schema/schema.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const StepsSchema = { - id: '', - type: 'Steps', - stepsCls: '', - stepStyle: '', - extendTemplate: '', - visible: true, - fill: false, - currentId: null, - stepsMessage: null, - appearance: { - class: '' - } -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/form.ts deleted file mode 100644 index 5a9443fc41393359f7c4e17a7636210c2031e53c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/form.ts +++ /dev/null @@ -1,72 +0,0 @@ -export default (ctx: any) => { - // 列表样式 - let listCls = ''; - if (ctx.direction == 'horizontal') { - listCls = 'f-progress-step-list'; - if (ctx.component.fill == true) { - listCls += ' f-progress-step-horizontal-fill'; - } - } else { - listCls = 'f-progress-step-list-block'; - if (ctx.component.fill == true) { - listCls += ' f-progress-step-vertical-fill'; - } - } - if (ctx.component.extendTemplate) { - listCls += ' f-progress-step-has-extend'; - } - listCls += ' ' + ctx.component.stepsCls; - // 列表结构 - let listStr = ''; - // li的style - let liStyle = ctx.component.stepStyle ? 'style="' + ctx.component.stepStyle + '" ' : ''; - // - for(let k=0;k`; - }else{ - if(k >=ctx.activeIndex){ - iconStr= `${k+1}`; - }else{ - iconStr=``; - } - } - let lineStr = ''; - if (k < ctx.stepsData.length - 1) { - lineStr = `
    - -
    `; - } - listStr += `
  • -
    -
    - ${iconStr} -
    -

    ${curStep.title}

    -
    -
    ${lineStr} -
    - ${ctx.component.extendTemplate} -
  • `; - } - - // 空数据 - let emptyStr = ''; - if (ctx.stepsData.length == 0) { - emptyStr = '
    暂无数据
    '; - } - return `
    -
      - ${listStr} -
    - ${emptyStr} -
    `; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/steps/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/component/fd-tag.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/component/fd-tag.ts deleted file mode 100644 index c3781b8156ad72c18dc945badb2346f09cab9146..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/component/fd-tag.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { TagSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TagProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FdCommandBaseComponent from '../../common/commandBase/commandBase'; - -export default class FdTagComponent extends FdCommandBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getStyles(): string { - return 'display: inline-block;'; - } - getDefaultSchema(): any { - return TagSchema; - } - - // 渲染 - render(): any { - return super.render(this.renderTemplate('Tag', { - component: this.component - })); - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: TagProp = new TagProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const propIds = ['colorType', 'disabled', 'label']; - - super.onPropertyChanged(changeObject, propIds); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/export.ts deleted file mode 100644 index 13869de2dd3ce4eb7b7ab1d03b933e924f587218..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdTagComponent from '././component/fd-tag'; -import { TagSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdTagTemplates from './templates'; - - -export const Tag: ComponentExportEntity = { - type: 'Tag', - component: FdTagComponent, - template: FdTagTemplates, - metadata: TagSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/property/property-config.ts deleted file mode 100644 index 3e965284b0867c24784304d9dadd232cb47f1cfc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/property/property-config.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CommandUsualProp } from '../../common/property/command-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class TagProp extends CommandUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonPops = this.getCommonAppearanceProperties(); - commonPops.push( - { - propertyID: 'label', - propertyName: '标签文本', - propertyType: 'string', - description: '标签文本设置' - }, - { - propertyID: 'value', - propertyName: '标签值', - propertyType: 'string', - description: '标签值设置' - }, - { - propertyID: 'colorType', - propertyName: '标签类型', - propertyType: 'select', - description: '标签类型选择', - iterator: [{ key: '', value: '无' }, { key: 'success', value: 'success' }, { key: 'primary', value: 'primary' }, - { key: 'danger', value: 'danger' }, { key: 'warning', value: 'warning' }, { key: 'info', value: 'info' }, - { key: 'secondary', value: 'secondary' }] - } - ); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonPops - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'closable', - propertyName: '可关闭', - propertyType: 'boolean', - description: '是否可关闭' - } - ] - }; - } - - - - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - - } - }; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/schema/schema.ts deleted file mode 100644 index fd4f2b594c5dd57d9131b60b757c7fa02ce56cb5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/schema/schema.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const TagSchema = { - id: '', - type: 'Tag', - visible: true, - label: '标签', - value: '', - closable: false, - colorType: '', - appearance: { - class: '' - } -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/form.ts deleted file mode 100644 index 16f94209f09beb62fa39583cf7b0939d719fe8ae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/form.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (ctx: any) => { - let tagCls = 'btn-md '; - // 没有size属性,跳过 - if (ctx.component.colorType) { - tagCls += 'btn-' + ctx.component.colorType; - } - if (ctx.component.disabled) { - tagCls += ' disabled farris-tag-disabled'; - } - let closeStr = ''; - if (ctx.component.closable) { - closeStr = ``; - } - return `
    ${ctx.component.label}${closeStr}
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/tag/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/fd-toolbar.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/fd-toolbar.ts deleted file mode 100644 index 9f079549199d92c16866ef516d42d0b4ff6da0a3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/fd-toolbar.ts +++ /dev/null @@ -1,371 +0,0 @@ -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { DesignerEnvType, FormBasicService, WebCmdService } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { cloneDeep } from 'lodash-es'; -import Sortable from 'sortablejs'; -// import { NocodeToolBarProp } from '../property/nocode-property-config'; -import { ToolBarProp } from '../property/property-config'; -import { ToolBarSchema, ToolBarType } from '../schema/schema'; -import { default as FdToolBarItemComponent, default as ToolBarItemComponent } from './toolbaritem/component/fd-toolbar-item'; -import { ToolBarItemSchema, ToolBarItemType } from './toolbaritem/schema/schema'; - -export default class FdToolBarComponent extends FarrisDesignBaseNestedComponent { - - envType: DesignerEnvType; - - /** 元数据(DOM结构) */ - component: ToolBarType; - - /** 工具栏按钮组件实例 */ - toolBarItem: ToolBarItemComponent; - - /** 工具栏按钮组件实例列表 */ - toolBarItemList: ToolBarItemComponent[]; - - /** 工具栏按钮元数据 */ - items: Array; - - /** 当前选中的按钮id,用于在工具栏attach方法中触发选中某一个按钮 */ - selectedId: string; - - selected: ToolBarItemComponent; - - /** 当前选中的按钮实例 */ - selectedToolbarItem: ToolBarItemComponent; - - /** 按钮对齐方式,默认为flex-end。在section toolbar的场景下值为false */ - justifyContentEnd = true; - - isDraggable = false; - - /** 设计器中二级按钮的展示位置:向下bottom / 向上top。目前只有ModalFooter中toolbar的展示位置为向上 */ - popDirection: string; - - constructor(component: any, options: any) { - super(component, options); - - this.popDirection = this.options['popDirection'] || 'bottom'; - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - - // 增加操作按钮 - if (this.envType !== DesignerEnvType.noCode) { - this.customToolbarConfigs = [ - { - id: 'appendItem', - title: '新增按钮', - icon: 'f-icon f-icon-plus-circle text-white', - click: (e) => { - e.stopPropagation(); - this.appendItem(ToolBarItemSchema); - } - } - ]; - } - this.initItems(); - - } - - - init() { - this.components = []; - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = this.items.map(item => { - return new ToolBarItemComponent(item, options, { - isChildOfToolBar: true, - viewModelId: this.viewModelId, - componentId: this.componentId - }); - - }); - this.components = this.components.concat(this.toolBarItemList); - - if (this.selectedId) { - this.selected = this.toolBarItemList.find(item => item.id === this.selectedId); - } - } - - initItems() { - this.items = this.component.items; - } - /** - * 不支持删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - /** - * 不允许移动 - */ - checkCanMoveComponent(): boolean { - return false; - } - /** - * 隐藏间距 - */ - hideNestedPaddingInDesginerView(): boolean { - return true; - } - getDefaultSchema(): any { - - return cloneDeep(ToolBarSchema); - } - - render(): any { - return super.render(this.renderTemplate(this.type, { - component: this.component, - toolBarItemList: this.toolBarItemList, - justifyContentEnd: this.justifyContentEnd - })); - } - - /** - * 元素扩展事件 - */ - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - this.toolBarItemList.forEach((toolBarItem, index) => { - const itemId = toolBarItem.component.id; - this.loadRefs(element, { - [itemId]: 'm' - }); - toolBarItem.attach(this.refs[itemId][0]); - }); - this.registerDnd(); - - - return superAttach; - } - - - registerDnd() { - // 加载子组件 - const dragToolBarContainer = this.element.querySelector('.toolbar-drag'); - if (dragToolBarContainer) { - // tslint:disable-next-line:no-unused-expression - new Sortable(dragToolBarContainer, { - direction: 'horizontal', - animation: 150, - dragClass: '', - delay: 50, // 鼠标按下后多久才允许拖动,如果不设置该属性虽然可以执行点击事件,但是该元素会被轻微的被拖动一下,用户体验非常不好 - forceFallback: true, - fallbackClass: 'sortable-mirror', // 为镜像元素增加样式 - onChoose: (e) => { - }, - onStart: (e) => { - this.isDraggable = true; - }, - onMove: (e) => { - // 为工具栏增加样式,用于控制拖拽过程中按钮操作栏的样式 - dragToolBarContainer.classList.add('sortable-toolbar-container'); - - this.isDraggable = true; - }, - onClone: (e) => { - }, - onEnd: (evt) => { - if (!this.isDraggable) { - return; - } - - dragToolBarContainer.classList.remove('sortable-toolbar-container'); - - // 需要重新计算选中按钮工具栏的位置 - const selectedButtonDiv = dragToolBarContainer.querySelector('.dgComponentSelected') as HTMLElement; - if (this.selectedToolbarItem && selectedButtonDiv && selectedButtonDiv.children && selectedButtonDiv.children.length >= 2) { - const buttonEle = selectedButtonDiv.children[1] as HTMLElement; - this.selectedToolbarItem.setPositionOfToolbarIcon(buttonEle); - - } - // 调整左右位置 - this.dragEnd(evt); - this.isDraggable = false; - } - }); - } - } - - /** - * 拖拽结束事件 - */ - dragEnd(e: any) { - const oldIndex = e.oldIndex; - const newIndex = e.newIndex; - - if (oldIndex !== newIndex) { - // 修改DOM中按钮的顺序 - const item = this.items[oldIndex]; - this.items.splice(oldIndex, 1); - this.items.splice(newIndex, 0, item); - - // 修改按钮实例的顺序 - const itemCmp = this.toolBarItemList[oldIndex]; - this.toolBarItemList.splice(oldIndex, 1); - this.toolBarItemList.splice(newIndex, 0, itemCmp); - } - - } - - - - public appendItem(item) { - if (!this.items) { - return; - } - const itemSchema = Object.assign({}, cloneDeep(item)); - itemSchema.id = `${itemSchema.id}-${Math.random().toString(36).slice(2, 6)}`; - this.items.push(itemSchema); - - this.setSelectedId(itemSchema.id); - this.rebuild(); - } - - /** - * 父元素调用删除 - * @param id - */ - public removeToolBarItem(id: string) { - const items = this.items; - // 删除元数据 - const itemToRemove = items.find(item => item.id === id); - const mesService = this.options.designerHost.getService('MessagerService'); - mesService.question(`确定删除按钮【${itemToRemove['title'] || itemToRemove.text}】?`, () => { - this.confirmRemoveToolbarItem(id); - }); - } - - confirmRemoveToolbarItem(id: string) { - const items = this.items; - // 删除元数据 - const itemToRemoveIndex = items.findIndex(item => item.id === id); - if (itemToRemoveIndex > -1) { - this.selectedToolbarItem = null; - items.splice(itemToRemoveIndex, 1); - - // 自动选中下一个按钮 - const nextBtnId = items[itemToRemoveIndex] && items[itemToRemoveIndex].id; - this.setSelectedId(nextBtnId); - - - // 删除二级按钮 - if (this instanceof FdToolBarItemComponent) { - if (!nextBtnId) { - this.parent.emit('clearPropertyPanel'); - } - this.parent.rebuild(); - - this.syncActions(); - - } else { - // 删除一级按钮 - if (!nextBtnId) { - this.emit('clearPropertyPanel'); - } - this.rebuild(); - - this.syncActions(); - } - } - } - /** - * 复制按钮 - * @param id - */ - public cloneToolBarItem(id: string) { - const itemToClone = this.items.find(item => item.id === id); - if (!itemToClone) { - return; - } - const itemToCloneIndex = this.items.findIndex(item => item.id === id); - // 点击事件不复制 - const clonedToolBarItem = Object.assign(cloneDeep(itemToClone), - { - id: `${this.type}-cloned-${Math.random().toString(36).slice(2, 6)}`, - click: null - }); - - let itemsToClone = []; - if (clonedToolBarItem.items && clonedToolBarItem.items.length) { - itemsToClone = clonedToolBarItem.items.map(i => Object.assign(cloneDeep(i), - { - id: `${this.type}-cloned-${Math.random().toString(36).slice(2, 6)}`, - click: null - })); - } - clonedToolBarItem.items = itemsToClone; - - // 添加到被复制元素的后面 - this.items.splice(itemToCloneIndex + 1, 0, clonedToolBarItem); - - this.setSelectedId(clonedToolBarItem.id); - - this.rebuild(); - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - - // if (this.envType === DesignerEnvType.noCode) { - // const prop: NocodeToolBarProp = new NocodeToolBarProp(serviceHost, this.viewModelId, this.componentId); - // const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - // return propertyConfig; - // } else { - const prop: ToolBarProp = new ToolBarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - // } - - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: any): void { - if (['text', 'icon', 'disable', 'class'].includes(changeObject.propertyID)) { - // 重新组装子元素实例 便于拖拽后未保存的场景 - // if (this instanceof FdToolBarComponent) { - // this.init(); - // } - this.triggerRedraw(); - } - if (['items'].includes(changeObject.propertyID)) { - this.parent.redraw(); - } - } - - - setSelectedId(id: string) { - this.selectedId = id; - } - - /** - * 选中工具栏后:关闭二级按钮的下拉面板 - * @param e 点击事件 - */ - afterComponentClicked(e?: PointerEvent): void { - const panelLists = this.element.querySelectorAll('[ref="dropdown-button"]+div'); - if (panelLists && panelLists.length) { - panelLists.forEach(otherList => { - otherList.classList.remove('d-block'); - otherList.classList.add('d-none'); - }); - - } - } - - /** - * 涉及到按钮绑定事件的删除,故触发同步actions操作 - */ - syncActions() { - const webCmdService = this.options.designerHost.getService('WebCmdService') as WebCmdService; - webCmdService.syncActions(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool-form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool-form.ts deleted file mode 100644 index 7a92f892f43cee7182023621b5e977f5c17f82d6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool-form.ts +++ /dev/null @@ -1,55 +0,0 @@ -export const renderForm = (ctx) => { - // document.body - const modal = document.createElement('div'); - document.body.appendChild(modal); - // 绝对定位 模态框样式 - modal.id = 'global-tool-modal'; - modal.classList.add('position-absolute', 'w-100', 'h-100', 'd-none'); - modal.style.backgroundColor = 'rgb(108, 108, 108, 0.5)'; - modal.style.zIndex = '1050'; - modal.style.top = '0px'; - // 组装按钮列表 - const buttonList = renderButtonList(ctx.items, ctx.disabledList); - // 列表容器 - const buttonListContainer = ` -
    -
    -
    ${ctx.title || '弹出框'}
    -
    - -
    -
    -
    ${buttonList.join('')}
    -
    - - -
    -
    - `; - - modal.innerHTML = buttonListContainer; - return modal; -}; - -export const renderButtonList = (items, disabledList) => { - return items.map(item => ``); -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool.ts deleted file mode 100644 index 0b1e01a977d70de9641a90ce3dd4b2351b8301c3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/globaltools/global-tool.ts +++ /dev/null @@ -1,251 +0,0 @@ -import { Subject } from 'rxjs'; -import { renderForm, renderButtonList } from './global-tool-form'; -export class GlobalTool { - // 按钮元数据 - items: any[]; - // 元素 - modal: HTMLElement; - confirmButton: HTMLButtonElement; - cancelButton: HTMLButtonElement; - closeButton: HTMLElement; - buttonContainer: HTMLElement; - buttons: HTMLElement[]; - selectedList: any[] = []; - selectedListSubject = new Subject>(); - context: any; - // 按钮事件 - buttonListEvent: any; - // 模态框事件 - modalEvent: any; - // 确定按钮事件 - confirmEvent: any; - // 取消按钮事件 - closeEvent: any; - // constructor - constructor(context: { items?: any[], list?: string[], enableClosedByModal?: boolean }) { - this.context = context; - this.items = context.items; - // 渲染 - this.render(); - this.refreshButton(this.context.items, this.context.list); - // 绑定事件; - this.attach(); - // 打开模态框 - this.openModal(); - } - - /** - * 点击按钮 - * @param e 点击事件 - */ - private clickButtonList(e) { - if (e.target['nodeName'].toLowerCase() === 'button') { - const self = e.target; - if (self['classList'].contains('disabled')) { - return; - } - if (self['classList'].contains('text-white')) { - this.blurButton(self); - } else { - this.focusButton(self); - } - } - } - - private clickConfirm() { - // 收集选中的按钮 - const selectedButtons = this.modal.querySelectorAll('.text-white'); - this.selectedList = Array.from(selectedButtons).map(btn => btn.id); - // 获取选择的按钮组 - this.selectedListSubject.next(this.selectedList); - // 关闭modal - this.close(); - } - - /** - * 关闭模态框 - */ - private closeModal() { - if (this.modal) { - this.modal.classList.remove('d-block'); - this.modal.classList.add('d-none'); - } - } - - /** - * 关闭所有 - */ - private close() { - // 所有元素恢复原状 - this.buttons.forEach(btn => { - if (btn.classList.contains('text-white')) { - this.blurButton(btn); - } - }); - // 解绑所有事件 - this.detach(); - this.closeModal(); - } - /** - * 添加绑定事件 - * @param el 绑定元素 - * @param eventType 事件类型 - * @param event 监听器 - */ - private addEventListener(el: HTMLElement, eventType: string, event: any) { - if (el.addEventListener) { - el.addEventListener(eventType, event); - } - } - - /** - * 移除事件 - * @param el 绑定元素 - * @param eventType 事件类型 - * @param event 事件 - */ - private removeEventListener(el: HTMLElement, eventType: string, event: any) { - if (event) { - if (el.removeEventListener) { - el.removeEventListener(eventType, event); - } - } - } - - /** - * 聚焦 - * @param button 按钮元素 - */ - private focusButton(button: any) { - button.classList.add('bg-primary', 'text-white'); - } - - /** - * 失去焦点 - * @param button 按钮元素 - */ - private blurButton(button: any) { - button.classList.remove('bg-primary', 'text-white'); - } - - /** - * 打开模态框 - */ - openModal() { - if (!this.modal) { - return; - } - this.modal.classList.remove('d-none'); - this.modal.classList.add('d-block'); - } - - rebuild(context) { - new Promise((resolve, reject) => { - this.render(); - // 首次加载 刷新 - this.refreshButton(context.items, context.list); - resolve('a'); - }).then(() => { - // 绑定事件; - this.attach(); - // 打开模态框 - this.openModal(); - }); - } - - refreshButton(items, list) { - this.buttonContainer.innerHTML = renderButtonList(items, list).join(''); - } - - render() { - // 创建模态框 - this.modal = document.body.querySelector('#global-tool-modal'); - if (!this.modal) { - const ctx = { - items: this.items, - title: '选择按钮', - disabledList: this.context.list - }; - this.modal = renderForm(ctx); - } - this.initElement(); - } - - // 获取节点元素 - initElement() { - // 初始化确定 取消按钮 - this.confirmButton = this.modal.querySelector('[ref="global-modal__confirm"]'); - this.cancelButton = this.modal.querySelector('[ref="global-modal__cancel"]'); - this.closeButton = this.modal.querySelector('[ref="global-modal__close"]'); - this.buttonContainer = this.modal.querySelector('[ref="global-modal__list"]'); - // this.buttons = [].slice.call(this.buttonContainer.querySelectorAll('button')); - this.buttons = Array.prototype.slice.call(this.buttonContainer.querySelectorAll('button')); - } - - /** - * 绑定事件 - */ - attach() { - // 绑定确定按钮事件 - this.confirmEvent = this.bindEvent(this.clickConfirm); - this.addEventListener(this.confirmButton, 'click', this.confirmEvent); - - // 绑定工具栏按钮事件 事件委托 - this.buttonListEvent = this.bindEvent(this.clickButtonList); - this.addEventListener(this.buttonContainer, 'click', this.buttonListEvent); - - this.closeEvent = this.bindEvent(this.close); - // 绑定模态框事件 - if (this.context.enableClosedByModal) { - this.addEventListener(this.modal, 'click', this.closeEvent); - } - // 绑定取消事件 - this.addEventListener(this.cancelButton, 'click', this.closeEvent); - // 绑定右上角关闭事件 - this.addEventListener(this.closeButton, 'click', this.closeEvent); - } - - /** - * 解绑所有事件 - */ - detach() { - this.removeEventListener(this.confirmButton, 'click', this.confirmEvent); - this.removeEventListener(this.buttonContainer, 'click', this.buttonListEvent); - this.removeEventListener(this.cancelButton, 'click', this.closeEvent); - this.removeEventListener(this.closeButton, 'click', this.closeEvent); - this.removeEventListener(this.cancelButton, 'click', this.closeEvent); - if (this.context.enableClosedByModal) { - this.removeEventListener(this.modal, 'click', this.closeEvent); - } - this.confirmEvent = null; - this.buttonListEvent = null; - this.closeEvent = null; - } - - /** - * 封装绑定事件 用于统一阻止冒泡 方便解绑事件 - * @param eventKey 事件标识 - * @param fn 监听函数 - * @param option 配置项 - */ - bindEvent(fn: (value?: any) => any, param = [], option = { stopPropagation: true }): T { - const lisenter = (e) => { - if (option && option.stopPropagation) { - e.stopPropagation(); - } - fn.call(this, ...[...param, e]); - }; - return lisenter.bind(this); - } - - /** - * 订阅对象 - */ - observeSelected$() { - return this.selectedListSubject; - } - - - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/operators/ToolBarItemOperator.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/operators/ToolBarItemOperator.ts deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/component/fd-toolbar-item.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/component/fd-toolbar-item.ts deleted file mode 100644 index 0c597e9f314f0e8e4fe8dd97b58933f0551853d7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/component/fd-toolbar-item.ts +++ /dev/null @@ -1,444 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { cloneDeep } from 'lodash-es'; -import { default as FdToolBarComponent, default as ToolBarComponent } from '../../fd-toolbar'; -import { ToolBarItemProp } from '../property/property-config'; -import { ToolBarItemSchema, ToolBarItemType } from '../schema/schema'; - - -export interface ToolBarItemOptions { - isChildOfToolBar?: boolean; - isChildOfButton?: boolean; - viewModelId: string; - componentId: string; -} -export default class FdToolBarItemComponent extends FarrisDesignBaseComponent { - - envType: DesignerEnvType; - - component: ToolBarItemType; - - /** toolBar组件的子级,一级按钮 */ - public isChildOfToolBar: boolean; - - /** 按钮的子级,二级按钮 */ - public isChildOfButton: boolean; - - /** 按钮的根组件,即toolbar组件 */ - root: ToolBarComponent; - - items: ToolBarItemType[]; - extendOptions: ToolBarItemOptions; - toolBarItemList: FdToolBarItemComponent[]; - - button: HTMLElement; - - /** 当前toolbar中选中的按钮 */ - get selectedId() { - if (this.isChildOfToolBar) { - return this.parent.selectedId; - } else { - return this.root.selectedId; - } - - } - - constructor(component: any, options: any, extendOptions?: ToolBarItemOptions) { - super(component, options); - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - - if (this.envType === DesignerEnvType.noCode) { - // 零代码场景下不选中按钮 - this.checkable = false; - } - - this.applyClassToComponent = false; - this.items = component.items; - if (extendOptions) { - this.extendOptions = this.extendOptions; - const { isChildOfButton, isChildOfToolBar } = extendOptions; - this.isChildOfButton = isChildOfButton; - this.isChildOfToolBar = isChildOfToolBar; - this.viewModelId = extendOptions.viewModelId; - this.componentId = extendOptions.componentId; - } - this.root = this.getParent(); - } - - getDefaultSchema(): any { - // 这里cloneDeep不能删 - return cloneDeep(ToolBarItemSchema); - } - - init(): void { - // 新建子级组件实例 - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = (this.items || []).map(item => { - const toolBarItem = new FdToolBarItemComponent(item, options, { isChildOfButton: true, viewModelId: this.viewModelId, componentId: this.componentId }); - return toolBarItem; - }); - } - - - render(): any { - this.init(); - return this.renderTemplate(this.type, { - component: this.component, - toolBarItemList: this.toolBarItemList, - isChildOfToolBar: this.isChildOfToolBar, - isChildOfButton: !this.isChildofToolBar(), - popDirection: this.root.popDirection, - showMenuInToolbarItem: this.envType == DesignerEnvType.designer - }); - } - - - attach(element: HTMLElement): Promise { - this.element = element; - this.button = this.element.querySelector('button'); - const superAttach = super.attach(this.element); - - // 删除 - const removeButton = element.querySelector('[ref="removeButton"]'); - this.attachRemoveEvent(removeButton); - - // 复制 - const cloneButton = element.querySelector('[ref="copyButton"]'); - this.attachCopyEvent(cloneButton); - - // 新增子级 - const appendChildButton = element.querySelector('[ref="appendChildButton"]'); - this.attachAppendChildEvent(appendChildButton); - - - if (this.options.parent instanceof FdToolBarItemComponent) { - // 二级按钮新增同级 - const appendSameButton = element.querySelector('[ref="appendSame"]'); - this.attachAppendSame(appendSameButton); - - // 二级按钮上移 - const appendMoveUpButton = element.querySelector('[ref="moveUp"]'); - this.appendMoveUpAndDown(appendMoveUpButton, 'moveUp'); - - // 二级按钮下移 - const appendMoveDownButton = element.querySelector('[ref="moveDown"]'); - this.appendMoveUpAndDown(appendMoveDownButton, 'moveDown'); - } - - // 模拟点击当前选中的按钮 - if (this.parent.selectedId && this.parent.selectedId === this.id) { - setTimeout(() => { - // 增加判断条件:当前页面上没有选中toolbar外的控件时,才触发按钮的点击。场景是先选中子表弹出编辑区域内的headertoolbar按钮,再选中父级tabPage,若没有这个判断,则焦点不能转移到TabPage上 - if (document.getElementsByClassName('dgComponentSelected').length === 0) { - this.element.click(); - } - }); - } - - // 展开工具栏下拉按钮列表 - const showListButton = element.querySelector('[ref="dropdown-button"]'); - const list = element.querySelector('[ref="dropdown-button"]+div'); - this.addEventListener(showListButton, 'click', (event) => { - event.stopPropagation(); - if (list.classList.contains('d-block')) { - list.classList.remove('d-block'); - list.classList.add('d-none'); - - } else if (list.classList.contains('d-none')) { - // 关闭其他一级按钮的下拉列表 - const otherLists = this.parent.element.querySelectorAll('[ref="dropdown-button"]+div'); - if (otherLists && otherLists.length) { - otherLists.forEach(otherList => { - otherList.classList.remove('d-block'); - otherList.classList.add('d-none'); - }); - - } - - list.classList.remove('d-none'); - list.classList.add('d-block'); - - } - }); - - // 绑定子级事件 - this.root.attach.call(this, this.element); - - // 新增同级 - return superAttach; - } - /** - * 按钮被取消选中后,需要将toolbar上记录的selectedId置空,否则会触发按钮的点击事件 - */ - afterComponentCancelClicked() { - this.closeAllDropdownPanel(); - this.setSelectedId(null); - } - - /** - * 选中按钮后事件,由基类调用 - * @param event 选中event - */ - afterComponentClicked(event?: PointerEvent) { - this.parent.toolBarItemList.forEach(i => { - const cmpGroup = i.element.querySelector('.component-btn-group'); - if (cmpGroup && cmpGroup.classList) { - cmpGroup.classList.remove('d-flex'); - cmpGroup.classList.remove('d-none'); - } - }); - - // 若点击二级按钮,需要展开一级按钮旁边的下拉框 - if (this.isChildOfButton) { - // this.closeAllDropdownPanel(); - - // 打开所属一级按钮的下拉面板 - const list = this.parent.element.querySelector('[ref="dropdown-button"]+div') as HTMLElement; - list.classList.remove('d-none'); - list.classList.add('d-block'); - } - // 点击一级按钮,关闭下拉框面板 - if (this.isChildOfToolBar) { - this.closeAllDropdownPanel(); - } - - // 手动触发点击组件事件 展示属性面板 - this.triggerComponentClicked(event); - - // 设置操作按钮的位置 - this.setPositionOfToolbarIcon(this.button); - - // 在整个toolbar上记录当前选中按钮的id - if (this.parent.selectedId !== this.id) { - this.parent.setSelectedId(this.id); - } - - // 二级按钮增加鼠标移入移出事件 - this.addToolBarItemButtonMouseEvent(this.element); - } - - /** - * 关闭二级按钮下拉框面板 - */ - private closeAllDropdownPanel() { - // 关闭其他一级按钮的下拉列表 - const otherLists = this.root.element.querySelectorAll('[ref="dropdown-button"]+div'); - if (otherLists && otherLists.length) { - otherLists.forEach(otherList => { - otherList.classList.remove('d-block'); - otherList.classList.add('d-none'); - }); - - } - } - /** - * 二级按钮增加鼠标移入移出事件。因为二级按钮是上下排列,按钮的工具栏会遮挡上方的按钮,所以限定在鼠标移入时才显示工具栏 - * @param button - */ - private addToolBarItemButtonMouseEvent(button) { - if (!(this.parent instanceof FdToolBarComponent)) { - this.addEventListener(button, 'mouseenter', (event) => { - if (button.classList.contains('dgComponentSelected')) { - const buttomGroup = button.querySelector('.component-btn-group'); - buttomGroup.classList.remove('d-none'); - - // 为适应拖拽、界面收折等场景,每次都重新计算图标位置 - this.setPositionOfToolbarIcon(this.button); - } - }); - this.addEventListener(button, 'mouseleave', (event) => { - if (button.classList.contains('dgComponentSelected')) { - const buttomGroup = button.querySelector('.component-btn-group'); - if (!buttomGroup.classList.contains('d-none')) { - buttomGroup.classList.add('d-none'); - } - } - }); - } - } - - private attachRemoveEvent(element: Element) { - this.addEventListener(element, 'click', (event) => { - event.stopPropagation(); - this.remove(); - }); - } - - private attachCopyEvent(element: Element) { - this.addEventListener(element, 'click', (event) => { - event.stopPropagation(); - this.copy(); - }); - } - - private attachAppendChildEvent(element: Element) { - this.addEventListener(element, 'click', (event) => { - event.stopPropagation(); - this.appendChild(); - }); - } - - private attachAppendSame(element: Element) { - this.addEventListener(element, 'click', (event) => { - event.stopPropagation(); - this.options.parent.appendItem(); - }); - } - private appendMoveUpAndDown(element: Element, action: string) { - if (this.appendMoveUpAndDown) { - this.addEventListener(element, 'click', (event) => { - event.stopPropagation(); - this.options.parent.moveUpAndDown(this.component.id, action); - }); - } - - } - /** - * 二级按钮上移下移 - * @param targetBtnId 当前移动的按钮id - * @param action 上移/下移 - */ - moveUpAndDown(targetBtnId: string, action: string) { - const index = this.items.findIndex(i => i.id === targetBtnId); - if (index < 0) { - return; - } - const targetBtn = this.items[index]; - if (action === 'moveUp' && index > 0) { - this.items.splice(index, 1); - this.items.splice(index - 1, 0, targetBtn); - - this.root.rebuild(); - } - - if (action === 'moveDown' && index < this.items.length - 1) { - this.items.splice(index, 1); - this.items.splice(index + 1, 0, targetBtn); - - this.root.rebuild(); - } - } - /** - * 设置操作按钮的位置 - * @param button 当前选中的按钮DOM节点 - */ - setPositionOfToolbarIcon(selectedButton: HTMLElement) { - const toolbarEle = selectedButton.previousElementSibling as HTMLElement; - if (toolbarEle) { - const toolbarEleRect = toolbarEle.getBoundingClientRect(); - - const toolbarDivPanelEle = toolbarEle.children[0] as HTMLElement; - const toolbarDivPanelEleRect = toolbarDivPanelEle.getBoundingClientRect(); - - toolbarDivPanelEle.style.top = toolbarEleRect.top + 'px'; - toolbarDivPanelEle.style.left = (toolbarEleRect.left - toolbarDivPanelEleRect.width) + 'px'; - } - - } - - private appendChild() { - this.appendItem(); - } - - appendItem() { - const newItemMetadata = cloneDeep(ToolBarItemSchema); - this.root.appendItem.call(this, newItemMetadata); - } - - private remove() { - // 移除父组件中的按钮实例 - const parent = this.options.parent; - parent.removeToolBarItem(this.component.id); - } - - removeToolBarItem(id: string) { - this.root.removeToolBarItem.call(this, id); - } - - confirmRemoveToolbarItem(id: string) { - this.root.confirmRemoveToolbarItem.call(this, id); - } - - cloneToolBarItem(id: string) { - this.root.cloneToolBarItem.call(this, id); - } - - private copy() { - const parent = this.options.parent; - parent.cloneToolBarItem(this.component.id); - } - - triggerComponentClicked(e: PointerEvent) { - // 使用父组件的componentClicked事件 传递不同的参数 - const parent = this.getParent(); - parent.selectedToolbarItem = this; - parent.emit('componentClicked', { componentInstance: this, e }); - } - - getParent() { - let parent = this.options.parent; - - while (!(parent instanceof ToolBarComponent)) { - parent = parent.options.parent; - } - return parent; - } - - isChildofToolBar() { - const parent = this.options.parent; - return parent instanceof ToolBarComponent; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop: ToolBarItemProp = new ToolBarItemProp(serviceHost.getService('Injector'), this.viewModelId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropertyConfig(this.component, false, !this.isChildOfButton); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: any): void { - this.root.onPropertyChanged(changeObject); - } - - positionTool() { - const container = document.createElement('div'); - container.classList.add('position.absolute', 'component-btn-group'); - document.body.appendChild(container); - } - - setSelectedId(id: string) { - // this.selectedId = id; - this.parent.setSelectedId(id); - } - - registerDnd() { - this.root.registerDnd.call(this); - } - - dragEnd() { - this.root.dragEnd.call(this); - } - - /** - * 涉及到按钮绑定事件的删除,故触发同步actions操作 - */ - syncActions() { - const webCmdService = this.options.designerHost.getService('WebCmdService'); - webCmdService.syncActions(); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/export.ts deleted file mode 100644 index d52145a219f351a8e5555fb447168a5782eefa33..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdToolBarItemComponent from './component/fd-toolbar-item'; -import { ToolBarItemSchema } from './schema/schema'; -import FdToolBarItemTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; -import { cloneDeep } from 'lodash-es'; - -export const ToolBarItem: ComponentExportEntity = { - type: 'ToolBarItem', - component: FdToolBarItemComponent, - template: FdToolBarItemTemplates, - metadata: cloneDeep(ToolBarItemSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/property/property-config.ts deleted file mode 100644 index 8c1c72d8c4eae53d355767ed4d4387524bc4b7d9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/property/property-config.ts +++ /dev/null @@ -1,638 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { Injector } from '@angular/core'; -import { ControlService } from '../../../../../../service/control.service'; -import { IdService } from '@farris/ui-common'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { EventEditorService, DomService, FormBasicService, StateMachineService, WebCmdService, DataStatesService, UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent, CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent, IconSelectEditorComponent } from '@farris/designer-devkit'; -import { ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; -import { SelectMappingComponent, MappingConverter } from '@farris/designer-devkit'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { MessagerService } from '@farris/ui-messager'; - -/** - * 单个按钮属性配置 - */ -export class ToolBarItemProp { - - needOpenHelpMap = new Map(); - - private controlService: ControlService; - public domService: DomService; - private idService: IdService; - private notifyService: NotifyService; - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - // 事件编辑器集成 - public webCmdService: WebCmdService; - public dataStatesService: DataStatesService; - public viewModelId: string; - - stateMachineService: StateMachineService; - - public msgService: MessagerService; - - /** 在弹窗中使用按钮配置时,交互面板若要跳转到代码视图,需要先关闭弹窗 */ - triggerModalSave?: any; - - constructor(private injector: Injector, viewModelId: string) { - this.viewModelId = viewModelId; - this.controlService = this.injector.get(ControlService); - this.domService = this.injector.get(DomService); - this.formBasicService = this.injector.get(FormBasicService); - this.webCmdService = this.injector.get(WebCmdService); - this.eventEditorService = this.injector.get(EventEditorService); - this.idService = this.injector.get(IdService); - this.notifyService = this.injector.get(NotifyService); - this.stateMachineService = this.injector.get(StateMachineService); - this.dataStatesService = this.injector.get(DataStatesService); - this.msgService = this.injector.get(MessagerService); - } - - /** - * toolbarItem 属性配置 - * @param propertyData 按钮属性 - * @param disableChildItem 是否禁用子级按钮 - * @param isFirstLevel 是否为一级按钮 - */ - public getPropertyConfig(propertyData: any, disableChildItem = true, isFirstLevel = true) { - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - propertyConfig.push(basicPropConfig); - - // 弹出表单框属性(目前未验证) - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, this.viewModelId); - - // 外观属性 - const appearancePropConfig = this.getAppearanceItemPropConfig(propertyData, this.viewModelId, disableChildItem, - openModalPropConfigs, isFirstLevel); - propertyConfig.push(appearancePropConfig); - // 行为属性 - const behaviorPropConfig = this.getBehaviorItemPropConfig(propertyData, this.viewModelId, openModalPropConfigs); - propertyConfig.push(behaviorPropConfig); - propertyConfig.push(...openModalPropConfigs); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - /** - * toolbarItem 属性配置,用于按钮编辑器中点击树的某一行 - * @param viewModelId 按钮所在视图模型ID - * @param disableChildItem 是否禁用子级按钮 - * @param selectedNode 当前选中行数据 - */ - public getPropertyConfigInTree(viewModelId: string, disableChildItem: boolean, selectedNode: TreeNode, triggerModalSave?: any) - : ElementPropertyConfig[] { - - const propertyData = selectedNode.data; - const isFirstLevel = !!!selectedNode.parent; - this.triggerModalSave = triggerModalSave; - - return this.getPropertyConfig(propertyData, disableChildItem, isFirstLevel); - - } - protected getBasicPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '工具栏按钮的标识', - readonly: true - }, - { - propertyID: 'text', - propertyName: '标签', - propertyType: 'string', - description: '工具栏按钮的标签', - readonly: false - } - ] - }; - } - - private getAppearanceItemPropConfig( - propertyData: any, viewModelId: string, disableChildItem: boolean, openModalPropConfigs: ElementPropertyConfig[], - isFirstLevel: boolean): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: '按钮样式', - propertyType: 'string', - description: '工具栏按钮样式' - }, - { - propertyID: 'dropdownCls', - propertyName: '下拉框样式', - propertyType: 'string', - description: '工具栏按钮下拉框样式', - visible: !disableChildItem - } - ] - }, - { - propertyID: 'split', - propertyName: '下拉按钮分离', - propertyType: 'boolean', - defaultValue: false, - description: '工具栏下拉按钮是否分离', - visible: !disableChildItem - }, - { - propertyID: 'icon', - propertyName: '图标', - propertyType: 'modal', - description: '图标设置', - editor: IconSelectEditorComponent, - editorParams: { needIconClass: true }, - visible: isFirstLevel - }, - { - propertyID: 'tipsEnable', - propertyName: '启用提示', - propertyType: 'boolean', - description: '是否启用提示信息', - defaultValue: false - }, - { - propertyID: 'tipsText', - propertyName: '提示消息内容', - propertyType: 'modal', - description: '提示消息内容设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.tipsEnable - } - ], - setPropertyRelates(changeObject: PropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'tipsEnable': { - const tipsText = this.properties.find(p => p.propertyID === 'tipsText'); - if (tipsText) { - tipsText.visible = changeObject.propertyValue; - } - } - } - } - }; - } - - private getBehaviorItemPropConfig( - propertyData: any, viewModelId: string, openModalPropConfigs: ElementPropertyConfig[]): ElementPropertyConfig { - - const self = this; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'disable', - propertyName: '禁用', - propertyType: 'unity', - description: '是否禁用', - editorParams: { - controlName: undefined, - constType: ['enum'], - editorOptions: { - types: this.dataStatesService.dataStates.length != 0 ? ['const', 'stateMachine', 'dataStates'] : ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData, - dataStates: this.dataStatesService.dataStates, - dataStatesBindPath: this.dataStatesService.dataStatesBindPath, - } - } - }, - // 暂不放开使用模式,需要验证在弹出窗口里的使用模式属性 - // { - // propertyID: 'usageMode', - // propertyName: '使用模式', - // propertyType: 'select', - // iterator: [{ key: 'button', value: '按钮' }, { key: 'open-modal', value: '弹出表单' }, { key: 'open-help', value: '弹出帮助' }], - // refreshPanelAfterChanged: true - // } - ], - setPropertyRelates(changeObject: PropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'usageMode': { - if (openModalPropConfigs && openModalPropConfigs.length) { - openModalPropConfigs.forEach(config => { - config.hide = propertyData.usageMode !== 'open-modal'; - }); - } - if (changeObject.propertyValue === 'open-help') { - self.needOpenHelpMap.set(propertyData.id, propertyData); - } else { - self.needOpenHelpMap.delete(propertyData.id); - } - break; - } - case 'visible': case 'disable': { - // self.addNewVariableToViewModelAfterPropertyChanged(changeObject, viewModelId); - } - } - } - }; - } - - // 事件编辑器集成 - getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod && self.triggerModalSave) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - self.triggerModalSave(); - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - } - }; - } - - - private getOpenModalPropConfigs(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig[] { - const self = this; - const domServ = new DomService(); - return [{ - categoryId: 'openModal', - categoryName: '表单配置', - hide: propertyData.usageMode !== 'open-modal', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition === 'gridFieldEditor' ? 'editor.modalConfig' : 'modalConfig', - properties: [ - { - propertyID: 'modalCmp', - propertyName: '弹出表单', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { containerType: DgControl.ModalContainer.type, containerId: propertyData.id, relativePath: this.formBasicService.formMetaBasicInfo.relativePath, name: this.formBasicService.formMetaBasicInfo.name }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - domServ.deleteExternalComponent(oldValue); // 清空外部组件的声明节点 - } - }, - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - sourceMetadataId: propertyData.formId, - viewModelId, - binding: { - type: 'Form' - }, - sourceMetadataType: 'form', - sourceMetadataName: '弹出表单' - }, - converter: new MappingConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.modalConfig || !propertyData.modalConfig.formId) { - return { result: false, message: '请先选择弹出表单!' }; - } - // 取弹出表单和绑定的最新值 - this.editorParams.helpId = propertyData.modalConfig.formId; - return { result: true, message: '' }; - } - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'modalCmp': { - propData.component = parameters ? parameters.component : ''; - propData.formId = parameters ? parameters.uri : ''; - propData.mapFields = ''; - break; - } - } - } - }, - { - categoryId: 'modalConfig', - categoryName: '弹出窗口配置', - hide: propertyData.usageMode !== 'open-modal', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition === 'gridFieldEditor' ? 'editor.modalConfig' : 'modalConfig', - properties: [ - { - propertyID: 'showHeader', - propertyName: '显示标题栏', - propertyType: 'boolean' - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showCloseButton', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showMaxButton', - propertyName: '显示最大化按钮', - propertyType: 'boolean', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'height', - propertyName: '高度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'showFooterButtons', - propertyName: '显示底部按钮区', - propertyType: 'boolean' - }, - { - propertyID: 'footerButtons', - propertyName: '按钮组', - propertyType: 'modal', - visible: propertyData.modalConfig && propertyData.modalConfig.showFooterButtons, - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '工具栏编辑器', - viewModelId, - idKey: 'id', - textKey: 'text', - maxCascadeLevel: 1, - controlType: DgControl.ToolBarItem.type, - defaultControlValue: { - id: 'toolbarItem', - text: '按钮', - appearance: { - class: 'btn' - } - }, - getPropertyConfig: (selectedNode) => this.getPropertyConfig(viewModelId, false, selectedNode), - beforeSave: () => this.beforeToolbarSaved(propertyData.parent && propertyData.parent.id, viewModelId) - } - } - - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.category === 'header') { - p.visible = changeObject.propertyValue; - } - }); - - break; - } - case 'showFooterButtons': { - const footerButtons = this.properties.find(p => p.propertyID === 'footerButtons'); - if (footerButtons) { - footerButtons.visible = changeObject.propertyValue; - } - } - } - } - }]; - } - - - - /** - * 按钮使用模式切换为弹出帮助 - */ - public handleOpenHelpMode(propertyData: any, parentNodeId: string, viewModelId: string) { - if (!parentNodeId) { - return; - } - const parentContainer = this.domService.domDgMap.get(parentNodeId); - const hiddenContainerId = propertyData.id + '-hidden-container'; - - // 1、增加隐藏区域,并默认创建一个帮助控件 - if (parentContainer.contents.find(c => c.id === hiddenContainerId)) { - return; - } - const helpControlId = propertyData.id + '-lookup-edit'; - const hiddenContainerMetadata = this.controlService.getControlMetaData(DgControl.HiddenContainer.type); - const helpMetadata = this.controlService.getControlMetaData(DgControl.LookupEdit.type); - helpMetadata.id = helpControlId; - helpMetadata.title = (propertyData.text || '') + '弹出帮助'; - - Object.assign(hiddenContainerMetadata, { - id: hiddenContainerId, - contents: [helpMetadata] - }); - - parentContainer.contents.push(hiddenContainerMetadata); - - - // 2、按钮默认绑定弹出帮助事件 - this.addOpenHiddenHelpCommand(propertyData, helpControlId, viewModelId); - - - this.notifyService.success('隐藏帮助控件创建成功,控件ID:' + helpControlId); - - } - - private addOpenHiddenHelpCommand(propertyData: any, helpControlId: string, viewModelId: string) { - // 1、配置构件 - const webcmds = this.domService.getWebCmds(); - if (!webcmds) { - return; - } - const batchCmdId = '43f68561-eae4-4495-b318-d629615523f8'; - const openHiddenHelpCmdId = this.idService.generate(); - const openHiddenHelpCmdCode = propertyData.id.replace(/-/g, '').replace(/_/g, '') + 'openHiddenHelp'; - - const batchCmd = webcmds.find(c => c.id === batchCmdId); - if (!batchCmd) { - webcmds.push({ - id: batchCmdId, - path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd/data-commands', - name: 'BatchEditCommands.webcmd', - refedHandlers: [ - { - host: openHiddenHelpCmdId, - handler: 'openHiddenHelp' - } - ] - }); - } else { - batchCmd.refedHandlers.push( - { - host: openHiddenHelpCmdId, - handler: 'openHiddenHelp' - } - ); - } - - // 2、配置命令 - const vm = this.domService.getViewModelById(viewModelId); - if (!vm.commands) { - vm.commands = []; - } - vm.commands.push( - { - id: openHiddenHelpCmdId, - code: openHiddenHelpCmdCode, - name: (propertyData.text || '') + '打开隐藏帮助', - params: [ - { - name: 'helpId', - shownName: '帮助Id', - value: helpControlId, - description: '帮助Id' - } - ], - handlerName: 'openHiddenHelp', - cmpId: batchCmdId, - shortcut: {}, - extensions: [] - } - ); - - // 3、按钮点击事件绑定打开帮助的命令 - propertyData.click = openHiddenHelpCmdCode; - - - // 涉及到新增控制器,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - } - - - /** - * 使用模式切换为弹出帮助的按钮,需要创建隐藏区域 - * @param parentNodeId 按钮的父级容器id - * @param viewModelId 视图模型id - */ - beforeToolbarSaved(parentNodeId: string, viewModelId: string) { - - if (parentNodeId && this.needOpenHelpMap.size > 0) { - this.needOpenHelpMap.forEach(itemPropertyData => { - this.handleOpenHelpMode(itemPropertyData, parentNodeId, viewModelId); - }); - - } - } - - - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - private addNewVariableToViewModelAfterPropertyChanged(changeObject: FormPropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - // tslint:disable-next-line:max-line-length - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id !== newVar.id)) { - viewModel.states.push(newVar); - } - } - - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/schema/schema.ts deleted file mode 100644 index bf528ce543b3e15544eeba5df3d76301f2de7699..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/schema/schema.ts +++ /dev/null @@ -1,28 +0,0 @@ - -const ToolBarItemSchema: ToolBarItemType = { - id: 'toolBarItem', - type: 'ToolBarItem', - appearance: null, - disable: false, - text: '按钮', - items: [], - visible: true, - click: '', - usageMode: 'button', - modalConfig: null -}; - -interface ToolBarItemType { - id: string; - type: string; - appearance: object | null; - disable: boolean; - text: string; - items: Array | null; - visible: boolean; - click: string | null; - usageMode: string; - modalConfig: object | null; -} - -export { ToolBarItemSchema, ToolBarItemType }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/form.ts deleted file mode 100644 index f79dc3fffac7656fb87ad89c274601f8cd6ba10e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/form.ts +++ /dev/null @@ -1,103 +0,0 @@ -import ToolBarItemComponent from '../component/fd-toolbar-item'; - -const childHierarchy = ` -
    - - 新增子级 -
    -`; -const sameHierarchy = ` -
    - - 新增同级 -
    -`; -// 二级按钮支持上移下移,不支持拖拽 -const moveUpAndDown = (ctx) => { - if (!ctx.isChildOfButton || !ctx.instance.parent) { - return ''; - } - const siblingItems = ctx.instance.parent.items; - const currentIndex = siblingItems.findIndex(item => item.id === ctx.component.id); - const isFirstBtn = currentIndex === 0; - const isLastBtn = currentIndex === siblingItems.length - 1; - let moveTpl = ''; - - if (!isLastBtn) { - moveTpl += ` -
    - -
    `; - } - - if (!isFirstBtn) { - moveTpl += ` -
    - -
    `; - } - - return moveTpl; -}; - -const buttonList = (ctx) => { - const list = ctx.toolBarItemList.map((i: ToolBarItemComponent) => ` - ${i.render()} - `); - - if (list && list.length) { - const cascadeStyle = ctx.popDirection === 'top' ? 'top: auto;bottom: 100%;margin-top: 0;margin-bottom: 0.25rem;' : 'margin-top:3px;'; - return ` - -
    - ${list.join('')} -
    - `; - } - return ''; -}; - -export default (ctx: any) => { - const item = ctx.component; - const icon = item.icon && item.icon.iconName ? `` : ''; - - let btnCls = 'farris-component position-relative btn f-rt-btn f-btn-ml '; - btnCls += item.appearance && item.appearance.class ? item.appearance.class : ' btn-secondary '; - btnCls += item.disable === true ? ' disabled' : ''; - btnCls += item.icon && item.icon.iconName ? ' btn-icontext' : ''; - const popDirectionCls = ctx.popDirection === 'top' ? ' dropup' : ''; - - return ` -
    -
    - ${ctx.showMenuInToolbarItem ? ` -
    -
    - -
    -
    - -
    - ${ctx.isChildOfToolBar ? childHierarchy : ''} - ${ctx.isChildOfButton ? `${moveUpAndDown(ctx)}${sameHierarchy}` : ''} -
    - `: - ''} - -
    - - - ${buttonList(ctx)} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/index.ts deleted file mode 100644 index 0f600761e8a0c2865243b2c84b3c7e8482e9cc53..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import form from './form'; -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/utils/children.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/utils/children.ts deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/utils/dynamic-tool.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/utils/dynamic-tool.ts deleted file mode 100644 index 0a1fdad14db945199e01b7457d3df7cb51f042a4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbaritem/templates/utils/dynamic-tool.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default (ctx) => { - const { top, left, right, bottom } = ctx; - const container = document.createElement('div'); - container.classList.add('position-absolute', 'component-btn-group'); - container.id = 'dynamic-component__tool'; - const tool = - ` -
    - -
    - ${ctx.isChildOfButton ? '' : - `
    - -
    ` - } -
    - -
    - `; - container.innerHTML = tool; - document.body.appendChild(container); - return container; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbarmore/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbarmore/property/property-config.ts deleted file mode 100644 index 262fa961157377a0e5c4180ea8a2ad40eea6295a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/component/toolbarmore/property/property-config.ts +++ /dev/null @@ -1,555 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { Injectable, Injector } from '@angular/core'; -import { ControlService } from '../../../../../../service/control.service'; -import { IdService } from '@farris/ui-common'; -import { NotifyService } from '@farris/ui-notify'; -import { EventEditorService, DomService, FormBasicService, WebCmdService, UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent, CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent, IconSelectEditorComponent } from '@farris/designer-devkit'; -import { ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; -import { SelectMappingComponent, MappingConverter } from '@farris/designer-devkit'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; - -export class ToolBarMoreProp { - - needOpenHelpMap = new Map(); - - private controlService: ControlService; - private domService: DomService; - private idService: IdService; - private notifyService: NotifyService; - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - //事件编辑器集成 - public webCmdService: WebCmdService; - - constructor(private injector: Injector) { - - this.controlService = this.injector.get(ControlService); - this.domService = this.injector.get(DomService); - this.eventEditorService = this.injector.get(EventEditorService); - this.formBasicService = this.injector.get(FormBasicService); - this.webCmdService = this.injector.get(WebCmdService); - this.idService = this.injector.get(IdService); - this.notifyService = this.injector.get(NotifyService); - } - - /** - * toolbarItem 属性配置 - * @param viewModelId 按钮所在视图模型ID - * @param disableChildItem 是否禁用子级按钮 - * @param selectedNode 当前选中行数据 - */ - public getPropertyConfig(viewModelId: string, propertyData: any, disableChildItem = true) - : ElementPropertyConfig[] { - // public getPropertyConfig(viewModelId: string, disableChildItem: boolean, propertyData: any, isFirstLevel: boolean) - // : ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - propertyConfig.push(basicPropConfig); - - // 弹出表单框属性(目前未验证) - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, viewModelId); - - // 外观属性 - const appearancePropConfig = this.getAppearanceItemPropConfig(propertyData, viewModelId, disableChildItem, - openModalPropConfigs, true); - propertyConfig.push(appearancePropConfig); - // 行为属性 - const behaviorPropConfig = this.getBehaviorItemPropConfig(propertyData, viewModelId, openModalPropConfigs); - propertyConfig.push(behaviorPropConfig); - propertyConfig.push(...openModalPropConfigs); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - private getBasicPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '工具栏按钮的标识' - }, - { - propertyID: 'text', - propertyName: '标签', - propertyType: 'string', - description: '工具栏按钮的标签', - readonly: false - } - ] - }; - } - - private getAppearanceItemPropConfig( - propertyData: any, viewModelId: string, disableChildItem: boolean, openModalPropConfigs: ElementPropertyConfig[], - isFirstLevel: boolean): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: '按钮样式', - propertyType: 'string', - description: '工具栏按钮样式' - }, - { - propertyID: 'dropdownCls', - propertyName: '下拉框样式', - propertyType: 'string', - description: '工具栏按钮下拉框样式', - visible: !disableChildItem - } - ] - }, - { - propertyID: 'split', - propertyName: '下拉按钮分离', - propertyType: 'boolean', - defaultValue: false, - description: '工具栏按下拉按钮是否分离', - visible: !disableChildItem - }, - { - propertyID: 'icon', - propertyName: '图标', - propertyType: 'modal', - description: '图标设置', - editor: IconSelectEditorComponent, - editorParams: { needIconClass: true }, - visible: isFirstLevel - }, - { - propertyID: 'tipsEnable', - propertyName: '启用提示', - propertyType: 'boolean', - description: '是否启用提示信息', - defaultValue: false - }, - { - propertyID: 'tipsText', - propertyName: '提示消息内容', - propertyType: 'modal', - description: '提示消息内容设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.tipsEnable - } - ], - setPropertyRelates(changeObject: PropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'tipsEnable': { - const tipsText = this.properties.find(p => p.propertyID === 'tipsText'); - if (tipsText) { - tipsText.visible = changeObject.propertyValue; - } - } - } - } - }; - } - - private getBehaviorItemPropConfig( - propertyData: any, viewModelId: string, openModalPropConfigs: ElementPropertyConfig[]): ElementPropertyConfig { - - const self = this; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'disable', - propertyName: '禁用', - propertyType: 'editableSelect', - description: '是否禁用', - iterator: [{ key: true, value: 'true' }, { key: false, value: 'false' }] - }, - // 暂不放开使用模式,需要验证在弹出窗口里的使用模式属性 - // { - // propertyID: 'usageMode', - // propertyName: '使用模式', - // propertyType: 'select', - // iterator: [{ key: 'button', value: '按钮' }, { key: 'open-modal', value: '弹出表单' }, { key: 'open-help', value: '弹出帮助' }], - // refreshPanelAfterChanged: true - // } - ], - setPropertyRelates(changeObject: PropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'usageMode': { - if (openModalPropConfigs && openModalPropConfigs.length) { - openModalPropConfigs.forEach(config => { - config.hide = propertyData.usageMode !== 'open-modal'; - }); - } - if (changeObject.propertyValue === 'open-help') { - self.needOpenHelpMap.set(propertyData.id, propertyData); - } else { - self.needOpenHelpMap.delete(propertyData.id); - } - break; - } - } - } - }; - } - - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'click', - name: '点击事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } - - - private getOpenModalPropConfigs(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig[] { - const self = this; - const domServ = new DomService(); - return [{ - categoryId: 'openModal', - categoryName: '表单配置', - hide: propertyData.usageMode !== 'open-modal', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition === 'gridFieldEditor' ? 'editor.modalConfig' : 'modalConfig', - properties: [ - { - propertyID: 'modalCmp', - propertyName: '弹出表单', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { containerType: DgControl.ModalContainer.type, containerId: propertyData.id, relativePath: this.formBasicService.formMetaBasicInfo.relativePath, name: this.formBasicService.formMetaBasicInfo.name }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - domServ.deleteExternalComponent(oldValue); // 清空外部组件的声明节点 - } - }, - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - sourceMetadataId: propertyData.formId, - viewModelId, - binding: { - type: 'Form' - }, - sourceMetadataType: 'form', - sourceMetadataName: '弹出表单' - }, - converter: new MappingConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.modalConfig || !propertyData.modalConfig.formId) { - return { result: false, message: '请先选择弹出表单!' }; - } - // 取弹出表单和绑定的最新值 - this.editorParams.helpId = propertyData.modalConfig.formId; - return { result: true, message: '' }; - } - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'modalCmp': { - propData.component = parameters ? parameters.component : ''; - propData.formId = parameters ? parameters.uri : ''; - propData.mapFields = ''; - break; - } - } - } - }, - { - categoryId: 'modalConfig', - categoryName: '弹出窗口配置', - hide: propertyData.usageMode !== 'open-modal', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition === 'gridFieldEditor' ? 'editor.modalConfig' : 'modalConfig', - properties: [ - { - propertyID: 'showHeader', - propertyName: '显示标题栏', - propertyType: 'boolean' - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showCloseButton', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showMaxButton', - propertyName: '显示最大化按钮', - propertyType: 'boolean', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'height', - propertyName: '高度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'showFooterButtons', - propertyName: '显示底部按钮区', - propertyType: 'boolean' - }, - { - propertyID: 'footerButtons', - propertyName: '按钮组', - propertyType: 'modal', - visible: propertyData.modalConfig && propertyData.modalConfig.showFooterButtons, - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '工具栏编辑器', - viewModelId, - idKey: 'id', - textKey: 'text', - maxCascadeLevel: 1, - controlType: DgControl.ToolBarItem.type, - defaultControlValue: { - id: 'toolbarItem', - text: '按钮', - appearance: { - class: 'btn' - } - }, - getPropertyConfig: (selectedNode) => this.getPropertyConfig(viewModelId, false, selectedNode), - beforeSave: () => this.beforeToolbarSaved(propertyData.parent && propertyData.parent.id, viewModelId) - } - } - - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.category === 'header') { - p.visible = changeObject.propertyValue; - } - }); - - break; - } - case 'showFooterButtons': { - const footerButtons = this.properties.find(p => p.propertyID === 'footerButtons'); - if (footerButtons) { - footerButtons.visible = changeObject.propertyValue; - } - } - } - } - }]; - } - - - - /** - * 按钮使用模式切换为弹出帮助 - */ - public handleOpenHelpMode(propertyData: any, parentNodeId: string, viewModelId: string) { - if (!parentNodeId) { - return; - } - const parentContainer = this.domService.domDgMap.get(parentNodeId); - const hiddenContainerId = propertyData.id + '-hidden-container'; - - // 1、增加隐藏区域,并默认创建一个帮助控件 - if (parentContainer.contents.find(c => c.id === hiddenContainerId)) { - return; - } - const helpControlId = propertyData.id + '-lookup-edit'; - const hiddenContainerMetadata = this.controlService.getControlMetaData(DgControl.HiddenContainer.type); - const helpMetadata = this.controlService.getControlMetaData(DgControl.LookupEdit.type); - helpMetadata.id = helpControlId; - helpMetadata.title = (propertyData.text || '') + '弹出帮助'; - - Object.assign(hiddenContainerMetadata, { - id: hiddenContainerId, - contents: [helpMetadata] - }); - - parentContainer.contents.push(hiddenContainerMetadata); - - - // 2、按钮默认绑定弹出帮助事件 - this.addOpenHiddenHelpCommand(propertyData, helpControlId, viewModelId); - - this.notifyService.success('隐藏帮助控件创建成功,控件ID:' + helpControlId); - - } - - private addOpenHiddenHelpCommand(propertyData: any, helpControlId: string, viewModelId: string) { - // 1、配置构件 - const webcmds = this.domService.getWebCmds(); - if (!webcmds) { - return; - } - const batchCmdId = '43f68561-eae4-4495-b318-d629615523f8'; - const openHiddenHelpCmdId = this.idService.generate(); - const openHiddenHelpCmdCode = propertyData.id.replace(/-/g, '').replace(/_/g, '') + 'openHiddenHelp'; - - const batchCmd = webcmds.find(c => c.id === batchCmdId); - if (!batchCmd) { - webcmds.push({ - id: batchCmdId, - path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd/data-commands', - name: 'BatchEditCommands.webcmd', - refedHandlers: [ - { - host: openHiddenHelpCmdId, - handler: 'openHiddenHelp' - } - ] - }); - } else { - batchCmd.refedHandlers.push( - { - host: openHiddenHelpCmdId, - handler: 'openHiddenHelp' - } - ); - } - - // 2、配置命令 - const vm = this.domService.getViewModelById(viewModelId); - if (!vm.commands) { - vm.commands = []; - } - vm.commands.push( - { - id: openHiddenHelpCmdId, - code: openHiddenHelpCmdCode, - name: (propertyData.text || '') + '打开隐藏帮助', - params: [ - { - name: 'helpId', - shownName: '帮助Id', - value: helpControlId, - description: '帮助Id' - } - ], - handlerName: 'openHiddenHelp', - cmpId: batchCmdId, - shortcut: {}, - extensions: [] - } - ); - - // 3、按钮点击事件绑定打开帮助的命令 - propertyData.click = openHiddenHelpCmdCode; - - - // 涉及到新增控制器,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - - } - - - /** - * 使用模式切换为弹出帮助的按钮,需要创建隐藏区域 - * @param parentNodeId 按钮的父级容器id - * @param viewModelId 视图模型id - */ - beforeToolbarSaved(parentNodeId: string, viewModelId: string) { - - if (parentNodeId && this.needOpenHelpMap.size > 0) { - this.needOpenHelpMap.forEach(itemPropertyData => { - this.handleOpenHelpMode(itemPropertyData, parentNodeId, viewModelId); - }); - - } - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/export.ts deleted file mode 100644 index 571e262d64f82b2cd649050b2ff85b0d9a7b7f8f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/export.ts +++ /dev/null @@ -1,20 +0,0 @@ -import FdToolBarComponent from './component/fd-toolbar'; -import { ToolBarSchema } from './schema/schema'; -import FdToolBarTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; -import { IdService } from '@farris/ui-common'; - - -export const ToolBar: ComponentExportEntity = { - type: 'ToolBar', - component: FdToolBarComponent, - template: FdToolBarTemplates, - metadata: ToolBarSchema, - uniqueMedataItems: (metadata) => { - if (metadata.items && metadata.items.length) { - metadata.items.forEach(m => m.id = 'toolbarItem-' + new IdService().generate().slice(0, 4)); - } - } -}; - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/property/property-config.ts deleted file mode 100644 index 87da293b6a48fc4341534e55ff34d82b515abc64..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/property/property-config.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { CommandUsualProp } from '../../common/property/command-property-config'; - -export class ToolBarProp extends CommandUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - return this.propertyConfig; - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const baseAppearanceInfo = this.getCommonAppearanceProperties() as PropertyEntity[]; - const buttonInfo = [ - { - propertyID: 'buttonSize', - propertyName: '按钮标准', - propertyType: 'select', - iterator: [ - { key: 'default', value: '标准' }, - { key: 'lg', value: '大号' }, - ] - }, - { - propertyID: 'popDirection', - propertyName: '弹出方向', - propertyType: 'select', - iterator: [ - { key: 'default', value: '默认' }, - { key: 'top', value: '向上' }, - { key: 'bottom', value: '向下' }, - ] - }, - ]; - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [...baseAppearanceInfo, ...buttonInfo], - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/schema/schema.ts deleted file mode 100644 index cc3d940c74ca15cdc7b1fde41cafe6e48de92ea8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/schema/schema.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { ToolBarItemType } from '../component/toolbaritem/schema/schema'; - -const ToolBarSchema = { - id: 'toolBar', - type: 'ToolBar', - appearance: { - class: 'f-toolbar' - }, - size: null, - items: [], - visible: true, - buttonSize: 'default', - popDirection: 'default' -}; - -interface ToolBarType { - id: string; - type: string; - appearance: Appearance; - size: object | null; - items?: ToolBarItemType[]; - contents?: any[]; - visible: boolean; - buttonSize: string; - popDirection: string; -} - -interface Appearance { - class?: string; -} - -export { ToolBarSchema, ToolBarType }; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/form.ts deleted file mode 100644 index 23c57f4184fa0a2c4ddd1f7da3ff0d7c2e27318b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/form.ts +++ /dev/null @@ -1,14 +0,0 @@ -import ToolBarItemComponent from '../component/toolbaritem/component/fd-toolbar-item'; -export default (ctx: any) => { - const buttons = ctx.toolBarItemList.map((toolBarItemInstance: ToolBarItemComponent) => toolBarItemInstance.render()); - const contentEndCls = ctx.justifyContentEnd ? 'justify-content-end' : ''; - return ` -
    -
    -
    - ${buttons.join('')} -
    -
    -
    `; -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/index.ts deleted file mode 100644 index 0f600761e8a0c2865243b2c84b3c7e8482e9cc53..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/toolbar/templates/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import form from './form'; -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/component/fd-view-change.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/component/fd-view-change.ts deleted file mode 100644 index 089e321b31132f5cb00b5988cb74ad755ae2bfa4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/component/fd-view-change.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { ViewChangeSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ViewChangeProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdCommandBaseComponent from '../../common/commandBase/commandBase'; -export default class ViewChangeComponent extends FdCommandBaseComponent { - // 当前选中的项 - activeTypeItem; - // 标识当前的legend - get viewChangeKey(): string { - return `viewChange-${this.key}`; - } - // 查找formParent - private formParent = null; - private viewItems = null; - component; - constructor(component: any, options: any) { - super(component, options); - this.applyClassToComponent = false; - } - - - - getDefaultSchema(): any { - - return ViewChangeSchema; - } - - getComponentAttributes() { - return { - viewchange: this.component.viewGroupIdentify - }; - } - - // 初始化 - init(): void { - this.initActiveItem(this.component.currentTypeInDesignerView || this.component.defaultType); - super.init(); - } - - // 渲染 - render(): any { - return super.render(this.renderTemplate('ViewChange', { - component: this.component, - getViewChangeStr: () => this.getViewChangeStr(), - viewChangeKey: this.viewChangeKey - })); - } - - // 绑定事件 - attach(element: HTMLElement): Promise { - this.loadRefs(element, { - [this.viewChangeKey]: 'single' - }); - - const superAttach = super.attach(element); - // 平铺 - if (this.component.viewType == 'tile') { - const tileBtns = this.refs[this.viewChangeKey].querySelectorAll('.f-view-change-tile-btn'); - tileBtns.forEach(tileBtn => { - this.addEventListener(tileBtn, 'click', (event) => { - event.stopPropagation(); - this.viewChangeBtnClick(tileBtn); - this.redraw(); - }); - }); - - } else if (this.component.viewType == 'dropdown') { - //下拉 - // 展开收起下拉面板 - const viewDropdown = this.refs[this.viewChangeKey].querySelector('.f-view-change-dropdown'); - const viewDroppanel = this.refs[this.viewChangeKey].querySelector('.f-view-change-typelist'); - // 按钮 - const listItems = this.refs[this.viewChangeKey].querySelectorAll('.typelist-item'); - listItems.forEach(tileBtn => { - this.addEventListener(tileBtn, 'click', (event) => { - event.stopPropagation(); - this.viewChangeBtnClick(tileBtn); - viewDroppanel.style.display = 'none'; - this.redraw(); - }); - }); - this.addEventListener(viewDropdown, 'mouseenter', (event) => { - event.stopPropagation(); - viewDroppanel.style.display = 'block'; - }); - this.addEventListener(viewDropdown, 'mouseleave', (event) => { - event.stopPropagation(); - viewDroppanel.style.display = 'none'; - }); - } - // this.attachViewChange(); - return superAttach; - } - /** - * - * @param tileBtn - */ - private viewChangeBtnClick(tileBtn) { - const activeType = tileBtn.getAttribute('viewChange'); - if (activeType !== this.activeTypeItem.type) { - this.changeRelatedViewItem(activeType); - this.initActiveItem(activeType); - } - } - - /** - * 点击按钮,触发view change操作 - */ - private changeRelatedViewItem(viewChangeType: string) { - this.findFormParent(); - const multiViewContainerEle = this.formParent.querySelector('.farris-component-MultiViewContainer[viewchange=' + this.component.viewGroupIdentify + ']'); - if (!multiViewContainerEle) { - return; - } - const multiViewContainerInstance = multiViewContainerEle.componentInstance; - if (!multiViewContainerInstance || !multiViewContainerInstance.updateCurrentViewItem) { - return; - } - multiViewContainerInstance.updateCurrentViewItem(viewChangeType); - } - - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ViewChangeProp = new ViewChangeProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['viewType', 'toolbarData', 'defaultType']); - } - - /** - * 查找form父元素 - */ - private findFormParent() { - if (this.formParent) { - return; - } - this.formParent = OperateUtils.getFormParent(this.element); - } - /** - * 当前选中行设置 - */ - initActiveItem(activeType) { - if (this.component.toolbarData && this.component.toolbarData.length > 0) { - if (activeType) { - const item = this.component.toolbarData.find((bar) => { - return bar['type'] === activeType; - }); - this.activeTypeItem = item; - } - if (!this.activeTypeItem) { - this.activeTypeItem = this.component.toolbarData[0]; - } - - this.component.currentTypeInDesignerView = activeType; - } - } - /** - * 获取view chagne的字符串 - */ - getViewChangeStr() { - return OperateUtils.getViewChangeStr(this.component.toolbarData, this.component.viewType, this.activeTypeItem); - } - - checkCanDeleteComponent(): boolean { - return false; - } - - checkCanMoveComponent(): boolean { - return false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/export.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/export.ts deleted file mode 100644 index 4acc3cc791ad890c467ab7426c0e64993d5de57f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdViewChangeComponent from './component/fd-view-change'; -import { ViewChangeSchema } from './schema/schema'; -import FdViewChangeTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; - - -export const ViewChange: ComponentExportEntity = { - type: 'ViewChange', - component: FdViewChangeComponent, - template: FdViewChangeTemplates, - metadata: ViewChangeSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/property/property-config.ts deleted file mode 100644 index 11533675e8e44b89223cb8238d2cd6ba58839a30..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/property/property-config.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CommandUsualProp } from '../../common/property/command-property-config'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class ViewChangeProp extends CommandUsualProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'changeMethod', - propertyName: '切换方式', - propertyType: 'select', - description: '切换方式选择', - iterator: [{ key: 'display', value: '显示隐藏' }, { key: 'route', value: '路由' }], - readonly: true - }, - { - propertyID: 'viewType', - propertyName: '视图按钮排列方式', - propertyType: 'select', - description: '视图按钮排列方式设置', - iterator: [{ key: 'tile', value: '平铺' }, { key: 'dropdown', value: '下拉选择' }] - }, - { - propertyID: 'toolbarData', - propertyName: '视图按钮组', - propertyType: 'modal', - description: '视图按钮组设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'type', title: '类型', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'title', title: '名称', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'iconName', title: '图标样式', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['type', 'title', 'iconName'], - uniqueFields: ['type', 'title'], - modalTitle: '视图按钮编辑器' - }, - converter: new ItemCollectionConverter(), - visible: propertyData.changeMethod !== 'display' - }, - { - propertyID: 'defaultType', - propertyName: '默认显示的视图类型', - propertyType: 'select', - description: '默认显示的视图类型设置', - iterator: this.getViewChangeDataTypes(propertyData) - },], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - if (changeObject.propertyID === 'toolbarData') { - const defaultProp = this.properties.find(p => p.propertyID === 'defaultType'); - if (defaultProp) { - defaultProp.iterator = self.getViewChangeDataTypes(data); - } - } - } - }; - } - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = []; - eventList = self.switchEvents(propertyData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - }; - } - private switchEvents(propertyData, eventList) { - if (propertyData.changeMethod !== 'display') { - const eventListExist = eventList.find(eventListItem => eventListItem.label == 'toolTypeChange') - if (eventListExist === undefined) { - eventList.push( - { - label: 'toolTypeChange', - name: '视图类型切换事件' - } - ); - } - return eventList; - } - - eventList = eventList.filter(eventListItem => eventListItem.label !== 'toolTypeChange'); - return eventList; - } - - private getViewChangeDataTypes(propData: any) { - - if (!propData || !propData.toolbarData || propData.toolbarData.length === 0) { - return []; - } - const iterators = []; - propData.toolbarData.forEach(data => { - iterators.push( - { - key: data.type, - value: data.title - } - ); - }); - return iterators; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/schema/schema.ts deleted file mode 100644 index 550a82996a2d23f46e1fcd2cac399eea2281e72e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/schema/schema.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const ViewChangeSchema = { - id: '', - type: 'ViewChange', - defaultType: '', - changeMethod: 'display', - viewType: 'dropdown', - toolbarData: [], - toolTypeChange: null, - visible: true, -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/form.ts deleted file mode 100644 index 2939beb38c0cc387edcc597693e074323454c3b2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export default (ctx: any) => { - return `
    - ${ctx.getViewChangeStr()} -
    `; -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/command/view-change/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/common/containerBase/containerBase.ts b/packages/designer/projects/designer-ui/src/lib/components/container/common/containerBase/containerBase.ts deleted file mode 100644 index a36513b2631cd02145d1e899f9f1bba49165d26a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/common/containerBase/containerBase.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { ComponentResolveContext, DesignerEnvType, DomService, FormBasicService, FormComponentType } from '@farris/designer-services'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdContainerBaseComponent extends FarrisDesignBaseNestedComponent { - envType: DesignerEnvType; - - constructor(component: any, options: any) { - super(component, options); - - // 组件所属分类为“容器” - this.category = 'container'; - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - let dynamicPropertyIDs = ['appearance.class', 'appearance.style', 'size.width', 'size.height', 'inlineStyle']; - if (propertyIDs) { - dynamicPropertyIDs = dynamicPropertyIDs.concat(propertyIDs); - } - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - } - /** - * 判断是否可以接收拖拽新增的子级控件,容器类通用的条件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - - const result = this.canAccept(sourceElement, targetElement); - - return result.canAccepts; - - } - - /** - * 判断容器类通用的条件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccept(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement) { - - const serviceHost = this.options.designerHost; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this) as ComponentResolveContext; - - const targetCmpInstance = targetElement && targetElement.componentInstance; - - const domService = serviceHost.getService('DomService') as DomService; - const cmp = domService.getComponentById(this.componentId); - const componentType = cmp.componentType; - - // 实体树拖拽的实体节点,只能放在跟组件 - if (resolveContext.sourceType === 'entity') { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - } - - // 工具箱中需要绑定实体的控件,只能放在根组件中。 - if (resolveContext.sourceType === 'control' && resolveContext.controlCategory === 'dataCollection') { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - } - - // Component 类只能放在根组件中 - if (resolveContext.controlType === DgControl.Component.type) { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - // DataGrid、TreeGrid、ListView的Component组件 只能放在TabPage/Section里 - if (sourceElement.componentInstance) { - const cmpType = sourceElement.componentInstance.component.componentType || ''; - const restrictCollection = [FormComponentType.dataGrid, FormComponentType.listView, 'ListView']; - if (restrictCollection.includes(cmpType)) { - const parentAllowedDataGrid = [DgControl.Tab.type, DgControl.Section.type, DgControl.Splitter.type, DgControl.ResponseLayoutItem.type]; - if (!parentAllowedDataGrid.includes(targetCmpInstance.type)) { - return { resolveContext, canAccepts: false }; - } - } - } - } - - // 除布局容器外,不接收输入类控件 - if (resolveContext.controlCategory === 'input' && targetCmpInstance && targetCmpInstance.type !== DgControl.ResponseLayoutItem.type) { - return { resolveContext, canAccepts: false }; - - } - // 不接收分组FieldSet - if (resolveContext.controlType === DgControl.FieldSet.type) { - return { resolveContext, canAccepts: false }; - } - - // DataGrid只能放在TabPage/Section/ResponseLayoutItem里。 - if (resolveContext.controlType === DgControl.DataGrid.type) { - - const parentAllowedDataGrid = [DgControl.Tab.type, DgControl.Section.type, DgControl.Splitter.type, DgControl.ResponseLayoutItem.type]; - // 零代码场景下允许工具箱中的DataGrid放在ContentContainer中,会自动在DataGrid组件父级补充Container-Section两层结构 - if (this.envType === DesignerEnvType.noCode && resolveContext.sourceType === 'control') { - parentAllowedDataGrid.push(DgControl.ContentContainer.type); - } - if (!parentAllowedDataGrid.includes(targetCmpInstance.type)) { - return { resolveContext, canAccepts: false }; - } - - } - // TreeGrid、ListView 只能放在TabPage/Section/ResponseLayoutItem里 - if (targetCmpInstance) { - const targetCmpType = targetCmpInstance.type; - const restrictCollection = [DgControl.TreeGrid.type, DgControl.ListView.type]; - - if (restrictCollection.includes(resolveContext.controlType)) { - const parentAllowedDataGrid = [DgControl.Tab.type, DgControl.Section.type, DgControl.Splitter.type, DgControl.ResponseLayoutItem.type]; - if (!parentAllowedDataGrid.includes(targetCmpType)) { - return { resolveContext, canAccepts: false }; - } - } - - } - // 区块容器只能放在带有f-page-main样式的容器里 - if (resolveContext.sourceType === 'control' && resolveContext.controlType === DgControl.ContentContainer.type) { - if (resolveContext.controlFeature) { - const feature = JSON.parse(resolveContext.controlFeature); - if (feature.isLikeCardContainer && !this.checkIfPageMainContentContainer(targetCmpInstance)) { - return { resolveContext, canAccepts: false }; - } - } - - - } - - // 标签页区域、分组面板只能放在根组件的ContentContainer中 - if (resolveContext.controlType === DgControl.Tab.type || resolveContext.controlType === DgControl.Section.type) { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - if (![DgControl.ContentContainer.type, DgControl.Splitter.type, DgControl.ResponseLayoutItem.type].includes(targetCmpInstance.type)) { - return { resolveContext, canAccepts: false }; - } - } - - // 布局容器只能放在根组件中 - if (resolveContext.controlType === DgControl.ResponseLayout.type) { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - } - - - - // 工具箱中的模板类控件 - if (resolveContext.controlCategory === 'componentTemplate' && resolveContext.controlTemplate) { - const controlTemplateCategory = resolveContext.controlTemplate.templateCategory; - if (controlTemplateCategory === 'input' && targetCmpInstance && targetCmpInstance.type !== DgControl.ResponseLayoutItem.type) { - return { resolveContext, canAccepts: false }; - } - if (controlTemplateCategory === 'container') { - if (componentType !== FormComponentType.Frame && componentType !== FormComponentType.modalFrame) { - return { resolveContext, canAccepts: false }; - } - } - - - } - - return { resolveContext, canAccepts: true }; - - } - - private checkIfPageMainContentContainer(targetCmpInstance: any) { - if (!targetCmpInstance || targetCmpInstance.type !== DgControl.ContentContainer.type || !targetCmpInstance.component) { - return false; - } - const cls = targetCmpInstance.component.appearance && targetCmpInstance.component.appearance.class || ''; - if (cls.includes('f-page-main')) { - return true; - } - return false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/common/property/container-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/common/property/container-property-config.ts deleted file mode 100644 index 64a530670aeb0ffea6c06ce78c9c027598e7b7a4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/common/property/container-property-config.ts +++ /dev/null @@ -1,140 +0,0 @@ - -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; - -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { EventEditorService, DomService, FormBasicService, RefreshFormService, WebCmdService, StateMachineService, UniformEditorDataUtil } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; -import { IdService } from '@farris/ui-common'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NotifyService } from '@farris/ui-notify'; -import { Injector } from '@angular/core'; - -export class ContainerUsualProp { - public formBasicService: FormBasicService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - public idService: IdService; - public stateMachineService: StateMachineService; - public eventEditorService: EventEditorService; - public notifyService: NotifyService; - - constructor(public serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.domService = serviceHost.getService('DomService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.idService = new IdService(); - this.stateMachineService = serviceHost.getService('StateMachineService'); - const injector = serviceHost.getService('Injector') as Injector; - this.notifyService = injector.get(NotifyService); - } - - getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - } - ] - }; - } - - - getCommonAppearanceProperties(propertyData?: any): PropertyEntity[] { - if (propertyData) { - propertyData.appearance = propertyData.appearance ? propertyData.appearance : { class: '', style: '' }; - } - return [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string', - description: '组件的CSS样式' - }, - { - propertyID: 'style', - propertyName: 'style样式', - propertyType: 'modal', - description: '组件的内容样式', - editor: StyleEditorComponent, - showClearButton: true - } - ] - } - ]; - - } - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - }, - - } - }; - } - - - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - addNewVariableToViewModelAfterPropertyChanged(changeObject: FormPropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - // tslint:disable-next-line:max-line-length - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id !== newVar.id)) { - viewModel.states.push(newVar); - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/common/property/nocode-container-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/common/property/nocode-container-property-config.ts deleted file mode 100644 index 1d32e43d11f75b5dccbb687cf87199cfbaad3ae1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/common/property/nocode-container-property-config.ts +++ /dev/null @@ -1,136 +0,0 @@ - -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { EventEditorService, DomService, FormBasicService, RefreshFormService, WebCmdService, StateMachineService, UniformEditorDataUtil } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; -import { IdService } from '@farris/ui-common'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class NoCodeContainerUsualProp { - public formBasicService: FormBasicService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - public idService: IdService; - public stateMachineService: StateMachineService; - public eventEditorService: EventEditorService; - - constructor(public serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.domService = serviceHost.getService('DomService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.idService = new IdService(); - - this.stateMachineService = serviceHost.getService('StateMachineService'); - } - - getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - // { - // propertyID: 'id', - // propertyName: '标识', - // propertyType: 'string', - // description: '组件的id', - // readonly: true - // }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - } - ] - }; - } - - - getCommonAppearanceProperties(): PropertyEntity[] { - - return [ - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - } - ]; - - } - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - }, - - } - }; - } - - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - addNewVariableToViewModelAfterPropertyChanged(changeObject: FormPropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - // tslint:disable-next-line:max-line-length - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id !== newVar.id)) { - viewModel.states.push(newVar); - } - } - - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/component/fd-component-ref.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/component/fd-component-ref.ts deleted file mode 100644 index 0d5b8dffb2553251558df197ff5407a8ca3ba1de..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/component/fd-component-ref.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ComponentRefSchema } from '../schema/schema'; -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { ComponentSchema } from '@farris/designer-element'; -import { omit } from 'lodash-es'; -import { DomService, DesignViewModelService } from '@farris/designer-services'; - -export default class FdComponentRefComponent extends FarrisDesignBaseNestedComponent { - - component; - - /** 实际的组件JSON Schema */ - componentSchemaNode: ComponentSchema; - - /** 实际的组件实例 */ - childComponentInstance = []; - - constructor(component: any, options: any) { - super(component, options); - } - - - getDefaultSchema(): any { - return ComponentRefSchema; - } - /** - * 只返回引用节点相关属性 - */ - getSchema(): any { - const completeSchema: any = super.getSchema(); - return omit(completeSchema, 'contents'); - } - - - getTemplateName(): string { - return 'Component'; - } - - - - init(): void { - this.components = []; - if (this.options.childComponents && this.options.childComponents.length) { - this.componentSchemaNode = this.options.childComponents.find(c => c.id === this.component.component); - if (this.componentSchemaNode) { - const instance: any = this.createComponent( - this.componentSchemaNode, - this.options, - this.componentSchemaNode.id, - this.componentSchemaNode.viewModel); - - this.childComponentInstance.push(instance); - } - } - } - render(): any { - // 只渲染实际的组件节点,不渲染组件引用节点 - if (this.childComponentInstance.length) { - return this.renderComponents(this.childComponentInstance); - } - - } - - - - attach(element: any): any { - - const superAttach: any = super.attach(element); - - // 只渲染实际的组件节点,不渲染组件引用节点 - if (this.childComponentInstance.length) { - this.childComponentInstance[0].attach(this.element); - } - - return superAttach; - } - - - /** - * 删除组件的回调方法:用于移除配套的Component和ViewModel - */ - onRemoveComponent() { - super.onRemoveComponent(); - const serviceHost = this.options.designerHost; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - const domService = serviceHost.getService('DomService') as DomService; - - if (this.childComponentInstance.length) { - dgViewModelService.deleteViewModelById(this.childComponentInstance[0].component.viewModel); - } - - domService.deleteComponent(this.component.component); - } - - getControlShowName() { - return ''; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/export.ts deleted file mode 100644 index 64927524dda3e7b4dc5d73057964d1d531621004..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdComponentRefComponent from './component/fd-component-ref'; -import { ComponentRefSchema } from './schema/schema'; - -import FdComponentRefTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; - - -export const ComponentRef: ComponentExportEntity = { - type: 'ComponentRef', - component: FdComponentRefComponent, - template: FdComponentRefTemplates, - metadata: ComponentRefSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/schema/schema.ts deleted file mode 100644 index 40c469fa72e77108ff0f3ee06b0cfb03a82e25ab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/schema/schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const ComponentRefSchema = { - id: '', - type: 'ComponentRef', - component: '', - visible: true -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/form.ts deleted file mode 100644 index 0a7494b4f0d59d69b68ae362e7b241023f565966..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/form.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (ctx: any) => { - return ctx.childComponent; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component-ref/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/component/fd-component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/component/fd-component.ts deleted file mode 100644 index f74e6ec8c7edf941b82757fe64ab52b804afaff9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/component/fd-component.ts +++ /dev/null @@ -1,400 +0,0 @@ -import { ComponentSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ComponentProp } from '../property/property-config'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { RowNode } from '@farris/ui-treetable'; -import { ComponentContextMenuManager } from '../context-menu/context-menu.manager'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; -import { DesignerEnvType, DesignViewModelService, DomService, FormComponentType, RefreshFormService } from '@farris/designer-services'; -import { ComponentDragDropManager } from '../drag-drop/dragAndDrapManager'; -import { NoComponentProp } from '../property/nocode-property-config'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { SaveAsTemplateEditorComponent } from '@farris/designer-devkit'; -import { cloneDeep } from 'lodash-es'; - - -export default class FdComponentComponent extends FdContainerBaseComponent { - - /** 判断当前组件是否固定上下文,这种组件不支持移动、不支持删除 */ - private isInFixedContextRules: boolean; - - private dragManager: ComponentDragDropManager; - - /** 记录列表类组件的直接父级元素schema,用于删除组件时连带删除父级的新增、删除按钮 */ - private parentComponentSchemaForDataGrid: any; - - constructor(component: any, options: any) { - super(component, options); - this.dragManager = new ComponentDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - - this.parentComponentSchemaForDataGrid = this.getParentComponentSchemaForDataGrid(); - } - - - getDefaultSchema(): any { - return ComponentSchema; - } - - init(): any { - this.componentId = this.component.id; - this.viewModelId = this.component.viewModel; - - this.getCustomToolbarConfig(); - - super.init(); - } - - getTemplateName(): string { - return 'Component'; - } - - getStyles(): string { - return ' display: inherit;flex-direction: inherit;margin-bottom:10px'; - } - - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoComponentProp = new NoComponentProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: ComponentProp = new ComponentProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new ComponentContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(el: BuilderHTMLElement) { - return false; - } - /** - * 是否可移位 - */ - checkCanMoveComponent(): boolean { - return !this.isInFixedContextRules; - } - /** - * 是否可删除 - */ - checkCanDeleteComponent(): boolean { - return !this.isInFixedContextRules; - } - /** - * 删除组件,用于移除视图模型和组件节点。组件引用节点已经在webform-builder中移除 - */ - onRemoveComponent(): void { - this.removeAddDeleteBtnOnParentContainer(); - - super.onRemoveComponent(); - const serviceHost = this.options.designerHost; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - const domService = serviceHost.getService('DomService') as DomService; - - - dgViewModelService.deleteViewModelById(this.viewModelId); - domService.deleteComponent(this.component.id); - - } - - /** - * 获取组件展示名称 - */ - getControlShowName() { - const componentType = this.component.componentType; - - switch (componentType) { - case FormComponentType.Frame: { - return '根组件'; - } - case FormComponentType.dataGrid: case FormComponentType.table: { - return this.checkDataGridComponentName(); - } - case FormComponentType.attachmentPanel: case 'AttachmentPanel': { - return '附件组件'; - } - case FormComponentType.listView: { - return '列表视图组件'; - } - case FormComponentType.modalFrame: { - return '弹窗页面'; - } - default: { - if (componentType.startsWith('form')) { - return '卡片组件'; - } - } - } - - return this.component.id + '组件'; - } - - private checkDataGridComponentName() { - const domService = this.options.designerHost.getService('DomService') as DomService; - const treeGrid = domService.selectNode(this.component, (item) => item.type === DgControl.TreeGrid.type); - if (treeGrid) { - return '树表格组件'; - } - return '表格组件'; - } - - getDragScopeElement(): HTMLElement { - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 判断是否为弹窗内部的组件,若是,则限定控件的拖拽不能超出弹出区域 - const rootCmps = domService.module.components.filter(c => c.componentType === FormComponentType.modalFrame); - if (!rootCmps || rootCmps.length === 0) { - return; - } - - let rootCmpId; - for (const cmp of rootCmps) { - const cmpRefNode = domService.selectNode(cmp, n => n.type === DgControl.ComponentRef.type && n.component === this.component.id); - if (cmpRefNode) { - rootCmpId = cmp.id; - break; - } - } - if (rootCmpId) { - const rootContainer = document.getElementById(rootCmpId); - return rootContainer; - } - } - - /** - * 删除DataGrid/Form类组件时,将父级Section或者TabPage上的相关按钮一起删除 - */ - private removeAddDeleteBtnOnParentContainer() { - - if (this.component.componentType !== 'dataGrid' && !this.component.componentType.includes('form-')) { - return; - } - // 判断父级容器 - const parentComponentSchema = this.parentComponentSchemaForDataGrid; - if (!parentComponentSchema) { - return; - } - if (parentComponentSchema.toolbar && parentComponentSchema.toolbar.contents && parentComponentSchema.toolbar.contents.length) { - parentComponentSchema.toolbar.contents.forEach(button => { - const clickEvent = button.click; - // 判断三段式结构 - const clickEventPath = clickEvent && clickEvent.split('.'); - if (!clickEventPath || clickEventPath.length < 3) { - return; - } - const targetViewModelId = clickEventPath[clickEventPath.length - 2]; - - // 按钮绑定的命令若是在当前viewModel下,则将按钮标记为待删除 - if (targetViewModelId === this.viewModelId) { - button.needRemove = true; - } - }); - parentComponentSchema.toolbar.contents = parentComponentSchema.toolbar.contents.filter(button => !button.needRemove); - - } - - } - /** - * 记录列表类组件的直接父级元素schema,用于删除组件时连带删除父级的新增、删除按钮 - */ - private getParentComponentSchemaForDataGrid() { - if (this.component.componentType !== 'dataGrid' && !this.component.componentType.includes('form-')) { - return; - } - - const domService = this.options.designerHost.getService('DomService') as DomService; - const dataGrid = domService.selectNode(this.component, item => [DgControl.DataGrid.type, DgControl.Form.type].includes(item.type)); - if (!dataGrid) { - return; - } - const componentRefInstance = this.parent; - if (!componentRefInstance || componentRefInstance.type !== DgControl.ComponentRef.type) { - return; - } - // 判断父级容器 - if (!componentRefInstance.parent) { - return; - } - switch (componentRefInstance.parent.type) { - case DgControl.Section.type: { - // 父级为分组面板 - return componentRefInstance.parent.component; - } - case DgControl.Tab.type: { - // 父级为标签页,需要定位到列表所在标签页项 - const targetTabPage = componentRefInstance.parent.component.contents.find(tabPage => { - const ref = domService.selectNode(tabPage, item => item.id === componentRefInstance.id); - if (ref) { - return true; - } - }); - - return targetTabPage; - - } - } - } - - - - private getCustomToolbarConfig() { - this.customToolbarConfigs = []; - - // 零代码支持Form类组件、table类组件另存为模板 - if (this.envType == DesignerEnvType.noCode) { - const canSaveAs = this.checkCanSaveAsTemplate(); - if (canSaveAs) { - this.customToolbarConfigs.push( - { - id: 'saveAsTemplate', - title: '另存为模板', - icon: 'f-icon f-icon-save', - click: (e) => { - e.stopPropagation(); - this.showSaveAsTemplateModal(); - } - }); - } - } - - } - - private checkCanSaveAsTemplate() { - // 没有子级控件,不支持另存为 - if (!this.component.contents || !this.component.contents.length) { - return false; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - - const componentType = this.component.componentType; - if (!componentType) { - return false; - } - // 只支持form、table的另存为 - if (componentType !== FormComponentType.table && !componentType.includes(FormComponentType.form)) { - return false; - } - - // 只支持绑定主表 - const viewModel = domService.getViewModelById(this.viewModelId); - if (!viewModel || viewModel.bindTo !== '/') { - return false; - } - - - - // 若Form中有未绑定字段的控件,不支持另存为模板 - switch (componentType) { - case FormComponentType.table: { - - // 只支持简单类表格 - const table = domService.selectNode(this.component, item => item.type === DgControl.Table.type); - if (!table || table.devMode !== 'simple') { - return false; - } - } - default: { - if (componentType.includes(FormComponentType.form)) { - - // 若包含小分组,不支持另存为 - const hasFieldSet = domService.selectNode(this.component, item => item.type === DgControl.FieldSet.type); - if (hasFieldSet) { - return false; - } - - - // 校验Form内是否有未绑定字段的控件 - const formNode = domService.selectNode(this.component, item => item.type === DgControl.Form.type); - if (formNode) { - for (const item of formNode.contents) { - if (!item || !item.binding) { - return false; - } - } - } - - } - } - } - return true; - - } - /** - * 弹出另存为模板的窗口 - */ - private showSaveAsTemplateModal() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const domService = this.options.designerHost.getService('DomService') as DomService; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - - const compFactory = resolver.resolveComponentFactory(SaveAsTemplateEditorComponent); - const compRef = compFactory.create(injector); - const modalConfig = compRef.instance.modalConfig as any; - modalConfig.buttons = compRef.instance.modalFooter; - - const saveAsComponentDom = cloneDeep(this.component); - - const viewModel = domService.getViewModelById(this.viewModelId); - const componentType = this.component.componentType; - - let templateIconType; - let templateName; - if (componentType === 'table') { - templateIconType = 'Table'; - templateName = '表格' - modalConfig.height = 200; - modalConfig.width = 450; - } else if (componentType && componentType.includes('form-')) { - templateIconType = 'Form'; - const sectionNode = domService.selectNode(this.component, item => item.type === DgControl.Section.type); - templateName = sectionNode && sectionNode.mainTitle ? sectionNode.mainTitle : viewModel.name; - } - - compRef.instance.editorParams = { - controlCategory: 'container', - controlTitle: templateName + '模板', - controlDom: saveAsComponentDom, - viewModelId: this.viewModelId, - templateIconType: templateIconType - - } - - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe(() => { - modalPanel.close(); - - // 刷新工具箱 - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - if (refreshFormService && refreshFormService.refreshControlBox) { - refreshFormService.refreshControlBox.next(); - } - }); - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu-config.ts deleted file mode 100644 index f9e737edd8281613312d6679a9dbf7d0fbb38731..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu-config.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const contextMenu = [ - { - id: 'addSiblingContent', - title: '添加同级', - children: [ - { - id: 'Form', - parentMenuId: 'addSiblingContent', - title: '卡片' - } - ] - }, - { - id: 'splitFormComponent', - title: '拆分组件' - }, - { - id: 'changeFormToTableComponent', - title: '切换为表格' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu.manager.ts deleted file mode 100644 index f28d3febddfc28996706b432724e5bf7eb07c33b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { BsModalService } from '@farris/ui-modal'; -import { ComponentFactoryResolver } from '@angular/core'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { SplitFormComponent } from './editor/split-form-component/split-form-component.component'; -import { SchemaService, ComponentBindingSourceContext, ComponentResolveContext, DgControl } from '@farris/designer-services'; -import { DragResolveService } from '@farris/designer-devkit'; -import { TableComponentCreatorContextMenuService } from './services/table-creator.service'; - - -export class ComponentContextMenuManager extends ContextMenuManager { - - private modalService: BsModalService; - private schemaService: SchemaService; - - constructor(cmp: FdContainerBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.modalService = this.serviceHost.getService('ModalService'); - this.schemaService = this.injector.get(SchemaService); - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - menuConfig = this.assembleFormCmpMenu(menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig || []; - } - - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - if (menu.parentMenuId === 'addSiblingContent') { - this.addSiblingComponent(menu.id); - return; - } - switch (menu.id) { - case 'splitFormComponent': { - this.splitFormComponent(); - return; - } - case 'changeFormToTableComponent': { - this.changeFormComponentToTableComponent(); - return; - } - } - this.notifyService.warning('暂不支持'); - } - - private assembleFormCmpMenu(menuConfig: ControlContextMenuItem[]) { - - // 目前只支持卡片组件添加同级、拆分组件、切换为table - const cmpType = this.cmpInstance.component.componentType; - if (cmpType && cmpType.startsWith('form')) { - menuConfig = this.assembleChangeFormToTableMenu(menuConfig); - return menuConfig; - } - - return []; - } - /** - * 添加同级组件 - * @param menuItem 菜单配置 - */ - addSiblingComponent(menuId: string) { - // 目前只支持卡片 - if (menuId !== 'Form') { - return; - } - const dragResolveService = this.injector.get(DragResolveService); - const componentResolveContext = new ComponentResolveContext(); - componentResolveContext.controlType = this.cmpInstance.component.componentType; - - const bandingEntityInfo = this.schemaService.getTableInfoByViewModelId(this.cmpInstance.viewModelId); - if (bandingEntityInfo) { - componentResolveContext.needExcludeDisplayedFields = true; - componentResolveContext.bindingTargetId = bandingEntityInfo.id; - componentResolveContext.bindingTargetInSidebar = this.checkComponentIfInSidebar(this.cmpInstance.id); - - dragResolveService.triggerBindingEntity(componentResolveContext).subscribe( - (componentBindingSourceContext: ComponentBindingSourceContext) => { - if (componentBindingSourceContext) { - this.insertComponent(componentBindingSourceContext); - this.refreshFormService.refreshFormDesigner.next(); - } - - }); - } else { - this.notifyService.error('查询绑定实体失败'); - } - - - } - /** - * 将组件相关节点插入DOM - * @param componentBindingSourceContext 组件构造信息 - * @param componentRefParentNode 组件引用节点的父节点 - */ - private insertComponent(componentBindingSourceContext: ComponentBindingSourceContext) { - const { componentNode, componentRefNode, viewModelNode } = componentBindingSourceContext; - - // 定位ComponentRef的父级节点 - const cmpRefId = this.cmpInstance.parent && this.cmpInstance.parent.id; - - const cmpRefParentContainerCmp = this.cmpInstance.parent && this.cmpInstance.parent.parent; - const cmpRefParentContainerElement = cmpRefParentContainerCmp && cmpRefParentContainerCmp.component; - if (!cmpRefParentContainerElement) { - return; - } - - const currentElementIndex = cmpRefParentContainerElement.contents.findIndex(el => el.id === cmpRefId); - if (currentElementIndex > -1) { - - // 插入ComponentRef节点 - cmpRefParentContainerElement.contents.splice(currentElementIndex + 1, 0, componentRefNode); - - // 插入Component和ViewModel - this.domService.addComponent(componentNode); - this.domService.addViewModel(viewModelNode); - } - } - - /** - * 拆分Form组件 - */ - splitFormComponent() { - const resolver = this.injector.get(ComponentFactoryResolver); - const compFactory = resolver.resolveComponentFactory(SplitFormComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '拆分组件', - width: 900, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.schemaDOMMapping = this.serviceHost.getService('SchemaDOMMapping'); - compRef.instance.componentId = this.cmpInstance.componentId; - compRef.instance.componentParentContainerId = this.cmpInstance.parent.parent.id; - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.submitModal.subscribe(() => { - this.refreshFormService.refreshFormDesigner.next(); - modalPanel.close(); - }); - } - - /** - * 组装form切换为table的菜单 - */ - private assembleChangeFormToTableMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - - const tableCreatorServ = new TableComponentCreatorContextMenuService(this.injector, this.cmpInstance); - return tableCreatorServ.assembleChangeFormToTableMenu(menuConfig); - - } - /** - * 将卡片组件切换为table组件 - */ - private changeFormComponentToTableComponent() { - - const tableCreatorServ = new TableComponentCreatorContextMenuService(this.injector, this.cmpInstance); - tableCreatorServ.changeFormComponentToTableComponent(); - - } - - /** - * 检查卡片组件是否在侧边栏中,在侧边栏中的字段可以与非侧边栏中的字段重复。 - */ - private checkComponentIfInSidebar(cmpNodeId: string) { - - const sidebar = this.domService.selectNode(this.domService.components[0], - item => item.type === DgControl.Sidebar.type && item.contents && item.contents.length && - item.contents.find(child => child.type === DgControl.ComponentRef.type && child.component === cmpNodeId)); - if (sidebar) { - return true; - } - return false; - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.html deleted file mode 100644 index 8e69c3978ecb2aab207dbe53ed8223e2b5ef7f27..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.html +++ /dev/null @@ -1,63 +0,0 @@ -
    -
    -
    -
    -

    组件信息

    -
    -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    组件字段

    -
    -
    -
    - - -
    -
    - - -
    - - - - - - - - - - - 绑定字段不存在,请在视图模型中手动移除。 - - - 变量:{{ctx.node.data.code}} - - - 控件没有绑定信息 - - - {{ctx.node.data.bindingField}} - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.ts deleted file mode 100644 index e12d27ca8ac7299e51bafb02576509a4a37dab87..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/editor/split-form-component/split-form-component.component.ts +++ /dev/null @@ -1,388 +0,0 @@ -import { Component, EventEmitter, HostBinding, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { IdService } from '@farris/ui-common'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { DomService, SchemaService, DesignViewModelService, FormViewModel, FormBasicService } from '@farris/designer-services'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { ControlService } from '../../../../../../service/control.service'; -import { FieldTreeBuilder } from '@farris/designer-devkit'; -import { ControlEventPropertyIDList } from '../../../../../../utils/control-event-prop'; -import { FieldTreeNode } from '@farris/designer-devkit'; - -@Component({ - selector: 'app-split-form-component', - templateUrl: './split-form-component.component.html', - styleUrls: ['./split-form-component.component.css'] -}) -export class SplitFormComponent implements OnInit { - /** 控件和schema的映射类,由设计器提供 */ - @Input() schemaDOMMapping: any; - - /** 组件id */ - @Input() componentId: string; - - /** 组件ref节点的父容器id */ - @Input() componentParentContainerId: string; - - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - - @ViewChild('footer') modalFooter: TemplateRef; - @ViewChild('bindFieldColTpl') bindFieldColTpl: TemplateRef; - - @HostBinding('class') - class = 'd-flex h-100 py-2 px-3'; - - /** 卡片组件节点 */ - componentNode: any; - - /** 卡片组件内的Form节点 */ - compFormNode: any; - - /** 树表数据 */ - treeData: TreeNode[] = []; - - /** 树表列配置 */ - treeCols = []; - - /** 树表实例 */ - @ViewChild('treeTable') treeTable: TreeTableComponent; - - movedViewModelFieldIds = []; - - movedControls = []; - - componentTitle: string; - - - constructor( - private domService: DomService, - private notifyService: NotifyService, - private schemaService: SchemaService, - private formBasicService: FormBasicService, - private controlService: ControlService, - private dgVMService: DesignViewModelService, - private idService: IdService) { } - - ngOnInit() { - this.componentNode = this.domService.getComponentById(this.componentId); - - this.treeData = this.buildFieldTree(); - - this.compFormNode = this.domService.selectNode(this.componentNode, item => item.type === DgControl.Form.type); - this.movedControls = []; - this.movedViewModelFieldIds = []; - - this.treeCols = [ - { field: 'name', title: '名称' }, - { field: 'bindingPath', title: '绑定字段', template: this.bindFieldColTpl }]; - - const { name: tableName } = this.schemaService.getTableInfoByViewModelId(this.componentNode.viewModel); - this.componentTitle = tableName; - - } - /** - * 构件字段树表 - * @returns 树表数据 - */ - private buildFieldTree(): TreeNode[] { - const fieldTreeBuilder = new FieldTreeBuilder(this.schemaDOMMapping, this.dgVMService, this.domService, this.formBasicService); - - return fieldTreeBuilder.buildFieldTreeData(this.componentNode.viewModel); - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - - if (!this.componentTitle) { - this.notifyService.warning('请填写组件标题'); - return; - } - if (!this.getSelectedControls()) { - return; - } - - - // 1、创建新组件和VM - const newViewModel = this.addNewFormComponent(); - - // 2、移除旧组件下的控件 - this.removeControlsInComponent(); - - // 3、移除旧组件VM的记录 - const viewModel = this.domService.getViewModelById(this.componentNode.viewModel); - if (viewModel && viewModel.fields) { - viewModel.fields = viewModel.fields.filter(f => !this.movedViewModelFieldIds.includes(f.id)); - } - - // 4、移动控件绑定的命令 - this.moveViewModelCommands(newViewModel); - - this.submitModal.emit(); - } - - /** - * 字段搜索 - */ - searchField($event) { - if ($event) { - const { field, value } = $event; - this.treeTable.searchHandle.search(field, value); - } else { - this.treeTable.searchHandle.search('*', ''); - } - - } - - - - private getSelectedControls() { - const checkeds = this.treeTable.checkeds as FieldTreeNode[]; - if (!checkeds || checkeds.length === 0) { - this.notifyService.warning('请选择字段'); - return false; - } - checkeds.forEach(checkedNode => { - if (checkedNode.isGroupNode) { - return; - } - if (!checkedNode.isNoBinding) { - this.movedViewModelFieldIds.push(checkedNode.data.id); - } - this.movedControls.push(checkedNode.control); - }); - - return true; - } - - /** - * 创建新的卡片组件 - */ - private addNewFormComponent() { - const viewModel = this.domService.getViewModelById(this.componentNode.viewModel); - const { code: tableCode, name: tableName } = this.schemaService.getTableInfoByViewModelId(this.componentNode.viewModel); - - const cmpGUID = tableCode + '-' + Math.random().toString(36).slice(2, 6); - - - // 1、创建组件引用节点 - const compRefMetadata = this.controlService.getControlMetaData(DgControl.ComponentRef.type); - Object.assign(compRefMetadata, { - id: cmpGUID + '-component-ref', - component: cmpGUID + '-component' - }); - - - // 2、 创建component节点 - const cmpMetadata = this.controlService.getControlMetaData(DgControl.Component.type); - const contents = this.assembleFormCmpContents(cmpGUID, tableName); - Object.assign(cmpMetadata, { - id: cmpGUID + '-component', - viewModel: cmpGUID + '-viewmodel', - componentType: this.componentNode.componentType, - appearance: this.componentNode.appearance, - contents - }); - - // 3、 创建viewModel节点 - const innerVMFields = []; - this.movedViewModelFieldIds.forEach(fieldId => { - const vmField = viewModel.fields.find(f => f.id === fieldId); - innerVMFields.push(Object.assign({}, vmField, { groupId: null, groupName: null })); - - }); - - const vmMetadata = new FormViewModel(); - Object.assign(vmMetadata, { - id: cmpGUID + '-viewmodel', - code: cmpGUID + '-viewmodel', - name: this.componentTitle, - bindTo: viewModel.bindTo, - parent: viewModel.parent, - fields: innerVMFields, - commands: [], - states: viewModel.states, // 变量全部拷贝(因为控件的各种属性也可能绑定变量,这里不再依次判断) - enableValidation: viewModel.enableValidation, - pagination: { - enable: false - } - }); - - this.insertComponent(cmpMetadata, compRefMetadata, vmMetadata); - - return vmMetadata; - } - /** - * 将组件相关节点插入DOM - * @param componentBindingSourceContext 组件构造信息 - * @param componentRefParentNode 组件引用节点的父节点 - */ - private insertComponent(cmpMetadata: any, compRefMetadata: any, vmMetadata: any) { - - // 在当前组件下方插入ComponentRef - const componentParentContainerNode = this.domService.domDgMap.get(this.componentParentContainerId); - if (!componentParentContainerNode) { - return; - } - const currentElementIndex = componentParentContainerNode.contents.findIndex(el => el.component === this.componentId); - if (currentElementIndex > -1) { - componentParentContainerNode.contents.splice(currentElementIndex + 1, 0, compRefMetadata); - - this.domService.addComponent(cmpMetadata); - this.domService.addViewModel(vmMetadata); - } - } - /** - * 组装卡片组件内容 - */ - private assembleFormCmpContents(cmpGUID: string, tableName: string) { - - // 1、创建section - let oldSection; - if (this.componentNode.contents && this.componentNode.contents.length > 0) { - oldSection = this.componentNode.contents.find(c => c.type === DgControl.Section.type); - } - if (!oldSection) { - oldSection = this.controlService.getControlMetaData(DgControl.Section.type); - } - const section = Object.assign({}, oldSection, { - id: cmpGUID + '-form-section', - contents: [], - showHeader: true, - mainTitle: this.componentTitle, - draggable: false, - enableMaximize: false, - enableAccordion: true, - toolbar: { - type: 'SectionToolbar', - position: 'inHead', - contents: [] - } - }); - - // 2、创建form - const layoutForm = this.controlService.getControlMetaData(DgControl.Form.type); - Object.assign(layoutForm, { - id: cmpGUID + '-form-layout', - appearance: this.compFormNode.appearance, - contents: this.movedControls, - controlsInline: this.compFormNode.controlsInline, - draggable: false - }); - section.contents = [layoutForm]; - - return [section]; - - } - - /** - * 移除当前组件中的控件 - */ - private removeControlsInComponent() { - const removedControlIds = this.movedControls.map(control => control.id); - - this.compFormNode.contents.forEach(contentElement => { - if (contentElement.type === DgControl.FieldSet.type) { - contentElement.contents = contentElement.contents.filter(co => !removedControlIds.includes(co.id)); - } - }); - - this.compFormNode.contents = this.compFormNode.contents.filter(co => { - if (removedControlIds.includes(co.id)) { - return false; - } - if (co.type === DgControl.FieldSet.type && co.contents && co.contents.length === 0) { - return false; - } - return true; - }); - } - /** - * 拷贝控件涉及的命令 - * @param newViewModel 新视图模型对象 - */ - private moveViewModelCommands(newViewModel: any) { - const eventCodeList = Object.keys(ControlEventPropertyIDList); - const currentViewModel = this.domService.getViewModelById(this.componentNode.viewModel); - - // 多个控件绑定一个命令时,不重复创建新命令 - const commandMap = {}; - this.movedControls.forEach(control => { - Object.keys(control).forEach(propId => { - const e = eventCodeList.find(key => key === propId); - if (e && control[e]) { - const oldCommand = currentViewModel.commands.find(c => c.code === control[e]); - if (oldCommand) { - // 新建命令 - let newCommand = commandMap[oldCommand.code]; - if (!newCommand) { - newCommand = this.createNewCommand(oldCommand); - commandMap[oldCommand.code] = newCommand; - - newViewModel.commands.push(newCommand); - } - - - // 修改控件绑定的命令 - control[e] = newCommand.code; - - } - - } - }); - }); - - // 字段值变化前、后事件 - const fieldEvents = ['valueChanging', 'valueChanged']; - newViewModel.fields.forEach(field => { - fieldEvents.forEach(event => { - if (field[event]) { - const oldCommand = currentViewModel.commands.find(c => c.code === field[event]); - if (commandMap[oldCommand.code]) { - field[event] = commandMap[oldCommand.code].code; - } else { - - const newCommand = this.createNewCommand(oldCommand); - commandMap[oldCommand.code] = newCommand; - newViewModel.commands.push(newCommand); - - field[event] = newCommand.code; - } - } - }); - - }); - - // TODO 校验当前VM的命令有没有不用了的,不用的命令移除掉 - } - - - - private createNewCommand(oldCommand: any) { - // 1、新建命令 - const guiId = this.idService.generate(); - const newCommand = Object.assign({}, oldCommand, { - id: guiId, - code: oldCommand.code + guiId.slice(0, 4), - name: oldCommand.name + guiId.slice(0, 4) - }); - - - // 2、新建的命令添加到webCmds节点下 - const webCmds = this.domService.getWebCmds(); - - const cmp = webCmds.find(cmd => cmd.id === oldCommand.cmpId); - if (cmp) { - cmp.refedHandlers.push({ - host: guiId, - handler: oldCommand.handlerName - }); - } - - return newCommand; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/services/table-creator.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/services/table-creator.service.ts deleted file mode 100644 index a4267d0eeaa6fe09437eb0e136c2abc1346d2cee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/context-menu/services/table-creator.service.ts +++ /dev/null @@ -1,376 +0,0 @@ -import { Injector } from '@angular/core'; -import { FarrisDesignBaseComponent, IControlService } from '@farris/designer-element'; -import { DesignerEnvType, DgControl, DomService, FormBasicService, RefreshFormService } from '@farris/designer-services'; -import { ControlService } from '../../../../../service/control.service'; -import { IdService } from '@farris/ui-common'; -import { MessagerService } from '@farris/ui-messager'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { cloneDeep } from 'lodash-es'; - -const CHANGE_FORM_TO_TABLE_MENU = 'changeFormToTableComponent'; - -/** - * Form组件切换为table组件 - */ -export class TableComponentCreatorContextMenuService { - private domService: DomService; - private messagerService: MessagerService; - public refreshFormService: RefreshFormService; - private controlService: IControlService; - - private cmpInstance: FarrisDesignBaseComponent; - - constructor(private injector: Injector, cmpInstance: FarrisDesignBaseComponent) { - - this.domService = this.injector.get(DomService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.messagerService = this.injector.get(MessagerService); - this.controlService = this.injector.get(ControlService); - - this.cmpInstance = cmpInstance; - } - - - /** - * 组装form切换为table的菜单 - * @param menuConfig 菜单配置 - */ - assembleChangeFormToTableMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - - const canChange = this.checkCanChangeToTableComponent(); - if (!canChange) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_FORM_TO_TABLE_MENU); - } - return menuConfig; - - } - - /** - * 校验当前组件是否支持由Form类型切换为Table类型 - */ - checkCanChangeToTableComponent() { - // 目前只在零代码环境提供切换功能 - const formBasicService = this.injector.get(FormBasicService); - if (formBasicService.envType !== DesignerEnvType.noCode) { - return; - } - const formCmp = this.cmpInstance.component; - - // 1、只支持form组件 - if (!formCmp.componentType || !formCmp.componentType.includes('form') || !formCmp.contents || !formCmp.contents.length) { - return; - } - // 2、组件内不能有table控件 - const table = this.domService.selectNode(formCmp, item => item.type === DgControl.Table.type); - if (table) { - return; - } - - // 3、组件结构必须满足:Component-Section-Form三层结构 - const section = formCmp.contents[0]; - const form = section && section.contents && section.contents.length && section.contents[0]; - if (!section || section.type !== DgControl.Section.type || !form || form.type !== DgControl.Form.type) { - return; - } - - // 4、Section 和Form必须包含标准样式 - const sectionCls = section.appearance && section.appearance.class || ''; - const formCls = form.appearance && form.appearance.class || ''; - if (!sectionCls.includes('f-section-form') || !formCls.includes('f-form-layout')) { - return; - } - - // 6、检测form中是否包含未绑定字段的控件,若有,认为不是标准的form,不支持转为table - let hasUnBindingControl = false; - for (const control of form.contents) { - if (control && control.type === DgControl.FieldSet.type) { - continue; - } - if (!control || !control.binding || !control.binding.field) { - hasUnBindingControl = true; - break; - } - } - if (hasUnBindingControl) { - return; - } - - return true; - } - - changeFormComponentToTableComponent() { - this.messagerService.question('当前区域内控件将以表格形式展示,此操作不可撤销,确定切换?', () => { - this.confirmChangeFormComponentToTableComponent(); - }); - } - /** - * 由Form切换为table - */ - confirmChangeFormComponentToTableComponent() { - - const form = this.domService.selectNode(this.cmpInstance.component, item => item.type === DgControl.Form.type); - if (!form) { - return; - } - // 1、修改component组件类型 - this.cmpInstance.component.componentType = 'table'; - - // 2、Section、form控件增加样式 - const section = this.cmpInstance.component.contents[0]; - section.appearance.class = section.appearance.class.replace('f-section-form', 'f-section-card-table'); - form.appearance.class += ' f-table-has-form'; - - // 3、创建table控件 - const table = this.controlService.getControlMetaData(DgControl.Table.type); - table.id = `${form.id}_table`; - table.devMode = 'simple'; - table.rows = []; - - // 4、组装table单元格 - const plainControlList = this.splitControlsByFieldSet(form.contents); - plainControlList.forEach(controlList => { - if (controlList && controlList.length) { - const rows = this.resoloveTableRows(controlList, table.devMode); - table.rows = table.rows.concat(rows); - } - }); - - // 5、将table放在form下 - form.contents = [table]; - - // 6、刷新表单 - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - } - - /** - * 卡片区域内的控件若有分组FieldSet,需要根据分组划分前后区域,分组的起点控件需要在table内单独起一行 - */ - private splitControlsByFieldSet(controlList: any[], groupIndex = 0) { - const plainControlList = []; - - controlList.forEach(co => { - if (co.type === DgControl.FieldSet.type && co.contents && co.contents.length) { - groupIndex++; - if (!plainControlList[groupIndex]) { - plainControlList[groupIndex] = []; - } - plainControlList[groupIndex] = co.contents; - - groupIndex++; - } else { - if (!plainControlList[groupIndex]) { - plainControlList[groupIndex] = []; - } - plainControlList[groupIndex].push(co); - } - - }); - - return plainControlList; - } - - /** - * 组装表格 - * @param controlList 控件列表 - * @param devMode 展示模式 - */ - resoloveTableRows(controlList: any[], devMode: string): any[] { - const idService = this.injector.get(IdService); - const rows = []; - // 计算行数 - const rowCounts = this.getTableRowCounts(controlList); - - for (let rowIndex = 0, fieldCount = 0; rowIndex < rowCounts; rowIndex++) { - let columns: any[] = []; - for (let index = 0; index < 2; index++) { - const groupId = idService.generate(); - const originalControl = fieldCount < controlList.length ? controlList[fieldCount] : null; - - let labelTds; - let editorTds; - - // 第二列单元格是通栏控件:需要创建空白单元格(显示,不绑定字段) - if (index === 1 && this.checkIfCrossColumn(originalControl)) { - labelTds = this.createLabelTd(null, devMode, groupId); - editorTds = this.createEditorTd(null, devMode, groupId); - - } else { - // 普通单元格:正常绑定字段 - labelTds = this.createLabelTd(originalControl, devMode, groupId); - editorTds = this.createEditorTd(originalControl, devMode, groupId); - - fieldCount++; - } - columns = columns.concat(labelTds).concat(editorTds); - - - // 第一列单元格是通栏控件:需要创建空白单元格(不显示,不绑定字段) - if (index === 0 && this.checkIfCrossColumn(originalControl)) { - const invisibleTds = this.createInvisibleTd(devMode, groupId); - columns = columns.concat(invisibleTds); - - editorTds[0].colspan = 5; - editorTds[0].markCol = 0; - editorTds[0].markRow = 0; - - index++; - } - - } - - rows.push({ - id: idService.generate(), - type: 'TableRow', - columns - }); - - } - - return rows; - } - /** - * 计算table行数。 - * 规则:一行两个字段;若控件class='col-12',则占通栏,其余都是默认一个单元格, - * @param controlList 输入控件列表 - */ - private getTableRowCounts(controlList: any[]) { - // 单元格总数 - let columnCount = 0; - - // tslint:disable-next-line: prefer-for-of - for (let controlIndex = 0; controlIndex < controlList.length; controlIndex++) { - const control = controlList[controlIndex]; - const nextControl = controlIndex + 1 < controlList.length ? controlList[controlIndex + 1] : null; - - const isFirstColumn = controlIndex % 2 === 0; - const isCrossColumn = this.checkIfCrossColumn(control); - const selfColumnCount = isCrossColumn ? 2 : 1; - - // 第一列控件不通栏,但是下一个控件是通栏的,这种场景下需要补充空白单元格 - if (isFirstColumn && !isCrossColumn && this.checkIfCrossColumn(nextControl)) { - columnCount += selfColumnCount + 1; - } else { - columnCount += selfColumnCount; - } - - } - - // 求行数 - const rowCount = columnCount / 2 + 0.5; - - return parseInt(rowCount + '', 10); - } - - /** - * 检查单元格是否为通栏 - * @param control 控件 - */ - private checkIfCrossColumn(control: any) { - let controlClass = control && control.appearance && control.appearance.class || ''; - controlClass = controlClass.trim(); - if (controlClass === 'col-12' || controlClass === 'col-12 col-md-12 col-xl-12 col-el-12') { - return true; - } - // const colClassItems = controlClass.split(' '); - - // const originColClass = colClassItems.find(item => /^col-([1-9]|10|11|12)$/.test(item)); - // const originColMDClass = colClassItems.find(item => /^col-md-([1-9]|10|11|12)$/.test(item)); - // const originColXLClass = colClassItems.find(item => /^col-xl-([1-9]|10|11|12)$/.test(item)); - // const originColELClass = colClassItems.find(item => /^col-el-([1-9]|10|11|12)$/.test(item)); - - // const colColumn = originColClass && originColClass.replace('col-', ''); - // const colMdColumn = originColMDClass && originColMDClass.replace('col-md-', ''); - // const colXLColumn = originColXLClass && originColXLClass.replace('col-xl-', ''); - // const colELColumn = originColELClass && originColELClass.replace('col-el-', ''); - - } - /** - * 创建标签类单元格 - * @param cardControl 卡片组件内的控件结构 - */ - private createLabelTd(cardControl: any, devMode = 'advanced', groupId: string): any[] { - const idService = this.injector.get(IdService); - const tdMetadata = this.controlService.getControlMetaData('TableTd'); - if (!tdMetadata) { - return []; - } - tdMetadata.tdType = 'staticText'; - tdMetadata.appearance.class = 'farris-group-wrap--label'; - tdMetadata.id = idService.generate(); - - if (cardControl) { - tdMetadata.staticText.text = cardControl.title; - tdMetadata.staticText.require = cardControl.require; - } - - // 简单类单元格需要赋值分组id - if (devMode === 'simple') { - tdMetadata.groupId = groupId; - } - return [tdMetadata]; - } - - /** - * 创建编辑器类单元格 - * @param field schema字段 - */ - private createEditorTd(cardControl: any, devMode = 'advanced', groupId: string) { - const idService = this.injector.get(IdService); - - // 合并单元格 - const tdMetadata = this.controlService.getControlMetaData('TableTd'); - tdMetadata.id = idService.generate(); - tdMetadata.tdType = 'editor'; - tdMetadata.colspan = 2; - tdMetadata.appearance.class = 'farris-group-wrap--input'; - - if (cardControl) { - const editorMetadata = cloneDeep(cardControl); - editorMetadata.showInTable = true; - editorMetadata.appearance = { class: '' }; - tdMetadata.editor = editorMetadata; - } - - // 隐藏单元格 - const invisibleTd = this.controlService.getControlMetaData('TableTd'); - invisibleTd.id = idService.generate(); - invisibleTd.invisible = true; - invisibleTd.markCol = 1; - invisibleTd.markRow = 0; - - // 简单类单元格需要赋值分组id - if (devMode === 'simple') { - tdMetadata.groupId = groupId; - invisibleTd.groupId = groupId; - } - - return [tdMetadata, invisibleTd]; - - } - /** - * 创建隐藏单元格,用于创建通栏的控件中,右侧隐藏的3个单元格 - */ - createInvisibleTd(devMode = 'advanced', groupId: string) { - - const staticTextTd = this.createLabelTd(null, devMode, groupId)[0]; - staticTextTd.invisible = true; - staticTextTd.markCol = 2; - staticTextTd.markRow = 0; - - - const editorTds = this.createEditorTd(null, devMode, groupId); - const editorTd = editorTds[0]; - editorTd.invisible = true; - editorTd.markCol = 3; - editorTd.markRow = 0; - - const invisibleEditorTd = editorTds[1]; - invisibleEditorTd.invisible = true; - invisibleEditorTd.markCol = 4; - invisibleEditorTd.markRow = 0; - - return [staticTextTd, editorTd, invisibleEditorTd]; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/drag-drop/dragAndDrapManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/drag-drop/dragAndDrapManager.ts deleted file mode 100644 index 7e5da90fed88eaa5f8b989fc984c18ec2bc33d7a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/drag-drop/dragAndDrapManager.ts +++ /dev/null @@ -1,88 +0,0 @@ -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { DgControl } from '../../../../utils/dg-control'; -import { ComponentResolveContext, FormComponentType } from '@farris/designer-services'; - -export class ComponentDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - - private canAcceptChildContent = true; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(resolveContext: ComponentResolveContext): boolean { - - if (!this.canAcceptChildContent) { - return false; - } - return true; - } - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - const component = this.cmpInstance.component; - - // 根组件不能移动、删除 - if (component.id === 'root-component' && component.componentType === FormComponentType.Frame) { - return true; - } - // 控件本身样式 - const cmpClass = component.appearance && component.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 组件引用ComponentRef节点 - const componentRefEle = this.cmpInstance.parent; - if (componentRefEle.type !== DgControl.ComponentRef.type) { - return true; - } - // 组件引用节点的父级 - const componentRefParent = componentRefEle.parent; - const componentRefParentEle = componentRefParent && componentRefParent.component; - const componentRefParentEleCls = componentRefParentEle && componentRefParentEle.appearance ? componentRefParentEle.appearance.class : ''; - const componentRefParentEleClsList = componentRefParentEleCls ? componentRefParentEleCls.split(' ') : []; - - - const componentRefGrandParentEle = componentRefParent && componentRefParent.parent && componentRefParent.parent.component; - const componentRefGrandParentEleCls = componentRefGrandParentEle && componentRefGrandParentEle.appearance ? componentRefGrandParentEle.appearance.class : ''; - const componentRefGrandParentEleClsList = componentRefGrandParentEleCls ? componentRefGrandParentEleCls.split(' ') : []; - - const componentType = component.componentType; - - // 多视图下的组件不允许移动、删除 - if (componentRefEle.parent.type === DgControl.MultiViewContainer.type) { - return true; - } - - // 管理列表、带侧边栏的列表、带导航的列表中DataGrid组件禁止移动、删除 - if (componentType === FormComponentType.dataGrid) { - if (componentRefParentEle.type === DgControl.ContentContainer.type && componentRefParentEleClsList.includes('f-page-main')) { - return true; - } - // 在分栏面板中的组件不支持移动 - if (componentRefParentEle.type === DgControl.SplitterPane.type && componentRefParentEleCls.includes('f-page-')) { - return true; - } - - // 单树组件模板的列表 - if (componentRefParentEle.type === DgControl.ContentContainer.type && componentRefParentEleClsList.includes('f-page-module')) { - return true; - } - - // 7、section类子表:container-section-component - if (cmpClassList.includes('f-struct-is-subgrid') && (componentRefParentEleClsList.includes('f-section-in-mainsubcard') || componentRefParentEleClsList.includes('f-section-in-main')) && - componentRefGrandParentEleClsList.includes('f-struct-wrapper')) { - this.canAcceptChildContent = false; - return true; - } - } - - return false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/export.ts deleted file mode 100644 index cb0f1238aaca4a332130e16e97af92290450963e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdComponentComponent from './component/fd-component'; -import { ComponentSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdComponentTemplates from './templates'; - - -export const Component: ComponentExportEntity = { - type: 'Component', - component: FdComponentComponent, - template: FdComponentTemplates, - metadata: ComponentSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/property/nocode-property-config.ts deleted file mode 100644 index 829cdf376fcff9ff539e30f1df6189522356ad5c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/property/nocode-property-config.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { cloneDeep, set } from 'lodash-es'; - -export class NoComponentProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const props = this.getCommonAppearanceProperties(); - - const propData = cloneDeep(propertyData); - // 【模型名称】是保存到ViewModel上的,不是保存到Component上,所以这里复制一份属性值 - const vm = this.domService.getViewModelById(viewModelId); - propData.name = vm ? vm.name : null; - - props.push( - { - propertyID: 'name', - propertyName: '组件名称', - propertyType: 'string' - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - propertyData: propData, - enableCascade: true, - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'name': { - self.syncChangesToViewModel(viewModelId, { name: changeObject.propertyValue }); - break; - } - - default: { - // 将属性值同步到Component属性上 - const propPath = changeObject.parentPropertyID ? changeObject.parentPropertyID + '.' + [changeObject.propertyID] : [changeObject.propertyID]; - set(propertyData, propPath, changeObject.propertyValue); - break; - } - } - } - }; - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const propData = cloneDeep(propertyData); - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - // 是否启用校验是保存到ViewModel上的,不是保存到Component上,所以这里复制一份属性值 - const vm = this.domService.getViewModelById(viewModelId); - propData.enableValidation = vm ? vm.enableValidation : null; - - return { - categoryId: 'behavior', - categoryName: '行为', - propertyData: propData, - enableCascade: true, - properties: [ - visibleProp - ], - setPropertyRelates(changeObject: FormPropertyChangeObject) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'visible': { - // 将属性值同步到Component属性上 - propertyData.visible = changeObject.propertyValue; - break; - } - } - } - }; - } - - /** - * 将变更的属性值同步到ViewModel上 - */ - private syncChangesToViewModel(viewModelId: string, changeObject: any) { - const vm = this.domService.getViewModelById(viewModelId); - if (!vm) { - return; - } - Object.assign(vm, changeObject) - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/property/property-config.ts deleted file mode 100644 index 793279c6dce0e9d731e3a60855df086049373311..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/property/property-config.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { cloneDeep, set } from 'lodash-es'; -export class ComponentProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const props = this.getCommonAppearanceProperties(); - - const propData = cloneDeep(propertyData); - // 【模型名称】是保存到ViewModel上的,不是保存到Component上,所以这里复制一份属性值 - const vm = this.domService.getViewModelById(viewModelId); - propData.name = vm ? vm.name : null; - - props.push( - { - propertyID: 'name', - propertyName: '组件名称', - propertyType: 'string' - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - propertyData: propData, - enableCascade: true, - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'name': { - self.syncChangesToViewModel(viewModelId, { name: changeObject.propertyValue }); - break; - } - - default: { - // 将属性值同步到Component属性上 - const propPath = changeObject.parentPropertyID ? changeObject.parentPropertyID + '.' + [changeObject.propertyID] : [changeObject.propertyID]; - set(propertyData, propPath, changeObject.propertyValue); - break; - } - } - } - }; - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const propData = cloneDeep(propertyData); - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - // 是否启用校验是保存到ViewModel上的,不是保存到Component上,所以这里复制一份属性值 - const vm = this.domService.getViewModelById(viewModelId); - propData.enableValidation = vm ? vm.enableValidation : null; - - return { - categoryId: 'behavior', - categoryName: '行为', - propertyData: propData, - enableCascade: true, - properties: [ - visibleProp, - { - propertyID: 'enableValidation', - propertyName: '启用校验', - propertyType: 'select', - description: '运行时组件是否启用校验', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - visible: !!vm.parent // 根组件不支持启用校验属性 - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'visible': { - // 将属性值同步到Component属性上 - propertyData.visible = changeObject.propertyValue; - break; - } - case 'enableValidation': { - self.syncChangesToViewModel(viewModelId, { enableValidation: changeObject.propertyValue }); - break; - } - } - } - }; - } - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'onInit', - name: '初始化事件' - }, - { - label: 'afterViewInit', - name: '视图初始化后事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } - - /** - * 将变更的属性值同步到ViewModel上 - */ - private syncChangesToViewModel(viewModelId: string, changeObject: any) { - const vm = this.domService.getViewModelById(viewModelId); - if (!vm) { - return; - } - Object.assign(vm, changeObject); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/schema/schema.ts deleted file mode 100644 index fbb3a8c1e7450958f0621ced878c2d72ec32993f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/schema/schema.ts +++ /dev/null @@ -1,13 +0,0 @@ - -export const ComponentSchema = { - id: 'component', - type: 'Component', - viewModel: '', - componentType: '', - appearance: null, - visible: true, - onInit: null, - afterViewInit: null, - contents: [] -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/form.ts deleted file mode 100644 index f77d126313221e3291b4daa8953d7253986b8938..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/component/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/component/fd-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/component/fd-container.ts deleted file mode 100644 index 25af21e8e50cae5e51c17cd4a2a2d686b3761471..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/component/fd-container.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { ContentContainerSchema } from '../schema/schema'; -import { BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerProp } from '../property/property-config'; -import { ContainerContextMenuManager } from '../context-menu/context-menu.manager'; -import { RowNode } from '@farris/ui-treetable'; -import { ContainerDragDropManager } from '../drag-drop/dragAndDrapManager'; -import { SplitLikeCardContainerContextMenuService } from '../context-menu/services/split-like-card-container'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeContainerProp } from '../property/nocode-property-config'; -import { cloneDeep } from 'lodash-es'; - -export default class ContentContainerComponent extends FdContainerBaseComponent { - - /** 判断当前容器是否是固定的上下文的中间层级,这种容器不支持移动、不支持删除、并且隐藏间距 */ - private isInFixedContextRules = false; - private dragManager: ContainerDragDropManager; - - constructor(component: any, options: any) { - super(component, options); - this.customToolbarConfigs = []; - - this.dragManager = new ContainerDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - } - - /** - * 从工具箱拖拽生成时需要判断是何种类型的容器 - */ - static getMetadataInControlBox(targetComponentInstance: FarrisDesignBaseComponent, controlFeature: string) { - const metadata = cloneDeep(ContentContainerSchema); - - // 区块容器,需要增加样式 - const feature = controlFeature ? JSON.parse(controlFeature) : null; - if (feature && feature.isLikeCardContainer) { - metadata.appearance = { - class: 'f-struct-like-card', - style: 'border-radius:16px;' - }; - metadata.isLikeCardContainer = true; - } - - return metadata; - } - init(): void { - super.init(); - this.getCustomToolbarConfig(); - } - - getDefaultSchema(): any { - - return ContentContainerSchema; - } - - getTemplateName(): string { - return 'ContentContainer'; - } - - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeContainerProp = new NoCodeContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - - } else { - const prop: ContainerProp = new ContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new ContainerContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - - /** - * 判断在可视化区域中是否隐藏容器间距和线条 - */ - hideNestedPaddingInDesginerView() { - - if (this.isInFixedContextRules) { - return true; - } - return false; - - } - - - checkCanMoveComponent(): boolean { - const canMove: boolean = super.checkCanMoveComponent(); - if (!canMove) { - return false; - } - if (this.isInFixedContextRules) { - return false; - } - return true; - } - - checkCanDeleteComponent(): boolean { - const canDelete: boolean = super.checkCanDeleteComponent(); - if (!canDelete) { - return false; - } - if (this.isInFixedContextRules) { - return false; - } - - return true; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccepts(el: BuilderHTMLElement, target: BuilderHTMLElement) { - - const result = super.canAccept(el, target); - if (!result.canAccepts) { - return false; - } - const resolveContext = result.resolveContext; - - return this.dragManager.canAccepts(resolveContext); - } - - private getCustomToolbarConfig() { - this.customToolbarConfigs = []; - - const injector = this.options.designerHost.getService('Injector'); - const serv = new SplitLikeCardContainerContextMenuService(injector, this); - - const show = serv.checkCanSplitLikeCardContainer(); - if (show) { - this.customToolbarConfigs.push( - { - id: 'splitLikeCardContentainer', - title: '拆分区块', - icon: 'f-icon f-icon-yxs_level', - click: (e) => { - e.stopPropagation(); - this.splitLikeCardContainer(); - } - }); - } - } - - private splitLikeCardContainer() { - const injector = this.options.designerHost.getService('Injector'); - const refreshFormService = this.options.designerHost.getService('RefreshFormService'); - - const serv = new SplitLikeCardContainerContextMenuService(injector, this); - serv.splitLikeCardContainer(); - - refreshFormService.refreshFormDesigner.next(); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu-config.ts deleted file mode 100644 index 588b794de28ea108a5077fb8b9714fbbcc486ffb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu-config.ts +++ /dev/null @@ -1,32 +0,0 @@ -export const contextMenu = [ - { - title: '添加从表区域', - id: 'createDetailContainer' - }, - { - title: '添加从从表区域', - id: 'createGrandContainer' - }, - { - title: '添加子级', - id: 'addChildContent', - children: [ - { - title: '模板容器', - id: 'HtmlTemplate' - }, - { - title: '前置任务', - id: 'ListFilter' - } - ] - }, - { - title: '拆分区块', - id: 'splitLikeCardContentainer' - }, - { - title: '从表填充', - id: 'childContainerFill' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu.manager.ts deleted file mode 100644 index 54cc1b4bf963b391241d18ac576bd08b64030707..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,518 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { BsModalService } from '@farris/ui-modal'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { RowNode } from '@farris/ui-treetable'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ComponentFactoryResolver } from '@angular/core'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { ControlService } from '../../../../service/control.service'; -import { CreateDetailContainerService } from '../../splitter/context-menu/services/create-detail-container.service'; -import { ListFilterFieldsEditorComponent } from '../../../filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component'; -import { IdService } from '@farris/ui-common'; -import { WebCmdService } from '@farris/designer-services'; -import { SplitLikeCardContainerContextMenuService } from './services/split-like-card-container'; -import { ChildContainerFillService } from './services/child-container-fill'; - -const CREATE_DETAIL_CONTAINER_COMMAND = 'createDetailContainer'; -const CREATE_GRAND_CONTAINER_COMMAND = 'createGrandContainer'; -const CREATE_CHILD_CONTENT_COMMAND = 'addChildContent'; -const SPLIT_LIKE_CARD_CONTAINER_COMMAND = 'splitLikeCardContentainer'; -const CHILD_FILL_COMMAND = 'childContainerFill'; - -export class ContainerContextMenuManager extends ContextMenuManager { - - private resolver: ComponentFactoryResolver; - private modalService: BsModalService; - private controlService: any; - - - - constructor(cmp: FdContainerBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.resolver = this.serviceHost.getService('ComponentFactoryResolver'); - this.modalService = this.serviceHost.getService('ModalService'); - this.controlService = this.injector.get(ControlService); - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - // 零代码不需要添加子级模板容器contextMenu中注掉 - if (!menuConfig) { - return []; - } - - menuConfig = this.assembleCreateChildContainerMenu(menuConfig); - menuConfig = this.assembleCreateHtmlTemplateMenu(menuConfig); - menuConfig = this.assembleCreateListFilterMenu(menuConfig); - menuConfig = this.assembleSplitLikeCardContentainerMenu(menuConfig); - menuConfig = this.assembleChildFillMenu(menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - const menu = e.menu; - - switch (menu.id) { - // 添加从表区域 - case CREATE_DETAIL_CONTAINER_COMMAND: { - this.createDetailContainer(); - break; - } - // 添加从从表区域 - case CREATE_GRAND_CONTAINER_COMMAND: { - this.createGrandContainer(); - break; - } - // 拆分区块 - case SPLIT_LIKE_CARD_CONTAINER_COMMAND: { - this.splitLikeCardContainer(); - break; - } - // 启用从表填充 - case 'enable' + CHILD_FILL_COMMAND: { - this.enableChildContainerFill(); - break; - } - // 关闭从表填充 - case 'close' + CHILD_FILL_COMMAND: { - this.closeChildContainerFill(); - break; - } - default: { - // 添加子级 - if (menu.parentMenuId === CREATE_CHILD_CONTENT_COMMAND) { - this.createChildContent(menu); - } else { - this.notifyService.warning('暂不支持'); - } - } - } - } - /** - * 组装从表/从从表区域菜单 - * @param containerId 容器id - * @param menuConfig 菜单 - */ - private assembleCreateChildContainerMenu(menuConfig: ControlContextMenuItem[]) { - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - if (!templateOutlineSchema) { - // console.log('未检测到模板配置数据'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - const mainContainerSchema = templateOutlineSchema.find(schema => schema.type === 'MainContainer' || schema.type === 'RightMainContainer'); - - if (!mainContainerSchema || !mainContainerSchema.children || mainContainerSchema.children.length < 1) { - // console.log('未检测到主区域配置数据'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - - const rootCmp = this.domService.getComponentById('root-component'); - - const mainContainer = this.domService.getNodeByIdPath(rootCmp, mainContainerSchema.path as string); - - // 滚动监听类表单,不支持创建从表区域 - const scrollSpyContainer = mainContainer.contents.find(co => co.type === DgControl.Scrollspy.type); - if (scrollSpyContainer) { - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - - const likeCardCotainer = mainContainer.contents.find(co => co.type === DgControl.ContentContainer.type && co.isLikeCardContainer); - let detailContainerParentElement; - if (likeCardCotainer) { - detailContainerParentElement = likeCardCotainer; - } else { - detailContainerParentElement = mainContainer; - } - - if (detailContainerParentElement.id !== this.cmpInstance.id) { - // console.log('当前节点不是主区域节点'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - - // 判断是否包含从表区域 - const detailSchema = mainContainerSchema.children[1]; - const detailSectionContainer = this.domService.getNodeByIdPath(rootCmp, detailSchema.path as string); - const hasDetailContainer = !!detailSectionContainer && detailSchema.id === 'child-grid'; - - if (hasDetailContainer) { - // 存在从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_DETAIL_CONTAINER_COMMAND); - - if (mainContainerSchema.children.length > 2) { - const grandsonSchema = mainContainerSchema.children[2]; - const grandsonSectionContainer = this.domService.getNodeByIdPath(rootCmp, grandsonSchema.path as string); - const hasGrandsonDetailContainer = !!grandsonSectionContainer && grandsonSchema.id === 'grandson-grid'; - if (hasGrandsonDetailContainer) { - // 存在从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - } else { - // schema中没有声明从从表区域,则不能创建从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - - } else { - // 不存在从表区域,则不能创建从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - - return menuConfig; - } - - /** - * 创建从表区域 - */ - private createDetailContainer() { - const controlService = this.injector.get(ControlService); - - const createDetailService = new CreateDetailContainerService(this.domService, controlService); - - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const mainContainerSchema = templateOutlineSchema.find(schema => - schema.type === 'MainContainer' || schema.type === 'RightMainContainer'); - - createDetailService.createDetailContainer(mainContainerSchema, 'child-grid'); - - this.notifyService.success('已添加从表区域'); - this.refreshFormService.refreshFormDesigner.next(this.cmpInstance.id); - } - - /** - * 创建从从表区域 - */ - private createGrandContainer() { - const controlService = this.injector.get(ControlService); - - const createDetailService = new CreateDetailContainerService(this.domService, controlService); - - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const mainContainerSchema = templateOutlineSchema.find(schema => - schema.type === 'MainContainer' || schema.type === 'RightMainContainer'); - - createDetailService.createDetailContainer(mainContainerSchema, 'grandson-grid'); - - this.notifyService.success('已添加从从表区域'); - this.refreshFormService.refreshFormDesigner.next(this.cmpInstance.id); - } - - /** - * 组装创建html模板菜单 - * @param containerId 容器id - * @param menuConfig 菜单 - */ - private assembleCreateHtmlTemplateMenu(menuConfig: ControlContextMenuItem[]) { - const containerElement = this.cmpInstance.component; - const addChildMenu = menuConfig.find(menu => menu.id === CREATE_CHILD_CONTENT_COMMAND); - if (!addChildMenu || !addChildMenu.children) { - return menuConfig; - } - - const htmlMenu = addChildMenu.children.find(menu => menu.id === DgControl.HtmlTemplate.type); - if (!htmlMenu) { - return menuConfig; - } - - // 模板规定的成对出现的层级结构,不允许插入其他节点。 - // 例如f-struct-wrapper 类的container,都是Container-Section成对出现,中间不允许插入节点;listFilterContainer-ListFilter 是成对出现的 - const elementClass = containerElement && containerElement.appearance && containerElement.appearance.class; - if (elementClass && (elementClass.includes('f-struct-wrapper') || elementClass.includes('f-filter-container'))) { - addChildMenu.children = addChildMenu.children.filter(menu => menu.id !== DgControl.HtmlTemplate.type); - } - - // 页头的标题容器,不允许插入子级模板。 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - if (elementClass && elementClass.includes('f-title') && parentClass && parentClass.includes('f-page-header-base')) { - addChildMenu.children = addChildMenu.children.filter(menu => menu.id !== DgControl.HtmlTemplate.type); - } - - - if (addChildMenu.children.length === 0) { - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_CHILD_CONTENT_COMMAND); - } - return menuConfig; - - } - - /** - * 添加子级 - * @param containerId 容器节点id - * @param menuItem 菜单项 - */ - private createChildContent(menuItem: ControlContextMenuItem) { - switch (menuItem.id) { - case DgControl.HtmlTemplate.type: { - this.createHtmlTemplate(); - break; - } - case DgControl.ListFilter.type: { - this.createListFilter(); - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - } - /** - * 创建html模板菜单 - * @param containerId 容器节点id - */ - private createHtmlTemplate() { - const controlService = this.injector.get(ControlService); - - const containerElement = this.cmpInstance.component; - const htmlTemplateMetadata = controlService.getControlMetaData(DgControl.HtmlTemplate.type); - htmlTemplateMetadata.id = 'html-' + Math.random().toString(36).slice(2, 6); - - if (!containerElement.contents) { containerElement.contents = []; } - containerElement.contents.push(htmlTemplateMetadata); - - this.refreshFormService.refreshFormDesigner.next(containerElement.id); - this.notifyService.success('添加成功'); - } - - - /** - * 组装创建前置任务菜单:限定在内置列表和管理列表的表单 - * @param containerId 容器id - * @param menuConfig 菜单配置 - */ - private assembleCreateListFilterMenu(menuConfig: ControlContextMenuItem[]) { - const containerElement = this.domService.domDgMap.get(this.cmpInstance.id); - const addChildMenu = menuConfig.find(menu => menu.id === CREATE_CHILD_CONTENT_COMMAND); - if (!addChildMenu || !addChildMenu.children) { - return menuConfig; - } - - const listFilterMenu = addChildMenu.children.find(menu => menu.id === DgControl.ListFilter.type); - if (!listFilterMenu) { - return menuConfig; - } - let showMenu = true; - // 规定只有内置列表和管理列表的表单可以添加前置任务 - if (this.domService.module.templateId !== 'list-template') { - showMenu = false; - } - - // 规定只有标题区域可以添加前缀任务: header-nav 节点,带有'f-page-header-base'样式 - const elementClass = containerElement && containerElement.appearance && containerElement.appearance.class; - if (!elementClass || !elementClass.includes('f-page-header-base')) { - showMenu = false; - } - - // 已经添加过筛选条,不能再次添加 - const listFilter = containerElement.contents && containerElement.contents.find(c => c.type === DgControl.ContentContainer.type && - c.appearance && c.appearance.class && c.appearance.class.includes('f-filter-container')); - if (listFilter) { - showMenu = false; - } - - if (!showMenu) { - addChildMenu.children = addChildMenu.children.filter(menu => menu.id !== DgControl.ListFilter.type); - if (addChildMenu.children.length === 0) { - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_CHILD_CONTENT_COMMAND); - } - } - - return menuConfig; - } - - /** - * 创建前置任务(轻量筛选条) - */ - private createListFilter() { - const containerElement = this.cmpInstance.component; - - const compFactory = this.resolver.resolveComponentFactory(ListFilterFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - const modalConfig = { - title: '筛选条字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.value = []; - compRef.instance.editorParams = { - viewModelId: this.cmpInstance.viewModelId, - controlSource: 'light' - }; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - - // 1、组装筛选条容器和筛选条dom结构 - const listFilterContainer = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - const listFilterMetadata = this.controlService.getControlMetaData(DgControl.ListFilter.type); - - const idSuffix = Math.random().toString(36).slice(2, 6); - Object.assign(listFilterContainer, { - id: 'list-filter-container-' + idSuffix, - appearance: { - class: 'f-filter-container f-content' - }, - contents: [listFilterMetadata] - }); - - Object.assign(listFilterMetadata, { - id: 'list-filter-' + idSuffix, - filterList: data.value || [], - controlSource: 'light' - }); - - // 2、添加到标题的后面、工具栏前面 - if (!containerElement.contents) { containerElement.contents = []; } - const titleIndex = containerElement.contents.findIndex(c => c.type === DgControl.ContentContainer.type && - c.appearance && c.appearance.class && c.appearance.class.includes('f-title')); - if (titleIndex > -1) { - containerElement.contents.splice(titleIndex + 1, 0, listFilterContainer); - } else { - containerElement.contents.push(listFilterContainer); - } - - - // 3、预制筛选条查询命令 - const viewModel = this.domService.getViewModelById(this.cmpInstance.viewModelId); - let newFilterCommandId; - if (viewModel && viewModel.commands) { - if (!viewModel.commands.find(command => command.handlerName === 'Filter' && command.cmpId === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72')) { - newFilterCommandId = new IdService().generate(); - const commandCode = `${viewModel.id.replace(/-/g, '')}Filter1`; - viewModel.commands.push( - { - id: newFilterCommandId, - code: commandCode, - name: '过滤列表数据1', - params: [ - { - name: 'commandName', - shownName: '过滤回调方法', - value: '' - }, - { - name: 'frameId', - shownName: '目标组件', - value: '' - } - ], - handlerName: 'Filter', - cmpId: '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', - shortcut: {}, - extensions: [] - } - ); - } - } - - // 4、预置筛选条查询数据的构件 - if (this.domService.module.webcmds) { - let loadDataCmd = this.domService.module.webcmds.find(cmd => cmd.id === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72'); - if (!loadDataCmd) { - loadDataCmd = { - id: '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', - path: 'Gsp/Web/webcmp/bo-webcmp/metadata/webcmd', - name: 'ListController.webcmd', - refedHandlers: [] - }; - this.domService.module.webcmds.push(loadDataCmd); - } - if (newFilterCommandId) { - loadDataCmd.refedHandlers.push( - { - host: newFilterCommandId, - handler: 'Filter' - } - ); - - } - } - - // 因为涉及到新增【ListController控制器】,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - - this.notifyService.success('添加成功'); - this.refreshFormService.refreshFormDesigner.next(); - } - modalPanel.close(); - }); - - } - - /** - * 组装拆分区块菜单 - */ - private assembleSplitLikeCardContentainerMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - const serv = new SplitLikeCardContainerContextMenuService(this.injector, this.cmpInstance); - - const show = serv.checkCanSplitLikeCardContainer(); - - if (!show) { - menuConfig = menuConfig.filter(menu => menu.id !== SPLIT_LIKE_CARD_CONTAINER_COMMAND); - } - - return menuConfig; - } - private splitLikeCardContainer() { - const serv = new SplitLikeCardContainerContextMenuService(this.injector, this.cmpInstance); - - serv.splitLikeCardContainer(); - - - this.refreshFormService.refreshFormDesigner.next(); - } - - /** - * 组装子表填充菜单 - */ - private assembleChildFillMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - - const serv = new ChildContainerFillService(this.injector, this.cmpInstance); - return serv.assembleChildFillMenu(menuConfig); - } - - - /** - * 启用子表填充 - */ - private enableChildContainerFill() { - - const serv = new ChildContainerFillService(this.injector, this.cmpInstance); - serv.enableChildContainerFill(this.cmpInstance.component); - - this.refreshFormService.refreshFormDesigner.next(); - - } - /** - * 关闭子表填充 - */ - private closeChildContainerFill() { - const serv = new ChildContainerFillService(this.injector, this.cmpInstance); - serv.closeChildContainerFill(this.cmpInstance.component); - - this.refreshFormService.refreshFormDesigner.next(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/child-container-fill.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/child-container-fill.ts deleted file mode 100644 index ceed50fa2a4106ad9287e43d6a57435a7bad3354..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/child-container-fill.ts +++ /dev/null @@ -1,354 +0,0 @@ -import { Injector } from '@angular/core'; -import { FarrisDesignBaseComponent, } from '@farris/designer-element'; -import { DgControl, DomService } from '@farris/designer-services'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; - -const CHILD_FILL_COMMAND = 'childContainerFill'; - -export class ChildContainerFillService { - private domService: DomService; - - private cmpInstance: FarrisDesignBaseComponent; - - constructor(private injector: Injector, cmpInstance: FarrisDesignBaseComponent) { - - this.domService = this.injector.get(DomService); - - this.cmpInstance = cmpInstance; - } - /** - * 组装子表填充菜单 - */ - public assembleChildFillMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - - // 只有内置卡片表单可以启用子表填充 - if (this.domService.module.templateId !== 'card-template') { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - - // 限定内容区域容器 - const className = this.cmpInstance.component.appearance && this.cmpInstance.component.appearance.class; - if (!className || !className.includes('f-page-main')) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - // 限定容器下只能有一个区块节点(like-card-container) - if (!this.cmpInstance.component.contents || this.cmpInstance.component.contents.length !== 1) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - const likeCardContainer = this.cmpInstance.component.contents[0]; - const likeCardContainerClassName = likeCardContainer.appearance && likeCardContainer.appearance.class; - if (!likeCardContainerClassName || !likeCardContainerClassName.includes('f-struct-like-card') || !likeCardContainer.isLikeCardContainer || !likeCardContainer.contents || !likeCardContainer.contents.length) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - - // 收集子表区域 - const childContainers = this.getChildContainers(likeCardContainer); - if (!childContainers.length) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - - // 判断当前是否已启用填充 - const childFillMenu = menuConfig.find(menu => menu.id === CHILD_FILL_COMMAND); - childFillMenu.title = (className.includes('f-page-child-fill') ? '关闭' : '启用') + childFillMenu.title; - childFillMenu.id = (className.includes('f-page-child-fill') ? 'close' : 'enable') + childFillMenu.id; - - return menuConfig; - } - - - /** - * 提取子表区域容器 - * @param childParentContainer 子表区域父节点 - */ - public getChildContainers(childParentContainer: any): any[] { - const childContainers = childParentContainer.contents.filter(container => { - const className = container.appearance && container.appearance.class; - if (!className || !className.includes('f-struct-wrapper') || container.type !== DgControl.ContentContainer.type) { - return; - } - const firstChildContent = container.contents && container.contents.length ? container.contents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 子表三层Tab容器 container-section-tab 或者子表分组容器:container-section-componentRef 或者子表分组多视图容器:container-section-MultiViewContainer - if (firstChildContent.type === DgControl.Section.type && (firstChildClassList.includes('f-section-in-main') || firstChildClassList.includes('f-section-in-mainsubcard'))) { - if (firstChildContent.contents && firstChildContent.contents.length === 1) { - const grandEle = firstChildContent.contents[0]; - if (grandEle.type === DgControl.Tab.type || grandEle.type === DgControl.ComponentRef.type || grandEle.type === DgControl.MultiViewContainer.type) { - return true; - } - } - } - }); - - return childContainers; - } - - /** - * 启用子表填充 - * @param parentContainer 子表父容器 - */ - public enableChildContainerFill(pageMainContainer: any) { - // 1、从表内容区域增加样式 - const className = pageMainContainer.appearance && pageMainContainer.appearance.class; - if (className && !className.includes('f-page-child-fill')) { - pageMainContainer.appearance.class += ' f-page-child-fill'; - } - - // 2、子表区域 - const childParentContainer = pageMainContainer.contents[0]; - let childContainers = []; - // 2.1子表的父容器是区块(f-struct-like-card)---场景是卡片模板 - if (childParentContainer.type === DgControl.ContentContainer.type && childParentContainer.appearance.class.includes('f-struct-like-card')) { - if (!childParentContainer.appearance.class.includes('f-struct-like-card-child-fill')) { - childParentContainer.appearance.class += ' f-struct-like-card-child-fill'; - } - childContainers = this.getChildContainers(childParentContainer); - } else { - // 2.2 子表的父容器是分栏面板的主区域SplitterPane----场景是列卡 - childContainers = this.getChildContainers(pageMainContainer); - } - - - - - childContainers.forEach(container => { - // 3、子表区域container增加样式 - const containerClassName = container.appearance && container.appearance.class; - if (containerClassName && containerClassName.includes('f-struct-wrapper') && !containerClassName.includes('f-struct-wrapper-child')) { - container.appearance.class += ' f-struct-wrapper-child'; - } - - // 4、分组面板Section启用填充 - const section = container.contents[0]; - if (section) { - section.fill = true; - } - const sectionChild = section.contents[0]; - - // 5.1、分组面板下是标签页 - if (sectionChild && sectionChild.type === DgControl.Tab.type) { - // 5.1.1 标签页启用填充 - sectionChild.contentFill = true; - - // 5.1.2 标签页下的组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild.contents) { - sectionChild.contents.forEach(tabPage => { - const cmpRef = tabPage.contents && tabPage.contents.find(co => co.type === DgControl.ComponentRef.type); - if (cmpRef) { - this.modifyDataGridInChildFill(cmpRef, true); - - } - const multiViewContainer = tabPage.contents && tabPage.contents.find(co => co.type === DgControl.MultiViewContainer.type); - if (multiViewContainer) { - this.modifyMultiViewContainerInChildFill(multiViewContainer, true); - } - }); - } - - - } - // 5.2、分组面板下是组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild && sectionChild.type === DgControl.ComponentRef.type) { - this.modifyDataGridInChildFill(sectionChild, true); - } - // 5.2、分组面板下是组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild && sectionChild.type === DgControl.MultiViewContainer.type) { - this.modifyMultiViewContainerInChildFill(sectionChild, true); - } - - - }); - - - } - - /** - * 子表启用填充后,修改DataGrid组件的样式 - * @param componentRef 组件ref - * @param flag 是否启用填充 - */ - private modifyDataGridInChildFill(componentRef: any, flag: boolean) { - const gridComponent = this.domService.getComponentById(componentRef.component); - if (!gridComponent || gridComponent.componentType !== 'dataGrid') { - return; - } - const dataGridParentContainer = this.domService.selectNode(gridComponent, item => item.type === DgControl.ContentContainer.type && - item.contents && item.contents.length && item.contents[0].type === DgControl.DataGrid.type); - - switch (flag) { - case true: { - // 1、 确保子表DataGrid父容器要有f-grid-is-sub样式 - if (dataGridParentContainer) { - if (!dataGridParentContainer.appearance) { - dataGridParentContainer.appearance = { class: 'f-grid-is-sub f-utils-flex-column' }; - } - if (!dataGridParentContainer.appearance.class) { - dataGridParentContainer.appearance.class = 'f-grid-is-sub f-utils-flex-column'; - } - if (!dataGridParentContainer.appearance.class.includes('f-grid-is-sub')) { - dataGridParentContainer.appearance.class += ' f-grid-is-sub'; - } - if (!dataGridParentContainer.appearance.class.includes('f-utils-flex-column')) { - dataGridParentContainer.appearance.class += ' f-utils-flex-column'; - } - } - - // 2、 子表DataGrid要关闭自动高度、新增填充标识 - const dataGrid = this.domService.selectNode(gridComponent, item => item.type === DgControl.DataGrid.type); - if (dataGrid) { - dataGrid.autoHeight = false; - dataGrid.isChildFill = true; - } - break; - } - case false: { - // 1、 子表DataGrid移除填充标识 - const dataGrid = this.domService.selectNode(gridComponent, item => item.type === DgControl.DataGrid.type); - if (dataGrid) { - delete dataGrid.isChildFill; - } - } - } - - - - - } - - /** - * 若子表启用了多视图,则要修改多视图的样式 - * @param multiViewContainer 多视图节点 - * @param flag 是否启用填充 - */ - private modifyMultiViewContainerInChildFill(multiViewContainer: any, flag: boolean) { - switch (flag) { - case true: { - // 多视图追加填充样式 - if (!multiViewContainer.appearance) { - multiViewContainer.appearance = { class: 'f-multiview-fill' }; - - } - if (!multiViewContainer.appearance.class) { - multiViewContainer.appearance.class = 'f-multiview-fill'; - } - if (!multiViewContainer.appearance.class.includes('f-multiview-fill')) { - multiViewContainer.appearance.class += ' f-struct-wrapper-child'; - } - - // 修改多视图内部的DataGrid组件样式 - multiViewContainer.contents.forEach(viewItem => { - if (viewItem.contents && viewItem.contents.length) { - viewItem.contents.forEach(co => { - if (co.type === DgControl.ComponentRef.type) { - this.modifyDataGridInChildFill(co, true); - } - }); - } - }); - - break; - } - case false: { - - if (multiViewContainer.appearance && multiViewContainer.appearance.class && multiViewContainer.appearance.class.includes('f-multiview-fill')) { - multiViewContainer.appearance.class = multiViewContainer.appearance.class.replace('f-multiview-fill', '').trim(); - } - // 修改多视图内部的DataGrid组件样式 - multiViewContainer.contents.forEach(viewItem => { - if (viewItem.contents && viewItem.contents.length) { - viewItem.contents.forEach(co => { - if (co.type === DgControl.ComponentRef.type) { - this.modifyDataGridInChildFill(co, false); - } - }); - } - }); - break; - } - } - - - } - - /** - * 关闭子表填充 - * @param parentContainer 子表父容器 - */ - public closeChildContainerFill(pageMainContainer: any) { - // 1、从表内容区域移除样式 - const className = pageMainContainer.appearance && pageMainContainer.appearance.class; - if (className && className.includes('f-page-child-fill')) { - pageMainContainer.appearance.class = pageMainContainer.appearance.class.replace('f-page-child-fill', '').trim(); - } - - // 2、子表区域 - const childParentContainer = pageMainContainer.contents[0]; - let childContainers = []; - // 2.1子表的父容器是区块(f-struct-like-card)---场景是卡片模板 - if (childParentContainer.type === DgControl.ContentContainer.type && childParentContainer.appearance.class.includes('f-struct-like-card')) { - if (childParentContainer.appearance.class.includes('f-struct-like-card-child-fill')) { - childParentContainer.appearance.class = childParentContainer.appearance.class.replace('f-struct-like-card-child-fill', '').trim(); - } - childContainers = this.getChildContainers(childParentContainer); - } else { - // 2.2 子表的父容器是分栏面板的主区域SplitterPane----场景是列卡 - childContainers = this.getChildContainers(pageMainContainer); - } - - childContainers.forEach(container => { - // 2、子表区域container移除样式 - const containerClassName = container.appearance && container.appearance.class; - if (containerClassName && containerClassName.includes('f-struct-wrapper') && containerClassName.includes('f-struct-wrapper-child')) { - container.appearance.class = container.appearance.class.replace('f-struct-wrapper-child', '').trim(); - } - - // 3、分组面板Section关闭填充 - const section = container.contents[0]; - if (section) { - section.fill = false; - } - - const sectionChild = section.contents[0]; - - - // 5.1、分组面板下是标签页 - if (sectionChild && sectionChild.type === DgControl.Tab.type) { - // 5.1.1 标签页启用填充 - sectionChild.contentFill = false; - - // 5.1.2 标签页下的组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild.contents) { - sectionChild.contents.forEach(tabPage => { - const cmpRef = tabPage.contents && tabPage.contents.find(co => co.type === DgControl.ComponentRef.type); - if (cmpRef) { - this.modifyDataGridInChildFill(cmpRef, false); - - } - const multiViewContainer = tabPage.contents && tabPage.contents.find(co => co.type === DgControl.MultiViewContainer.type); - if (multiViewContainer) { - this.modifyMultiViewContainerInChildFill(multiViewContainer, false); - } - }); - } - - - } - // 5.2、分组面板下是组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild && sectionChild.type === DgControl.ComponentRef.type) { - this.modifyDataGridInChildFill(sectionChild, false); - } - // 5.2、分组面板下是组件节点(ComponentRef):子表关闭自动高度 - if (sectionChild && sectionChild.type === DgControl.MultiViewContainer.type) { - this.modifyMultiViewContainerInChildFill(sectionChild, false); - } - }); - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/split-like-card-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/split-like-card-container.ts deleted file mode 100644 index 2a0803a161f1be1e4072519bb2fa5f43d2b6e3a1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/context-menu/services/split-like-card-container.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Injector } from '@angular/core'; -import { FarrisDesignBaseComponent, IControlService } from '@farris/designer-element'; -import { DesignerEnvType, DgControl, DomService, FormBasicService, RefreshFormService } from '@farris/designer-services'; -import { ControlService } from '../../../../../service/control.service'; - - -/** - * 将一个like-card-container区块拆分为多个区块 - */ -export class SplitLikeCardContainerContextMenuService { - private domService: DomService; - public formBasicServ: FormBasicService; - private controlService: IControlService; - - private cmpInstance: FarrisDesignBaseComponent; - - constructor(private injector: Injector, cmpInstance: FarrisDesignBaseComponent) { - - this.domService = this.injector.get(DomService); - // this.refreshFormService = this.injector.get(RefreshFormService); - // this.messagerService = this.injector.get(MessagerService); - this.controlService = this.injector.get(ControlService); - this.formBasicServ = this.injector.get(FormBasicService); - - this.cmpInstance = cmpInstance; - } - - /** - * 校验是否支持拆分区块 - */ - checkCanSplitLikeCardContainer(): boolean { - // 暂时只在零代码提供 - if (this.formBasicServ.envType !== DesignerEnvType.noCode) { - return false; - } - const containerSchema = this.cmpInstance.component || {}; - const parentSchema = this.cmpInstance.parent && this.cmpInstance.parent.component; - - const containerCls = containerSchema && containerSchema.appearance && containerSchema.appearance.class || ''; - const parentContainerCls = parentSchema && parentSchema.appearance && parentSchema.appearance.class || ''; - - // 1、容器样式必须包含f-struct-like-card,属性isLikeCardContainer=true; - if (!containerCls || !containerCls.includes('f-struct-like-card') || !containerSchema.isLikeCardContainer) { - return false; - } - // 2、区块内要包含多个子级 - if (!containerSchema.contents || !containerSchema.contents.length || containerSchema.contents.length < 2) { - return false; - } - - // 3、父级容器为ContentContainer且样式中要包含f-page-main - if (!parentSchema || !parentContainerCls || !parentContainerCls.includes('f-page-main')) { - return false; - } - - return true; - - } - - splitLikeCardContainer() { - - const containerSchema = this.cmpInstance.component || {}; - const parentSchema = this.cmpInstance.parent && this.cmpInstance.parent.component; - - let orignIndex = parentSchema.contents.findIndex(co => co.id === containerSchema.id); - - // 将卡片区块内除第一个外的子级,都拆分出去,并在外层包裹一个新的区块 - const contensShouldBeSplitted = containerSchema.contents.splice(1); - contensShouldBeSplitted.forEach(co => { - const container = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - - Object.assign(container, { - id: co.id + '-container', - appearance: { - class: 'f-struct-like-card' - }, - isLikeCardContainer: true, - contents: [co] - }); - parentSchema.contents.splice(orignIndex + 1, 0, container); - orignIndex++; - }); - - - // 若是零代码环境,还需要追加样式farris-multi-card-page - if (this.formBasicServ.envType === DesignerEnvType.noCode) { - const pageContainer = this.domService.selectNode(this.domService.components[0], item => { - if (item.id !== 'root-layout') { - return; - } - if (item.appearance && item.appearance.class && item.appearance.class.includes('f-page') && item.appearance.class.includes('farris-oa-page')) { - return true; - } - }); - - const cls = pageContainer && pageContainer.appearance && pageContainer.appearance.class; - if (pageContainer) { - if (!cls.includes('farris-multi-card-page')) { - pageContainer.appearance.class += ' farris-multi-card-page'; - - } - } - } - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/drag-drop/dragAndDrapManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/drag-drop/dragAndDrapManager.ts deleted file mode 100644 index ed33f34ea5087f443750c441b2cc51e185bdfe11..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/drag-drop/dragAndDrapManager.ts +++ /dev/null @@ -1,178 +0,0 @@ -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { DgControl } from '../../../../utils/dg-control'; -import { ComponentResolveContext, FormComponentType } from '@farris/designer-services'; - -export class ContainerDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - - private canAcceptChildContent = true; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(resolveContext: ComponentResolveContext): boolean { - - if (!this.canAcceptChildContent) { - return false; - } - return true; - } - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - const component = this.cmpInstance.component; - - // 控件本身样式 - const cmpClass = component.appearance && component.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 父级节点 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、顶层节点 - if (cmpClassList.includes('f-page')) { - this.canAcceptChildContent = false; - return true; - } - // 2、页头 - if (cmpClassList.includes('f-page-header')) { - this.canAcceptChildContent = false; - return true; - } - // 2、header标题模板的父级容器 - if (cmpClassList.includes('f-title') && parentClassList.includes('f-page-header-base') && firstChildContent && firstChildContent.type === DgControl.HtmlTemplate.type) { - this.canAcceptChildContent = false; - return true; - } - // 3、header标题模板的祖父级容器 - if (cmpClassList.includes('f-page-header-base') && parentClassList.includes('f-page-header') && firstChildClassList.includes('f-title')) { - this.canAcceptChildContent = false; - return true; - } - // 3、页面主区域 - if (cmpClassList.includes('f-page-main') && parentClassList.includes('f-page')) { - // 卡片类模板 - if (childContents.length === 1 && firstChildClassList.includes('f-struct-like-card')) { - this.canAcceptChildContent = false; - } - // 列卡类 - if (firstChildClassList.includes('f-page-content')) { - this.canAcceptChildContent = false; - } - // 滚动监听类 - if (firstChildContent && firstChildContent.type === DgControl.Scrollspy.type) { - this.canAcceptChildContent = false; - } - return true; - } - // 3、页面主区域like-card,若只有一个,那么不可移动、删除,但可以接收控件 - if (cmpClassList.includes('f-struct-like-card') && parent && parent.contents.length === 1 && parentClassList.includes('f-page-main')) { - return true; - } - // 4、隐藏子表DataGrid父级间距 - if (cmpClassList.includes('f-grid-is-sub') && parentClassList.includes('f-struct-is-subgrid') && firstChildClassList.includes('f-component-grid')) { - this.canAcceptChildContent = false; - return true; - } - // 4、子表三层父容器 container---section-tab 中container不接收新控件 - if (cmpClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-section-tabs')) { - if (firstChildContent.contents && firstChildContent.contents.length === 1) { - const tabEle = firstChildContent.contents[0]; - if (tabEle.type === DgControl.Tab.type) { - this.canAcceptChildContent = false; - } - } - } - - // 5、子表分组容器:container-section-componentRef - if (cmpClassList.includes('f-struct-wrapper') && (firstChildClassList.includes('f-section-in-main') || firstChildClassList.includes('f-section-in-mainsubcard'))) { - if (firstChildContent.type === DgControl.Section.type && firstChildContent.contents && firstChildContent.contents.length === 1) { - const cmpRefEle = firstChildContent.contents[0]; - if (cmpRefEle.type === DgControl.ComponentRef.type) { - this.canAcceptChildContent = false; - } - } - } - // 5、滚动监听容器 - if (parent && parent.contents.length > 1) { - const preSibling = parent.contents[0]; - const preSiblingType = preSibling && preSibling.type || ''; - if (cmpClassList.includes('f-scrollspy-content') && parentClassList.includes('f-page-main') && preSiblingType === DgControl.Scrollspy.type) { - this.canAcceptChildContent = false; - return true; - } - - } - // 5、填报模板的框架容器 - if (cmpClassList.includes('f-page-layout') && parentClassList.includes('f-page')) { - this.canAcceptChildContent = false; - return true; - } - // 5、填报模板的框架容器 - if (cmpClassList.includes('f-page-container') && parentClassList.includes('f-page-layout')) { - // this.canAcceptChildContent = false; - return true; - } - // 5、带导航的模板的框架容器 - if (cmpClassList.includes('f-page-content') && parentClassList.includes('f-page-main')) { - this.canAcceptChildContent = false; - return true; - } - // 5、带导航的模板的框架容器 - if (cmpClassList.includes('f-page-content-main') && parentClassList.includes('f-page-content')) { - this.canAcceptChildContent = false; - return true; - } - // 5、筛选条容器 - if (cmpClassList.includes('f-filter-container') && firstChildContent && firstChildContent.type === DgControl.ListFilter.type) { - this.canAcceptChildContent = false; - return true; - } - // 树组件模板、列表组件模板框架容器 - if (cmpClassList.includes('f-page-module')) { - this.canAcceptChildContent = false; - return true; - } - // 树组件模板、列表组件模板TreeGrid父级容器间距 - if (cmpClassList.includes('f-utils-fill-flex-column') && parent && parent.type === DgControl.Component.type && parentClassList.includes('f-utils-fill-flex-column')) { - if (firstChildContent && (firstChildContent.type === DgControl.TreeGrid.type || firstChildContent.type === DgControl.DataGrid.type)) { - this.canAcceptChildContent = false; - return true; - } - } - // ListView模板的框架容器 - if (cmpClassList.includes('farris-main-area') && parent && parent.type === DgControl.Component.type && parent.componentType === FormComponentType.Frame) { - this.canAcceptChildContent = false; - return true; - - } - - // ListView模板中ListView组件---ContentContainer---ListView 的三层结构 - if (parent && parent.type === DgControl.Component.type && (parent.componentType === FormComponentType.listView || parent.componentType === 'ListView') && firstChildContent && firstChildContent.type === DgControl.ListView.type) { - this.canAcceptChildContent = false; - return true; - - } - - // 多视图下的组件不允许移动、删除 - if (parent && parent.type === DgControl.MultiViewContainer.type) { - return true; - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/export.ts deleted file mode 100644 index a036566fe487359d34a93e57f3d8c7704066ec50..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdContainerComponent from './component/fd-container'; -import { ContentContainerSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdContainerTemplates from './templates'; - - -export const ContentContainer: ComponentExportEntity = { - type: 'ContentContainer', - component: FdContainerComponent, - template: FdContainerTemplates, - metadata: ContentContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/nocode-property-config.ts deleted file mode 100644 index 969ca032044d41c93e28319333a95554c10d5d97..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/nocode-property-config.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { NoCodeContainerUsualProp } from '../../common/property/nocode-container-property-config'; -import { ControlAppearancePropertyConfig } from '../../../../utils/appearance-property-config'; - -export class NoCodeContainerProp extends NoCodeContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 样式属性 - const stylePropConfigs = ControlAppearancePropertyConfig.getAppearanceStylePropConfigs(propertyData); - propertyConfig = propertyConfig.concat(stylePropConfigs); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/property-config.ts deleted file mode 100644 index b909059c90fb74dfa937624a1818886ea2de4d49..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/property/property-config.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlAppearancePropertyConfig } from '../../../../utils/appearance-property-config'; - -export class ContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - // const appearancePropConfig = this.getAppearancePropConfig(propertyData); - // propertyConfig.push(appearancePropConfig); - - // 样式属性 - const stylePropConfigs = ControlAppearancePropertyConfig.getAppearanceStylePropConfigs(propertyData); - propertyConfig = propertyConfig.concat(stylePropConfigs); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(propertyData); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'isScrollspyContainer', - propertyName: '被监听滚动的容器', - propertyType: 'boolean', - description: '是否为被监听页面滚动的容器', - defaultValue: false - }, - { - propertyID: 'scrollOffset', - propertyName: '节点偏移量(px)', - propertyType: 'number', - description: '滚动时每个节点的偏移量', - decimals: 0, - min: 0, - defaultValue: 0, - visible: propertyData.isScrollspyContainer - }, - - { - propertyID: 'isScrollCollapsibleArea', - propertyName: '滚动收折父容器', - propertyType: 'boolean', - description: '是否为滚动收折父容器', - defaultValue: false, - readonly: propertyData.isScrollArea - }, - { - propertyID: 'isScrollArea', - propertyName: '滚动收折父容器下的滚动区域', - propertyType: 'boolean', - description: '是否为滚动收折父容器下的滚动区域', - defaultValue: false, - readonly: propertyData.isScrollCollapsibleArea - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'isScrollspyContainer': { - const scrollOffset = this.properties.find(p => p.propertyID === 'scrollOffset'); - if (scrollOffset) { - scrollOffset.visible = changeObject.propertyValue; - } - break; - } - case 'isScrollCollapsibleArea': { - const isScrollArea = this.properties.find(p => p.propertyID === 'isScrollArea'); - if (isScrollArea) { - isScrollArea.readonly = changeObject.propertyValue; - - propertyData.isScrollArea = changeObject.propertyValue ? false : propertyData.isScrollArea; - changeObject.relateChangeProps = [{ - propertyID: 'isScrollArea', - propertyValue: propertyData.isScrollArea - }]; - } - - break; - } - case 'isScrollArea': { - const isScrollCollapsibleArea = this.properties.find(p => p.propertyID === 'isScrollCollapsibleArea'); - if (isScrollCollapsibleArea) { - isScrollCollapsibleArea.readonly = changeObject.propertyValue; - - propertyData.isScrollCollapsibleArea = changeObject.propertyValue ? false : propertyData.isScrollCollapsibleArea; - changeObject.relateChangeProps = [{ - propertyID: 'isScrollCollapsibleArea', - propertyValue: propertyData.isScrollCollapsibleArea - }]; - } - break; - } - } - - - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/schema/schema.ts deleted file mode 100644 index b1c311963ed14d1e20bbde2b0d2a466bc8776e6a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/schema/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const ContentContainerSchema = { - id: 'contentContainer', - type: 'ContentContainer', - appearance: null, - visible: true, - contents: [], - isScrollspyContainer: false, - isLikeCardContainer: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/form.ts deleted file mode 100644 index f77d126313221e3291b4daa8953d7253986b8938..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/content-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.css deleted file mode 100644 index af4d2a58c725ba6601e678b61c11505d8bd262af..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.css +++ /dev/null @@ -1,44 +0,0 @@ -.entityDiv { - padding: 16px; - border: 1px solid #EFEFEF; - border-radius: 8px; - margin-bottom: 16px; - /* border-top: 0 !important; */ -} - -.fieldsDiv { - padding: 0 16px 16px 16px; -} - -.fieldsDiv>>>tr[ng-reflect-select-row-disabled=true] { - cursor: not-allowed; -} - -.fieldsDiv>>>tr td { - padding: 0.25rem 0.75rem; -} - -.entityDiv>>>tr[ng-reflect-select-row-disabled=true] { - cursor: not-allowed; -} - -.template { - margin: 0 10px; - text-align: center; - height: 300px; -} - -.template.active { - border-color: #2A87FF !important; -} - -.template .imgPanel { - height: 250px; - margin-bottom: 10px; - overflow: auto; - -} - -.template img { - max-width: 100%; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.html deleted file mode 100644 index 6dffd427a17db8d63a5c2dd9f1d85005e37974b1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -
    - -
    - - -
    -
    - - -
    -
    -
    -
    无法显示图片
    -
    {{template.title}}
    -
    -
    -
    - - -
    -
    - - - - - {{col.title}} - {{col.title}} -
    - - -
    -
    - - -
    - - - - - - - {{rowData.name}} - - - {{rowData.bindingField}} - - - {{rowData.type.displayName || - rowData.type.name}} - -
    - - -
    - - -
    -
    -
    -
    - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.ts deleted file mode 100644 index e0b34819ba3c1e099eba4011411bbe99092907b9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component.ts +++ /dev/null @@ -1,573 +0,0 @@ -import { Component, EventEmitter, HostBinding, NgZone, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { cloneDeep } from 'lodash-es'; -import { TreeTableComponent } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { DomService, FormSchemaEntity, FormSchemaEntityField, SchemaService, FormBindingType, FormComponent, FormViewModel } from '@farris/designer-services'; -import { ControlService } from '../../../../../../service/control.service'; -import { Subject } from 'rxjs'; -import { HttpClient } from '@angular/common/http'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { TableFillInFormTempalteService } from './services/table-fillin-template.service'; - -/** - * 动态面板构造类 - */ -export class DynamicAreaItemBuildInfo { - dynamicItem: any; - components?: FormComponent[]; - viewModels?: FormViewModel[]; -} - -/** - * 预制的组件模板结构 - */ -export class DynamicTemplateJson { - id: string; - title: string; - - /** 模板内容 */ - contents: any[]; - - /** 模板中涉及的子组件 */ - components?: FormComponent[]; -} - -/** - * 动态面板新增窗口 - */ -@Component({ - selector: 'app-create-dynamic-item', - templateUrl: './create-dynamic-item.component.html', - styleUrls: ['./create-dynamic-item.component.css'], - providers: [TableFillInFormTempalteService] -}) -export class CreateDynamicItemComponent implements OnInit { - - @Output() save = new EventEmitter(); - - @Output() cancel = new EventEmitter(); - - @HostBinding('class') - cls = 'd-flex f-utils-fill-flex-column h-100'; - - @ViewChild('btns') btns: TemplateRef; - - /** 步骤条数据 */ - stepMessages = []; - /** 当前选中步骤id */ - currentStepId = 'selectTemplates'; - /** 当前选中步骤索引 */ - activeStepIndex = 0; - - /** 当前表单schema实体 */ - schemaEntity; - - /** 实体树表数据源 */ - schemaSource = []; - /** 实体树表列配置 */ - schemaTreeColumns = [{ field: 'name', title: '名称' }]; - /** 选中的实体表 */ - selectedEntity: FormSchemaEntity; - /** 选中的表节点(树节点) */ - selectedEntityTreeNode; - /** 是否选中主表 */ - isSelectMainTable = false; - /** 主实体label */ - mainEntityLabel: string; - // 实体树表实例 - @ViewChild('schemaTree') schemaTree: TreeTableComponent; - - /** 系统预制的组件模板列表 */ - componentTemplates: any[]; - /** 选中的模板 */ - selectedTemplate: any; - /** 选中模板的JSON结构 */ - selectedTempalteJson: DynamicTemplateJson; - - - /** 展示字段树表实例 */ - @ViewChild('fieldsTree') fieldsTree: TreeTableComponent; - /** 展示字段树表数据源 */ - fieldsSource = []; - /** 展示字段树表列配置 */ - filedsTreeColumns = [ - { field: 'name', title: '字段名称' }, { field: 'bindingField', title: '绑定字段' }, - { field: 'type', title: '字段类型', width: 100 }, { field: 'show', title: '显示', width: 120 } - ]; - /** 是否全选字段 */ - selectedAllFields = false; - /** 字段勾选配置 */ - selected = {}; - /** 选中的字段 */ - selectedFields = []; - - /** 组件的构造信息 */ - buildInfo: DynamicAreaItemBuildInfo = null; - - /** 表单中已添加的字段集合,用于添加组件时排除掉页面中同类型组件中已有的字段 */ - displayedFieldsMap = new Map(); - - /** 选中的实体下是否包含可勾选的字段,用于没有可选字段时不显示全选按钮 */ - hasSelectableFields = false; - - constructor( - private notifyService: NotifyService, - private domServ: DomService, - private controlServ: ControlService, - private schemServ: SchemaService, - private http: HttpClient, - private tableFillInService: TableFillInFormTempalteService, - private ngZone: NgZone) { } - - ngOnInit() { - this.initProgressData(); - // 现有的schema实体 - const entityOrigin = this.schemServ.getSchemaEntities(); - this.schemaEntity = cloneDeep(entityOrigin); - - this.assembleSchemaSource(); - - this.getComponentTemplates(); - this.selectedTemplate = null; - } - - - /** - * 步骤条信息 - */ - private initProgressData() { - this.stepMessages = [ - { - id: 'selectTemplates', - title: '选择组件模板' - }, - { - id: 'selectTable', - title: '选择实体' - }, - { - id: 'selectShowFields', - title: '选择字段' - } - ]; - - } - /** - * 组装实体树 - */ - assembleSchemaSource() { - const schemaTree = this.assembleSchemaBasicInfo2Tree(this.schemaEntity[0], 1); - this.schemaSource = [schemaTree]; - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.schemaTree.selectNode(schemaTree.data.id); - }); - }); - } - - /** - * 将schema实体组装成树 - * 规则: 卡片类型组件只能选择主表,列表类型组件只能选择从表 - */ - private assembleSchemaBasicInfo2Tree(schemaEntity: FormSchemaEntity, level: number) { - const result = { - data: schemaEntity, - expanded: true, - children: [], - selectable: true - }; - - if (schemaEntity.type.entities && schemaEntity.type.entities.length) { - const childTable = schemaEntity.type.entities.map(ele => this.assembleSchemaBasicInfo2Tree(ele, level + 1)); - result.children = result.children.concat(childTable); - } - - return result; - } - - /** - * 切换选中的实体节点 - */ - selectedEntityChanged(selectedEntityNode: any) { - - this.selectedEntityTreeNode = selectedEntityNode.node; - this.isSelectMainTable = !selectedEntityNode.node.parent; - } - /** - * 上一步 - */ - clickPreStep() { - this.activeStepIndex = this.activeStepIndex - 1; - this.currentStepId = this.stepMessages[this.activeStepIndex].id; - } - - /** - * 下一步 - */ - clickNextStep() { - switch (this.currentStepId) { - case 'selectTemplates': { - if (!this.selectedTemplate) { - this.notifyService.warning('请先选择组件模板'); - return; - } - this.getSelectedTemplateJson().subscribe(() => { - this.goToNextSetp(); - }) - break; - } - case 'selectTable': { - if (!this.schemaTree.selectedRow) { - this.notifyService.warning('请先选择实体'); - return; - } - // 获取选中实体 - this.selectedEntity = this.schemaTree.selectedRow.data; - - // 获取表单中已有的字段控件 - this.displayedFieldsMap.clear(); - this.getDisplayedFieldsMapBySelectedEntity(); - this.hasSelectableFields = false; - - // 组装字段树列表 - const fields = this.selectedEntity.type.fields; - this.fieldsSource = this.assembleFields2Tree(fields, true); - - this.goToNextSetp(); - break; - } - } - - } - private goToNextSetp() { - this.activeStepIndex = this.activeStepIndex + 1; - this.currentStepId = this.stepMessages[this.activeStepIndex].id; - } - /** - * schema字段集合组装成树 - * @param fields schema字段集合 - */ - private assembleFields2Tree(fields: FormSchemaEntityField[], expandRelateNode = true) { - const treeData = []; - fields.forEach(element => { - // 关联表字段 / UDT字段 - let children = []; - if (element.type && element.type.fields && element.type.fields.length > 0) { - children = this.assembleFields2Tree(element.type.fields, true); - } - const selectable = this.displayedFieldsMap ? - children.length === 0 && !this.displayedFieldsMap.has(element.id) : children.length === 0; - - if (selectable) { - this.hasSelectableFields = true; - } - - treeData.push({ - data: element, - children, - expanded: expandRelateNode, - selectable - }); - }); - return treeData; - } - - /** - * 获取指定实体中已在当前表单中被占用的字段,场景:创建卡片组件时将已在其他组件中添加的字段排除掉 - */ - private getDisplayedFieldsMapBySelectedEntity() { - if (!this.selectedEntity) { - this.displayedFieldsMap.clear(); - return; - } - let targetComponentType = null; - if (this.selectedTempalteJson && this.selectedTempalteJson.components && this.selectedTempalteJson.components.length > 0) { - targetComponentType = this.selectedTempalteJson.components[0].componentType; - } - this.domServ.viewmodels.forEach(viewModel => { - if (!viewModel.fields || viewModel.fields.length === 0) { - return; - } - const componentNode = this.domServ.getComponentByVMId(viewModel.id); - // 绑定同一个实体,并且是同类型的组件(form类、dataGrid类...) - if (componentNode.componentType !== targetComponentType) { - return; - } - const entityInfo = this.schemServ.getTableInfoByViewModelId(viewModel.id); - if (entityInfo.id === this.selectedEntity.id) { - viewModel.fields.forEach(field => { - this.displayedFieldsMap.set(field.id, true); - }); - } - }); - - } - /** - * 获取模板列表 - * @param type 控件类型 - */ - private getComponentTemplates() { - - this.http.get('assets/form/component-template/component-templates.json').subscribe(data => { - if (data) { - this.componentTemplates = cloneDeep(data); - } - }); - } - - /** - * 获取模板列表 - * @param type 控件类型 - */ - private getSelectedTemplateJson(): Subject { - const subject = new Subject(); - - this.http.get(this.selectedTemplate.domJson).subscribe(data => { - if (data) { - this.selectedTempalteJson = data; - subject.next(); - } else { - this.notifyService.warning('组件模板不存在!'); - return; - } - }); - return subject; - } - - changeSelectedTemplate(template: any) { - this.selectedTemplate = template; - } - /** - * 取消 - */ - clickCancel() { - this.cancel.emit(); - } - - /** - * 触发保存 - */ - clickSave() { - if (!this.selectedTemplate) { - this.notifyService.warning('请先选择组件模板'); - return; - } - - if (this.selectedFields.length === 0) { - this.notifyService.warning('请先选择字段'); - return; - } - - // this.http.get(this.selectedTemplate.domJson).subscribe(data => { - // if (data) { - // this.selectedTempalteJson = data; - this.createDynamicItem(); - - this.save.emit(this.buildInfo); - // } else { - // this.notifyService.warning('组件模板不存在!'); - // return; - // } - // }); - - } - - - private createDynamicItem() { - const idSuffix = Math.random().toString(36).slice(2, 6); - this.buildInfo = new DynamicAreaItemBuildInfo(); - - const dynamicItemMetadata = this.controlServ.getControlMetaData(DgControl.DynamicAreaItem.type); - dynamicItemMetadata.id = 'dynamicItem' + '_' + idSuffix; - dynamicItemMetadata.title = this.selectedEntity.type.displayName; - - this.resolveContentsInTemplate(); - - // 为了防止导入模板后ID重复,重置控件ID - this.resetTemplateControlId(this.selectedTempalteJson.contents, idSuffix); - if (this.selectedTempalteJson.components) { - this.resetTemplateControlId(this.selectedTempalteJson.components, idSuffix); - } - - // 将模板内容添加到动态面板下 - dynamicItemMetadata.contents = this.selectedTempalteJson.contents; - this.buildInfo.dynamicItem = dynamicItemMetadata; - - // 若模板中包含子组件,则需要为子组件创建视图模型 - if (this.selectedTempalteJson.components) { - const viewModels = []; - this.selectedTempalteJson.components.forEach(c => { - const viewModel = this.addViewModel(c); - viewModels.push(viewModel); - }); - - this.buildInfo.viewModels = viewModels; - this.buildInfo.components = this.selectedTempalteJson.components; - } - - // 为控件增加命令绑定 - this.addCommandsToControl(this.selectedTempalteJson.components); - - } - /** - * 为控件绑定命令,需要根据模板区分 - */ - private addCommandsToControl(components: FormComponent[]) { - switch (this.selectedTempalteJson.id) { - case 'table-batch-fill-in-component': { - this.tableFillInService.addCommandsToTableBatchComponent(components[0].viewModel); - break; - } - } - } - /** - * 修改basicFormViewModel,添加字段,默认无分组 - */ - private addViewModel(component: any) { - const viewModel = new FormViewModel(); - viewModel.id = viewModel.code = component.viewModel; - viewModel.name = this.selectedEntity.type.displayName || this.selectedEntity.type.name; - - viewModel.bindTo = this.getEntityInfoDataSource(this.schemaEntity); - viewModel.parent = 'root-viewmodel'; - viewModel.commands = []; - - // 将字段添加到视图模型 - viewModel.fields = []; - viewModel.states = []; - viewModel.enableValidation = true; - this.selectedFields.forEach(element => { - viewModel.fields.push({ - type: FormBindingType.Form, - id: element.id, - fieldName: element.bindingField, - groupId: null, - groupName: null - }); - }); - - // 为模型添加命令,需要根据模板区分 - switch (this.selectedTempalteJson.id) { - case 'table-batch-fill-in-component': { - this.tableFillInService.addCommandsToTableViewModel(component, viewModel); - break; - } - } - - // 为模型增加状态机 - const stateMachines = this.domServ.module.stateMachines; - if (stateMachines && stateMachines.length) { - viewModel.stateMachine = stateMachines[0].id; - } - - return viewModel; - } - /** - * 根据实体label获取用于viewModel的bindTo属性 - */ - private getEntityInfoDataSource(entities: FormSchemaEntity[], labelPath = ''): any { - if (!entities || entities.length === 0) { - return; - } - - const parentLabelPath = labelPath; - for (const entity of entities) { - const entityType = entity.type; - labelPath = parentLabelPath === '' ? entity.label : parentLabelPath + '/' + entity.label; - - this.mainEntityLabel = !this.mainEntityLabel ? entity.label : this.mainEntityLabel; - - if (this.selectedEntity.label === entity.label) { - const bindTo = labelPath.replace(this.mainEntityLabel, ''); - return bindTo === '' ? '/' : bindTo; - } - if (entityType.entities && entityType.entities.length > 0) { - const bindTo = this.getEntityInfoDataSource(entityType.entities, labelPath); - if (bindTo) { - return bindTo; - } - } - } - } - /** - * 重置控件id - * @param contents - * @param idSuffix - */ - private resetTemplateControlId(contents: any[], idSuffix: string) { - contents.forEach(c => { - if (c.type === DgControl.ComponentRef.type) { - c.component = this.selectedEntity.label + '-' + idSuffix + '-component'; - } - if (c.type === DgControl.Component.type) { - c.id = this.selectedEntity.label + '-' + idSuffix + '-component'; - c.viewModel = this.selectedEntity.label + '-' + idSuffix + '-viewmodel'; - } else { - c.id = c.id + '-' + idSuffix; - } - if (c.contents) { - this.resetTemplateControlId(c.contents, idSuffix); - } - if (c.type === DgControl.Table.type && c.rows) { - c.rows.forEach(row => { - if (row.columns) { - this.resetTemplateControlId(row.columns, idSuffix); - } - }); - - } - - }); - } - - - private resolveContentsInTemplate() { - switch (this.selectedTemplate.id) { - case 'table-fill-in-component': case 'table-batch-fill-in-component': { - this.tableFillInService.resolveTemplate(this.selectedTempalteJson, this.selectedEntity, this.selectedFields); - break; - } - } - } - - clickSelectAllFieldsCheckbox() { - this.selectedFields = []; - this.selectAllChange(this.fieldsSource); - - } - - selectAllChange(fieldsSource) { - if (fieldsSource.length === 0) { - return; - } - fieldsSource.forEach(fieldTreeNode => { - const bindingField = fieldTreeNode.data.bindingField; - if (fieldTreeNode.children && fieldTreeNode.children.length > 0) { - this.selectAllChange(fieldTreeNode.children); - } else { - if (fieldTreeNode.selectable) { - this.selected[bindingField] = this.selectedAllFields; - if (this.selectedAllFields) { - this.selectedFields.push(fieldTreeNode.data); - } - } - - } - }); - } - - clickCheckbox(flag: boolean, rowData: any) { - if (flag) { - this.selectedFields.push(rowData); - const fieldCheckboxCount = this.fieldsTree.el.nativeElement.getElementsByClassName('k-checkbox').length - 1; - if (this.selectedFields.length === fieldCheckboxCount) { - this.selectedAllFields = true; - } - } else { - this.selectedFields = this.selectedFields.filter(f => f.bindingField !== rowData.bindingField); - this.selectedAllFields = false; - } - } -} - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/services/table-fillin-template.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/services/table-fillin-template.service.ts deleted file mode 100644 index 0fd01ddc431d6c3d941a2c4942db0ca0abc32466..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/editor/create-dynamic-item/services/table-fillin-template.service.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { Injectable, Injector } from '@angular/core'; -import { IdService } from '@farris/ui-common'; -import { DomService, FormViewModel, FormSchemaEntity, FormSchemaEntityField, DesignerHostSettingService } from '@farris/designer-services'; -import { DgControl } from '../../../../../../../utils/dg-control'; -import { ControlService } from '../../../../../../../service/control.service'; - - -@Injectable() -export class TableFillInFormTempalteService { - - private contents; - private components; - private selectedEntity: FormSchemaEntity; - // private mainEntityLabel: string; - - private addBtnCode; - private deleteBtnCode; - - controlCreatorService: any; - constructor( - private idService: IdService, - private controlService: ControlService, - designerHostService: DesignerHostSettingService, - private domService: DomService) { - this.controlCreatorService = designerHostService.designerHost.getService('ControlCreatorService'); - } - - resolveTemplate(domJson: any, selectedEntity: FormSchemaEntity, selectedFields: FormSchemaEntityField[]) { - - this.contents = domJson.contents; - this.components = domJson.components; - this.selectedEntity = selectedEntity; - // this.mainEntityLabel = mainEntityLabel; - - this.setTitle(); - this.setSectionTitle(); - this.setTableColumns(selectedFields); - - } - - private setTitle() { - const title = this.domService.selectNode(this.contents[0], (item) => item.id.startsWith('page-header-title')); - if (title) { - title.html = title.html.replace('${title}', this.selectedEntity.type.displayName); - } - - } - private setSectionTitle() { - const section = this.domService.selectNode(this.components[0], item => item.type === DgControl.Section.type); - if (section) { - section.mainTitle = this.selectedEntity.type.displayName; - } - - } - private setTableColumns(selectedFields: FormSchemaEntityField[]) { - const table = this.domService.selectNode(this.components[0], item => item.type === 'Table'); - if (!table) { return; } - - - - table.rows = []; - // 计算table行数 - let rowCounts = selectedFields.length / 2 + 0.5; - rowCounts = parseInt(rowCounts + '', 10); - - for (let rowIndex = 0, fieldCount = 0; rowIndex < rowCounts; rowIndex++) { - let columns = []; - for (let index = 0; index < 2; index++) { - const field = fieldCount < selectedFields.length ? selectedFields[fieldCount] : null; - const labelTds = this.createLabelTd(field); - const editorTds = this.createEditorTd(field); - columns = columns.concat(labelTds).concat(editorTds); - - fieldCount++; - } - - table.rows.push({ - id: this.idService.generate(), - type: 'TableRow', - columns - }); - - } - } - - - private createLabelTd(field: any): any[] { - const tdMetadata = this.controlService.getControlMetaData('TableTd'); - tdMetadata.tdType = 'staticText'; - tdMetadata.appearance.class = 'farris-group-wrap--label'; - tdMetadata.id = this.idService.generate(); - - if (field) { - tdMetadata.staticText.text = field.name; - tdMetadata.staticText.require = field.require; - } - - return [tdMetadata]; - } - private createEditorTd(field: any) { - // 可编辑单元格 - const tdMetadata = this.controlService.getControlMetaData('TableTd'); - tdMetadata.id = this.idService.generate(); - tdMetadata.tdType = 'editor'; - tdMetadata.colspan = 2; - tdMetadata.appearance.class = 'farris-group-wrap--input'; - let metadata; - if (field && field.editor) { - metadata = this.controlCreatorService.createTableTdControlBySchemaFeild(field); - tdMetadata.editor = metadata; - } - - // 隐藏单元格 - const invisibleTd = this.controlService.getControlMetaData('TableTd'); - invisibleTd.id = this.idService.generate(); - invisibleTd.invisible = true; - invisibleTd.markCol = 1; - invisibleTd.markRow = 0; - - return [tdMetadata, invisibleTd]; - - - } - - - /** - * 将命令添加到视图模型 - * @param componentId - * @param bindTo - * @param templateId - */ - addCommandsToTableViewModel(componentId: string, viewModel: FormViewModel) { - const tableCode = this.selectedEntity.code.toLowerCase(); - // const tableLabel = this.selectedEntity.label; - // let parentBindTo = ''; - // 从从表 - // if (viewModel.bindTo.lastIndexOf('/') > 0) { - // parentBindTo = viewModel.bindTo.slice(0, viewModel.bindTo.indexOf(tableLabel) - 1); - // } - this.addBtnCode = tableCode + 'Add' + Math.random().toString(36).slice(2, 6); - this.deleteBtnCode = tableCode + 'Remove' + Math.random().toString(36).slice(2, 6); - - viewModel.commands = viewModel.commands.concat([ - { - id: this.idService.generate(), - code: this.addBtnCode, - name: '增加一条子表数据', - params: [], - handlerName: 'AddItem', - cmpId: '8172a979-2c80-4637-ace7-b13074d3f393', - extensions: [ - ] - }, - { - id: this.idService.generate(), - code: this.deleteBtnCode, - name: '删除一条子表数据', - params: [ - { - name: 'id', - shownName: '数据id', - value: '{EVENTPARAM~/context/id}' - } - ], - handlerName: 'RemoveItem', - cmpId: '8172a979-2c80-4637-ace7-b13074d3f393', - extensions: [] - }]); - - // 在命令构件的引用信息中记录子表的命令对构件方法的引用。 - const webcmds = this.domService.getWebCmds(); - for (const command of viewModel.commands) { - const webcmd = webcmds.find(item => item.id === command.cmpId); - if (!webcmd) { - continue; - } - webcmd.refedHandlers.push({ host: command.id, handler: command.handlerName }); - } - } - - - /** - * 为批量编辑表格模板增加“删除”和“新增”命令,因为不确定模板最终应用的表单类型,所以没有在模板中定义这些命令 - */ - addCommandsToTableBatchComponent(viewModelId: string) { - - // 新增按钮是放在根组件上的,但命令是放在子组件里的,所以这里click绑定要增加路径信息 - const addBtn = this.domService.selectNode(this.contents[1], item => item.type === DgControl.Button.type && item.id.startsWith('add-btn')); - if (addBtn) { - addBtn.click = `root-viewmodel.${viewModelId}.${this.addBtnCode}`; - - } - const section = this.domService.selectNode(this.components[0], item => item.type === DgControl.Section.type); - if (section && section.toolbar && section.toolbar.contents) { - section.toolbar.contents[0].click = this.deleteBtnCode;; - } - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/fd-dynamic-area.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/fd-dynamic-area.ts deleted file mode 100644 index 225b557feb1c7b093be3801e41c5e391fb148a2c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/component/fd-dynamic-area.ts +++ /dev/null @@ -1,309 +0,0 @@ -import { DynamicAreaSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DynamicAreaProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { CreateDynamicItemComponent, DynamicAreaItemBuildInfo } from './editor/create-dynamic-item/create-dynamic-item.component'; -import { DomService } from '@farris/designer-services'; -import { DgControl } from '../../../../utils/dg-control'; - -/** - * 动态区域,可以添加预制模板 - */ -export default class FdDynamicAreaComponent extends FdContainerBaseComponent { - - /* 标识每个标签页项label的key值 */ - get tabPageLinkKey(): string { - return `tabNav-${this.key}`; - } - /* 标识标签页项删除图标的key值 */ - get tabPageRemoveLinkKey(): string { - return `tabRemove-${this.key}`; - } - /* 标识添加标签页图标的key值 */ - get addIconLinkKey(): string { - return `tabAdd-${this.key}`; - } - /* 标识每个标签页项主体的key值 */ - get tabPageBodyKey(): string { - return `tabBody-${this.key}`; - } - - /** 当前选中标签页id */ - selectedTabPageId: string; - - /** 标签页项的组件实例 */ - tabPageComponents: any[]; - - constructor(component: any, options: any) { - super(component, options); - - this.customToolbarConfigs = [ - { - id: 'addDynamicItem', - title: '新增面板', - icon: 'f-icon f-icon-add', - click: (e) => { - e.stopPropagation(); - this.addDynamicItem(); - } - } - ]; - } - - getDefaultSchema(): any { - return DynamicAreaSchema; - } - - getTemplateName(): string { - return 'DynamicArea'; - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement): boolean { - return false; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: DynamicAreaProp = new DynamicAreaProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - - init(): void { - this.components = []; - this.tabPageComponents = []; - let firstTabPageId = ''; - // this.tabPages = []; - this.component.contents.forEach((tabPage, index) => { - this.tabPageComponents[index] = []; - tabPage.contents = tabPage.contents || []; - tabPage.contents.forEach((comp) => { - const tabPageComponent: any = this.createComponent(comp, this.options, null); - this.tabPageComponents[index].push(tabPageComponent); - }); - firstTabPageId = firstTabPageId ? firstTabPageId : tabPage.id; - }); - - this.selectedTabPageId = this.component.selectedTabId || firstTabPageId; - } - - render(): any { - - return super.render(this.renderTemplate('DynamicArea', { - tabComponents: this.tabPageComponents.map(tabPage => this.renderComponents(tabPage)), - selectedTabPageId: this.selectedTabPageId, - tabPageLinkKey: this.tabPageLinkKey, - tabPageRemoveLinkKey: this.tabPageRemoveLinkKey, - addIconLinkKey: this.addIconLinkKey, - tabPageBodyKey: this.tabPageBodyKey - })); - } - - - attach(element: any): any { - this.loadRefs(element, { - [this.tabPageLinkKey]: 'multiple', - [this.tabPageRemoveLinkKey]: 'multiple', - [this.tabPageBodyKey]: 'multiple', - [this.addIconLinkKey]: 'single', - }); - - const superAttach: any = super.attach(element); - - // 注册面板项切换事件 - this.refs[this.tabPageLinkKey].forEach((tabLink, index) => { - this.addEventListener(tabLink, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - this.setTabPage(index); - - }); - }); - - // 注册面板项删除事件 - this.refs[this.tabPageRemoveLinkKey].forEach((tabLink, index) => { - this.addEventListener(tabLink, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - this.removeDynamicItem(index); - }); - }); - - // 注册面板项新增事件 - this.addEventListener(this.refs[this.addIconLinkKey], 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - this.addDynamicItem(); - }); - - // 加载每个面板项下面的子组件 - this.refs[this.tabPageBodyKey].forEach((tab, index) => { - this.attachComponents(tab, this.tabPageComponents[index], this.component.contents[index].contents); - }); - - return superAttach; - } - - /** - * 切换标签页 - * @param index 标签页索引 - */ - private setTabPage(index: number) { - if ( - !this.tabPageComponents || - !this.tabPageComponents[index] - ) { - return; - } - - this.selectedTabPageId = this.component.contents[index].id; - - this.redraw(); - } - - /** - * 删除面板项 - * @param index 待删除面板索引 - */ - private removeDynamicItem(index: number) { - const dynamicItem = this.component.contents[index]; - const serviceHost = this.options.designerHost; - const msgService = serviceHost.getService('MessagerService'); - const domService = serviceHost.getService('DomService'); - const refreshFormService = serviceHost.getService('RefreshFormService'); - - - msgService.question('确定删除【' + dynamicItem.title + '】下的所有组件吗?', () => { - - // 移除内部组件 - this.checkComponentInDynamicItem(dynamicItem, domService); - // 移除面板项 - this.component.contents.splice(index, 1); - // 修改选中面板 - if (this.selectedTabPageId === dynamicItem.id) { - this.component.selectedTabId = this.component.contents.length ? this.component.contents[0].id : ''; - } - // 触发页面刷新 - refreshFormService.refreshFormDesigner.next(); - - }); - } - /** - * 面板中包含Component组件,需要移除相关的Component和ViewModel - * @param rawDynamicItem 待移除的面板 - */ - private checkComponentInDynamicItem(rawDynamicItem: any, domService: DomService) { - const componentRefs = []; - - this.selectComponentRefNode(rawDynamicItem, componentRefs); - - if (componentRefs.length) { - componentRefs.forEach(ref => { - const cmp = domService.getComponentById(ref.component); - - domService.deleteComponent(ref.component); - domService.deleteViewModelById(cmp.viewModel); - }); - - } - } - - /** - * 根据指定的条件遍历查找节点 - * @param rootNode 容器节点 - * @param predict 条件 - */ - selectComponentRefNode(rootNode: any, componentRefs: any[]) { - if (!rootNode) { - return; - } - if (rootNode.type === DgControl.ComponentRef.type) { - componentRefs.push(rootNode); - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - this.selectComponentRefNode(item, componentRefs); - } - } - return; - } - /** - * 新增面板项 - */ - private addDynamicItem() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - const refreshFormService = serviceHost.getService('RefreshFormService'); - - const compFactory = resolver.resolveComponentFactory(CreateDynamicItemComponent); - const compRef = compFactory.create(injector); - - const modalConfig = { - title: '新增动态面板', - width: 900, - height: 600, - showButtons: true, - buttons: compRef.instance.btns, - resizable: false - }; - - - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.cancel.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.save.subscribe((data) => { - if (data) { - this.addNodesToForm(data); - - refreshFormService.refreshFormDesigner.next(); - } - - modalPanel.close(); - }); - - } - /** - * 创建新面板 - * @param data 面板构造信息 - */ - private addNodesToForm(data: DynamicAreaItemBuildInfo) { - const { dynamicItem, components, viewModels } = data; - if (!dynamicItem) { - return; - } - const serviceHost = this.options.designerHost; - const domService = serviceHost.getService('DomService'); - this.component.contents.push(dynamicItem); - - if (components && components.length) { - components.forEach(c => { - domService.addComponent(c); - }); - - } - if (viewModels && viewModels.length) { - viewModels.forEach(v => { - domService.addViewModel(v); - }); - - } - - // 默认选中新增的标签页 - this.setTabPage(this.component.contents.length - 1); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/export.ts deleted file mode 100644 index ed751e60e5b6621799da2b822c3e9e577e1dbfba..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/export.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdDynamicAreaComponent from './component/fd-dynamic-area'; -import { DynamicAreaItemSchema, DynamicAreaSchema } from './schema/schema'; - -import FdDynamicAreaTemplates from './templates'; - -/** - * 动态区域 - */ -export const DynamicArea: ComponentExportEntity = { - type: 'DynamicArea', - component: FdDynamicAreaComponent, - template: FdDynamicAreaTemplates, - metadata: DynamicAreaSchema -}; - -/** - * 动态区域项 - */ -export const DynamicAreaItem: ComponentExportEntity = { - type: 'DynamicAreaItem', - metadata: DynamicAreaItemSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/item-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/item-property-config.ts deleted file mode 100644 index ee5305aa7d61b88770c33cf7d8910c251a81a9e9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/item-property-config.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { UniformEditorDataUtil } from '@farris/designer-services'; - -export class DynamicAreaItemProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(): ElementPropertyConfig { - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - description: '标题仅用于设计器区分不同面板,不在运行时展示', - } - ] - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否显示', - propertyType: 'unity', - description: '面板显示条件', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - }, - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/property-config.ts deleted file mode 100644 index 8f1bf02bdd9f114a323fa13d533e6e5a12046465..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/property/property-config.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent } from '@farris/designer-devkit'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { DynamicAreaItemProp } from './item-property-config'; - -export class DynamicAreaProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getCustomPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - - return propertyConfig; - - } - - private getCustomPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const itemProp = new DynamicAreaItemProp(this.serviceHost, this.viewModelId, this.componentId) - return { - categoryId: 'custom', - categoryName: '面板显示配置', - properties: [ - { - propertyID: 'contents', - propertyName: '面板配置', - propertyType: 'modal', - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '面板配置', - viewModelId, - idKey: 'id', - textKey: 'title', - maxCascadeLevel: 1, - disableToolbar: true, - getPropertyConfig: (selectedNode) => itemProp.getPropConfig(selectedNode.data) - } - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/schema/schema.ts deleted file mode 100644 index 065d46b0f984e30c8f8fa4d134561152cb5f2ec4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/schema/schema.ts +++ /dev/null @@ -1,17 +0,0 @@ -export const DynamicAreaSchema = { - id: 'dynamicArea', - type: 'DynamicArea', - appearance: null, - contents: [], - visible: true -}; - - -export const DynamicAreaItemSchema = { - id: '', - type: 'DynamicAreaItem', - title: '', - contents: [], - visible: true -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/form.ts deleted file mode 100644 index 909e864cbae5dbd7e5d259c4a416c324408f5ca1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/form.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default (ctx: any) => { - let headersLi = ''; - let bodys = ''; - ctx.component.contents.forEach((item, index) => { - const selectedLiCls = ctx.selectedTabPageId === item.id ? 'f-state-active' : ''; - const selectedACls = ctx.selectedTabPageId === item.id ? 'active' : ''; - const selectedBodyCls = ctx.selectedTabPageId === item.id ? 'f-tab-active' : 'd-none'; - - // 头部标签页 - headersLi += ` - `; - - // 内容区 - bodys += ` -
    - ${ctx.tabComponents[index]} -
    - `; - }); - - // 空数据图标 - let emptyPanel = ''; - if (ctx.component.contents.length === 0) { - emptyPanel = ` -
    - `; - } - return ` -
    -
    -
    -
    - -
    -
    -
    - - ${bodys} - - ${emptyPanel} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/dynamic-area/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/component/fd-external-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/component/fd-external-container.ts deleted file mode 100644 index 9e0d3a21f9dc8322dba98f90015a27a76f418a91..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/component/fd-external-container.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { ExternalContainerSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ExternalContainerProp } from '../property/property-config'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { ExternalContainerDragDropManager } from '../drag-drop/dragAndDropManager'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeExternalContainerProp } from '../property/nocode-property-config'; - -export default class FdExternalContainerComponent extends FdContainerBaseComponent { - - /** 判断当前容器是否是固定的上下文的中间层级,这种容器不支持移动、不支持删除、并且隐藏间距 */ - private isInFixedContextRules = false; - private dragManager: ExternalContainerDragDropManager; - - - constructor(component: any, options: any) { - super(component, options); - - this.dragManager = new ExternalContainerDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - } - - getStyles(): string { - return ' position:relative; padding:0 !important;border:0;'; - } - getDefaultSchema(): any { - - return ExternalContainerSchema; - } - - getTemplateName(): string { - return 'ExternalContainer'; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeExternalContainerProp = new NoCodeExternalContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: ExternalContainerProp = new ExternalContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - /** - * 不接收子组件 - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - return false; - } - - - checkCanMoveComponent(): boolean { - const canMove: boolean = super.checkCanMoveComponent(); - if (!canMove) { - return false; - } - if (this.isInFixedContextRules) { - return false; - } - return true; - } - /** - * 删除组件时需要同步清空外部组件的声明节点 - */ - onRemoveComponent(): void { - if (!this.component.externalCmp) { - return; - } - - const domService = this.options.designerHost.getService('DomService'); - - domService.deleteExternalComponent(this.component.externalCmp); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/drag-drop/dragAndDropManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/drag-drop/dragAndDropManager.ts deleted file mode 100644 index 621837399a324d2ec4f49d349513cd6c2d4150e5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/drag-drop/dragAndDropManager.ts +++ /dev/null @@ -1,28 +0,0 @@ -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { DgControl } from '../../../../utils/dg-control'; - - -export class ExternalContainerDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - - // 父级节点 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - - // 向导详情页下的外部容器 - if (parent.type === DgControl.WizardDetail.type) { - return true; - } - - return false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/export.ts deleted file mode 100644 index bc51e9c7faccd792242f54110080ef685d766346..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdExternalContainerComponent from './component/fd-external-container'; -import { ExternalContainerSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdExternalContainerTemplates from './templates'; - - -export const ExternalContainer: ComponentExportEntity = { - type: 'ExternalContainer', - component: FdExternalContainerComponent, - template: FdExternalContainerTemplates, - metadata: ExternalContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/nocode-property-config.ts deleted file mode 100644 index be03cf12bc037184f102ebdbadcf71e512f8f79f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/nocode-property-config.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { NoCodeContainerUsualProp } from '../../common/property/nocode-container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; - -export class NoCodeExternalContainerProp extends NoCodeContainerUsualProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const customPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 内容属性 - const contentPropConfig = this.getContentPropConfig(propertyData, this.viewModelId); - propertyConfig.push(contentPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - - private getContentPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - - return { - categoryId: 'content', - categoryName: '内容', - properties: [ - { - propertyID: 'externalCmp', - propertyName: '导入组件', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { - containerType: propertyData.type, - containerId: propertyData.id, - useIsolateJs: propertyData.useIsolateJs - }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - // 清空外部组件的声明节点 - self.domService.deleteExternalComponent(oldValue); - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取'组件使用独立脚本加载'属性的最新值 - this.editorParams.useIsolateJs = propertyData.useIsolateJs; - return { result: true, message: '' }; - } - }, - { - propertyID: 'useIsolateJs', - propertyName: '组件使用独立脚本加载', - propertyType: 'boolean', - defaultValue: false - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - - switch (changeObject.propertyID) { - case 'externalCmp': { - propData.component = parameters && parameters.component; - changeObject.relateChangeProps = [{ - propertyID: 'component', - propertyValue: propertyData.component - }]; - break; - } - case 'useIsolateJs': { - // 同步外部组件节点的useIsolateJs属性 - self.syncExternalComponent(changeObject.propertyValue, propertyData.externalCmp); - break; - } - } - - } - }; - } - /** - * 同步外部组件节点的useIsolateJs属性 - * @param useIsolateJs 组件是否使用独立脚本加载 - * @param externalCmpId 导入组件的id - */ - private syncExternalComponent(useIsolateJs: boolean, externalCmpId: string) { - if (!externalCmpId) { - return; - } - const externalComponnent = this.domService.getExternalComponent(externalCmpId); - if (externalComponnent && externalComponnent.length) { - externalComponnent[0].useIsolateJs = useIsolateJs; - - // 截取su路径--用于独立加载js脚本 - if (useIsolateJs && !externalComponnent[0].serviceUnitPath && externalComponnent[0].filePath) { - const filePathArray = externalComponnent[0].filePath.split('/'); - if (filePathArray.length > 2) { - externalComponnent[0].serviceUnitPath = filePathArray[0] + '/' + filePathArray[1]; - } - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/property-config.ts deleted file mode 100644 index d85ec8b67ac8d92dcc8710667d4073ecbfba3983..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/property/property-config.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; - -export class ExternalContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const customPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 内容属性 - const contentPropConfig = this.getContentPropConfig(propertyData, this.viewModelId); - propertyConfig.push(contentPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - - private getContentPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - - return { - categoryId: 'content', - categoryName: '内容', - properties: [ - { - propertyID: 'externalCmp', - propertyName: '导入组件', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { - containerType: propertyData.type, - containerId: propertyData.id, - useIsolateJs: propertyData.useIsolateJs, - relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - name: this.formBasicService.formMetaBasicInfo.name - }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - // 清空外部组件的声明节点 - self.domService.deleteExternalComponent(oldValue); - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取'组件使用独立脚本加载'属性的最新值 - this.editorParams.useIsolateJs = propertyData.useIsolateJs; - return { result: true, message: '' }; - } - }, - { - propertyID: 'useIsolateJs', - propertyName: '组件使用独立脚本加载', - propertyType: 'boolean', - defaultValue: false, - description: '启用独立加载后只允许选择根组件下的命令!' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - - switch (changeObject.propertyID) { - case 'externalCmp': { - propData.component = parameters && parameters.component; - changeObject.relateChangeProps = [{ - propertyID: 'component', - propertyValue: propertyData.component - }]; - break; - } - case 'useIsolateJs': { - // 同步外部组件节点的useIsolateJs属性 - self.syncExternalComponent(changeObject.propertyValue, propertyData.externalCmp); - - if (changeObject.propertyValue) { - self.notifyService.warning('启用独立加载后只允许选择根组件下的命令!'); - } - break; - } - } - - } - }; - } - /** - * 同步外部组件节点的useIsolateJs属性 - * @param useIsolateJs 组件是否使用独立脚本加载 - * @param externalCmpId 导入组件的id - */ - private syncExternalComponent(useIsolateJs: boolean, externalCmpId: string) { - if (!externalCmpId) { - return; - } - const externalComponnent = this.domService.getExternalComponent(externalCmpId); - if (externalComponnent && externalComponnent.length) { - externalComponnent[0].useIsolateJs = useIsolateJs; - - // 截取su路径--用于独立加载js脚本 - if (useIsolateJs && !externalComponnent[0].serviceUnitPath && externalComponnent[0].filePath) { - const filePathArray = externalComponnent[0].filePath.split('/'); - if (filePathArray.length > 2) { - externalComponnent[0].serviceUnitPath = filePathArray[0] + '/' + filePathArray[1]; - } - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/schema/schema.ts deleted file mode 100644 index 1a32cdae041aa1a560fa18535d7c7c1d67a5491d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/schema/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const ExternalContainerSchema = { - id: 'external-container', - type: 'ExternalContainer', - appearance: { - class: 'position-relative' - }, - visible: true, - useIsolateJs: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/form.ts deleted file mode 100644 index 44b140bae85e7256fe60b24c365c25cb4748ff32..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/form.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (ctx: any) => { - return ` -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/external-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/component/fd-field-set.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/component/fd-field-set.ts deleted file mode 100644 index edc7ad40e27fd24023b186804ba24c9629b59323..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/component/fd-field-set.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { FieldSetSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FieldSetProp } from '../property/property-config'; -import { RowNode } from '@farris/ui-treetable'; -import { FieldSetContextMenuManager } from '../context-menu/context-menu.manager'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { FieldSetDragDropManager } from '../drag-drop/dragAndDropManager'; - -export default class FdFieldSetComponent extends FdContainerBaseComponent { - /** 在运行态的収折的状态 */ - collapseState: boolean; - - // 标识当前的legend - get fieldSetLegendKey(): string { - return `fieldSetLegend-${this.key}`; - } - - constructor(component: any, options: any) { - super(component, options); - } - - getStyles(): string { - return ' display: block;'; - } - getDefaultSchema(): any { - return FieldSetSchema; - } - - getTemplateName(): string { - return 'FieldSet'; - } - // 初始化 - init(): void { - // 维护分组在设计时的收折状态 - this.component.collapseStateInDesignerView = this.component.collapseStateInDesignerView === undefined ? this.component.collapse : this.component.collapseStateInDesignerView; - - super.init(); - } - // 渲染模板 - render(children): any { - return super.render(children || this.renderTemplate('FieldSet', { - collapseState: this.component.collapseStateInDesignerView, - fieldSetLegendKey: this.fieldSetLegendKey, - children: this.renderComponents(), - nestedKey: this.nestedKey - })); - } - // 绑定事件 - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.fieldSetLegendKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - - // 注册收折按钮点击事件 - const btnEl = this.refs[this.fieldSetLegendKey].querySelector('.f-header-text'); - this.addEventListener(btnEl, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - this.component.collapseStateInDesignerView = !this.component.collapseStateInDesignerView; - this.redraw(); - - // 收折后涉及到了界面高度的变化,所以需要重新计算页面上控件操作图标的位置 - this.setPositionOfSelectedComponentBtnGroup(); - }); - // 必写 - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: FieldSetProp = new FieldSetProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - onPropertyChanged(changeObject: FormPropertyChangeObject) { - super.onPropertyChanged(changeObject, ['title', 'collapseText', 'expandText']); - } - - /** - * 判断是否可以接收拖拽新增的子级控件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement) { - const dragManager = new FieldSetDragDropManager(this); - return dragManager.canAccepts(sourceElement); - } - - /** - * 移动控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - const dragManager = new FieldSetDragDropManager(this); - dragManager.onAcceptMovedChildElement(sourceElement); - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new FieldSetContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu-config.ts deleted file mode 100644 index 2fd6d822fac737ed36cbea269fbc8bbf2cccce5e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu-config.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { DesignerEnvType } from "@farris/designer-services"; - -export const contextMenu = [ - { - id: 'addChildContent', - title: '添加控件', - children: [ - { - id: 'TextBox', - title: '文本' - }, - { - - id: 'MultiTextBox', - title: '多行文本' - }, - { - - id: 'DateBox', - title: '日期' - }, - { - id: 'TimePicker', - title: '时间选择' - }, - { - - id: 'EnumField', - title: '下拉列表' - }, - { - - id: 'NumericBox', - title: '数值' - }, - { - id: 'CheckBox', - title: '复选框' - }, - { - - id: 'CheckGroup', - title: '复选框组' - }, - { - - id: 'RadioGroup', - title: '单选组' - }, - { - id: 'SwitchField', - title: '开关' - }, - { - - id: 'Image', - title: '图像' - }, - { - - id: 'LookupEdit', - title: '帮助' - }, - { - id: 'RichTextBox', - title: '富文本' - }, - { - - id: 'InputGroup', - title: '智能输入框' - }, - { - - id: 'LanguageTextBox', - title: '多语言输入框' - }, - { - id: 'Tags', - title: '标记组' - }, - { - - id: 'Avatar', - title: '头像' - }, - { - - id: 'PersonnelSelector', - title: '人员选择', - supportedEnvType: DesignerEnvType.designer - }, - { - - id: 'OrganizationSelector', - title: '组织选择', - supportedEnvType: DesignerEnvType.designer - }, - { - id: 'AdminOrganizationSelector', - title: '组织选择', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'EmployeeSelector', - title: '人员选择', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'ExtIntergration', - title: '外部服务集成', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'OaRelation', - title: '关联行政审批', - supportedEnvType: DesignerEnvType.noCode - } - ] - }, - { - id: 'removeFieldSet', - title: '解除分组' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu.manager.ts deleted file mode 100644 index c5a2b7bfc5cbaf8382e17da6ca84db3f9872a396..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { DesignViewModelField, FormBinding, FormVariable } from '@farris/designer-services'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { FormContextMenuManager } from '../../form/context-menu/context-menu.manager'; -import { FormBasicService } from '@farris/designer-services'; - -const REMOVE_FIELDSET = 'removeFieldSet'; -const ADD_CHILD_CONTENT_COMMAND = 'addChildContent'; - -class ControlCreationContextByContextMenu { - bindingValue: FormBinding; - bindingField: DesignViewModelField | FormVariable; - componentId: string; - controlType: string; - controlParentElement: any; -} - -export class FieldSetContextMenuManager extends ContextMenuManager { - - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - - - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - if (!menuConfig) { - return []; - } - - - menuConfig = this.assembleCreateChildContainerMenu(menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - if (menu.id === REMOVE_FIELDSET) { - this.removeFieldSet(this.cmpInstance.componentId, this.cmpInstance.id); - return; - } - if (menu.parentMenuId === ADD_CHILD_CONTENT_COMMAND) { - const formComponentInstance = this.cmpInstance.parent; - const menuManager = new FormContextMenuManager(formComponentInstance, e.data.parentRowNode); - menuManager.addChildControl(menu, this.cmpInstance.componentId, this.cmpInstance.component) - return; - } - this.notifyService.warning('暂不支持'); - } - - /** - * 组装添加子级的菜单 - */ - private assembleCreateChildContainerMenu(menuConfig: ControlContextMenuItem[]) { - - const addChildMenu = menuConfig.find(menu => menu.id == ADD_CHILD_CONTENT_COMMAND); - if (!addChildMenu) { - return menuConfig; - } - // 根据设计器环境过滤菜单 - const formBasicService = this.serviceHost.getService('FormBasicService') as FormBasicService; - const envType = formBasicService && formBasicService.envType; - addChildMenu.children = addChildMenu.children.filter(item => !item.supportedEnvType || item.supportedEnvType === envType); - - return menuConfig; - } - /** - * 解除分组 - * @param componentId 控件所在组件ID - * @param fieldSetId 分组控件id - */ - private removeFieldSet(componentId: string, fieldSetId: string) { - const formComponent = this.domService.getComponentById(componentId); - const formNode = this.domService.selectNode(formComponent, item => item.type === DgControl.Form.type); - if (!formNode) { - // console.log('未检测到Form控件'); - return; - } - // 1、 将分组下的控件移动到form中 - const fieldSetNodeIndex = formNode.contents.findIndex(c => c.id === fieldSetId); - if (fieldSetNodeIndex < 0) { - // console.log('未在Form控件中检检测到分组控件'); - return; - } - const fieldSetNode = formNode.contents[fieldSetNodeIndex]; - formNode.contents.splice(fieldSetNodeIndex, 1, ...fieldSetNode.contents); - - // 2、移除viewModel group信息 - const viewModel = this.domService.getViewModelById(formComponent.viewModel); - - const groupFields = viewModel.fields.filter(field => field.groupId === fieldSetId); - groupFields.map(field => { - field.groupId = null; - field.groupName = null; - }); - - this.notifyService.success('已解除分组'); - this.refreshFormService.refreshFormDesigner.next(); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/drag-drop/dragAndDropManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/drag-drop/dragAndDropManager.ts deleted file mode 100644 index ebddc14642a1202cf050555f4b4b65542a0dc174..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/drag-drop/dragAndDropManager.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { DgControl } from '../../../../utils/dg-control'; -import { DesignViewModelService, SchemaService, DomService, ComponentResolveContext, FormBindingType } from '@farris/designer-services'; -import { FormDragDropManager } from '../../form/drag-drop/dragAndDropManager'; - -export class FieldSetDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement) { - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this) as ComponentResolveContext; - - // 只接收输入类控件 - if (resolveContext.controlCategory !== 'input') { - return false; - } - // 实体树中拖拽来的字段,需要判断是否属于当前组件绑定的实体 - if (resolveContext.sourceType === 'field') { - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - const fieldInfo = schemaService.getFieldByIDAndVMID(resolveContext.bindingTargetId, this.cmpInstance.viewModelId); - if (!fieldInfo || !fieldInfo.schemaField) { - return false; - } - } - - // 在现有设计器中拖拽控件:跨Component的移动,需要判断组件是否绑定同一实体。 - const sourceComponentInstance = sourceElement.componentInstance; - if (sourceComponentInstance && sourceComponentInstance.viewModelId !== this.cmpInstance.viewModelId) { - const sourceVM = domService.getViewModelById(sourceComponentInstance.viewModelId); - const currentVM = domService.getViewModelById(this.cmpInstance.viewModelId); - return sourceVM.bindTo === currentVM.bindTo; - } - return true; - } - - - - - /** - * 移动控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - const sourceComponentInstance = sourceElement.componentInstance; - if (!sourceComponentInstance) { - return; - } - const sourceComponentSchema = sourceComponentInstance.component; - if (!sourceComponentSchema.binding || !sourceComponentSchema.binding.field) { - return; - } - - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - const sourceDgViewModel = dgViewModelService.getDgViewModel(sourceComponentInstance.viewModelId); - - // 若从另外一个fieldSet移动到当前fieldSet;或者从Form移动到当前fieldSet,都需要变更VM中的分组信息 - const sourceParentComponent = sourceComponentInstance.parent; - switch (sourceParentComponent && sourceParentComponent.type) { - case DgControl.FieldSet.type: case DgControl.Form.type: { - const changeSet = { groupId: this.cmpInstance.component.id, groupName: this.cmpInstance.component.title }; - const sourceBindingType = sourceComponentSchema.binding.type; - switch (sourceBindingType) { - case FormBindingType.Form: { - sourceDgViewModel.changeField(sourceComponentSchema.binding.field, changeSet); - break; - } - case FormBindingType.Variable: { - domService.modifyViewModelFieldById(sourceComponentInstance.viewModelId, sourceComponentSchema.binding.field, changeSet, true); - break; - } - } - break; - } - } - - // 若是跨组件的移动,需要移动vm的字段 - if (sourceComponentInstance.viewModelId !== this.cmpInstance.viewModelId) { - const formMoveHandler = new FormDragDropManager(this.cmpInstance); - formMoveHandler.moveInputBetweenComponent(sourceComponentSchema, sourceComponentInstance.viewModelId); - - } - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/export.ts deleted file mode 100644 index d08d0371efb3c8466a7d8284982b569264afdc73..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdFieldSetComponent from './component/fd-field-set'; -import { FieldSetSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdFieldSetTemplates from './templates'; - - -export const FieldSet: ComponentExportEntity = { - type: 'FieldSet', - component: FdFieldSetComponent, - template: FdFieldSetTemplates, - metadata: FieldSetSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/property/property-config.ts deleted file mode 100644 index 1500a3f24b66218826e045d5220e525bace2bbe4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/property/property-config.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class FieldSetProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - commonProps.push( - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '组件的标签' - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'title': { - changeObject.needUpdateControlTreeNodeName = true; - break; - } - } - } - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'collapse', - propertyName: '默认收折', - propertyType: 'boolean', - description: '运行时是否默认收折分组区域' - }, - { - propertyID: 'expandText', - propertyName: '展开文本', - propertyType: 'string', - description: '展开文本设置' - }, - { - propertyID: 'collapseText', - propertyName: '折起文本', - propertyType: 'string', - description: '折起文本设置' - }, - { - propertyID: 'isScrollSpyItem', - propertyName: '被滚动跟随的节点', - propertyType: 'boolean', - description: '是否为被滚动监听跟随的节点', - defaultValue: false - }, - { - propertyID: 'sectionCollapseVisible', - propertyName: '分组面板收折时显示', - propertyType: 'boolean', - description: '收折分组面时是否显示当前分组内的控件' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop: any, parameters?) { - switch (changeObject.propertyID) { - - case 'sectionCollapseVisible': { - const childControls = propertyData.contents || []; - childControls.forEach((control: any) => { - if (!control.appearance) { - control.appearance = { class: '' }; - } - // 启用:子级控件的样式都追加f-state-visible - if (changeObject.propertyValue) { - if (!control.appearance.class || !control.appearance.class.includes('f-state-visible')) { - control.appearance.class = (control.appearance.class || '') + ' f-state-visible'; - } - } else { - // 关闭:子级控件的样式都移除f-state-visible - if (control.appearance.class && control.appearance.class.includes('f-state-visible')) { - control.appearance.class = control.appearance.class.replace('f-state-visible', '').trim(); - } - } - - }); - } - } - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/schema/schema.ts deleted file mode 100644 index 6e900dfa9ae23a92d154572b214d4c26fd7469d4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/schema/schema.ts +++ /dev/null @@ -1,18 +0,0 @@ -export const FieldSetSchema = { - id: 'fieldSet', - type: 'FieldSet', - title: '分组标题', - appearance: { - class: 'col-12' - }, - collapse: false, - expandText: '', - collapseText: '', - contentTemplate: null, - headerTemplate: null, - contents: [], - sectionCollapseVisible: false, - isScrollSpyItem: false, - visible: true -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/form.ts deleted file mode 100644 index 4b5b98e90619740bced741ac86217df27f0d8d3e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/form.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default (ctx: any) => { - const formGroupCls = ctx.collapseState ? ' f-state-collapse' : ''; - const buttonCls = ctx.collapseState ? '' : ' f-state-expand'; - const buttonText = ctx.collapseState ? ctx.component.expandText : ctx.component.collapseText; - return ` -
    - -
    -
    -
    ${ctx.component.title}
    -
    - -
    -
    -
    -
    - -
    - ${ctx.children} -
    -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/field-set/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/component/fd-form-header.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/component/fd-form-header.ts deleted file mode 100644 index 548fdfa993572598f73ce7c95e072775e5eddbb8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/component/fd-form-header.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { FormHeaderSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { FormHeaderProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; - -/** - * 页面表头翻页图标。目前已废弃 - */ -export default class FdFormHeaderComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return FormHeaderSchema; - } - - getTemplateName(): string { - return 'FormHeader'; - } - hideNestedPaddingInDesginerView(): boolean { - return true; - } - checkCanMoveComponent(): boolean { - return false; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement): boolean { - return false; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: FormHeaderProp = new FormHeaderProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/export.ts deleted file mode 100644 index 180e352b1ca414aa6847c0be3f314b04af7184e9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/export.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdFormHeaderComponent from './component/fd-form-header'; -import { FormHeaderSchema } from './schema/schema'; - -import FdFormHeaderTemplates from './templates'; - -/** - * 页面表头翻页图标。目前已废弃 - */ -export const FormHeader: ComponentExportEntity = { - type: 'FormHeader', - component: FdFormHeaderComponent, - template: FdFormHeaderTemplates, - metadata: FormHeaderSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/property/property-config.ts deleted file mode 100644 index 571f64c03cab35f40bbb492df42cd1b7edeff514..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/property/property-config.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class FormHeaderProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/schema/schema.ts deleted file mode 100644 index e91813dec4af8948a65057febe9528b7a2f0dcf7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/schema/schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const FormHeaderSchema = { - id: 'FormHeader', - type: 'FormHeader', - appearance: null, - visible: true -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/form.ts deleted file mode 100644 index 42d15f2a54db61f12a18c3bb112e90134629a7dc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/form.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default (ctx: any) => { - return ` -
    - - -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form-header/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/component/fd-form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/component/fd-form.ts deleted file mode 100644 index 929c4f277e810f78b7c2009a4e75b5f2912e6825..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/component/fd-form.ts +++ /dev/null @@ -1,256 +0,0 @@ -import { FormSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { FieldManagerComponent } from '@farris/designer-devkit'; -import { FormProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { RowNode } from '@farris/ui-treetable'; -import { FormContextMenuManager } from '../context-menu/context-menu.manager'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormDragDropManager } from '../drag-drop/dragAndDropManager'; -import { DesignerEnvType, DomService, FormComponentType, SchemaService } from '@farris/designer-services'; -import { NoCodeFormProp } from '../property/nocode-property-config'; -import { TableComponentCreatorContextMenuService } from '../../component/context-menu/services/table-creator.service'; - -export default class FdFormComponent extends FdContainerBaseComponent { - - - triggerBelongedComponentToMoveWhenMoved = true; - - constructor(component: any, options: any) { - super(component, options); - - this.getCustomToolbarConfig(); - } - - getDefaultSchema(): any { - return FormSchema; - } - - getTemplateName(): string { - return 'Form'; - } - - /** - * 不支持删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement): boolean { - const dragManager = new FormDragDropManager(this); - return dragManager.canAccepts(sourceElement); - } - - /** - * 移动控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - const dragManager = new FormDragDropManager(this); - dragManager.onAcceptMovedChildElement(sourceElement); - } - - /** - * 弹出字段维护窗口 - */ - private showFieldManager() { - - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - - const compFactory = resolver.resolveComponentFactory(FieldManagerComponent); - const compRef = compFactory.create(injector); - const modalConfig = { - title: '维护控件', - width: 950, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.viewModelId = this.viewModelId; - compRef.instance.formId = this.component.id; - - compRef.instance.disableFieldsInOtherForm = this.checkIfDisableFieldsInOtherForm(); - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.confirmModal.subscribe((data) => { - const { addedFields, deletedFieldIds } = data; - if (deletedFieldIds && deletedFieldIds.length) { - schemaService.removeSchemaField(deletedFieldIds); - } - modalPanel.close(); - }); - - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeFormProp = new NoCodeFormProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: FormProp = new FormProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['formAutoIntl', 'controlsInline', 'labelSize']); - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new FormContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - /** - * 判断在可视化区域中是否隐藏容器间距和线条 - */ - hideNestedPaddingInDesginerView() { - // 控件本身样式 - const cmpClass = this.component.appearance && this.component.appearance.class || ''; - const cmpClassList = cmpClass ? cmpClass.split(' ') : []; - - // 子级节点 - const childContents = this.component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = firstChildContent && firstChildContent.appearance ? firstChildContent.appearance.class : ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、带导航的表格类填报模板:Form内部为table 时,隐藏间距 - if (cmpClassList.includes('f-form-is-table') && parentClassList.includes('f-section-oa-table') && firstChildClassList.includes('table')) { - return true; - } - // 2、卡片类表格模板:Form内部为table时,隐藏间距 - if (cmpClassList.includes('f-form-is-table') && parentClassList.includes('f-section-card-table') && firstChildClassList.includes('table')) { - return true; - } - - } - - getDragScopeElement(): HTMLElement { - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 判断是否为弹窗内部的组件,若是,则限定控件的拖拽不能超出弹出区域 - const rootCmps = domService.module.components.filter(c => c.componentType === FormComponentType.modalFrame); - if (!rootCmps || rootCmps.length === 0) { - return; - } - - let rootCmpId; - for (const cmp of rootCmps) { - const cmpRefNode = domService.selectNode(cmp, n => n.type === DgControl.ComponentRef.type && n.component === this.componentId); - if (cmpRefNode) { - rootCmpId = cmp.id; - break; - } - } - if (rootCmpId) { - const rootContainer = document.getElementById(rootCmpId); - return rootContainer; - } - } - - - private getCustomToolbarConfig() { - this.customToolbarConfigs = []; - - // 内部不包含table控件时展示字段维护图标 - const tableChild = this.component.contents && this.component.contents.length && this.component.contents.find(c => c.type === DgControl.Table.type); - if (!tableChild) { - this.customToolbarConfigs.push( - { - id: 'fieldManager', - title: '字段维护', - icon: 'f-icon f-icon-home-setup', - click: (e) => { - e.stopPropagation(); - this.showFieldManager(); - } - }); - } - - // 零代码支持将Form切换为Table - if (this.envType === DesignerEnvType.noCode) { - const injector = this.options.designerHost.getService('Injector'); - const belongedComponentInstance = this.getBelongedComponentInstance(this); - if (belongedComponentInstance) { - const tableCreatorServ = new TableComponentCreatorContextMenuService(injector, belongedComponentInstance); - if (tableCreatorServ.checkCanChangeToTableComponent()) { - this.customToolbarConfigs.push( - { - id: 'changeFormToTable', - title: '切换为表格', - icon: 'f-icon f-icon-table-properties', - click: (e) => { - e.stopPropagation(); - this.changeFormComponentToTableComponent(); - } - }); - } - } - } - - } - - /** - * Form组件切换为Table组件 - */ - private changeFormComponentToTableComponent() { - const injector = this.options.designerHost.getService('Injector'); - const belongedComponentInstance = this.getBelongedComponentInstance(this); - - const tableCreatorServ = new TableComponentCreatorContextMenuService(injector, belongedComponentInstance); - tableCreatorServ.changeFormComponentToTableComponent(); - - - } - /** - * 是否将在其他卡片中出现的字段禁用掉 - */ - private checkIfDisableFieldsInOtherForm() { - // 在侧边栏中的字段是可以与画布中的字段重复出现的 - const belongedCmp = this.getBelongedComponentInstance(this); - const cmpRef = belongedCmp && belongedCmp.parent; - if (cmpRef && cmpRef.parent && cmpRef.parent.type === DgControl.Sidebar.type) { - return false; - } - - // 其他场景下,不允许多个卡片中重复添加一个字段 - return true; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu-config.ts deleted file mode 100644 index 6643418412e8af07133a76863594d6b49e645820..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu-config.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { DesignerEnvType } from "@farris/designer-services"; - -export const contextMenu = [ - { - id: 'addChildContent', - title: '添加控件', - children: [ - { - id: 'TextBox', - title: '文本' - }, - { - - id: 'MultiTextBox', - title: '多行文本' - }, - { - - id: 'DateBox', - title: '日期' - }, - { - id: 'TimePicker', - title: '时间选择' - }, - { - - id: 'EnumField', - title: '下拉列表' - }, - { - - id: 'NumericBox', - title: '数值' - }, - { - id: 'CheckBox', - title: '复选框' - }, - { - - id: 'CheckGroup', - title: '复选框组' - }, - { - - id: 'RadioGroup', - title: '单选组' - }, - { - id: 'SwitchField', - title: '开关' - }, - { - - id: 'Image', - title: '图像' - }, - { - - id: 'LookupEdit', - title: '帮助' - }, - { - id: 'RichTextBox', - title: '富文本' - }, - { - - id: 'InputGroup', - title: '智能输入框' - }, - { - - id: 'LanguageTextBox', - title: '多语言输入框' - }, - { - id: 'Tags', - title: '标记组' - }, - { - - id: 'Avatar', - title: '头像' - }, - { - - id: 'PersonnelSelector', - title: '人员选择', - supportedEnvType: DesignerEnvType.designer - }, - { - - id: 'OrganizationSelector', - title: '组织选择', - supportedEnvType: DesignerEnvType.designer - }, - { - id: 'AdminOrganizationSelector', - title: '组织选择', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'EmployeeSelector', - title: '人员选择', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'ExtIntergration', - title: '外部服务集成', - supportedEnvType: DesignerEnvType.noCode - }, - { - id: 'OaRelation', - title: '关联行政审批', - supportedEnvType: DesignerEnvType.noCode - } - ] - }, - { - id: 'addFieldSet', - title: '添加分组', - }, - { - id: 'enableTabIndex', - title: '启用Tab索引' - }, - { - id: 'closeTabIndex', - title: '关闭Tab索引' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu.manager.ts deleted file mode 100644 index db3e4d226d0fa946821eb90cc0c3c03fb0e13a2f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,367 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { BsModalService } from '@farris/ui-modal'; -import { ComponentFactoryResolver } from '@angular/core'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { RowNode } from '@farris/ui-treetable'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { BindingEditorComponent } from '@farris/designer-devkit'; -import { DesignViewModelField, FormBasicService, FormBinding, FormVariable } from '@farris/designer-services'; -import { CreateFieldSetComponent } from './editor/create-field-set/create-field-set.component'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; - -const ADD_CHILD_CONTENT_COMMAND = 'addChildContent'; -const ADD_FIELDSET_COMMAND = 'addFieldSet'; -/** 启用tab索引 */ -const ENABLE_TAB_INDEX_MENU = 'enableTabIndex'; -/** 关闭tab索引 */ -const CLOSE_TAB_INDEX_MENU = 'closeTabIndex'; - - -class ControlCreationContextByContextMenu { - bindingValue: FormBinding; - bindingField: DesignViewModelField | FormVariable; - componentId: string; - controlType: string; - controlParentElement: any; -} - -export class FormContextMenuManager extends ContextMenuManager { - - private componentFactoryResolver: ComponentFactoryResolver; - private modalService: BsModalService; - private controlCreatorService: any; - - - constructor(cmp: FdContainerBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.componentFactoryResolver = this.serviceHost.getService('ComponentFactoryResolver'); - this.modalService = this.serviceHost.getService('ModalService'); - this.controlCreatorService = this.serviceHost.getService('ControlCreatorService'); - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - - - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - if (!menuConfig) { - return []; - } - - menuConfig = this.assembleAddChildControlMenu(this.cmpInstance.id, menuConfig, this.cmpInstance.viewModelId); - menuConfig = this.assembleAddFieldSetMenu(this.cmpInstance.id, menuConfig, this.cmpInstance.viewModelId); - - menuConfig = this.assembleEnableTabIndexMenu(menuConfig); - menuConfig = this.assembleCloseTabIndexMenu(menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - if (menu.parentMenuId === ADD_CHILD_CONTENT_COMMAND) { - const formElement = this.cmpInstance.component; - this.addChildControl(menu, this.cmpInstance.componentId, formElement); - return; - } - - switch (menu.id) { - case ADD_FIELDSET_COMMAND: { - this.addFieldSet(this.cmpInstance.componentId); - return; - } - case ENABLE_TAB_INDEX_MENU: { - this.changeTabIndexInFormComponent(true); - return; - } - case CLOSE_TAB_INDEX_MENU: { - this.changeTabIndexInFormComponent(false); - return; - } - } - - this.notifyService.warning('暂不支持'); - } - - /** - * 过滤【添加控件】菜单 - * @param formId 组件id - * @param menuConfig 菜单项 - */ - private assembleAddChildControlMenu(formId: string, menuConfig: ControlContextMenuItem[], viewModelId: string) { - const formElement = this.domService.domDgMap.get(formId); - const addChildMenu = menuConfig.find(menu => menu.id === ADD_CHILD_CONTENT_COMMAND); - if (!addChildMenu) { - return menuConfig; - } - - // 根组件下的Form控件,不支持菜单(在一些旧表单中有使用Form作为过滤条件区域的,这种Form是在根组件中) - const viewModel = this.domService.getViewModelById(viewModelId); - if (viewModel && !viewModel.parent) { - menuConfig = menuConfig.filter(menu => menu.id !== ADD_CHILD_CONTENT_COMMAND); - return menuConfig; - } - - // form控件下包含表格(Table),则不允许添加控件 - if (formElement.contents && formElement.contents.find(c => c.type === DgControl.Table.type)) { - menuConfig = menuConfig.filter(menu => menu.id !== ADD_CHILD_CONTENT_COMMAND); - } - - // 根据设计器环境过滤菜单 - const formBasicService = this.serviceHost.getService('FormBasicService') as FormBasicService; - const envType = formBasicService && formBasicService.envType; - addChildMenu.children = addChildMenu.children.filter(item => !item.supportedEnvType || item.supportedEnvType === envType); - - return menuConfig; - - } - - /** - * 过滤【添加分组】菜单 - * @param formId 组件id - * @param menuConfig 菜单项 - */ - private assembleAddFieldSetMenu(formId: string, menuConfig: ControlContextMenuItem[], viewModelId: string) { - const formElement = this.domService.domDgMap.get(formId); - const addChildMenu = menuConfig.find(menu => menu.id === ADD_FIELDSET_COMMAND); - if (!addChildMenu) { - return menuConfig; - } - - // 根组件下的Form控件,不支持菜单(在一些旧表单中有使用Form作为过滤条件区域的,这种Form是在根组件中) - const viewModel = this.domService.getViewModelById(viewModelId); - if (viewModel && !viewModel.parent) { - menuConfig = menuConfig.filter(menu => menu.id !== ADD_FIELDSET_COMMAND); - return menuConfig; - } - - // form控件下包含表格(Table),则不允许添加分组 - if (formElement.contents && formElement.contents.find(c => c.type === DgControl.Table.type)) { - menuConfig = menuConfig.filter(menu => menu.id !== ADD_FIELDSET_COMMAND); - } - - return menuConfig; - - } - - /** - * 添加输入类控件 - * @param menuItem 右键菜单 - * @param componentId form所在组件id - * @param controlParentElement 输入类控件的父级节点DOM - */ - addChildControl(menuItem: ControlContextMenuItem, componentId: string, controlParentElement: any) { - - const editorComponentFactory = this.componentFactoryResolver.resolveComponentFactory(BindingEditorComponent); - const editorComponentFactoryRef = editorComponentFactory.create(this.injector); - editorComponentFactoryRef.instance.editorParams = { - viewModelId: this.cmpInstance.viewModelId - }; - editorComponentFactoryRef.instance.unusedOnly = true; - editorComponentFactoryRef.instance.bindingControlType = menuItem.id; - - const fieldSelectorDialog = this.modalService.show(editorComponentFactoryRef, { - title: '绑定', - width: 900, - height: 500, - showButtons: true, - buttons: editorComponentFactoryRef.instance.modalFooter - }); - - editorComponentFactoryRef.instance.closeModal.subscribe(() => { - fieldSelectorDialog.close(); - }); - - editorComponentFactoryRef.instance.submitModal.subscribe(data => { - fieldSelectorDialog.close(); - if (!data || !data.value || !data.parameters) { - return; - } - const creationContext = new ControlCreationContextByContextMenu(); - Object.assign(creationContext, { - componentId, - controlType: menuItem.id, - controlParentElement, - bindingValue: data.value, - bindingField: data.parameters && data.parameters.selectedData - }); - this.createControlByContextMenu(creationContext); - }); - } - - private createControlByContextMenu(creationContext: ControlCreationContextByContextMenu) { - const formComponent = this.domService.getComponentById(creationContext.componentId); - - if (creationContext.bindingValue.type === 'Form') { - const bindingEntityField = creationContext.bindingField as DesignViewModelField; - - const controlElement = this.controlCreatorService.createControlBySchemaFeild(bindingEntityField, formComponent.componentType, creationContext.controlType, creationContext.componentId); - if (!controlElement) { - return; - } - - creationContext.controlParentElement.contents.push(controlElement); - - const dgViewModel = this.dgVMService.getDgViewModel(formComponent.viewModel); - - // 添加到分组控件下,需要修改groupId和groupName - if (creationContext.controlParentElement.type === DgControl.FieldSet.type) { - dgViewModel.changeField(bindingEntityField.id, - { - groupId: creationContext.controlParentElement.id, - groupName: creationContext.controlParentElement.title - }); - } - - // 创建的控件类型不是字段默认的编辑器类型 - if (creationContext.controlType !== bindingEntityField.editor.$type) { - dgViewModel.changeField(bindingEntityField.id, - { - editor: { - $type: creationContext.controlType - } - }); - } - - - - } else { - const bindingVariableField = creationContext.bindingField as FormVariable; - // tslint:disable-next-line:max-line-length - const controlElement = this.controlCreatorService.createControlByVariable(bindingVariableField, formComponent.componentType, creationContext.controlType, creationContext.componentId); - // 配置状态机。变量没有只读属性,所以控件不是只读的 - controlElement.readonly = 'viewModel.stateMachine && !viewModel.stateMachine[\'editable\']'; - - // 配置样式 - controlElement.appearance.class = this.domService.getControlClassByFormUnifiedLayout(controlElement.appearance.class, creationContext.componentId); - - - creationContext.controlParentElement.contents.push(controlElement); - - // 添加到分组控件下,需要修改groupId和groupName - if (creationContext.controlParentElement.type === DgControl.FieldSet.type) { - const viewModelField = this.domService.getViewModelFieldById(formComponent.viewModel, bindingVariableField.id); - viewModelField.groupId = creationContext.controlParentElement.id; - viewModelField.groupName = creationContext.controlParentElement.title; - - } - - } - - this.notifyService.success('添加成功'); - // 刷新form - this.refreshFormService.refreshFormDesigner.next(this.cmpInstance.id); - - } - - /** - * 添加分组控件,并选择分组控件中的字段 - * @param componentId 当前form所属组件ID - */ - addFieldSet(componentId: string) { - const compFactory = this.componentFactoryResolver.resolveComponentFactory(CreateFieldSetComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '添加分组', - width: 900, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - - const designerHost = this.cmpInstance.options.designerHost; - compRef.instance.schemaDOMMapping = designerHost.getService('SchemaDOMMapping'); - compRef.instance.componentId = componentId; - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.submitModal.subscribe(() => { - this.refreshFormService.refreshFormDesigner.next(); - - modalPanel.close(); - }); - } - /** - * 组装卡片组件启用tab索引的菜单 - */ - private assembleEnableTabIndexMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - if (!this.checkCanTabIndex()) { - menuConfig = menuConfig.filter(menu => menu.id !== ENABLE_TAB_INDEX_MENU); - } - return menuConfig; - } - - /** - * 组装卡片组件关闭tab索引的菜单 - */ - private assembleCloseTabIndexMenu(menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - if (!this.checkCanTabIndex()) { - menuConfig = menuConfig.filter(menu => menu.id !== CLOSE_TAB_INDEX_MENU); - } - return menuConfig; - } - /** - * 组装卡片组件启用、关闭tab索引的菜单 - */ - private checkCanTabIndex(): boolean { - const formNode = this.cmpInstance.component; - const viewModelId = this.cmpInstance.viewModelId; - - // 1、根组件下的Form控件,不支持菜单(在一些旧表单中有使用Form作为过滤条件区域的,这种Form是在根组件中) - const viewModel = this.domService.getViewModelById(viewModelId); - if (viewModel && !viewModel.parent) { - return; - } - // 2、组件内不能有table控件 - const table = this.domService.selectNode(formNode, item => item.type === DgControl.Table.type); - if (table) { - return; - } - // 3、组件内有子级控件 - if (!formNode.contents || !formNode.contents.length) { - return; - } - return true; - } - - /** - * Form类组件中启用tab索引 - */ - private changeTabIndexInFormComponent(enable: boolean) { - this.enableTabIndexInForm(this.cmpInstance.component.contents, enable); - - const msg = enable ? '启用' : '关闭'; - this.notifyService.success(`${msg}成功!`); - this.refreshFormService.refreshFormDesigner.next(); - } - - private enableTabIndexInForm(contents: any[], enable: boolean) { - const notAllowedControls = [DgControl.Avatar.type, DgControl.Image.type, DgControl.Tags.type, DgControl.FieldSet.type]; - - contents.forEach(control => { - if (!notAllowedControls.includes(control.type)) { - control.tabindex = enable ? 1 : -1; - } - - if (control.contents && control.contents.length) { - this.enableTabIndexInForm(control.contents, enable); - } - }); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.html deleted file mode 100644 index 73940b5be3217dc46f77090bb6a5c8af7fed734f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.html +++ /dev/null @@ -1,62 +0,0 @@ -
    -
    -
    -
    -

    分组信息

    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    分组字段

    -
    -
    -
    - - -
    -
    - - -
    - - - - - - - - - - - 绑定字段不存在,请在视图模型中手动移除。 - - - 变量:{{ctx.node.data.code}} - - - 控件没有绑定信息 - - - {{ctx.node.data.bindingField}} - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.ts deleted file mode 100644 index 58ab26188af03c106cfd127fdda770c38f1b7cc1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/context-menu/editor/create-field-set/create-field-set.component.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { Component, EventEmitter, HostBinding, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableComponent } from '@farris/ui-treetable'; -import { IdService } from '@farris/ui-common'; -import { DesignViewModelService, DomService, FormBasicService, FormBindingType } from '@farris/designer-services'; -import { ControlService } from '../../../../../../service/control.service'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { FieldTreeBuilder, FieldTreeNode } from '@farris/designer-devkit'; - -@Component({ - selector: 'app-create-field-set', - templateUrl: './create-field-set.component.html', - styleUrls: ['./create-field-set.component.css'] -}) -export class CreateFieldSetComponent implements OnInit { - @Input() componentId: string; - - @Input() schemaDOMMapping: any; - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @ViewChild('footer') modalFooter: TemplateRef; - @ViewChild('bindFieldColTpl') bindFieldColTpl: TemplateRef; - - @HostBinding('class') - class = 'd-flex h-100 py-2 px-3'; - - - /** 卡片组件节点 */ - componentNode: any; - - /** 卡片组件内的Form节点 */ - compFormNode: any; - - // 树表数据 - treeData: TreeNode[] = []; - - // 树表列配置 - treeCols = []; - - // 树表实例 - @ViewChild('treeTable') treeTable: TreeTableComponent; - - /** 分组标题 */ - fieldSetTitle: string; - - /** 选中的行数据 */ - checkeds: FieldTreeNode[] = []; - - constructor( - private domService: DomService, - private notifyService: NotifyService, - private dgVMService: DesignViewModelService, - private formBasicService: FormBasicService, - private controlService: ControlService, - private idService: IdService) { } - - - ngOnInit() { - this.componentNode = this.domService.getComponentById(this.componentId); - - // 收集当前组件下的控件,并剔除分组下的控件、没有绑定信息的控件、绑定的字段被移除的控件 - this.treeData = this.buildFieldTreeData(this.componentNode.viewModel); - this.treeData = this.treeData.filter((treeNode: any) => !treeNode.isGroupNode && !treeNode.isNoBinding && !treeNode.isRemoved); - - this.compFormNode = this.domService.selectNode(this.componentNode, item => item.type === DgControl.Form.type); - - - this.treeCols = [ - { field: 'name', title: '名称' }, - { field: 'bindingPath', title: '绑定字段', template: this.bindFieldColTpl }]; - } - - - buildFieldTreeData(viewModelId: string) { - const fieldTreeBuilder = new FieldTreeBuilder(this.schemaDOMMapping, this.dgVMService, this.domService, this.formBasicService); - - const treeData = fieldTreeBuilder.buildFieldTreeData(viewModelId); - return treeData; - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - - if (!this.fieldSetTitle) { - this.notifyService.warning('请填写分组标题'); - return; - } - this.checkeds = this.treeTable.checkeds as FieldTreeNode[]; - if (!this.checkeds || this.checkeds.length === 0) { - this.notifyService.warning('请选择字段'); - return false; - } - - const selectedControls = this.checkeds.map(c => c.control); - - const groupId = this.idService.generate(); - - this.changeViewModelFields(groupId); - this.changeFormElement(groupId); - - this.submitModal.emit(); - } - - - /** - * 字段搜索 - */ - searchField($event) { - if ($event) { - const { field, value } = $event; - this.treeTable.searchHandle.search(field, value); - } else { - this.treeTable.searchHandle.search('*', ''); - } - - } - - private changeViewModelFields(groupId: string) { - this.checkeds.forEach((check: FieldTreeNode) => { - const dgChangeSet = { - groupId, - groupName: this.fieldSetTitle - }; - if (check.isBindVariable) { - this.changeVMGroupForVariableBinding(check.data, dgChangeSet); - } else { - const dgViewModel = this.dgVMService.getDgViewModel(this.componentNode.viewModel); - - dgViewModel.changeField(check.data.id, dgChangeSet); - } - }); - } - - /** - * 绑定变量的控件 修改VM中的分组信息 - */ - private changeVMGroupForVariableBinding(data: any, changeSet: { groupId: string, groupName: string }) { - const viewModel = this.domService.getViewModelById(this.componentNode.viewModel); - const field = viewModel.fields.find(f => f.id === data.id); - if (field) { - Object.assign(field, changeSet); - } else { - viewModel.fields.push({ - type: FormBindingType.Variable, - id: data.id, - fieldName: data.code, - groupId: changeSet.groupId || '', - groupName: changeSet.groupName || '', - }); - } - } - - private changeFormElement(groupId: string) { - // 1、创建分组控件 - const fieldSetMetadata = this.controlService.getControlMetaData(DgControl.FieldSet.type); - fieldSetMetadata.id = groupId; - fieldSetMetadata.title = this.fieldSetTitle; - fieldSetMetadata.appearance = { class: 'col-12 px-0' }; - - // 2、将选中的输入控件移动至分组控件 - const movedControls = this.checkeds.map(c => c.control); - - fieldSetMetadata.contents = movedControls; - - const movedControlIds = movedControls.map(c => c.id); - const formNode = this.domService.selectNode(this.componentNode, item => item.type === DgControl.Form.type); - formNode.contents = formNode.contents.filter(c => !movedControlIds.includes(c.id)); - - // 3、将分组控件添加到Form中 - formNode.contents.push(fieldSetMetadata); - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/drag-drop/dragAndDropManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/drag-drop/dragAndDropManager.ts deleted file mode 100644 index 86265443aae9e2c5bca28130f83bbc45e3319530..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/drag-drop/dragAndDropManager.ts +++ /dev/null @@ -1,307 +0,0 @@ -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormBindingType, DesignViewModelService, SchemaService, DomService, ComponentResolveContext } from '@farris/designer-services'; -import { ComponentSchema } from '@farris/designer-element'; -import { ControlEventPropertyIDList } from '../../../../utils/control-event-prop'; -import { IdService } from '@farris/ui-common'; - -export class FormDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement) { - - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this) as ComponentResolveContext;; - - // 内部为table控件时,不接收外部控件 - const cmpClass = this.cmpInstance.component.appearance ? this.cmpInstance.component.appearance.class || '' : ''; - const childContents = this.cmpInstance.component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - if (cmpClass.includes('f-form-is-table') && firstChildContent && firstChildContent.type === DgControl.Table.type) { - return false; - } - - // 只接收输入类、fieldset分组控件、工具箱中的输入类模板 - let allowed = resolveContext.controlCategory === 'input' || resolveContext.controlType === DgControl.FieldSet.type || - (resolveContext.controlCategory === 'componentTemplate' && resolveContext.controlTemplate && resolveContext.controlTemplate.templateCategory === 'input'); - if (!allowed) { - return false; - } - // 实体树中拖拽来的字段,需要判断是否属于当前组件绑定的实体 - if (resolveContext.sourceType === 'field') { - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - const fieldInfo = schemaService.getFieldByIDAndVMID(resolveContext.bindingTargetId, this.cmpInstance.viewModelId); - if (!fieldInfo || !fieldInfo.schemaField) { - return false; - } - } - // 在现有设计器中拖拽控件:跨Component的移动输入控件,需要判断组件是否绑定同一实体。 - const sourceComponentInstance = sourceElement.componentInstance; - if (sourceComponentInstance && sourceComponentInstance.viewModelId !== this.cmpInstance.viewModelId) { - if (resolveContext.controlType === DgControl.FieldSet.type) { - return false; - } - const sourceVM = domService.getViewModelById(sourceComponentInstance.viewModelId); - const currentVM = domService.getViewModelById(this.cmpInstance.viewModelId); - allowed = sourceVM.bindTo === currentVM.bindTo; - - } - - - return allowed; - } - - - - /** - * 移动控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - - const sourceComponentInstance = sourceElement.componentInstance; - if (!sourceComponentInstance) { - return; - } - const sourceComponentSchema = sourceComponentInstance.component; - if (!sourceComponentSchema.binding || !sourceComponentSchema.binding.field) { - return; - } - - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - const sourceDgViewModel = dgViewModelService.getDgViewModel(sourceComponentInstance.viewModelId); - - // 若从fieldSet移动到Form,需要移除VM中的分组信息 - const sourceParentComponent = sourceComponentInstance.parent; - if (sourceParentComponent && sourceParentComponent.type === DgControl.FieldSet.type) { - if (sourceDgViewModel) { - const vmChangeSet = { groupId: null, groupName: null }; - const sourceBindingType = sourceComponentSchema.binding.type; - switch (sourceBindingType) { - case FormBindingType.Form: { - sourceDgViewModel.changeField(sourceComponentSchema.binding.field, vmChangeSet); - break; - } - case FormBindingType.Variable: { - domService.modifyViewModelFieldById(sourceComponentInstance.viewModelId, sourceComponentSchema.binding.field, vmChangeSet, true); - break; - } - } - } - } - - // 若是跨组件的移动,需要移动vm的字段 - if (sourceComponentInstance.viewModelId !== this.cmpInstance.viewModelId) { - this.moveInputBetweenComponent(sourceComponentSchema, sourceComponentInstance.viewModelId); - } - - - } - - /** - * 跨组件移动输入控件 - * @param sourceComponentSchema 源控件Schema结构 - * @param sourceViewModelId 源控件所属视图模型id - */ - moveInputBetweenComponent(sourceComponentSchema: ComponentSchema, sourceViewModelId: string) { - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dgViewModelService = serviceHost.getService('DesignViewModelService') as DesignViewModelService; - - // 源控件绑定的字段或变量id - const sourceBindingType = sourceComponentSchema.binding.type; - const sourceBindingFieldId = sourceComponentSchema.binding.field; - - switch (sourceBindingType) { - case FormBindingType.Form: { - this.moveFieldBetweenViewModel(sourceBindingFieldId, sourceViewModelId, dgViewModelService); - break; - } - case FormBindingType.Variable: { - this.moveVariableBetweenViewModel(sourceBindingFieldId, sourceViewModelId, domService); - break; - } - } - this.handleVaribleInPropertyBinding(sourceComponentSchema, sourceViewModelId, domService); - this.handleEventsInProperty(sourceComponentSchema, sourceViewModelId, domService, dgViewModelService); - } - - /** - * 若源控件绑定字段,需要将绑定信息移动到新VM - * @param sourceBindingFieldId 源控件绑定的字段id - * @param sourceViewModelId 源控件所属视图模型id - * @param dgViewModelService 视图模型服务类 - */ - private moveFieldBetweenViewModel(sourceBindingFieldId: string, sourceViewModelId: string, dgViewModelService: DesignViewModelService) { - const sourceDgViewModel = dgViewModelService.getDgViewModel(sourceViewModelId); - const sourceVMField = sourceDgViewModel.fields.find(f => f.id === sourceBindingFieldId); - sourceDgViewModel.removeField([sourceBindingFieldId]); - - const currentDgViewModel = dgViewModelService.getDgViewModel(this.cmpInstance.viewModelId); - currentDgViewModel.addField(sourceVMField); - - } - - /** - * 源控件绑定变量,需要将绑定信息移动到新VM,并且将绑定变量拷贝到新VM - * @param sourceBindingFieldId 源控件绑定的字段id - * @param sourceViewModelId 源控件所属视图模型id - * @param domService DOM结构服务类 - */ - private moveVariableBetweenViewModel(sourceBindingFieldId: string, sourceViewModelId: string, domService: DomService) { - const sourceVm = domService.getViewModelById(sourceViewModelId); - const currentVM = domService.getViewModelById(this.cmpInstance.viewModelId); - - // 移动VM.fields - const sourceVMFieldIndex = sourceVm.fields.findIndex(f => f.id === sourceBindingFieldId); - if (sourceVMFieldIndex > -1) { - currentVM.fields.push(sourceVm.fields[sourceVMFieldIndex]); - sourceVm.fields.splice(sourceVMFieldIndex, 1); - } - - - // 拷贝绑定的变量:为了防止此变量在源VM其他地方被使用的情况,这里是拷贝变量,而不是剪切 - const sourceState = sourceVm.states.find(state => state.id === sourceBindingFieldId); - if (sourceState) { - currentVM.states = currentVM.states ? currentVM.states : []; - if (currentVM.states.findIndex(s => s.id === sourceState.id) < 0) { - currentVM.states.push(sourceState); - } - } - } - - /** - * 若控件的某一个属性绑定的变量(例如控件的必填属性绑定变量),则需要将此变量拷贝的新VM中 - * @param sourceComponentSchema 源控件Schema结构 - * @param sourceViewModelId 源控件所属视图模型id - * @param domService DOM结构服务类 - */ - private handleVaribleInPropertyBinding(sourceComponentSchema: ComponentSchema, sourceViewModelId: string, domService: DomService) { - - const sourceVm = domService.getViewModelById(sourceViewModelId); - const currentVM = domService.getViewModelById(this.cmpInstance.viewModelId); - - const variablesToBeCopied = []; - Object.keys(sourceComponentSchema).forEach(propertyID => { - if (propertyID === 'binding') { - return; - } - const propertyValue = sourceComponentSchema[propertyID]; - if (propertyValue && typeof (propertyValue) === 'object' && propertyValue.type === FormBindingType.Variable && propertyValue.field) { - const sourceState = sourceVm.states.find(state => state.id === propertyValue.field); - if (sourceState) { - variablesToBeCopied.push(sourceState); - } - } - }); - - if (variablesToBeCopied.length) { - currentVM.states = currentVM.states ? currentVM.states.concat(variablesToBeCopied) : [].concat(variablesToBeCopied); - } - } - - /** - * 拷贝控件绑定的事件 - * @param sourceComponentSchema 源控件Schema结构 - * @param sourceViewModelId 源控件所属视图模型id - * @param domService DOM结构服务类 - */ - private handleEventsInProperty(sourceComponentSchema: ComponentSchema, sourceViewModelId: string, domService: DomService, dgViewModelService: DesignViewModelService) { - const sourceVm = domService.getViewModelById(sourceViewModelId); - const targetVm = domService.getViewModelById(this.cmpInstance.viewModelId); - const targetDgViewModel = dgViewModelService.getDgViewModel(this.cmpInstance.viewModelId); - - const eventCodeList = Object.keys(ControlEventPropertyIDList); - - // 控件多个属性绑定一个命令时,不重复创建新命令 - const commandMap = {}; - - Object.keys(sourceComponentSchema).forEach(propertyID => { - const e = eventCodeList.find(key => key === propertyID); - if (e && sourceComponentSchema[e]) { - const oldCommand = sourceVm.commands.find(c => c.code === sourceComponentSchema[e]); - if (oldCommand) { - // 新建命令 - let newCommand = commandMap[oldCommand.code]; - if (!newCommand) { - newCommand = this.createNewCommand(oldCommand, domService); - targetVm.commands.push(newCommand); - - commandMap[oldCommand.code] = newCommand; - } - - // 修改控件绑定的命令 - sourceComponentSchema[e] = newCommand.code; - - } - } - }); - - // 字段值变化前、后事件 - const fieldEvents = ['valueChanging', 'valueChanged']; - if (sourceComponentSchema.binding && sourceComponentSchema.binding.type === FormBindingType.Form) { - const vmField = targetVm.fields.find(f => f.id === sourceComponentSchema.binding.field); - if (vmField) { - fieldEvents.forEach(event => { - if (vmField[event]) { - const oldCommand = sourceVm.commands.find(c => c.code === vmField[event]); - if (!oldCommand) { - return; - } - if (commandMap[oldCommand.code]) { - targetDgViewModel.changeField(vmField.id, { [event]: commandMap[oldCommand.code].code }); - } else { - - const newCommand = this.createNewCommand(oldCommand, domService); - commandMap[oldCommand.code] = newCommand; - targetVm.commands.push(newCommand); - - targetDgViewModel.changeField(vmField.id, { [event]: newCommand.code }); - } - } - }); - } - } - - } - - - private createNewCommand(oldCommand: any, domService: any) { - const serviceHost = this.cmpInstance.options.designerHost; - const injector = serviceHost.getService('Injector'); - // 1、新建命令 - const guiId = injector.get(IdService).generate(); - const newCommand = Object.assign({}, oldCommand, { - id: guiId, - code: oldCommand.code + guiId.slice(0, 4), - name: oldCommand.name + guiId.slice(0, 4) - }); - // 2、新建的命令添加到webCmds节点下 - const webCmds = domService.getWebCmds(); - const cmp = webCmds.find(cmd => cmd.id === oldCommand.cmpId); - if (cmp) { - cmp.refedHandlers.push({ - host: guiId, - handler: oldCommand.handlerName - }); - } - return newCommand; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/export.ts deleted file mode 100644 index 4edcd8d63e58ed776cf186684ff1502e298622d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdFormComponent from './component/fd-form'; -import { FormSchema } from './schema/schema'; - -import FdFormTemplates from './templates'; - - -export const Form: ComponentExportEntity = { - type: 'Form', - component: FdFormComponent, - template: FdFormTemplates, - metadata: FormSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.css deleted file mode 100644 index c8a222f126e863c2d207e9894de45938d7a8065b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.css +++ /dev/null @@ -1,37 +0,0 @@ -.screenGroup { - background: rgba(255, 255, 255, .9); - box-shadow: 0 1px 3px 0 rgb(2 75 193 / 20%); - border-radius: 8px; - padding: 2px 14px; - margin: 5px auto; -} - -.screenGroup .screenName { - width: 90px; - opacity: .6; - font-family: PingFangSC-Regular; - font-size: 14px; - line-height: 24px; - color: #2a87ff; - height: 32px; - padding: 4px; - text-align: left; -} - -.screenGroup farris-combo-list { - width: 84px; -} - -.screenGroup .columnText { - line-height: 26px; -} - -.applyBtn { - margin-top: 5px; - display: flex; - justify-content: center; -} - -.applyBtn .btn { - width: 110px; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.html deleted file mode 100644 index ea38f97e30137cf03856cea23ba5efb055aea4fd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.html +++ /dev/null @@ -1,54 +0,0 @@ -
    - -
    - 小屏幕 -
    - - - - - -
    -
    - - -
    - 中等屏幕 -
    - - - -
    -
    - -
    - 大屏幕 -
    - - - -
    -
    - -
    - 极大屏幕 -
    - - - -
    -
    - -
    - -
    - -
    \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.ts deleted file mode 100644 index e7c1f67b1eda58fe3b440ed0ef3ee953e2274223..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.component.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { PropertyEntity } from '@farris/ide-property-panel'; -import { MessagerService } from '@farris/ui-messager'; - -@Component({ - selector: 'app-form-layout-setting', - templateUrl: './form-layout-setting.component.html', - styleUrls: ['./form-layout-setting.component.css'] -}) -export class FormLayoutSettingComponent implements OnInit { - @Output() valueChanged = new EventEmitter(); - - private _elementConfig: PropertyEntity; - - get elementConfig() { - return this._elementConfig; - } - - set elementConfig(value) { - this._elementConfig = value; - } - - /** 小屏幕:列数只支持1 */ - allowedSMColumns = [1]; - - /** 中等屏幕,列数支持1,2 */ - allowedMDColumns = [1, 2]; - - /** 大屏幕,列数支持1,2, 3, 4 */ - allowedLGColumns = [1, 2, 3, 4]; - - /** 超大等屏幕,列数支持1,2, 3, 4, 6 */ - allowedELColumns = [1, 2, 3, 4, 6]; - - // 各屏幕尺寸的枚举项 - smColumnEnumData = []; - mdColumnEnumData = []; - lgColumnEnumData = []; - elColumnEnumData = []; - - /** 当前卡片控件的column样式值 ,例如col-md-6,则uniqueColumnClass为6 */ - uniqueColumnClass: FormUnifiedColumnLayout; - - /** 当前卡片控件每行控件个数 */ - controlCountInRow = { - sm: null, - md: null, - lg: null, - el: null - }; - - constructor(private msgService: MessagerService) { } - - ngOnInit() { - this.initStandardColumEnumData(); - this.initLayoutSetting(); - } - initLayoutSetting() { - - if (!this.elementConfig.beforeOpenModal) { - return; - } - const result = this.elementConfig.beforeOpenModal(); - this.uniqueColumnClass = result.parameters; - - // 小屏幕:列数只支持1 - const controlCountInSMRow = 12 / this.uniqueColumnClass.uniqueColClassInSM; - if (!this.allowedSMColumns.includes(controlCountInSMRow)) { - this.smColumnEnumData.push({ value: 0, text: '自定义' }); - this.controlCountInRow.sm = 0; - } else { - this.controlCountInRow.sm = controlCountInSMRow; - } - - // 中等屏幕,列数支持1,2 - const controlCountInMDRow = 12 / this.uniqueColumnClass.uniqueColClassInMD; - if (!this.allowedMDColumns.includes(controlCountInMDRow)) { - this.mdColumnEnumData.push({ value: 0, text: '自定义' }); - this.controlCountInRow.md = 0; - } else { - this.controlCountInRow.md = controlCountInMDRow; - } - - // 大屏幕,列数支持1,2, 3, 4 - const controlCountInLGRow = 12 / this.uniqueColumnClass.uniqueColClassInLG; - if (!this.allowedLGColumns.includes(controlCountInLGRow)) { - this.lgColumnEnumData.push({ value: 0, text: '自定义' }); - this.controlCountInRow.lg = 0; - } else { - this.controlCountInRow.lg = controlCountInLGRow; - } - - // 超大等屏幕,列数支持1,2, 3, 4, 6 - const controlCountInELRow = 12 / this.uniqueColumnClass.uniqueColClassInEL; - if (!this.allowedELColumns.includes(controlCountInELRow)) { - this.elColumnEnumData.push({ value: 0, text: '自定义' }); - this.controlCountInRow.el = 0; - } else { - this.controlCountInRow.el = controlCountInELRow; - } - - - } - - initStandardColumEnumData() { - this.allowedSMColumns.forEach(c => { - this.smColumnEnumData.push({ value: c, text: c + '' }); - }); - this.allowedMDColumns.forEach(c => { - this.mdColumnEnumData.push({ value: c, text: c + '' }); - }); - this.allowedLGColumns.forEach(c => { - this.lgColumnEnumData.push({ value: c, text: c + '' }); - }); - this.allowedELColumns.forEach(c => { - this.elColumnEnumData.push({ value: c, text: c + '' }); - }); - } - - changeValue() { - - this.msgService.question('应用统一布局,将重置区域内部所有控件的宽度样式,确定应用?', () => { - this.uniqueColumnClass.uniqueColClassInSM = this.controlCountInRow.sm === 0 ? null : 12 / this.controlCountInRow.sm; - this.uniqueColumnClass.uniqueColClassInMD = this.controlCountInRow.md === 0 ? null : 12 / this.controlCountInRow.md; - this.uniqueColumnClass.uniqueColClassInLG = this.controlCountInRow.lg === 0 ? null : 12 / this.controlCountInRow.lg; - this.uniqueColumnClass.uniqueColClassInEL = this.controlCountInRow.el === 0 ? null : 12 / this.controlCountInRow.el; - - this.valueChanged.next({ $event: null, elementValue: this.uniqueColumnClass }); - }); - - } -} - -export class FormUnifiedColumnLayout { - uniqueColClassInSM: number; - uniqueColClassInMD: number; - uniqueColClassInLG: number; - uniqueColClassInEL: number; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.service.ts deleted file mode 100644 index 10da75ffb4681597b6d837f4987054bac2e3f46d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-layout-setting.service.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { FormResponseLayoutContext } from '../../../../../input/common/property/response-layout-editor'; -import { ResponseLayoutEditorService } from '../../../../../input/common/property/response-layout-editor'; -import { FormUnifiedColumnLayout } from './form-layout-setting.component'; -import { DomService } from '@farris/designer-services'; - -export class FormLayoutSettingService { - - constructor( - public domService: DomService, - public componentId: string) { - - } - - /** - * 组装每种屏幕下的宽度样式值,例如col-md-6,则uniqueColClassInMD为6 - */ - assembleUnifiedLayoutContext(propertyData: any): { result: boolean, parameters: FormUnifiedColumnLayout } { - - const formNode = this.domService.domDgMap.get(propertyData.id); - - const responseLayoutService = new ResponseLayoutEditorService(this.domService, this.componentId); - const responseLayoutConfig: FormResponseLayoutContext[] = []; - responseLayoutService.getFormResonseLayoutConfig(formNode, responseLayoutConfig, 1); - - - // 收集每种屏幕下的列数 - const columnInSMArray = responseLayoutConfig.map(config => config.columnInSM); - const columnInMDArray = responseLayoutConfig.map(config => config.columnInMD); - const columnInLGArray = responseLayoutConfig.map(config => config.columnInLG); - const columnInELArray = responseLayoutConfig.map(config => config.columnInEL); - - // 只有每个控件的宽度都一样时,才认为form上有统一宽度,否则认为是自定义的控件宽度,此处传递null - const uniqueColClassInSM = this.checkIsUniqueColumn(columnInSMArray) ? columnInSMArray[0] : null; - const uniqueColClassInMD = this.checkIsUniqueColumn(columnInMDArray) ? columnInMDArray[0] : null; - const uniqueColClassInLG = this.checkIsUniqueColumn(columnInLGArray) ? columnInLGArray[0] : null; - const uniqueColClassInEL = this.checkIsUniqueColumn(columnInELArray) ? columnInELArray[0] : null; - - - return { - result: true, - parameters: { - uniqueColClassInSM, - uniqueColClassInMD, - uniqueColClassInLG, - uniqueColClassInEL - } - }; - } - - /** - * 校验宽度样式值是否一致 - */ - private checkIsUniqueColumn(columnsInScreen: number[]) { - const keySet = new Set(columnsInScreen); - const exclusiveKeys = Array.from(keySet); - - if (exclusiveKeys.length === 1) { - return true; - } - return false; - } - - /** - * 根据统一配置值,修改卡片区域内所有控件的class样式 - * @param formNode dom节点 - * @param unifiedLayout 统一配置值 - */ - changeFormControlsByUnifiedLayoutConfig(formNode: any, unifiedLayout: FormUnifiedColumnLayout) { - - formNode.contents.forEach(control => { - if (control.type === DgControl.FieldSet.type) { - this.changeFormControlsByUnifiedLayoutConfig(control, unifiedLayout); - return; - } - if (!control.appearance) { - control.appearance = {}; - } - const controlClass = control.appearance.class; - control.appearance.class = this.changeControlClassInByColumn(controlClass, unifiedLayout); - - }); - } - - /** - * 根据统一配置值,修改某一个控件的class样式 - */ - private changeControlClassInByColumn(controlClass: string, unifiedLayout: FormUnifiedColumnLayout) { - let originColClass; - let originColMDClass; - let originColXLClass; - let originColELClass; - - let otherClassItems = []; - - if (controlClass) { - const controlClassArray = controlClass.split(' '); - const colClassItems = controlClassArray.filter(classItem => classItem.startsWith('col-')); - - originColClass = colClassItems.find(item => /^col-([1-9]|10|11|12)$/.test(item)); - originColMDClass = colClassItems.find(item => /^col-md-([1-9]|10|11|12)$/.test(item)); - originColXLClass = colClassItems.find(item => /^col-xl-([1-9]|10|11|12)$/.test(item)); - originColELClass = colClassItems.find(item => /^col-el-([1-9]|10|11|12)$/.test(item)); - - otherClassItems = controlClassArray.filter(classItem => !classItem.startsWith('col-')); - } - - - - const colClass = unifiedLayout.uniqueColClassInSM ? 'col-' + unifiedLayout.uniqueColClassInSM : originColClass; - const colMDClass = unifiedLayout.uniqueColClassInMD ? 'col-md-' + unifiedLayout.uniqueColClassInMD : originColMDClass; - const colXLClass = unifiedLayout.uniqueColClassInLG ? 'col-xl-' + unifiedLayout.uniqueColClassInLG : originColXLClass; - const colELClass = unifiedLayout.uniqueColClassInEL ? 'col-el-' + unifiedLayout.uniqueColClassInEL : originColELClass; - - const newClassItems = [colClass, colMDClass, colXLClass, colELClass].concat(otherClassItems); - - return newClassItems.join(' '); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-unified-column-layout.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-unified-column-layout.ts deleted file mode 100644 index 12a3b29ccb6c7f32b966d3a7c5ea927b7d81dcc9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/editor/form-layout-setting/form-unified-column-layout.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export class FormUnifiedColumnLayout { - uniqueColClassInSM: number; - uniqueColClassInMD: number; - uniqueColClassInLG: number; - uniqueColClassInEL: number; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/nocode-property-config.ts deleted file mode 100644 index e052cfb01e66ea8d73983dd0b14c43bfb4592fc6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/nocode-property-config.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { ElementPropertyConfig } from "@farris/ide-property-panel"; -import { ContainerUsualProp } from "../../common/property/container-property-config"; -// import { CustomWidthEditorComponent } from '@farris/nocode-designer-plugin'; -import { FormLayoutSettingComponent } from "./editor/form-layout-setting/form-layout-setting.component"; -import { FormLayoutSettingService } from "./editor/form-layout-setting/form-layout-setting.service"; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from "../../../../utils/dg-control"; - -export class NoCodeFormProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const formElement = this.domService.domDgMap.get(propertyData.id); - const table = formElement.contents.find(c => c.type === DgControl.Table.type); - const formLayoutService = new FormLayoutSettingService(this.domService, this.componentId); - - let properties = [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true, - visible: false - }, - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - min: 0, - decimals: 0 - } - ], - // cascadeConverter: new SummaryPropConverter() - }, - // { - // propertyID: 'labelSize', - // propertyName: '标签宽度(字符)', - // propertyType: 'custom', - // editor: CustomWidthEditorComponent, - // beforeOpenModal: () => this.setInitDefaultValue(propertyData), - // visible: !!!table - // }, - { - propertyID: 'controlsInline', - propertyName: '控件标签独占一列', - propertyType: 'boolean', - description: '控件标签是否独占一列', - visible: !!!table - }, - { - propertyID: 'unifiedLayout', - propertyName: '统一布局配置', - propertyType: 'custom', - description: '统一配置卡片区域内所有控件的宽度,只支持标准模式', - editor: FormLayoutSettingComponent, - beforeOpenModal: () => formLayoutService.assembleUnifiedLayoutContext(propertyData), - visible: !!!table - } - ]; - - return { - categoryId: 'appearance', - categoryName: '外观', - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - let classTemp = propertyData.appearance.class; - switch (changeObject.propertyID) { - case 'labelSize': { - if (classTemp.includes('f-form-label')) { - propertyData.appearance.class = classTemp.replace(/(f-form-label-)[^\s]+/, changeObject.propertyValue); - } else { - propertyData.appearance.class = classTemp + ' ' + changeObject.propertyValue; - } - break; - } - case 'controlsInline': { - const appearance = Object.assign({}, propertyData.appearance); - if (changeObject.propertyValue) { - if (!appearance.class.includes('farris-form-controls-inline')) { - appearance.class = appearance.class + ' ' + 'farris-form-controls-inline'; - } - } else { - appearance.class = appearance.class.replace('farris-form-controls-inline', ''); - } - propData.appearance = appearance; - break; - } - case 'unifiedLayout': { - const formNode = self.domService.domDgMap.get(propertyData.id); - formLayoutService.changeFormControlsByUnifiedLayoutConfig(formNode, changeObject.propertyValue); - self.refreshFormService.refreshFormDesigner.next(propertyData.id); - break; - } - } - } - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'editableSelect', - iterator: [ - { - key: true, value: '是' - }, - { - key: false, value: '否' - } - ] - } - ], - }; - } - - /** - * 设置标签宽度(字符)控件初始默认值 - * @param propertyData 属性值 - */ - setInitDefaultValue(propertyData: any) { - const iterator = [ - { - label: 'f-form-label-el', value: '十四' - }, - { - label: 'f-form-label-xl', value: '十' - }, - { - label: 'f-form-label-lg', value: '八' - }, - { - label: 'f-form-label-ml', value: '六' - }, - { - label: 'f-form-label-sm', value: '四' - } - ]; - const result = { - result: true, - parameters: { - customOptions: iterator, - defaultValue: '' - } - }; - const value = propertyData.labelSize; - result.parameters.defaultValue = value ? value : 'f-form-label-ml'; - return result; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/property/property-config.ts deleted file mode 100644 index 30d24945a1c00c760a9e27f3768138243f056cbf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/property/property-config.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { ElementPropertyConfig } from "@farris/ide-property-panel"; -import { DgControl } from "../../../../utils/dg-control"; -import { ContainerUsualProp } from "../../common/property/container-property-config"; -import { FormLayoutSettingComponent } from "./editor/form-layout-setting/form-layout-setting.component"; -import { FormLayoutSettingService } from "./editor/form-layout-setting/form-layout-setting.service"; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class FormProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const formLayoutService = new FormLayoutSettingService(this.domService, this.componentId); - - const commonProps = this.getCommonAppearanceProperties(); - - let properties = commonProps; - - // 下级节点中包含table控件,则不允许配置标签独占和布局属性 - const formElement = this.domService.domDgMap.get(propertyData.id); - const table = formElement.contents.find(c => c.type === DgControl.Table.type); - if (!table) { - properties = properties.concat([ - { - propertyID: 'formAutoIntl', - propertyName: '控件布局响应国际化', - propertyType: 'boolean', - description: '响应国际化:中文环境下控件标签与输入框在一行展示,其他语言环境下控件标签与输入框上下排列。' - }, - { - propertyID: 'controlsInline', - propertyName: '控件标签与输入框在一行展示', - propertyType: 'boolean', - description: '控件标签与输入框是否在一行展示。控件布局不启用响应国际化时,此属性有效。', - refreshPanelAfterChanged: true, - visible: !propertyData.formAutoIntl - }, - { - propertyID: 'labelAutoOverflow', - propertyName: '控件标签换行', - propertyType: 'boolean', - description: '控件标签字数超长时,换行显示。控件标签与输入框在一行展示时,此属性有效。', - visible: propertyData.formAutoIntl || propertyData.controlsInline - }, - { - propertyID: 'unifiedLayout', - propertyName: '统一布局配置', - propertyType: 'custom', - description: '统一配置卡片区域内所有控件的宽度,只支持标准模式', - editor: FormLayoutSettingComponent, - beforeOpenModal: () => formLayoutService.assembleUnifiedLayoutContext(propertyData) - } - ]); - } - - return { - categoryId: 'appearance', - categoryName: '外观', - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'formAutoIntl': { - const controlsInline = this.properties.find(p => p.propertyID === 'controlsInline'); - if (controlsInline) { - controlsInline.visible = !changeObject.propertyValue; - } - const labelAutoOverflow = this.properties.find(p => p.propertyID === 'labelAutoOverflow'); - if (labelAutoOverflow) { - labelAutoOverflow.visible = changeObject.propertyValue || propertyData.controlsInline; - } - self.setClassAfterAppearanceChanged(propertyData); - break; - } - case 'controlsInline': { - const labelAutoOverflow = this.properties.find(p => p.propertyID === 'labelAutoOverflow'); - if (labelAutoOverflow) { - labelAutoOverflow.visible = propertyData.formAutoIntl || changeObject.propertyValue; - } - self.setClassAfterAppearanceChanged(propertyData); - - break; - } - case 'unifiedLayout': { - const formNode = self.domService.domDgMap.get(propertyData.id); - formLayoutService.changeFormControlsByUnifiedLayoutConfig(formNode, changeObject.propertyValue); - - self.refreshFormService.refreshFormDesigner.next(propertyData.id); - break; - } - - case 'labelAutoOverflow': { - self.setLabelAutoOverflow(propertyData, changeObject.propertyValue); - - } - } - } - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ], - }; - } - - - private setLabelAutoOverflow(propertyData: any, enableLableAutoOverflow: boolean) { - const formNode = this.domService.domDgMap.get(propertyData.id); - if (formNode && formNode.contents && formNode.contents.length) { - formNode.contents.forEach(control => { - if (!control.appearance) { - control.appearance = { - class: '' - }; - } - if (!control.appearance.class) { - control.appearance.class = ''; - } - if (enableLableAutoOverflow) { - if (!control.appearance.class.includes('farris-group-multi-label')) { - control.appearance.class = control.appearance.class + ' farris-group-multi-label'; - } - } else { - control.appearance.class = control.appearance.class.replace('farris-group-multi-label', ''); - } - }); - } - - this.refreshFormService.refreshFormDesigner.next(propertyData.id); - } - - /** - * 改变【控件布局响应国际化】【控件标签与输入框在一行展示】 两个属性后,重新设置控件class样式 - */ - private setClassAfterAppearanceChanged(propertyData: any) { - const appearance = Object.assign({}, propertyData.appearance); - if (!appearance.class) { - appearance.class = ''; - } - appearance.class = appearance.class.replace('farris-form-controls-inline', ''); - - // 启用国际化适配:根据当前语言来判断 - if (propertyData.formAutoIntl) { - const isZhCHSLanguage = localStorage && localStorage.getItem('languageCode') || 'zh-CHS'; - if (isZhCHSLanguage === 'zh-CHS') { - appearance.class = appearance.class + ' farris-form-controls-inline'; - } - } else { - // 未启用国际化适配:根据controlsInline属性来判断 - if (propertyData.controlsInline) { - appearance.class = appearance.class + ' farris-form-controls-inline'; - } - } - propertyData.appearance = appearance; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/schema/schema.ts deleted file mode 100644 index 08126d41f69673a4ecf609f4beb8e2ff78d86fe3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/schema/schema.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const FormSchema = { - id: 'form', - type: 'Form', - appearance: { - class: 'f-form-layout farris-form farris-form-controls-inline' - }, - visible: true, - controlsInline: true, - formAutoIntl: true, - contents: [], - labelAutoOverflow: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/form.ts deleted file mode 100644 index f77d126313221e3291b4daa8953d7253986b8938..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/form/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar-item.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar-item.ts deleted file mode 100644 index 66ec19a746bf51676642f2d4ecb39f029d5a22cc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar-item.ts +++ /dev/null @@ -1,108 +0,0 @@ -import FdToolBarItemComponent, { ToolBarItemOptions } from '../../../command/toolbar/component/toolbaritem/component/fd-toolbar-item'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FdHeaderToolBarComponent from './fd-header-toolbar'; -import { ToolBarItemSchema } from '../../../command/toolbar/component/toolbaritem/schema/schema'; -import { cloneDeep } from 'lodash-es'; -import { HeaderToolBarItemProp } from '../property/toolbar-item-property-config'; - -export default class FdHeaderToolBarItemComponent extends FdToolBarItemComponent { - root: FdHeaderToolBarComponent; - - constructor(component: any, options: any, extendOptions?: ToolBarItemOptions) { - super(component, options, extendOptions); - - this.root = this.getParent(); - } - - init(): void { - // 新建子级组件(二级按钮)实例 - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = (this.items || []).map(item => { - const toolBarItem = new FdHeaderToolBarItemComponent(item, options, { isChildOfButton: true, viewModelId: this.viewModelId, componentId: this.componentId }); - return toolBarItem; - }); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop: HeaderToolBarItemProp = new HeaderToolBarItemProp(serviceHost.getService('Injector'), this.viewModelId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropertyConfig(this.component, !!this.isChildOfButton, !!this.isChildOfToolBar); - prop.parentButtonId = this.parent.id; - prop.isChildOfButton = this.isChildOfButton; - return propertyConfig; - } - - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (this.isChildOfButton) { - this.root.onButtonPropertyChanged(changeObject, this.component, this.parent.id); - } else { - this.root.onButtonPropertyChanged(changeObject, this.component); - } - - } - - getParent(): FdHeaderToolBarComponent { - let parent = this.options.parent; - while (!(parent instanceof FdHeaderToolBarComponent)) { - parent = parent.options.parent; - } - return parent; - } - triggerComponentClicked(e: PointerEvent) { - // 使用父组件的componentClicked事件 传递不同的参数 - const parent = this.getParent(); - parent.selectedToolbarItem = this; - - parent.emit('componentClicked', { componentInstance: this, e, needUpdatePropertyPanel: true }); - - } - /** - * 新增按钮(新增同级、新增子级) - */ - appendItem() { - const newItemMetadata = cloneDeep(ToolBarItemSchema); - this.root.appendItem(newItemMetadata, this.component.id); - } - /** - * 复制按钮(用于二级按钮的复制) - * @param id 被复制的按钮id - */ - cloneToolBarItem(id: string) { - this.root.cloneToolBarItem(id, this.component.id); - } - /** - * 删除按钮(用于二级按钮的删除) - * @param id 被删除的按钮id - */ - removeToolBarItem(id: string) { - this.root.removeToolBarItem(id, this.component.id); - } - /** - * 二级按钮上移下移 - * @param targetBtnId 当前移动的按钮id - * @param action 上移/下移 - */ - moveUpAndDown(targetBtnId: string, action: string) { - // const index = this.items.findIndex(i => i.id === targetBtnId); - // if (index < 0) { - // return; - // } - // const targetBtn = this.items[index]; - // if (action === 'moveUp' && index > 0) { - // this.items.splice(index, 1); - // this.items.splice(index - 1, 0, targetBtn); - - - // } - - // if (action === 'moveDown' && index < this.items.length - 1) { - // this.items.splice(index, 1); - // this.items.splice(index + 1, 0, targetBtn); - - - // } - this.root.moveUpAndDown(targetBtnId, this.component.id, action); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar.ts deleted file mode 100644 index 5765f0a5c67fbfa8c76b83d1ec67a8c6c0793af8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header-toolbar.ts +++ /dev/null @@ -1,447 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { cloneDeep, set } from 'lodash-es'; -import FdToolBarComponent from '../../../command/toolbar/component/fd-toolbar'; -import FdHeaderToolBarItemComponent from './fd-header-toolbar-item'; -import { GlobalTool } from '../../../command/toolbar/component/globaltools/global-tool'; -import { HeaderToolBarProp } from '../property/toolbar-property-config'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { PageToolbarEditorComponent } from '../property/editor/page-toolbar-editor/page-toolbar-editor.component'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdHeaderToolBarComponent extends FdToolBarComponent { - globalTool: GlobalTool; - private toolbar: any; - - /** 工具栏展示方式:modal弹窗/sidebar侧边栏 */ - showType: string; - - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componnentId; - - this.showType = this.options['showType']; - - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - this.adaptOldControl(); - - this.setToolbar(toolbar); - this.customToolbarConfigs.push( - { - id: 'manageToolbar', - title: '工具栏维护', - icon: 'f-icon f-icon-home-setup', - click: (e) => { - e.stopPropagation(); - - this.showPageToolbarEditor(); - } - } - ); - } - - /** 工具栏中没有按钮时,利用最小高度保证页面能选中工具栏,这样才能添加按钮 */ - getStyles(): string { - return 'min-height: 30px;'; - } - - appendItems(items) { - const toolbar = this.getToolbar(); - const modal = toolbar.configs[this.showType]; - if (modal[this.parent.id]) { - items.forEach(itemId => { - modal[this.parent.id].push(itemId); - }); - } - - this.selectedId = items[items.length - 1]; - this.rebuild(); - } - - getToolbar() { - return this.toolbar; - } - - setToolbar(toolbar: any) { - this.toolbar = toolbar; - } - - reInit(component: any, showType: string) { - this.component = component; - this.items = component.items; - - this.showType = showType; - } - - init() { - this.components = []; - - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = this.items.map(item => { - this.toolBarItem = new FdHeaderToolBarItemComponent(item, options, { - isChildOfToolBar: true, - viewModelId: this.viewModelId, - componentId: this.componentId - }); - return this.toolBarItem; - }); - - this.components = this.components.concat(this.toolBarItemList); - } - - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - this.addEventListener(this.element, 'click', (event) => { - event.stopPropagation(); - // 手动触发点击组件事件 展示属性面板 - this.parent.emit('componentClicked', { - componentInstance: this - }); - }); - return superAttach; - } - - /** - * 拖拽结束事件 - */ - dragEnd(e: any): void { - super.dragEnd(e); - - const oldIndex = e.oldIndex; - const newIndex = e.newIndex; - - // 修改全局按钮顺序 - if (oldIndex !== newIndex) { - const items = this.toolbar.configs[this.showType][this.parent.id]; - const item = items[oldIndex]; - items.splice(oldIndex, 1); - items.splice(newIndex, 0, item); - } - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop = new HeaderToolBarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject); - if (changeObject.categoryId === 'toolbarPropsOnHeader') { - // toolbar相关的变更要同步到header上 - this.parent.component[changeObject.propertyID] = changeObject.propertyValue; - this.parent.onPropertyChanged(changeObject); - } - - } - /** - * 同步单个按钮的全局配置 - * @param changeObject 变更集 - * @param buttonComponent 单个按钮json数据 - */ - onButtonPropertyChanged(changeObject: any, buttonComponent: any, parentItemId?: string): void { - - const buttonsInGlobal = this.toolbar.items[this.viewModelId]; - let buttonInGlobal; - if (parentItemId) { - const firstLevelItem = buttonsInGlobal.find(button => button.id === parentItemId); - if (firstLevelItem && firstLevelItem.items && firstLevelItem.items.length) { - buttonInGlobal = firstLevelItem.items.find(b => b.id === buttonComponent.id); - } - } else { - buttonInGlobal = buttonsInGlobal.find(b => b.id === buttonComponent.id); - } - - if (!buttonInGlobal) { - return; - } - // 变更事件属性 - if (changeObject.categoryId === 'eventsEditor') { - buttonInGlobal['click'] = buttonComponent['click']; - return; - } - // 变更其他属性 - const path = changeObject.propertyPath ? `${changeObject.propertyPath}.${changeObject.propertyID}` : changeObject.propertyID; - set(buttonInGlobal, path, changeObject.propertyValue); - - this.onPropertyChanged(changeObject); - - - } - rebuild(): Promise { - return this.parent.rebuild(); - } - - emit(eventName: string, fn: any) { - return this.parent.emit(eventName, fn); - } - /** - * 移除按钮 - * @param id 移除按钮id - * @param parentItemId 移除按钮的父级按钮id,若移除的是一级按钮,则不需要传递 - */ - public removeToolBarItem(targetId: string, parentItemId?: string): void { - - const toolbar = this.getToolbar(); - const mesService = this.options.designerHost.getService('MessagerService'); - mesService.question('确定删除按钮?', () => { - let targetIndex; - let nextBtnId; - // 获取当前显示模式下的按钮 - const allButtonIdsInShowType = toolbar.configs[this.showType]; - const buttonIds = allButtonIdsInShowType[this.parent.id]; - // 一级按钮:从当前控制中移除,但是全局按钮还是保留 - if (!parentItemId) { - targetIndex = buttonIds.indexOf(targetId); - if (!buttonIds || buttonIds.length === 0 || targetIndex < 0) { - return; - } - allButtonIdsInShowType[this.parent.id].splice(targetIndex, 1); - - nextBtnId = buttonIds[targetIndex]; - - } else { - // 二级按钮:从当前控件中移除,并且从全局按钮中移除 - const items = toolbar.items[this.viewModelId]; - const firstLevelItem = items.find(button => button.id === parentItemId); - if (firstLevelItem) { - firstLevelItem.items = firstLevelItem.items || []; - targetIndex = firstLevelItem.items.findIndex(item => item.id === targetId); - firstLevelItem.items.splice(targetIndex, 1); - - nextBtnId = firstLevelItem.items[targetIndex] ? firstLevelItem.items[targetIndex].id : null; - } - } - - - // 自动选中下一个按钮 - this.setSelectedId(nextBtnId); - - if (!nextBtnId) { - this.parent.emit('clearPropertyPanel'); - } - this.rebuild(); - - this.syncActions(); - }); - - } - - /** - * 新增按钮 - * @param item 新增按钮的元数据 - * @param parentItemId 新增按钮的父级按钮id,若新增的是一级按钮,则不需要传递 - */ - public appendItem(item: any, parentItemId?: string): void { - const itemSchema = Object.assign({}, cloneDeep(item)); - itemSchema.id = `${itemSchema.id}-${Math.random().toString(36).slice(2, 6)}`; - const toolbar = this.getToolbar(); - - if (!toolbar.items[this.viewModelId]) { - toolbar.items[this.viewModelId] = []; - } - if (!toolbar.configs[this.showType]) { - toolbar.configs[this.showType] = {}; - } - - const items = toolbar.items[this.viewModelId]; - // 一级按钮 - if (!parentItemId) { - items.push(itemSchema); - const modal = toolbar.configs[this.showType]; - if (!modal[this.parent.id]) { - modal[this.parent.id] = toolbar.configs[this.showType][this.parent.id] = []; - } - modal[this.parent.id].push(itemSchema.id); - } else { - // 二级按钮 - const firstLevelItem = items.find(button => button.id === parentItemId); - if (firstLevelItem) { - firstLevelItem.items = firstLevelItem.items || []; - firstLevelItem.items.push(itemSchema); - } - } - - - this.setSelectedId(itemSchema.id); - this.rebuild(); - } - - /** - * 复制按钮 - * @param id 被复制的按钮id - */ - public cloneToolBarItem(id: string, parentItemId?: string): void { - - // 复制的新按钮的id - let clonedToolBarItemId: string; - - if (parentItemId) { - clonedToolBarItemId = this.cloneSecondLevelButton(id, parentItemId); - } else { - clonedToolBarItemId = this.cloneFirstLevelButton(id); - } - - this.setSelectedId(clonedToolBarItemId); - this.rebuild(); - } - /** - * 复制一级按钮 - * @param id 被复制按钮的id - */ - private cloneFirstLevelButton(id: string) { - const itemToCloneIndex = this.items.findIndex(item => item.id === id); - const itemToClone = this.items[itemToCloneIndex]; - if (!itemToClone) { - return; - } - const clonedToolBarItem = Object.assign(cloneDeep(itemToClone), - { - id: `${this.type}-cloned-${Math.random().toString(36).slice(2, 6)}`, - click: null - }); - - - delete clonedToolBarItem['disabled']; - - let itemsToClone = []; - if (clonedToolBarItem.items && clonedToolBarItem.items.length) { - itemsToClone = clonedToolBarItem.items.map(i => Object.assign(cloneDeep(i), - { - id: `${this.type}-cloned-${Math.random().toString(36).slice(2, 6)}`, - click: null - })); - } - clonedToolBarItem.items = itemsToClone; - - // 添加到被复制元素的后面 - const items = this.toolbar.items[this.viewModelId]; - items.push(clonedToolBarItem); - const modal = this.toolbar.configs[this.showType]; - modal[this.parent.id].splice(itemToCloneIndex + 1, 0, clonedToolBarItem.id); - - return clonedToolBarItem.id; - } - - /** - * 复制二级按钮 - * @param id 被复制按钮的id - * @param parentItemId 被复制按钮的父级按钮id - */ - private cloneSecondLevelButton(id: string, parentItemId?: string) { - const parentItem = this.items.find(item => item.id === parentItemId); - const itemToCloneIndex = parentItem.items.findIndex(item => item.id === id); - const itemToClone = parentItem.items[itemToCloneIndex]; - - if (!itemToClone) { - return; - } - - const random = Math.random().toString(36).slice(2, 6); - const clonedToolBarItem = Object.assign(cloneDeep(itemToClone), - { - id: `${this.type}-cloned-${random}`, - click: null - }); - - delete clonedToolBarItem['disabled']; - - // 添加到被复制元素的后面 - const globalItems = this.toolbar.items[this.viewModelId]; - const firstLevelItem = globalItems.find(item => item.id === parentItemId); - if (firstLevelItem) { - firstLevelItem.items = firstLevelItem.items || []; - firstLevelItem.items.splice(itemToCloneIndex + 1, 0, clonedToolBarItem); - } - - - return clonedToolBarItem.id; - } - - /** - * 二级按钮上移下移 - * @param targetBtnId 当前移动的二级按钮id - * @param parentItemId 二级按钮所属的一级按钮id - * @param action 上移/下移 - */ - moveUpAndDown(targetBtnId: string, parentItemId: string, action: string) { - const parentItem = this.items.find(item => item.id === parentItemId); - const index = parentItem.items.findIndex(i => i.id === targetBtnId); - if (index < 0) { - return; - } - - - const globalItems = this.toolbar.items[this.viewModelId]; - const firstLevelItem = globalItems.find(item => item.id === parentItemId); - if (firstLevelItem) { - firstLevelItem.items = firstLevelItem.items || []; - - const targetBtn = firstLevelItem.items[index]; - if (action === 'moveUp' && index > 0) { - firstLevelItem.items.splice(index, 1); - firstLevelItem.items.splice(index - 1, 0, targetBtn); - - this.rebuild(); - } - - if (action === 'moveDown' && index < firstLevelItem.items.length - 1) { - firstLevelItem.items.splice(index, 1); - firstLevelItem.items.splice(index + 1, 0, targetBtn); - - this.rebuild(); - } - - } - } - - /** - * 适配一些旧表单上的冗余按钮 - */ - private adaptOldControl() { - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - if (!toolbar || !toolbar.configs[this.showType] || !toolbar.configs[this.showType][this.parent.id]) { - return; - } - - const allItems = (toolbar.items || {})[this.viewModelId] as any[]; - const allItemIds = allItems.map(item => item.id); - // 移除不存在的按钮id - toolbar.configs[this.showType][this.parent.id] = toolbar.configs[this.showType][this.parent.id].filter(item => allItemIds.includes(item)); - } - - private showPageToolbarEditor() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - - const compFactory = resolver.resolveComponentFactory(PageToolbarEditorComponent); - const compRef = compFactory.create(injector); - const modalConfig = { - title: '维护工具栏', - width: 950, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.editorParams = { - viewModelId: this.viewModelId, - controlId: this.parent.component.id - }; - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe(() => { - this.parent.toolbarDatas = this.parent.assembleHeaderToolbar(); - this.parent.redraw(); - modalPanel.close(); - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header.ts deleted file mode 100644 index 011a6f4a39bc6f0f25ee508fda147430a6593263..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/component/fd-header.ts +++ /dev/null @@ -1,378 +0,0 @@ -import { HeaderSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { HeaderProp } from '../property/property-config'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import { BuilderHTMLElement, FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DomService, FormBindingType } from '@farris/designer-services'; -import FdHeaderToolBarComponent from './fd-header-toolbar'; -import { cloneDeep } from 'lodash-es'; -import { DgControl } from '../../../../utils/dg-control'; -import { HeaderDragDropManager } from '../drag-drop/dragAndDrapManager'; - -export default class FdHeaderComponent extends FarrisDesignBaseNestedComponent { - - /** 当前表单的展示模式,弹出类modal/独立页签类page/侧边滑出类slide 。 - * 优先取控件所属组件的展示类型,若没有配置,则取当前表单的展示类型 - */ - currentFormMode; - - // toolbar数据 - toolbarDatas; - // 标识当前viewChangeKey - get viewChangeKey(): string { - return `viewChange-${this.key}`; - } - // 当前选中的项 - activeTypeItem; - // 查找ref=form的项 - private formParent = undefined; - private multiViewContainerEl = undefined; - - /** 主标题,因为主标题支持配置变量,为了页面不显示[object,object],故将属性单独配置 */ - private mainTitle: string; - - headerToolBar: FdHeaderToolBarComponent; - globalToolbar: any; - - /** 判断当前容器是否是固定的上下文的中间层级,这种容器不支持移动、不支持删除、并且隐藏间距 */ - private isInFixedContextRules = false; - - private dragManager: HeaderDragDropManager; - - constructor(component: any, options: any) { - super(component, options); - - // 虽然类别为“容器”,但是实际没有子级节点 - this.category = 'container'; - - this.dragManager = new HeaderDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - } - - - getDefaultSchema(): any { - - return HeaderSchema; - } - - /** - * 为了适配按钮大小,增加ide-header-toolbar-XX 样式 - */ - getClassName(): string { - let clsName = super.getClassName(); - if (this.component.toolbarBtnSize && this.component.toolbarBtnSize !== 'default') { - clsName += ' ide-header-toolbar-' + this.component.toolbarBtnSize; - } - return clsName; - } - - getTemplateName(): string { - return 'Header'; - } - hideNestedPaddingInDesginerView(): boolean { - return true; - } - // 初始化 - init(): void { - this.components = []; - this.initToolbar(); - - super.init(); - } - - private initToolbar() { - // 当前showType - const domService = this.options.designerHost.getService('DomService'); - this.currentFormMode = domService.module.showType || 'page'; - const comp = domService.getComponentByVMId(this.viewModelId); - if (comp && comp.showType) { - this.currentFormMode = comp.showType; - } - // viewChange赋值 - if (this.component.showViewChange && this.component.viewDatas) { - // 初始化时,用结构上的或者默认的viewType - this.activeTypeItem = OperateUtils.viewChangeInitActiveItem(this.component.currentTypeInDesignerView || this.component.viewDefaultType, this.activeTypeItem, this.component.viewDatas); - } - this.toolbarDatas = this.assembleHeaderToolbar(); - // 创建工具栏组件 - const toolBarComponent = this.getResponseToolbarStr(); - const options = Object.assign({}, this.options, { childComponents: [], parent: this, showType: this.currentFormMode }); - if (!this.headerToolBar) { - this.headerToolBar = new FdHeaderToolBarComponent(toolBarComponent, options); - } else { - this.headerToolBar.reInit(toolBarComponent, this.currentFormMode); - } - this.headerToolBar.init(); - this.assembleMainTitle(); - - } - // 渲染模板 - render(children): any { - this.initToolbar(); - - return super.render(children || this.renderTemplate('Header', { - toolbarDatas: this.toolbarDatas, - currentFormMode: this.currentFormMode, - viewChangeKey: this.viewChangeKey, - getViewChangeStr: () => this.getViewChangeStr(), - headerToolBar: this.headerToolBar, - mainTitle: this.mainTitle - })); - } - // 绑定事件 - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.viewChangeKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - if (this.component.showViewChange && this.component.viewDatas) { - // 绑定 - if (this.component.viewType === 'tile') { - OperateUtils.bindTileEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.component.viewDatas, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl(); - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.component.currentTypeInDesignerView = this.activeTypeItem['type']; - this.redraw(); - }); - - } else if (this.component.viewType == 'dropdown') { - OperateUtils.bindDropdownEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.component.viewDatas, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl() - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.component.currentTypeInDesignerView = this.activeTypeItem['type']; - this.redraw(); - }); - } - } - // 工具栏绑定事件 - const headerToolBarEle = element.querySelector('.farris-component-HeaderToolBar'); - if (headerToolBarEle) { - this.headerToolBar.attach(headerToolBarEle); - } - - // 将按钮的实例追加到header中,是为了从代码编辑器切换到可视化设计器时重新选中按钮 - if (this.headerToolBar) { - const toolbarItemCmps = this.headerToolBar.components || []; - this.components = this.components.concat(toolbarItemCmps); - } - - this.setUnusedButtonsBasicInfoMap(); - - // 必写 - return superAttach; - } - - /** - * 查找multiViewContainerEl - */ - private findMultiViewContainerEl() { - if (this.multiViewContainerEl) { - return; - } - if (this.formParent === undefined) { - this.formParent = OperateUtils.getFormParent(this.element); - } - if (this.formParent && this.multiViewContainerEl === undefined) { - // 查找同组的元素 - this.multiViewContainerEl = this.formParent.querySelector('.farris-component-MultiViewContainer[viewchange=' + this.component.viewGroupIdentify + ']'); - } - } - // 构造Toolbar - private assembleHeaderToolbar() { - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - // 获取全局按钮组 - this.globalToolbar = toolbar; - if (!toolbar || !toolbar.items || !toolbar.items[this.viewModelId] || - !toolbar.configs || !toolbar.configs[this.currentFormMode] || - !toolbar.configs[this.currentFormMode][this.id]) { - return []; - } - const buttonConfig = toolbar.configs[this.currentFormMode][this.id] as string[]; - if (!buttonConfig) { - return []; - } - // 根据当前展示类型和当前控件id获取控件上所有的按钮配置 - const toolbarItems = []; - buttonConfig.forEach(buttonId => { - const buttonInfo = toolbar.items[this.viewModelId].find(item => buttonId === item.id); - if (buttonInfo) { - toolbarItems.push(buttonInfo); - } - }); - return this.assembleToolBarItem(toolbarItems); - } - // 构造ToolbarItem - private assembleToolBarItem(items): any[] { - if (!items || items.length === 0) { - return []; - } - const data = []; - items.forEach(item => { - const dataItem = cloneDeep(item); - dataItem.disabled = typeof (item.disable) === 'boolean' ? item.disable : false; - - - if (item.items && item.items.length > 0) { - dataItem.isDP = true; - dataItem.items = this.assembleToolBarItem(item.items); - } - - data.push(dataItem); - }); - return data; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: HeaderProp = new HeaderProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - /** - * 获取view chagne的字符串 - */ - getViewChangeStr() { - return OperateUtils.getViewChangeStr(this.component.viewDatas, this.component.viewType, this.activeTypeItem); - } - /** - * 获取工具栏数据 - */ - getResponseToolbarStr() { - - const toolBar = { - id: 'header-toolbar' + Math.random().toString(36).slice(2, 6), - type: 'HeaderToolBar', - appearance: { - class: `f-toolbar ml-auto ${this.component.toolbarCls}` - }, - title: '头部工具栏', - items: this.toolbarDatas, - toolbarCls: this.component.toolbarCls, - toolbarBtnSize: this.component.toolbarBtnSize, - toolbarPopDirection: this.component.toolbarPopDirection - }; - return toolBar; - } - - /** - * 获取模板显示的主标题值。 - */ - private assembleMainTitle() { - let mainTitle = this.component.mainTitle; - // 适配主标题为变量的场景 - if (typeof (mainTitle) === 'object') { - if (mainTitle.type === FormBindingType.Variable && mainTitle.path) { - mainTitle = '变量:【' + mainTitle.path + '】'; - } - } - this.mainTitle = mainTitle; - } - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (['visible', 'viewChangeType'].includes(changeObject.propertyID)) { - return; - } - // 变更按钮个数,需要重新组装toolbarDatas数据 - if (changeObject.propertyID === 'toolbarDatas') { - this.toolbarDatas = this.assembleHeaderToolbar(); - } - if (changeObject.propertyID === 'mainTitle') { - this.assembleMainTitle(); - } - - this.redraw(); - - } - - checkCanDeleteComponent(): boolean { - if (this.isInFixedContextRules) { - return false; - } - return true; - } - checkCanMoveComponent(): boolean { - if (this.isInFixedContextRules) { - return false; - } - return true; - } - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - return false; - } - - /** - * 点击控件时计算控件工具栏位置 - */ - setPositionOfBtnGroup() { - super.setPositionOfBtnGroup(); - - // header重绘后要重新计算内部工具栏的操作图标位置 - if (this.headerToolBar) { - const toolbarEle = this.element.querySelector(`.dgComponentSelected[controltype='${DgControl.HeaderToolBar.type}']`); - - if (toolbarEle) { - const toolbar = toolbarEle.querySelector('.component-btn-group') as HTMLElement; - if (toolbar) { - toolbar.style.display = ''; - const toolbarRect = toolbar.getBoundingClientRect(); - - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - - divPanel.style.top = toolbarRect.top + 'px'; - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - } - } - - } - } - - /** - * 当前页面中未被使用的全局按钮,设置路径嘻嘻 - */ - private setUnusedButtonsBasicInfoMap() { - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - - if (!toolbar || !toolbar.items || !toolbar.items[this.viewModelId] || - !toolbar.configs || !toolbar.configs[this.currentFormMode] || - !toolbar.configs[this.currentFormMode][this.id]) { - return []; - } - const buttonConfig = toolbar.configs[this.currentFormMode][this.id] as string[]; - if (!buttonConfig) { - return []; - } - - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 全局按钮若未被使用,仍需要设置路径信息,目的是为了方便交互面板显示 - let allUsedButtons = []; - Object.keys(toolbar.configs[this.currentFormMode]).map(controlId => { - allUsedButtons = allUsedButtons.concat(toolbar.configs[this.currentFormMode][controlId]); - }); - - - toolbar.items[this.viewModelId].map(button => { - if (!allUsedButtons.includes(button.id)) { - domService.controlBasicInfoMap.set(button.id, { - showName: button.text, - parentPathName: button.text - }); - } - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/drag-drop/dragAndDrapManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/drag-drop/dragAndDrapManager.ts deleted file mode 100644 index 7ac1bfa84b1d7b2bbfa3edb9d8f0e3e21d2e6fa0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/drag-drop/dragAndDrapManager.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; - -export class HeaderDragDropManager { - - private cmpInstance: FarrisDesignBaseNestedComponent; - - - constructor(cmpInstance: FarrisDesignBaseNestedComponent) { - this.cmpInstance = cmpInstance; - } - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - - // 父级节点 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 放在根组件下面的页头、页脚,不支持移除 - if (parentClassList.includes('f-page')) { - return true; - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/export.ts deleted file mode 100644 index b42b0df3aec714d2217c3613b031aa9a9c3fed9c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/export.ts +++ /dev/null @@ -1,28 +0,0 @@ -import FdHeaderComponent from './component/fd-header'; -import { HeaderSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdHeaderTemplates from './templates'; -import FdHeaderToolBarComponent from './component/fd-header-toolbar'; -import FdHeaderToolBarItemComponent from './component/fd-header-toolbar-item'; -import FdHeaderToolBarTemplate from '../../command/toolbar/templates/form'; -import FdHeaderToolBarItemTemplate from '../../command/toolbar/component/toolbaritem/templates/form'; - -export const Header: ComponentExportEntity = { - type: 'Header', - component: FdHeaderComponent, - template: FdHeaderTemplates, - metadata: HeaderSchema -}; - -export const HeaderToolBar = { - type: 'HeaderToolBar', - component: FdHeaderToolBarComponent, - template: { form: FdHeaderToolBarTemplate } -}; - -export const HeaderToolBarItem = { - type: 'HeaderToolBarItem', - component: FdHeaderToolBarItemComponent, - template: { form: FdHeaderToolBarItemTemplate } -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-converter.ts deleted file mode 100644 index 37597db008184330c1dd22de647cdaec581e878b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-converter.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; -import { DomService } from '@farris/designer-services'; - -export class PageToolbarConverter implements TypeConverter { - - controlId: string; - showType: string; - constructor(private domService: DomService, controlId: string, showType: string) { - this.controlId = controlId; - this.showType = showType; - } - convertTo(data): string { - const { toolbar } = this.domService.module; - if (!toolbar || !toolbar.items || !toolbar.configs || !toolbar.configs[this.showType]) { - return; - } - - const currentButtonConfig = toolbar.configs[this.showType][this.controlId]; - if (!currentButtonConfig) { - return; - } - return '共' + currentButtonConfig.length + '项'; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.css deleted file mode 100644 index 782fee2ffa9bd4d4adc5fcf6d6c382a09a428b69..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.css +++ /dev/null @@ -1,48 +0,0 @@ -:host .leftTree>>>.farris-treetable-body .table-bordered { - border: none !important; -} - -:host .rightTree>>>td { - position: relative; - padding-left: 0px; -} - -:host .rightTree>>>tr span.btn-icontext { - font-size: 12px; - color: #000; - display: none; -} - -:host .rightTree>>>tr:hover { - cursor: pointer; -} - -:host .rightTree>>>tr:hover span.btn-icontext { - display: inline-flex; - margin-top: -1px; - text-align: center; - right: 10px; - position: absolute; - top: 7px; -} - -:host .f-multi-select-list-btns { - padding: 0 10px; -} - -:host .rightTree>>>td.farris-treetable-emptydata { - position: inherit; -} - -:host .leftTree>>>.farris-treetable-body .table-bordered { - border: none !important; -} - -:host .leftTree>>>tr .childNodeToggler { - visibility: hidden; - margin-right: -7px; -} - -:host .leftTree>>>tr .childNodeToggler .treetable-toggler { - visibility: hidden !important; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.html deleted file mode 100644 index c35352733690c94d6f3478fa3ed4b8ec732ec92f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.html +++ /dev/null @@ -1,101 +0,0 @@ -
    -
    -
    - - 全部 -
    - - 删除 -
    -
    -
    - - - - - - - - {{rowData['text']}} - - - - -
    -
    -
    -
    - - - - -
    - -
    -
    -
    - 已选择 -
    -
    - - - -
    -
    -
    -
    - - - - -
    - -
    - - - - - - - - - - - {{ctx.node.data['text']}} - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.ts deleted file mode 100644 index e3b16bf24157889d57cf56768e6de651d7be65d5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component.ts +++ /dev/null @@ -1,688 +0,0 @@ -import { ChangeDetectorRef, Component, EventEmitter, HostBinding, Injector, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode, TreeTableColumn, TreeTableComponent } from '@farris/ui-treetable'; -import { DomService, WebCmdService } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { ToolBarItemProp } from '../../../../../command/toolbar/component/toolbaritem/property/property-config'; -import { ControlService } from '.././../../../../../service/control.service'; - -@Component({ - selector: 'app-page-toolbar-editor', - templateUrl: './page-toolbar-editor.component.html', - styleUrls: ['./page-toolbar-editor.component.css'] -}) - -export class PageToolbarEditorComponent implements OnInit { - - @Input() editorParams: { controlId: string, viewModelId: string }; - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @ViewChild('modalFooter') modalFooter: TemplateRef; - modalConfig = { - title: '工具栏编辑器', - width: 950, - height: 700, - showButtons: true, - showMaxButton: true - }; - - /** 左侧树实例 */ - @ViewChild('leftTree') leftTree: TreeTableComponent; - - /** 左侧树数据:当前表单所有的工具栏按钮 */ - leftTreeData: TreeNode[] = []; - - /** 树表列配置 */ - treeColumns = [{ field: 'text', title: '名称' }]; - @ViewChild('textColTpl') textColTpl: TemplateRef; - rightTreeColumns: TreeTableColumn[] = []; - - - - /** 右侧树实例 */ - @ViewChild('rightTree') rightTree: TreeTableComponent; - - /** 右侧树数据:当前控件已选择的按钮 */ - rightTreeData: TreeNode[] = []; - /** 右侧选择的行 */ - selectedRightNode: TreeNode; - - /** 当前模式下控件的按钮配置 */ - toolbarConfig = [] as string[]; - /** 全部按钮 */ - toolbarItems = [] as any[]; - - @HostBinding('class') - class = 'h-100 d-flex flex-fill'; - - noDataMoveMessage = '请选择要移动的数据。'; - - /** 当前所有被占用的按钮ID */ - occupiedButtonIdList = []; - - /** 属性面板配置 */ - propertyConfig: ElementPropertyConfig[] = []; - - /** 属性面板值 */ - propertyData; - - /** 当前表单的展示模式,弹出类modal/独立页签类page/侧边滑出类slide */ - currentFormMode = 'page'; - - private toolbarItemProp: ToolBarItemProp; - constructor( - private notifyServ: NotifyService, - private domService: DomService, - private controlService: ControlService, - private injector: Injector, - private cd: ChangeDetectorRef, - private webCmdService: WebCmdService) { - - - - } - ngOnInit() { - this.currentFormMode = this.domService.module.showType || 'page'; - const comp = this.domService.getComponentByVMId(this.editorParams.viewModelId); - if (comp && comp.showType) { - this.currentFormMode = comp.showType; - } - - this.rightTreeColumns = [{ - field: 'text', - title: '名称', - template: this.textColTpl - }]; - const toolbar = this.domService.module.toolbar; - if (!toolbar || !toolbar.items || !toolbar.items[this.editorParams.viewModelId]) { - return; - } - this.toolbarItems = cloneDeep(toolbar.items[this.editorParams.viewModelId]); - if (toolbar.configs && toolbar.configs[this.currentFormMode]) { - this.toolbarConfig = cloneDeep(toolbar.configs[this.currentFormMode][this.editorParams.controlId] || []); - this.getOccupiedButtons(); - } - - this.leftTreeData = this.assembleToolbarItemsToTree(this.toolbarItems); - - const selectedToolbarItems = []; - this.toolbarConfig.forEach(buttonId => { - const buttonInfo = this.toolbarItems.find(item => buttonId === item.id); - if (buttonInfo) { - selectedToolbarItems.push(buttonInfo); - } - }); - - this.rightTreeData = this.assembleToolbarItemsToTree(selectedToolbarItems); - - this.toolbarItemProp = new ToolBarItemProp(this.injector, this.editorParams.viewModelId); - } - - private assembleToolbarItemsToTree(buttons: any, level = 0) { - const treeData: TreeNode[] = []; - buttons.forEach(button => { - - // 子级按钮 - let children = []; - if (button.items) { - children = this.assembleToolbarItemsToTree(button.items, level + 1); - } - - treeData.push({ - data: button, - children, - expanded: level > 0 - }); - }); - - return treeData; - } - - /** - * 获取当前展示模式下 所有被占用的按钮 - */ - getOccupiedButtons() { - this.occupiedButtonIdList = []; - const toolbar = this.domService.module.toolbar; - const configsInCurrentModel = toolbar.configs[this.currentFormMode]; - - if (!configsInCurrentModel) { - return; - } - for (const controlId of Object.keys(configsInCurrentModel)) { - - if (configsInCurrentModel[controlId].length > 0) { - this.occupiedButtonIdList.push(...configsInCurrentModel[controlId]); - } - // if (controlId !== this.editorParams.controlId) { - // this.occupiedByOtherControlButtonIdList.push(...configsInCurrentModel[controlId]); - // } - - } - - } - /** - * 左侧树节点是否可勾选 - */ - canChecked(treeNode: any) { - if (!treeNode.selectable || !!treeNode.parent) { - return false; - } - - return !this.occupiedButtonIdList.includes(treeNode.data.id); - } - - /** - * 左侧树行颜色 - */ - getTdStyleColor(canCheck: boolean, treeNode: any) { - // 判断子级按钮的颜色 - if (!canCheck && treeNode.parent) { - const rootNode = this.getRootNode(treeNode); - const parentCanCheck = this.canChecked(rootNode); - if (parentCanCheck) { - canCheck = true; - } - } - - return canCheck ? '#333' : '#a6a6a6'; - } - /** - * 子级按钮的颜色:与所属顶层按钮一致 - */ - getRootNode(treeNode: any) { - const parentNode = treeNode.parent; - if (parentNode) { - return this.getRootNode(parentNode); - } else { - return treeNode; - } - } - /** - * 选择右侧行 - */ - selectRightNode(rowNode: any) { - this.selectedRightNode = rowNode.node; - - this.propertyData = this.selectedRightNode.data; - - this.propertyConfig = this.toolbarItemProp.getPropertyConfigInTree(this.editorParams.viewModelId, false, - this.selectedRightNode); - - this.cd.detectChanges(); - } - - /** - * 右移 - */ - moveToRight() { - const leftChecks = this.leftTree.checkeds; - if (!leftChecks || leftChecks.length === 0) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const needMoveButtons = []; - leftChecks.forEach(checkNode => { - if (checkNode.parent) { - return; - } - needMoveButtons.push(checkNode.data); - this.occupiedButtonIdList.push(checkNode.data.id); - }); - const rightNewTreeNodes = this.assembleToolbarItemsToTree(needMoveButtons); - this.rightTreeData.push(...rightNewTreeNodes); - - this.rightTree.loadData(this.rightTreeData); - this.leftTree.clearAll(); - - - } - /** - * 全部右移 - */ - moveAllToRight() { - const needMoveButtons = []; - this.leftTree.data.forEach(treeNode => { - if (this.canChecked(treeNode)) { - needMoveButtons.push(treeNode.data); - this.occupiedButtonIdList.push(treeNode.data.id); - } - }); - const rightNewTreeNodes = this.assembleToolbarItemsToTree(needMoveButtons); - this.rightTreeData.push(...rightNewTreeNodes); - - this.rightTree.loadData(this.rightTreeData); - this.leftTree.clearAll(); - } - - /** - * 左移 - */ - moveToLeft() { - - if (!this.selectedRightNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - if (this.selectedRightNode.parent) { - this.notifyServ.warning('请选择根节点'); - return; - } - const index = this.rightTreeData.findIndex(d => d.data.id === this.selectedRightNode.data.id); - if (index < 0) { - return; - } - this.rightTreeData.splice(index, 1); - - this.rightTree.loadData(this.rightTreeData); - this.rightTree.clearSelections(); - - - this.occupiedButtonIdList = this.occupiedButtonIdList.filter(id => id !== this.selectedRightNode.data.id); - - this.propertyConfig = []; - this.selectedRightNode = null; - } - - /** - * 全部删除 - */ - moveAllToLeft() { - const buttonIds = this.rightTreeData.map(d => d.data.id); - this.occupiedButtonIdList = this.occupiedButtonIdList.filter(id => !buttonIds.includes(id)); - - - this.rightTreeData.length = 0; - this.rightTree.loadData(this.rightTreeData); - this.rightTree.clearSelections(); - - this.propertyConfig = []; - this.selectedRightNode = null; - } - - /** - * 置顶 - */ - moveTop() { - if (!this.selectedRightNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const parentNode = this.selectedRightNode.parent; - const siblingNodes = parentNode ? parentNode.children : this.rightTreeData; - - const index = siblingNodes.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (index < 1) { - return; - } - siblingNodes.splice(index, 1); - siblingNodes.splice(0, 0, this.selectedRightNode); - - this.rightTree.loadData(this.rightTreeData); - - // 重新选中行 - const newRowNode = this.rightTree.findRowNode(this.selectedRightNode.data.id); - if (newRowNode) { - newRowNode.isSelected = true; - } - // 同步左侧树子级节点的顺序 - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === this.selectedRightNode.data.id); - if (parentNode) { - const leftParentNode = leftTreeNode.parent; - - const leftIndex = leftParentNode.children.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (leftIndex < 1) { - return; - } - leftParentNode.children.splice(leftIndex, 1); - leftParentNode.children.splice(0, 0, leftTreeNode.node); - - this.leftTree.loadData(this.leftTreeData); - - } - } - /** - * 上移 - */ - moveUp() { - if (!this.selectedRightNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const parentNode = this.selectedRightNode.parent; - const siblingNodes = parentNode ? parentNode.children : this.rightTreeData; - - const index = siblingNodes.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (index < 1) { - return; - } - siblingNodes.splice(index, 1); - siblingNodes.splice(index - 1, 0, this.selectedRightNode); - - this.rightTree.loadData(this.rightTreeData); - - // 同步左侧树子级节点的顺序 - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === this.selectedRightNode.data.id); - if (parentNode) { - const leftParentNode = leftTreeNode.parent; - - const leftIndex = leftParentNode.children.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (leftIndex < 1) { - return; - } - leftParentNode.children.splice(leftIndex, 1); - leftParentNode.children.splice(leftIndex - 1, 0, leftTreeNode.node); - - this.leftTree.loadData(this.leftTreeData); - - } - // else { - // const leftIndex = this.leftTreeData.findIndex(node => node.data.id === this.selectedRightNode.data.id); - // if (leftIndex < 1) { - // return; - // } - // this.leftTreeData.splice(index, 1); - // this.leftTreeData.splice(index - 1, 0, leftTreeNode.node); - // } - // this.leftTree.loadData(this.leftTreeData); - } - /** - * 下移 - */ - moveDown() { - if (!this.selectedRightNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const parentNode = this.selectedRightNode.parent; - const siblingNodes = parentNode ? parentNode.children : this.rightTreeData; - - const index = siblingNodes.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (index === siblingNodes.length - 1) { - return; - } - siblingNodes.splice(index, 1); - siblingNodes.splice(index + 1, 0, this.selectedRightNode); - - this.rightTree.loadData(this.rightTreeData); - - // 同步左侧树子级节点的顺序 - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === this.selectedRightNode.data.id); - if (parentNode) { - const leftParentNode = leftTreeNode.parent; - - const leftIndex = leftParentNode.children.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (leftIndex === leftParentNode.children.length - 1) { - return; - } - leftParentNode.children.splice(leftIndex, 1); - leftParentNode.children.splice(leftIndex + 1, 0, leftTreeNode.node); - - this.leftTree.loadData(this.leftTreeData); - - } - } - - /** - * 置底 - */ - moveBottom() { - if (!this.selectedRightNode) { - this.notifyServ.warning(this.noDataMoveMessage); - return; - } - const parentNode = this.selectedRightNode.parent; - const siblingNodes = parentNode ? parentNode.children : this.rightTreeData; - - const index = siblingNodes.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (index === siblingNodes.length - 1) { - return; - } - siblingNodes.splice(index, 1); - siblingNodes.push(this.selectedRightNode); - - this.rightTree.loadData(this.rightTreeData); - - // 同步左侧树子级节点的顺序 - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === this.selectedRightNode.data.id); - if (parentNode) { - const leftParentNode = leftTreeNode.parent; - - const leftIndex = leftParentNode.children.findIndex(node => node.data.id === this.selectedRightNode.data.id); - if (leftIndex === leftParentNode.children.length - 1) { - return; - } - leftParentNode.children.splice(leftIndex, 1); - leftParentNode.children.push(leftTreeNode.node); - - this.leftTree.loadData(this.leftTreeData); - - } - } - - - /** - * 新增按钮 - */ - addButton() { - const newButtonData = this.controlService.getControlMetaData('ToolBarItem'); - const radomNum = Math.random().toString().substr(2, 4); - newButtonData.id = 'toolBarItem_' + radomNum; - newButtonData.text = '新增按钮_' + radomNum; - - this.leftTreeData.push({ data: newButtonData, children: [], expanded: false }); - - this.leftTree.loadData(this.leftTreeData); - } - /** - * 删除按钮 - */ - deleteButton() { - const leftChecks = this.leftTree.checkeds; - if (!leftChecks || leftChecks.length === 0) { - this.notifyServ.warning('请勾选要删除的数据'); - return; - } - - for (const checkNode of leftChecks) { - if (checkNode.parent) { - return; - } - const occupiedControlId = this.checkCanDeleteButton(checkNode.data.id); - if (occupiedControlId) { - this.notifyServ.warning('【' + checkNode.data.text + '】已经在ID为' + occupiedControlId + '的控件中使用,请先在控件中移除'); - } else { - - const index = this.leftTreeData.findIndex(d => d.data.id === checkNode.data.id); - if (index > -1) { - this.leftTreeData.splice(index, 1); - } - - } - } - this.leftTree.loadData(this.leftTreeData); - } - - checkCanDeleteButton(buttonId: string) { - const toolbar = this.domService.module.toolbar; - if (!toolbar || !toolbar.configs) { - return; - } - - const configsInCurrentModel = toolbar.configs[this.currentFormMode]; - // for (const formModel of Object.keys(toolbar.configs)) { - // const configsInCurrentModel = toolbar.configs[formModel]; - if (!configsInCurrentModel) { - return; - } - for (const controlId of Object.keys(configsInCurrentModel)) { - if (controlId === this.editorParams.controlId) { - continue; - } - if (configsInCurrentModel[controlId].length > 0) { - if (configsInCurrentModel[controlId].includes(buttonId)) { - return controlId; - } - } - - } - // } - return; - } - - /** - * 添加子级按钮 - */ - addChildButton(treeNode: any) { - - const newButtonData = this.controlService.getControlMetaData('ToolBarItem'); - const radomNum = Math.random().toString().substr(2, 4); - newButtonData.id = 'toolBarItem_' + radomNum; - newButtonData.text = '新增按钮_' + radomNum; - - - if (!treeNode.data.items) { - treeNode.data.items = [newButtonData]; - } else { - treeNode.data.items.push(newButtonData); - } - - treeNode.children.push({ data: newButtonData, children: [], expanded: true }); - treeNode.expanded = true; - - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === treeNode.data.id); - if (leftTreeNode) { - leftTreeNode.node.children.push({ data: newButtonData, children: [], expanded: true }); - this.leftTree.loadData(this.leftTreeData); - } - this.rightTree.loadData(this.rightTreeData); - } - - /** - * 删除子级按钮 - */ - deleteChildButton(treeNode: any) { - if (!treeNode.parent) { - return; - } - const siblingNodes = treeNode.parent.children; - const index = siblingNodes.findIndex(n => n.data.id === treeNode.data.id); - if (index < 0) { - return; - } - - siblingNodes.splice(index, 1); - - treeNode.parent.data.items.splice(index, 1); - - const leftTreeNode = this.leftTree.serializedValue.find(v => v.node.data.id === treeNode.data.id); - if (leftTreeNode) { - leftTreeNode.parent.children.splice(index, 1); - this.leftTree.loadData(this.leftTreeData); - } - this.rightTree.loadData(this.rightTreeData); - - if (this.selectedRightNode && this.selectedRightNode.data && this.selectedRightNode.data.id === treeNode.data.id) { - this.propertyConfig = []; - } - - } - clickCancel() { - this.closeModal.emit(); - } - - clickOK() { - const toolbar = this.domService.module.toolbar; - - // 保存左侧全量按钮 - const allButtonItems = this.getButtonItemsFromTreeData(this.leftTreeData); - toolbar.items[this.editorParams.viewModelId] = allButtonItems; - - // 保存右侧当前选中按钮 - const currentOccupiedButton = this.rightTreeData.map(d => d.data.id); - if (!toolbar.configs[this.currentFormMode]) { - toolbar.configs[this.currentFormMode] = {}; - } - toolbar.configs[this.currentFormMode][this.editorParams.controlId] = currentOccupiedButton; - - this.webCmdService.syncActions(); - - // 传递任意非空值,用于属性面板控件触发converter事件 - this.submitModal.emit({ value: null }); - - } - getButtonItemsFromTreeData(treeData: TreeNode[]) { - const buttons = []; - treeData.forEach((element: TreeNode | any) => { - const nodeData = element.data; - const { items, ...buttonInfo } = nodeData; - buttonInfo.items = []; - if (element.children && element.children.length) { - const childButtons = this.getButtonItemsFromTreeData(element.children); - buttonInfo.items.push(...childButtons); - - } - buttons.push(buttonInfo); - }); - - return buttons; - } - - - propertyChanged(changeObject: PropertyChangeObject) { - - if (changeObject.propertyID === 'id') { - const oldId = this.selectedRightNode.id; - this.selectedRightNode.id = changeObject.propertyValue; - - const index = this.occupiedButtonIdList.findIndex(id => id === oldId); - if (index > -1) { - this.occupiedButtonIdList.splice(index, 1, changeObject.propertyValue); - } - } - - this.rightTree.loadData(this.rightTreeData); - this.leftTree.loadData(this.leftTreeData); - - // 保存新增的变量 - this.addNewVariableToViewModel(changeObject, this.editorParams.viewModelId); - } - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - private addNewVariableToViewModel(changeObject: PropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && - newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id === newVar.id)) { - viewModel.states.push(newVar); - } - } - } -} - -// class NewToolbarItem { -// id: string; -// text: string; -// isRootItem = true; -// parent: any; -// constructor() { -// const radomNum = Math.random().toString().substr(2, 4); -// this.id = 'toolBarItem_' + radomNum; -// this.text = '新增按钮_' + radomNum; -// } -// } - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/property-config.ts deleted file mode 100644 index fed8432f19da25dfe3d94c0986f8776144e27f7f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/property-config.ts +++ /dev/null @@ -1,430 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { IconSelectEditorComponent, ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { PageToolbarEditorComponent } from './editor/page-toolbar-editor/page-toolbar-editor.component'; -import { PageToolbarConverter } from './editor/page-toolbar-editor/page-toolbar-converter'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class HeaderProp extends ContainerUsualProp { - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const viewModelId = this.viewModelId; - const propertyConfig = []; - - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 按钮属性 - // const toolbarPropConfig = this.getToolbarPropConfig(propertyData, viewModelId); - // propertyConfig.push(toolbarPropConfig); - - // 翻页属性 - // const pgPropConfig = this.getPaginationPropConfig(propertyData, viewModelId); - // propertyConfig.push(pgPropConfig); - - // 视图切换属性 - const viewChangePropConfig = this.getViewChangePropConfig(propertyData, viewModelId); - propertyConfig.push(viewChangePropConfig); - - // 自定义模板属性 - const templatePropConfig = this.getCustomTemplatePropConfig(propertyData, viewModelId); - propertyConfig.push(templatePropConfig); - - // 事件属性---暂时没有场景启用多视图按钮,所以先屏蔽掉 - // const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId); - // propertyConfig.push(eventPropConfig); - - return propertyConfig; - - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [visibleProp], - }; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - const props = commonProps; - const self = this; - props.push( - { - propertyID: 'mainTitle', - propertyName: '主标题', - propertyType: 'unity', - description: '页头主标题', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['custom', 'variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - }, - { - propertyID: 'subTitle', - propertyName: '副标题', - propertyType: 'string' - }, - { - propertyID: 'showIcon', - propertyName: '是否显示图标', - propertyType: 'boolean' - }, - { - propertyID: 'iconName', - propertyName: '图标', - propertyType: 'modal', - editor: IconSelectEditorComponent, - editorParams: { needIconClass: false }, - visible: propertyData.showIcon - }, - { - propertyID: 'iconCls', - propertyName: '图标所属单据类别', - propertyType: 'editableSelect', - iterator: [ - { key: 'f-text-orna-bill', value: '单据类' }, - { key: 'f-text-orna-dict', value: '字典类' }, - { key: 'f-text-orna-manage', value: '管理类' }, - { key: 'f-text-orna-query', value: '查询报表类' }, - { key: 'f-text-orna-param', value: '系统参数类' } - ], - visible: propertyData.showIcon - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showIcon': { - const iconName = this.properties.find(p => p.propertyID === 'iconName'); - if (iconName) { - iconName.visible = changeObject.propertyValue; - } - const iconCls = this.properties.find(p => p.propertyID === 'iconCls'); - if (iconCls) { - iconCls.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getPaginationPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const properties: PropertyEntity[] = [ - { - propertyID: 'pgShow', - propertyName: '是否显示翻页', - propertyType: 'boolean' - }, - { - propertyID: 'pgPreDisabled', - propertyName: '是否禁用向前翻页', - propertyType: 'editableSelect', - iterator: [{ key: true, value: 'true' }, { key: false, value: 'false' }] - }, - { - propertyID: 'pgNextDisabled', - propertyName: '是否禁用向后翻页', - propertyType: 'editableSelect', - iterator: [{ key: true, value: 'true' }, { key: false, value: 'false' }] - }, - ]; - - properties.map(p => { - if (p.propertyID !== 'pgShow') { - p.visible = propertyData.pgShow; - } - }); - - return { - categoryId: 'pagination', - categoryName: '翻页', - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'pgShow': { - this.properties.map(p => { - if (p.propertyID !== 'pgShow') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - }; - } - /** - * 多视图切换按钮配置,限制只有当前页面有多视图时,才暴露视图切换属性。因为视图切换和多视图是配套使用的,而启用多视图的开关在列表上,这里不能单独配置切换按钮。 - * @param propertyData 属性值 - * @param viewModelId 视图模型id - */ - private getViewChangePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const properties: PropertyEntity[] = [ - { - propertyID: 'showViewChange', - propertyName: '是否启用多视图按钮', - propertyType: 'boolean' - }, - { - propertyID: 'viewType', - propertyName: '视图按钮排列方式', - propertyType: 'select', - iterator: [{ key: 'tile', value: '平铺' }, { key: 'dropdown', value: '下拉选择' }] - }, - { - propertyID: 'viewDatas', - propertyName: '视图按钮组', - propertyType: 'modal', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'type', title: '类型', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'title', title: '名称', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'iconName', title: '图标样式', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['type', 'title', 'iconName'], - uniqueFields: ['type', 'title'], - modalTitle: '视图按钮编辑器' - }, - converter: new ItemCollectionConverter(), - visible: false - }, - { - propertyID: 'viewDefaultType', - propertyName: '默认显示的视图类型', - propertyType: 'select', - iterator: this.getViewChangeDataTypes(propertyData) - }, - ]; - - properties.map(p => { - if (p.propertyID !== 'showViewChange') { - p.visible = propertyData.showViewChange; - } - }); - const self = this; - return { - categoryId: 'viewChange', - categoryName: '视图切换', - hide: !propertyData.viewDatas || !propertyData.viewDatas.length, - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showViewChange': { - this.properties.map(p => { - if (p.propertyID !== 'showViewChange') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - case 'viewDatas': { - const defaultProp = this.properties.find(p => p.propertyID === 'viewDefaultType'); - if (defaultProp) { - defaultProp.iterator = self.getViewChangeDataTypes(data); - } - } - } - } - }; - } - - - private getViewChangeDataTypes(propData: any) { - - if (!propData || !propData.viewDatas || propData.viewDatas.length === 0) { - return []; - } - const iterators = []; - propData.viewDatas.forEach(data => { - iterators.push( - { - key: data.type, - value: data.title - } - ); - }); - return iterators; - } - - private getToolbarPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - /** 展示模式:弹出类modal/独立页签类page/侧边滑出类slide 。 - * 优先取控件所属组件的展示类型,若没有配置,则取当前表单的展示类型 - */ - let showType = this.domService.module.showType; - const comp = this.domService.getComponentByVMId(viewModelId); - if (comp && comp.showType) { - showType = comp.showType; - } - return { - categoryId: 'toolbar', - categoryName: '工具栏', - properties: [ - { - propertyID: 'toolbarCls', - propertyName: '工具栏样式', - propertyType: 'string' - }, - { - propertyID: 'toolbarDatas', - propertyName: '按钮组', - propertyType: 'modal', - editor: PageToolbarEditorComponent, - editorParams: { controlId: propertyData.id, viewModelId }, - converter: new PageToolbarConverter(this.domService, propertyData.id, showType) - }, - { - propertyID: 'toolbarBtnSize', - propertyName: '按钮尺寸', - propertyType: 'select', - iterator: [ - { key: 'default', value: '标准' }, - { key: 'lg', value: '大号' } - ] - }, - { - propertyID: 'toolbarPopDirection', - propertyName: '弹出方向', - propertyType: 'select', - iterator: [ - { key: 'default', value: '自动' }, - { key: 'top', value: '向上' }, - { key: 'bottom', value: '向下' } - ] - } - ] - }; - } - - - private getCustomTemplatePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'customTemplate', - categoryName: '自定义模板', - properties: [ - { - propertyID: 'titleTemplate', - propertyName: '左侧标题区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'titleTemplateCls', - propertyName: '左侧标题区域模板样式', - propertyType: 'string' - }, - { - propertyID: 'contentTemplate', - propertyName: '中间内容区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'contentTemplateCls', - propertyName: '中间内容区域模板样式', - propertyType: 'string' - }, - { - propertyID: 'downTemplate', - propertyName: '下方扩展区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'downTemplateCls', - propertyName: '下方扩展区域模板样式', - propertyType: 'string' - } - ] - }; - } - - private getEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = this.switchEvents(propertyData, []); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, self.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - }; - } - - private switchEvents(propertyData: any, eventList: any[]) { - if (propertyData.showViewChange) { - - if (!eventList.find(eventListItem => eventListItem.label == 'viewTypeChange')) { - eventList.push( - { - label: 'viewTypeChange', - name: '视图类型切换事件', - } - ) - } - } else { - eventList = eventList.filter(eventListItem => { - if (eventListItem.label != 'viewTypeChange') - return true; - }) - } - return eventList; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-item-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-item-property-config.ts deleted file mode 100644 index 78a7b24feabd9f1881e5d3ee21bf9b52f02b6a4a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-item-property-config.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { EventsEditorFuncUtils } from '../../..../../../../utils/events-editor-func'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; - -import { ToolBarItemProp } from '../../../command/toolbar/component/toolbaritem/property/property-config'; -import { FormPropertyChangeObject } from '../../..../../../../entity/property-change-entity'; - -/** - * Header单个按钮属性配置 - */ -export class HeaderToolBarItemProp extends ToolBarItemProp { - - /** 是否为二级按钮 */ - isChildOfButton: boolean; - /** 父级按钮id */ - parentButtonId: string; - - // 事件编辑器集成 - getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - - if (parameters) { - parameters.setPropertyRelates = this.setPropertyRelates; // 添加自定义方法后,调用此回调方法,用于处理联动属性 - - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod && self.triggerModalSave) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - self.triggerModalSave(); - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - } else { - self.syncGlobalButtonEvent(propertyData); - } - - } - }; - } - /** - * 添加自定义方法(跳转到代码视图的场景)后,同步全局配置 - */ - private syncGlobalButtonEvent(propertyData: any) { - if (this.domService.module.toolbar && this.domService.module.toolbar.items) { - const buttonsInGlobal = this.domService.module.toolbar.items[this.viewModelId]; - if (!buttonsInGlobal) { - return; - } - let buttonInGlobal; - if (this.isChildOfButton && this.parentButtonId) { - const firstLevelItem = buttonsInGlobal.find(button => button.id === this.parentButtonId); - if (firstLevelItem && firstLevelItem.items && firstLevelItem.items.length) { - buttonInGlobal = firstLevelItem.items.find(b => b.id === propertyData.id); - } - } else { - buttonInGlobal = buttonsInGlobal.find(b => b.id === propertyData.id); - } - - if (!buttonInGlobal) { - return; - } - // 变更事件属性 - buttonInGlobal['click'] = propertyData['click']; - - } - - - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-property-config.ts deleted file mode 100644 index 4a69bb54a8995ff88fa6637fb17d17bd292143db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/property/toolbar-property-config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class HeaderToolBarProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - - const appearance = this.getToolbarAppearanceConfig(); - this.propertyConfig.push(appearance); - - return this.propertyConfig; - - } - - /** - * 将header上的工具栏相关属性放到toolbar上 - */ - private getToolbarAppearanceConfig() { - return { - categoryId: 'toolbarPropsOnHeader', - categoryName: '外观', - properties: [ - { - propertyID: 'toolbarCls', - propertyName: '工具栏样式', - propertyType: 'string' - }, - // { - // propertyID: 'toolbarDatas', - // propertyName: '按钮组', - // propertyType: 'modal', - // editor: PageToolbarEditorComponent, - // editorParams: { controlId: propertyData.id, viewModelId }, - // converter: new PageToolbarConverter(this.domService, propertyData.id, showType) - // }, - { - propertyID: 'toolbarBtnSize', - propertyName: '按钮尺寸', - propertyType: 'select', - iterator: [ - { key: 'default', value: '标准' }, - { key: 'lg', value: '大号' } - ] - }, - { - propertyID: 'toolbarPopDirection', - propertyName: '弹出方向', - propertyType: 'select', - iterator: [ - { key: 'default', value: '自动' }, - { key: 'top', value: '向上' }, - { key: 'bottom', value: '向下' } - ] - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/schema/schema.ts deleted file mode 100644 index cb0e554d200f5528b55c6cc438527e7519b908f7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/schema/schema.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const HeaderSchema = { - 'id': '', - 'type': 'Header', - 'visible': true, - 'appearance': null, - 'size': null, - 'mainTitle': '标题', - 'subTitle': '', - 'showIcon': true, - 'iconName': 'f-icon-page-title-record', - 'iconCls': 'f-text-orna-bill', - 'pgShow': false, - 'pgPreDisabled': false, - 'pgNextDisabled':true, - 'pgPreClick': 'ChangeItem1', - 'pgNextClick': 'ChangeItem2', - 'showViewChange': false, - 'viewType': 'dropdown', - 'toolbarCls': 'col-6', - 'toolbarDatas': '', - 'toolbarBtnSize': 'lg', - 'toolbarPopDirection': 'default', - 'viewDatas': [], - 'viewDefaultType': '', - 'titleTemplate': null, - 'contentTemplate': '', - 'contentTemplateCls': '', - 'downTemplate': '', - 'downTemplateCls': '' -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/form.ts deleted file mode 100644 index a71abf3ba62cafae70355c6be90c4338785991ac..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/form.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default (ctx: any) => { - - // 标题区域 - const titleStr = getTitleTemplate(ctx); - - // 中间区域 - const contentStr = getContentTemplate(ctx); - - // 工具栏区域 - const { toolbarStr, viewChangeStr } = getToolbarTemplate(ctx); - - // 下方扩展区域 - const downExtendStr = getDownTemplate(ctx); - - return ` -
    - - ${downExtendStr} -
    `; -}; - -/** - * 左侧标题区域 - * @param ctx 上下文构造信息 - */ -function getTitleTemplate(ctx: any) { - const headerOpts = ctx.component; - - // 自定义模板 - if (headerOpts.titleTemplate) { - return ` -
    - ${headerOpts.titleTemplate} -
    `; - } - - let titleStr = ''; - titleStr = `
    `; - - // 是否显示图标 - if (headerOpts.showIcon) { - titleStr += ` - - `; - } - - // 主标题 - titleStr += `

    ${ctx.mainTitle}

    `; - - // 子标题 - if (headerOpts.subTitle) { - titleStr += `
    ${headerOpts.subTitle}
    `; - } - - // 显示分页信息 - if (headerOpts.pgShow) { - titleStr += `
    - - -
    `; - } - titleStr += `
    `; - - return titleStr; -} - -/** - * 中间区域模板 - * @param ctx 上下文构造信息 - */ -function getContentTemplate(ctx: any) { - const headerOpts = ctx.component; - let contentStr = ''; - if (headerOpts.contentTemplate) { - contentStr = `
    - ${headerOpts.contentTemplate} -
    `; - } - - return contentStr; -} - -/** - * 工具栏区域模板 - * @param ctx 上下文构造信息 - */ -function getToolbarTemplate(ctx: any) { - const headerOpts = ctx.component; - let toolbarStr = ''; - toolbarStr = ctx.headerToolBar.render(); - - // 视图切换按钮 - let viewChangeStr = ''; - if (headerOpts.showViewChange && headerOpts.viewDatas.length > 0) { - viewChangeStr = `
    - ${ctx.getViewChangeStr()} -
    `; - } - - return { toolbarStr, viewChangeStr }; -} - -/** - * 下方扩展区域模板 - * @param ctx 上下文构造信息 - */ -function getDownTemplate(ctx: any) { - const headerOpts = ctx.component; - let downExtendStr = ''; - if (headerOpts.downTemplate) { - downExtendStr = `
    ${headerOpts.downTemplate}
    `; - } - - return downExtendStr; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/header/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/component/fd-hidden-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/component/fd-hidden-container.ts deleted file mode 100644 index 6cefc1d4d9f3f6efdb55c219c7b4d7ca1225ee7f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/component/fd-hidden-container.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { HiddenContainerSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { HiddenContainerProp } from '../property/property-config'; - -export default class FdHiddenContainerComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - - getDefaultSchema(): any { - - return HiddenContainerSchema; - } - - getTemplateName(): string { - return 'HiddenContainer'; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: HiddenContainerProp = new HiddenContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/export.ts deleted file mode 100644 index 5d3115a7f2e759c89661b1acc2db80742fc4d8f7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdHiddenContainerComponent from './component/fd-hidden-container'; -import { HiddenContainerSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdHiddenContainerTemplates from './templates'; - - -export const HiddenContainer: ComponentExportEntity = { - type: 'HiddenContainer', - component: FdHiddenContainerComponent, - template: FdHiddenContainerTemplates, - metadata: HiddenContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/property/property-config.ts deleted file mode 100644 index 2fa64ed6ed832dc82f0b4e94ee3057d0611b50f3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/property/property-config.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class HiddenContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/schema/schema.ts deleted file mode 100644 index 2815d8d3ff755e75b3226d58f7a4fea83b593a1b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/schema/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const HiddenContainerSchema = { - id: '', - type: 'HiddenContainer', - appearance: null, - contents: [], - controlsInline: true, - formAutoIntl: true, - draggable: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/form.ts deleted file mode 100644 index f77d126313221e3291b4daa8953d7253986b8938..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/hidden-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/component/fd-html-template.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/component/fd-html-template.ts deleted file mode 100644 index 8dbaae664aa61fc7cdea1caf731f080c90552fcb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/component/fd-html-template.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { BuilderHTMLElement, FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { HtmlTemplateSchema } from '../schema/schema'; -import { HTMLProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { HtmlTemplateDragDropManager } from '../drag-drop/dragAndDrapManager'; -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { NoCodeHTMLProp } from '../property/nocode-property-config'; - -export default class HtmlTemplateComponent extends FarrisDesignBaseNestedComponent { - - - private dragManager: HtmlTemplateDragDropManager; - - constructor(component: any, options: any) { - super(component, options); - - this.dragManager = new HtmlTemplateDragDropManager(this); - this.dragManager.checkIsInFixedContextRules(); - } - - - getDefaultSchema(): any { - return HtmlTemplateSchema; - } - - getStyles(): string { - const styles = 'display: inherit;flex: 1;flex-direction: inherit;flex-wrap: inherit;justify-content: inherit;align-items: inherit;width: 100%;padding:0;border:0;'; - - return styles; - } - - - render(): any { - const shownHtml = this.parseI18nResource(this.component.html); - return super.render(this.renderTemplate('HtmlTemplate', { - component: this.component, - shownHtml - })); - - - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - - if (formBasicService && formBasicService.envType === DesignerEnvType.noCode) { - const prop: NoCodeHTMLProp = new NoCodeHTMLProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: HTMLProp = new HTMLProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - } - - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - if (changeObject.propertyID === 'html') { - this.triggerRedraw(); - } - - } - - - checkCanMoveComponent(): boolean { - const canMove: boolean = super.checkCanMoveComponent(); - if (!canMove) { - return false; - } - - return this.dragManager.canMove; - } - - checkCanDeleteComponent(): boolean { - const canDelete: boolean = super.checkCanDeleteComponent(); - if (!canDelete) { - return false; - } - return this.dragManager.canDelete; - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - return false; - } - - /** - * 为了展示效果,截取国际化配置项的默认值 - * @param originalContent - * - */ - private parseI18nResource(originalContent: string): string { - if (!originalContent) { - return ''; - } - // 1、截取{{}} 之间的内容 - const reg = /\{\{[^\}]+\}\}/gi; - const matchedI18nResources = originalContent.match(reg); - if (!matchedI18nResources || matchedI18nResources.length === 0) { - return originalContent; - } - matchedI18nResources.forEach(orignalResource => { - // 2、先移除空格,再判断当前表达式是否包含国际化配置 - const hasI18nLang = orignalResource.replace(/\s+/g, '').includes('lang:lang:'); - if (!hasI18nLang) { - return; - } - const langIndex = orignalResource.lastIndexOf('lang'); - if (langIndex <= 0) { - return; - } - - const langStr = orignalResource.slice(langIndex); - - // 3、匹配单引号或双引号之间的文本 - let defaultValueReg = /\'([^\']*)\'/gi; - if (langStr.indexOf('\"') > 0) { - defaultValueReg = /\"([^\"]*)\"/gi; - } - const matchedDefaultValues = langStr.match(defaultValueReg); - if (matchedDefaultValues && matchedDefaultValues.length) { - const defaultValue = matchedDefaultValues[0].slice(1, matchedDefaultValues[0].length - 1); - if (defaultValue) { - // 4、用默认值替换国际化配置表达式 - originalContent = originalContent.replace(orignalResource, defaultValue); - } - } - - - }); - return originalContent; - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/drag-drop/dragAndDrapManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/drag-drop/dragAndDrapManager.ts deleted file mode 100644 index eeca740c0feb59a4e65a30ffa8f9d0b3b26c8550..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/drag-drop/dragAndDrapManager.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { DgControl } from '../../../../utils/dg-control'; -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; - -export class HtmlTemplateDragDropManager { - - private cmpInstance: FarrisDesignBaseNestedComponent; - - - canDelete = true; - canMove = true; - - constructor(cmpInstance: FarrisDesignBaseNestedComponent) { - this.cmpInstance = cmpInstance; - } - - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - const component = this.cmpInstance.component; - - // 控件本身样式 - const cmpClass = component.appearance && component.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 父级节点 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、header标题模板 - if (parent.type === DgControl.ContentContainer.type && parentClassList.includes('f-title')) { - this.canDelete = false; - this.canMove = false; - } - - // 标题区域的下模板,都禁止拖拽 - if (parent.type === DgControl.ContentContainer.type && parentClassList.includes('f-page-header-base')) { - this.canMove = false; - } - // 标题区域的下模板,都禁止拖拽 - if (parent.type === DgControl.ContentContainer.type && parentClassList.includes('f-page-header')) { - this.canMove = false; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/export.ts deleted file mode 100644 index 3671284e090b620dc7dcb7a1cb66f0b702c866b5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdHtmlTemplateComponent from './component/fd-html-template'; -import { HtmlTemplateSchema } from './schema/schema'; - -import FdHtmlTemplates from './templates'; - - -export const HtmlTemplate: ComponentExportEntity = { - type: 'HtmlTemplate', - component: FdHtmlTemplateComponent, - template: FdHtmlTemplates, - metadata: HtmlTemplateSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/nocode-property-config.ts deleted file mode 100644 index af380556911fc6b8ea337b8ab88e802c0ed31bcd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/nocode-property-config.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { RichTextPropEditor } from '@farris/designer-devkit' - -export class NoCodeHTMLProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 模板属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - return propertyConfig; - - } - - getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - return { - categoryId: 'html', - categoryName: '模板', - properties: [ - { - propertyID: 'html', - propertyName: 'html', - propertyType: 'modal', - description: 'html编辑器', - editor: RichTextPropEditor, - editorParams: { - value: propertyData.html, - language: 'html' - } - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/property-config.ts deleted file mode 100644 index 36d12e6d33df7997aa35de4fd23a42fb102c7035..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/property/property-config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class HTMLProp extends ContainerUsualProp { - - getPropConfig(propertyData: any ): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 模板属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - return propertyConfig; - - } - - getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - return { - categoryId: 'html', - categoryName: '模板', - properties: [ - { - propertyID: 'html', - propertyName: 'html', - propertyType: 'modal', - description: 'html编辑器', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/schema/schema.ts deleted file mode 100644 index df9a962127393aa6d7c32750ae7c0e933e6751b3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/schema/schema.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const HtmlTemplateSchema = { - id: 'htmlTemplate', - type: 'HtmlTemplate', - html: '' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/form.ts deleted file mode 100644 index 89ee6df72956fc32dddc95ebd06d13ae0ba5ccd2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/form.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default (ctx: any) => { - return ctx.shownHtml || ` - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/html-template/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/component/fd-list-nav.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/component/fd-list-nav.ts deleted file mode 100644 index 9ef732e98d85505342a83a8a28d3aa2eb993faec..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/component/fd-list-nav.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { ListNavSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ListNavProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; - -export default class FdListNavComponent extends FdContainerBaseComponent { - /** 默认収折的状态 */ - hiddenState: boolean; - - /** 设计器中控件当前是否收折状态 */ - hiddenInDesigner: boolean; - - // 标识当前的legend - get listNavKey(): string { - return `listNav-${this.key}`; - } - /** 判断当前组件是否是固定的上下文层级,这种组件不支持移动 */ - private isInFixedContextRules = false; - - constructor(component: any, options: any) { - super(component, options); - this.checkIsInFixedContextRules(); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('list-nav.css'); - } - - getStyles(): string { - return 'display: flex;flex-direction:column;height:100%'; - } - getDefaultSchema(): any { - - return ListNavSchema; - } - - getTemplateName(): string { - return 'ListNav'; - } - // 初始化 - init(): void { - this.hiddenState = this.component.hideNav; - - super.init(); - } - // 渲染模板 - render(children): any { - return super.render(children || this.renderTemplate('ListNav', { - hiddenState: this.hiddenState, - listNavKey: this.listNavKey, - children: this.renderComponents(), - nestedKey: this.nestedKey - })); - } - // 绑定事件 - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.listNavKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - - // 注册收折按钮点击事件 - const btnEl = this.refs[this.listNavKey].querySelector('.f-list-nav-toggle-sidebar'); - if (btnEl) { - this.addEventListener(btnEl, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - this.hiddenState = !this.hiddenState; - - this.redraw(); - }); - } - - if (this.hiddenState) { - this.element.style.width = '0px'; - } - // 必写 - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ListNavProp = new ListNavProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['title', 'showEntry', 'position']); - } - - private checkIsInFixedContextRules() { - // 控件本身样式 - const cmpClass = this.component.appearance && this.component.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 带导航的列表和带导航的卡片模板中,ListNav不允许移动 - if (cmpClassList.includes('f-page-content-nav') && parentClassList.includes('f-page-content')) { - this.isInFixedContextRules = true; - } - - } - checkCanMoveComponent(): boolean { - return !this.isInFixedContextRules; - } - - checkCanDeleteComponent(): boolean { - return !this.isInFixedContextRules; - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - const result = super.canAccepts(sourceElement, targetElement); - if (!result) { - return false; - } - - // 子级控件唯一且为外部容器,说明是模板预制的结构,那么不再接收其他控件 - const hasOnlyChild = (this.component.contents || []).length === 1; - if (!hasOnlyChild) { - return true; - } - const externalContainer = this.component.contents[0]; - if (externalContainer.type === DgControl.ExternalContainer.type) { - return false; - } - return true; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/export.ts deleted file mode 100644 index ed48d6ab9deeab38f66319f5748f183bb408bcca..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdListNavComponent from './component/fd-list-nav'; -import { ListNavSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdListNavTemplates from './templates'; - - -export const ListNav: ComponentExportEntity = { - type: 'ListNav', - component: FdListNavComponent, - template: FdListNavTemplates, - metadata: ListNavSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/property/property-config.ts deleted file mode 100644 index 57791e8c68006694bebb56d33a471d0869fb8a72..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/property/property-config.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class ListNavProp extends ContainerUsualProp { - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const customPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 拖拽属性 - const dragPropConfig = this.getDragPropConfig(propertyData, this.viewModelId); - propertyConfig.push(dragPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - - } - - - - private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - commonProps.push( - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string' - }, - { - propertyID: 'hideNav', - propertyName: '默认收起', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'showEntry', - propertyName: '是否显示收折按钮', - propertyType: 'select', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'position', - propertyName: '收折按钮显示位置', // 因为控件里这个属性是反的,所以在设计器上枚举项也反着写 - propertyType: 'select', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠右' }, { key: 'right', value: '靠左' }, { key: 'bottom', value: '靠上' }, { key: 'top', value: '靠下' }], - visible: propertyData.showEntry - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps, - setPropertyRelates(changeObject: FormPropertyChangeObject) { - switch (changeObject.propertyID) { - case 'showEntry': { - const position = this.properties.find(prop => prop.propertyID === 'position'); - if (position) { - position.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - private getDragPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'drag', - categoryName: '拖拽', - properties: [ - { - propertyID: 'enableDraggable', - propertyName: '启用拖拽', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'rzHandles', - propertyName: '拖拽线条的位置', - propertyType: 'select', - iterator: [{ key: 'e', value: '靠右' }, { key: 'w', value: '靠左' }, { key: 's', value: '靠下' }, { key: 'n', value: '靠上' }], - visible: propertyData.enableDraggable - }, - { - propertyID: 'relatedIframeParent', - propertyName: '右侧区域元素id', - description: '非必填,若导航右侧有iframe,此处填写iframe所在元素的父元素ID。例如#containerId', - propertyType: 'string', - visible: propertyData.enableDraggable - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enableDraggable': { - this.properties.map(p => { - if (p.propertyID !== 'enableDraggable') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - }; - } - - public getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - - // 静态事件 - let eventList = []; - - // 动态事件 - this.switchEvents(propertyData, eventList); - - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, this.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data: any, parameters: any) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - }; - - } - /** - * 处理交互面板中的动态事件 - * @param propertyData 属性值 - * @param eventList 事件列表 - */ - switchEvents(propertyData: any, eventList: any[]) { - - if (propertyData.enableDraggable) { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'rzStart'); - if (!eventListExist) { - eventList.push( - { - label: 'rzStart', - name: '拖拽开始时事件' - }, - { - label: 'rzResizing', - name: '拖拽时事件' - }, - { - label: 'rzStop', - name: '拖拽结束时事件' - } - ); - } - } else { - if (eventList.length !== 0) { - eventList = eventList.filter(eventListItem => !['rzStart', 'rzResizing', 'rzStop'].includes(eventListItem.label)); - } - } - - return eventList; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/schema/schema.ts deleted file mode 100644 index 9329b292b8d53d3c556ccc623f90b9dc8ff803a2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/schema/schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const ListNavSchema = { - id: 'list-nav', - type: 'ListNav', - appearance: null, - title: '导航', - size: { - width: 240 - }, - contents: [], - hideNav: false, - position: 'left', - showEntry: true, - visible: true, - enableDraggable: false, - rzHandles: 'e', - relatedIframeParent: null, - rzStart: null, - rzResizing: null, - rzStop: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/form.ts deleted file mode 100644 index 2781d789141632c4db1cf38baa89e1325d29d828..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/form.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default (ctx: any) => { - let navCls = ctx.component.appearance ? ' ' + ctx.component.appearance.class : ''; - navCls += ctx.component.position === 'left' ? ' f-list-nav-left' : (ctx.component.position === 'right' ? ' f-list-nav-right' : ''); - - const navMainCls = ctx.hiddenState ? ' d-none' : ''; - - let navInStr = `transition:width 0.5s;`; - navInStr += ctx.hiddenState ? `width:0;` : ``; - - // 标题 - const headerStr = getTitleTemplate(ctx); - - // 入口 - const entryStr = getEntryTemplate(ctx); - - return `
    -
    -
    - ${headerStr} -
    - ${ctx.children} -
    -
    - ${entryStr} -
    -
    `; -}; - -/** - * 获取入口模板 - * @param ctx 上下文 - */ -function getEntryTemplate(ctx: any) { - if (!ctx.component.showEntry) { - return ''; - } - - let entryCls = ctx.component.disabled ? ' f-list-nav-toggle-disabled' : ''; - entryCls += ctx.hiddenState ? ' active' : ''; - return ` -
    - -
    ` ; -} - - -/** - * 标题模板 - * @param ctx 上下文 - */ -function getTitleTemplate(ctx: any) { - if (!ctx.component.title) { - return ''; - } - return ` -
    -
    - ${ctx.component.title} -
    -
    ` ; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/list-nav/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/component/fd-loop-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/component/fd-loop-container.ts deleted file mode 100644 index 26b6bed64db43dce760a500f180e2b926c795c55..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/component/fd-loop-container.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { LoopContainerSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { LoopContainerProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; - -/** - * 循环容器 - */ -export default class FdLoopContainerComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return LoopContainerSchema; - } - - getTemplateName(): string { - return 'LoopContainer'; - } - hideNestedPaddingInDesginerView(): boolean { - return true; - } - checkCanMoveComponent(): boolean { - return false; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement): boolean { - return false; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: LoopContainerProp = new LoopContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/export.ts deleted file mode 100644 index 8698e9c53cf778c2ec74da7f7ee540e3beadf785..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/export.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdLoopContainerComponent from './component/fd-loop-container'; -import { LoopContainerSchema } from './schema/schema'; - -import FdLoopContainerTemplates from './templates'; - -/** - * 循环容器 - */ -export const LoopContainer: ComponentExportEntity = { - type: 'LoopContainer', - component: FdLoopContainerComponent, - template: FdLoopContainerTemplates, - metadata: LoopContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/property/property-config.ts deleted file mode 100644 index d5d32793813a03ddc4c028c96e9426b69ba289b0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/property/property-config.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class LoopContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'dataSource', - propertyName: '绑定数据源', - propertyType: 'unity', - description: '循环绑定数据源', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - } - }, - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/schema/schema.ts deleted file mode 100644 index 17bf46bea5b94da12ea20794a2161d5265e1e05f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/schema/schema.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const LoopContainerSchema = { - id: 'loopContainer', - type: 'LoopContainer', - appearance: null, - dataSource: null, - contents: [] -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/form.ts deleted file mode 100644 index 5951d0f6d09a8a88e9416a951833527e6a5becfc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/loop-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/component/fd-modal-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/component/fd-modal-container.ts deleted file mode 100644 index 77e8a5b719d595a822e3a2724970162965a8a222..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/component/fd-modal-container.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ModalContainerSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ModalContainerProp } from '../property/property-config'; - -export default class FdModalContainerComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - - return ModalContainerSchema; - } - - getTemplateName(): string { - return 'ModalContainer'; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ModalContainerProp = new ModalContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - /** - * 清空外部组件的声明节点 - */ - onRemoveComponent(): void { - if (!this.component.externalCmp) { - return; - } - - const domService = this.options.designerHost.getService('DomService'); - - domService.deleteExternalComponent(this.component.externalCmp); - } - - hideNestedPaddingInDesginerView(): boolean { - return true; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/export.ts deleted file mode 100644 index 31be33d90475ab4a8130c35fcc0e80af0a26229f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdModalContainerComponent from './component/fd-modal-container'; -import { ModalContainerSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdModalContainerTemplates from './templates'; - - -export const ModalContainer: ComponentExportEntity = { - type: 'ModalContainer', - component: FdModalContainerComponent, - template: FdModalContainerTemplates, - metadata: ModalContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/property/property-config.ts deleted file mode 100644 index 6e9f3f6d684fbd93205eea006039f05043d31eba..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/property/property-config.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class ModalContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 内容属性 - const contentPropConfig = this.getContentPropConfig(propertyData, this.viewModelId); - propertyConfig.push(contentPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - - private getContentPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'content', - categoryName: '内容', - properties: [ - { - propertyID: 'contentType', - propertyName: '内容类型', - propertyType: 'select', - iterator: [{ key: 'form', value: '内嵌表单' }, { key: 'url', value: 'URL' }], - defaultValue: 'form' - }, - { - propertyID: 'externalCmp', - propertyName: '导入组件', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { - containerType: propertyData.type, - containerId: propertyData.id, - useIsolateJs: propertyData.useIsolateJs, - relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - name: this.formBasicService.formMetaBasicInfo.name - }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - // 清空外部组件的声明节点 - self.domService.deleteExternalComponent(oldValue); - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取"组件使用独立脚本加载"属性的最新值 - this.editorParams.useIsolateJs = propertyData.useIsolateJs; - return { result: true, message: '' }; - }, - visible: propertyData.createType === 'form' || propertyData.contentType !== 'url' - }, - { - propertyID: 'url', - propertyName: 'URL', - propertyType: 'string', - visible: propertyData.createType === 'url' || propertyData.contentType === 'url' - - }, - { - propertyID: 'useIsolateJs', - propertyName: '组件使用独立脚本加载', - propertyType: 'boolean', - defaultValue: false, - visible: propertyData.contentType !== 'url', - description: '启用独立加载后只允许选择根组件下的命令!' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'externalCmp': { - propData.component = parameters && parameters.component; - - const dstExternalComponent = self.domService.getExternalComponentByContainerId(propertyData.id); - if (dstExternalComponent) { - dstExternalComponent.contentType = 'form'; // 同步contentType - } - changeObject.relateChangeProps = [{ - propertyID: 'component', - propertyValue: propertyData.component - }]; - break; - } - case 'contentType': { - this.properties.map(p => { - switch (p.propertyID) { - case 'externalCmp': { - p.visible = changeObject.propertyValue === 'form'; - break; - } - case 'url': { - p.visible = changeObject.propertyValue === 'url'; - break; - } - case 'useIsolateJs': { - p.visible = changeObject.propertyValue === 'form'; - break; - } - } - }); - - - const dstExternalComponent = self.domService.getExternalComponentByContainerId(propertyData.id); - if (dstExternalComponent) { - dstExternalComponent.contentType = changeObject.propertyValue; // 同步contentType - if (changeObject.propertyValue === 'url' && propertyData.url) { - dstExternalComponent.url = propertyData.url; // 同步 url(解决切换contentType到url, 但不手动设置url属性值) - } - } - - // 内容类型为url时,不支持独立脚本加载 - if (changeObject.propertyValue === 'url') { - propertyData.useIsolateJs = false; - changeObject.relateChangeProps = [{ - propertyID: 'useIsolateJs', - propertyValue: propertyData.useIsolateJs - }]; - - self.syncExternalComponent(false, propertyData.externalCmp); - } - break; - } - case 'url': { - self.setExternalComponentUrl(propertyData); - break; - } - case 'useIsolateJs': { - self.syncExternalComponent(changeObject.propertyValue, propertyData.externalCmp); - if (changeObject.propertyValue) { - self.notifyService.warning('启用独立加载后只允许选择根组件下的命令!'); - } - break; - } - } - - } - }; - } - - - /** - * 同步外部组件节点的useIsolateJs属性 - * @param useIsolateJs 组件是否使用独立脚本加载 - * @param externalCmpId 导入组件的id - */ - private syncExternalComponent(useIsolateJs: boolean, externalCmpId: string) { - if (!externalCmpId) { - return; - } - const externalComponnent = this.domService.getExternalComponent(externalCmpId); - if (externalComponnent && externalComponnent.length) { - externalComponnent[0].useIsolateJs = useIsolateJs; - - // 截取su路径--用于独立加载js脚本 - if (useIsolateJs && !externalComponnent[0].serviceUnitPath && externalComponnent[0].filePath) { - const filePathArray = externalComponnent[0].filePath.split('/'); - if (filePathArray.length > 2) { - externalComponnent[0].serviceUnitPath = filePathArray[0] + '/' + filePathArray[1]; - } - } - } - } - - /** - * 在表单 DOM 上创建 externalComponent元素 - */ - private setExternalComponentUrl(propertyData: any) { - const externalComponent = this.domService.getExternalComponentByContainerId(propertyData.id); - if (externalComponent) { - Object.assign(externalComponent, { - type: propertyData.type, - containerId: propertyData.id, - contentType: propertyData.contentType, - url: propertyData.url || '' - }); - } else { - const externalInfo = { - type: propertyData.type, - id: this.idService.generate(), - containerId: propertyData.id, - contentType: propertyData.contentType, - url: propertyData.url || '' - }; - - this.domService.setExternalComponent(externalInfo, null); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/schema/schema.ts deleted file mode 100644 index 8e29096cff3d21afe94873b138c4a1d2f30985f9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/schema/schema.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const ModalContainerSchema = { - id: 'modal-container', - type: 'ModalContainer', - appearance: null, - visible: true, - contentType: 'form', - externalCmp: null, - url: null, - useIsolateJs: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/form.ts deleted file mode 100644 index ee3513414ccb16578656fa1317cb656867db99a1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/form.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (ctx: any) => { - return ` -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/component/fd-modal-footer.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/component/fd-modal-footer.ts deleted file mode 100644 index 581deb2ca34e791161ba0540645634344fc4ae7b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/component/fd-modal-footer.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { ModalFooterSchema } from '../schema/schema'; -import { BuilderHTMLElement, FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ModalFooterProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FdHeaderToolBarComponent from '../../header/component/fd-header-toolbar'; -import { cloneDeep } from 'lodash-es'; -import { DgControl } from '../../../../utils/dg-control'; -import { HeaderDragDropManager } from '../../header/drag-drop/dragAndDrapManager'; -import { DomService } from '@farris/designer-services'; - -export default class FdModalFooterComponent extends FarrisDesignBaseNestedComponent { - - /** 当前表单的展示模式,弹出类modal/独立页签类page/侧边滑出类slide 。 - * 优先取控件所属组件的展示类型,若没有配置,则取当前表单的展示类型 - */ - currentFormMode; - - // toolbar数据 - toolbarDatas; - - component; - footerToolBar: FdHeaderToolBarComponent; - - - /** 判断当前容器是否是固定的上下文的中间层级,这种容器不支持移动、不支持删除、并且隐藏间距 */ - private isInFixedContextRules = false; - - private dragManager: HeaderDragDropManager; - - constructor(component: any, options: any) { - super(component, options); - - // 虽然类别为“容器”,但是实际没有子级节点 - this.category = 'container'; - - this.dragManager = new HeaderDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - } - - /** - * 为了适配按钮大小,增加ide-header-toolbar-XX 样式 - */ - getClassName(): string { - let clsName = super.getClassName(); - if (this.component.toolbarBtnSize && this.component.toolbarBtnSize !== 'default') { - clsName += ' ide-header-toolbar-' + this.component.toolbarBtnSize; - } - return clsName; - } - - getDefaultSchema(): any { - return ModalFooterSchema; - } - - getTemplateName(): string { - return 'ModalFooter'; - } - hideNestedPaddingInDesginerView(): boolean { - return true; - } - // 初始化 - init(): void { - this.components = []; - - this.initToolbar(); - super.init(); - } - private initToolbar() { - // 当前showType - const domService = this.options.designerHost.getService('DomService'); - this.currentFormMode = domService.module.showType || 'page'; - const comp = domService.getComponentByVMId(this.viewModelId); - if (comp && comp.showType) { - this.currentFormMode = comp.showType; - } - - this.toolbarDatas = this.assembleHeaderToolbar(); - // 创建工具栏组件 - const toolBarComponent = this.getResponseToolbarStr(); - const options = Object.assign({}, this.options, { childComponents: [], parent: this, showType: this.currentFormMode, popDirection: 'top' }); - if (!this.footerToolBar) { - this.footerToolBar = new FdHeaderToolBarComponent(toolBarComponent, options); - } else { - this.footerToolBar.reInit(toolBarComponent, this.currentFormMode); - } - this.footerToolBar.init(); - } - // 渲染模板 - render(children): any { - this.initToolbar(); - return super.render(children || this.renderTemplate('ModalFooter', { - toolbarDatas: this.toolbarDatas, - currentFormMode: this.currentFormMode, - footerToolBar: this.footerToolBar, - getResponseToolbarStr: () => this.getResponseToolbarStr() - })); - } - // 绑定事件 - attach(element: any): any { - // 必写 - const superAttach: any = super.attach(element); - - // 工具栏绑定事件 - const footerToolBarEle = element.querySelector('.farris-component-ModalFooterToolBar'); - if (footerToolBarEle) { - this.footerToolBar.attach(footerToolBarEle); - } - - // 将按钮的实例追加到header中,是为了从代码编辑器切换到可视化设计器时重新选中按钮 - if (this.footerToolBar) { - const toolbarItemCmps = this.footerToolBar.components || []; - this.components = this.components.concat(toolbarItemCmps); - } - - this.setUnusedButtonsBasicInfoMap(); - - // 必写 - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ModalFooterProp = new ModalFooterProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - // 构造Toolbar - private assembleHeaderToolbar() { - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - if (!toolbar || !toolbar.items || !toolbar.items[this.viewModelId] || - !toolbar.configs || !toolbar.configs[this.currentFormMode] || - !toolbar.configs[this.currentFormMode][this.id]) { - return []; - } - const buttonConfig = toolbar.configs[this.currentFormMode][this.id] as string[]; - if (!buttonConfig) { - return []; - } - const toolbarItems = []; - buttonConfig.forEach(buttonId => { - const buttonInfo = toolbar.items[this.viewModelId].find(item => buttonId === item.id); - if (buttonInfo) { - toolbarItems.push(buttonInfo); - } - }); - return this.assembleToolBarItem(toolbarItems); - } - // 构造ToolbarItem - private assembleToolBarItem(items): any[] { - if (!items || items.length === 0) { - return []; - } - const data = []; - items.forEach(item => { - const dataItem = cloneDeep(item); - - if (item.items && item.items.length > 0) { - dataItem.isDP = true; - dataItem.children = this.assembleToolBarItem(item.items); - } - - data.push(dataItem); - }); - return data; - } - /** - * 获取工具栏数据 - */ - getResponseToolbarStr() { - const toolBar = { - id: 'footer-toolbar' + Math.random().toString(36).slice(2, 6), - type: 'ModalFooterToolBar', - appearance: { - class: `f-toolbar ml-auto ${this.component.toolbarCls}` - }, - title: '底部工具栏', - items: this.toolbarDatas, - toolbarCls: this.component.toolbarCls, - toolbarBtnSize: this.component.toolbarBtnSize, - toolbarPopDirection: this.component.toolbarPopDirection - }; - return toolBar; - } - - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (['custom', 'appearance', 'toolbarPropsOnHeader'].includes(changeObject.categoryId)) { - - // 变更按钮个数,需要重新组装toolbarDatas数据 - if (changeObject.propertyID === 'toolbarDatas') { - this.toolbarDatas = this.assembleHeaderToolbar(); - } - this.redraw(); - } - } - checkCanDeleteComponent(): boolean { - if (this.isInFixedContextRules) { - return false; - } - return true; - } - checkCanMoveComponent(): boolean { - if (this.isInFixedContextRules) { - return false; - } - return true; - } - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - return false; - } - /** - * 点击控件时计算控件工具栏位置 - */ - setPositionOfBtnGroup() { - super.setPositionOfBtnGroup(); - - // footer重绘后要重新计算内部工具栏的操作图标位置 - if (this.footerToolBar) { - const toolbarEle = this.element.querySelector(`.dgComponentSelected[controltype='${DgControl.ModalFooterToolBar.type}']`); - if (toolbarEle) { - const toolbar = toolbarEle.querySelector('.component-btn-group') as HTMLElement; - if (toolbar) { - toolbar.style.display = ''; - const toolbarRect = toolbar.getBoundingClientRect(); - - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - - divPanel.style.top = toolbarRect.top + 'px'; - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - } - } - - } - } - private setUnusedButtonsBasicInfoMap() { - const toolbar = this.options.designerHost.getService('DomService').module.toolbar; - - if (!toolbar || !toolbar.items || !toolbar.items[this.viewModelId] || - !toolbar.configs || !toolbar.configs[this.currentFormMode] || - !toolbar.configs[this.currentFormMode][this.id]) { - return []; - } - const buttonConfig = toolbar.configs[this.currentFormMode][this.id] as string[]; - if (!buttonConfig) { - return []; - } - - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 全局按钮若未被使用,仍需要设置路径信息,目的是为了方便交互面板显示 - let allUsedButtons = []; - Object.keys(toolbar.configs[this.currentFormMode]).map(controlId => { - allUsedButtons = allUsedButtons.concat(toolbar.configs[this.currentFormMode][controlId]); - }); - - - toolbar.items[this.viewModelId].map(button => { - if (!allUsedButtons.includes(button.id)) { - domService.controlBasicInfoMap.set(button.id, { - showName: button.text, - parentPathName: button.text - }); - } - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/export.ts deleted file mode 100644 index be5ecbab1efaa113f4751cd4d423320f376a0696..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/export.ts +++ /dev/null @@ -1,26 +0,0 @@ -import FdModalFooterComponent from './component/fd-modal-footer'; -import { ModalFooterSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdModalFooterTemplates from './templates'; -import FdModalFooterToolBarComponent from '../header/component/fd-header-toolbar'; -import FdModalFooterToolBarItemComponent from '../header/component/fd-header-toolbar-item'; -import FdModalFooterToolBarTemplate from '../../command/toolbar/templates/form'; -import FdModalFooterToolBarItemTemplate from '../../command/toolbar/component/toolbaritem/templates/form'; - -export const ModalFooter: ComponentExportEntity = { - type: 'ModalFooter', - component: FdModalFooterComponent, - template: FdModalFooterTemplates, - metadata: ModalFooterSchema -}; -export const ModalFooterToolBar = { - type: 'ModalFooterToolBar', - component: FdModalFooterToolBarComponent, - template: { form: FdModalFooterToolBarTemplate } -}; - -export const ModalFooterToolBarItem = { - type: 'ModalFooterToolBarItem', - component: FdModalFooterToolBarItemComponent, - template: { form: FdModalFooterToolBarItemTemplate } -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/property/property-config.ts deleted file mode 100644 index ce97efaffb4d5d5b202de4a41c762d78967f66d2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/property/property-config.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { PageToolbarEditorComponent } from '../../header/property/editor/page-toolbar-editor/page-toolbar-editor.component'; -import { PageToolbarConverter } from '../../header/property/editor/page-toolbar-editor/page-toolbar-converter'; - -export class ModalFooterProp extends ContainerUsualProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 按钮属性 - // const toolbarPropConfig = this.getToolbarPropConfig(propertyData, this.viewModelId); - // propertyConfig.push(toolbarPropConfig); - - // 自定义模板属性 - const customPropConfig = this.getCustomTemplatePropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: this.getCommonAppearanceProperties() - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [visibleProp], - }; - } - - private getToolbarPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - /** 展示模式:弹出类modal/独立页签类page/侧边滑出类slide 。 - * 优先取控件所属组件的展示类型,若没有配置,则取当前表单的展示类型 - */ - let showType = this.domService.module.showType; - const comp = this.domService.getComponentByVMId(viewModelId); - if (comp && comp.showType) { - showType = comp.showType; - } - return { - categoryId: 'toolbar', - categoryName: '工具栏', - properties: [ - { - propertyID: 'toolbarCls', - propertyName: '工具栏样式', - propertyType: 'string' - }, - { - propertyID: 'toolbarDatas', - propertyName: '按钮组', - propertyType: 'modal', - editor: PageToolbarEditorComponent, - editorParams: { controlId: propertyData.id, viewModelId }, - converter: new PageToolbarConverter(this.domService, propertyData.id, showType) - }, - { - propertyID: 'toolbarBtnSize', - propertyName: '按钮尺寸', - propertyType: 'select', - iterator: [ - { key: 'default', value: '标准' }, - { key: 'lg', value: '大号' } - ] - }, - { - propertyID: 'toolbarPopDirection', - propertyName: '弹出方向', - propertyType: 'select', - iterator: [ - { key: 'default', value: '自动' }, - { key: 'top', value: '向上' }, - { key: 'bottom', value: '向下' } - ] - } - ] - }; - } - - - private getCustomTemplatePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'custom', - categoryName: '自定义模板', - properties: [ - { - propertyID: 'upTemplate', - propertyName: '上方扩展区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'upTemplateCls', - propertyName: '上方扩展区域模板样式', - propertyType: 'string' - }, - { - propertyID: 'leftTemplate', - propertyName: '左侧内容区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'leftTemplateCls', - propertyName: '左侧内容区域模板样式', - propertyType: 'string' - }, - { - propertyID: 'rightTemplate', - propertyName: '右侧扩展区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'rightTemplateCls', - propertyName: '右侧扩展区域模板样式', - propertyType: 'string' - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/schema/schema.ts deleted file mode 100644 index 35661b74ec630dbfefd5e0c1810ecd2fdb92f59e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/schema/schema.ts +++ /dev/null @@ -1,16 +0,0 @@ -export const ModalFooterSchema = { - id: '', - type: 'ModalFooter', - visible: true, - appearance: null, - toolbarCls: 'col-6', - toolbarDatas: null, - toolbarBtnSize: 'lg', - toolbarPopDirection: 'top', - upTemplate: '', - upTemplateCls: '', - leftTemplate: '', - leftTemplateCls: '', - rightTemplate: '', - rightTemplateCls: '' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/form.ts deleted file mode 100644 index 1da4d34e85542767f5a62a6ea6f4081c67adbb16..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/form.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default (ctx: any) => { - // 自定义模板 - const { upStr, leftStr, rightStr } = getCustomTemplate(ctx); - - // 工具栏区域 - const toolbarStr = ctx.footerToolBar.render() || ''; - - return ``; -}; - - -function getCustomTemplate(ctx: any) { - // 上方扩展区域 - let upStr = ''; - if (ctx.component.upTemplate) { - upStr = `
    - ${ctx.component.upTemplate} -
    `; - } - - // 左侧扩展区域 - let leftStr = ''; - if (ctx.component.leftTemplate) { - leftStr = `
    - ${ctx.component.leftTemplate} -
    `; - } - - // 右侧扩展区域 - let rightStr = ''; - if (ctx.component.rightTemplate) { - rightStr = `
    - ${ctx.component.rightTemplate} -
    `; - } - - return { upStr, leftStr, rightStr }; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/modal-footer/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/component/fd-multi-view-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/component/fd-multi-view-container.ts deleted file mode 100644 index 48ead01e86becf7e417fcb522d40fcf86c1511bd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/component/fd-multi-view-container.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { MultiViewContainerSchema } from '../schema/schema'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { MultiViewContainerProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { MultiViewUpdateViewChangeService } from '../property/services/update-view-change.service'; -import { RowNode, TreeNode } from '@farris/ui-treetable'; -import { MultiViewContainerContextMenuManager } from '../context-menu/context-menu.manager'; -import { ControlTreeNode } from '@farris/designer-devkit'; -import { ComponentSchema } from '@farris/designer-element'; - -export default class FdMultiViewContainerComponent extends FdContainerBaseComponent { - // view-container-item所有项合集 - viewContainerItems = []; - // currentItem当前项 - currentItemType; - // - // 标识当前的点击按钮 - get viewItemKey(): string { - return `viewItem-${this.key}`; - } - - /** 可视化区域顶层Form节点 */ - private formParent = null; - - constructor(component: any, options: any) { - super(component, options); - } - - getStyles(): string { - return ' display: flex;flex: 1;flex-direction: column; '; - - } - /** - * 为了保证控件只能拖拽到MultiViewItem中,去除多视图容器的padding配置 - */ - // getClassName(): string { - // const className = super.getClassName(); - // return className + ' p-0'; - // } - - getDefaultSchema(): any { - - return MultiViewContainerSchema; - } - - getComponentAttributes() { - return { - viewchange: this.component.viewGroupIdentify - }; - } - - getTemplateName(): string { - return 'MultiViewContainer'; - } - - // 初始化 - init(): void { - this.components = []; - - this.currentItemType = this.component.currentTypeInDesignerView || this.component.defaultType; - if (!this.currentItemType && this.component.contents.length > 0) { - this.currentItemType = this.component.contents[0]['id']; - } - this.viewContainerItems = []; - this.component.contents.forEach((viewContainerItem, index) => { - this.viewContainerItems[index] = []; - viewContainerItem.contents = viewContainerItem.contents || []; - viewContainerItem.contents.forEach((comp) => { - // 创建Items下面的子组件 - const itemInnerCmp: any = this.createComponent(comp, this.options, null); - this.viewContainerItems[index].push(itemInnerCmp); - }); - }); - } - - render(): any { - return super.render(this.renderTemplate('MultiViewContainer', { - viewContainerItems: this.viewContainerItems.map(viewContainerItem => this.renderComponents(viewContainerItem)), - nestedKey: this.nestedKey, - currentItemType: this.currentItemType, - viewItemKey: this.viewItemKey - })); - } - attach(element: any): any { - this.loadRefs(element, { - [this.viewItemKey]: 'multiple', - }); - - const superAttach: any = super.attach(element); - - // 加载子组件 - this.refs[this.viewItemKey].forEach((tab, index) => { - this.attachComponents(tab, this.viewContainerItems[index], this.component.contents[index].contents); - }); - - this.setPositionOfSelectedComponentBtnGroup(); - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: MultiViewContainerProp = new MultiViewContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs: string[]): void { - super.onPropertyChanged(changeObject); - - if (changeObject.propertyID === 'contents') { - this.updateViewChangeButtons(changeObject.propertyValue); - } - } - - /** - * 视图变更后,更新对应的viewChange图标按钮组件 - * @param latestViews 变更后的视图组 - * (页头有header容器和header组件两种可能) - */ - private updateViewChangeButtons(latestViews: any[]) { - const parentContainer = this.parent; - const serviceHost = this.options.designerHost; - - const domSerivice = serviceHost.getService('DomService'); - const updateViewChangeService = new MultiViewUpdateViewChangeService(); - updateViewChangeService.updateViewChangeButtons(latestViews, this.component.viewChangeBar, parentContainer, domSerivice, this.component.id); - } - - /** - * 更新当前显示视图 - */ - updateCurrentViewItem(selectedViewItemId: string) { - const selectedItem = this.component.contents.find(item => item.id === selectedViewItemId); - if (selectedItem) { - this.currentItemType = selectedViewItemId; - - // 在DOM结构中记录当前显示视图id,用于在设计器中保持某视图的选中状态。不用于运行时 - this.component.currentTypeInDesignerView = selectedViewItemId; - this.redraw(); - } - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode, parentRowNode: RowNode) { - const menuManager = new MultiViewContainerContextMenuManager(this, rowNode, parentRowNode); - return menuManager.setContextMenuConfig(); - } - - /** - * 由外部触发组件内部的点击事件:用于在控件树中点击视图项时切换画布中的视图 - * @param treeNode 树节点 - */ - triggerComponentInsideClick(treeNode: TreeNode) { - this.clickViewItemInControlTree(treeNode); - } - - /** - * 在控件树上点击某一视图项时,触发视图切换按钮的切换事件,从而达到更新当前显示视图的目的 - * @param rowNode 控件树上点击的某视图项行数据 - */ - clickViewItemInControlTree(viewItemTreeNode: TreeNode) { - - const activeItemId = viewItemTreeNode.id; - // 更新多视图选中节点 - this.updateCurrentViewItem(activeItemId); - - // 视图按钮在section或tabPage上(子表启用多视图的场景) - const parentTreeNode = viewItemTreeNode.parent.parent as ControlTreeNode; - const parentContainer = parentTreeNode.rawElement; - if (parentContainer && parentContainer.multiViews && parentContainer.views) { - - this.clickViewChangeBarInCollection(parentContainer, activeItemId); - } - // 视图按钮在header上(主表启用多视图的场景) - if (this.component.viewChangeBar) { - this.clickViewChangeBarInHeader(activeItemId); - } - - } - - /** - * 触发header上的viewChange click事件(此处有两种场景:ViewChange是独立的组件,或者ViewChange依附于Header组件。暂时只支持第一种) - * @param activeItemId 当前要显示的视图id - */ - private clickViewChangeBarInHeader(activeItemId: string) { - const pathArray = this.component.viewChangeBar.split('.'); - const viewChangeBarId = pathArray[pathArray.length - 1]; - - // 更新viewChange 按钮 - this.findFormParent(); - const viewChangeBtnEle = this.formParent.querySelectorAll('.farris-component-ViewChange[viewchange=' + this.component.viewGroupIdentify + ']'); - if (!viewChangeBtnEle || !viewChangeBtnEle.length) { - return; - } - const viewChangeBtnInstance = viewChangeBtnEle[0].componentInstance; - if (!viewChangeBtnInstance || viewChangeBtnInstance.id !== viewChangeBarId || !viewChangeBtnInstance.initActiveItem) { - return; - } - viewChangeBtnInstance.initActiveItem(activeItemId); - viewChangeBtnInstance.redraw(); - } - - /** - * 触发Section和TabPage上的viewChange click 事件 - * @param parentContainer 视图的父容器ID - * @param activeItemId 当前要显示的视图id - */ - private clickViewChangeBarInCollection(parentContainer: ComponentSchema, activeItemId: string) { - - // 更新父级容器上的ViewChange图标组件 - if (!parentContainer) { - return; - } - // 若是收折后的控件树触发的操作,那么parentContainer可能不是真是的DOM节点,需要重新查找DOM节点\ - const domService = this.options.designerHost.getService('DomService'); - const rootDom = domService.getComponentById(this.componentId); - const parentContainerInDom = domService.selectNode(rootDom, item => item.id === parentContainer.id); - - parentContainerInDom.views.currentTypeInDesignerView = activeItemId; - - this.parent.redraw(); - } - /** - * 查找form父元素 - */ - private findFormParent() { - if (this.formParent) { - return; - } - this.formParent = OperateUtils.getFormParent(this.element); - } - - checkCanDeleteComponent(): boolean { - return false; - } - - checkCanMoveComponent(): boolean { - return false; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu-config.ts deleted file mode 100644 index 33205545bc9590a8d15bb943e169ef860df5dd6d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu-config.ts +++ /dev/null @@ -1,13 +0,0 @@ -export const contextMenu = [{ - title: '添加视图', - id: 'createMultiViewItem' -}]; - - - -export const MultiViewItemContextMenu = [ - { - title: '移除视图', - id: 'removeMultiViewItem' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu.manager.ts deleted file mode 100644 index 22f2262205919ddc61b6d8e00287151fc89ddd9a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { MultiViewManageService } from '../property/services/multi-view-manage.service'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { contextMenu, MultiViewItemContextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { MessagerService } from '@farris/ui-messager'; -import { ControlTreeNode } from '@farris/designer-devkit'; - -const CREATE_MULTIVIEW_ITEM = 'createMultiViewItem'; -const REMOVE_MULTIVIEW_ITEM = 'removeMultiViewItem'; - -export class MultiViewContainerContextMenuManager extends ContextMenuManager { - - private itemManageService: MultiViewManageService; - private msgService: MessagerService; - - /** 标识父级节点,用于右键点击多视图某一项 */ - private parentRowNode: RowNode; - - constructor(cmp: FdContainerBaseComponent, rowNode: RowNode, parentRowNode: RowNode) { - super(cmp, rowNode); - - this.parentRowNode = parentRowNode; - this.itemManageService = this.injector.get(MultiViewManageService); - this.msgService = this.injector.get(MessagerService); - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - - - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - const parentTreeNode = this.parentRowNode && this.parentRowNode.node as ControlTreeNode; - if (parentTreeNode && parentTreeNode.rawElement.type === DgControl.MultiViewContainer.type) { - menuConfig = cloneDeep(MultiViewItemContextMenu) as ControlContextMenuItem[]; - } - - - if (!menuConfig) { - return []; - } - - menuConfig = this.assembleCreateMultiViewItemMenu(menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - if (menu.parentMenuId === CREATE_MULTIVIEW_ITEM) { - this.createMultiViewItem(menu.id); - return; - } - if (menu.id === REMOVE_MULTIVIEW_ITEM) { - - this.removeMultiViewItem(); - return; - } - this.notifyService.warning('暂不支持'); - } - - private assembleCreateMultiViewItemMenu(menuConfig: ControlContextMenuItem[]) { - const currentViewItems = this.cmpInstance.component.contents || []; - this.itemManageService.initViewTypes(this.cmpInstance.component.dataSource, currentViewItems); - - const viewTypeOptions = this.itemManageService.viewTypeOptions; - - const createViewMenu = menuConfig.find(menu => menu.id === CREATE_MULTIVIEW_ITEM); - if (!createViewMenu) { - return menuConfig; - } - createViewMenu.children = []; - - viewTypeOptions.forEach(option => { - createViewMenu.children.push({ - title: option.name, - id: option.id - }); - }); - - return menuConfig; - } - /** - * 控件树选择多视图节点右键添加视图 - * @param menuId 添加的视图类型 - */ - private createMultiViewItem(menuId: string) { - const currentViewItems = this.cmpInstance.component.contents || []; - this.itemManageService.createMultiViewItem(menuId, currentViewItems).subscribe(viewItem => { - - // 向DOM中添加Component和ViewModel 节点 - Object.keys(this.itemManageService.createdComponent).forEach(componentId => { - const { component, viewModel } = this.itemManageService.createdComponent[componentId]; - this.domService.addComponent(component); - this.domService.addViewModel(viewModel); - }); - - const multiViewElement = this.cmpInstance.component; - multiViewElement.contents.push(viewItem); - - // 更新视图切换图标 - const parentTreeNode = this.rowNode.parent as ControlTreeNode; - - const parentContainer = parentTreeNode.rawElement; - this.itemManageService.updateViewChangeButtons(multiViewElement.contents, multiViewElement.viewChangeBar, parentContainer, this.cmpInstance.componentId); - - this.notifyService.success('添加成功'); - this.refreshFormService.refreshFormDesigner.next(); - }); - } - - /** - * 控件树选择某一视图项右键进行移除 - */ - removeMultiViewItem() { - - const multiViewElement = this.cmpInstance.component; - if (multiViewElement.contents.length === 1) { - this.notifyService.warning('不允许移除唯一的视图'); - return; - } - let viewItem; - let viewItemIndex; - if (multiViewElement.contents) { - viewItemIndex = multiViewElement.contents.findIndex(c => c.id === this.rowNode.id); - viewItem = multiViewElement.contents[viewItemIndex]; - } - if (!viewItem) { - return; - } - - this.msgService.question('确认移除【' + viewItem.title + '】视图?', () => { - - multiViewElement.contents.splice(viewItemIndex, 1); - - // 从记录的新增交叉表视图中移除 - if (viewItem.viewType === 'CrosstabView' && this.itemManageService.newCrosstabViewIds.includes(viewItem.id)) { - this.itemManageService.newCrosstabViewIds = this.itemManageService.newCrosstabViewIds.filter(id => id !== viewItem.id); - } - - // 移除的视图若是默认视图,需要修改默认视图 - if (multiViewElement.defaultType === viewItem.id) { - multiViewElement.defaultType = multiViewElement.contents[0] && multiViewElement.contents[0].id; - } - // 移除的视图若是当前显示视图,需要修改默认视图 - if (multiViewElement.currentTypeInDesignerView === viewItem.id) { - multiViewElement.currentTypeInDesignerView = multiViewElement.defaultType; - } - // 更新视图切换图标 - const parentTreeNode = this.rowNode.parent.parent as ControlTreeNode; - const parentContainer = parentTreeNode.rawElement; - this.itemManageService.updateViewChangeButtons(multiViewElement.contents, multiViewElement.viewChangeBar, parentContainer, this.cmpInstance.componentId); - - // 同步移除dom中涉及的component和viewModel - const cmpRef = this.domService.selectNode(viewItem, item => item.type === DgControl.ComponentRef.type); - if (cmpRef) { - const cmp = this.domService.getComponentById(cmpRef.component); - if (cmp) { - this.domService.deleteComponent(cmpRef.component); - this.domService.deleteViewModelById(cmp.viewModel); - } - } - - - this.notifyService.success('移除成功'); - this.refreshFormService.refreshFormDesigner.next(); - }); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/export.ts deleted file mode 100644 index 49314c1e6e1343e485758eef8c10d58e5d9ea0fc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/export.ts +++ /dev/null @@ -1,18 +0,0 @@ -import FdMultiViewContainerComponent from './component/fd-multi-view-container'; -import { MultiViewContainerSchema,MultiViewItemSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdMultiViewContainerTemplates from './templates'; - - -export const MultiViewContainer: ComponentExportEntity = { - type: 'MultiViewContainer', - component: FdMultiViewContainerComponent, - template: FdMultiViewContainerTemplates, - metadata: MultiViewContainerSchema -}; - - -export const MultiViewItem: ComponentExportEntity = { - type: 'MultiViewItem', - metadata: MultiViewItemSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-converter.ts deleted file mode 100644 index fe2e444d0c5c4185682e88d4d2ea7b9523af579f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-converter.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; -export class MultiViewConverter implements TypeConverter { - - constructor() { } - - convertTo(data: any): string { - if (!data) { - return ''; - } - return '共 ' + data.length + ' 个'; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.css deleted file mode 100644 index cfa100f3b651090a79f3fa47a43595ecdf69b979..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.css +++ /dev/null @@ -1,11 +0,0 @@ -.item-link { - padding: .25rem 1rem; - cursor: pointer; - font-size: 14px; - color: #000; - cursor: pointer; -} - -.item-container.active { - background: #d4ecfc!important; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.html deleted file mode 100644 index 51cd3caa95532739fce551e70224e0e0ba98f7a5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.html +++ /dev/null @@ -1,56 +0,0 @@ -
    -
    - - - - -
    -
    -
    - -
    - -
    -
    - -
    - - -
    -
    -
    - - - - - - - - -
    - -
    -
    - -
    - - -
    -
    -
    -
    - -
    - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.spec.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.spec.ts deleted file mode 100644 index 6097df29d607d80be6c9f65c5eb4a5405411c058..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { MultiViewEditorComponent } from './multi-view-editor.component'; - -describe('MultiViewEditorComponent', () => { - let component: MultiViewEditorComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ MultiViewEditorComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(MultiViewEditorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.ts deleted file mode 100644 index 666b7f8a0b5d1ed2bdc1e553d6fb275e1381e58b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { cloneDeep } from 'lodash-es'; -import { BsModalRef, BsModalService } from '@farris/ui-modal'; -import { DomService } from '@farris/designer-services'; -import { MultiViewManageService } from '../../services/multi-view-manage.service'; -import { MultiViewItemProp } from '../../multi-view-item-property-config'; -import { DgControl } from '../../../../../../utils/dg-control'; - -@Component({ - selector: 'app-multi-view-editor', - templateUrl: './multi-view-editor.component.html', - styleUrls: ['./multi-view-editor.component.css'] -}) -export class MultiViewEditorComponent implements OnInit { - - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { dataSource: '', multiContainerViewModelId: '' }; - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '多视图编辑器', - width: 700, - height: 600, - showButtons: true - }; - - /** - * 属性面板相关 - */ - propertyConfig; - propertyData; - showPropertyPanel = false; - - /** 当前所有的视图数组 */ - viewItems = []; - /** 选择的视图 */ - selectedItem; - - /** 新增视图类型选择模板 */ - @ViewChild('viewTypeTmpl') viewTypeTmpl: TemplateRef; - - /** 新增视图类型选择按钮模板 */ - @ViewChild('viewTypeBtnTmpl') viewTypeBtnTmpl: TemplateRef; - - /** 新增视图类型选择窗口实例 */ - newViewModelRef: BsModalRef; - - /** 支持的视图类型 */ - viewTypeOptions; - - /** 选择的视图类型 */ - selectedViewType = 'ListView'; - - constructor( - private notifyService: NotifyService, - private msgService: MessagerService, - private modalService: BsModalService, - private domService: DomService, - private itemManageService: MultiViewManageService - - ) { } - - ngOnInit() { - if (this.value && this.value.length > 0) { - this.viewItems = cloneDeep(this.value); - } - this.itemManageService.initViewTypes(this.editorParams.dataSource, this.viewItems); - - this.viewTypeOptions = this.itemManageService.viewTypeOptions; - } - - - changeSelectedView(item: any) { - this.selectedItem = item; - // 属性面板 - const multiViewItemProp = new MultiViewItemProp(); - this.propertyConfig = multiViewItemProp.getPropertyConfig(); - this.propertyData = item; - this.showPropertyPanel = true; - } - - - /** - * 新增节点 - * @param type 节点类型 - */ - addItem() { - - this.newViewModelRef = this.modalService.show(this.viewTypeTmpl, { - title: '新增视图', - width: 400, - height: 200, - showButtons: true, - buttons: this.viewTypeBtnTmpl, - showMaxButton: false - }); - - } - cancelNewView() { - this.newViewModelRef.close(); - } - - confirmNewView() { - - this.itemManageService.createMultiViewItem(this.selectedViewType, this.viewItems).subscribe(viewItem => { - if (viewItem) { - this.viewItems.push(viewItem); - } - this.newViewModelRef.close(); - - }); - - - } - - removeItem() { - if (!this.selectedItem) { - this.notifyService.warning('请先选择要删除的视图'); - return; - } - - this.msgService.question('确认删除【' + this.selectedItem.title + '】节点?', () => { - const index = this.viewItems.findIndex(item => item.id === this.selectedItem.id); - - this.viewItems.splice(index, 1); - - - // 从待追加组件中移除 - this.itemManageService.removeItem(this.selectedItem); - - // 从记录的新增交叉表视图中移除 - if (this.selectedItem.viewType === 'CrosstabView' && this.itemManageService.newCrosstabViewIds.includes(this.selectedItem.id)) { - this.itemManageService.newCrosstabViewIds = this.itemManageService.newCrosstabViewIds.filter(id => id !== this.selectedItem.id); - } - - this.selectedItem = null; - - this.showPropertyPanel = false; - - }); - - } - - moveUpItem() { - - if (!this.selectedItem) { - this.notifyService.warning('请先选择要移动的视图'); - return; - } - - const index = this.viewItems.findIndex(item => item.id === this.selectedItem.id); - if (index === 0) { - return; - } - this.viewItems.splice(index, 1); - this.viewItems.splice(index - 1, 0, this.selectedItem); - - } - - moveDownItem() { - - - if (!this.selectedItem) { - this.notifyService.warning('请先选择要移动的视图'); - return; - } - - const index = this.viewItems.findIndex(item => item.id === this.selectedItem.id); - - if (index === this.viewItems.length - 1) { - return; - } - this.viewItems.splice(index, 1); - this.viewItems.splice(index + 1, 0, this.selectedItem); - - } - - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - - /** - * 确定 - */ - clickConfirm() { - // 向DOM中添加Component和ViewModel 节点 - Object.keys(this.itemManageService.createdComponent).forEach(componentId => { - const { component, viewModel } = this.itemManageService.createdComponent[componentId]; - this.domService.addComponent(component); - this.domService.addViewModel(viewModel); - }); - - // 移除视图后,要同步删除dom中已有的component和viewModel,以及可能有的外部组件声明和订阅 - if (this.value && this.value.length) { - this.value.forEach(oldItem => { - // 被删除的视图 - if (!this.viewItems.find(newItem => newItem.id === oldItem.id)) { - const cmpRef = this.domService.selectNode(oldItem, item => item.type === DgControl.ComponentRef.type); - if (cmpRef) { - const cmp = this.domService.getComponentById(cmpRef.component); - if (cmp) { - this.domService.deleteComponent(cmpRef.component); - this.domService.deleteViewModelById(cmp.viewModel); - } - } - } - }); - } - - this.submitModal.emit({ value: this.viewItems }); - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/multi-view-item-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/multi-view-item-property-config.ts deleted file mode 100644 index 1ad095cdfdf02cf8f70be5cab2cfcb8eed89486c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/multi-view-item-property-config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -/** - * 多视图项的属性配置 - */ -export class MultiViewItemProp { - - getPropertyConfig(): ElementPropertyConfig[] { - return [ - { - categoryId: 'usual', - categoryName: '常规', - hideTitle: true, - properties: [{ - propertyID: 'id', - propertyName: '标识', - propertyType: 'string' - }, { - propertyID: 'title', - propertyName: '文本', - propertyType: 'string' - }, - { - propertyID: 'icon', - propertyName: '图标', - propertyType: 'string' - }] - }]; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/property-config.ts deleted file mode 100644 index 6f381261092dc57f944c28d390131f70110cf2cd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/property-config.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { MultiViewEditorComponent } from './editor/multi-view-editor/multi-view-editor.component'; -import { MultiViewConverter } from './editor/multi-view-editor/multi-view-converter'; - -export class MultiViewContainerProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'dataSource', - propertyName: '绑定数据源', - propertyType: 'string', - readonly: propertyData.contents && propertyData.contents.length - }, - { - propertyID: 'contents', - propertyName: '视图', - propertyType: 'modal', - editor: MultiViewEditorComponent, - editorParams: { - dataSource: propertyData.dataSource, - multiContainerViewModelId: viewModelId - }, - converter: new MultiViewConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.dataSource) { - return { result: false, message: '请先选择绑定数据源!' }; - } - // 参数取最新值 - this.editorParams.dataSource = propertyData.dataSource; - return { result: true, message: '' }; - - } - }, - { - propertyID: 'defaultType', - propertyName: '默认显示的视图', // 屏蔽此属性,因为运行时是由viewChange组件上的指令控制视图的显示。 - propertyType: 'select', - iterator: this.getViewChangeDataTypes(propertyData), - visible: false - }, - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters: any) { - if (!changeObject) { - return; - } - if (changeObject.propertyID === 'contents') { - self.syncDefaultTypeAfterContentsChanged(changeObject, data, this.properties); - - // 属性变更后,触发刷新页面 - changeObject.needRefreshForm = true; - } - } - }; - } - - - private getViewChangeDataTypes(propData: any) { - - if (!propData || !propData.contents || propData.contents.length === 0) { - return []; - } - const iterators = []; - propData.contents.forEach(data => { - iterators.push( - { - key: data.id, - value: data.title - } - ); - }); - return iterators; - } - - /** - * 变更视图后更新默认选中视图 - * @param changeObject 视图变更集 - * @param data 当前控件dom结构 - * @param properties 属性配置集合 - */ - private syncDefaultTypeAfterContentsChanged(changeObject: FormPropertyChangeObject, data: any, properties: PropertyEntity[]) { - - const defaultProp = properties.find(p => p.propertyID === 'defaultType'); - if (defaultProp) { - defaultProp.iterator = this.getViewChangeDataTypes(data); - if (defaultProp.iterator.findIndex(viewItem => viewItem.key === data.defaultType) < 0) { - if (defaultProp.iterator.length) { - data.defaultType = defaultProp.iterator[0].key; - } else { - data.defaultType = ''; - } - } - if (data.currentTypeInDesignerView && defaultProp.iterator.findIndex(viewItem => viewItem.key === data.currentTypeInDesignerView) < 0) { - if (defaultProp.iterator.length) { - data.currentTypeInDesignerView = defaultProp.iterator[0].key; - } else { - data.currentTypeInDesignerView = ''; - } - } - } - - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/multi-view-manage.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/multi-view-manage.service.ts deleted file mode 100644 index 6fd73687bf2d541e465f9d6a0bac462029d1c8c4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/multi-view-manage.service.ts +++ /dev/null @@ -1,686 +0,0 @@ -import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core'; - -import { BsModalService } from '@farris/ui-modal'; -import { Observable, of, Subject } from 'rxjs'; -import { IdService } from '@farris/ui-common'; -import { switchMap } from 'rxjs/operators'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { NotifyService } from '@farris/ui-notify'; -import { LoadingService } from '@farris/ui-loading'; -import { FormComponentType, FormSchemaEntity, FormViewModel, DomService, FormBasicService, DesignerEnvType } from '@farris/designer-services'; -import { ControlService } from '../../../../../service/control.service'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ComponentCreatorService } from '@farris/designer-devkit'; -import { AppNavigationBeComponent } from '@farris/app-navigation-be'; -import { FarrisMetadataService } from '@farris/designer-services'; -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; - -/** - * 多视图容器管理类 - */ -@Injectable({ - providedIn: 'root' -} -) -export class MultiViewManageService { - /** 支持的视图类型 */ - viewTypeOptions = []; - - /** 视图项绑定的数据源 */ - dataSource: string; - - /** 主表实体label */ - mainEntityLabel = ''; - - /** 视图项绑定的数据源信息 */ - bindEntityInfo: { id: string, code: string, name: string, bindTo: string }; - - /** 临时记录要追加的组件,在窗口点击确定时再向DOM中添加 */ - createdComponent = {}; - - /** 新加的交叉表视图id集合---用于追加交叉表视图后,保存表单时向VO元数据追加查询相关动作 */ - newCrosstabViewIds = []; - - constructor( - private controlService: ControlService, - private domService: DomService, - private resolver: ComponentFactoryResolver, - private modalService: BsModalService, - private injector: Injector, - private formBasicService: FormBasicService, - private idService: IdService, - private metadataService: FarrisMetadataService, - private http: HttpClient, - private notifyService: NotifyService, - private loadingService: LoadingService) { } - - - initViewTypes(dataSource: string, currentViewItems?: any[]) { - - this.dataSource = dataSource; - const schemas = this.domService.getSchemas(); - this.bindEntityInfo = this.getEntityInfoDataSource(schemas.entities); - - if (this.formBasicService.envType === DesignerEnvType.noCode) { - this.viewTypeOptions = [ - { id: 'EmptyView', name: '空视图' }, - { id: 'ListView', name: 'ListView视图' }, - { id: 'SplitView', name: '分屏视图' }, - ]; - } else { - this.viewTypeOptions = [ - { id: 'EmptyView', name: '空视图' }, - { id: 'ListView', name: 'ListView视图' }, - { id: 'SplitView', name: '分屏视图' }, - // { id: 'ChartView', name: '图表视图' }, - // { id: 'CrosstabView', name: '交叉表视图' } - ]; - } - // 目前只支持添加一个预约日历视图 - if (currentViewItems && !currentViewItems.find(item => item.viewType === 'AppointmentCalendar')) { - this.viewTypeOptions.push({ id: 'AppointmentCalendar', name: '预约日历视图' }); - } - - // 从表不支持分屏视图、图表视图、交叉表视图 - if (this.bindEntityInfo.bindTo !== '/') { - this.viewTypeOptions = [ - { id: 'EmptyView', name: '空' }, - { id: 'ListView', name: 'ListView视图' } - ]; - } - - this.createdComponent = {}; - } - - - createMultiViewItem(viewType: string, currentViewItems?: any[]) { - const subject = new Subject(); - - let viewItem; - const radomNum = Math.random().toString().slice(2, 6); - const multiViewClass = this.bindEntityInfo.bindTo === '/' ? - 'f-viewchange-content-item f-utils-fill-flex-column' : 'f-viewchange-content-item'; - - // 新增视图 - viewItem = this.controlService.getControlMetaData('MultiViewItem'); - viewItem.id = 'viewItem_' + radomNum; - viewItem.title = '视图_' + radomNum; - viewItem.icon = 'f-icon f-icon-group'; - viewItem.appearance = viewItem.appearance || {}; - viewItem.appearance.class = multiViewClass; - - switch (viewType) { - case 'ListView': { - viewItem.title = 'ListView视图_' + radomNum; - viewItem.icon = 'f-icon f-icon-list_view'; - - const compRefNode = this.createListViewComponent(radomNum); - viewItem.contents = [compRefNode]; - viewItem.viewType = 'ListView'; - - return of(viewItem); - } - case 'SplitView': { - viewItem.title = '分屏视图_' + radomNum; - viewItem.icon = 'f-icon f-icon-perspective_view'; - - const contentContainer = this.createGridSplitMultiView(radomNum); - viewItem.contents = [contentContainer]; - viewItem.viewType = 'SplitView'; - - return of(viewItem); - } - // case 'ChartView': { - // viewItem.title = '图表视图_' + radomNum; - // viewItem.icon = 'f-icon f-icon-chart_view'; - - // this.showSelectQoModal(radomNum, 'ChartView').subscribe(chartsMetadata => { - // if (chartsMetadata) { - // viewItem.contents = [chartsMetadata]; - // viewItem.viewType = 'ChartView'; - - // subject.next(viewItem); - // } - // }); - // break; - - // } - // case 'CrosstabView': { - // viewItem.title = '交叉表视图_' + radomNum; - // viewItem.icon = 'f-icon f-icon-chart_view'; - - // this.showSelectQoModal(radomNum, 'CrosstabView').subscribe(chartsMetadata => { - // if (chartsMetadata) { - // viewItem.contents = [chartsMetadata]; - // viewItem.viewType = 'CrosstabView'; - - // this.newCrosstabViewIds.push(viewItem.id); - - // subject.next(viewItem); - - // } - // }); - // break; - - // } - case 'AppointmentCalendar': { - // 目前只支持添加一个日历视图 - if (currentViewItems && currentViewItems.find(item => item.viewType === 'AppointmentCalendar')) { - return of(null); - } - viewItem.title = '预约日历视图_' + radomNum; - viewItem.icon = 'f-icon f-icon-calendar'; - - const compRefNode = this.createAppointmentCalendarComponent(radomNum); - viewItem.contents = [compRefNode]; - viewItem.viewType = 'AppointmentCalendar'; - - return of(viewItem); - } - default: { - return of(viewItem); - } - } - - return subject; - } - - private createListViewComponent(radomNum: string) { - - const dataSource = this.dataSource; - const listViewViewModel = new FormViewModel(); - Object.assign(listViewViewModel, { - id: `${dataSource}-${radomNum}-component-viewmodel`, - code: `${dataSource}-${radomNum}-component-viewmodel`, - name: this.bindEntityInfo.name, - bindTo: this.bindEntityInfo.bindTo, - parent: ROOT_VIEW_MODEL_ID, - fields: [], - commands: [], - states: [], - enableValidation: true, - pagination: { - enable: false - } - }); - - - const listViewComponent = this.controlService.getControlMetaData(DgControl.Component.type); - const listViewElement = this.controlService.getControlMetaData(DgControl.ListView.type); - - - Object.assign(listViewComponent, { - id: `${dataSource}-${radomNum}-component`, - viewModel: listViewViewModel.id, - componentType: FormComponentType.listView, - appearance: { - class: this.bindEntityInfo.bindTo === '/' ? 'f-utils-fill-flex-column' : 'f-grid-is-sub f-utils-flex-column' - }, - contents: [listViewElement] - }); - Object.assign(listViewElement, { - id: `${dataSource}-${radomNum}-listview`, - appearance: { - class: this.bindEntityInfo.bindTo === '/' ? 'f-section' : '' - }, - fill: true - }); - - - const listViewComponentRef = this.controlService.getControlMetaData(DgControl.ComponentRef.type); - - Object.assign(listViewComponentRef, { - id: `${dataSource}-${radomNum}-component-ref`, - component: listViewComponent.id - }); - - this.createdComponent[listViewComponent.id] = { - component: listViewComponent, - viewModel: listViewViewModel - }; - return listViewComponentRef; - } - - private createAppointmentCalendarComponent(radomNum: string) { - - const componentCreatorService = new ComponentCreatorService(null, this.domService, this.injector); - componentCreatorService.controlService = this.controlService; - const buildInfo = { - componentIdPrefix: `${this.dataSource}-${radomNum}-component`, - resolvedComponentType: FormComponentType.appointmentCalendar, - componentType: 'AppointmentCalendar', - // componentAppearance: 'f-struct-wrapper f-utils-fill-flex-column', - componentName: this.bindEntityInfo.name, - bindTo: this.bindEntityInfo.bindTo, - selectedFields: [], - componentId: `${this.dataSource}-${radomNum}`, - dataSource: this.dataSource - }; - const componentRefNode = componentCreatorService.createComponentRefNode(buildInfo); - - const componentNode = componentCreatorService.createComponentNode(buildInfo); - - const viewModelNode = componentCreatorService.createViewModeNode(buildInfo); - - this.createdComponent[componentNode.id] = { - component: componentNode, - viewModel: viewModelNode - }; - return componentRefNode; - } - - /** - * 创建左边ListView , 右边外部组件的容器 - * @param radomNum 随机码 - */ - private createGridSplitMultiView(radomNum: string): any { - - // 1、创建ListView组件 - const listViewComponentRef = this.createListViewComponent(radomNum); - - // 创建父容器 - const listViewParentContainer = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - Object.assign(listViewParentContainer, { - id: `splitview-container-${radomNum}`, - appearance: { - class: 'f-utils-fill d-flex' - }, - contents: [ - listViewComponentRef, - { - id: `right-container-${radomNum}`, - type: 'ContentContainer', - appearance: { - class: 'f-col-w8' - }, - visible: true, - isScrollspyContainer: false, - draggable: false, - contents: [ - { - id: `external-container-${radomNum}`, - type: 'ExternalContainer' - } - ] - } - ] - }); - - return listViewParentContainer; - - } - - /** - * 移除记录的追加组件 - * @param selecteItem 选中的视图节点 - */ - removeItem(selecteItem: any) { - - const addedComponentIds = Object.keys(this.createdComponent); - - const addedCmp = this.domService.selectNode(selecteItem, item => { - return item.type === DgControl.ComponentRef.type && addedComponentIds.includes(item.component); - }); - if (addedCmp) { - delete this.createdComponent[addedCmp.component]; - } - } - - /** - * 图表类视图,弹出选择QO的窗口 - */ - // showSelectQoModal(randomNum: string, viewType: string): Observable { - // const subject = new Subject(); - // const compFactory = this.resolver.resolveComponentFactory(AppNavigationBeComponent); - // const compRef = compFactory.create(this.injector); - - // // 配置模态框参数 - // compRef.instance.editorParams = { - // // 路径 - // relativePath: this.formBasicService.formMetaBasicInfo.relativePath || "", - // range: 'Bo', - // source: 'qo', - // } - // // 配置模态框参数 - // const modalConfig = { - // title: '选择查询对象', - // width: 900, - // height: 500, - // resizable: true, - // showButtons: false, - // showMaxButton: false, - // minWidth: 650, - // minHeight: 300, - // } - // // compRef.instance.onlyDisplayCurrentProject = false; - // const dialog = this.modalService.show(compRef, modalConfig); - - // // 关闭 - // compRef.instance.closeModal.subscribe((data) => { - // subject.next(); - // dialog.close(); - // }); - // // 选定元数据 - // compRef.instance.submitModal.subscribe(data => { - // switch (viewType) { - // case 'ChartView': { - // this.createChartsView(data, randomNum).subscribe(chartsMetadata => { - // subject.next(chartsMetadata); - // }); - // break; - // } - // case 'CrosstabView': { - // this.createCrosstabView(data, randomNum).subscribe(crosstabMetadata => { - // subject.next(crosstabMetadata); - // }); - // break; - // } - // } - // dialog.close(); - // }); - // return subject; - // } - - // /** - // * 创建图表视图:QdpFramework--Charts控件 - // * @param $event 选择的qo元数据 - // * @param radomNum 随机码 - // */ - // private createChartsView($event: any, radomNum: string) { - // if (!$event) { - // return of(null); - // } - // const subject = new Subject(); - - // const qdpFrameworkMetadata = this.controlService.getControlMetaData(DgControl.QdpFramework.type); - // const chartsMetadata = this.controlService.getControlMetaData(DgControl.Charts.type); - - // const qoManagerCode = ('com.' + $event.metadata.nameSpace + '.' + $event.metadata.code || '').toLowerCase(); - // const voSourceUri = this.domService.getSchemas().sourceUri.toLowerCase(); - // const voMetadataId = this.domService.getSchemas().id; - // const voCode = this.domService.getSchemas().code; - - - // this.getVoJavaConfigId(voMetadataId, voCode).subscribe(voConfigId => { - // const queryId = this.idService.generate(); - // Object.assign(chartsMetadata, { - // id: `charts-${radomNum}`, - // appearance: { - // class: 'd-flex flex-fill' - // }, - // queryId, - // controlType: 'charts', - // chartsDataSource: 'lcp', - // qoManagerCode, - // voId: voConfigId - // }); - - // Object.assign(qdpFrameworkMetadata, { - // id: `qdp-framework-${radomNum}`, - // appearance: { - // class: 'f-page-main position-relative m-0' - // }, - // queryId, - // qoManagerCode, - // controlType: 'charts', - // queryRelativeUrl: `/${voSourceUri}/service/`, - // qoId: $event.metadata.id, - // voId: voConfigId, - // templateType: 'none', - // contents: [chartsMetadata] - // }); - - // subject.next(qdpFrameworkMetadata); - // }); - - - // return subject; - // } - - // /** - // * 创建交叉表视图:QdpFramework--Spreadsheet控件 - // * @param $event 选择的qo元数据 - // * @param radomNum 随机码 - // */ - // createCrosstabView($event: any, radomNum: string) { - // if (!$event) { - // return of(null); - // } - // const subject = new Subject(); - - // const qdpFrameworkMetadata = this.controlService.getControlMetaData(DgControl.QdpFramework.type); - // const spreadSheetMetadata = this.controlService.getControlMetaData(DgControl.SpreadSheet.type); - - // const qoManagerCode = ('com.' + $event.metadata.nameSpace + '.' + $event.metadata.code || '').toLowerCase(); - // const voSourceUri = this.domService.getSchemas().sourceUri.toLowerCase(); - - - // const voMetadataId = this.domService.getSchemas().id; - // const voCode = this.domService.getSchemas().code; - - // this.getVoJavaConfigId(voMetadataId, voCode).subscribe(voConfigId => { - - // const queryId = this.idService.generate(); - // Object.assign(spreadSheetMetadata, { - // id: `spreadSheet-${radomNum}`, - // appearance: { - // class: 'd-flex flex-fill' - // }, - // queryId, - // controlType: 'crosstab', - // qoManagerCode, - // qoId: $event.metadata.id, - // voId: voConfigId, - // queryRelativeUrl: `/${voSourceUri}/service/`, - // templateType: 'none' - // }); - - // Object.assign(qdpFrameworkMetadata, { - // id: `qdp-framework-${radomNum}`, - // appearance: { - // class: 'f-page-main position-relative m-0' - // }, - // queryId, - // qoManagerCode, - // controlType: 'crosstab', - // queryRelativeUrl: `/${voSourceUri}/service/`, - // qoId: $event.metadata.id, - // voId: voConfigId, - // templateType: 'none', - // contents: [spreadSheetMetadata] - // }); - - // subject.next(qdpFrameworkMetadata); - - // }); - - - // return subject; - // } - - // /** - // * 获取VO元数据配置的java configId,不能直接按照表单的nameSpace拼接。 - // */ - // getVoJavaConfigId(voMetadataId: string, voCode: string) { - // let voConfigId = ''; - // const subject = new Subject(); - // let ob: Observable = this.metadataService.getMetadata(voMetadataId); - - // if (ob) { - // ob.subscribe(voData => { - // const voMetadataContent = JSON.parse(voData.content); - // if (voMetadataContent && voMetadataContent.GeneratingAssembly) { - // voConfigId = 'com.' + voMetadataContent.GeneratingAssembly.toLowerCase() + '.' + voCode; - // } - // subject.next(voConfigId); - // }, () => { - // this.notifyService.error('获取VO元数据失败!'); - // }); - // } - // return subject; - // } - - - // /** - // * 多视图添加交叉表视图场景:安装qdp相关maven包;向VO元数据追加交叉表查询相关的动作(暂不同步eapi) - // */ - // addVOActionsForCrosstabView() { - // if (this.formBasicService.envType !== DesignerEnvType.designer) { - // // console.log('运行时定制表单暂不支持向vo追加查询动作!'); - // return; - // } - // if (this.newCrosstabViewIds.length === 0) { - // return; - // } - // const loading = this.loadingService.show({ container: 'body', message: '正在添加查询相关动作,请稍候...' }); - // const sessionId = ''; - // const formMetadataPath = this.formBasicService.formMetaBasicInfo.relativePath; - - // const voMetadataId = this.domService.getSchemas().id; - // const vmfilename = this.domService.getSchemas().code + '.vo'; - - // const headerOptions = { - // headers: new HttpHeaders({ 'Content-Type': 'text/json', SessionId: '' }) - // }; - - // this.checkAndRestoreMetadataPackages().pipe( - // switchMap(() => { - // return this.metadataService.GetRefMetadata(formMetadataPath, voMetadataId, sessionId); - // }), - // switchMap((voData) => { - // const voMetadataPath = voData.relativePath; - - // const body = { - // vmfilename, - // vmpath: voMetadataPath - // }; - // return this.http.put(`/api/dev/main/v1.0/qometadata/updateviewmodelwithqdpcmp`, body, headerOptions); - // }) - // ).subscribe(() => { - // this.newCrosstabViewIds = []; - // loading.close(); - // this.notifyService.success('添加成功'); - // }, () => { - // this.notifyService.error('添加查询相关动作失败'); - // loading.close(); - // }); - - // } - - // /** - // * 安装qdp元数据包 - // * @param packageNames 待安装的元数据包 - // */ - // checkAndRestoreMetadataPackages() { - // const qdpMetadataPackages = 'Inspur.GS.Gsp.QDP.QdpCmp.mdpkg,Inspur.GS.Gsp.QDP.QdpCommonCmp.mdpkg,Inspur.Gsp.Common.CommonCmp.mdpkg'; - // const formMetadataPath = this.formBasicService.formMetaBasicInfo.relativePath; - - // let projPath: string; - // return this.metadataService.GetProjPath(formMetadataPath).pipe( - // switchMap(path => { - // projPath = path; - // return this.metadataService.getMavenStatus(projPath); - // }), - // switchMap(isMaven => { - // return this.metadataService.addDependencyAndRestore(projPath, qdpMetadataPackages, isMaven); - // }) - // ); - // } - - /** - * 根据数据源dataSource,获取实体信息,以及用于viewModel的bindTo属性 - */ - private getEntityInfoDataSource(entities: FormSchemaEntity[], labelPath = ''): any { - if (!entities || entities.length === 0) { - return; - } - - const parentLabelPath = labelPath; - for (const entity of entities) { - const entityType = entity.type; - if (!entityType) { - return []; - } - labelPath = parentLabelPath === '' ? entity.label : parentLabelPath + '/' + entity.label; - this.mainEntityLabel = !this.mainEntityLabel ? entity.label : this.mainEntityLabel; - - if (this.dataSource === entity.label) { - const bindTo = labelPath.replace(this.mainEntityLabel, ''); - return { - id: entity.id, - label: entity.label, - name: entity.name, - displayName: entity.type.displayName, - bindTo: bindTo === '' ? '/' : bindTo - }; - } - if (entityType.entities && entityType.entities.length > 0) { - const entityInfo = this.getEntityInfoDataSource(entityType.entities, labelPath); - if (entityInfo) { - return entityInfo; - } - } - } - } - - /** - * 视图变更后,更新viewChange图标组件 - * @param latestViews 变更后的视图组 - * @param viewChangeBar 视图切换控件路径 - * @param parentContainer 多视图父容器 - * @param componentId 父容器所在的组件id - * (TODO:页头有header容器和header组件两种可能) - */ - updateViewChangeButtons(latestViews: any[], viewChangeBar: any, parentContainer: any, componentId: string) { - - let viewChangeElement; - // 子表启用多视图,图标组件放在了TabPage/Section上 - if (parentContainer && parentContainer.multiViews && parentContainer.views) { - // 若是收折后的控件树触发的操作,那么parentContainer可能不是真是的DOM节点,需要重新查找DOM节点 - const rootDom = this.domService.getComponentById(componentId); - const parentContainerInDom = this.domService.selectNode(rootDom, item => item.id === parentContainer.id); - viewChangeElement = parentContainerInDom.views; - } - // 主表启用多视图,在多视图组件上记录了图标组件的路径 - if (viewChangeBar) { - const rootComponentJson = this.domService.getComponentById('root-component'); - viewChangeElement = this.domService.getNodeByIdPath(rootComponentJson, viewChangeBar); - } - - - if (viewChangeElement) { - const viewChangeItems = viewChangeElement.toolbarData as any[]; - const updatedViewChangeItems = []; - latestViews.forEach((view) => { - const matchedViewItem = viewChangeItems.find(item => item.id === view.id); - if (matchedViewItem) { - matchedViewItem.title = view.title; - matchedViewItem.iconName = view.icon; - updatedViewChangeItems.push(matchedViewItem); - } else { - updatedViewChangeItems.push({ - type: view.id, - title: view.title, - iconName: view.icon - }); - } - }); - viewChangeElement.toolbarData = updatedViewChangeItems; - - if (updatedViewChangeItems.findIndex(viewItem => viewItem.type === viewChangeElement.defaultType) < 0) { - if (updatedViewChangeItems.length) { - viewChangeElement.defaultType = updatedViewChangeItems[0].type; - } else { - viewChangeElement.defaultType = ''; - } - } - if (updatedViewChangeItems.findIndex(viewItem => viewItem.type === viewChangeElement.currentTypeInDesignerView) < 0) { - if (updatedViewChangeItems.length) { - viewChangeElement.currentTypeInDesignerView = updatedViewChangeItems[0].type; - } else { - viewChangeElement.currentTypeInDesignerView = ''; - } - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/update-view-change.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/update-view-change.service.ts deleted file mode 100644 index c346350af477576951304f4c5307882d91630f23..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/property/services/update-view-change.service.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { DgControl, DomService } from '@farris/designer-services'; - -export class MultiViewUpdateViewChangeService { - - /** - * 视图变更后,更新viewChange图标组件 - * @param latestViews 变更后的视图组 - * (TODO:页头有header容器和header组件两种可能) - */ - updateViewChangeButtons(latestViews: any[], viewChangeBar: any, parentContainer: any, domService: DomService, multiViewContainerId?: string) { - - // let viewChangeElement; - // // 子表启用多视图,图标组件放在了TabPage/Section上 - // if (parentContainer && parentContainer.multiViews && parentContainer.views) { - // viewChangeElement = parentContainer.views; - // } - // // 主表启用多视图,在多视图组件上记录了图标组件的路径 - // if (viewChangeBar) { - // const rootComponentJson = domService.getComponentById('root-component'); - // viewChangeElement = domService.getNodeByIdPath(rootComponentJson, viewChangeBar); - // } - - const viewChangeElement = this.getViewChangeElement(viewChangeBar, parentContainer, domService, multiViewContainerId); - - if (viewChangeElement) { - const viewChangeItems = viewChangeElement.toolbarData as any[]; - const updatedViewChangeItems = []; - latestViews.forEach((view) => { - const matchedViewItem = viewChangeItems.find(item => item.id === view.id); - if (matchedViewItem) { - matchedViewItem.title = view.title; - matchedViewItem.iconName = view.icon; - updatedViewChangeItems.push(matchedViewItem); - } else { - updatedViewChangeItems.push({ - type: view.id, - title: view.title, - iconName: view.icon - }); - } - }); - viewChangeElement.toolbarData = updatedViewChangeItems; - - // 变更默认视图 - if (updatedViewChangeItems.findIndex(viewItem => viewItem.type === viewChangeElement.defaultType) < 0) { - if (updatedViewChangeItems.length) { - viewChangeElement.defaultType = updatedViewChangeItems[0].type; - } else { - viewChangeElement.defaultType = ''; - } - } - // 变更设计时展示视图 - if (viewChangeElement.currentTypeInDesignerView && updatedViewChangeItems.findIndex(viewItem => viewItem.type === viewChangeElement.currentTypeInDesignerView) < 0) { - if (updatedViewChangeItems.length) { - viewChangeElement.currentTypeInDesignerView = updatedViewChangeItems[0].type; - } else { - viewChangeElement.currentTypeInDesignerView = ''; - } - } - } - } - - - private getViewChangeElement(viewChangeBar: any, parentContainer: any, domService: DomService, multiViewContainerId: string) { - let viewChangeElement; - - // 主表启用多视图,在多视图组件上记录了图标组件的路径 - if (viewChangeBar) { - const rootComponentJson = domService.getComponentById('root-component'); - viewChangeElement = domService.getNodeByIdPath(rootComponentJson, viewChangeBar); - - return viewChangeElement; - } - - // 子表启用多视图,图标组件放在了Section上 - if (parentContainer && parentContainer.component && parentContainer.component.multiViews && parentContainer.component.views) { - viewChangeElement = parentContainer.component.views; - return viewChangeElement; - } - - // 子表启用多视图,图标组件放在了TabPage上 - if (parentContainer.type === DgControl.Tab.type && parentContainer.component && parentContainer.component.contents) { - const tabPage = parentContainer.component.contents.find(item => { - if (item.contents && item.contents.find(co => co.id === multiViewContainerId)) { - return true; - } - }); - if (tabPage && tabPage.multiViews && tabPage.views) { - viewChangeElement = tabPage.views; - return viewChangeElement; - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/schema/schema.ts deleted file mode 100644 index 37ca493e5d1914fa9ffb3628ff11981d95c6721e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/schema/schema.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const MultiViewContainerSchema = { - id: '', - type: 'MultiViewContainer', - appearance: { - class: '' - }, - contents: [], - visible: true, - dataSource: null -}; - -export const MultiViewItemSchema = { - id: '', - type: 'MultiViewItem', - appearance: { - class: '' - }, - title: '', - icon: 'f-icon f-icon-group', - contents: [] -}; \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/form.ts deleted file mode 100644 index 9ca550b19be83c8d9bf48b3b24dca981492855c9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/form.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default (ctx: any) => { - let viewItemsStr = ''; - - ctx.component.contents.forEach((viewContainerItem, index) => { - const viewItemCls = ctx.currentItemType === viewContainerItem.id ? '' : ' f-viewchange-view-none'; - viewItemsStr += ` -
    - -
    - ${ctx.viewContainerItems[index]} -
    - -
    `; - }); - - return viewItemsStr; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/multi-view-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/component/fd-query-form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/component/fd-query-form.ts deleted file mode 100644 index 2ed2a8630bb6a9f661f9ffc5e2ec06bf00ab6bbe..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/component/fd-query-form.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { QueryFormSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { FormProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -/** - * 查询区域,内部放置输入类控件。目前推荐使用ListFilter和QueryScheme替代。 - */ -export default class FdQueryFormComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return QueryFormSchema; - } - - getTemplateName(): string { - return 'QueryForm'; - } - - /** - * 不支持删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(sourceElement: BuilderHTMLElement): boolean { - return false; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: FormProp = new FormProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['controlsInline']); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/export.ts deleted file mode 100644 index 6be72e91f08fab3029f07201f479bc74c68b4178..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdQueryFormComponent from './component/fd-query-form'; -import { QueryFormSchema } from './schema/schema'; - -import FdQueryFormTemplates from './templates'; - - -export const QueryForm: ComponentExportEntity = { - type: 'QueryForm', - component: FdQueryFormComponent, - template: FdQueryFormTemplates, - metadata: QueryFormSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/property/property-config.ts deleted file mode 100644 index f7ae2f06ff0a7cc1c801b4298bf4369976a5f395..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/property/property-config.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class FormProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - - const commonProps = this.getCommonAppearanceProperties(); - - let properties = commonProps; - - - properties = properties.concat([ - { - propertyID: 'controlsInline', - propertyName: '控件标签独占一列', - propertyType: 'boolean', - description: '控件标签是否独占一列', - }]); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'controlsInline': { - const appearance = Object.assign({}, propertyData.appearance); - if (changeObject.propertyValue) { - if (!appearance.class.includes('farris-form-controls-inline')) { - appearance.class = appearance.class + ' ' + 'farris-form-controls-inline'; - } - } else { - appearance.class = appearance.class.replace('farris-form-controls-inline', ''); - } - propData.appearance = appearance; - - break; - } - } - } - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ], - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/schema/schema.ts deleted file mode 100644 index d6921df341ceb3ead360a55e7012b65f4c8ab4f4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/schema/schema.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const QueryFormSchema = { - id: 'form', - type: 'QueryForm', - appearance: { - class: 'f-form-layout farris-form farris-form-controls-inline' - }, - visible: true, - controlsInline: true, - formAutoIntl: true, - contents: [] -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/form.ts deleted file mode 100644 index f77d126313221e3291b4daa8953d7253986b8938..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/form.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default (ctx: any) => { - return ` -
    - ${ctx.children} -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/query-form/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/fd-response-layout.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/fd-response-layout.ts deleted file mode 100644 index bed5cbecba01fe96c2f7e15745baa99e0f8f240b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/fd-response-layout.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { ResponseLayoutItemSchema, ResponseLayoutSchema } from '../schema/schema'; -import { FdResponseLayoutProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import FdResponseLayoutItemComponent from './response-layout-item/component/fd-response-layout-item'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from '../../../../utils/dg-control'; -import { DesignerEnvType, DesignViewModelService, RefreshFormService } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; -import { SaveAsTemplateEditorComponent } from '@farris/designer-devkit'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; - -export default class FdResponseLayoutComponent extends FdContainerBaseComponent { - - /** 标识每个布局项的key值 */ - get layoutItemKey(): string { - return `item-${this.id}`; - } - - /** 布局项实例 */ - layoutItemComponents: FdResponseLayoutItemComponent[]; - - /** 当前选中布局项id */ - selectedLayoutItemId: string; - - constructor(component: any, options: any) { - super(component, options); - } - - /** - * 从工具箱拖拽生成时需要预制布局项 - */ - static getMetadataInControlBox(targetComponentInstance: FarrisDesignBaseComponent, controlFeature: any) { - // 判断是何种布局 - const feature = controlFeature ? JSON.parse(controlFeature) : null; - const splitterClass = (feature && feature.splitter) || '6:6'; - const columnParts = splitterClass.split(':'); - const layoutItems = []; - - // tslint:disable-next-line: prefer-for-of - for (let index = 0; index < columnParts.length; index++) { - const radomNum = Math.random().toString().slice(2, 6); - const newLayoutItem = cloneDeep(ResponseLayoutItemSchema); - newLayoutItem.id = `layout_${radomNum}`; - newLayoutItem.appearance.class += ` col-${columnParts[index]} px-0`; - - layoutItems.push(newLayoutItem); - } - - const layoutSchema = cloneDeep(ResponseLayoutSchema); - Object.assign(layoutSchema, { - id: `response_layout_${Math.random().toString().slice(2, 6)}`, - contents: layoutItems, - appearance: { - class: 'bg-white' - } - }); - - return layoutSchema; - } - - getDefaultSchema(): any { - return ResponseLayoutSchema; - } - - getTemplateName(): string { - return 'ResponseLayout'; - } - - /** 设计时增加下边距,方便拖拽 */ - getStyles(): string { - return ' margin-bottom:10px'; - } - - init(): void { - this.components = []; - this.layoutItemComponents = []; - const options = Object.assign({}, this.options, { parent: this }); - this.component.contents.forEach((item, index) => { - item.contents = item.contents || []; - const layoutItemComponent: any = this.createComponent(item, options, null); - - this.layoutItemComponents[index] = layoutItemComponent; - }); - } - - render(): any { - - this.addSaveAsCustomToolbarConfig(); - - return super.render(this.renderTemplate('ResponseLayout', { - layoutItemElements: this.layoutItemComponents.map((pane: FdResponseLayoutItemComponent) => pane.renderComponents()), - layoutItemKey: this.layoutItemKey, - selectedLayoutItemId: this.selectedLayoutItemId - })); - } - - - - attach(element: any): any { - this.loadRefs(element, { - [this.layoutItemKey]: 'multiple', - }); - const superAttach: any = super.attach(element); - - this.refs[this.layoutItemKey].forEach((layoutItemEle, index) => { - this.layoutItemComponents[index].attach(layoutItemEle); - }); - - return superAttach; - } - - /** - * 组装属性面板配置数据 - * @returns ElementPropertyConfig[] - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: FdResponseLayoutProp = new FdResponseLayoutProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject); - - if (changeObject.propertyID === 'layout') { - - // 若有删除的布局项,需要触发布局项的删除方法,从而触发布局项内部控件的删除方法 - this.afterLayoutItemCountChanged(); - - this.rebuild(); - - // 刷新页面,触发控件树更新 - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - refreshFormService.refreshFormDesigner.next(this.component.id); - } - } - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - return false; - } - - /** - * 零代码:支持输入控件另存为模板 - */ - private addSaveAsCustomToolbarConfig() { - this.customToolbarConfigs = []; - - if (this.envType !== DesignerEnvType.noCode) { - return; - } - // 只有带输入类控件的布局容器支持另存为,若布局容器中包含非输入类控件,则不允许另存为模板 - let hasControlExceptInput = false; - const saveAsControls = []; - this.component.contents.forEach(item => { - if (item.contents && item.contents.length) { - if (item.appearance && item.appearance.class && item.appearance.class.includes('farris-form')) { - saveAsControls.push(item.contents[0]); - } else { - hasControlExceptInput = true; - return; - } - - } - }) - if (!hasControlExceptInput && saveAsControls.length) { - this.customToolbarConfigs.push( - { - id: 'saveAsTemplate', - title: '另存为模板', - icon: 'f-icon f-icon-save', - click: (e) => { - e.stopPropagation(); - this.showSaveAsTemplateModal(); - } - }); - } - - } - /** - * 弹出另存为模板的窗口 - */ - private showSaveAsTemplateModal() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - - const compFactory = resolver.resolveComponentFactory(SaveAsTemplateEditorComponent); - const compRef = compFactory.create(injector); - const modalConfig = compRef.instance.modalConfig as any; - modalConfig.buttons = compRef.instance.modalFooter; - - const layoutItemCount = this.component.contents ? this.component.contents.length || 3 : 3; - const saveAsComponentDom = cloneDeep(this.component); - compRef.instance.editorParams = { - controlCategory: 'container', - controlTitle: DgControl[this.component.type].name + '模板', - controlDom: saveAsComponentDom, - viewModelId: this.viewModelId, - templateIconType: this.component.type + layoutItemCount - } - - - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe(() => { - modalPanel.close(); - - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - - if (refreshFormService && refreshFormService.refreshControlBox) { - refreshFormService.refreshControlBox.next(); - } - }); - - } - - /** - * 变更布局项后事件:若有删除的布局项,需要触发布局项的删除方法,从而触发布局项内部控件的删除方法 - */ - private afterLayoutItemCountChanged() { - const layoutItemInstances = this.components || []; - const layoutItemSchema = this.component.contents || []; - const layoutItemIds = layoutItemSchema.map(item => item.id); - - layoutItemInstances.forEach(itemInstance => { - - if (!layoutItemIds.includes(itemInstance.id) && itemInstance.onRemoveComponent) { - itemInstance.onRemoveComponent(); - } - }) - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/component/fd-response-layout-item.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/component/fd-response-layout-item.ts deleted file mode 100644 index b126c70dcd4b641c41b0952a00d99c8b0f9e4e2d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/component/fd-response-layout-item.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../../../common/containerBase/containerBase'; -import { ComponentResolveContext } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FdResponseLayoutItemProp } from '../property/property-config'; -import { ResponseLayoutItemDragDropManager } from '../drag-drop/dragAndDropManager'; - -/** - * 布局容器项 - */ -export default class FdResponseLayoutItemComponent extends FdContainerBaseComponent { - - - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componentId; - - this.components = []; - } - - - attach(element: HTMLElement): Promise { - const superAttach: any = super.attach(element); - - return superAttach; - } - - afterComponentClicked(e?: PointerEvent): void { - this.parent.selectedLayoutItemId = this.id; - } - - afterComponentCancelClicked(e?: PointerEvent): void { - this.parent.selectedLayoutItemId = null; - } - - /** - * 组装属性面板配置数据 - * @returns ElementPropertyConfig[] - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: FdResponseLayoutItemProp = new FdResponseLayoutItemProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - - const result = super.canAccept(sourceElement, targetElement); - if (!result.canAccepts) { - return false; - - } - const dragManager = new ResponseLayoutItemDragDropManager(this); - return dragManager.canAccepts(sourceElement, targetElement); - - } - - /** - * 接收新控件后事件(来源为控件工具箱或者实体树) - * @param componentResolveContext 新控件构造信息 - */ - afterAcceptNewChildElement(componentResolveContext: ComponentResolveContext) { - if (!componentResolveContext.bindingSourceContext) { - return; - } - - const dragManager = new ResponseLayoutItemDragDropManager(this); - return dragManager.afterAcceptNewChildElement(componentResolveContext); - - } - - /** - * 移动内部控件后事件:在可视化设计器中,容器接收控件后事件 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - const dragManager = new ResponseLayoutItemDragDropManager(this); - dragManager.onAcceptMovedChildElement(sourceElement); - } - - /** - * 移动内部控件后事件:在可视化设计器中,容器中的控件被移出后事件 - * @param el 移动的源DOM结构 - */ - onChildElementMovedOut(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - // 若被移出的源组件是输入类控件,需要将当前布局项上的form样式删除掉 - if (sourceElement.componentInstance && sourceElement.componentInstance.category === 'input') { - this.removeFormClassFromResponseLayoutItem(); - } - } - - /** - * 移除布局项中的form类样式 - */ - removeFormClassFromResponseLayoutItem() { - const dragManager = new ResponseLayoutItemDragDropManager(this); - dragManager.removeFormClassFromResponseLayoutItem(); - } - - redraw(): Promise { - return this.parent.redraw(); - } - rebuild(): Promise { - return this.parent.rebuild(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/drag-drop/dragAndDropManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/drag-drop/dragAndDropManager.ts deleted file mode 100644 index 964c5cd9900dbb849d8dc604829b6d7cd8ae4af7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/drag-drop/dragAndDropManager.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { BuilderHTMLElement } from '@farris/designer-element'; -import FdContainerBaseComponent from '../../../../common/containerBase/containerBase'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { SchemaService, DomService, ComponentResolveContext, FormBasicService, DesignerEnvType } from '@farris/designer-services'; -import { FormDragDropManager } from '../../../../form/drag-drop/dragAndDropManager'; - -export class ResponseLayoutItemDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - * @returns boolean - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - - const serviceHost = this.cmpInstance.options.designerHost; - const domService = serviceHost.getService('DomService') as DomService; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this); - - // 布局容器组件不能嵌套 - if (resolveContext.controlType === DgControl.ResponseLayout.type) { - return false; - } - - // 每个布局项内只能放一个子级控件 - if (this.cmpInstance.component.contents && this.cmpInstance.component.contents.length) { - return false; - } - - // 可以接收控件工具箱的输入类控件 - if (resolveContext.sourceType === 'control' && resolveContext.controlCategory === 'input') { - return true; - } - - // 可以接收实体树中拖拽来的字段,需要判断是否为主表 - if (resolveContext.sourceType === 'field') { - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - const fieldInfo = schemaService.getFieldByIDAndVMID(resolveContext.bindingTargetId, this.cmpInstance.viewModelId); - if (!fieldInfo || !fieldInfo.schemaField) { - return false; - } - } - - // 在现有设计器中拖拽控件:跨Component的移动输入控件,需要判断组件是否绑定同一实体。 - const sourceComponentInstance = sourceElement.componentInstance; - if (sourceComponentInstance && sourceComponentInstance.viewModelId !== this.cmpInstance.viewModelId) { - - const sourceVM = domService.getViewModelById(sourceComponentInstance.viewModelId); - const currentVM = domService.getViewModelById(this.cmpInstance.viewModelId); - return sourceVM.bindTo === currentVM.bindTo; - - } - - - return true; - } - /** - * 单元格接收新控件后事件(来源为控件工具箱或者实体树) - * @param componentResolveContext 拖拽上下文 - */ - afterAcceptNewChildElement(componentResolveContext: ComponentResolveContext) { - const { controlCategory, controlTemplate } = componentResolveContext; - - // 接收输入控件以及输入类的模板控件:需要在布局容器上增加form样式 - if (controlCategory === 'input' || - (controlCategory === 'componentTemplate' && controlTemplate && controlTemplate.templateCategory === 'input')) { - this.addFormClassToResponseLayoutItem(); - } - } - - /** - * 移动控件后事件:在可视化设计器中,将现有的控件移动到容器中 - * @param el 移动的源DOM结构 - */ - onAcceptMovedChildElement(sourceElement: BuilderHTMLElement) { - if (!sourceElement) { - return; - } - - // 若拖拽的源组件是输入类控件,需要在当前布局项上增加form样式 - if (sourceElement.componentInstance && sourceElement.componentInstance.category === 'input') { - this.addFormClassToResponseLayoutItem(); - } - - const dragManager = new FormDragDropManager(this.cmpInstance); - dragManager.onAcceptMovedChildElement(sourceElement); - } - - /** - * 在布局项中追加form的样式 - * @param componentInstance 组件实例 - */ - private addFormClassToResponseLayoutItem() { - if (!this.cmpInstance.component.appearance) { - this.cmpInstance.component.appearance = { class: '' }; - } - if (!this.cmpInstance.component.appearance.class) { - this.cmpInstance.component.appearance.class = ''; - } - // farris-form-auto是为了让控件长度不受最大长度限制 - if (!this.cmpInstance.component.appearance.class.includes('farris-form')) { - this.cmpInstance.component.appearance.class += ' f-form-layout farris-form farris-form-controls-inline farris-form-auto'; - } - } - - /** - * 移除布局项中的form类样式 - */ - removeFormClassFromResponseLayoutItem() { - if (!this.cmpInstance.component.appearance || !this.cmpInstance.component.appearance.class) { - return; - } - this.cmpInstance.component.appearance.class = this.cmpInstance.component.appearance.class.replace('f-form-layout', ''); - this.cmpInstance.component.appearance.class = this.cmpInstance.component.appearance.class.replace('farris-form', ''); - this.cmpInstance.component.appearance.class = this.cmpInstance.component.appearance.class.replace('farris-form-controls-inline', ''); - this.cmpInstance.component.appearance.class = this.cmpInstance.component.appearance.class.replace('farris-form-auto', ''); - this.cmpInstance.component.appearance.class = this.cmpInstance.component.appearance.class.trim(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/property/property-config.ts deleted file mode 100644 index 3f1735b13656082372158f0023e1bd6dea7c1759..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/component/response-layout-item/property/property-config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../../../common/property/container-property-config'; -import { ControlAppearancePropertyConfig } from '../../../../../../utils/appearance-property-config'; - -export class FdResponseLayoutItemProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = ControlAppearancePropertyConfig.getAppearanceStylePropConfigs(propertyData); - propertyConfig = propertyConfig.concat(appearancePropConfig); - - return propertyConfig; - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/export.ts deleted file mode 100644 index e59f0daf38093faa7d7bbcddf066c2697153c5a4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/export.ts +++ /dev/null @@ -1,20 +0,0 @@ -import FdResponseLayoutComponent from './component/fd-response-layout'; -import { ResponseLayoutSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdResponseLayoutTemplates from './templates'; -import FdResponseLayoutItemComponent from './component/response-layout-item/component/fd-response-layout-item'; - - -export const ResponseLayout: ComponentExportEntity = { - type: 'ResponseLayout', - component: FdResponseLayoutComponent, - template: FdResponseLayoutTemplates, - metadata: ResponseLayoutSchema -}; - -export const ResponseLayoutItem: ComponentExportEntity = { - type: 'ResponseLayoutItem', - component: FdResponseLayoutItemComponent, - // template: FdResponseLayoutTemplates, - metadata: ResponseLayoutSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.css b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.css deleted file mode 100644 index 9009b4072326a8a03d8f81535c37a2403ecd90d4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.css +++ /dev/null @@ -1,51 +0,0 @@ -.columns-layout .columns-layout-list { - width: 256px; - margin: 0 auto; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-start; -} - -.columns-layout .columns-layout-list .columns-layout-option { - display: flex; - justify-content: center; - width: 58px; - height: 34px; - border: 1px solid rgba(0, 0, 0, .2); - margin: 3px; - padding: 4px 0; - border-radius: 5px; -} - -.columns-layout .columns-layout-list .columns-layout-option:hover { - border: 1px solid rgba(0, 0, 0, .4); - cursor: pointer; -} - -.columns-layout .columns-layout-list .columns-layout-option.active { - border: 1px solid #0079f2 !important; -} - -.columns-layout .columns-layout-list .columns-layout-option .columns-layout-icon { - width: 50px; - height: 24px; - background-size: contain; - background-position: 50%; -} - - -.columns-layout .columns-layout-list .columns-layout-option .columns-layout-item { - display: block; - padding: 0; - background: #d2d7de; - border-right: 2px solid white; -} - -.columns-layout .columns-layout-list .columns-layout-option .columns-layout-item:last-child { - border-right: 0; -} - -.columns-layout .columns-layout-list .columns-layout-option .icon-custom { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAwCAYAAADn/d+1AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAZKADAAQAAAABAAAAMAAAAADiKLdKAAAJO0lEQVR4Ae1a/bNVVRle77v2ORcEA0o+FMwL6IWimkmZjKGPIQFHp5qcusqozBUEAadxpn7pV/6Apu8JuNwA0xr1hpbZh0SGGZUmWE0kQ1IkH2KlFgTce85e79vz7n329XA4IdzhctYPZ83cu/b63Ps8z17v56Yr5y+5wp1HObjzoSP10893fbG2vU+BxOk1n95st1qNQJuQVjPQcP82IQ2AtLrZJqTVDDTcv01IAyCtbrYJaTUDDfdvE9IASKubSasf4K3urxIuYfWfZnJdqu5ImiTfY03/+VbrGsdTrZTKUrpOnJvsPb2eprybEjnROK/V7agJMTK886sA0hSQYaWznIZ7Ui6tc1R9Pes5h38sbnKHlu/CFm83kaDBuYR1AarvoLn/HLa4aFOiFVkqSU6GuikZGqTPErtUnL6NJb2Hg447J5RUp5Jzq42MfB931JFTlDE+6DL0zTynfS7SpCgJyclIV7kaGUz6uDA9KoG+a2DiHZ/gHK+weWfDCSejk5VW4XRdgmVVKlGfsPuycPVrRHRCHZWMFKFk4tn2uZhj0RFyBhnsfpAy7TRQNNE9rNKfA6STEkpXzJvXPboZYD64LlJdAfo6sHJAifqC6F/yuaUjqr6XyJ00UhJJP9Fsj1b0xUWI6mhP1dVDJ8PIIPfremBSz7sY/dan4qYedcln53R3l+vnJKl/D07SXQZ21k/uDzgZB+rniE+PgpBfZX2iV9WPtfI6KkJI+GYnNNkA0SZkFEAZScz0ZDbP6dUnDvvV3d2PeGuT+GuFw50QU1k7W6N0fSK8MLuu+6dK06xJxNFYW1ERwqxTM4DY7deGk5HhqKVcMaORkj6Fk/LLvN/Nef7w9++eOf/2BaThNpww6HF6Q3z1q4717zZHVBb5QIuy+fjHqX4Kiv3d1ibSXUV/q+u4CFG/zwCBKJrplRcX4ISBACuVlrFUv5AE+lDRj5PyI7zdmdhRleuCyBIbY0f/AAXrnCsdGUjlWwUp6nShdyAluNvAwrxsH+J9leB/UezZ6joqQgYqle0wbTO/QEVugMz5sJFRKpd68IrPNrCgC+A+vFl6FnfBl6CjRQ+xHqkqrRdP/7G+cskP5qTkOkSDLsSPvtbGYGntqVaq93MS4C/GUaIixI/y6ak03I9X/GWDBw7cxzMyVLqsDdR2Culv7LooW7btuxUza76K+6uw39DogRspaaoPQIlXinVY80JVBh+0e77Z1/qrqAgxOAw8OH+boAXytx5kmA8BfbENavrxAjJ48USi3ZBvC6yPmfcm4yZ+BaJroJhT1FSpjkqYlkLR59YYud8Gkoc5KUdzMopnjY6Q7MGITlU59EGkvFZrswQ+VDy0wPb1LrmdlOZaHzT4HycMjP3GSz/5+mAxp6izWFi5vBLtTutjT09D7D1G7OFgxlfiJAQ4IYZ1HMBtBNzHzISFJbSUWKYHCknipQfBj/cZnMT0u7nTwvpdu3qrjfAGFy71xKuhNzLz1k5Z6vTHjfNiakdLiIEEq+iNNDGP2sIcWqKUl5UEwcaagod1+1zPolmb+vv7T1P0tpYcTShLsqbwa2B5/RBW2c9tLOYSNSEGnIXaA2sf6BkAQx3Q7O/M+pmfUa9b165de4YeUKbLoF/WwM94h82FSEtx2g7adewlekIMQFhWx9jxsQJM8rQ9JXmiaNfX8EsuT1JaA/LGwarCyUEcC9F2J7Lcuep5fYNWv+/Fuo6eEEr9+FLgNbC8Jhko5N0TwenPmgE06yNLp1MqiO7KWDsVGujboeQ35uYujfLScXdMkd1mvyFqQjSF6KFgoucyyB0EbGUrXvlnmv2Q6fPvnFVJ089hbLQRELzbJCXdSyKHArstGUEgKgnpSiO52R4x9EVLCIdkSkK0GiCNh1IXuOgPBebnmoE2Y94d73Uh3AfiEGp3p2Ci9aLeXzd3v5B7MNsHooxZVkIMjq0bj+YySkKUGWZqiiyfXJplCZUekER+3wy1GfOXzBU7RaTgj44joNgb1B3MAEe2sFiD6PGLKvSwnTQ7cYiJrYS+GVWMx1JHRwhAnZFADwCg0eahByeb1cufmwGWODdXhCwJhbAXS5n0SxZQNOUNvfN5FrrPfJdibY3Ux7I2spGwxJbjBrn3XkxqcR0ZIdUrOJXlRYgDSmM7PL+XmmFkUV8JrhtWFNSDFeGK8E1GhpfSSpyCMUaoVPzxfDz/D/P3WZCeO4dITIGNHgtg1s9p5XVUhLCWbxzK8gEVIL2YUprTCFCi7gZYXXnalfgVcrlugYj7gA/JvSA0y6EHT5sp0X81rodf8zQ8/KesH/e4utxR+ljjnFa1oyHEvptCDvwaAyJPPOUhEySt7qgnJXF0s4hbbPPgjxwaU65+sefGrs0QWy9YnxFqVpbl0NGsV+w2PFQC6ZNIL/7NOpC86hoaaPFFNISUuONKi1nlALnnA/F6QJ7FsYwUy5PjK5JbJOhHa5gdkEpl454d/f81b71z1GwQwJmuqYm8zrNhm4jOR5440y84JYfPNvdijkVDiMcnO7Uffgpy/lXi8JpwgqxfTgosqaV4/T+YzbEsH1f6tFwaCrXv2LE2HTOtax1yKQeyOepuwrdb+fzaxkVlZIjSJ7M2wvywyH5ajLW6joYQcdRZA+NArQYX+DpR3NahNi5gvv6pmsqWhMpnRHf39K+tIHOy2bKG+Rq6hdW9v359ZgwMkUGvICK8AanDU/VzWnkdjXUB12+qJSigPw5C4V4TquFdnvxs5TxAaCAhirhbNTziy/8/l6FlGUhT35eQrMF+E5EzuZWEBs10zsgYMgaMjLQXeZGTrSSg8d7REILwevbGZwpbFJKHzYPLnhdK+iSU9DaH9C3laqbxd5zWthQuciAbccRgcel400EquguEXl/bMEoy7NniIYR4GzvpBoCFGP03GHkRMmrvYDK4v5mIOo2FhoZ95KDiexPVe/HBBMIkNESGkGwg8tGIqfpHj4cQDrvTlF5m4kkIXUGhu1cBIp5V8dbAfRtGMcMAhG7AHp+B6LocJvFekPFoTDqj8WdFQ4g9mDlxEF34u3AFHzPgGy36ZsYtyM1JvnD7X+idCvFwofdt7zdMBNqEDBO4kVrWJmSkkB3mvm1ChgncSC1rEzJSyA5z3zYhwwRupJa1CRkpZIe57/8ANFzPLxoU8gkAAAAASUVORK5CYII=); -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.html b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.html deleted file mode 100644 index 56159b4c691addbb5a123f4aa6c4cb2835727559..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.html +++ /dev/null @@ -1,31 +0,0 @@ -
    -
      -
    • -
      - -
      -
      -
      -
    • -
    • -
      -
    • - -
    - -
    -
    - - -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.ts deleted file mode 100644 index 5e247d86ffcb3a66a65c8af11180d61e6472e1b8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Component, OnInit, Output, EventEmitter } from '@angular/core'; -import { PropertyEntity } from '@farris/ide-property-panel'; -import { MessagerService } from '@farris/ui-messager'; -import { ResponseLayoutItemSchema } from '../../../schema/schema'; -import { cloneDeep } from 'lodash-es'; - -@Component({ - selector: 'app-response-layout-splitter', - templateUrl: './response-layout-splitter.component.html', - styleUrls: ['./response-layout-splitter.component.css'] - -}) -export class ResponseLayoutSplitterComponent implements OnInit { - @Output() valueChanged = new EventEmitter(); - - private _elementConfig: PropertyEntity; - - get elementConfig() { - return this._elementConfig; - } - - set elementConfig(value) { - this._elementConfig = value; - } - /** 内置布局 */ - standardLayouts = [ - '12', - '6:6', - '3:9', - '9:3', - '4:4:4', - '3:6:3', - '3:3:6', - '3:3:3:3', - ]; - - standardLayoutClass = []; - /** 当前选中布局 */ - selectedLayout = ''; - - /** 当前布局容器实际的列数据 */ - currentLayoutItems = []; - - /** 是否标准布局 */ - isStandardLayout = true; - - constructor(private msgService: MessagerService) { } - - ngOnInit() { - this.initStandardLayoutData(); - this.getCurrentLayoutData(); - } - - private initStandardLayoutData() { - this.standardLayoutClass = []; - this.standardLayouts.forEach(item => { - this.standardLayoutClass.push(item.split(':').map(pro => `col-${pro}`)); - }); - } - private getCurrentLayoutData() { - if (!this.elementConfig || !this.elementConfig.editorParams || !this.elementConfig.editorParams.layout) { - return; - } - this.currentLayoutItems = this.elementConfig.editorParams.layout || []; - - if (!this.currentLayoutItems.length) { - this.selectedLayout = ''; - return; - } - this.isStandardLayout = true; - const proportionList = []; - this.currentLayoutItems.forEach(layoutItem => { - if (!layoutItem.appearance) { - layoutItem.appearance = { class: '' }; - } - const itemClass = layoutItem.appearance.class || ''; - - const colClass = itemClass.split(' ').find(classItem => /^col-([1-9]|10|11|12)$/.test(classItem)); - if (colClass) { - proportionList.push(parseInt(colClass.replace('col-', ''), 10)); - } else { - proportionList.push(0); - this.isStandardLayout = false; - } - }); - - if (this.isStandardLayout) { - this.selectedLayout = proportionList.join(':'); - } - - } - onSelectColumnLayout(column: string) { - const columnParts = column.split(':'); - - if (columnParts.length < this.currentLayoutItems.length && this.hasContentsInRemovingLayouts(columnParts)) { - this.msgService.question(`应用${columnParts.length}列布局将删除右侧区域内的控件,此操作不可撤销,确定应用?`, () => { - this.applySelectedColumnLayout(column, columnParts); - - - }, () => { - }); - } else { - this.applySelectedColumnLayout(column, columnParts); - } - } - - private applySelectedColumnLayout(column: string, columnParts: string[]) { - this.isStandardLayout = true; - this.selectedLayout = column; - - // tslint:disable-next-line: prefer-for-of - for (let index = 0; index < columnParts.length; index++) { - const layoutItem = this.currentLayoutItems[index]; - // 已有列 - if (layoutItem) { - let itemClass = layoutItem.appearance && layoutItem.appearance.class || ''; - const colClass = itemClass.split(' ').find(classItem => /^col-([1-9]|10|11|12)$/.test(classItem)); - if (colClass) { - itemClass = itemClass.replace(colClass, `col-${columnParts[index]}`); - layoutItem.appearance.class = itemClass; - } else { - layoutItem.appearance.class += ` col-${columnParts[index]}`; - } - } else { - // 新增列 - const newLayoutItem = cloneDeep(ResponseLayoutItemSchema); - newLayoutItem.id = `layout_${Math.random().toString().slice(2, 6)}`; - newLayoutItem.appearance.class += ` col-${columnParts[index]} px-0`; - this.currentLayoutItems.push(newLayoutItem); - } - - } - // 移除后面的列 - this.currentLayoutItems.length = columnParts.length; - - this.valueChanged.next({ $event: null, elementValue: null }); - } - - /** - * 检测被移除的布局列中是否包含控件 - * @param columnParts 新的布局列配置 - */ - private hasContentsInRemovingLayouts(columnParts: string[]) { - - for (let index = columnParts.length; index < this.currentLayoutItems.length; index++) { - const layout = this.currentLayoutItems[index]; - if (layout && layout.contents && layout.contents.length) { - return true; - } - - } - return false; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/property-config.ts deleted file mode 100644 index c6904fab194c648e94c58ac73e9daa8a2b7cbed0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/property/property-config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { ResponseLayoutSplitterComponent } from './editor/response-layout-splitter/response-layout-splitter.component'; -import { ControlAppearancePropertyConfig } from '../../../../utils/appearance-property-config'; -import { DesignerEnvType } from '@farris/designer-services'; - -export class FdResponseLayoutProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig = []; - - // 基本信息属性 - if (this.formBasicService.envType === DesignerEnvType.designer) { - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - } - - // 外观属性 - const appearancePropConfig = ControlAppearancePropertyConfig.getAppearanceStylePropConfigs(propertyData); - propertyConfig = propertyConfig.concat(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - - // 布局属性 - const layoutPropConfig = this.getLayoutPropConfig(propertyData, this.viewModelId); - propertyConfig.push(layoutPropConfig); - - - return propertyConfig; - - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } - - private getLayoutPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'layout', - categoryName: '布局', - properties: [ - { - propertyID: 'layout', - propertyType: 'custom', - description: '配置布局容器内区块个数及比例。', - editor: ResponseLayoutSplitterComponent, - editorParams: { - layout: propertyData.contents || [] - } - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/schema/schema.ts deleted file mode 100644 index 3f36d9897b41af33e61abfcd6b8028aa623d9a4d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/schema/schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const ResponseLayoutSchema = { - id: 'responseLayout', - type: 'ResponseLayout', - appearance: null, - visible: true, - contents: [] -}; - -export const ResponseLayoutItemSchema = { - id: 'responseLayoutItem', - type: 'ResponseLayoutItem', - appearance: { - class: 'h-100' - }, - visible: true, - contents: [], - // hasInputControl: false -}; - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/form.ts deleted file mode 100644 index 2386e4bc467d421f4f6a56b972675caf6e64734d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/form.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default (ctx: any) => { - - let layoutItemBodys = ''; - ctx.component.contents.forEach((layoutItem, index) => { - - const itemClass = getLayoutItemClass(ctx.selectedLayoutItemId, layoutItem); - - layoutItemBodys += ` -
    -
    - ${ctx.layoutItemElements[index]} -
    -
    - `; - }); - - return ` -
    - ${layoutItemBodys} -
    - `; -}; - -/** - * 获取布局项的样式 - */ -function getLayoutItemClass(selectedLayoutItemId: string, layoutItem) { - let itemClass = layoutItem.appearance && layoutItem.appearance.class; - if (layoutItem.id === selectedLayoutItemId) { - itemClass += ' dgComponentSelected'; - } - - return itemClass || ''; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/response-layout/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/component/fd-route-container.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/component/fd-route-container.ts deleted file mode 100644 index 0738492fe3b5994872e6f4a29decc9f3703136e2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/component/fd-route-container.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { RouteContainerSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { RouteContainerProp } from '../property/property-config'; -import { BuilderHTMLElement } from '@farris/designer-element'; - -export default class FdRouteContainerComponent extends FdContainerBaseComponent { - constructor(component: any, options: any) { - super(component, options); - } - - - getDefaultSchema(): any { - - return RouteContainerSchema; - } - - getTemplateName(): string { - return 'RouteContainer'; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: RouteContainerProp = new RouteContainerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 不接收子组件 - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - return false; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/export.ts deleted file mode 100644 index 4905b6f8c4c6d823148ed21f1e3d4c1dc78bf5ba..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdRouteContainerComponent from './component/fd-route-container'; -import { RouteContainerSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdRouteContainerTemplates from './templates'; - - -export const RouteContainer: ComponentExportEntity = { - type: 'RouteContainer', - component: FdRouteContainerComponent, - template: FdRouteContainerTemplates, - metadata: RouteContainerSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/property/property-config.ts deleted file mode 100644 index faac7e766cc5520f3fdf624d0806200dd43ccef2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/property/property-config.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; - -export class RouteContainerProp extends ContainerUsualProp { - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - // 获取可选的子组件 - const enumData = []; - this.domService.components.map(c => { - if (c.componentType !== 'Frame') { - enumData.push({ - id: c.id - }); - } - }); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'childrenRoutes', - propertyName: '子路由', - propertyType: 'modal', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { - field: 'childComponentId', - title: '子组件', - editor: { - type: EditorTypes.SELECT, - options: { valueField: 'id', textField: 'id', data: enumData } - } - }, - { - field: 'routeUri', - title: '路由标识', - editor: { - type: EditorTypes.TEXTBOX - } - }, - ], - requiredFields: ['childComponentId', 'routeUri'], - uniqueFields: ['childComponentId', 'routeUri'], - modalTitle: '子路由编辑器' - }, - converter: new ItemCollectionConverter() - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/schema/schema.ts deleted file mode 100644 index 67af26c3789f9bc5618d4e97cebe5cfe9b95f83e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/schema/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const RouteContainerSchema ={ - id: '', - type: 'RouteContainer', - childrenRoutes: [], - appearance: { - class: null - }, - visible: true -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/form.ts deleted file mode 100644 index 0c6502773809fdbf7c5527fe86b5c5be42e26a21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/form.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (ctx: any) => { - return `
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/route-container/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/component/fd-scroll-collapsible-area.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/component/fd-scroll-collapsible-area.ts deleted file mode 100644 index ce7964aec32856468b816b1ed42dbb65b1e476db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/component/fd-scroll-collapsible-area.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { ScrollCollapsibleAreaSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ScrollCollapsibleAreaProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { OperateUtils } from '../../../../utils/operate.utils'; - -export default class FdScrollCollapsibleAreaComponent extends FdContainerBaseComponent { - // 収折状态,默认是展开 - collapseState: boolean = false; - // 标识当前的legend - get ScrollCollapsibleAreaKey(): string { - return `ScrollCollapsibleArea-${this.key}`; - } - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - - return ScrollCollapsibleAreaSchema; - } - - getTemplateName(): string { - return 'ScrollCollapsibleArea'; - } - - // 渲染模板 - render(children): any { - this.collapseState = this.component.expanded === false; - - return super.render(children || this.renderTemplate('ScrollCollapsibleArea', { - collapseState: this.collapseState, - ScrollCollapsibleAreaKey: this.ScrollCollapsibleAreaKey, - children: this.renderComponents(), - nestedKey: this.nestedKey - })); - } - // 绑定事件 - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.ScrollCollapsibleAreaKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - // - // 収折样式变动容器 - const collapseContainer = this.refs[this.ScrollCollapsibleAreaKey]; - // 初始禁用动画容器 - const collapseInner = collapseContainer.querySelector('.fe-collapsible-container'); - // 注册标签页切换事件 - const collapseBtn = collapseContainer.querySelector('.fe-collapsible-icon-container'); - OperateUtils.removeClass(collapseInner, 'animated-none'); - if (collapseBtn) { - this.addEventListener(collapseBtn, 'click', (event) => { - event.stopPropagation(); - this.collapseState = !this.collapseState; - if (this.collapseState) { - OperateUtils.removeClass(collapseContainer, 'f-state-expand'); - OperateUtils.addClass(collapseContainer, 'f-state-collapse'); - } else { - OperateUtils.removeClass(collapseContainer, 'f-state-collapse'); - OperateUtils.addClass(collapseContainer, 'f-state-expand'); - } - }); - } - // 必写 - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ScrollCollapsibleAreaProp = new ScrollCollapsibleAreaProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (['expanded', 'contentTemplate'].includes(changeObject.propertyID)) { - this.triggerRedraw(); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/export.ts deleted file mode 100644 index 14aa2529c37720a431b2a4f1d6cfd24e0847b7e0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdScrollCollapsibleAreaComponent from './component/fd-scroll-collapsible-area'; -import { ScrollCollapsibleAreaSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdScrollCollapsibleAreaTemplates from './templates'; - - -export const ScrollCollapsibleArea: ComponentExportEntity = { - type: 'ScrollCollapsibleArea', - component: FdScrollCollapsibleAreaComponent, - template: FdScrollCollapsibleAreaTemplates, - metadata: ScrollCollapsibleAreaSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/property/property-config.ts deleted file mode 100644 index 11b64b48660069bcd7d1bc259c87b23c251fa070..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/property/property-config.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - -export class ScrollCollapsibleAreaProp extends ContainerUsualProp { - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'expanded', - propertyName: '是否展开', - propertyType: 'unity', - description: '运行时组件是否默认展开', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'custom', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'contentTemplate', - propertyName: '内容区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - description: '配置内容区域模板后,将隐藏子级控件。' - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/schema/schema.ts deleted file mode 100644 index a60f9ca0eb0f1944bb6ba69b705fa3291e8f7ba2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/schema/schema.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const ScrollCollapsibleAreaSchema = { - id: 'scroll-collapsible-area', - type: 'ScrollCollapsibleArea', - appearance: null, - visible: true, - contentTemplate: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/form.ts deleted file mode 100644 index a4a383cd7c4054ea33422ba6d697b01f5406729e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/form.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default (ctx: any) => { - // 如果有模板,就优先显示,如果没有就显示拖拽容器 - let contentStr = ''; - if (ctx.component.contentTemplate) { - contentStr = ctx.component.contentTemplate; - } else { - contentStr = `
    - ${ctx.children} -
    `; - } - // 样式 - let collapseCls = ctx.collapseState ? 'f-state-collapse' : 'f-state-expand'; - return `
    -
    -
    - ${contentStr} -
    -
    -
    - -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/scroll-collapsible-area/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar-item.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar-item.ts deleted file mode 100644 index b4a2c47cac67d18824adbfa8b0a8c7d43520f9d1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar-item.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { DomService } from '@farris/designer-services'; -import { SectionToolbarItemSchema } from './../schema/schema'; -import FdToolBarItemComponent from '../../../command/toolbar/component/toolbaritem/component/fd-toolbar-item'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { SectionToolbarItemProp } from '../property/toolbar-item-property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; - -export default class FdSectionToolBarItemComponent extends FdToolBarItemComponent { - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = ''; - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componnentId; - } - getDefaultSchema() { - return SectionToolbarItemSchema; - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop = new SectionToolbarItemProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.viewModelId, this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - this.parent.onPropertyChanged(changeObject); - } - - /** - * 设置section按钮的展示名称和路径,用于交互面板已绑定事件的窗口 - */ - setComponentBasicInfoMap() { - if (!this.component) { - return; - } - const btnTitle = this.component['title']; - let sectionTitle = ''; - const domService = this.options.designerHost.getService('DomService') as DomService; - - const section = this.parent && this.parent.parent; - if (section && section.type === DgControl.Section.type && section.component) { - sectionTitle = section.component.mainTitle; - } - domService.controlBasicInfoMap.set(this.component.id, { - showName: btnTitle, - parentPathName: sectionTitle ? `${sectionTitle} > ${btnTitle}` : btnTitle - }); - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar.ts deleted file mode 100644 index c387f7481eedddc8ec0a888bf81307411a2d868c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section-toolbar.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FdTabToolBarComponent from '../../tab/component/fd-tab-toolbar'; -// import { NoCodeSectionToolBarProp } from '../property/nocode-toolbar-property-config'; -import { SectionToolBarProp } from '../property/toolbar-property-config'; -import { SectionToolbarItemSchema, SectionToolbarSchema } from '../schema/schema'; -import FdSectionToolBarItemComponent from './fd-section-toolbar-item'; -export default class FdSectionToolBarComponent extends FdTabToolBarComponent { - /** 按钮对齐方式 */ - justifyContentEnd = true; - envType: DesignerEnvType; - - constructor(component: any, options: any) { - super(component, options); - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - if (this.envType !== DesignerEnvType.noCode) { - this.customToolbarConfigs = [ - { - id: 'appendItem', - title: '新增按钮', - icon: 'f-icon f-icon-plus-circle text-white', - click: (e) => { - e.stopPropagation(); - this.appendItem(SectionToolbarItemSchema); - } - } - ]; - } - } - - getDefaultSchema(): any { - return SectionToolbarSchema; - } - - getStyles(): string { - return 'flex-grow: 1; width: 100%; position: relative'; - } - - /** - * Section内部的toolbar不能移动 - */ - checkCanMoveComponent(): boolean { - return false; - } - /** - * Section内部的toolbar不能删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - init(): void { - // 初始化方法 - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = this.items.map(item => { - // this.createComponent(item, this.options, null); - this.toolBarItem = new FdSectionToolBarItemComponent(item, options); - return this.toolBarItem; - }); - - this.justifyContentEnd = this.component['position'] === 'inHead'; - } - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - this.addEventListener(this.element, 'click', (event) => { - event.stopPropagation(); - // 手动触发点击组件事件 展示属性面板 - this.parent.emit('componentClicked', { - componentInstance: this - }); - if (this.type === 'SectionToolbar') { - this.parent.isToolbarSelected = true; - } - }); - - setTimeout(() => { - // 增加判断条件:当前页面上没有选中toolbar外的控件时,才触发按钮的点击。场景是先选中子表弹出编辑区域内的headertoolbar按钮,再选中父级tabPage,若没有这个判断,则焦点不能转移到TabPage上 - if (document.getElementsByClassName('dgComponentSelected').length === 0 && this.parent.isToolbarSelected) { - this.element.click(); - } - }); - return superAttach; - } - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - // if (this.envType === DesignerEnvType.noCode) { - // const prop = new NoCodeSectionToolBarProp(serviceHost, this.viewModelId, this.componentId); - // const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - // return propertyConfig; - // } else { - const prop = new SectionToolBarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - // } - - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - switch (changeObject.propertyID) { - case 'title': case 'class': case 'disable': { - this.triggerRedraw(); - break; - } - case 'position': case 'contents': { - this.parent.triggerRedraw(); - } - } - } - - confirmRemoveToolbarItem(id: string) { - super.confirmRemoveToolbarItem(id); - - // 触发section的重绘,因为需要显示section添加按钮的图标 - if (this.items.length === 0) { - this.parent.redraw(); - } - } - - /** - * 取消点击输入控件后,移除标签区域的编辑特性 - */ - afterComponentCancelClicked(e?: PointerEvent): void { - this.parent.isToolbarSelected = false; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section.ts deleted file mode 100644 index 952046b6474a33adfca04ae98d48a8efbe6efeb7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/component/fd-section.ts +++ /dev/null @@ -1,469 +0,0 @@ -import { SectionSchema, SectionToolbarItemSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { SectionProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { SectionContextMenuManager } from '../context-menu/context-menu.manager'; -import { RowNode } from '@farris/ui-treetable'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdSectionToolBarComponent from './fd-section-toolbar'; -import { BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormComponentType, DomService, SchemaService, DesignerEnvType } from '@farris/designer-services'; -import { FieldManagerComponent } from '@farris/designer-devkit'; -import { SectionDragDropManager } from '../drag-drop/dragAndDrapManager'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { ContentContainerSchema } from '../../content-container/schema/schema'; -import { cloneDeep } from 'lodash-es'; - -export default class FdSectionComponent extends FdContainerBaseComponent { - // 标记当前展开状态 - expandStatus: boolean; - - // 当前选中的项 - activeTypeItem; - - // 查找ref=form的项 - private formParent = null; - private multiViewContainerEl = null; - toolBarComponent: FdSectionToolBarComponent; - - // 标识当前viewChangeKey - get viewChangeKey(): string { - if (this.component.multiViews && this.component.views) { - return this.component.views.viewGroupIdentify; - } - return `viewChange-${this.key}`; - } - // 标识当前的点击按钮 - get collapseKey(): string { - return `SectionCollapse-${this.key}`; - } - - /** 判断当前section是否是模板中预置的层级,这种section不支持移动、不支持删除 */ - private isInFixedContextRules: boolean; - - private dragManager: SectionDragDropManager; - - /** 当前是否选中工具栏 */ - isToolbarSelected = false; - - constructor(component: any, options: any) { - super(component, options); - this.customToolbarConfigs = []; - - this.dragManager = new SectionDragDropManager(this); - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - - } - /** - * 从工具箱拖拽生成的不是Section,而是Container-Section两层结构 - */ - static getMetadataInControlBox(targetComponentInstance: FarrisDesignBaseComponent) { - const radomNum = Math.random().toString().slice(2, 6); - - const sectionSchema = cloneDeep(SectionSchema); - Object.assign(sectionSchema, { - id: `section_${radomNum}`, - appearance: { - class: 'f-section-in-mainsubcard' - }, - enableAccordion: false - }); - - const containerSchema = cloneDeep(ContentContainerSchema); - Object.assign(containerSchema, { - id: `container_${radomNum}`, - appearance: { - class: 'f-struct-wrapper' - }, - contents: [sectionSchema] - }); - - - // 判断拖拽的目标容器 - const targetComponentSchema = targetComponentInstance.component; - const targetComponentClassName = (targetComponentSchema && targetComponentSchema.appearance && targetComponentSchema.appearance.class) || ''; - switch (targetComponentSchema && targetComponentSchema.type) { - case DgControl.ContentContainer.type: { - // 卡片模板:判断子表是否需要设置为填充 - if (targetComponentSchema.isLikeCardContainer && targetComponentClassName.includes('f-struct-like-card-child-fill')) { - containerSchema.appearance.class += ' f-struct-wrapper-child'; - sectionSchema.fill = true; - } - break; - } - case DgControl.Splitter.type: { - // 左列右卡的模板:修改容器样式 - sectionSchema.appearance.class = 'f-section-in-main'; - - // 左列右卡的模板:判断子表是否需要设置为填充 - const targetSplitterPane = targetComponentInstance.element.querySelector('.f-component-splitter-pane.f-page-child-fill.drag-over'); - if (targetSplitterPane) { - containerSchema.appearance.class += ' f-struct-wrapper-child'; - sectionSchema.fill = true; - } - break; - } - - } - return containerSchema; - } - - getDefaultSchema(): any { - return SectionSchema; - } - - getTemplateName(): string { - return 'Section'; - } - // css中 :host 部分 - getStyles(): string { - return 'display: inherit;'; - } - /** - * 为适配多视图的切换,在Component中增加viewChagne属性 - */ - getComponentAttributes() { - if (this.component.multiViews && this.component.views) { - return { - viewchange: this.component.views.viewGroupIdentify - }; - } - - } - // 初始化 - init(): void { - this.expandStatus = this.component.expanded; - super.init(); - } - - /** - * viewChange赋值 - */ - private getActiveTypeItem() { - if (this.component.multiViews && this.component.views) { - this.activeTypeItem = OperateUtils.viewChangeInitActiveItem(this.component.views.currentTypeInDesignerView || this.component.views.defaultType, this.activeTypeItem, this.component.views.toolbarData); - } - } - // 渲染模板 - render(children): any { - this.isInFixedContextRules = this.dragManager.checkIsInFixedContextRules(); - - this.initToolbar(); - this.getActiveTypeItem(); - - return super.render(children || this.renderTemplate('Section', { - // 展开收起状态 - expandStatus: this.expandStatus, - toolBarComponent: this.toolBarComponent, - viewChangeKey: this.viewChangeKey, - getViewChangeStr: () => this.getViewChangeStr(), - collapseKey: this.collapseKey, - children: this.renderComponents(), - nestedKey: this.nestedKey - })); - } - - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.collapseKey]: 'single', - [this.viewChangeKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - - // 注册収折按钮 - const collapseEl = this.refs[this.collapseKey]; - if (collapseEl) { - this.addEventListener(collapseEl, 'click', (event) => { - event.stopPropagation(); - this.expandStatus = !this.expandStatus; - this.redraw(); - - // 收折后涉及到了界面高度的变化,所以需要重新计算页面上控件操作图标的位置 - this.setPositionOfSelectedComponentBtnGroup(); - }); - } - // 多视图 - if (this.component.multiViews && this.component.views) { - // 绑定 - if (this.component.views.viewType === 'tile') { - OperateUtils.bindTileEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.component.views.toolbarData, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl(); - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.component.views.currentTypeInDesignerView = this.activeTypeItem['type']; - // 通过DOM操作更新viewchange - OperateUtils.updateTileByActiveType('tile', this.activeTypeItem, this.refs[this.viewChangeKey]); - }); - - } else if (this.component.views.viewType === 'dropdown') { - OperateUtils.bindDropdownEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.component.views.toolbarData, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl(); - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.component.views.currentTypeInDesignerView = this.activeTypeItem['type']; - // 通过DOM操作更新viewchange - OperateUtils.updateTileByActiveType('dropdown', this.activeTypeItem, this.refs[this.viewChangeKey]); - }); - } - } - - // 工具栏按钮绑定事件 - const toolBarEle = element.querySelector('.farris-component-SectionToolbar'); - if (toolBarEle && this.toolBarComponent) { - this.toolBarComponent.attach(toolBarEle); - } - // 必写 - return superAttach; - } - - /** - * 组装属性面板配置数据 - * @returns ElementPropertyConfig[] - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - // if (this.envType === DesignerEnvType.noCode) { - // const prop: NoCodeSectionProp = new NoCodeSectionProp(serviceHost, this.viewModelId, this.componentId); - // const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - // return propertyConfig; - // } else { - const prop: SectionProp = new SectionProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - // } - } - - /** - * 属性变更后事件 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs: string[]): void { - // 调整工具栏位置后需要修改工具栏的样式属性 - if (changeObject.propertyID === 'position' && this.component.toolbar && this.toolBarComponent) { - this.toolBarComponent.justifyContentEnd = changeObject.propertyValue === 'inHead'; - } - - // 若不显示头部区域,需要把展开属性设置为true,否则整个section都显示不出来了 - if (changeObject.propertyID === 'showHeader' && !changeObject.propertyValue) { - this.expandStatus = true; - } - - // 除收折模式和被滚动跟随的节点 属性外,都需要检测变更 - const notApplyPropertyIDs = ['visible', 'accordionMode', 'isScrollSpyItem']; - - if (!notApplyPropertyIDs.includes(changeObject.propertyID)) { - this.triggerRedraw(); - } - - } - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new SectionContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - /** - * 查找multiViewContainerEl - */ - private findMultiViewContainerEl() { - if (this.multiViewContainerEl) { - return; - } - if (!this.formParent) { - this.formParent = OperateUtils.getFormParent(this.element); - } - if (this.formParent && !this.multiViewContainerEl) { - // 查找同组的元素 - this.multiViewContainerEl = this.formParent.querySelector('.farris-component-MultiViewContainer[viewchange=' + this.component.views.viewGroupIdentify + ']'); - } - } - /** - * 获取view chagne的字符串 - */ - getViewChangeStr() { - if (!this.component.multiViews) { - return ''; - } - return OperateUtils.getViewChangeStr(this.component.views.toolbarData, this.component.views.viewType, this.activeTypeItem); - } - - /** - * 判断在可视化区域中是否隐藏容器间距和线条 - */ - hideNestedPaddingInDesginerView() { - - if (this.isInFixedContextRules) { - return true; - } - return false; - - } - - checkCanMoveComponent(): boolean { - return !this.isInFixedContextRules; - } - - checkCanDeleteComponent(): boolean { - return !this.isInFixedContextRules; - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - const result = super.canAccepts(sourceElement, targetElement); - if (!result) { - return false; - } - return this.dragManager.canAccepts(); - - } - /** - * 初始化工具栏 - */ - private initToolbar() { - const toolbar = this.component.toolbar; - const options = Object.assign({}, this.options, { parent: this }); - this.customToolbarConfigs.length = 0; - - this.addFieldManagerIcon(); - - // 工具栏存在 - if (toolbar && toolbar.contents.length) { - this.toolBarComponent = new FdSectionToolBarComponent(this.component.toolbar, options); - this.toolBarComponent.init(); - this.toolBarComponent.justifyContentEnd = toolbar.position === 'inHead'; - return; - } - - // 工具栏不存在。若显示头部区域并且表单有状态机且section的子级是DataGrid/Table/MultiViewContainer,且section没有配置过带按钮的头部扩展区域模板,section才支持启用按钮 - const domService = this.options.designerHost.getService('DomService') as DomService; - const stateMachines = domService.module.stateMachines; - if (!stateMachines || stateMachines.length === 0 || !this.component.showHeader) { - return; - } - - if (this.component.extendedHeaderAreaTemplate && this.component.extendedHeaderAreaTemplate.includes(' { - if (item.type === DgControl.Table.type || item.type === DgControl.MultiViewContainer.type) { - return true; - } - if (item.type === DgControl.ComponentRef.type) { - const childCmp = domService.getComponentById(childContents[0].component); - if (childCmp && childCmp.componentType === FormComponentType.dataGrid) { - return true; - } - } - return false; - }); - if (result) { - this.customToolbarConfigs.push({ - id: 'appendToolbar', - title: '新增工具栏', - icon: 'f-icon f-icon-plus-circle text-white', - click: (e) => { - e.stopPropagation(); - this.toolBarComponent = new FdSectionToolBarComponent(this.component.toolbar, options); - this.toolBarComponent.appendItem(SectionToolbarItemSchema); - this.addStateMachineToViewModel(); - this.toolBarComponent.parent.redraw(); - } - } - ); - - } - - } - /** - * 新增工具栏后,需要将状态机信息增加到Section所属的视图模型中,不然运行时状态机不起作用 - */ - private addStateMachineToViewModel() { - const domService = this.options.designerHost.getService('DomService'); - const viewModel = domService.getViewModelById(this.viewModelId); - if (!viewModel.stateMachine) { - viewModel.stateMachine = domService.module.stateMachines[0].id; - - } - } - /** - * Section下若存放form控件,则增加一个字段维护的图标 - */ - private addFieldManagerIcon() { - const childContents = this.component.contents || []; - if (childContents.length !== 1) { - return; - } - // 定位Form控件 - const formComponent = childContents[0] || {}; - if (formComponent.type !== DgControl.Form.type) { - return; - } - // Form内不能包含Table - const tableChild = formComponent.contents && formComponent.contents.length && formComponent.contents.find(c => c.type === DgControl.Table.type); - if (tableChild) { - return; - } - this.customToolbarConfigs.push( - { - id: 'fieldManager', - title: '字段维护', - icon: 'f-icon f-icon-home-setup', - click: (e) => { - e.stopPropagation(); - this.showFieldManager(); - } - } - ); - } - - /** - * 弹出字段维护窗口 - */ - private showFieldManager() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - - const compFactory = resolver.resolveComponentFactory(FieldManagerComponent); - const compRef = compFactory.create(injector); - const modalConfig = { - title: '维护控件', - width: 950, - height: 600, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.viewModelId = this.viewModelId; - compRef.instance.formId = this.component.id; - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.confirmModal.subscribe((data) => { - const { addedFields, deletedFieldIds } = data; - if (deletedFieldIds && deletedFieldIds.length) { - schemaService.removeSchemaField(deletedFieldIds); - } - modalPanel.close(); - }); - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu-config.ts deleted file mode 100644 index bc60af7b57ef05a69c750a6e3435167b48374b16..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu-config.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const contextMenu = [ - { - id: 'changeToTab', - title: '切换为标签页' - }, - { - id: 'moveToTab', - title: '移动至标签页' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu.manager.ts deleted file mode 100644 index 9942643e1267ed09a040577455842aa7bad8a4c8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,289 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { ComponentSchema, IControlService } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; -import { MessagerService } from '@farris/ui-messager'; -import { ControlService } from '../../../../service/control.service'; - -const CHANGE_TO_TAB = 'changeToTab'; -const MOVE_TO_TAB = 'moveToTab'; - -export class SectionContextMenuManager extends ContextMenuManager { - - private controlService: IControlService; - private msgService: MessagerService; - - constructor(cmp: FdContainerBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.controlService = this.injector.get(ControlService); - this.msgService = this.injector.get(MessagerService); - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - menuConfig = this.assembleChangeToTabMenu(this.cmpInstance.component, menuConfig); - - menuConfig = this.assembleMoveToTabMenu(this.cmpInstance.component, menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig || []; - } - - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - if (menu.id === CHANGE_TO_TAB) { - this.changeToTab(this.cmpInstance.component); - return; - } - if (menu.parentMenuId === MOVE_TO_TAB) { - this.moveToTab(this.cmpInstance.component, menu.id); - return; - } - - this.notifyService.warning('暂不支持'); - } - - /** - * 组装是否支持切换为标签页Tab的菜单 - * @param dgSectionElement 当前标签页节点 - * @param menuConfig 右键菜单 - */ - private assembleChangeToTabMenu(sectionElement: ComponentSchema, menuConfig: ControlContextMenuItem[]) { - - const changeToTabMenu = menuConfig.find(menu => menu.id === CHANGE_TO_TAB); - if (!changeToTabMenu) { - return menuConfig; - } - - const checkResult = this.checkCanChangeToTab(sectionElement, changeToTabMenu.title); - if (checkResult) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_TAB); - } - return menuConfig; - - } - - private checkCanChangeToTab(sectionElement: ComponentSchema, menuName: string) { - - // 1、限制section的class样式 - const sectionClass = sectionElement.appearance && sectionElement.appearance.class; - if (!sectionClass || !(sectionClass.includes('f-section-in-mainsubcard') || sectionClass.includes('f-section-in-main'))) { - return '分组面板的class样式不包含f-section-in-mainsubcard或f-section-in-main,不支持' + menuName; - } - - // 2、标准模板规定container-section-tab 是成对出现三层结构,转换后的section结构也是container-section - const dgContainerElement = this.cmpInstance.parent.component; - if (!dgContainerElement || dgContainerElement.type !== DgControl.ContentContainer.type) { - return '分组面板的父级不是ConentContainer容器,不支持' + menuName; - } - - // 3、限制父级container样式 - if (!dgContainerElement.appearance || !dgContainerElement.appearance.class || !dgContainerElement.appearance.class.includes('f-struct-wrapper')) { - return 'ContentContainer容器的class样式不包含f-struct-wrapper,不支持' + menuName; - } - - // 4、子级中已有标签页节点,则不支持切换标签页 - const tabElement = sectionElement.contents.find(item => item.type === DgControl.Tab.type); - if (tabElement) { - return '分组面板的子级已有标签页节点,不支持' + menuName; - } - - return; - } - - /** - * Section切换为Tab。 - * Container-Section-ComponentRef 切换为Contaienr-Section-Tab-TabPage-ComponentRef - * @param dgSectionElement section元素 - */ - private changeToTab(sectionElement: ComponentSchema) { - this.msgService.question('面板切换为标签页后,将仅保留主标题、按钮属性,确定切换?', () => { - - const idPostfix = this.getControlIdPostfix(sectionElement); - - // 新建tab - const tabMetadata = this.controlService.getControlMetaData(DgControl.Tab.type); - tabMetadata.id = 'detail-tab-' + idPostfix; // 可能会重复? - - // 新建tabPage - const tabPage = this.controlService.getControlMetaData(DgControl.TabPage.type); - tabPage.id = 'tab-page-' + idPostfix; - tabPage.title = sectionElement.mainTitle; - tabPage.contents = sectionElement.contents; - tabPage.multiViews = sectionElement.multiViews; - tabPage.views = sectionElement.views; - - // 配置tabPage按钮 - if (sectionElement.toolbar && sectionElement.toolbar.contents && sectionElement.toolbar.contents.length) { - tabPage.toolbar.id = 'tabToolbar-' + idPostfix; - tabPage.toolbar.position = sectionElement.toolbar.position; - - sectionElement.toolbar.contents.forEach(sectionToolbarItem => { - sectionToolbarItem.type = DgControl.TabToolbarItem.type; - tabPage.toolbar.contents.push(sectionToolbarItem); - }); - sectionElement.toolbar.contents = []; - } - - tabMetadata.contents = [tabPage]; - tabMetadata.selected = tabPage.id; - - // tab样式要根据section的样式来区分 - const sectionClassArray = sectionElement.appearance.class.split(' '); - if (sectionClassArray.includes('f-section-in-mainsubcard')) { - tabMetadata.appearance = { - class: 'f-component-tabs f-tabs-has-grid' - }; - } - if (sectionClassArray.includes('f-section-in-main')) { - tabMetadata.appearance = { - class: 'f-component-tabs' - }; - } - - - // 变更原section样式、头部、内容区 - if (!sectionClassArray.includes('f-section-tabs')) { - sectionElement.appearance.class = 'f-section-tabs ' + sectionElement.appearance.class; - } - sectionElement.showHeader = false; - sectionElement.mainTitle = ''; - sectionElement.contents = [tabMetadata]; - - - - this.notifyService.success('切换成功'); - - // this.formService.closePropertyPanel.next(); - this.refreshFormService.refreshFormDesigner.next(); - - }); - - } - - - /** - * 组装是否支持移动至Tab的菜单 - * @param dgSectionElement 当前标签页节点 - * @param menuConfig 右键菜单 - */ - assembleMoveToTabMenu(sectionElement: ComponentSchema, menuConfig: ControlContextMenuItem[]) { - - const moveToTabMenu = menuConfig.find(menu => menu.id === MOVE_TO_TAB); - if (!moveToTabMenu) { - return menuConfig; - } - - const checkResult = this.checkCanChangeToTab(sectionElement, moveToTabMenu.title); - if (checkResult) { - menuConfig = menuConfig.filter(menu => menu.id !== MOVE_TO_TAB); - return menuConfig; - } - - // 校验父容器container的同级中有没有Container--->Tab 的层级结构 - const grandParentContaienr = this.cmpInstance.parent.parent.component; - - moveToTabMenu.children = []; - grandParentContaienr.contents.forEach(container => { - if (container.type !== DgControl.ContentContainer.type) { - return; - } - const tabNode = this.domService.selectNode(container, item => item.type === DgControl.Tab.type); - if (tabNode) { - moveToTabMenu.children.push({ - id: tabNode.id, - title: tabNode.id - }); - } - }); - - if (moveToTabMenu.children.length === 0) { - menuConfig = menuConfig.filter(menu => menu.id !== MOVE_TO_TAB); - } - - return menuConfig; - - } - - /** - * section移动至标签页 - * Container-Section-ComponentRef 切换为TabPage-ComponentRef - * @param dgSectionElement section元素 - * @param targetTabId 目标标签页id - */ - moveToTab(sectionElement: ComponentSchema, targetTabId: string) { - this.msgService.question('面板移动至标签页后,将仅保留主标题、按钮属性,确定切换?', () => { - const tabElement = this.domService.domDgMap.get(targetTabId); - - const idPostfix = this.getControlIdPostfix(sectionElement); - - // 新建tabPage - const tabPageMetadata = this.controlService.getControlMetaData(DgControl.TabPage.type); - tabPageMetadata.id = 'tab-page-' + idPostfix; - tabPageMetadata.title = sectionElement.mainTitle; - tabPageMetadata.contents = sectionElement.contents; - tabPageMetadata.multiViews = sectionElement.multiViews; - tabPageMetadata.views = sectionElement.views; - - // 配置tabPage按钮 - if (sectionElement.toolbar && sectionElement.toolbar.contents && sectionElement.toolbar.contents.length) { - tabPageMetadata.toolbar.id = 'tabToolbar-' + idPostfix; - tabPageMetadata.toolbar.position = sectionElement.toolbar.position; - - sectionElement.toolbar.contents.forEach(sectionToolbarItem => { - sectionToolbarItem.type = DgControl.TabToolbarItem.type; - tabPageMetadata.toolbar.contents.push(sectionToolbarItem); - }); - sectionElement.toolbar.contents = []; - } - - tabElement.contents.push(tabPageMetadata); - - // 移除section的父容器 - const grandParentContaienr = this.cmpInstance.parent.parent.component; - grandParentContaienr.contents = grandParentContaienr.contents.filter(c => c.id !== this.cmpInstance.parent.id); - - - this.notifyService.success('移动成功'); - - // 因为当前section已经被移除,所以需要清除属性面板的数据 - this.cmpInstance.emit('clearPropertyPanel'); - - this.refreshFormService.refreshFormDesigner.next(); - }); - - } - /** - * 根据section的上下文获取新建控件的id后缀 - * @param sectionElement section元素 - */ - private getControlIdPostfix(sectionElement: any) { - let idPostfix = Math.random().toString(36).substr(2, 4); - const componentRef = sectionElement.contents.find(c => c.type === DgControl.ComponentRef.type); - if (componentRef) { - idPostfix = componentRef.id.replace('-component-ref', ''); - } - const multiViewContainer = sectionElement.contents.find(c => c.type === DgControl.MultiViewContainer.type); - if (multiViewContainer) { - idPostfix = multiViewContainer.dataSource + '-' + idPostfix; - } - - return idPostfix; - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/drag-drop/dragAndDrapManager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/drag-drop/dragAndDrapManager.ts deleted file mode 100644 index 975b12c3eb5db1f518d63e179ac55c11e3fafe3d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/drag-drop/dragAndDrapManager.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { DgControl } from '../../../../utils/dg-control'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; - -export class SectionDragDropManager { - - private cmpInstance: FdContainerBaseComponent; - - - private canAcceptChildContent = true; - - constructor(cmpInstance: FdContainerBaseComponent) { - this.cmpInstance = cmpInstance; - } - /** - * 判断是否可以接收拖拽新增的子级控件 - */ - canAccepts(): boolean { - - if (!this.canAcceptChildContent) { - return false; - } - return true; - } - - /** - * 判断当前容器是否是固定的上下文的中间层级 - */ - checkIsInFixedContextRules() { - const component = this.cmpInstance.component; - // 控件本身样式 - const cmpClass = component.appearance && component.appearance.class || ''; - const cmpClassList = cmpClass ? cmpClass.split(' ') : []; - - // 子级节点 - const childContents = component.contents || []; - const firstChildContent = childContents.length ? childContents[0] : null; - const firstChildClass = (firstChildContent && firstChildContent.appearance && firstChildContent.appearance.class) || ''; - const firstChildClassList = firstChildClass ? firstChildClass.split(' ') : []; - - // 父级节点 - const parent = this.cmpInstance.parent && this.cmpInstance.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、卡片区域的section:Component-Section-Form三层结构 - if (cmpClassList.includes('f-section-form') && parent.type === DgControl.Component.type && firstChildClassList.includes('f-form-layout')) { - this.canAcceptChildContent = false; - return true; - } - - // 2、子表区域tab外的section间距 - if (cmpClassList.includes('f-section-tabs') && parentClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-component-tabs')) { - this.canAcceptChildContent = false; - return true; - } - // 3、隐藏DataGrid父级section间距、隐藏带筛选条的DataGrid父级Section间距 - if (cmpClassList.includes('f-section-grid') && parentClassList.includes('f-struct-wrapper') && (firstChildClassList.includes('f-component-grid') || firstChildClassList.includes('f-filter-container'))) { - this.canAcceptChildContent = false; - return true; - } - // 4、隐藏TreeGrid父级section间距 - if (cmpClassList.includes('f-section-treegrid') && parentClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-component-treetable')) { - this.canAcceptChildContent = false; - return true; - } - // 5、带导航的表格类填报模板:内部为form-table 时,隐藏间距 - if (cmpClassList.includes('f-section-oa-table') && parentClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-form-is-table')) { - this.canAcceptChildContent = false; - return true; - } - // 6、卡片类表格模板:内部为form-table 时,隐藏间距 - if (cmpClassList.includes('f-section-card-table') && parentClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-form-is-table')) { - this.canAcceptChildContent = false; - return true; - } - // 7、筛选方案的外层Section - if (cmpClassList.includes('f-section-scheme') && firstChildContent && firstChildContent.type === DgControl.QueryScheme.type) { - this.canAcceptChildContent = false; - return true; - } - // 8、section类子表:container-section-component - if ((cmpClassList.includes('f-section-in-main') || cmpClassList.includes('f-section-in-mainsubcard')) && - parentClassList.includes('f-struct-wrapper') && firstChildContent && firstChildContent.type === DgControl.ComponentRef.type) { - this.canAcceptChildContent = false; - return true; - } - // 7、section类附件:component-section-FileUploadPreview - if ((cmpClassList.includes('f-section-in-main') || cmpClassList.includes('f-section-in-mainsubcard')) && - parentClassList.includes('f-struct-wrapper') && firstChildContent && firstChildContent.type === DgControl.FileUploadPreview.type) { - this.canAcceptChildContent = false; - return true; - } - // 审批类 - if (firstChildContent && (firstChildContent.type === DgControl.ApprovalComments.type || firstChildContent.type === DgControl.ApprovalLogs.type)) { - this.canAcceptChildContent = false; - return false; - } - // 3、隐藏预约日历父级section间距 - if (cmpClassList.includes('f-section-grid') && parentClassList.includes('f-struct-wrapper') && firstChildClassList.includes('f-component-appointment-calendar')) { - this.canAcceptChildContent = false; - return true; - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/export.ts deleted file mode 100644 index 2216e8ef6a2b9c9616a04610a735b87a7a4aa0db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/export.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdSectionComponent from './component/fd-section'; -import { SectionSchema, SectionToolbarItemSchema, SectionToolbarSchema } from './schema/schema'; - -import FdSectionTemplates from './templates'; -import FdSectionToolBarTemplate from '../../command/toolbar/templates/form'; -import FdSectionToolBarItemTemplate from '../../command/toolbar/component/toolbaritem/templates/form'; - -export const Section: ComponentExportEntity = { - type: 'Section', - component: FdSectionComponent, - template: FdSectionTemplates, - metadata: SectionSchema -}; - -export const SectionToolbar: ComponentExportEntity = { - type: 'SectionToolbar', - metadata: SectionToolbarSchema, - template: { form: FdSectionToolBarTemplate } -}; - -export const SectionToolbarItem: ComponentExportEntity = { - type: 'SectionToolbarItem', - metadata: SectionToolbarItemSchema, - template: { form: FdSectionToolBarItemTemplate } -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/property/property-config.ts deleted file mode 100644 index a674471c3bc66bf3fe73438574cdf29642393203..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/property-config.ts +++ /dev/null @@ -1,405 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; - - -export class SectionProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 模板属性 - const templatePropConfig = this.getTemplatePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(templatePropConfig); - - // 扩展属性 - const extendPropConfig = this.getExtendPropConfig(); - this.propertyConfig.push(extendPropConfig); - - // 多视图属性 - const multiViewPropConfig = this.getMultiViewPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(multiViewPropConfig); - - return this.propertyConfig; - - } - - - private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - - // section下是Form节点,才允许启用自定义收折 - let hasFormElement = false; - const sectionElement = this.domService.domDgMap.get(propertyData.id); - hasFormElement = sectionElement && sectionElement.contents && sectionElement.contents.find(c => c.type === DgControl.Form.type); - - let advProperties: PropertyEntity[] = []; - - const commonProps = this.getCommonAppearanceProperties(); - advProperties = advProperties.concat(commonProps); - advProperties.push( - { - propertyID: 'fill', - propertyName: '填充', - propertyType: 'boolean', - description: 'flex布局下,填充满剩余部分', - detail: 'https://igix.inspures.com/igixword/main.html#section' - }, - { - propertyID: 'expanded', - propertyName: '展开', - propertyType: 'boolean', - description: '是否展开', - }, - { - propertyID: 'showHeader', - propertyName: '显示头部区域', - propertyType: 'boolean', - description: '是否显示头部区域', - detail: 'https://igix.inspures.com/igixword/main.html#section', - refreshPanelAfterChanged: true - }, - { - propertyID: 'mainTitle', - propertyName: '主标题', - propertyType: 'string', - description: '主标题名称', - group: 'header' - }, - { - propertyID: 'subTitle', - propertyName: '副标题', - propertyType: 'string', - description: '副标题名称', - group: 'header' - }, - { - propertyID: 'enableMaximize', - propertyName: '显示最大化', - propertyType: 'boolean', - description: '是否显示最大化', - group: 'header' - }, - { - propertyID: 'enableAccordion', - propertyName: '启用收折功能', - propertyType: 'boolean', - description: '是否启用收折功能', - group: 'header' - }, - { - propertyID: 'accordionMode', - propertyName: '收折模式', - propertyType: 'select', - description: '收折模式选择', - iterator: [{ key: 'default', value: '默认收折' }, { key: 'custom', value: '自定义收折' }], - group: 'header' - }); - - advProperties.map(p => { - if (p.group === 'header') { - p.visible = propertyData.showHeader; - } - if (p.propertyID === 'accordionMode') { - p.visible = propertyData.showHeader && propertyData.enableAccordion === true && hasFormElement; - } - }); - const self = this; - return { - categoryId: 'appearance', - categoryName: '外观', - properties: advProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.group === 'header') { - p.visible = changeObject.propertyValue; - } - if (p.propertyID === 'accordionMode') { - p.visible = changeObject.propertyValue && propertyData.enableAccordion === true && hasFormElement; - } - }); - - const templateCategory = self.propertyConfig.find(cat => cat.categoryId === 'template'); - if (templateCategory) { - templateCategory.hide = !changeObject.propertyValue; - } - - const multiViewCategory = self.propertyConfig.find(cat => cat.categoryId === 'multiView'); - if (multiViewCategory) { - const multiViewToolbarData = propertyData.views && propertyData.views.toolbarData && propertyData.views.toolbarData; - multiViewCategory.hide = !(changeObject.propertyValue && multiViewToolbarData && multiViewToolbarData.length > 0); - } - break; - } - case 'enableAccordion': { - this.properties.map(p => { - if (p.propertyID === 'accordionMode') { - p.visible = changeObject.propertyValue && hasFormElement; - } - }); - break; - } - case 'mainTitle': { - changeObject.needUpdateControlTreeNodeName = true; - } - } - } - }; - - } - - private getTemplatePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'template', - categoryName: '头部区域模板', - hide: !propertyData.showHeader, - properties: [ - { - propertyID: 'titleTemplate', - propertyName: '标题模板', - propertyType: 'modal', - description: '标题模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'titleClass', - propertyName: '标题样式', - propertyType: 'string', - description: '标题样式设置', - visible: propertyData.titleTemplate - }, - { - propertyID: 'headerTemplate', - propertyName: '头部模板', - propertyType: 'modal', - description: '头部模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'headerClass', - propertyName: '头部样式', - propertyType: 'string', - description: '头部样式设置', - visible: propertyData.headerTemplate - }, - { - propertyID: 'extendedHeaderAreaTemplate', - propertyName: '头部扩展区域模板', - propertyType: 'modal', - description: '头部扩展区域模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'extendedHeaderAreaClass', - propertyName: '头部扩展区域样式', - propertyType: 'string', - description: '头部扩展区域样式设置', - visible: propertyData.extendedHeaderAreaTemplate - }, - { - propertyID: 'toolbarTemplate', - propertyName: '工具栏模板', - propertyType: 'modal', - description: '工具栏模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'toolbarClass', - propertyName: '工具栏样式', - propertyType: 'string', - description: '工具栏样式设置', - visible: propertyData.toolbarTemplate - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'titleTemplate': { - const titleClass = this.properties.find(p => p.propertyID === 'titleClass'); - if (titleClass) { - titleClass.visible = changeObject.propertyValue; - } - break; - } - case 'headerTemplate': { - const headerClass = this.properties.find(p => p.propertyID === 'headerClass'); - if (headerClass) { - headerClass.visible = changeObject.propertyValue; - } - break; - } - case 'extendedHeaderAreaTemplate': { - const extendedHeaderAreaClass = this.properties.find(p => p.propertyID === 'extendedHeaderAreaClass'); - if (extendedHeaderAreaClass) { - extendedHeaderAreaClass.visible = changeObject.propertyValue; - } - break; - } - case 'toolbarTemplate': { - const toolbarClass = this.properties.find(p => p.propertyID === 'toolbarClass'); - if (toolbarClass) { - toolbarClass.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getMultiViewPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // section的多视图个数不是由section本身配置的,所以【显示多视图按钮】属性需要根据当前有没有视图来判断 - const multiViewToolbarData = propertyData.views && propertyData.views.toolbarData && propertyData.views.toolbarData; - return { - categoryId: 'multiView', - categoryName: '多视图', - hide: !(propertyData.showHeader && multiViewToolbarData && multiViewToolbarData.length > 0), - properties: [ - { - propertyID: 'multiViews', - propertyName: '显示多视图按钮', - propertyType: 'boolean', - description: '是否显示多视图按钮', - group: 'header', - defaultValue: false - }, - { - propertyID: 'views', - propertyName: '多视图配置', - propertyType: 'cascade', - visible: propertyData.multiViews, - isExpand: true, - hideCascadeTitle: true, - cascadeConfig: [ - { - propertyID: 'viewType', - propertyName: '视图按钮排列方式', - propertyType: 'select', - description: '视图按钮排列方式设置', - iterator: [{ key: 'tile', value: '平铺' }, { key: 'dropdown', value: '下拉选择' }] - }, - { - propertyID: 'defaultType', - propertyName: '默认视图类型', - propertyType: 'select', - description: '默认显示的视图类型', - iterator: this.getViewChangeDataTypes(propertyData.views) - } - ] - } - - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - switch (changeObject.propertyID) { - case 'multiViews': { - - const views = this.properties.find(p => p.propertyID === 'views'); - if (views) { - views.visible = changeObject.propertyValue; - } - - } - } - } - - }; - - } - - private getViewChangeDataTypes(propData: any) { - - if (!propData || !propData.toolbarData || propData.toolbarData.length === 0) { - return []; - } - const iterators = []; - propData.toolbarData.forEach(data => { - iterators.push( - { - key: data.type, - value: data.title - } - ); - }); - return iterators; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'isScrollSpyItem', - propertyName: '被滚动跟随的节点', - propertyType: 'boolean', - description: '是否为被滚动监听跟随的节点', - defaultValue: false - } - ] - }; - } - - private getExtendPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'extend', - categoryName: '扩展', - properties: [ - { - propertyID: 'extendedAreaTemplate', - propertyName: '扩展区域模板', - propertyType: 'modal', - description: '扩展区域模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'extendedAreaClass', - propertyName: '扩展区域样式', - propertyType: 'string', - description: '扩展区域样式设置', - }, - { - propertyID: 'contentTemplateClass', - propertyName: '内容区域样式', - propertyType: 'string', - description: '内容区域样式设置', - } - ] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-item-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-item-property-config.ts deleted file mode 100644 index 76e1d48c1d12f574b2f7ed35875adbd85b4440ef..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-item-property-config.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class SectionToolbarItemProp extends ContainerUsualProp { - - getPropConfig(viewModelId: string, propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceItemPropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorItemPropConfig(propertyData, viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - - } - - getBasicPropConfig(): ElementPropertyConfig { - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true - }, - { - propertyID: 'title', - propertyName: '文本', - propertyType: 'string' - } - ] - }; - } - - private getAppearanceItemPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - enableCascade: true, - parentPropertyID: 'appearance', - propertyData: propertyData.appearance, - properties: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string' - } - ] - }; - } - - private getBehaviorItemPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'disable', - propertyName: '禁用', - propertyType: 'unity', - description: '是否禁用', - editorParams: { - controlName: undefined, - constType: 'enum', - editorOptions: { - types: ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - }, - visibleProp - ] - }; - } - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-property-config.ts deleted file mode 100644 index 21a5f540f9d94bde603fa87ae49694570a908004..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/property/toolbar-property-config.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { DgControl } from '../../../../utils/dg-control'; - -export class SectionToolBarProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 按钮属性 - const toolbarPropConfig = this.getToolbarPropConfig(); - this.propertyConfig.push(toolbarPropConfig); - - return this.propertyConfig; - - } - getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - } - ] - }; - } - private getToolbarPropConfig(): ElementPropertyConfig { - - // 若表单有状态机,section才支持启用按钮;若没有状态机,不支持启用按钮 - let showToolbar = false; - const stateMachines = this.domService.module.stateMachines; - if (stateMachines && stateMachines.length > 0) { - showToolbar = true; - } - - return { - categoryId: 'toolbar', - categoryName: '工具栏', - hide: !showToolbar, - properties: [ - { - propertyID: 'position', - propertyName: '显示位置', - propertyType: 'select', - iterator: [{ key: 'inHead', value: '标题区域' }, { key: 'inContent', value: '内容区域' }] - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/schema/schema.ts deleted file mode 100644 index c750867b1e10653af5756a9d73fdf3f980ff7884..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/schema/schema.ts +++ /dev/null @@ -1,52 +0,0 @@ -export const SectionSchema = { - id: 'section', - type: 'Section', - appearance: null, - visible: true, - mainTitle: '主标题', - subTitle: '', - headerClass: '', - titleClass: '', - extendedHeaderAreaClass: '', - toolbarClass: '', - extendedAreaClass: '', - contentTemplateClass: '', - fill: false, - expanded: true, - enableMaximize: false, - enableAccordion: true, - accordionMode: 'default', - showHeader: true, - headerTemplate: '', - titleTemplate: '', - extendedHeaderAreaTemplate: '', - toolbarTemplate: '', - extendedAreaTemplate: '', - contents: [], - isScrollSpyItem: false, - toolbar: { - type: 'SectionToolbar', - position: 'inHead', - contents: [] - } -}; - -export const SectionToolbarSchema = { - type: 'SectionToolbar', - position: 'inHead', - contents: [] -}; - -export const SectionToolbarItemSchema = { - id: 'sectionToolbarItem', - type: 'SectionToolbarItem', - title: '按钮', - disable: false, - appearance: { - class: 'btn btn-secondary f-btn-ml' - }, - visible: true, - click: null -}; - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/form.ts deleted file mode 100644 index 792358572e86c8278e288d51068270e270ee3f08..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/form.ts +++ /dev/null @@ -1,209 +0,0 @@ -export default (ctx: any) => { - - // 顶层样式 - const sectionCls = getSectionClass(ctx); - - let template = `
    `; - - // 头部 - const headerStr = getHeaderTemplate(ctx); - template += headerStr; - - // 扩展区域 - const extendStr = getExtendStr(ctx); - template += extendStr; - - // 内容区按钮 - const contentBtnStr = getContentToolbarStr(ctx); - - if (contentBtnStr) { - template += ` -
    - ${contentBtnStr} -
    - ${ctx.children} -
    -
    -
    - `; - } else { - template += ` -
    - ${ctx.children} -
    - - `; - } - - return template; -}; - -/** - * 顶层样式 - */ -function getSectionClass(ctx: any) { - let sectionCls = ctx.component.fill ? ' f-section-fill' : ''; - // 处理収折 - if (ctx.component.enableAccordion && ctx.component.accordionMode) { - sectionCls += ctx.component.accordionMode === 'default' ? ' f-section-accordion' : (ctx.component.accordionMode === 'custom' ? ' f-section-custom-accordion' : ''); - sectionCls += !ctx.expandStatus ? ' f-state-collapse' : ''; - } - - return sectionCls; -} -/** - * 头部区域 - */ -function getHeaderTemplate(ctx: any) { - if (!ctx.component.showHeader) { - return ''; - } - - // 启用头部模板 - if (ctx.component.headerTemplate) { - return `
    - ${ctx.component.headerTemplate} -
    `; - } - - // 头部标题 - const htitleStr = getHeaderTitleStr(ctx); - // 头部内容 - const hcontentStr = getHeaderContentStr(ctx); - // 头部工具栏模板 - const htoolbarTmplStr = gethHeadertoolbarStr(ctx); - // 头部最大化 - const maxAccordionStr = getMaxAccordionStr(ctx); - // 视图切换 - const viewChangeStr = getViewChangeStr(ctx); - - return ` -
    - ${htitleStr} ${hcontentStr} ${htoolbarTmplStr} ${viewChangeStr} ${maxAccordionStr} -
    `; -} - -/** - * 头部标题 - */ -function getHeaderTitleStr(ctx: any) { - if (ctx.component.titleTemplate) { - return ctx.component.titleTemplate; - } - - let htitleStr = `

    ${ctx.component.mainTitle}

    `; - - if (ctx.component.subTitle) { - htitleStr += `${ctx.component.subTitle}`; - } - htitleStr += '
    '; - - return htitleStr; -} - -/** - * 头部内容区域 - */ -function getHeaderContentStr(ctx: any) { - let hcontentStr = ''; - if (ctx.component.extendedHeaderAreaTemplate) { - hcontentStr = ` -
    - ${ctx.component.extendedHeaderAreaTemplate} -
    `; - } - - return hcontentStr; -} - - -/** - * 头部工具栏模板 - */ -function gethHeadertoolbarStr(ctx: any) { - - if (ctx.component.toolbarTemplate) { - return `
    ${ctx.component.toolbarTemplate}
    `; - } - - let htoolbarTmplStr = ''; - if (ctx.component.toolbar && ctx.component.toolbar.position === 'inHead' && ctx.component.toolbar.contents.length > 0) { - htoolbarTmplStr = `
    - ${ctx.toolBarComponent.render()} -
    `; - } - - return htoolbarTmplStr; -} - -/** - * 视图切换 - */ -function getViewChangeStr(ctx: any) { - if (ctx.component.multiViews && ctx.component.views) { - return `
    -
    - ${ctx.getViewChangeStr()} -
    -
    `; - } - - return ''; -} - -/** - * 收折、最大化 - */ -function getMaxAccordionStr(ctx: any) { - if (ctx.component.enableMaximize || (ctx.component.enableAccordion && ctx.component.accordionMode !== '')) { - // 最大化 - const maxStr = ctx.component.enableMaximize ? ' ' : ''; - - // 收折 - let accordionStr = ''; - const accordionCls = ctx.expandStatus ? ' f-state-expand' : ''; - const accordionText = ctx.expandStatus ? '收起' : '展开'; - - if (ctx.component.enableAccordion && ctx.component.accordionMode !== '') { - accordionStr = ` - - `; - } - - return `
    ${maxStr} ${accordionStr}
    `; - } - - return ''; -} - - -/** - * 内容区域按钮 - */ -function getContentToolbarStr(ctx: any) { - let contentBtnStr = ''; - if (!ctx.component.toolbarTemplate && ctx.component.toolbar && ctx.component.toolbar.contents.length > 0 && ctx.component.toolbar.position == 'inContent') { - contentBtnStr = `
    - ${ctx.toolBarComponent.render()} -
    `; - } - - return contentBtnStr; -} - - -/** - * 扩展区域 - */ -function getExtendStr(ctx: any) { - let extendStr = ''; - if (ctx.component.extendedAreaTemplate) { - extendStr = `
    - ${ctx.component.extendedAreaTemplate} -
    `; - } - - return extendStr; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/section/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/component/fd-sidebar.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/component/fd-sidebar.ts deleted file mode 100644 index 999356429a7c298c8c0ac249fdde4f5adfebc53a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/component/fd-sidebar.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { SidebarSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { SidebarProp } from '../property/property-config'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DomService } from '@farris/designer-services'; - -export default class FdSidebarComponent extends FdContainerBaseComponent { - // 默认是收起 - isOpen = false; - // 标记动画 - canRemoveInitNoAnimateCls = true; - // 标记当前 - private sideBarParent = null; - // 标识当前的legend - get sidebarKey(): string { - return `Sidebar-${this.key}`; - } - get overlayKey(): string { - return `Overlay-${this.key}`; - } - get closeBtnKey(): string { - return `CloseBtn-${this.key}`; - } - component; - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - - return SidebarSchema; - } - - getTemplateName(): string { - return 'Sidebar'; - } - - // 渲染模板 - render(children): any { - return super.render(children || this.renderTemplate('Sidebar', { - sidebarKey: this.sidebarKey, - overlayKey: this.overlayKey, - closeBtnKey: this.closeBtnKey, - isOpen: this.isOpen, - canRemoveInitNoAnimateCls: this.canRemoveInitNoAnimateCls, - children: this.renderComponents(), - nestedKey: this.nestedKey, - getToolbarStr: this.getToolbarStr - })); - } - // 绑定事件 - attach(element: any): any { - // key 如果有多个用 multi,单个用single - this.loadRefs(element, { - [this.sidebarKey]: 'single', - [this.overlayKey]: 'single', - [this.closeBtnKey]: 'single' - }); - // 必写 - const superAttach: any = super.attach(element); - - // 注册按钮 - const entryEl = this.refs[this.sidebarKey].querySelector('.f-sidebar-entry-ctr'); - if (entryEl) { - this.addEventListener(entryEl, 'click', (event) => { - event.stopPropagation(); - this.openSideBar(); - }); - } - // 注册关闭按钮 - const closeEl = this.refs[this.closeBtnKey]; - if (closeEl) { - this.addEventListener(closeEl, 'click', (event) => { - event.stopPropagation(); - this.closeSideBar(); - }); - } - - // 注册遮罩层 - const overlayEl = this.refs[this.overlayKey]; - this.addEventListener(overlayEl, 'click', (event) => { - event.stopPropagation(); - this.closeSideBar(); - }); - - this.setToolbarBasicInfoMap(); - - // 必写 - return superAttach; - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: SidebarProp = new SidebarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, - ['position', 'width', 'contentTemplateClass', 'customEntryTemplate', - 'customEntryTemplateClass']); - - if (['header', 'footer'].includes(changeObject.categoryId)) { - this.triggerRedraw(); - } - } - /** - * 获取工具栏按钮字符串 - */ - getToolbarStr() { - return OperateUtils.getResponseToolbarStr(this.component.toolbar); - } - /** - * 关闭侧边栏 - */ - private closeSideBar() { - if (!this.sideBarParent) { - this.sideBarParent = this.element; - } - this.removeNoneAnimateCls(); - this.isOpen = false; - OperateUtils.removeClass(this.sideBarParent, 'f-sidebar-parent-expand'); - OperateUtils.addClass(this.sideBarParent, 'f-sidebar-parent-collapse'); - this.redraw(); - } - /** - * 展开侧边栏 - */ - private openSideBar() { - if (!this.sideBarParent) { - this.sideBarParent = this.element; - } - this.removeNoneAnimateCls(); - this.isOpen = true; - OperateUtils.removeClass(this.sideBarParent, 'f-sidebar-parent-collapse'); - OperateUtils.addClass(this.sideBarParent, 'f-sidebar-parent-expand'); - this.redraw(); - } - /*侧边栏初始因为动画收起时,会被看到, 移除 */ - private removeNoneAnimateCls() { - if (!this.canRemoveInitNoAnimateCls) { - return; - } - this.canRemoveInitNoAnimateCls = false; - } - - checkCanMoveComponent(): boolean { - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、预置的Sidebar - if (parentClassList.includes('f-page')) { - return false; - } - return true; - } - checkCanDeleteComponent(): boolean { - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - // 1、预置的Sidebar - if (parentClassList.includes('f-page')) { - return false; - } - return true; - } - - /** - * 设置侧边栏按钮的展示名称和路径,用于交互面板已绑定事件窗口 - */ - private setToolbarBasicInfoMap() { - if (!this.component.toolbar || !this.component.toolbar.items || !this.component.toolbar.items.length) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - const sidebarPath = domService.controlBasicInfoMap.get(this.component.id); - - this.component.toolbar.items.forEach(toolbar => { - domService.controlBasicInfoMap.set(toolbar.id, { - showName: toolbar.text, - parentPathName: `${sidebarPath.parentPathName} > ${toolbar.text}` - }); - }); - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/export.ts deleted file mode 100644 index 6528884e3d049e6f2a8d73077ed5066d6242b1fb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdSidebarComponent from './component/fd-sidebar'; -import { SidebarSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdSidebarTemplates from './templates'; - - -export const Sidebar: ComponentExportEntity = { - type: 'Sidebar', - component: FdSidebarComponent, - template: FdSidebarTemplates, - metadata: SidebarSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/property-config.ts deleted file mode 100644 index f2e1fcc0f21a5ec90598b7926ec7b2d9acc8f976..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/property-config.ts +++ /dev/null @@ -1,383 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { CodeEditorComponent, CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent } from '@farris/designer-devkit'; -import { DgControl } from '../../.././../utils/dg-control'; -import { SidebarToolbarItemProp } from './sidebar-toolbar-item.config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class SidebarProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 入口属性 - const entryPropConfig = this.getEntryPropConfig(propertyData); - propertyConfig.push(entryPropConfig); - - // 页头属性 - const headerPropConfig = this.getHeaderPropConfig(propertyData); - propertyConfig.push(headerPropConfig); - - // 页脚属性 - const footerPropConfig = this.getFooterPropConfig(propertyData); - propertyConfig.push(footerPropConfig); - - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - - - private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - commonProps.push( - { - propertyID: 'position', - propertyName: '显示位置', - propertyType: 'select', - iterator: [{ key: 'left', value: '左侧' }, { key: 'right', value: '右侧' }] - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number' - }, - { - propertyID: 'contentTemplateClass', - propertyName: '内容模板样式', - propertyType: 'string', - description: '内容模板样式设置', - }, - { - propertyID: 'maskable', - propertyName: '显示遮罩', - propertyType: 'boolean', - description: '是否显示遮罩', - defaultValue: false - }, - { - propertyID: 'maskClosable', - propertyName: '点击遮罩层关闭侧边栏', - propertyType: 'boolean', - description: '点击遮罩层是否可关闭侧边栏', - visible: propertyData.maskable - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps, - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'maskable': { - const maskClosable = this.properties.find(p => p.propertyID === 'maskClosable'); - if (maskClosable) { - maskClosable.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getEntryPropConfig(propertyData: any): ElementPropertyConfig { - return { - categoryId: 'enty', - categoryName: '入口区域', - properties: [ - { - propertyID: 'showEntry', - propertyName: '显示入口区域', - propertyType: 'boolean', - description: '是否显示入口区域', - defaultValue: false - }, - { - propertyID: 'customEntryTemplate', - propertyName: '自定义入口模板', - propertyType: 'modal', - description: '自定义入口模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.showEntry, - category: 'entry' - }, - { - propertyID: 'customEntryTemplateClass', - propertyName: '自定义入口模板样式', - propertyType: 'string', - description: '自定义入口模板样式设置', - visible: propertyData.showEntry, - category: 'entry' - } - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showEntry': { - this.properties.map(p => { - if (p.category === 'entry') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - - }; - } - - private getHeaderPropConfig(propertyData: any): ElementPropertyConfig { - const sidebarToolbarItemProp = new SidebarToolbarItemProp(this.formBasicService, this.serviceHost); - - const headerProps: PropertyEntity[] = [ - { - propertyID: 'showHeader', - propertyName: '显示页头', - propertyType: 'boolean', - description: '是否显示页头', - defaultValue: true - }, - { - propertyID: 'showClose', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - description: '是否显示关闭按钮' - }, - { - propertyID: 'toolbar', - propertyName: '工具栏', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'items', - propertyName: '工具栏项', - propertyType: 'modal', - description: '工具栏项设置', - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '工具栏编辑器', - viewModelId: this.viewModelId, - idKey: 'id', - textKey: 'text', - childrenKey: 'items', - controlType: DgControl.ToolBarItem.type, - defaultControlValue: { - id: 'toolBarItem', - text: '按钮' - }, - parentNodeId: propertyData.id, - getPropertyConfig: (selectedNode, triggerModalSave: any) => sidebarToolbarItemProp.getPropertyConfig(this.viewModelId, selectedNode, triggerModalSave) - } - } - ] - }, - { - propertyID: 'toolbarTemplateClass', - propertyName: '工具栏样式', - propertyType: 'string', - description: '工具栏样式设置' - }, - { - propertyID: 'headerTemplate', - propertyName: '页头模板', - propertyType: 'modal', - description: '页头模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'headerTemplateClass', - propertyName: '页头模板样式', - propertyType: 'string', - description: '页头模板样式设置' - }, - { - propertyID: 'headerTitleTemplate', - propertyName: '页头标题模板', - propertyType: 'modal', - description: '页头标题模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'headerTitleTemplateClass', - propertyName: '页头标题模板样式', - propertyType: 'string', - description: '页头标题模板样式设置' - }, - { - propertyID: 'headerContentTemplate', - propertyName: '页头内容模板', - propertyType: 'modal', - description: '页头内容模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'headerContentTemplateClass', - propertyName: '页头内容模板样式', - propertyType: 'string', - description: '页头内容模板样式设置' - } - ]; - - headerProps.map(p => { - if (p.propertyID !== 'showHeader') { - p.visible = propertyData.showHeader; - } - }); - - return { - categoryId: 'header', - categoryName: '页头区域', - properties: headerProps, - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.propertyID !== 'showHeader') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - - }; - } - - private getFooterPropConfig(propertyData: any): ElementPropertyConfig { - const footerProps: PropertyEntity[] = [ - { - propertyID: 'showFooter', - propertyName: '显示页脚', - propertyType: 'boolean', - description: '是否显示页脚', - defaultValue: false - }, - { - propertyID: 'footerContentTemplate', - propertyName: '页脚内容模板', - propertyType: 'modal', - description: '页脚内容模板设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'footerContentTemplateClass', - propertyName: '页脚内容模板样式', - propertyType: 'string', - description: '页脚内容模板样式设置' - } - ]; - - footerProps.map(p => { - if (p.propertyID !== 'showFooter') { - p.visible = propertyData.showFooter; - } - }); - - return { - categoryId: 'footer', - categoryName: '页脚区域', - properties: footerProps, - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showFooter': { - this.properties.map(p => { - if (p.propertyID !== 'showFooter') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [visibleProp] - }; - } - - - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'beforeCloseSidebar', - name: '侧边栏关闭前事件' - }, - { - label: 'changeState', - name: '侧边栏状态切换后事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/sidebar-toolbar-item.config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/sidebar-toolbar-item.config.ts deleted file mode 100644 index 045421b111cd4cad7f87ac046caa71754edccec0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/property/sidebar-toolbar-item.config.ts +++ /dev/null @@ -1,251 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { TreeNode } from '@farris/ui-treetable'; -import { EventEditorService, DomService, FormBasicService, WebCmdService, StateMachineService, UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent, IconSelectEditorComponent } from '@farris/designer-devkit'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { MessagerService } from '@farris/ui-messager'; -import { IDesignerHost } from '@farris/designer-element'; - - -export class SidebarToolbarItemProp { - - /** 在弹窗中使用按钮配置时,交互面板若要跳转到代码视图,需要先关闭弹窗 */ - triggerModalSave?: any; - - private stateMachineService: StateMachineService; - private eventEditorService: EventEditorService; - public webCmdService: WebCmdService; - private domService: DomService; - private msgService: MessagerService; - - constructor(public formBasicService: FormBasicService, serviceHost: IDesignerHost) { - - this.stateMachineService = serviceHost.getService('StateMachineService') as StateMachineService; - this.eventEditorService = serviceHost.getService('EventEditorService') as EventEditorService; - this.webCmdService = serviceHost.getService('WebCmdService') as WebCmdService; - this.domService = serviceHost.getService('DomService') as DomService; - this.msgService = serviceHost.getService('MessagerService') as MessagerService; - } - - /** - * sidebar toolbarItem 属性配置 - * @param viewModelId 按钮所在视图模型ID - * @param selectedNode 当前选中行数据 - */ - public getPropertyConfig(viewModelId: string, selectedNode: TreeNode, triggerModalSave?: any) - : ElementPropertyConfig[] { - - this.triggerModalSave = triggerModalSave; - - const propertyData = selectedNode.data; - const propertyConfig: ElementPropertyConfig[] = []; - - const isFirstLevel = !!!selectedNode.parent; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceItemPropConfig(propertyData, false, isFirstLevel); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorItemPropConfig(propertyData, viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getBasicPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '工具栏按钮的标识' - }, - { - propertyID: 'text', - propertyName: '标签', - propertyType: 'string', - description: '工具栏按钮的标签', - readonly: false - } - ] - }; - } - - private getAppearanceItemPropConfig(propertyData: any, disableChildItem: boolean, isFirstLevel: boolean): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: '按钮样式', - propertyType: 'string', - description: '工具栏按钮样式' - }, - { - propertyID: 'dropdownCls', - propertyName: '下拉框样式', - propertyType: 'string', - description: '工具栏按钮下拉框样式', - visible: !disableChildItem - } - ] - }, - { - propertyID: 'split', - propertyName: '下拉按钮分离', - propertyType: 'boolean', - defaultValue: false, - description: '工具栏下拉按钮是否分离', - visible: !disableChildItem - }, - { - propertyID: 'icon', - propertyName: '图标', - propertyType: 'modal', - description: '图标设置', - editor: IconSelectEditorComponent, - editorParams: { needIconClass: true }, - visible: isFirstLevel - }, - { - propertyID: 'tipsEnable', - propertyName: '启用提示', - propertyType: 'boolean', - description: '是否启用提示信息', - defaultValue: false - }, - { - propertyID: 'tipsText', - propertyName: '提示消息内容', - propertyType: 'modal', - description: '提示消息内容设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.tipsEnable - } - ], - setPropertyRelates(changeObject: PropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'tipsEnable': { - const tipsText = this.properties.find(p => p.propertyID === 'tipsText'); - if (tipsText) { - tipsText.visible = changeObject.propertyValue; - } - } - } - } - }; - } - - private getBehaviorItemPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'disable', - propertyName: '是否禁用', - propertyType: 'unity', - description: '运行时组件是否禁用', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - } - ] - }; - } - - - private getEventPropertyConfig(propertyData, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod && self.triggerModalSave) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - self.triggerModalSave(); - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - - - } - }; - } - - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/schema/schema.ts deleted file mode 100644 index 19e9a55aeb0c1a8ca115deb364d29c0bc447262a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/schema/schema.ts +++ /dev/null @@ -1,40 +0,0 @@ -export const SidebarSchema = { - id: 'sidebar', - type: 'Sidebar', - appearance: null, - position: 'right', - showHeader: true, - showEntry: false, - maskable: false, - maskClosable: true, - iconCls: null, - width: null, - height: null, - headerTemplate: '', - headerTemplateClass: '', - headerTitleTemplate: '', - headerTitleTemplateClass: '', - headerContentTemplate: '', - headerContentTemplateClass: '', - toolbar: { - id: 'toolbar', - type: 'ToolBar', - appearance: { - class: '' - }, - items: [] - }, - toolbarTemplateClass: 'col-7', - customEntryTemplate: '', - customEntryTemplateClass: '', - contents: [], - visible: true, - showClose: true, - showFooter: true, - footerContentTemplate: '', - footerContentTemplateClass: '', - changeState: null, - contentTemplateClass: '', - beforeCloseSidebar: null -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/form.ts deleted file mode 100644 index 5de4ac3f64605548e7b32b64195f1f623dd4a239..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/form.ts +++ /dev/null @@ -1,156 +0,0 @@ -export default (ctx: any) => { - // 侧边栏样式 - let sidebarCls = ` f-sidebar-pos-${ctx.component.position}`; - sidebarCls += ctx.isOpen ? ' f-sidebar-show' : ' f-sidebar-collapse'; - - // 侧边栏Main样式 - const { mainStyle, mainCls } = getMainClassAndStyle(ctx); - - // 头部 - const headerStr = getHeaderStr(ctx); - - // 底部 - const footerStr = getFooterStr(ctx); - - // 入口按钮 ---此处不处理属性,始终显示 - const entryStr = getEntryStr(ctx); - - // 遮罩层 - const overlayCls = ctx.isOpen ? ' f-sidebar-show' : ' f-sidebar-collapse'; - const overlayStr = `
    `; - - return ` -
    -
    - ${headerStr} -
    - ${ctx.children} -
    - ${footerStr} -
    - ${entryStr} -
    - ${overlayStr} - `; -}; - - -/** - * 获取主区域样式 - */ -function getMainClassAndStyle(ctx: any) { - // 宽度 - let width = 'auto'; - if ('leftright'.indexOf(ctx.component.position) > -1) { - width = ctx.component.width ? ctx.component.width + 'px' : '350px'; - } - let mainStyle = `width:${width}`; - - // 高度 - let height = 'auto'; - if ('topbottom'.indexOf(ctx.component.position) > -1) { - height = ctx.component.height ? ctx.component.height : '30%'; - } - mainStyle += `;height:${height}`; - - // 样式 - const mainCls = ctx.canRemoveInitNoAnimateCls ? ' f-sidebar-slideinit' : ''; - - return { mainStyle, mainCls }; -} - -/** - * 组装头部标题区域 - */ -function getTitleStr(ctx: any) { - const titleCls = - ctx.component.headerTitleTemplate && ctx.component.headerTitleTemplateClass - ? ' ' + ctx.component.headerTitleTemplateClass - : ''; - let titleStr = `
    `; - - if (ctx.component.headerTitleTemplate) { - titleStr += ctx.component.headerTitleTemplate; - } else { - titleStr += '
    ' + (ctx.component.title ? ctx.component.title : '详情') + '
    '; - } - titleStr += '
    '; - - return titleStr; -} - -/** - * 组装头部区域 - */ -function getHeaderStr(ctx: any) { - // 按钮区 - const toolCls = ctx.component.toolbar.items.length > 0 ? ' ' + ctx.component.toolbarTemplateClass : ''; - const toolBtnsStr = ctx.getToolbarStr(); - const toolCloseStr = !toolBtnsStr || ctx.component.showClose ? ` ` : ''; - const toolStr = `
    - ${toolBtnsStr} ${toolCloseStr} -
    - `; - - // 头部标题 - const titleStr = getTitleStr(ctx); - - // 头部-中间区域 - let hContentStr = ''; - if (ctx.component.headerContentTemplate) { - hContentStr += `
    ${ctx.component.headerContentTemplate}
    `; - } - - // 头部 - let headerStr = ''; - if (ctx.component.showHeader) { - if (ctx.component.headerTemplate) { - headerStr = `
    - ${ctx.component.headerTemplate} -
    `; - } else { - headerStr = `
    - ${titleStr} ${hContentStr} ${toolStr} -
    `; - } - } - - return headerStr; -} - -/** - * 底部区域 - */ -function getFooterStr(ctx: any) { - let footerStr = ''; - const footerCls = ctx.component.footerContentTemplate ? ' ' + ctx.component.footerContentTemplateClass : ''; - - if (ctx.component.showFooter) { - footerStr = ``; - } - - return footerStr; -} - -/** - * 入口按钮 ---此处不处理属性,始终显示 - */ -function getEntryStr(ctx: any) { - let entryStr = ''; - let entryIconStr = ''; - let entryCls = ''; - if (ctx.component.customEntryTemplate) { - entryCls = ctx.component.customEntryTemplateClass; - } else { - entryIconStr = `
    `; - } - entryStr = `
    - ${ctx.component.customEntryTemplate} - ${entryIconStr} -
    `; - - return entryStr; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/sidebar/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter-pane.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter-pane.ts deleted file mode 100644 index c4d731441387d79e47040f1c1dfa4b9f9dfee5e5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter-pane.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { SplitterPaneSchema } from '../schema/schema'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; - -export default class FdSplitterPaneComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return SplitterPaneSchema; - } - - getTemplateName(): string { - return 'SplitterPane'; - } - - - checkCanMoveComponent(): boolean { - return false; - } - checkCanDeleteComponent(): boolean { - return false; - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - const result = super.canAccept(sourceElement, targetElement); - if (!result.canAccepts) { - return false; - } - const paneCls = this.component.appearance && this.component.appearance.class || ''; - const paneClsList = paneCls.split(' ') || []; - - // 若SplitterPane是左侧区域(f-page-content-nav, 表单模板中一般放置单个列表或树列表),且已有子级节点,则不接收控件 - if (paneClsList.includes('f-page-content-nav')) { - const firstChild = this.component.contents && this.component.contents[0]; - if (firstChild && firstChild.type === DgControl.ComponentRef.type) { - return false; - } else { - return true; - } - } - - // SplitterPane是右侧区域:不接收DataGrid、TreeGrid、ListView。 - const restrictCollection = [DgControl.DataGrid.type, DgControl.TreeGrid.type, DgControl.ListView.type]; - if (restrictCollection.includes(result.resolveContext.controlType)) { - return false; - } - - return true; - - } - - /** - * 触发整个面板的刷新 - */ - rebuild(): Promise { - return this.parent.rebuild(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter.ts deleted file mode 100644 index 1b2b85d891061808fb70f6611570fad17a8fb7b6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/component/fd-splitter.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { SplitterSchema } from '../schema/schema'; -import { forEach } from 'lodash-es'; -import { SplitterProp } from '../property/property-config'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { SplitterContextMenuManager } from '../context-menu/context-menu.manager'; -import { RowNode } from '@farris/ui-treetable'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { DgControl } from '../../../../utils/dg-control'; -import FdSplitterPaneComponent from './fd-splitter-pane'; - -export default class FdSplitterComponent extends FdContainerBaseComponent { - - /** 标识每个分栏项的key值 */ - get splitterPaneKey(): string { - return `pane-${this.id}`; - } - - /** 分栏项实例 */ - splitterPaneComponents: FdSplitterPaneComponent[]; - - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return SplitterSchema; - } - - getTemplateName(): string { - return 'Splitter'; - } - - init(): void { - this.components = []; - this.splitterPaneComponents = []; - const options = Object.assign({}, this.options, { parent: this }); - forEach(this.component.contents, (pane, index) => { - pane.contents = pane.contents || []; - const splitterPageComponent: any = this.createComponent(pane, options, null); - - this.splitterPaneComponents[index] = splitterPageComponent; - }); - } - - render(): any { - return super.render(this.renderTemplate('Splitter', { - splitterPaneComponents: this.splitterPaneComponents.map(pane => pane.renderComponents()), - splitterPaneKey: this.splitterPaneKey - - })); - } - - - - attach(element: any): any { - this.loadRefs(element, { - [this.splitterPaneKey]: 'multiple', - }); - const superAttach: any = super.attach(element); - - this.refs[this.splitterPaneKey].forEach((splitterPaneEle, index) => { - this.attachComponents(splitterPaneEle, this.splitterPaneComponents[index].components, this.component.contents[index].contents); - this.bindingScrollEvent(splitterPaneEle); - }); - - return superAttach; - } - - /** - * 组装属性面板配置数据 - * @returns ElementPropertyConfig[] - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: SplitterProp = new SplitterProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode, parentRowNode: RowNode) { - const menuManager = new SplitterContextMenuManager(this, rowNode, parentRowNode); - return menuManager.setContextMenuConfig(); - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - // splitter 不接收子级节点;splitterPane可接收 - const targetId = targetElement.getAttribute('id'); - if (this.component.contents && this.component.contents.find(pane => pane.id === targetId)) { - const paneCmp = this.splitterPaneComponents.find(c => c.id === targetId); - return paneCmp.canAccepts(sourceElement, targetElement); - // return super.canAccepts(sourceElement, targetElement); - } else { - return false; - } - } - - checkCanMoveComponent(): boolean { - // 控件本身样式 - const cmpClass = this.component.appearance && this.component.appearance.class || ''; - const cmpClassList = cmpClass.split(' '); - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - - // 主区域下的Splitter不能移动 - if (cmpClassList.includes('f-page-content') && parentClassList.includes('f-page-main') && parent.type === DgControl.ContentContainer.type) { - return false; - } - - return true; - } - checkCanDeleteComponent(): boolean { - return false; - } - - /** - * 判断在可视化区域中是否隐藏容器间距和线条 - */ - hideNestedPaddingInDesginerView() { - return true; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu-config.ts deleted file mode 100644 index 7343564448095d4c8ba7e9ae3fdd3d23ac08d1c6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu-config.ts +++ /dev/null @@ -1,45 +0,0 @@ -export const contextMenu = [ - { - id: 'paneDirection', - title: '布局方向', - children: [ - { - id: 'horizontal', - title: '横向' - }, - { - id: 'vertical', - title: '纵向' - } - ] - }, - { - id: 'paneProportion', - title: '分配比例', - children: [ - { - id: 'paneProportion11', - title: '1:1' - }, - { - id: 'paneProportion12', - title: '1:2' - } - ] - } -]; - -export const splitterPaneContextMenu = [ - { - title: '添加从表区域', - id: 'createDetailContainer' - }, - { - title: '添加从从表区域', - id: 'createGrandContainer' - }, - { - title: '从表填充', - id: 'childContainerFill' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu.manager.ts deleted file mode 100644 index 88ddc8fb5afa1475628163e924cb2661fee2d9b2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,481 +0,0 @@ -import { contextMenu, splitterPaneContextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { ComponentSchema } from '@farris/designer-element'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { ControlTreeNode } from '@farris/designer-devkit'; -import { DgControl } from '../../../../utils/dg-control'; -import { CreateDetailContainerService } from './services/create-detail-container.service'; -import { ControlService } from '../../../../service/control.service'; -import { ChildContainerFillService } from '../../content-container/context-menu/services/child-container-fill'; - - -/** 添加从表区域命令 */ -export const CREATE_DETAIL_CONTAINER_COMMAND = 'createDetailContainer'; - -/** 添加从从表区域命令 */ -export const CREATE_GRAND_CONTAINER_COMMAND = 'createGrandContainer'; - -/** 修改面板分配比例命令 */ -export const SPLITTER_PANE_PROPORTION = 'paneProportion'; - -/** 修改面板布局方向命令 */ -export const SPLITTER_PANE_DIRECTION = 'paneDirection'; -export const SPLITTER_PANE_DIRECTION_HORIZONTAL = 'horizontal'; -export const SPLITTER_PANE_DIRECTION_VERTICAL = 'vertical'; -const CHILD_FILL_COMMAND = 'childContainerFill'; - - -export class SplitterContextMenuManager extends ContextMenuManager { - - private parentRowNode: RowNode; - - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode, parentRowNode: RowNode) { - super(cmp, rowNode); - this.parentRowNode = parentRowNode; - - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - const parentTreeNode = this.parentRowNode && this.parentRowNode.node as ControlTreeNode; - if (parentTreeNode && parentTreeNode.rawElement.type === DgControl.Splitter.type) { - menuConfig = cloneDeep(splitterPaneContextMenu) as ControlContextMenuItem[]; - } - - if (!menuConfig) { - return []; - } - - menuConfig = this.assemblePaneProportionMenu(this.cmpInstance.component, menuConfig); - menuConfig = this.assemblePaneDirectionMenu(this.cmpInstance.component, menuConfig); - menuConfig = this.assembleCreateChildContainerMenu(this.rowNode.node.id, menuConfig); - menuConfig = this.assembleChildFillMenu(this.rowNode.node.id, menuConfig); - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - switch (menu.parentMenuId) { - // 修改布局比例 - case SPLITTER_PANE_PROPORTION: { - this.setPaneProportion(this.cmpInstance.component, menu.title); - return; - } - // 修改布局方向 - case SPLITTER_PANE_DIRECTION: { - this.setPaneDirection(this.cmpInstance.component, menu.id); - return; - } - } - - switch (menu.id) { - // 添加从表区域 - case CREATE_DETAIL_CONTAINER_COMMAND: { - this.createDetailContainer(); - return; - } - // 添加从从表区域 - case CREATE_GRAND_CONTAINER_COMMAND: { - this.createGrandContainer(); - return; - } - // 启用从表填充 - case 'enable' + CHILD_FILL_COMMAND: { - this.enableChildContainerFill(e.data.id); - return; - } - // 关闭从表填充 - case 'close' + CHILD_FILL_COMMAND: { - this.closeChildContainerFill(e.data.id); - return; - } - } - this.notifyService.warning('暂不支持'); - } - - /** - * 限制分配比例菜单的使用范围 - * @param splitterId 当前分隔组件id - * @param menuConfig 菜单配置 - */ - private assemblePaneProportionMenu(splitterDocument: ComponentSchema, menuConfig: ControlContextMenuItem[]) { - - // 目前只支持两个面板的分隔组件 - if (!splitterDocument.contents || splitterDocument.contents.length !== 2) { - // console.log('只支持包含2个分隔区域的面板启用分配比例菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_PROPORTION); - return menuConfig; - } - // 限制可修改的范围 - // tslint:disable-next-line:max-line-length - if (!splitterDocument.appearance || !splitterDocument.appearance.class || !splitterDocument.appearance.class.includes('f-page-content')) { - // console.log('分隔组件必须包含f-page-content样式才能启用分配比例菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_PROPORTION); - return menuConfig; - } - - const leftSplitterPane = splitterDocument.contents[0]; - // tslint:disable-next-line:max-line-length - if (!leftSplitterPane.appearance || !leftSplitterPane.appearance.class || !leftSplitterPane.appearance.class.includes('f-page-content-nav')) { - // console.log('左侧分隔区域必须包含f-page-content-nav样式才能启用分配比例菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_PROPORTION); - return menuConfig; - } - const rightSplitterPane = splitterDocument.contents[1]; - // tslint:disable-next-line:max-line-length - if (!rightSplitterPane.appearance || !rightSplitterPane.appearance.class || !rightSplitterPane.appearance.class.includes('f-page-content-main')) { - // console.log('右侧分隔组件必须包含f-page-content-main样式才能启用分配比例菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_PROPORTION); - return menuConfig; - } - - return menuConfig; - } - - /** - * 根据点击的菜单修改左右两侧面板的分配比例 - * @param splitterId 当前分隔组件id - * @param command 比例菜单的command id - */ - private setPaneProportion(splitterDocument: ComponentSchema, command: string) { - - const leftSplitterPane = splitterDocument.contents[0]; - const rightSplitterPane = splitterDocument.contents[1]; - - // 判断当前布局方向 - const direction = splitterDocument.appearance.class.includes('flex-column') ? 'vertical' : 'horizontal'; - const defaultClass = direction === 'horizontal' ? 'f-col-w' : 'f-col-h'; - - // 修改左侧区域的col样式 - switch (command) { - case '1:1': { - const class6 = defaultClass + '6'; - const classArray = leftSplitterPane.appearance.class.split(' '); - const colClassItemIndex = classArray.findIndex(c => c.startsWith(defaultClass)); - if (colClassItemIndex > -1) { - classArray[colClassItemIndex] = class6; - } else { - classArray.unshift(class6); - } - leftSplitterPane.appearance.class = classArray.join(' '); - - break; - - } - case '1:2': { - const class4 = defaultClass + '4'; - const classArray = leftSplitterPane.appearance.class.split(' '); - const colClassItemIndex = classArray.findIndex(c => c.startsWith(defaultClass)); - if (colClassItemIndex > -1) { - classArray[colClassItemIndex] = class4; - } else { - classArray.unshift(class4); - } - leftSplitterPane.appearance.class = classArray.join(' '); - - break; - } - } - - // 移除右侧区域的宽度样式 - const rightclassArray = rightSplitterPane.appearance.class.split(' '); - const rightColClassItemIndex = rightclassArray.findIndex(c => c.startsWith('f-col-w') || c.startsWith('f-col-h')); - if (rightColClassItemIndex > -1) { - rightclassArray.splice(rightColClassItemIndex, 1); - } - rightSplitterPane.appearance.class = rightclassArray.join(' '); - - this.notifyService.success('修改成功'); - this.refreshFormService.refreshFormDesigner.next(); - } - - - - /** - * 限制布局方向菜单的使用范围 - * @param splitterId 当前分隔组件id - * @param menuConfig 菜单配置 - */ - private assemblePaneDirectionMenu(splitterDocument: ComponentSchema, menuConfig: ControlContextMenuItem[]) { - - // 目前只支持两个面板的分隔组件 - if (!splitterDocument.contents || splitterDocument.contents.length !== 2) { - // console.log('只支持包含2个分隔区域的面板启用布局方向菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_DIRECTION); - return menuConfig; - } - // 限制可修改的范围 - // tslint:disable-next-line:max-line-length - if (!splitterDocument.appearance || !splitterDocument.appearance.class || !splitterDocument.appearance.class.includes('f-page-content')) { - // console.log('分隔组件必须包含f-page-content样式才能启用布局方向菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_DIRECTION); - return menuConfig; - } - - const leftSplitterPane = splitterDocument.contents[0]; - // tslint:disable-next-line:max-line-length - if (!leftSplitterPane.appearance || !leftSplitterPane.appearance.class || !leftSplitterPane.appearance.class.includes('f-page-content-nav')) { - // console.log('左侧分隔区域必须包含f-page-content-nav样式才能启用布局方向菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_DIRECTION); - return menuConfig; - } - const rightSplitterPane = splitterDocument.contents[1]; - // tslint:disable-next-line:max-line-length - if (!rightSplitterPane.appearance || !rightSplitterPane.appearance.class || !rightSplitterPane.appearance.class.includes('f-page-content-main')) { - // console.log('右侧分隔组件必须包含f-page-content-main样式才能启用布局方向菜单'); - menuConfig = menuConfig.filter(menu => menu.id !== SPLITTER_PANE_DIRECTION); - return menuConfig; - } - - return menuConfig; - } - - - - /** - * 根据点击的菜单修改两侧面板的布局方向 - * @param splitterId 当前分隔组件id - * @param command 比例菜单的command id - */ - private setPaneDirection(splitterDocument: ComponentSchema, command: string) { - let splitterClass = splitterDocument.appearance.class; - - const leftSplitterPane = splitterDocument.contents[0]; - const leftSplitterPaneClass = leftSplitterPane.appearance.class; - - const verticalClass = 'f-utils-flex-column'; - - switch (command) { - case SPLITTER_PANE_DIRECTION_HORIZONTAL: { - // 1、面板移除纵向布局样式 - splitterClass = splitterClass.replace(verticalClass, ''); - splitterClass = splitterClass.replace('flex-column', ''); - splitterDocument.appearance.class = splitterClass; - - // 2、区域一增加横向宽度,移除纵向高度 - const w6Class = 'f-col-w6'; - const classArray = leftSplitterPaneClass.split(' '); - const colClassItemIndex = classArray.findIndex(c => c.startsWith('f-col-h')); - const wClassItemIndex = classArray.findIndex(c => c.startsWith('f-col-w')); - if (colClassItemIndex > -1) { - classArray[colClassItemIndex] = w6Class; - } else if (wClassItemIndex < 0) { - classArray.unshift(w6Class); - } - leftSplitterPane.appearance.class = classArray.join(' '); - - // 3、区域一修改拖动方向 - leftSplitterPane.resizeHandlers = 'e'; - - break; - } - case SPLITTER_PANE_DIRECTION_VERTICAL: { - // 1、面板增加纵向布局样式 - if (!splitterClass.includes(verticalClass)) { - splitterClass = splitterClass + ' ' + verticalClass; - } - splitterDocument.appearance.class = splitterClass; - - // 2、区域一增加纵向高度,移除横向宽度 - const h6Class = 'f-col-h6'; - const classArray = leftSplitterPaneClass.split(' '); - const wClassItemIndex = classArray.findIndex(c => c.startsWith('f-col-w')); - const hClassItemIndex = classArray.findIndex(c => c.startsWith('f-col-h')); - if (wClassItemIndex > -1) { - classArray[wClassItemIndex] = h6Class; - } else if (hClassItemIndex < 0) { - classArray.unshift(h6Class); - } - leftSplitterPane.appearance.class = classArray.join(' '); - - // 3、区域一修改拖动方向 - leftSplitterPane.resizeHandlers = 's'; - - break; - } - } - - this.notifyService.success('修改成功'); - this.refreshFormService.refreshFormDesigner.next(); - } - /** - * 校验当前是否包含从表/从从表区域,从而控制右键菜单的显示项 - * @param containerId 右键的节点id - * @param menuConfig 菜单配置 - */ - private assembleCreateChildContainerMenu(containerId: string, menuConfig: ControlContextMenuItem[]) { - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - if (!templateOutlineSchema) { - // console.log('未检测到模板配置数据'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - // tslint:disable-next-line:max-line-length - const mainContainerSchema = templateOutlineSchema.find(schema => schema.type === 'RightMainContainer'); - - if (!mainContainerSchema || !mainContainerSchema.children || mainContainerSchema.children.length < 1) { - // console.log('未检测到右侧主区域配置数据'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - - const rootCmp = this.domService.getComponentById('root-component'); - - const mainContainer = this.domService.getNodeByIdPath(rootCmp, mainContainerSchema.path as string); - const likeCardCotainer = mainContainer.contents.find(co => co.type === DgControl.ContentContainer.type && co.isLikeCardContainer); - let detailContainerParentElement; - if (likeCardCotainer) { - detailContainerParentElement = likeCardCotainer; - } else { - detailContainerParentElement = mainContainer; - } - - if (detailContainerParentElement.id !== containerId) { - // console.log('当前节点不是右侧主区域节点'); - menuConfig = menuConfig.filter(menu => - menu.id !== CREATE_DETAIL_CONTAINER_COMMAND && menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - return menuConfig; - } - - // 判断是否包含从表区域 - const detailSchema = mainContainerSchema.children[1]; - const detailSectionContainer = this.domService.getNodeByIdPath(rootCmp, detailSchema.path as string); - const hasDetailContainer = !!detailSectionContainer && detailSchema.id === 'child-grid'; - - if (hasDetailContainer) { - // 存在从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_DETAIL_CONTAINER_COMMAND); - - if (mainContainerSchema.children.length > 2) { - const grandsonSchema = mainContainerSchema.children[2]; - const grandsonSectionContainer = this.domService.getNodeByIdPath(rootCmp, grandsonSchema.path as string); - const hasGrandsonDetailContainer = !!grandsonSectionContainer && grandsonSchema.id === 'grandson-grid'; - if (hasGrandsonDetailContainer) { - // 存在从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - } else { - // schema中没有声明从从表区域,则不能创建从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - - } else { - // 不存在从表区域,则不能创建从从表区域 - menuConfig = menuConfig.filter(menu => menu.id !== CREATE_GRAND_CONTAINER_COMMAND); - } - - return menuConfig; - } - - /** - * 创建从表区域 - */ - private createDetailContainer() { - const controlService = this.injector.get(ControlService); - const createDetailService = new CreateDetailContainerService(this.domService, controlService); - - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const mainContainerSchema = templateOutlineSchema.find(schema => - schema.type === 'RightMainContainer'); - - createDetailService.createDetailContainer(mainContainerSchema, 'child-grid'); - - this.notifyService.success('已添加从表区域'); - this.refreshFormService.refreshFormDesigner.next(); - } - - /** - * 创建从从表区域 - */ - private createGrandContainer() { - const controlService = this.injector.get(ControlService); - const createDetailService = new CreateDetailContainerService(this.domService, controlService); - - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const mainContainerSchema = templateOutlineSchema.find(schema => - schema.type === 'MainContainer' || schema.type === 'RightMainContainer'); - - createDetailService.createDetailContainer(mainContainerSchema, 'grandson-grid'); - - this.notifyService.success('已添加从从表区域'); - this.refreshFormService.refreshFormDesigner.next(); - } - - /** - * 组装子表填充菜单 - * @param containerId 右侧区域SplitterPane 的id - * @param menuConfig 菜单 - */ - private assembleChildFillMenu(containerId: string, menuConfig: ControlContextMenuItem[]): ControlContextMenuItem[] { - - const splitterPane = this.cmpInstance.component.contents.find(co => co.id === containerId); - if (!splitterPane) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - // 限定右侧主区域 - const className = splitterPane.appearance && splitterPane.appearance.class; - if (!className || !className.includes('f-page-content-main')) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - - // 收集子表区域 - const childContainerServ = new ChildContainerFillService(this.injector, this.cmpInstance); - const childContainers = childContainerServ.getChildContainers(splitterPane); - if (!childContainers.length) { - menuConfig = menuConfig.filter(menu => menu.id !== CHILD_FILL_COMMAND); - return menuConfig; - } - - // 判断当前是否已启用填充 - const childFillMenu = menuConfig.find(menu => menu.id === CHILD_FILL_COMMAND); - childFillMenu.title = (className.includes('f-page-child-fill') ? '关闭' : '启用') + childFillMenu.title; - childFillMenu.id = (className.includes('f-page-child-fill') ? 'close' : 'enable') + childFillMenu.id; - - return menuConfig; - } - - /** - * 启用子表填充 - */ - private enableChildContainerFill(containerId: string) { - const splitterPane = this.cmpInstance.component.contents.find(co => co.id === containerId); - if (!splitterPane) { - return; - } - const serv = new ChildContainerFillService(this.injector, this.cmpInstance); - serv.enableChildContainerFill(splitterPane); - - this.refreshFormService.refreshFormDesigner.next(); - - } - /** - * 关闭子表填充 - */ - private closeChildContainerFill(containerId: string) { - const splitterPane = this.cmpInstance.component.contents.find(co => co.id === containerId); - - const serv = new ChildContainerFillService(this.injector, this.cmpInstance); - serv.closeChildContainerFill(splitterPane); - - this.refreshFormService.refreshFormDesigner.next(); - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/services/create-detail-container.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/services/create-detail-container.service.ts deleted file mode 100644 index d941b1573bae3a1225a8fbc2a4fdf069f38248d2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/context-menu/services/create-detail-container.service.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { Injectable } from '@angular/core'; -import { DomService } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ControlService } from '../../../../../service/control.service'; - -@Injectable() -export class CreateDetailContainerService { - - constructor( - private domService: DomService, - private controlService: ControlService) { } - - /** - * 没有从表区域的场景下,创建从表区域。 - * containerType:区域内实体的层级。child-grid:从表区域,grandson-grid:从从表区域 - * 容器层级为:detail-container-----detail-setction-----detail-tab - */ - createDetailContainer(templateSchema: any, containerCascadeType: string) { - - - const containerSchema = templateSchema.children.find(item => item.id === containerCascadeType); - if (!containerSchema || !containerSchema.path) { - return; - } - - const settings = this.getSettingsByParentContainerType(templateSchema.type, containerSchema.path); - if (!settings) { - return; - } - const { detailContainer, detailSection, detailTab } = settings; - const rootCmp = this.domService.getComponentById('root-component'); - - let detailContainerParentElement; - const mainContainer = this.domService.getNodeByIdPath(rootCmp, templateSchema.path); - const likeCardCotainer = mainContainer.contents.find(co => co.type === DgControl.ContentContainer.type && co.isLikeCardContainer); - if (likeCardCotainer) { - detailContainerParentElement = likeCardCotainer; - } else { - detailContainerParentElement = mainContainer; - } - - const radomNum = Math.random().toString().slice(2, 6); - const tabPageSchema = this.controlService.getControlMetaData(DgControl.TabPage.type); - tabPageSchema.id = `tabpage_${radomNum}`; - tabPageSchema.toolbar.id = `tab_toolbar_${radomNum}`; - - - const detailTabElement = this.controlService.getControlMetaData(DgControl.Tab.type); - Object.assign(detailTabElement, { - id: detailTab.id, - appearance: { - class: detailTab.class - }, - contents: [tabPageSchema], - selected: tabPageSchema.id - }); - - - const detailSectionElement = this.controlService.getControlMetaData(DgControl.Section.type); - Object.assign(detailSectionElement, { - id: detailSection.id, - appearance: { - class: detailSection.class - }, - fill: false, - showHeader: false, - contents: [detailTabElement] - }); - - const detailContainerElement = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - Object.assign(detailContainerElement, { - id: detailContainer.id, - appearance: { - class: detailContainer.class - }, - contents: [detailSectionElement] - }); - - this.adaptChildFill(detailContainerElement, mainContainer); - detailContainerParentElement.contents.push(detailContainerElement); - - - } - - /** - * 根据父区域不同,获取container、section、tab组件的不同配置 - */ - private getSettingsByParentContainerType(parentContainerType: string, containerSchemaPath: string) { - const detailContainer = { id: '-container', class: '' }; - const detailSection = { id: '-section', class: '' }; - const detailTab = { id: '-tab', class: '' }; - - // 设置容器id - const containerPathArray = containerSchemaPath.split('.'); - if (containerPathArray.length < 2) { - return; - } - detailSection.id = containerPathArray.pop(); - detailContainer.id = containerPathArray.pop(); - detailTab.id = detailSection.id.replace('-section', '-tab'); - - - // 设置容器样式:卡片模板和列表模板在样式上不同 - switch (parentContainerType) { - case 'MainContainer': { - detailContainer.class = 'f-struct-wrapper'; - detailSection.class = 'f-section-tabs f-section-in-mainsubcard'; - detailTab.class = 'f-component-tabs f-tabs-has-grid'; - break; - } - case 'RightMainContainer': { - detailContainer.class = 'f-struct-wrapper'; - detailSection.class = 'f-section-tabs f-section-in-main'; - detailTab.class = 'f-component-tabs'; - - } - } - - return { detailContainer, detailSection, detailTab }; - } - - /** - * 从表区域启用填充 - * @param detailContainer 从表container - * @param mainContainer 从表所在父容器 - */ - private adaptChildFill(detailContainer: any, mainContainer: any) { - const mainContainerCls = mainContainer.appearance && mainContainer.appearance.class || ''; - if (mainContainerCls.includes('f-page-child-fill')) { - detailContainer.appearance.class += ' f-struct-wrapper-child'; - - const section = detailContainer.contents[0]; - section.fill = true; - - const tab = section.contents[0]; - tab.contentFill = true; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/export.ts deleted file mode 100644 index aa2d72776f193d13101d757cbed24c7a16cf9b63..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/export.ts +++ /dev/null @@ -1,19 +0,0 @@ -import FdSplitterComponent from './component/fd-splitter'; -import { SplitterPaneSchema, SplitterSchema } from './schema/schema'; -import FdSplitterTemplates from './templates'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdSplitterPaneComponent from './component/fd-splitter-pane'; - - -export const Splitter: ComponentExportEntity = { - type: 'Splitter', - component: FdSplitterComponent, - template: FdSplitterTemplates, - metadata: SplitterSchema -}; - -export const SplitterPane: ComponentExportEntity = { - type: 'SplitterPane', - component: FdSplitterPaneComponent, - metadata: SplitterPaneSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/property/property-config.ts deleted file mode 100644 index 1ef4c089f3345f93e7e97723ccf2c4370b944a6e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/property/property-config.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ElementPropertyConfig } from "@farris/ide-property-panel"; -import { UniformEditorDataUtil } from "@farris/designer-services"; -import { ContainerUsualProp } from "../../common/property/container-property-config"; - -export class SplitterProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 外观属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: this.getCommonAppearanceProperties() - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/schema/schema.ts deleted file mode 100644 index dbb817edb1938d86b7fef69c060894ea9392517d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/schema/schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const SplitterSchema = { - id: 'splitter', - type: 'Splitter', - visible: true, - appearance: null, - orientation: 'horizontal', - contents: [] -}; - - - -export const SplitterPaneSchema = { - id: 'splitter-pane', - type: 'SplitterPane', - visible: true, - appearance: null, - resizable: false, - resizeHandlers: '', - contents: [] -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/form.ts deleted file mode 100644 index 9e2667f188ebe4f0527f96550465a560f42244fc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/form.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default (ctx: any) => { - let splitterPaneBodys = ''; - - ctx.component.contents.forEach((splitterPane, index) => { - - splitterPaneBodys += ` - - ${ctx.splitterPaneComponents[index]} - - `; - - }); - - - return ` -
    - - ${splitterPaneBodys} - -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/splitter/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar-item.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar-item.ts deleted file mode 100644 index bf17371cb7aa8169a6cf669426055d27b1bfe387..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar-item.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { TabToolbarItemSchema } from './../schema/schema'; -import FdToolBarItemComponent from '../../../command/toolbar/component/toolbaritem/component/fd-toolbar-item'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import TabToolBarItemProp from '../property/tab-toolbar-item-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DomService } from '@farris/designer-services'; - -export default class FdTabToolBarItemComponent extends FdToolBarItemComponent { - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = ''; - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componnentId; - } - getDefaultSchema() { - return TabToolbarItemSchema; - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop: TabToolBarItemProp = new TabToolBarItemProp(serviceHost.getService('Injector'), this.viewModelId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropertyConfig(this.component); - return propertyConfig; - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - this.parent.onPropertyChanged(changeObject); - } - - /** - * 设置标签页按钮的展示名称和路径,用于交互面板已绑定事件窗口 - */ - setComponentBasicInfoMap() { - if (!this.component) { - return; - } - const title = this.component['title']; - const domService = this.options.designerHost.getService('DomService') as DomService; - domService.controlBasicInfoMap.set(this.component.id, { - showName: title, - parentPathName: `${this.options['parentTabPge'].title} > ${title}` - }); - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar.ts deleted file mode 100644 index ee3237f384438a2d6a995ec09bd244f1283db0d0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab-toolbar.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FdToolBarComponent from '../../../command/toolbar/component/fd-toolbar'; -// import { NocodeTabToolBarProp } from '../property/nocode-tab-toolbar-property-config'; -import { TabToolBarProp } from '../property/tab-toolbar-property-config'; -import { TabToolbarItemSchema, TabToolbarSchema } from '../schema/schema'; -import FdTabToolBarItemComponent from './fd-tab-toolbar-item'; - -export default class FdTabToolBarComponent extends FdToolBarComponent { - - /** 按钮对齐方式 */ - justifyContentEnd = true; - envType: DesignerEnvType; - - constructor(component: any, options: any) { - super(component, options); - this.items = this.component.contents; - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componnentId; - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - if (this.envType !== DesignerEnvType.noCode) { - this.customToolbarConfigs = [ - { - id: 'appendItem', - title: '新增按钮', - icon: 'f-icon f-icon-plus-circle text-white', - click: (e) => { - e.stopPropagation(); - this.appendItem(TabToolbarItemSchema); - } - } - ]; - } - } - - getDefaultSchema(): any { - return TabToolbarSchema; - } - - getStyles(): string { - return 'flex-grow: 1; width: 100%; position: relative'; - } - /** - * Tab内部的toolbar不能移动 - */ - checkCanMoveComponent(): boolean { - return false; - } - /** - * Tab内部的toolbar不能删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - init(): void { - - this.justifyContentEnd = this.component['position'] === 'inHead'; - - // 初始化方法 - const options = Object.assign({}, this.options, { childComponents: [], parent: this }); - this.toolBarItemList = this.items.map(item => { - // this.createComponent(item, this.options, null); - this.toolBarItem = new FdTabToolBarItemComponent(item, options); - return this.toolBarItem; - }); - } - - attach(element: HTMLElement): Promise { - const superAttach = super.attach(element); - this.addEventListener(this.element, 'click', (event) => { - event.stopPropagation(); - // 手动触发点击组件事件 展示属性面板 - this.parent.emit('componentClicked', { - componentInstance: this - }); - }); - return superAttach; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - // if (this.envType === DesignerEnvType.noCode) { - // const prop = new NocodeTabToolBarProp(serviceHost, this.viewModelId, this.componentId); - // const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - // return propertyConfig; - // } else { - const prop = new TabToolBarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - // } - } - - emit(eventName: string, fn: any) { - return this.parent.emit(eventName, fn); - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (['title', 'class', 'disable', 'contents'].includes(changeObject.propertyID)) { - this.triggerRedraw(); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab.ts deleted file mode 100644 index b35c16757cb33fd742848e8fb9b518c0b32b898e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tab.ts +++ /dev/null @@ -1,685 +0,0 @@ -import { TabToolbarItemSchema } from './../schema/schema'; -import { TabPageSchema, TabSchema } from '../schema/schema'; -import { ComponentSchema, BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import { cloneDeep } from 'lodash-es'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TabProp } from '../property/property-config'; -import { RowNode, TreeNode } from '@farris/ui-treetable'; -import { TabContextMenuManager } from '../context-menu/context-menu.manager'; -import { OperateUtils } from '../../../../utils/operate.utils'; -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import ToolBarComponent from '../../../command/toolbar/component/fd-toolbar'; -import FdTabToolBarComponent from './fd-tab-toolbar'; -import FdTabPageComponent from './fd-tabpage'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { DgControl, RefreshFormService } from '@farris/designer-services'; -import { ContentContainerSchema } from '../../content-container/schema/schema'; -import { SectionSchema } from '../../section/schema/schema'; -import dragula from '@farris/designer-dragula'; -import { DesignerEnvType } from '@farris/designer-services'; - -export default class FdTabComponent extends FdContainerBaseComponent { - - private isInFixedContextRules = false; - /* 标识每个标签页项label的key值 */ - get tabPageLinkKey(): string { - return `tabNav-${this.key}`; - } - /* 标识每个标签页项主体的key值 */ - get tabPageBodyKey(): string { - return `tabBody-${this.key}`; - } - /** 标识当前viewChange的key值 */ - get viewChangeKey(): string { - return `viewChange-${this.selectedTabPageId}`; - } - - /** 标签页项实例 */ - private tabPages: FdTabPageComponent[] = []; - - /** 标签页项内部的组件实例 */ - private tabPageComponents: any[]; - - /** 当前选中标签页id */ - selectedTabPageId: string; - - /* 标识当前Tab的按钮属性 */ - private toolbarSettings; - /* 标识当前Tab的扩展属性*/ - private headerExtendSettings; - /* 存在viewChange扩展时,当前项 */ - private activeTypeItem; - // 查找ref=form的项 - private formParent = null; - private multiViewContainerEl = null; - private toolBarComponent: ToolBarComponent; - - private dragulaBuilder; - - constructor(component: ComponentSchema, options: any) { - super(component, options); - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('tabs.css'); - // 增加操作按钮 新增 删除 复制等 - this.customToolbarConfigs = [ - { - id: 'appendItem', - title: '新增标签页', - icon: 'f-icon f-icon-plus-circle text-white', - click: (e) => { - e.stopPropagation(); - this.appendTabPage(); - } - } - ]; - } - /** - * 从工具箱拖拽生成的不是Tab,而是Container-Section-Tab三层结构 - */ - static getMetadataInControlBox(targetComponentInstance: FarrisDesignBaseComponent) { - const radomNum = Math.random().toString().slice(2, 6); - - const tabPageSchema = cloneDeep(TabPageSchema); - tabPageSchema.id = `tabpage_${radomNum}`; - tabPageSchema.toolbar.id = `tab_toolbar_${radomNum}`; - - const tabSchema = cloneDeep(TabSchema); - Object.assign(tabSchema, { - id: `tab_${radomNum}`, - appearance: { - class: 'f-component-tabs f-tabs-has-grid' - }, - contents: [tabPageSchema], - selected: tabPageSchema.id - }); - - const sectionSchema = cloneDeep(SectionSchema); - Object.assign(sectionSchema, { - id: `section_${radomNum}`, - appearance: { - class: 'f-section-tabs f-section-in-mainsubcard' - }, - fill: false, - showHeader: false, - contents: [tabSchema] - }); - - const containerSchema = cloneDeep(ContentContainerSchema); - Object.assign(containerSchema, { - id: `container_${radomNum}`, - appearance: { - class: 'f-struct-wrapper' - }, - contents: [sectionSchema] - }); - - - // 判断拖拽的目标容器 - const targetComponentSchema = targetComponentInstance.component; - const targetComponentClassName = (targetComponentSchema && targetComponentSchema.appearance && targetComponentSchema.appearance.class) || ''; - switch (targetComponentSchema && targetComponentSchema.type) { - case DgControl.ContentContainer.type: { - // 卡片模板:判断子表是否需要设置为填充 - if (targetComponentSchema.isLikeCardContainer && targetComponentClassName.includes('f-struct-like-card-child-fill')) { - containerSchema.appearance.class += ' f-struct-wrapper-child'; - sectionSchema.fill = true; - tabSchema.contentFill = true; - } - break; - } - case DgControl.Splitter.type: { - // 左列右卡的模板:修改容器样式 - sectionSchema.appearance.class = 'f-section-tabs f-section-in-main'; - tabSchema.appearance.class = 'f-component-tabs'; - - // 左列右卡的模板:判断子表是否需要设置为填充 - const targetSplitterPane = targetComponentInstance.element.querySelector('.f-component-splitter-pane.f-page-child-fill.drag-over'); - if (targetSplitterPane) { - containerSchema.appearance.class += ' f-struct-wrapper-child'; - sectionSchema.fill = true; - tabSchema.contentFill = true; - } - - break; - } - - } - - return containerSchema; - } - - // 新增tab页 - appendTabPage() { - const newTabPage = cloneDeep(TabPageSchema); - const random = Math.random().toString().slice(2, 6); - newTabPage.id = `tabpage_${random}`; - newTabPage.toolbar.id = `tab_toolbar_${random}`; - - this.component.contents.push(newTabPage); - this.component.currentTabPageInDesignerView = newTabPage.id; - - // 刷新页面,触发控件树更新 - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - refreshFormService.refreshFormDesigner.next(this.component.id); - - } - - getDefaultSchema(): any { - return TabSchema; - } - - getTemplateName(): string { - return 'Tab'; - } - - init(): void { - this.components = []; - - this.initTabPageInstances(); - } - - destroy() { - super.destroy(); - if (this.dragulaBuilder) { - this.dragulaBuilder.destroy(); - this.dragulaBuilder = null; - } - - } - private initTabPageInstances() { - this.tabPageComponents = []; - - let firstTabPageId = ''; - this.tabPages = []; - this.component.contents.forEach((tabPage, index) => { - // 缓存tabPage组件 - const options = Object.assign({}, this.options, { parent: this }); - const tabPageIns = new FdTabPageComponent(tabPage, options); - this.tabPages.push(tabPageIns); - this.tabPageComponents[index] = []; - // initialize empty tabs. - tabPage.contents = tabPage.contents || []; - tabPage.contents.forEach(comp => { - const tabPageComponent: any = this.createComponent(comp, this.options, null); - this.tabPageComponents[index].push(tabPageComponent); - }); - firstTabPageId = firstTabPageId ? firstTabPageId : tabPage.id; - }); - - // 将当前选中标签页id记录到DOM结构中,方便组件重绘时定位到上次的TabPage - this.selectedTabPageId = this.component.currentTabPageInDesignerView || firstTabPageId; - } - - render(): any { - - // 获取当前tab信息 - this.getToolbarAndExtendSettingsBySelected(); - - return super.render(this.renderTemplate('Tab', { - tabComponents: this.tabPageComponents.map(tabPage => this.renderComponents(tabPage)), - tabPageLinkKey: this.tabPageLinkKey, - tabPageBodyKey: this.tabPageBodyKey, - selectedTabPageId: this.selectedTabPageId, - // 按钮 - toolbarSettings: this.toolbarSettings, - // 头部扩展 - headerExtendSettings: this.headerExtendSettings, - // 获取按钮字符串的方法 - toolBarComponent: this.toolBarComponent, - // 获取viewChange字符串 - getViewChangeStr: () => this.getViewChangeStr(), - viewChangeKey: this.viewChangeKey, - })); - } - - - - attach(element: any): any { - this.loadRefs(element, { - [this.tabPageLinkKey]: 'multiple', - [this.tabPageBodyKey]: 'multiple', - [this.viewChangeKey]: 'single', - }); - - const superAttach: any = super.attach(element); - - // 注册标签页切换事件 - this.refs[this.tabPageLinkKey].forEach((tabLink, index) => { - - this.addEventListener(tabLink, 'click', (event) => { - event.preventDefault(); - event.stopPropagation(); - const taPageId = tabLink.getAttribute('id'); - const currentIndex = this.component.contents.findIndex(c => c.id === taPageId); - this.setTabPage(currentIndex, event); - - }); - this.tabPages[index].attach(tabLink); - }); - // 头部扩展配置 viewChange - if (this.headerExtendSettings) { - // 绑定 - if (this.headerExtendSettings.viewType == 'tile') { - OperateUtils.bindTileEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.headerExtendSettings.toolbarData, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl() - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.headerExtendSettings['currentTypeInDesignerView'] = this.activeTypeItem['type']; - // 通过DOM操作更新viewchange - OperateUtils.updateTileByActiveType('tile', this.activeTypeItem, this.refs[this.viewChangeKey]); - }); - - } else if (this.headerExtendSettings.viewType == 'dropdown') { - OperateUtils.bindDropdownEventForViewChange((obj, type, func) => { this.addEventListener(obj, type, func) }, this.headerExtendSettings.toolbarData, this.activeTypeItem, this.refs[this.viewChangeKey], () => { - this.findMultiViewContainerEl() - return { multiViewContainerEl: this.multiViewContainerEl }; - }, (returnActiveItem) => { - this.activeTypeItem = returnActiveItem; - // 当前结构上保存 - this.headerExtendSettings['currentTypeInDesignerView'] = this.activeTypeItem['type']; - // 通过DOM操作更新viewchange - OperateUtils.updateTileByActiveType('dropdown', this.activeTypeItem, this.refs[this.viewChangeKey]); - }); - } - } - - // 加载子组件 - this.refs[this.tabPageBodyKey].forEach((tab, index) => { - this.attachComponents(tab, this.tabPageComponents[index], this.component.contents[index].contents); - }); - // 工具栏按钮绑定事件 - const tabToolBarEle = element.querySelector('.farris-component-TabToolbar'); - if (tabToolBarEle && this.toolBarComponent) { - this.toolBarComponent.attach(tabToolBarEle); - } - - // 监听HeaderNav区域横向滚动条事件,用于改变选中标签页的图标位置 - const navTabPanel = this.element.querySelector('.farris-nav-tabs') as HTMLElement; - if (navTabPanel) { - this.setPositionOfBtnGroupWhenHScroll(navTabPanel); - } - - // 设置横向滚动条位置 - this.setHorizontalScrollbarPosition(); - - this.initDragula(); - - this.registerTabBodyScrollEvent(); - return superAttach; - } - - /** - * 横向滚动滚动条时计算工具栏位置 - * @param element 监听滚动的元素 - */ - private setPositionOfBtnGroupWhenHScroll(element) { - this.addEventListener(element, 'scroll', (e) => { - const selectDom = (e.target as any).querySelector('.dgComponentSelected'); - if (selectDom) { - const toolbar = selectDom.querySelector('.component-btn-group'); - if (this.isNavElementInViewport(selectDom, e.target)) { - this.setPositionOfBtnGroupInHeader(selectDom); - } else { - if (toolbar) { - toolbar.style.display = 'none'; - } - } - } - }); - } - - /** - * 判断标签页是否在可视化区域内 - * @param navEle 单个标签页nav div - * @param navTabsEle 整个标签页nav div的父级 - */ - private isNavElementInViewport(navEle, navTabsEle) { - - const container = navTabsEle.getBoundingClientRect(); - const box = navEle.getBoundingClientRect(); - - const isRightInView = (box.left + box.width) <= (container.left + container.width) - - const isLeftInView = (box.left + box.width) >= container.left; - - return isRightInView && isLeftInView; - } - /** - * 计算工具栏位置 - * @param tabNavEle 工具栏父级 - */ - private setPositionOfBtnGroupInHeader(tabNavEle) { - const toolbar = tabNavEle.querySelector('.component-btn-group') as HTMLElement; - if (toolbar) { - toolbar.style.display = ''; - const p = toolbar.getBoundingClientRect(); - toolbar.querySelector('div').style.left = (p.left - 26) + 'px'; - } - } - /** - * 监听tab-body的滚动事件 - */ - private registerTabBodyScrollEvent() { - // 在tab填充的场景下,滚动条会出现在tab-body上,所以需要监听tab-body的滚动事件,用于重新计算选中控件操作按钮的位置 - const tabBodyPanels = this.element.querySelectorAll('.farris-tabs-body') as NodeListOf; - if (tabBodyPanels && tabBodyPanels.length) { - tabBodyPanels.forEach(tabBody => { - this.bindingScrollEvent(tabBody); - }); - } - } - - - /** - * 切换标签页 - * @param index 标签页索引 - */ - private setTabPage(index: number, e) { - if ( - !this.tabPageComponents || - !this.tabPageComponents[index] || - !this.refs[this.tabPageBodyKey] || - !this.refs[this.tabPageBodyKey][index] - ) { - return; - } - const selectedTabId = this.component.contents[index].id; - - this.selectedTabPageId = selectedTabId; - this.component.currentTabPageInDesignerView = this.selectedTabPageId; - // 获取当前tab信息 - this.getToolbarAndExtendSettingsBySelected(); - - // 若是在控件树上点击标签页项,需要提前通知设计器标签页项的实例,否则无法切换代码编辑器内的代码 - if (!e) { - this.emit('componentClicked', { e, componentInstance: this.tabPages[index] }); - } - - // 触发重绘 - this.redraw().then(() => { - - // 触发选中单个标签页 - this.tabPages[index].triggerComponentClicked(e); - }); - - - } - - /** - * 设置横向滚动条位置 - */ - private setHorizontalScrollbarPosition() { - - const targetNavEle = this.element.querySelector('.f-state-active'); - if (targetNavEle) { - // 设置横向滚动条位置 - const targetNavEleRect = targetNavEle.getBoundingClientRect(); - const containerEleRect = targetNavEle.parentElement.getBoundingClientRect(); - this.element.querySelector('.farris-nav-tabs').scrollLeft = targetNavEleRect.left - containerEleRect.left; - - // 计算工具栏位置 - this.setPositionOfBtnGroupInHeader(targetNavEle); - } - } - - /** - * 根据当前Tab 确定按钮和扩展区域 - */ - private getToolbarAndExtendSettingsBySelected(selectedId = '') { - selectedId = selectedId ? selectedId : this.selectedTabPageId; - let selectedTab = null; - this.component.contents.forEach(tab => { - if (tab.id === selectedId) { - selectedTab = tab; - } - }); - if (!selectedTab) { - selectedTab = this.component.contents[0]; - } - if (selectedTab) { - if (selectedTab.toolbar && selectedTab.toolbar.contents && selectedTab.toolbar.contents.length > 0) { - this.toolbarSettings = selectedTab.toolbar; - } else { - this.toolbarSettings = null; - } - if (selectedTab.multiViews && selectedTab.views && selectedTab.views.toolbarData && selectedTab.views.toolbarData.length > 0) { - this.headerExtendSettings = selectedTab.views; - this.activeTypeItem = OperateUtils.viewChangeInitActiveItem(this.headerExtendSettings['currentTypeInDesignerView'] || this.headerExtendSettings['defaultType'], this.activeTypeItem, this.headerExtendSettings.toolbarData); - } else { - this.headerExtendSettings = null; - } - this.formParent = null; - this.multiViewContainerEl = null; - } else { - this.toolbarSettings = null; - } - if (this.toolbarSettings) { - // 新建当前工具栏按钮实例并渲染 - const options = Object.assign({}, this.options, { parent: this, parentTabPge: selectedTab }); - this.toolBarComponent = new FdTabToolBarComponent(this.toolbarSettings, options); - this.toolBarComponent.init(); - } - - - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: TabProp = new TabProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode, parentRowNode: RowNode) { - const menuManager = new TabContextMenuManager(this, rowNode, parentRowNode); - return menuManager.setContextMenuConfig(); - } - - private getViewChangeStr() { - return OperateUtils.getViewChangeStr(this.headerExtendSettings.toolbarData, this.headerExtendSettings.viewType, this.activeTypeItem); - } - /** - * 查找multiViewContainerEl - */ - private findMultiViewContainerEl() { - if (this.multiViewContainerEl) { - return; - } - if (!this.formParent) { - this.formParent = OperateUtils.getFormParent(this.element); - } - if (this.formParent && !this.multiViewContainerEl) { - // 查找同组的元素 - this.multiViewContainerEl = this.formParent.querySelector('.farris-component-MultiViewContainer[viewchange=' + this.headerExtendSettings.viewGroupIdentify + ']'); - } - } - /** - * 判断拖拽接收控件的范围 - * @param sourceElement 源控件 - * @param targetElement 目标控件 - */ - canAccepts(sourceElement: BuilderHTMLElement, targetElement: BuilderHTMLElement): boolean { - - const canAccepts = super.canAccepts(sourceElement, targetElement); - - if (!canAccepts) { - return false; - } - // 限定只有空的tabPage可以接收控件 - let targetElementId = targetElement.getAttribute('id'); - if (targetElementId && targetElementId.includes('-body')) { - targetElementId = targetElementId.replace('-body', ''); - } - const targetTabPage = this.component.contents.find(c => c.id === targetElementId); - if (!targetTabPage || !targetTabPage.contents || targetTabPage.contents.length !== 0) { - return false; - } - return true; - } - - /** - * 由外部触发组件内部的点击事件:在控件树上点击某一TabPage时,触发tab的切换事件 - * @param treeNode 控件树节点 - */ - triggerComponentInsideClick(treeNode: TreeNode) { - - if (!treeNode.id) { - return; - } - // 1、切换不同的标签页 - const index = this.component.contents.findIndex(c => c.id === treeNode.id); - if (treeNode.id !== this.selectedTabPageId) { - this.setTabPage(index, null); - return; - } - - // 2、同一个标签页,而且当前tabPage没有选中状态 - const currentTabPage = this.tabPages.find(tab => tab.id === this.selectedTabPageId); - if (!currentTabPage || !currentTabPage.element) { - return; - } - if (!currentTabPage.element.className.includes('dgComponentSelected')) { - // 显示边框、切换属性面板 - currentTabPage.triggerComponentClicked(null); - - } - - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - if (['titleWidth', 'autoTitleWidth', 'contentFill'].includes(changeObject.propertyID)) { - // 触发标签页整体重绘 - this.redraw(); - } - - - if (['title', 'position', 'headerTemplate'].includes(changeObject.propertyID)) { - // 触发页面重绘 - this.redraw().then(() => { - - // 触发当前选中标签页项的重绘 - if (this.selectedTabPageId && this.tabPages) { - const currentTabPage = this.tabPages.find(t => t.id === this.selectedTabPageId); - currentTabPage.triggerComponentClick(); - - const targetNavEle = this.element.querySelector('.f-state-active'); - this.setPositionOfBtnGroupInHeader(targetNavEle); - } - }); - } - - } - - /** - * 判断在可视化区域中是否隐藏容器间距和线条 - */ - hideNestedPaddingInDesginerView() { - // 控件本身样式 - const cmpClass = this.component.appearance && this.component.appearance.class || ''; - const cmpClassList = cmpClass ? cmpClass.split(' ') : []; - - // 父级节点 - const parent = this.parent && this.parent.component; - const parentClass = parent && parent.appearance && parent.appearance.class || ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - const grandParent = this.parent && this.parent.parent && this.parent.parent.component; - const grandParentClass = grandParent && grandParent.appearance && grandParent.appearance.class || ''; - const grandParentClassList = grandParentClass ? grandParentClass.split(' ') : []; - - // 1、子表区域固定层级:detail-container(f-struct-wrapper)--->detail-section(f-section-tabs)--->detail-tab(f-component-tabs) - if (cmpClassList.includes('f-component-tabs') && parentClassList.includes('f-section-tabs') && grandParentClassList.includes('f-struct-wrapper')) { - this.isInFixedContextRules = true; - return true; - } - - } - - checkCanMoveComponent(): boolean { - return !this.isInFixedContextRules; - } - - checkCanDeleteComponent(): boolean { - return !this.isInFixedContextRules; - } - - /** - * 初始化拖拽:支持标签页交换顺序 - */ - initDragula() { - if (this.dragulaBuilder) { - this.dragulaBuilder.destroy(); - } - - if (!dragula) { - return; - } - const navsElement = this.element.querySelector('.farris-nav-tabs'); - if (!navsElement || !this.refs[this.tabPageLinkKey] || this.refs[this.tabPageLinkKey].length === 0) { - return; - } - this.dragulaBuilder = dragula([navsElement], { - mirrorContainer: navsElement, // 镜像容器 - direction: 'horizontal' - }) - .on('drop', (element, target) => this.onDrop(element, target)) - .on('dragend', () => this.dragEnd()); - } - /** - * 拖拽放开事件 - * @param element 被拖拽的元素 - * @param target 目标区域 - */ - private onDrop(element: BuilderHTMLElement, target: BuilderHTMLElement) { - - const taPageId = element.getAttribute('id'); - const targetIndex = Array.from(target.children).findIndex(e => e.getAttribute('id') === taPageId); - const sourceIndex = this.component.contents.findIndex(c => c.id === taPageId); - const sourceTabPage = this.component.contents[sourceIndex]; - if (sourceIndex !== targetIndex && sourceIndex > -1 && targetIndex > -1) { - // 更新DOM结构 - this.component.contents.splice(sourceIndex, 1); - this.component.contents.splice(targetIndex, 0, sourceTabPage); - - // 因为标签页位置变化,需要重新组装tabPage实例和tabPage内部组件的实例,以便于后续通过index取值和取实例 - const sourceTabPageInstance = this.tabPages[sourceIndex]; - this.tabPages.splice(sourceIndex, 1); - this.tabPages.splice(targetIndex, 0, sourceTabPageInstance); - - const sourceTabPageCmps = this.tabPageComponents[sourceIndex]; - this.tabPageComponents.splice(sourceIndex, 1); - this.tabPageComponents.splice(targetIndex, 0, sourceTabPageCmps); - - } - } - - /** - * 拖拽结束事件 - */ - private dragEnd() { - // 重新计算标签页操作按钮的位置 - const targetNavEle = this.element.querySelector('.f-state-active'); - if (targetNavEle) { - this.setPositionOfBtnGroupInHeader(targetNavEle); - } - - // 触发控件树刷新 - const refreshService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - refreshService.refreshControlTree.next(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tabpage.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tabpage.ts deleted file mode 100644 index b06905b6ca6337383ce7f51ad9956c3a2db87c6f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/component/fd-tabpage.ts +++ /dev/null @@ -1,152 +0,0 @@ -import FdContainerBaseComponent from '../../common/containerBase/containerBase'; -import { TabPageProp } from '../property/tab-page-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TabToolbarItemSchema, TabToolbarSchema } from '../schema/schema'; -import { cloneDeep } from 'lodash-es'; -import { DomService, RefreshFormService } from '@farris/designer-services'; - -export default class FdTabPageComponent extends FdContainerBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componentId; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options && this.options.designerHost; - const prop = new TabPageProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - attach(element: HTMLElement): Promise { - const superAttach: any = super.attach(element); - this.element = element; - - // 删除标签页图标点击事件 - const removeButton = this.element.querySelector('[ref="removeTabPage"]'); - removeButton.addEventListener('click', () => { - const tabPageTitle = removeButton.getAttribute('tabPageTitle') || ''; - const tabPageId = removeButton.getAttribute('tabPageId') || ''; - - this.removeTabPage(tabPageTitle, tabPageId); - }); - - // 新增工具栏图标点击事件 - const addToolbarButton = this.element.querySelector('[ref="addToolbar"]'); - if (addToolbarButton) { - addToolbarButton.addEventListener('click', () => { - this.addToolbarForTabPage(); - }); - } - - this.setToolbarParentPathName(); - return superAttach; - } - - private setToolbarParentPathName() { - if (!this.component.toolbar || !this.component.toolbar.contents) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - const toolbarBtns = this.component.toolbar.contents || []; - toolbarBtns.forEach(button => { - domService.controlBasicInfoMap.set(button.id, { - showName: button.title, - parentPathName: `${this.component.title} > ${button.title}` - }); - }); - } - - triggerComponentClicked(e) { - // 切换标签页时,清空上个标签页记录的滚动节点 - this.parent.scrollElementId = null; - - // 触发显示蓝色边框和按钮 - this.triggerComponentClick(); - - // 切换到当前标签页的属性面板 - this.parent.emit('componentClicked', { e, componentInstance: this }); - } - /** - * 移除标签页 - * @param tabPageTitle 标签页的标题 - * @param tabPageId 标签页的标识 - */ - removeTabPage(tabPageTitle: string, tabPageId: string) { - const msgService = this.options.designerHost.getService('MessagerService'); - if (!msgService || !msgService.question) { - return; - } - msgService.question(`确定删除标签页【${tabPageTitle}】?`, () => { - const contents = this.parent.component.contents; - const index = contents.findIndex(content => content.id === this.component.id); - contents.splice(index, 1); - - // 若删除的标签页为默认标签页,则需要重置默认标签页 - if (this.parent.component.selected === tabPageId) { - this.parent.component.selected = contents.length ? contents[0].id : null; - } - // 删除后显示第一个标签页 - this.parent.component.currentTabPageInDesignerView = contents.length ? contents[0].id : null; - - // 调用子级组件的删除回调方法 - this.removeChildComponent(index); - - // 刷新页面,触发控件树更新 - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - refreshFormService.refreshFormDesigner.next(this.parent.component.id); - - // 需要清除属性面板的数据 - this.parent.emit('clearPropertyPanel'); - - }); - - } - - /** - * 调用标签页下子组件的[删除后事件],主要用于删除ComponentRef关联的Component和ViewModel - * @param index 当前标签页索引 - */ - removeChildComponent(index: number): void { - // Tab上记录的所有的子组件,这里将所有TabPage的子组件放到一起了,所以需要再筛选一遍当前TabPage的子组件 - const childComponents = this.parent.tabPageComponents[index]; - if (childComponents) { - childComponents.forEach(c => { - if (c.onRemoveComponent) { c.onRemoveComponent(); } - }); - } - - } - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - this.parent.onPropertyChanged(changeObject); - } - - /** - * 新增工具栏,用于标签页没有工具栏的场景 - */ - private addToolbarForTabPage() { - const random = Math.random().toString().slice(2, 6); - if (!this.component.toolbar || !this.component.toolbar.contents) { - this.component.toolbar = cloneDeep(TabToolbarSchema); - this.component.toolbar.id = 'tab-toolbar-' + random; - } - - const newTabToolbarItem = cloneDeep(TabToolbarItemSchema); - newTabToolbarItem.id = 'tab-toolbaritem-' + random; - - this.component.toolbar.contents.push(newTabToolbarItem); - - this.parent.redraw(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu-config.ts deleted file mode 100644 index d5f6ce7b9a13f9eb7940a6debce706bd5e93411b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu-config.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const contextMenu = [ - { - title: '添加子级', - id: 'addChildContent', - children: [ - { - title: '标签页项', - id: 'TabPage' - }, - { - title: '表格', - id: 'DataGrid' - }, - { - title: '附件上传预览', - id: 'FileUploadPreview' - } - ] - }, - { - title: '切换为分组面板', - id: 'changeToSection' - }, - { - title: '移动至标签页', - id: 'moveToTab' - } -]; - - -export const tabPageContextMenu = [ - { - title: '添加子级', - id: 'addChildContent', - children: [ - { - title: '表格', - id: 'DataGrid' - }, - { - title: '附件上传预览', - id: 'FileUploadPreview' - } - ] - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu.manager.ts deleted file mode 100644 index 2c76a2760b1dfee46d897f5ff6571c16dbe76904..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { contextMenu, tabPageContextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { TabChangeToSectionService } from './services/change-to-section.service'; -import { ControlService } from '../../../../service/control.service'; -import { MessagerService } from '@farris/ui-messager'; -import { TabMoveToTabService } from './services/move-to-tab.service'; -import { TabChildContentContextMenuService } from './services/child-content.service'; -import { DgControl } from '../../../../utils/dg-control'; -import { ControlTreeNode } from '@farris/designer-devkit'; - - - -export class TabContextMenuManager extends ContextMenuManager { - - private changeToSectionService: TabChangeToSectionService; - private moveToTabService: TabMoveToTabService; - private childContentService: TabChildContentContextMenuService; - private parentRowNode: RowNode; - - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode, parentRowNode: RowNode) { - super(cmp, rowNode); - this.parentRowNode = parentRowNode; - - const controlService = this.injector.get(ControlService); - const msgService = this.injector.get(MessagerService); - - this.changeToSectionService = new TabChangeToSectionService(this.notifyService, controlService, msgService, this.refreshFormService); - this.moveToTabService = new TabMoveToTabService(this.notifyService, this.refreshFormService, this.domService); - this.childContentService = new TabChildContentContextMenuService(this.notifyService, controlService, this.refreshFormService, this.domService, this.injector, parentRowNode); - - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - const parentTreeNode = this.parentRowNode && this.parentRowNode.node as ControlTreeNode; - if (parentTreeNode && parentTreeNode.rawElement.type === DgControl.Tab.type) { - menuConfig = cloneDeep(tabPageContextMenu) as ControlContextMenuItem[]; - } - if (!menuConfig) { - return []; - } - - menuConfig = this.changeToSectionService.assembleChangeToSectionMenu(this.cmpInstance, menuConfig); - - menuConfig = this.moveToTabService.assembleMoveToTabMenu(this.cmpInstance, menuConfig); - - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig; - } - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - switch (menu.parentMenuId) { - // 移动至其他标签页 - case 'moveToTab': { - this.moveToTabService.moveToTab(menu.id); - break; - } - // 添加子级 - case 'addChildContent': { - this.childContentService.addChildContent(this.cmpInstance, menu, this.rowNode); - break; - } - default: { - // 切换为分组面板 - if (menu.id === 'changeToSection') { - this.changeToSectionService.changeToSection(); - } else { - this.notifyService.warning('暂不支持'); - } - } - } - - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/change-to-section.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/change-to-section.service.ts deleted file mode 100644 index a3a2e5a8d2be3faf1cc4bf3c3ebdb8ada6155b68..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/change-to-section.service.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { NotifyService } from '@farris/ui-notify'; - -import { cloneDeep } from 'lodash-es'; -import { MessagerService } from '@farris/ui-messager'; -import { ControlService } from '../../../../../service/control.service'; -import { DomService, RefreshFormService } from '@farris/designer-services'; -import { ComponentSchema } from '@farris/designer-element'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DgControl } from '../../../../../utils/dg-control'; - -const CHANGE_TO_SECTION_COMMAND = 'changeToSection'; - -/** - * 标签页切换为分组面板 - */ -export class TabChangeToSectionService { - - /** tab组件实例 */ - private cmpInstance: FarrisDesignBaseComponent; - - constructor( - private notifyService: NotifyService, - private controlService: ControlService, - private msgService: MessagerService, - private refreshFormService: RefreshFormService - ) { } - - /** - * 组装是否支持切换为分组面板Section的菜单 - * @param tabElement 当前标签页节点 - * @param menuConfig 右键菜单 - */ - assembleChangeToSectionMenu(cmp: FarrisDesignBaseComponent, menuConfig: ControlContextMenuItem[]) { - this.cmpInstance = cmp; - - const tabElement = cmp.component; - const sectionMenu = menuConfig.find(menu => menu.id === CHANGE_TO_SECTION_COMMAND); - if (!sectionMenu) { - return menuConfig; - } - - const checkResult = this.checkCanChangeToSection(tabElement); - if (checkResult) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_SECTION_COMMAND); - } - return menuConfig; - - } - - private checkCanChangeToSection(tabElement: ComponentSchema) { - - // 1、不包含tabPage,不允许切换 - if (!tabElement.contents || tabElement.contents.length === 0) { - return '空标签页不支持切换分组面板'; - } - // 2、标准模板规定container-section-tab 是成对出现三层结构,转换后的section结构也是container-section - const sectionElement = this.cmpInstance.parent.component; - if (!sectionElement || sectionElement.type !== DgControl.Section.type) { - return '标签页的父级不是分组面板,不支持切换分组面板'; - } - const containerElement = this.cmpInstance.parent.parent.component; - if (!containerElement || containerElement.type !== DgControl.ContentContainer.type) { - return '标签页的祖父级不是ConentContainer容器,不支持切换分组面板'; - } - - // 3、限制三个结构的class样式 - if (!tabElement.appearance || !tabElement.appearance.class || !tabElement.appearance.class.includes('f-component-tabs')) { - return '标签页的class样式不包含f-component-tabs,不支持切换分组面板'; - } - if (!sectionElement.appearance || !sectionElement.appearance.class || !sectionElement.appearance.class.includes('f-section-tabs')) { - return '分组面板的class样式不包含f-section-tabs,不支持切换分组面板'; - } - if (!containerElement.appearance || !containerElement.appearance.class || !containerElement.appearance.class.includes('f-struct-wrapper')) { - return 'ContentContainer容器的class样式不包含f-struct-wrapper,不支持切换分组面板'; - } - - // 双列表标签页模板中各层级有特定的class填充样式,若在标签页和分组之间来回切换,会造成样式丢失。 - const domService = this.cmpInstance.options.designerHost.getService('DomService') as DomService; - if (domService && domService.module && domService.module.templateId === 'double-list-in-tab-template') { - return '双列表标签页模板,不支持切换分组面板'; - } - - return; - } - - /** - * Tab切换为Section - * Contaienr-Section-Tab-TabPage-ComponentRef 切换为多个[Container-Section-ComponentRef] - */ - changeToSection() { - const tabElement = this.cmpInstance.component; - - this.msgService.question('标签页切换为分组面板后,将仅保留标题、按钮属性,确定切换?', () => { - - const originSectionElement = this.cmpInstance.parent.component; - const originContainerElement = this.cmpInstance.parent.parent.component; - const originContainerParentElement = this.cmpInstance.parent.parent.parent.component; - - if (!originContainerParentElement) { - this.notifyService.warning('无法定位容器父节点'); - return; - } - - // 组装container-section-component 三层结构 - const newContainerList = []; - tabElement.contents.forEach(tabPage => { - const title = tabPage.title; - const idPostfix = this.getControlIdPostfix(tabPage); - - const container = cloneDeep(originContainerElement); - container.id = container.id + '-' + idPostfix; - - const section = cloneDeep(originSectionElement); - section.id = section.id + '-' + idPostfix; - // 配置页头 - section.showHeader = true; - section.mainTitle = title; - section.enableMaximize = false; - section.enableAccordion = false; - section.appearance.class = section.appearance.class.replace('f-section-tabs', ''); - section.multiViews = tabPage.multiViews; - section.views = tabPage.views; - - // 配置内容 - section.contents = tabPage.contents; - - // 配置按钮 - if (tabPage.toolbar && tabPage.toolbar.contents && tabPage.toolbar.contents.length) { - section.toolbar = this.controlService.getControlMetaData(DgControl.SectionToolbar.type); - section.toolbar.position = tabPage.toolbar.position; - - tabPage.toolbar.contents.forEach(tabToolbarItem => { - tabToolbarItem.type = DgControl.SectionToolbarItem.type; - section.toolbar.contents.push(tabToolbarItem); - }); - } - - container.contents = [section]; - newContainerList.push(container); - }); - - - const containerIndex = originContainerParentElement.contents.findIndex(c => c.id === originContainerElement.id); - originContainerParentElement.contents.splice(containerIndex, 1, ...newContainerList); - - - this.notifyService.success('切换成功'); - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - }); - - - - } - - - /** - * 根据tab的上下文获取新建控件的id后缀 - * @param sectionElement section元素 - */ - private getControlIdPostfix(tabPageElement: any) { - let idPostfix = Math.random().toString(36).slice(2, 6); - const componentRef = tabPageElement.contents.find(c => c.type === DgControl.ComponentRef.type); - if (componentRef) { - idPostfix = componentRef.id.replace('-component-ref', ''); - } - const multiViewContainer = tabPageElement.contents.find(c => c.type === DgControl.MultiViewContainer.type); - if (multiViewContainer) { - idPostfix = multiViewContainer.dataSource + '-' + idPostfix; - } - - return idPostfix; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/child-content.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/child-content.service.ts deleted file mode 100644 index e03c41f82098b1d82b2b088b005bcac8727fdfba..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/child-content.service.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { NotifyService } from '@farris/ui-notify'; -import { RefreshFormService, ComponentResolveContext, ComponentBindingSourceContext, DomService } from '@farris/designer-services'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { ControlService } from '../../../../../service/control.service'; -import { DgControl } from '../../../../../utils/dg-control'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { ControlTreeNode } from '@farris/designer-devkit'; -import { cloneDeep } from 'lodash-es'; -import { DragResolveService } from '@farris/designer-devkit'; -import { Injector } from '@angular/core'; -import { RowNode } from '@farris/ui-treetable'; -import { TabToolbarItemSchema } from '../../schema/schema'; - - -export class TabChildContentContextMenuService { - - /** tab组件实例 */ - private cmpInstance: FarrisDesignBaseComponent; - - constructor( - private notifyService: NotifyService, - private controlService: ControlService, - private refreshFormService: RefreshFormService, - private domService: DomService, - private injector: Injector, - private parentRowNode: RowNode - ) { } - - /** - * 添加子级 - */ - addChildContent(cmpInstance: FarrisDesignBaseComponent, menuConfig: ControlContextMenuItem, rowNode: RowNode) { - this.cmpInstance = cmpInstance; - const parentTreeNode = this.parentRowNode && this.parentRowNode.node as ControlTreeNode; - if (parentTreeNode && parentTreeNode.rawElement.type === DgControl.Tab.type) { - this.childContentAddedToTabPage(menuConfig, rowNode); - - } else { - this.childContentAddedToTab(menuConfig); - } - } - - /** - * 右键选中Tab:支持添加空标签页、列表组件、附件上传预览组件(后两者默认添加到新标签页) - * @param menuItem 右键配置 - */ - private childContentAddedToTab(menuItem: ControlContextMenuItem) { - - const rawTabDom = this.cmpInstance.component; - - switch (menuItem.id) { - case DgControl.TabPage.type: { - // 添加空标签页 - const newTabPage = this.createEmptyTabPage(); - rawTabDom.contents.push(newTabPage); - - this.refreshFormService.refreshFormDesigner.next(rawTabDom.id); - break; - } - case DgControl.DataGrid.type: case DgControl.FileUploadPreview.type: { - // 添加列表、附件 - const componentResolveContext = new ComponentResolveContext(); - componentResolveContext.controlType = menuItem.id; - componentResolveContext.parentComponentInstance = { type: DgControl.Tab.type }; - componentResolveContext.needExcludeDisplayedEntity = menuItem.id === DgControl.FileUploadPreview.type; - - const dragResolveService = this.injector.get(DragResolveService); - - dragResolveService.triggerBindingEntity(componentResolveContext).subscribe( - (componentBindingSourceContext: ComponentBindingSourceContext) => { - if (!componentBindingSourceContext) { - return; - } - const componentRefParentElement = this.createEmptyTabPage(); - - if (componentBindingSourceContext.viewModelNode) { - componentRefParentElement.title = componentBindingSourceContext.viewModelNode.name; - const idPrefix = componentBindingSourceContext.viewModelNode.id.replace('-component-viewmodel', ''); - componentRefParentElement.id = idPrefix + '-tab-page'; - componentRefParentElement.toolbar.id = idPrefix + '-tab-toolbar'; - - } - rawTabDom.contents.push(componentRefParentElement); - - this.insertComponent(componentBindingSourceContext, componentRefParentElement); - - // 添加列表后,在tabpage上追加新增、删除按钮 - if (menuItem.id === DgControl.DataGrid.type) { - componentResolveContext.bindingSourceContext = componentBindingSourceContext; - componentResolveContext.parentComponentInstance = { type: DgControl.TabPage.type }; - dragResolveService.appendAddDeleteBtnToParentContainer(componentResolveContext, componentRefParentElement); - } - - this.refreshFormService.refreshFormDesigner.next(); - }); - - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - } - - /** - * 右键选中TabPage:支持添加列表组件、附件上传预览组件(在当前TabPage下添加) - * @param menuItem 右键配置 - * @param rightMenuElement 控件树右键的控件节点 - */ - private childContentAddedToTabPage(menuItem: ControlContextMenuItem, rowNode: RowNode) { - switch (menuItem.id) { - case DgControl.DataGrid.type: case DgControl.FileUploadPreview.type: { - // 添加列表、附件 - const componentRefParentElement = this.cmpInstance.component.contents.find(c => c.id === rowNode.id); - if (this.checkComponentExisted(menuItem, componentRefParentElement)) { - this.notifyService.warning('【' + componentRefParentElement.title + '】内已存在' + menuItem.title + '控件,不能重复添加'); - return; - } - const componentResolveContext = new ComponentResolveContext(); - componentResolveContext.controlType = menuItem.id; - componentResolveContext.parentComponentInstance = { type: DgControl.Tab.type }; - componentResolveContext.needExcludeDisplayedEntity = menuItem.id === DgControl.FileUploadPreview.type; - - const dragResolveService = this.injector.get(DragResolveService); - - dragResolveService.triggerBindingEntity(componentResolveContext).subscribe( - (componentBindingSourceContext: ComponentBindingSourceContext) => { - if (componentBindingSourceContext) { - this.insertComponent(componentBindingSourceContext, componentRefParentElement); - - // 添加列表后,在tabpage上追加新增、删除按钮 - if (menuItem.id === DgControl.DataGrid.type) { - componentResolveContext.bindingSourceContext = componentBindingSourceContext; - componentResolveContext.parentComponentInstance = { type: DgControl.TabPage.type }; - dragResolveService.appendAddDeleteBtnToParentContainer(componentResolveContext, componentRefParentElement); - } - this.refreshFormService.refreshFormDesigner.next(); - } - - }); - - - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - } - - /** - * 右键创建空标签页 - */ - private createEmptyTabPage() { - const tabPageMetadata = this.controlService.getControlMetaData(DgControl.TabPage.type); - - const randomNum = Math.random().toString(36).slice(2, 6); - - tabPageMetadata.id = 'tab-page-' + randomNum; - tabPageMetadata.toolbar.id = 'tab-toolbar-' + randomNum; - - // const toolbarItem = cloneDeep(TabToolbarItemSchema); - // toolbarItem.id = 'tab-toolbaritem-' + randomNum; - // tabPageMetadata.toolbar.contents = [toolbarItem]; - - return tabPageMetadata; - } - - /** - * 将组件相关节点插入DOM - * @param componentBindingSourceContext 组件构造信息 - * @param componentRefParentNode 组件引用节点的父节点 - */ - private insertComponent(componentBindingSourceContext: ComponentBindingSourceContext, componentRefParentElement: any) { - const { componentNode, componentRefNode, viewModelNode } = componentBindingSourceContext; - this.domService.addComponent(componentNode); - this.domService.addViewModel(viewModelNode); - - componentRefParentElement.contents.push(componentRefNode); - } - - /** - * 检查是否存在同类型的组件 - */ - private checkComponentExisted(menuItem: ControlContextMenuItem, componentRefParentElement: any) { - - for (const content of componentRefParentElement.contents) { - if (content.type === DgControl.ComponentRef.type) { - const comp = this.domService.getComponentById(content.component); - if (comp && comp.componentType && comp.componentType.toLowerCase() === menuItem.id.toLowerCase()) { - return true; - } - } - } - - - } -} - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/move-to-tab.service.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/move-to-tab.service.ts deleted file mode 100644 index ef133d55e5f5ac0a8c2c381a8e63cf1a1f66aa4d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/context-menu/services/move-to-tab.service.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { NotifyService } from '@farris/ui-notify'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; - -import { RefreshFormService, DomService } from '@farris/designer-services'; -import { ComponentSchema } from '@farris/designer-element'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { DgControl } from '../../../../../utils/dg-control'; - -const MOVE_TO_TAB_COMMAND = 'moveToTab'; - -/** - * 标签页移动至其他标签页 - */ -export class TabMoveToTabService { - - /** tab组件实例 */ - private cmpInstance: FarrisDesignBaseComponent; - - // tab的祖父节点的父容器,一般指向主区域节点(卡片面板一般为like-card-container;列卡模板一般为SplitterPane) - private grandParentParentContainer: any; - - // tab的祖父节点,一般为container - private grandParentContainer: any; - - constructor( - private notifyService: NotifyService, - private refreshFormService: RefreshFormService, - private domService: DomService - ) { } - - /** - * 组装是否支持移动至标签页的菜单 - * @param dgTabElement 当前标签页节点 - * @param menuConfig 右键菜单 - */ - assembleMoveToTabMenu(cmpInstance: FarrisDesignBaseComponent, menuConfig: ControlContextMenuItem[]) { - this.cmpInstance = cmpInstance; - - const tabElement = cmpInstance.component; - - const moveToTabMenu = menuConfig.find(menu => menu.id === MOVE_TO_TAB_COMMAND); - if (!moveToTabMenu) { - return menuConfig; - } - - const checkResult = this.checkCanMoveToTab(tabElement); - if (checkResult) { - menuConfig = menuConfig.filter(menu => menu.id !== MOVE_TO_TAB_COMMAND); - return menuConfig; - } - - // 校验祖父容器的同级中有没有Container--->Tab 的层级结构 - this.grandParentContainer = this.cmpInstance.parent.parent.component; - this.grandParentParentContainer = this.cmpInstance.parent.parent.parent.component; - - // 组装子级菜单 - moveToTabMenu.children = []; - this.grandParentParentContainer.contents.forEach(container => { - if (container.type !== DgControl.ContentContainer.type) { - return; - } - const tabNode = this.domService.selectNode(container, item => item.type === DgControl.Tab.type); - if (tabNode && tabNode.id !== tabElement.id && tabNode.controlSource === tabElement.controlSource) { - moveToTabMenu.children.push({ - id: tabNode.id, - title: tabNode.id - }); - } - }); - - if (moveToTabMenu.children.length === 0) { - menuConfig = menuConfig.filter(menu => menu.id !== MOVE_TO_TAB_COMMAND); - } - - return menuConfig; - - } - - private checkCanMoveToTab(tabElement: ComponentSchema) { - - // 1、不包含tabPage,不允许切换 - if (!tabElement.contents || tabElement.contents.length === 0) { - return '空标签页不支持移动至标签页'; - } - // 2、标准模板规定container-section-tab 是成对出现三层结构,转换后的section结构也是container-section - const sectionElement = this.cmpInstance.parent.component; - if (!sectionElement || sectionElement.type !== DgControl.Section.type) { - return '标签页的父级不是分组面板,不支持移动至标签页'; - } - const containerElement = this.cmpInstance.parent.parent.component; - if (!containerElement || containerElement.type !== DgControl.ContentContainer.type) { - return '标签页的祖父级不是ConentContainer容器,不支持移动至标签页'; - } - - // 3、限制三个结构的class样式 - if (!tabElement.appearance || !tabElement.appearance.class || !tabElement.appearance.class.includes('f-component-tabs')) { - return '标签页的class样式不包含f-component-tabs,不支持移动至标签页'; - } - if (!sectionElement.appearance || !sectionElement.appearance.class || !sectionElement.appearance.class.includes('f-section-tabs')) { - return '分组面板的class样式不包含f-section-tabs,不支持移动至标签页'; - } - if (!containerElement.appearance || !containerElement.appearance.class || !containerElement.appearance.class.includes('f-struct-wrapper')) { - return 'ContentContainer容器的class样式不包含f-struct-wrapper,不支持移动至标签页'; - } - - return; - } - - /** - * tab移动至tab - * Container-Section-ComponentRef 切换为TabPage-ComponentRef - * @param sectionElement section元素 - * @param targetTabId 目标标签页id - */ - moveToTab(targetTabId: string) { - const targetTabElement = this.domService.domDgMap.get(targetTabId); - const sourceTabElement = this.cmpInstance.component; - - targetTabElement.contents = targetTabElement.contents.concat(sourceTabElement.contents); - - - // 移除tab的祖父容器 - this.grandParentParentContainer.contents = this.grandParentParentContainer.contents.filter(c => c.id !== this.grandParentContainer.id); - - this.notifyService.success('移动成功'); - - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/export.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/export.ts deleted file mode 100644 index 7471494aa82bcf549514218a9ebad260e27afba1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/export.ts +++ /dev/null @@ -1,35 +0,0 @@ -import FdTabComponent from './component/fd-tab'; -import FdTabToolBarTemplate from '../../command/toolbar/templates/form'; -import FdTabTemplates from './templates'; - -import { TabSchema, TabPageSchema, TabToolbarSchema, TabToolbarItemSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdTabToolBarComponent from './component/fd-tab-toolbar'; -import FdTabToolBarItemComponent from './component/fd-tab-toolbar-item'; -import FdTabToolBarItemTemplate from '../../command/toolbar/component/toolbaritem/templates/form'; - -export const Tab: ComponentExportEntity = { - type: 'Tab', - component: FdTabComponent, - template: FdTabTemplates, - metadata: TabSchema -}; - -export const TabPage: ComponentExportEntity = { - type: 'TabPage', - metadata: TabPageSchema -}; - -export const TabToolbar: ComponentExportEntity = { - type: 'TabToolbar', - metadata: TabToolbarSchema, - template: { form: FdTabToolBarTemplate }, - component: FdTabToolBarComponent -}; - -export const TabToolbarItem: ComponentExportEntity = { - type: 'TabToolbarItem', - metadata: TabToolbarItemSchema, - component: FdTabToolBarItemComponent, - template: { form: FdTabToolBarItemTemplate } -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/interface.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/interface.ts deleted file mode 100644 index 3deae6c801601d0e29caac007b17d35ee4ca01e6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/interface.ts +++ /dev/null @@ -1,36 +0,0 @@ - -export interface actions { - sourceComponent:{ - id:string, - viewModelId:string, - map:mapItem[], - }, -}; - -export interface mapItem { - event:{ - label:string, - name:string, - }, - command:{ - id:string, - label:string, - name:string, - handlerName:string, - params?:any, - }, - controller:{ - id:string, - label:string, - name:string, - }, - targetComponent:{ - id:string, - viewModelId:string, - }, - -} - -// export interface paramsItem { - -// } \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/property-config.ts deleted file mode 100644 index 9dc148c93c4b84f0c9d936553550eaddc0c15523..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/property-config.ts +++ /dev/null @@ -1,227 +0,0 @@ - -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ContainerUsualProp } from '../../common/property/container-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class TabProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - }, - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Farris', value: 'Farris' }, { key: 'Kendo', value: 'Kendo' }], - refreshPanelAfterChanged: true, - visible: propertyData.controlSource !== 'Farris' - } - ], - - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - switch (changeObject && changeObject.propertyID) { - case 'controlSource': { - // 变更【内容】的显隐 - const contentConfig = self.propertyConfig.find(cat => cat.categoryId === 'content'); - if (contentConfig) { contentConfig.hide = changeObject.propertyValue !== 'Farris'; } - } - } - } - }; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const props = this.getCommonAppearanceProperties(); - - props.push( - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'titleWidth', - propertyName: '标题区域宽度(%)', - propertyType: 'number', - description: '标题区域宽度占页面比', - decimals: 0, - min: 0, - max: 100 - }, - { - propertyID: 'autoTitleWidth', - propertyName: '标题自适应宽度', - propertyType: 'select', - iterator: [ - {key: true, value: '是'}, - {key: false, value: '否'} - ], - description: '开启,则显示全部字符;关闭,最多显示7个字符', - defaultValue: false - }, - { - propertyID: 'contentFill', - propertyName: '填充', - propertyType: 'select', - iterator: [ - {key: true, value: '是'}, - {key: false, value: '否'} - ], - description: 'flex布局下,填充满剩余部分', - defaultValue: false - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: props - }; - } - - - private getCurrentTabPageKeyValueMap(propertyData: any) { - const contents = propertyData.contents || []; - const keyMaps = []; - contents.forEach(tabPage => { - keyMaps.push({ - key: tabPage.id, - value: tabPage.title - }); - }); - return keyMaps; - - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const tabPageKeyValueMap = this.getCurrentTabPageKeyValueMap(propertyData); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'selected', - propertyName: '默认选中标签页', - propertyType: 'unity', - description: '运行时默认选中的标签页', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: tabPageKeyValueMap, - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - } - ] - }; - } - - - // 事件编辑器集成 - private getEventPropertyConfig(propertyData: any, viewModelId: string) { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'beforeSelect', - name: '标签页选中前事件' - }, - { - label: 'tabChange', - name: '切换标签页事件' - }, - { - label: 'tabRemove', - name: '移除标签页事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService,formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService,formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-page-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-page-property-config.ts deleted file mode 100644 index 8c645bd0e0186b98116457e33a8a0bfacc33ff21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-page-property-config.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../../container/common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class TabPageProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 工具栏位置属性 - const toolbarPropConfig = this.getToolbarPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(toolbarPropConfig); - - return this.propertyConfig; - } - - getBasicPropConfig(): ElementPropertyConfig { - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '工具栏按钮的标识', - readonly: true - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - description: '工具栏按钮的标签' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject) { - if (!changeObject) { - return; - } - if (changeObject.propertyID === 'title') { - changeObject.needUpdateControlTreeNodeName = true; - } - } - }; - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const baseAppearanceInfo = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - ...baseAppearanceInfo, - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - }], - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'removeable', - propertyName: '是否可移除', - propertyType: 'select', - iterator: [ - {key: true, value: '是'}, - {key: false, value: '否'} - ], - description: '是否可移除' - }, - { - propertyID: 'headerTemplate', - propertyName: '标签页模板', - propertyType: 'modal', - description: '标签页模板', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - ] - }; - } - - private getToolbarPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'toolbar', - categoryName: '工具栏', - propertyData: propertyData.toolbar, - enableCascade: true, - parentPropertyID: 'toolbar', - properties: [ - { - propertyID: 'position', - propertyName: '工具栏位置', - propertyType: 'select', - description: '工具栏位置设置', - iterator: [{ key: 'inHead', value: '标题区域' }, { key: 'inContent', value: '内容区域' }] - } - ] - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-item-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-item-config.ts deleted file mode 100644 index b46ec09d8684255bdfc8829b7824a7421cc6d2fd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-item-config.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EventEditorService, DomService, FormBasicService, StateMachineService, UniformEditorDataUtil, WebCmdService } from '@farris/designer-services'; -import { Injector } from '@angular/core'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class TabToolBarItemProp { - - private domService: DomService; - private stateMachineService: StateMachineService; - public viewModelId: string; - public webCmdService: WebCmdService; - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - - constructor(private injector: Injector, viewModelId: string) { - this.viewModelId = viewModelId; - this.domService = this.injector.get(DomService); - this.formBasicService = this.injector.get(FormBasicService); - this.webCmdService = this.injector.get(WebCmdService); - this.stateMachineService = this.injector.get(StateMachineService); - this.eventEditorService = this.injector.get(EventEditorService); - } - /** - * toolbarItem 属性配置 - * @param viewModelId 按钮所在视图模型ID - * @param propertyData 按钮属性 - * @param disableChildItem 是否禁用子级按钮 - * @param isFirstLevel 是否为一级按钮 - */ - public getPropertyConfig(propertyData: any) { - - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearanceItemPropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorItemPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getBasicPropConfig(): ElementPropertyConfig { - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '工具栏按钮的标识', - readonly: true - }, - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '工具栏按钮的标签', - readonly: false - } - ] - }; - } - - - private getAppearanceItemPropConfig(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: '按钮样式', - propertyType: 'string', - description: '工具栏按钮样式' - } - ] - } - ] - }; - } - - private getBehaviorItemPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - const self = this; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'disable', - propertyName: '禁用', - propertyType: 'unity', - description: '是否禁用', - editorParams: { - controlName: undefined, - constType: 'enum', - editorOptions: { - types: ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - } - ] - }; - } - - // 事件编辑器集成 - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - hideTitle: true, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-property-config.ts deleted file mode 100644 index cb87ebab09578ea4dfe431a4a9cc55a3a1e08714..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/property/tab-toolbar-property-config.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { DgControl } from '../../../../utils/dg-control'; -import { ContainerUsualProp } from '../../../container/common/property/container-property-config'; - -export class TabToolBarProp extends ContainerUsualProp { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // // 外观属性 - // const appearancePropConfig = this.getAppearancePropConfig(propertyData); - // this.propertyConfig.push(appearancePropConfig); - - // // 行为属性 - // const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(behaviorPropConfig); - - return this.propertyConfig; - - } - - - // private getAppearancePropConfig(propertyData: any): ElementPropertyConfig { - // const baseAppearanceInfo = this.getCommonAppearanceProperties(); - // const buttonInfo = [ - // { - // propertyID: 'position', - // propertyName: '位置', - // propertyType: 'select', - // iterator: [{ key: 'inHead', value: '标题区域' }, { key: 'inContent', value: '内容区域' }] - // } - // ]; - // return { - // categoryId: 'appearance', - // categoryName: '外观', - // properties: [...baseAppearanceInfo, ...buttonInfo], - // }; - // } - - // private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - - // return { - // categoryId: 'behavior', - // categoryName: '行为', - // properties: [ - // { - // propertyID: 'visible', - // propertyName: '是否可见', - // propertyType: 'unity', - // description: '运行时组件是否可见', - // editorParams: { - // controlName: UniformEditorDataUtil.getControlName(propertyData), - // constType: 'enum', - // editorOptions: { - // types: ['const', 'variable'], - // enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - // variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - // getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - // newVariableType: 'Boolean', - // newVariablePrefix: 'is' - // } - // } - // }, - // ] - // }; - // } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/schema/schema.ts deleted file mode 100644 index e40dbb8a643246a987a7fedb6dfa86139d7f087c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/schema/schema.ts +++ /dev/null @@ -1,60 +0,0 @@ -export const TabSchema = { - id: 'tab', - type: 'Tab', - controlSource: 'Farris', - appearance: null, - selected: null, - size: null, - position: 'top', - contentFill: false, - autoTitleWidth: true, - titleLength: 7, - contents: [], - tabChange: null, - tabRemove: null, - visible: true, - beforeSelect: null -}; - -export const TabPageSchema = { - id: 'tabPage', - type: 'TabPage', - controlSource: 'Farris', - title: '标题', - appearance: null, - size: null, - removeable: false, - headerTemplate: null, - contents: [], - toolbar: { - id: 'TabToolbar', - type: 'TabToolbar', - position: 'inHead', - contents: [] - }, - enableExtend: false, - extendTemplate: '', - visible: true -}; - -export const TabToolbarSchema = { - id: 'TabToolbar', - type: 'TabToolbar', - position: 'inHead', - contents: [] - -}; - -export const TabToolbarItemSchema = { - id: 'tabToolbarItem', - type: 'TabToolbarItem', - title: '按钮', - disable: false, - appearance: { - class: 'btn btn-secondary f-btn-ml' - }, - visible: true, - click: null -}; - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/form.ts deleted file mode 100644 index baa574f5e298eba978d8e132ce9a9181a554a7c1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/form.ts +++ /dev/null @@ -1,131 +0,0 @@ -export default (ctx: any) => { - - // Header样式 - let headerCls = ' farris-tabs-inContent'; - - // Header中Tab标题所占宽度比例 - let headerTitleStyle = ''; - if (hasInHeadCl(ctx)) { - headerCls = ' farris-tabs-inHead'; - headerTitleStyle = ctx.component.titleWidth ? `width:${ctx.component.titleWidth}%` : ''; - } - - // fill属性没有 - let navTabsCls = ''; - navTabsCls += ctx.component.position === 'top' || ctx.component.position === 'bottom' ? ' flex-row' : ''; - navTabsCls += ctx.component.position === 'left' || ctx.component.position === 'right' ? ' flex-column' : ''; - - // 遍历标签页,获取头部和内容区域 - const { tabPageNavs, tabPageBodys } = getTabPageTemplate(ctx); - - // 判断按钮 - let toolbarStr = ''; - if (ctx.toolbarSettings) { - toolbarStr = `
    - ${ctx.toolBarComponent.render()} -
    `; - headerCls += ' hasToolbar'; - } - - // 判断viewchange的扩展区域 - let headerExtendStr = ''; - if (ctx.headerExtendSettings) { - headerExtendStr = `
    -
    - ${ctx.getViewChangeStr()} -
    -
    `; - } - - return ` - -
    -
    -
    - -
    -
    -
    - ${toolbarStr} - ${headerExtendStr} -
    -
    - ${tabPageBodys} -
    - `; -}; - -/** - * 判断Header的样式 - */ -function hasInHeadCl(ctx: any) { - if (ctx.toolbarSettings && ctx.toolbarSettings.hasOwnProperty('position') && ctx.toolbarSettings.hasOwnProperty('contents') && ctx.toolbarSettings.position === 'inHead' && ctx.toolbarSettings.contents.length > 0) { - return true; - } - if (ctx.headerExtendSettings && !(ctx.toolbarSettings && ctx.toolbarSettings.position === 'inContent' && ctx.toolbarSettings.contents.length)) { - return true; - } - return false; -} - - -function getTabPageTemplate(ctx: any) { - - let tabPageNavs = ''; - let tabPageBodys = ''; - - - ctx.component.contents.forEach((tab, index) => { - let tabNavCls = ctx.selectedTabPageId === tab.id ? ' f-state-active farris-component' : ''; - tabNavCls += tab.disabled ? ' f-state-disabled' : ''; - - const tabBodyCls = ctx.selectedTabPageId === tab.id ? ' f-tab-active' : ' f-tab-d-none'; - - const tabStyle = tab.tabWidth ? `width:${tab.tabWidth}px` : ''; - let navLinkCls = tab.id === ctx.selectedTabPageId ? ' active' : ''; - navLinkCls += tab.disabled ? ' disabled' : ''; - let navTextStr = ''; - // 有模板 - if (tab.headerTemplate) { - navTextStr = ` ${tab.headerTemplate}`; - } else { - // farris-title-text-custom 需要计算 - navTextStr = ` ${tab.title}`; - } - // 若没有工具栏,则增加图标 - let addToolbarStr = ''; - if (!tab.toolbar || !tab.toolbar.contents || !tab.toolbar.contents.length) { - addToolbarStr = ` -
    - -
    - `; - } - tabPageNavs += ` - - `; - - tabPageBodys += ` -
    - ${ctx.tabComponents[index]} -
    - `; - }); - - return { tabPageNavs, tabPageBodys }; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/container/tab/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/component/fd-display-field.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/component/fd-display-field.ts deleted file mode 100644 index bb4b57ed6f49f21c8fab7f5303b70dadba07d359..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/component/fd-display-field.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DisplayFieldProp } from '../property/property-config'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdDisplayFieldComponent extends FarrisDesignBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - this.category = 'data'; - } - getStyles(): string { - return 'display: inline-block;'; - } - - getTemplateName(): string { - return 'DisplayField'; - } - - // 渲染模板 - render(): any { - return super.render(this.renderTemplate('DisplayField', { - component: this.component - })); - } - - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: DisplayFieldProp = new DisplayFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - if (changeObject.propertyID !== 'visible') { - this.triggerRedraw(); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/export.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/export.ts deleted file mode 100644 index da26a4308be68d0125732b7ecb2e27c619830a3d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/export.ts +++ /dev/null @@ -1,11 +0,0 @@ -import FdDisplayFieldComponent from './component/fd-display-field'; -import { DisplayFieldSchema } from './schema/schema'; -// import { ComponentExportEntity } from '@farris/designer-element'; -import FdDisplayFieldTemplates from './templates'; - - -export const DisplayField = { - type: 'DisplayField', - component: FdDisplayFieldComponent, - template: FdDisplayFieldTemplates -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/property/property-config.ts deleted file mode 100644 index 6ea1ec0f28cd7b1148da946b5d37b3a6a1a37dae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/property/property-config.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../../container/common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class DisplayFieldProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - commonProps.push( - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '组件的标签' - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'title': { - changeObject.needUpdateControlTreeNodeName = true; - break; - } - } - } - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId) - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [visibleProp] - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/schema/schema.ts deleted file mode 100644 index f62f187a2e0953b2b3887f03700f45c118eb4242..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/schema/schema.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const DisplayFieldSchema = { - id: '', - type: 'DisplayField', - title: '标签名', - appearance: { - class: '' - }, - visible: true -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/form.ts deleted file mode 100644 index ae7002564c4875a70e67f89a40d10d99c89ddd34..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/form.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (ctx: any) => { - return `` -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/display-field/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/component/fd-multi-select.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/component/fd-multi-select.ts deleted file mode 100644 index e0d14991469e7f99d0a6e073cffba50602bc3594..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/component/fd-multi-select.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { MultiSelectSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { MultiSelectProp } from '../property/property-config'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdMultiSelectComponent extends FarrisDesignBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - this.category = 'data'; - } - getStyles(): string { - return 'display: flex;flex-direction: column;'; - } - getDefaultSchema(): any { - return MultiSelectSchema; - } - - getTemplateName(): string { - return 'MultiSelect'; - } - - // 渲染模板 - render(): any { - return super.render(this.renderTemplate('MultiSelect', { - component: this.component - })); - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: MultiSelectProp = new MultiSelectProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const dynamicPropertyIDs = ['appearance.class', 'appearance.style', 'size.width', 'size.height']; - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/export.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/export.ts deleted file mode 100644 index 4759fa3eef94e1a0d34dc8aa63b6cb5b4ebb8ada..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdMultiSelectComponent from './component/fd-multi-select'; -import { MultiSelectSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdMultiSelectTemplates from './templates'; - - -export const MultiSelect: ComponentExportEntity = { - type: 'MultiSelect', - component: FdMultiSelectComponent, - template: FdMultiSelectTemplates, - metadata: MultiSelectSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/property/property-config.ts deleted file mode 100644 index b64a1ed722c34fb2ab94b7a95e0cd633d78fd606..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/property/property-config.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { SchemaService } from '@farris/designer-services'; -import { BindingEditorComponent, BindingEditorConverter, SelectSchemaFieldEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../../container/common/property/container-property-config'; -import { IDesignerHost } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export class MultiSelectProp extends ContainerUsualProp { - - private schemaService: SchemaService; - constructor(serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost, viewModelId, componentId); - - this.schemaService = serviceHost.getService('SchemaService'); - } - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 数据分配属性 - const customPropConfig = this.getDataPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - - return propertyConfig; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId) - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [visibleProp] - }; - } - - - private getDataPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const fjmFields = this.schemaService.getTreeGridUdtFields(viewModelId); - - const properties: PropertyEntity[] = [ - { - propertyID: 'dataSource', - propertyName: '数据源', - propertyType: 'string' - }, - { - propertyID: 'idField', - propertyName: 'id字段', - propertyType: 'modal', - editor: SelectSchemaFieldEditorComponent, - editorParams: { - viewModelId, - isMultiSelect: false - } - }, - { - propertyID: 'valueField', - propertyName: '值字段', - propertyType: 'modal', - editor: SelectSchemaFieldEditorComponent, - editorParams: { - viewModelId, - isMultiSelect: false - }, - showClearButton: true - }, - { - propertyID: 'textField', - propertyName: '文本字段', - propertyType: 'modal', - editor: SelectSchemaFieldEditorComponent, - editorParams: { - viewModelId, - isMultiSelect: false - }, - showClearButton: true - }, - { - propertyID: 'binding', - propertyName: '已选择数据绑定', - propertyType: 'modal', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: propertyData.componentId, controlType: propertyData.type }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'displayType', - propertyName: '显示类型', - propertyType: 'select', - visible: true, - iterator: [{ key: 'List', value: '列表' }, { key: 'Tree', value: '树型' }] - }, - { - propertyID: 'showCascadeControl', - propertyName: '启用级联控制', - propertyType: 'boolean', - visible: propertyData.displayType === 'Tree', - defaultValue: false - }, - { - propertyID: 'fjmType', - propertyName: '分级类型', - propertyType: 'select', - visible: propertyData.displayType === 'Tree', - iterator: [{ key: 'fjmField', value: '分级码字段' }, { key: 'fjdField', value: '父节点分级码字段' }] - }, - { - propertyID: 'fjmField', - propertyName: '分级码字段', - propertyType: 'select', - iterator: fjmFields, - visible: propertyData.displayType === 'Tree' && propertyData.fjmType === 'fjmField' - }, - { - propertyID: 'fjdField', - propertyName: '父节点分级码字段', - propertyType: 'select', - iterator: fjmFields, - visible: propertyData.displayType === 'Tree' && propertyData.fjmType === 'fjdField' - }, - { - propertyID: 'enableTargetSort', - propertyName: '启用调整顺序', - propertyType: 'boolean' - } - ]; - - return { - categoryId: 'multiSelect', - categoryName: '数据分配', - properties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data) { - switch (changeObject && changeObject.propertyID) { - case 'displayType': { - - this.properties.map(p => { - if (p.propertyID === 'fjmType' || p.propertyID === 'showCascadeControl') { - p.visible = changeObject.propertyValue === 'Tree'; - } else if (p.propertyID === 'fjmField') { - p.visible = changeObject.propertyValue === 'Tree' && propertyData.fjmType === 'fjmField'; - } else if (p.propertyID === 'fjdField') { - p.visible = changeObject.propertyValue === 'Tree' && propertyData.fjmType === 'fjdField'; - } - }); - - if (changeObject.propertyValue !== 'Tree') { - propertyData.showCascadeControl = false; - } - break; - } - case 'fjmType': { - const fjmField = this.properties.find(p => p.propertyID === 'fjmField'); - const fjdField = this.properties.find(p => p.propertyID === 'fjdField'); - if (fjmField) { - fjmField.visible = propertyData.fjmType === 'fjmField'; - } - if (fjdField) { - fjdField.visible = propertyData.fjmType === 'fjdField'; - } - - } - } - } - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/schema/schema.ts deleted file mode 100644 index dcc7adc641c72765cbb36a04f7c916ca6593e89e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/schema/schema.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const MultiSelectSchema = { - id: 'multi-select', - type: 'MultiSelect', - visible: true, - appearance: null, - binding: null, - dataSource: 'viewModel.bindingData', - idField: '', - valueField: '', - textField: '', - displayType: 'List', - showCascadeControl: false, - enableTargetSort: true -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/form.ts deleted file mode 100644 index 86a61ddc093e4738a94d9313e585ac3b62855f21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/form.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default (ctx: any) => { - return `
    -
    -
    - 未选择 ( 0 / 0 ) -
    - -
    - -
    -
    -
    -
      -
    • 暂无数据
    • -
    -
    -
    -
    -
    - - - - -
    -
    -
    - 已选择 (0) -
    -
      - -
    -
    -
    -
    - -
    - - - - -
    -
    ` -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/data/multi-select/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/filter-common-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/filter-common-property-config.ts deleted file mode 100644 index 402c8d69636def6bd43cfbf0b499e3f0072ed965..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/filter-common-property-config.ts +++ /dev/null @@ -1,59 +0,0 @@ - -import { EventEditorService, DomService, FormBasicService, RefreshFormService, WebCmdService, UniformEditorDataUtil, StateMachineService } from "@farris/designer-services"; -import { IDesignerHost } from "@farris/designer-element"; -import { MessagerService } from "@farris/ui-messager"; -import { NotifyService } from "@farris/ui-notify"; - -export class FilterCommonProp { - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public msgService: MessagerService; - public notifyService: NotifyService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - stateMachineService: StateMachineService; - - constructor( - private serviceHost: IDesignerHost, - viewModelId: string, - componentId: string, - ) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.domService = serviceHost.getService('DomService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - const injector = serviceHost.getService('Injector'); - this.notifyService = injector.get(NotifyService); - this.msgService = injector.get(MessagerService); - this.stateMachineService = serviceHost.getService('StateMachineService'); - - } - - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/nocode-filter-common-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/nocode-filter-common-property-config.ts deleted file mode 100644 index 2c0a22713bdd5a3494d160827ee5181ce151d7ab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/common/property/nocode-filter-common-property-config.ts +++ /dev/null @@ -1,57 +0,0 @@ - -import { DomService, FormBasicService, RefreshFormService, WebCmdService, UniformEditorDataUtil, StateMachineService } from "@farris/designer-services"; -import { IDesignerHost } from "@farris/designer-element"; -import { MessagerService } from "@farris/ui-messager"; -import { NotifyService } from "@farris/ui-notify"; - -export class NoCodeFilterCommonProp { - public formBasicService: FormBasicService; - public refreshFormService: RefreshFormService; - public domService: DomService; - public msgService: MessagerService; - public notifyService: NotifyService; - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - stateMachineService: StateMachineService; - - constructor( - private serviceHost: IDesignerHost, - viewModelId: string, - componentId: string, - ) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.domService = serviceHost.getService('DomService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - const injector = serviceHost.getService('Injector'); - this.notifyService = injector.get(NotifyService); - this.msgService = injector.get(MessagerService); - this.stateMachineService = serviceHost.getService('StateMachineService'); - - } - - - getVisiblePropertyEntity(propertyData: any, viewModelId: string) { - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/control-mapping.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/control-mapping.ts deleted file mode 100644 index 2d5dd55c556757cdefb7c5b64efcbb635dbac64b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/control-mapping.ts +++ /dev/null @@ -1,46 +0,0 @@ -export const ListFilterControlMapping = { - // 文本 - text: 'TextBox', - - // 搜索 - search: 'Search', - // 帮助 - help: 'LookupEdit', - - // 下拉选择 - dropdown: 'EnumField', - - // 复选组 - checkboxgroup: 'CheckGroup', - - // 数值区间 - number: 'NumberRange', - - // 单选组 - radio: 'RadioGroup', - - // 年度 - year: 'DateBox', - - // 年度范围 - yearRange: 'DateRange', - - // 年月 - month: 'DateBox', - - // 年月范围 - monthRange: 'DateRange', - - // 智能输入框 - 'input-group': 'InputGroup', - - // 日期 - singleDate: 'DateBox', - - // 日期区间 - date: 'DateRange', - - // 日期时间区间 - datetime: 'DateRange' - -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/fd-list-filter.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/fd-list-filter.ts deleted file mode 100644 index 1401527f85701b232fddfc14446deb6fa7c9b3cb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/fd-list-filter.ts +++ /dev/null @@ -1,249 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { ListFilterSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ListFilterProp } from '../property/property-config'; -import { ListFilterItemComponent } from './filter-item/component/fd-filter-item'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { RowNode } from '@farris/ui-treetable'; -import { ListFilterContextMenuManager } from '../context-menu/context-menu.manager'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { DomService, DesignerEnvType, FormBasicService, WebCmdService, SchemaService, FormSchemaEntityField$Type } from '@farris/designer-services'; -import { NoCodeListFilterProp } from '../property/nocode-property-config'; -import { ListFilterFieldTypeEnums } from '../property/editor/list-filter-fields-editor/query-data/field-control-types'; -import { ListFilterFieldCreator } from '../property/editor/list-filter-fields-editor/query-data/field-control-data'; - -export default class FdListFilterComponent extends FarrisDesignBaseComponent { - - // 展示在界面上的控件模板字符串 - filterControlTpls = ''; - - // 默认收起到右侧的字段,不展示在页面上 - extendFilterList = []; - - // 展示在界面上的字段 - showInPageFilterList = []; - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('list-filter.css'); - } - - getDefaultSchema(): any { - return ListFilterSchema; - } - - - getStyles(): string { - let style = 'display:block;'; - if (this.component.controlSource === 'light') { - style += 'flex-grow: 1;flex-shrink: 1;flex-basis: 0;max-width: 100%;'; - } - return style; - } - - init(): void { - this.checkFieldSchemaAndControl(); - } - - render(): any { - this.assembleFilterControls(); - - return super.render(this.renderTemplate('ListFilter', { - component: this.component, - filterControlTpls: this.filterControlTpls, - // 展示在界面上的控件 - showInPageFilterList: this.showInPageFilterList, - // 收起的控件 - extendFilterList: this.extendFilterList, - // 是否展示收起图标 - showMoreIcon: this.extendFilterList.length > 0, - // 展示在外部的控件个数 - showFilterListLength: this.component.filterList ? this.component.filterList.length - this.extendFilterList.length : 0 - })); - } - - /** - * 构造筛选项 - */ - private assembleFilterControls(): void { - const filterList = this.component.filterList || []; - - this.extendFilterList = []; - this.showInPageFilterList = []; - this.filterControlTpls = ''; - - filterList.forEach(filterConfig => { - if (!filterConfig.control || !filterConfig.control.controltype) { - return; - } - if (filterConfig.control.isExtend) { - this.extendFilterList.push(filterConfig); - } else { - this.showInPageFilterList.push(filterConfig); - - // 常规筛选需要渲染出独立的筛选项 - if (this.component.controlSource === 'normal') { - const itemTemplate = this.renderNormalItem(filterConfig); - this.filterControlTpls += ' ' + itemTemplate; - } - - } - - }); - } - - /** - * 常规筛选:渲染单个输入框 - * @param filterConfig 配置数据 - */ - private renderNormalItem(filterConfig: any): any { - const inputProp = Object.assign({}, { - controltype: filterConfig.control.controltype, - require: filterConfig.control.required, - enumData: filterConfig.control.enumValues, - items: filterConfig.control.enumValues, - placeHolder: filterConfig.placeHolder || '', - beginPlaceHolder: filterConfig.beginPlaceHolder || '', - endPlaceHolder: filterConfig.endPlaceHolder || '', - isHorizontal: true, - groupText: filterConfig.control.groupText - }); - const itemComponent = new ListFilterItemComponent(inputProp, this.options, this); - - return itemComponent.renderItem(filterConfig); - } - - attach(element: any): any { - const superAttach: any = super.attach(element); - - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 将各筛选项追加到domservice的map中,目的是为了在交互面板【已绑定命令】中展示路径信息 - const filterList = this.component.filterList || []; - filterList.forEach(filterConfig => { - if (!filterConfig.control || !filterConfig.control.controltype) { - return; - } - domService.controlBasicInfoMap.set(filterConfig.control.id, { - showName: filterConfig.name, - parentPathName: `筛选条 > ${filterConfig.name}` - }); - }); - return superAttach; - } - - /** - * 属性面板构造数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService.envType === DesignerEnvType.noCode) { - const prop: NoCodeListFilterProp = new NoCodeListFilterProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: ListFilterProp = new ListFilterProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - - } - - - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const unMappingPropIds = ['visible', 'disable', 'binding', 'showReminder']; - - if (!unMappingPropIds.includes(changeObject.propertyID)) { - this.triggerRedraw(); - } - - - // 涉及到字段绑定事件的变更,故触发同步actions操作 - if (changeObject.propertyID === 'filterList') { - const webCmdService = this.options.designerHost.getService('WebCmdService') as WebCmdService; - webCmdService.syncActions(); - } - } - - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new ListFilterContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - /** - * 禁止移动 - */ - checkCanMoveComponent(): boolean { - return false; - } - - /** - * 删除筛选条时连带删除上层容器 - */ - onRemoveComponent() { - const parentSchema = this.parent && this.parent.component; - if (!parentSchema) { - return; - } - const parentClass = parentSchema.appearance ? parentSchema.appearance.class : ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - const grandParent = this.parent.parent; - const grandParentSchema = grandParent && grandParent.component; - - // 上层为筛选条容器,则需要将容器一同移除 - if (grandParentSchema && parentClassList.includes('f-filter-container')) { - const filterContainerIndex = grandParentSchema.contents.findIndex(c => c.id === parentSchema.id); - if (filterContainerIndex > -1) { - grandParentSchema.contents.splice(filterContainerIndex, 1); - // 为了后续触发重绘的父级组件,返回筛选条容器的父级容器 - return { parentComponentInstance: grandParent }; - } - - } - - } - /** - * 检查字段类型与控件类型的适配度 - */ - private checkFieldSchemaAndControl() { - const schemService = this.options.designerHost.getService('SchemaService') as SchemaService; - this.component.filterList.forEach(fieldConfig => { - if (!fieldConfig.id || !fieldConfig.control || !fieldConfig.labelCode) { - return; - } - const schemaField = schemService.getSchemaField('path', fieldConfig.labelCode); - // 1、字段不存在:自动删除 - if (!schemaField) { - fieldConfig.isInValid = true; - return; - } - // 2、字段由简单字段变更为复杂字段:自动删除 - if (schemaField.$type === FormSchemaEntityField$Type.ComplexField) { - fieldConfig.isInValid = true; - return; - } - const schemaFieldType = schemaField.type.name; - const allowedQueryControlTypes = ListFilterFieldTypeEnums.getControlTypeEnum(schemaFieldType, this.component.controlSource); - if (!allowedQueryControlTypes.find(type => type.key === fieldConfig.control.controltype)) { - // 3、字段类型与控件类型不匹配:自动替换控件 - const newControl = ListFilterFieldCreator.getFilterField(schemaField); - Object.assign(fieldConfig, newControl); - } - - }); - this.component.filterList = this.component.filterList.filter(config => !config.isInValid); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/component/fd-filter-item.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/component/fd-filter-item.ts deleted file mode 100644 index c17507f161b39f9420ced09985c3456a72c3d8e5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/component/fd-filter-item.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { ListFilterControlMapping } from '../../control-mapping'; - -/** - * 为了复用输入类控件的模板,这里将筛选项当做一个component - */ -export class ListFilterItemComponent extends FarrisDesignBaseComponent { - - parentListFilterInstance: FarrisDesignBaseComponent; - - constructor(component: any, options: any, parentListFilterInstance: any) { - super(component, options); - this.parentListFilterInstance = parentListFilterInstance; - } - - /** - * 渲染单个输入框 - * @param filterConfig 配置数据 - */ - renderItem(filterConfig: any): any { - const parentSchema = this.parentListFilterInstance.component; - const controlType = ListFilterControlMapping[this.component.controltype]; - const inputTemplate = this.renderTemplate(controlType, { - component: this.component - }); - return this.renderTemplate('ListFilterItem', { - component: this.component, - filterConfig, - input: inputTemplate, - autoLabel: parentSchema.autoLabel, - autoWidth: parentSchema.autoWidth, - filterClass: parentSchema.filterClass, - showFilterListLength: parentSchema.filterList ? parentSchema.filterList.length - this.parentListFilterInstance['extendFilterList'].length : 0 - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/form.ts deleted file mode 100644 index ff73248865886b6271863d5daff2e23a89e999e7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/form.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default (ctx: any) => { - const require = ctx.filterConfig.control.required ? '*' : ''; - const autoLabel = ctx.autoLabel ? ' filter-input-list-autolabel' : ''; - - const divCls = getStyle(ctx); - const itemWrapCls = ctx.autoLabel ? 'filter-item-wrap' : ''; - const item = ` -
    -
    - - ${ctx.input} -
    -
    - - `; - if (ctx.autoWidth) { - return ` -
    - ${item} -
    - `; - - } else { - return ` -
    -
    - ${item} -
    -
    - `; - } -}; - - -function getStyle(ctx: any) { - let cls = ''; - if (ctx.autoWidth) { - cls = 'filter-input-list farris-group-wrap'; - if (ctx.autoLabel) { - cls += ' filter-input-list-autolabel'; - } - if (ctx.component.alLeft) { - cls += ' filter-input-list-left'; - } - - } else { - const defaultCondtionStyle = 'col-12 col-md-6 col-xl-3 col-el-2'; - cls = (ctx.filterClass && !ctx.autoWidth) ? ctx.filterClass : defaultCondtionStyle; - } - - return cls; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/component/filter-item/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu-config.ts deleted file mode 100644 index 9b6eed65d01451926fab0d43714229544ba346ff..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu-config.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const contextMenu = [ - { - title: '切换为筛选方案', - id: 'changeToQueryScheme' - }, - { - title: '移除筛选条', - id: 'removeListFilter' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu.manager.ts deleted file mode 100644 index 35aa4490edc2765d218f4e1559ce270e467a34f0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,256 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { ComponentFactoryResolver } from '@angular/core'; -import { ListFilterBuilderService } from './filter-builder'; -import { DgControl } from '../../../../utils/dg-control'; -import { QuerySchemePresetFieldsEditorComponent } from '../../queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component'; -import { QuerySchemeBuilderService } from '../../queryScheme/context-menu/query-scheme-builder'; -import { QuerySchemeFieldsEditorComponent } from '../../queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component'; - -const CHANGE_TO_QUERYSCHEME_COMMAND = 'changeToQueryScheme'; - -export class ListFilterContextMenuManager extends ContextMenuManager { - - private msgService: MessagerService; - private modalService: BsModalService; - private resolver: ComponentFactoryResolver; - - /** 筛选条外层容器Id */ - listFilterContainerId: string; - - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.msgService = this.injector.get(MessagerService); - this.resolver = this.injector.get(ComponentFactoryResolver); - this.modalService = this.injector.get(BsModalService); - - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - menuConfig = this.assembleChangeToQuerySchemeMenu(menuConfig, this.cmpInstance.viewModelId, this.cmpInstance.id); - // menuConfig = this.assembleRemoveListFilterMenu(menuConfig, this.cmpInstance.viewModelId, this.cmpInstance.id); - - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig || []; - } - - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - switch (menu.id) { - case 'changeToQueryScheme': { - this.openQuerySchemeModal(this.cmpInstance.viewModelId); - break; - } - case 'removeListFilter': { - this.removeListFilter(this.cmpInstance.viewModelId, this.cmpInstance.id); - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - - } - - - - assembleChangeToQuerySchemeMenu(menuConfig: ControlContextMenuItem[], viewModelId: string, filterId: string) { - const changeToQuerySchemeMenu = menuConfig.find(menu => menu.id === CHANGE_TO_QUERYSCHEME_COMMAND); - if (!changeToQuerySchemeMenu) { - return menuConfig; - } - - // 根组件下的筛选条,不能切换为筛选方案---header组件下的ListFilter(前置任务),不能切换为筛选方案 - if (viewModelId === 'root-viewmodel') { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_QUERYSCHEME_COMMAND); - return menuConfig; - } - // 当前模板若不能启用筛选方案,则移除菜单 - if (!this.checkCanEnableQueryScheme()) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_QUERYSCHEME_COMMAND); - return menuConfig; - } - - // 若当前表单已有筛选方案,则移除菜单 - const rootComponent = this.domService.getComponentById('root-component'); - const querySchemeNode = this.domService.selectNode(rootComponent, item => item.type === DgControl.QueryScheme.type); - if (querySchemeNode) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_QUERYSCHEME_COMMAND); - return menuConfig; - } - - // 筛选条外层没有模板预置的容器,则不支持切换筛选方案 - const gridComponent = this.domService.getComponentByVMId(viewModelId); - const listContainerNode = this.domService.getControlParentById(gridComponent, filterId); - if (listContainerNode.type !== DgControl.ContentContainer.type || !listContainerNode.appearance || - !listContainerNode.appearance.class || !listContainerNode.appearance.class.includes('f-filter-container')) { - - // console.log('未检测到筛选条容器'); - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_QUERYSCHEME_COMMAND); - return menuConfig; - } - - this.listFilterContainerId = listContainerNode.id; - return menuConfig; - } - - openQuerySchemeModal(viewModelId: string) { - - this.msgService.question('确定切换为筛选方案?', () => { - - const compFactory = this.resolver.resolveComponentFactory(QuerySchemeFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选方案字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.value = []; - compRef.instance.editorParams = { - viewModelId, - presetFieldConfigs: [] - }; - compRef.instance.showPropertyPanel = false; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - this.openQuerySchemePresetModal(data.value, viewModelId); - } - modalPanel.close(); - }); - - }); - - } - /** - * 弹出筛选方案预置字段配置编辑器 - */ - private openQuerySchemePresetModal(fieldConfigs: any[], viewModelId: string) { - const compFactory = this.resolver.resolveComponentFactory(QuerySchemePresetFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选方案预置字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - - compRef.instance.value = []; - compRef.instance.editorParams = { - fieldConfigs - }; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - - - const filterBuilerService = new ListFilterBuilderService(this.injector); - const querySchemeBuilerService = new QuerySchemeBuilderService(this.injector); - // 1、创建筛选方案 - querySchemeBuilerService.createQuerySchemeInDocument(fieldConfigs, data.value); - - // 2、移除筛选条 - filterBuilerService.removeListFilterInDocument(viewModelId); - - // 刷新表单并隐藏属性面板 - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - - this.notifyService.success('启用成功'); - } - modalPanel.close(); - }); - - } - - /** - * 校验是否允许启用筛选方案:根据模板schema中是否包含筛选方案配置来判断 - */ - private checkCanEnableQueryScheme() { - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const querySchemeConfig = templateOutlineSchema.find(schema => schema.queryScheme && schema.queryScheme.canEnable); - - return !!querySchemeConfig; - } - - /** - * 若筛选条作为前置任务使用,则需求菜单的中文名称 - * @param menuConfig 菜单配置 - * @param viewModelId 所属视图模型id - * @param filterId 筛选条id - */ - // private assembleRemoveListFilterMenu(menuConfig: ControlContextMenuItem[], viewModelId: string, filterId: string) { - // const removeListFilterMenu = menuConfig.find(m => m.id === 'removeListFilter'); - // if (!removeListFilterMenu) { - // return menuConfig; - // } - // const component = this.domService.getComponentByVMId(viewModelId); - // const listContainerNode = this.domService.getControlParentById(component, filterId); - // const listContainerParentNode = this.domService.getControlParentById(component, listContainerNode.id); - - // const listContainerParentNodeClass = listContainerParentNode && listContainerParentNode.appearance && listContainerParentNode.appearance.class || ''; - // if (listContainerParentNodeClass.includes('f-page-header-base')) { - // removeListFilterMenu.title = '移除前置任务'; - // } - // return menuConfig; - // } - - /** - * 移除筛选条 - * @param viewModelId 所属视图模型id - * @param filterId 筛选条id - */ - private removeListFilter(viewModelId: string, filterId: string) { - - this.msgService.question('确定移除筛选条?', () => { - const gridComponent = this.domService.getComponentByVMId(viewModelId); - const listContainerNode = this.domService.getControlParentById(gridComponent, filterId); - - if (listContainerNode.type !== DgControl.ContentContainer.type || !listContainerNode.appearance || - !listContainerNode.appearance.class || !listContainerNode.appearance.class.includes('f-filter-container')) { - - listContainerNode.contents = listContainerNode.contents.filter(c => c.id !== filterId); - } else { - const listContainerParentNode = this.domService.getControlParentById(gridComponent, listContainerNode.id); - - listContainerParentNode.contents = listContainerParentNode.contents.filter(c => c.id !== listContainerNode.id); - } - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - }); - - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/filter-builder.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/filter-builder.ts deleted file mode 100644 index a1f767841d45b25d84f9037eee0312af1064601a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/context-menu/filter-builder.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { Injector } from '@angular/core'; -import { DomService, RefreshFormService, WebCmdService } from '@farris/designer-services'; -import { ControlService } from '../../../../service/control.service'; -import { DgControl } from '../../../../utils/dg-control'; -import { IdService } from '@farris/ui-common'; - -export class ListFilterBuilderService { - - private domService: DomService; - public refreshFormService: RefreshFormService; - private controlService: ControlService; - private webCmdService: WebCmdService; - - constructor(private injector: Injector) { - - this.domService = this.injector.get(DomService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.controlService = this.injector.get(ControlService); - this.webCmdService = this.injector.get(WebCmdService); - } - /** - * 在列表上方创建筛选条 - */ - createListFilterInDocument(fieldConfigs: any[], datGridViewModelId: string, dataGridId: string) { - - - // 1、组装筛选条容器和筛选条dom结构 - const listFilterContainer = this.controlService.getControlMetaData(DgControl.ContentContainer.type); - const listFilterMetadata = this.controlService.getControlMetaData(DgControl.ListFilter.type); - - const gridPrefix = Math.random().toString(36).substr(2, 4); - Object.assign(listFilterContainer, { - id: 'list-filter-container-' + gridPrefix, - appearance: { - class: 'f-filter-container' - }, - contents: [listFilterMetadata] - }); - - Object.assign(listFilterMetadata, { - id: 'list-filter-' + gridPrefix, - filterList: fieldConfigs || [] - }); - - // 2、在列表上方插入筛选条容器 - const gridComponent = this.domService.getComponentByVMId(datGridViewModelId); - const dataGridContainer = this.domService.getControlParentById(gridComponent, dataGridId); - if (!dataGridContainer) { - return; - } - const index = dataGridContainer.contents.findIndex(c => c.id === dataGridId); - if (index === 0) { - dataGridContainer.contents.unshift(listFilterContainer); - } else { - dataGridContainer.contents.splice(index, 0, listFilterContainer); - } - - // 3、预制筛选条查询命令 - const viewModel = this.domService.getViewModelById(datGridViewModelId); - let newFilterCommandId; - if (viewModel && viewModel.commands) { - let commandCode; - const filterCommand = viewModel.commands.find(command => command.handlerName === 'Filter' && command.cmpId === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72') - if (filterCommand) { - commandCode = filterCommand.code; - } else { - newFilterCommandId = new IdService().generate(); - commandCode = `${viewModel.id.replace(/-/g, '')}Filter1`; - // const loadCommand = viewModel.commands.find(command => command.handlerName === 'Filter' && command.cmpId === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72') - const commandParam = this.getFilterCommandParam(datGridViewModelId, gridComponent.id); - - viewModel.commands.push( - { - id: newFilterCommandId, - code: commandCode, - name: '过滤列表数据1', - params: [ - { - name: 'commandName', - shownName: '过滤回调方法', - value: commandParam && commandParam.commandName - }, - { - name: 'frameId', - shownName: '目标组件', - value: commandParam && commandParam.frameId - } - ], - handlerName: 'Filter', - cmpId: '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', - shortcut: {}, - extensions: [] - } - ); - } - listFilterContainer.contents[0].query = commandCode; - } - - // 4、预置筛选条查询数据的构件 - if (this.domService.module.webcmds) { - let loadDataCmd = this.domService.module.webcmds.find(cmd => cmd.id === '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72'); - if (!loadDataCmd) { - loadDataCmd = { - id: '70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', - path: 'Gsp/Web/webcmp/bo-webcmp/metadata/webcmd', - name: 'ListController.webcmd', - refedHandlers: [] - }; - this.domService.module.webcmds.push(loadDataCmd); - } - if (newFilterCommandId) { - loadDataCmd.refedHandlers.push( - { - host: newFilterCommandId, - handler: 'Filter' - } - ); - - } - } - - // 因为涉及到新增【ListController控制器】,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - } - - /** - * 移除列表上方的筛选条 - * @param viewModelId 列表所属视图模型ID - * @param dataGridId 列表控件id - */ - removeListFilterInDocument(viewModelId: string) { - const gridComponent = this.domService.getComponentByVMId(viewModelId); - const node = this.domService.selectNodeAndParentNode(gridComponent, item => item.type === DgControl.DataGrid.type, null); - const gridParentNode = node.parentNode; - - const listFilterContainerIndex = gridParentNode.contents.findIndex(c => c.type === DgControl.ContentContainer.type && - c.appearance && c.appearance.class && c.appearance.class.includes('f-filter-container')); - if (listFilterContainerIndex < 0) { - // console.log('未检测到筛选条容器'); - return; - } - const listFilterContainer = gridParentNode.contents[listFilterContainerIndex]; - if (!listFilterContainer.contents || listFilterContainer.contents.findIndex(c => c.type === DgControl.ListFilter.type) < 0) { - // console.log('未检测到筛选条控件'); - return; - } - - gridParentNode.contents.splice(listFilterContainerIndex, 1); - - } - - private getFilterCommandParam(datGridViewModelId: string, dataGridComponentId: string) { - const templateId = this.domService.module.templateId; - const rootViewModel = this.domService.module.viewmodels[0]; - const dataGridViewModel = this.domService.getViewModelById(datGridViewModelId); - - switch (templateId) { - // 列表模板、带导航的列表模板:从根组件中找ListController.webcmd或者EditableListController.webcmd控制器的load命令 - case 'list-component': case 'list-template': case 'nav-list-template': { - const loadCommand = rootViewModel.commands.find(command => command.handlerName === 'Load' && ['70b4abd4-9f2c-4b7c-90e9-6ac6f4b74c72', 'd7ce1ba6-49c7-4a27-805f-f78f42e72725'].includes(command.cmpId)); - if (loadCommand) { - return { commandName: loadCommand.code, frameId: '#{root-component}' }; - } - break; - } - // 列表带侧边栏模板:从根组件中找AdvancedListCardWithSidebarController.webcmd控制器的LoadList命令 - case 'list-with-sidebar-template': { - const loadCommand = rootViewModel.commands.find(command => command.handlerName === 'LoadList' && command.cmpId === 'c121742e-6028-48bf-817c-1dda7fb098df'); - if (loadCommand) { - return { commandName: loadCommand.code, frameId: '#{root-component}' }; - } - break; - } - // 多数据源列卡模板:从根组件中找AdvancedListCardController.webcmd控制器的LoadList命令 - case 'list-dic-template': { - const loadCommand = dataGridViewModel.commands.find(command => command.handlerName === 'LoadList' && '45be24f9-c1f7-44f7-b447-fe2ada458a61' === command.cmpId); - if (loadCommand) { - return { commandName: loadCommand.code, frameId: `${dataGridComponentId}` }; - } - break; - } - // 列卡模板:从根组件中找ListCardController.webcmd控制器的loadList命令 - case 'list-card-template': { - const loadCommand = dataGridViewModel.commands.find(command => command.handlerName === 'loadList' && '7c48ef46-339c-42d4-8365-a21236c63044' === command.cmpId); - if (loadCommand) { - return { commandName: loadCommand.code, frameId: `${dataGridComponentId}` }; - } - break; - } - // 双列表模板、带侧边栏的双列表、标签式双列表:从根组件中找ListListController.webcmd控制器的LoadNavList命令 - case 'double-list-template': case 'double-list-with-sidebar-template': case 'double-list-in-tab-template': { - const loadCommand = dataGridViewModel.commands.find(command => command.handlerName === 'LoadNavList' && '26436aa8-88a7-4aee-bf0b-9843c1e8afbf' === command.cmpId); - if (loadCommand) { - return { commandName: loadCommand.code, frameId: `${dataGridComponentId}` }; - } - break; - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/export.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/export.ts deleted file mode 100644 index a76b945c3d0eea02726c72297f1f139dfbe16a66..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/export.ts +++ /dev/null @@ -1,19 +0,0 @@ -import FdListFilterComponent from './component/fd-list-filter'; -import { ListFilterSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdListFilterTemplates from './templates'; -import FdListFilterItemTemplates from './component/filter-item/templates'; - - -export const ListFilter: ComponentExportEntity = { - type: 'ListFilter', - component: FdListFilterComponent, - template: FdListFilterTemplates, - metadata: ListFilterSchema -}; - -export const ListFilterItem: ComponentExportEntity = { - type: 'ListFilterItem', - template: FdListFilterItemTemplates, - metadata: {} -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-converter.ts deleted file mode 100644 index 4e67901470da8c0693bfb4f47653186c0afb4fa4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-converter.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class ListFilterFieldsConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data) { - return '共 ' + data.length + ' 项'; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.html deleted file mode 100644 index aa462fb26a01cf840555e79ea688856a9d4b0dae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
    - - - {{ data.name }} [ {{ data.bindingField }}] - - - -
    - -
    - - -
    - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.ts deleted file mode 100644 index 5f7c169b7d92fe55035119eec6d5c0225ce42a9c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component.ts +++ /dev/null @@ -1,301 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, NgZone, OnDestroy -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { ListFilterService } from './list-filter.service'; -import { cloneDeep } from 'lodash-es'; -import { FormSchemaEntityField$Type, FormSchemaEntityFieldTypeName, DesignViewModelService, DomService } from '@farris/designer-services'; -import { MessagerService } from '@farris/ui-messager'; -import { MultiSelectComponent } from '@farris/ui-multi-select'; -import { Subscription } from 'rxjs'; -import { ListFilterFieldCreator } from './query-data/field-control-data'; - -@Component({ - selector: 'app-list-filter-fields-editor', - templateUrl: './list-filter-fields-editor.component.html', - providers: [ListFilterService] -}) -export class ListFilterFieldsEditorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { viewModelId: '', controlSource: '' }; - - /** 是否显示属性面板 */ - @Input() showPropertyPanel = true; - - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '筛选条字段编辑器', - width: 1000, - height: 700, - showButtons: true, - showMaxButton: true - }; - // 筛选条字段 - fieldConfigs = []; - - // 左侧树表数据 - treeData: TreeNode[] = []; - - // 当前可选的所有字段ID - treeNodeIds: string[] = []; - plainTreeNodes: TreeNode[] = []; - - // 选中的字段 - selectedFieldIds = []; - - // 右侧选中行对应的schema字段信息 - selectedSchemaField; - - - // 属性面板配置 - propertyConfig: ElementPropertyConfig[]; - - // 属性面板值 - propertyData; - - @HostBinding('class') - class = 'd-flex h-100'; - - @ViewChild(MultiSelectComponent) multiSelectCmp: MultiSelectComponent; - - timer: any; - - private triggerSaveAndCloseEditorSub: Subscription; - - /** 记录编辑器刚打开时的DOM actions数据。编辑器内部交互面板在操作过程中可能会修改actions节点,导致点击【取消】按钮时无法还原actions数据。所以这里记录一份原始数据,方便还原。 */ - private previousActions: any[]; - - /** 记录编辑器刚打开时的DOM viewmodels数据。编辑器内部交互面板在操作过程中可能会修改viewmodels节点,导致点击【取消】按钮时无法还原viewmodels数据。所以这里记录一份原始数据,方便还原。 */ - private previousViewModels: any[]; - - constructor( - private dgVMService: DesignViewModelService, private notifyService: NotifyService, - private ListFilterServ: ListFilterService, private msgService: MessagerService, - private domService: DomService, - private ngZone: NgZone) { } - - ngOnInit(): void { - if (!this.editorParams || !this.value) { - this.fieldConfigs = []; - } else { - this.fieldConfigs = cloneDeep(this.value); - } - this.treeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams.viewModelId); - - - this.filterAllowedType(this.treeData); - - this.adpatOldForm(); - - this.selectedFieldIds = this.fieldConfigs.map(v => v.id); - - this.filterSchemFields(); - - // 触发保存并关闭当前窗口 - this.triggerSaveAndCloseEditorSub = this.ListFilterServ.triggerSaveAndCloseEditor.subscribe(() => { - this.clickConfirm(); - }); - - // 默认选中第一行 - if (this.selectedFieldIds.length && this.multiSelectCmp['selectItem']) { - this.ngZone.runOutsideAngular(() => { - this.timer = setTimeout(() => { - this.multiSelectCmp['selectItem'](this.selectedFieldIds[0]); - }); - }); - } - - this.previousActions = cloneDeep(this.domService.module.actions); - this.previousViewModels = cloneDeep(this.domService.module.viewmodels); - } - - ngOnDestroy(): void { - this.ListFilterServ.triggerSaveAndCloseEditor.unsubscribe(); - if (this.timer) { - clearTimeout(this.timer); - } - - if (this.triggerSaveAndCloseEditorSub) { - this.triggerSaveAndCloseEditorSub.unsubscribe(); - } - } - - /** - * 适配旧表单的筛选调配置 - */ - private adpatOldForm() { - if (this.fieldConfigs.length === 0) { - return; - } - // 检测第一条数据id是否为字段id - // const firstField = this.fieldConfigs[0]; - // const schemFieldData = this.plainTreeNodes.find(n => n.data.path === firstField.labelCode); - - // if (!schemFieldData || schemFieldData.data.id === firstField.id) { - // return; - // } - - this.fieldConfigs.forEach(config => { - - const schemaFieldNode = this.plainTreeNodes.find(n => n.data.path === config.labelCode); - if (schemaFieldNode) { - // 旧表单的id可能不是字段id,此处强制改成字段id - config.id = schemaFieldNode.data.id; - - if (config.control && (config.control.controltype === 'number' || config.control.controltype === 'flexibleNumber')) { - // 适配旧表单数值区间控件缺少精度属性 - if (!Object.keys(config.control).includes('precision')) { - config.control.precision = schemaFieldNode.data.type && schemaFieldNode.data.type.precision; - } - // 适配字段切换数值和大数值的场景 - config.control.bigNumber = schemaFieldNode.data.type.name === FormSchemaEntityFieldTypeName.BigNumber; - - } - - - } - }); - } - - /** - * 过滤筛选条支持的字段 - * @param treeData 树数据 - */ - filterAllowedType(treeData: TreeNode[]) { - treeData.forEach(treeNode => { - - if (treeNode.data.$type === FormSchemaEntityField$Type.SimpleField) { - if (!this.ListFilterServ.allowedFieldType.includes(treeNode.data.type.name)) { - treeNode.selectable = false; - } else { - this.treeNodeIds.push(treeNode.data.id); - } - this.plainTreeNodes.push(treeNode); - } - if (treeNode.children && treeNode.children.length > 0) { - this.filterAllowedType(treeNode.children); - } - }); - } - filterSchemFields() { - const removedFields = []; - this.selectedFieldIds.forEach(id => { - if (!this.treeNodeIds.includes(id)) { - // schema中已移除的字段 - const field = this.fieldConfigs.find(f => f.id === id); - if (field) { - removedFields.push(field.name); - } - this.fieldConfigs = this.fieldConfigs.filter(f => f.id !== id); - this.selectedFieldIds = this.selectedFieldIds.filter(fid => fid !== id); - } - }); - if (removedFields.length > 0) { - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.msgService.warning('已选择字段【' + removedFields.toString() + '】已移除、变更或暂不支持添加,点击确定后将自动删除字段'); - }); - }); - } - } - - /** - * 改变选中字段事件 - * @param e 选中的行数据 - */ - changeSelectField(e: any[]) { - if (!e) { - return; - } - const fieldConfigs = []; - if (e.length === 0) { - this.propertyConfig = []; - this.fieldConfigs = []; - return; - } - e.forEach(data => { - const co = this.fieldConfigs.find(c => c.id === data.id); - if (co) { - fieldConfigs.push(co); - } else { - const newConfig = ListFilterFieldCreator.getFilterField(data); - if (newConfig.control) { - fieldConfigs.push(newConfig); - } - } - }); - this.fieldConfigs = fieldConfigs; - - - if (this.selectedSchemaField && !fieldConfigs.find(f => f.id === this.selectedSchemaField.id)) { - this.propertyConfig = []; - } - } - - /** - * 切换右侧行 - * @param e 行数据 - */ - changeRightSelect(e) { - if (!e.selected || !e.data) { - return; - } - this.triggerShowPropertyPanel(e.data); - } - - triggerShowPropertyPanel(rowData: any) { - this.selectedSchemaField = rowData; - - this.propertyData = this.fieldConfigs.find(f => f.id === rowData.id); - this.propertyConfig = this.ListFilterServ.getPropertyConfig(rowData, this.propertyData, - this.editorParams.viewModelId, this.editorParams.controlSource, this.fieldConfigs); - - } - - propertyChanged(changeObject: PropertyChangeObject) { - - // 修改控件名称后,要同步控件的路径信息,用于交互面板的显示 - if (changeObject.propertyID === 'name') { - - this.domService.controlBasicInfoMap.set(this.propertyData.id, { - showName: changeObject.propertyValue, - parentPathName: `筛选条 > ${changeObject.propertyValue}` - }); - } - - - } - - submitPropertyModal(data: { changeObject: PropertyChangeObject, parameters: any }) { - const changeObject = data.changeObject; - - // 交互面板变更后,同步控件的路径信息 - if (changeObject.categoryId === 'eventsEditor') { - - this.domService.controlBasicInfoMap.set(this.propertyData.id, { - showName: this.propertyData.name, - parentPathName: `筛选条 > ${this.propertyData.name}` - }); - } - - } - clickCancel() { - this.domService.module.actions = this.previousActions; - this.domService.module.viewmodels = this.previousViewModels; - - this.closeModal.emit(); - } - - clickConfirm() { - if (this.fieldConfigs.length === 0) { - this.notifyService.warning('请选择字段'); - return; - } - - this.submitModal.emit({ value: this.fieldConfigs }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter.service.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter.service.ts deleted file mode 100644 index 071ef502760b3a683ae4b57b65ff64d9d5395f0a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter.service.ts +++ /dev/null @@ -1,949 +0,0 @@ -// tslint:disable:max-line-length -import { ElementPropertyConfig, BeforeOpenModalResult, KeyMap } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { ItemCollectionEditorComponent, ItemCollectionConverter } from '@farris/designer-devkit'; -import { SelectMappingComponent, MappingConverter, CodeEditorComponent, ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; -// import { SelectHelpMetadataComponent } from '../../../../../input/lookup-edit/property/editors/select-help-metadata/select-help-metadata.component'; -// import { SelectHelpConverter } from '../../../../../input/lookup-edit/property/editors/select-help-metadata/select-help-converter'; -// import { SelectHelpTextFieldComponent } from '../../../../../input/lookup-edit/property/editors/select-help-text-field/select-help-text-field.component'; -import { EventEditorService, DomService, FormSchemaEntityFieldTypeName, WebCmdService, FormBasicService } from '@farris/designer-services'; -import { ListFilterFieldCreator } from './query-data/field-control-data'; -import { ListFilterFieldTypeEnums } from './query-data/field-control-types'; -import { Injectable } from '@angular/core'; -import { InputgroupFormMappingEditorComponent } from '../../../../queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor'; -import { SelectHelpClearFieldsEditorComponent } from '../../../../queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { MessagerService } from '@farris/ui-messager'; -import { Subject } from 'rxjs'; -/** - * 筛选条相关特性 - */ -@Injectable() -export class ListFilterService { - - /** 属性配置 */ - propertyConfig: ElementPropertyConfig[]; - - /** 触发关闭编辑器,用于在交互面板中跳转到代码视图之前将编辑器弹窗关闭 */ - triggerSaveAndCloseEditor = new Subject(); - - constructor( - private domService: DomService, - private webCmdService: WebCmdService, - private eventEditorService: EventEditorService, - private formBasicService: FormBasicService, - private msgService: MessagerService) { } - - /** - * 筛选条支持的字段类型 - */ - allowedFieldType = [ - FormSchemaEntityFieldTypeName.String, - FormSchemaEntityFieldTypeName.Number, - FormSchemaEntityFieldTypeName.BigNumber, - FormSchemaEntityFieldTypeName.Date, - FormSchemaEntityFieldTypeName.DateTime, - FormSchemaEntityFieldTypeName.Boolean, - FormSchemaEntityFieldTypeName.Enum - ]; - - getPropertyConfig(schemaField: any, fieldObject: any, viewModelId: string, controlSource: string, fieldConfigs: any[]): ElementPropertyConfig[] { - if (!fieldObject) { - return []; - } - const controlTypes = ListFilterFieldTypeEnums.getControlTypeEnum(schemaField.type.name, controlSource); - const self = this; - this.propertyConfig = []; - let openModalPropConfigs; - if (schemaField.type.name === FormSchemaEntityFieldTypeName.String) { - // 智能输入框----弹出表单框属性 - openModalPropConfigs = this.getOpenModalPropConfigs(fieldObject, viewModelId); - } - const usualConfig: ElementPropertyConfig = { - categoryId: 'usual', - categoryName: '常规', - hideTitle: true, - properties: [{ - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true - }, { - propertyID: 'code', - propertyName: '编号', - propertyType: 'string', - readonly: true - }, { - propertyID: 'labelCode', - propertyName: '标签', - propertyType: 'string', - readonly: true - }, { - propertyID: 'name', - propertyName: '控件名称', - propertyType: 'string' - }, - { - propertyID: 'beginPlaceHolder', - propertyName: '开始占位符文本', - propertyType: 'string', - visible: ListFilterFieldCreator.rangePlaceHolderControl.includes(fieldObject.control.controltype) - }, { - propertyID: 'endPlaceHolder', - propertyName: '结束占位符文本', - propertyType: 'string', - visible: ListFilterFieldCreator.rangePlaceHolderControl.includes(fieldObject.control.controltype) - }, { - propertyID: 'placeHolder', - propertyName: '占位符文本', - propertyType: 'string', - visible: !ListFilterFieldCreator.rangePlaceHolderControl.includes(fieldObject.control.controltype) - }, - { - propertyID: 'control', - propertyName: '控件', - propertyType: 'cascade', - isExpand: true, - hideCascadeTitle: true, - cascadeConfig: [ - { - propertyID: 'controltype', - propertyName: '控件类型', - propertyType: 'select', - iterator: controlTypes - }, - { - propertyID: 'isExtend', - propertyName: '是否默认收起到右侧', - propertyType: 'boolean', - defaultValue: false - }, { - propertyID: 'required', - propertyName: '是否必填', - propertyType: 'boolean', - defaultValue: false - }, { - propertyID: 'showLabel', - propertyName: '是否显示标签', - propertyType: 'boolean', - defaultValue: true, - visible: controlSource === 'normal' - }, - // { - // propertyID: 'helpId', - // propertyName: '帮助元数据', - // propertyType: 'modal', - // visible: fieldObject.control.controltype === 'help', - // category: 'help', - // editor: SelectHelpMetadataComponent, - // editorParams: { - // viewModelId, - // bindingField: schemaField.bindingField, - // bindingType: 'Form', - // relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - // boId: this.formBasicService.formMetaBasicInfo.bizobjectID, - // }, - // converter: new SelectHelpConverter(), - // showClearButton: true - // }, - // { - // propertyID: 'uri', - // propertyName: 'uri', - // propertyType: 'string', - // visible: fieldObject.control.controltype === 'help', - // category: 'help', - // readonly: true - // }, - // { - // propertyID: 'textField', - // propertyName: '文本字段', - // propertyType: 'modal', - // visible: fieldObject.control.controltype === 'help', - // category: 'help', - // editor: SelectHelpTextFieldComponent, - // editorParams: { - // helpId: fieldObject.control.helpId - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // if (!fieldObject.control.helpId) { - // return { result: false, message: '请先选择帮助元数据!' }; - // } - // // 取帮助最新值 - // this.editorParams.helpId = fieldObject.control.helpId; - // return { result: true, message: '' }; - - // } - // }, - // { - // propertyID: 'valueField', - // propertyName: '值字段', - // propertyType: 'modal', - // visible: fieldObject.control.controltype === 'help', - // category: 'help', - // editor: SelectHelpTextFieldComponent, - // editorParams: { - // helpId: fieldObject.control.helpId - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // if (!fieldObject.control.helpId) { - // return { result: false, message: '请先选择帮助元数据!' }; - // } - // // 取帮助最新值 - // this.editorParams.helpId = fieldObject.control.helpId; - // return { result: true, message: '' }; - - // } - // }, - { - propertyID: 'idField', - propertyName: '标识字段', - propertyType: 'string', - visible: fieldObject.control.controltype === 'help', - category: 'help', - readonly: true - }, { - propertyID: 'displayType', - propertyName: '显示类型', - propertyType: 'string', - visible: fieldObject.control.controltype === 'help', - category: 'help', - readonly: true - }, { - propertyID: 'mapFields', - propertyName: '映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - viewModelId, - sourceMetadataId: fieldObject.control.helpId, - binding: { - type: 'Form', - field: fieldObject.id - } - }, - converter: new MappingConverter(), - visible: fieldObject.control.controltype === 'help', - category: 'help' - }, - { - propertyID: 'enableFullTree', - propertyName: '构造完整树', - propertyType: 'boolean', - defaultValue: false, - category: 'help', - visible: fieldObject.control.controltype === 'help' && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || - fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'loadTreeDataType', - propertyName: '数据加载方式', - propertyType: 'select', - defaultValue: 'default', - iterator: - [{ key: 'default', value: '默认' }, { key: 'loadall', value: '全部加载' }, { key: 'layerload', value: '分层加载' }], - visible: fieldObject.control.controltype === 'help' && fieldObject.control.displayType && - fieldObject.control.displayType.toLowerCase() === 'treelist', - category: 'help' - }, - { - propertyID: 'multiSelect', - propertyName: '是否多选', - propertyType: 'boolean', - defaultValue: false, - visible: fieldObject.control.controltype === 'help', - }, - { - propertyID: 'enableCascade', - propertyName: '启用级联选择', - propertyType: 'boolean', - defaultValue: false, - category: 'help', - visible: fieldObject.control.controltype === 'help' && fieldObject.control.multiSelect - && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || - fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'expandLevel', - propertyName: '默认展开层级', - propertyType: 'number', - decimals: 0, - min: -1, - defaultValue: -1, - category: 'help', - visible: fieldObject.control.controltype === 'help' && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || - fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'clearFields', - propertyName: '值变化时清空字段', - propertyType: 'modal', - category: 'help', - visible: fieldObject.control.controltype === 'help' && controlSource === 'normal', - editor: SelectHelpClearFieldsEditorComponent, - editorParams: { - fieldConfigs, - currentId: fieldObject.id - }, - showClearButton: true - }, - { - propertyID: 'valueType', - propertyName: '值类型', - propertyType: 'select', - visible: fieldObject.control.controltype === 'dropdown', - category: 'dropdown', - iterator: [{ key: '1', value: '字符串' }, { key: '0', value: '整型' }, { key: '2', value: '布尔' }] - }, - { - propertyID: 'enumValues', - propertyName: '枚举数组', - propertyType: 'modal', - visible: fieldObject.control.controltype === 'dropdown' || fieldObject.control.controltype === 'checkboxgroup' - || fieldObject.control.controltype === 'radio', - category: 'dropdown/checkboxgroup/radio', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - editorParams: { - columns: [ - { - field: 'value', title: '枚举值', - editor: { - type: schemaField.type.name === 'Boolean' ? EditorTypes.CHECKBOX : EditorTypes.TEXTBOX - } - }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器' - } - }, - { - propertyID: 'showTime', - propertyName: '是否显示时间', - propertyType: 'boolean', - visible: fieldObject.control.controltype === 'flexibleDate', - category: 'flexibleDate' - }, - { - propertyID: 'showType', - propertyName: '显示类型', - propertyType: 'select', - iterator: [{ key: 1, value: '年月日' }, { key: 2, value: '年月' }, { key: 3, value: '年' }], - visible: fieldObject.control.controltype === 'flexibleDate' && !fieldObject.control.showTime, - category: 'flexibleDate' - }, - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'select', - iterator: this.getFormatIterators(fieldObject), - visible: 'date/singleDate/datetime/year/month/yearRange/monthRange/flexibleDate'.includes( - fieldObject.control.controltype), - category: 'date/singleDate/datetime/year/month/yearRange/monthRange/flexibleDate' - }, { - propertyID: 'compareType', - propertyName: '搜索的日期范围', - propertyType: 'select', - iterator: [ - { key: 0, value: '等于' }, - { key: 2, value: '大于' }, - { key: 3, value: '大于等于' }, - { key: 4, value: '小于' }, - { key: 5, value: '小于等于' } - ], - visible: fieldObject.control.controltype === 'singleDate' || fieldObject.control.controltype === 'year' - || fieldObject.control.controltype === 'month', - category: 'singleDate/year/month' - }, { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - decimals: 0, - min: 0, - visible: fieldObject.control.controltype === 'number' || fieldObject.control.controltype === 'flexibleNumber', - category: 'number/flexibleNumber' - }, - { - propertyID: 'single', - propertyName: '默认启用单值', - propertyType: 'boolean', - visible: fieldObject.control.controltype === 'flexibleNumber' || - fieldObject.control.controltype === 'flexibleDate', - category: 'flexibleNumber/flexibleDate' - }, - { - propertyID: 'editable', - propertyName: '是否允许输入', - propertyType: 'boolean', - category: 'input-group', - visible: fieldObject.control.controltype === 'input-group' - }, - { - propertyID: 'groupText', - propertyName: '按钮显示文本', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - category: 'input-group', - visible: fieldObject.control.controltype === 'input-group' - }, - { - propertyID: 'usageMode', - propertyName: '使用模式', - propertyType: 'select', - iterator: [ - { key: 'text', value: '文本' }, - { key: 'open-modal', value: '弹出表单' }, - { key: 'open-remote-modal', value: '弹出远端表单' }], - refreshPanelAfterChanged: true, - category: 'input-group', - visible: fieldObject.control.controltype === 'input-group' - } - ] - }], - setPropertyRelates(changeObject: any, propertyData: any, parameters: any) { - switch (changeObject.propertyID) { - case 'controltype': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - controlProp.cascadeConfig.map(p => { - if (p.category) { - p.visible = false; - if (p.category.includes(changeObject.propertyValue)) { - p.visible = true; - } - } - if (p.propertyID === 'loadTreeDataType' || p.propertyID === 'enableFullTree' - || p.propertyID === 'enableCascade' || p.propertyID === 'expandLevel') { - p.visible = false; - } - if (p.propertyID === 'multiSelect') { - p.visible = changeObject.propertyValue === 'help'; - } - if (p.propertyID === 'showType') { - p.visible = changeObject.propertyValue === 'flexibleDate' && !propertyData.control.showTime; - } - if (p.propertyID === 'clearFields') { - p.visible = changeObject.propertyValue === 'help' && controlSource === 'normal'; - } - - }); - - // 切换类型:重新设置control节点,以便清除与当前类型无关的属性; - const oldControl = propertyData.control; - propertyData.control = ListFilterFieldCreator.getControlDataByType( - changeObject.propertyValue, schemaField); - Object.assign(propertyData.control, { - isExtend: oldControl.isExtend, - required: oldControl.required, - showLabel: oldControl.showLabel, - }); - - // 占位符属性 - const beginPlaceHolder = this.properties.find(p => p.propertyID === 'beginPlaceHolder'); - const endPlaceHolder = this.properties.find(p => p.propertyID === 'endPlaceHolder'); - const placeHolder = this.properties.find(p => p.propertyID === 'placeHolder'); - - if (ListFilterFieldCreator.rangePlaceHolderControl.includes(changeObject.propertyValue)) { - if (beginPlaceHolder) { - beginPlaceHolder.visible = true; - } - if (endPlaceHolder) { - endPlaceHolder.visible = true; - } - if (placeHolder) { - placeHolder.visible = false; - } - propertyData.placeHolder = undefined; - } else { - if (beginPlaceHolder) { - beginPlaceHolder.visible = false; - } - if (endPlaceHolder) { - endPlaceHolder.visible = false; - } - if (placeHolder) { - placeHolder.visible = true; - } - propertyData.beginPlaceHolder = undefined; - propertyData.endPlaceHolder = undefined; - } - - // 格式化属性 - const format = controlProp.cascadeConfig.find(p => p.propertyID === 'format'); - if (format) { - format.iterator = self.getFormatIterators(propertyData); - } - - self.setOpenModalConfigDisplay(propertyData, openModalPropConfigs); - - // 重置事件分类 - const newEventConfig = self.getEventPropertyConfig(propertyData, viewModelId); - const currentEventConfig = self.propertyConfig.find(cat => cat.categoryId === 'eventsEditor'); - Object.assign(currentEventConfig, newEventConfig); - - break; - } - case 'helpId': { - // 选择帮助元数据返回的是DataSource,需要拆分出uri和idField - if (!changeObject.propertyValue) { - Object.assign(propertyData.control, - { - helpId: '', uri: '', idField: '', valueField: '', textField: '', displayType: '', - enableFullTree: false, loadTreeDataType: 'default', - // enableExtendLoadMethod: false, - multiSelect: false, enableCascade: false, expandLevel: -1 - }); - } else { - const { uri, idField } = changeObject.propertyValue; - propertyData.control.uri = uri; - propertyData.control.idField = idField; - Object.assign(propertyData.control, parameters); - - - const controlProp = this.properties.find(p => p.propertyID === 'control'); - - controlProp.cascadeConfig.map(p => { - // 旧表单手动添加的displayType 大小写不一定,故转换为小写再对比 - if (p.propertyID === 'enableFullTree' || p.propertyID === 'enableCascade' - || p.propertyID === 'expandLevel') { - p.visible = parameters.displayType.toLowerCase() === 'treelist' || - parameters.displayType.toLowerCase() === 'navtreelist'; - } - if (p.propertyID === 'loadTreeDataType') { - p.visible = parameters.displayType.toLowerCase() === 'treelist'; - } - // 映射属性中配置帮助id - if (p.propertyID === 'mapFields') { - p.editorParams.sourceMetadataId = parameters ? parameters.helpId : ''; - } - }); - } - break; - } - case 'multiSelect': { - if (propertyData.control.controltype === 'help') { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const enableCascade = controlProp.cascadeConfig.find(p => p.propertyID === 'enableCascade'); - enableCascade.visible = propertyData.control.multiSelect - && propertyData.control.displayType - && (propertyData.control.displayType.toLowerCase() === 'treelist' || - propertyData.control.displayType.toLowerCase() === 'navtreelist'); - - } - break; - } - case 'usageMode': { - self.setOpenModalConfigDisplay(propertyData, openModalPropConfigs); - if (propertyData.control.modalConfig) { - propertyData.control.modalConfig.mapFields = ''; - propertyData.control.modalConfig.modalCmp = ''; - propertyData.control.modalConfig.component = ''; - propertyData.control.modalConfig.formId = ''; - } - break; - } - case 'showTime': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const showType = controlProp.cascadeConfig.find(p => p.propertyID === 'showType'); - if (showType) { - showType.visible = propertyData.control.controltype === 'flexibleDate' && !changeObject.propertyValue; - } - // 格式化属性 - const format = controlProp.cascadeConfig.find(p => p.propertyID === 'format'); - if (format) { - format.iterator = self.getFormatIterators(propertyData); - propertyData.control.format = format.iterator[0].key; - } - break; - } - - case 'showType': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - - // 格式化属性 - const format = controlProp.cascadeConfig.find(p => p.propertyID === 'format'); - if (format) { - format.iterator = self.getFormatIterators(propertyData); - propertyData.control.format = format.iterator[0].key; - } - break; - } - } - } - }; - this.propertyConfig.push(usualConfig); - if (openModalPropConfigs) { - this.propertyConfig = this.propertyConfig.concat(openModalPropConfigs); - } - - const eventConfig = this.getEventPropertyConfig(fieldObject, viewModelId); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - /** - * 获取交互面板配置 - * @param propertyData 属性值 - */ - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = []; - const controlData = propertyData.control; - eventList = this.switchEvents(controlData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, eventList, this.switchEvents), - tabId: 'commands', - tabName: '交互', - enableCascade: true, - propertyData: controlData, - parentPropertyID: 'control', - setPropertyRelates(changeObject: FormPropertyChangeObject, data: any, parameters: any) { - delete controlData[viewModelId]; - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - self.triggerSaveAndCloseEditor.next(); - // 暂存控件信息,用于自动创建新方法的方法编号和名称 - parameters.controlInfo = { type: propertyData.code, name: propertyData.name }; - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, controlData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, parameters['events'], self.switchEvents); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, controlData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, parameters['events'], self.switchEvents); - } - } - }; - } - /** - * 处理动态事件属性 - * @param fieldObject 属性值 - * @param eventList 事件列表 - */ - private switchEvents(fieldObjectControl: any, eventList: { label: string, name: string }[]) { - const controlType = fieldObjectControl.controltype; - // 帮助相关事件 - if (controlType === 'help') { - if (!eventList.find(e => e.label === 'preEventCmd')) { - eventList.push( - { - label: 'preEventCmd', - name: '帮助前事件' - }, - { - label: 'postEventCmd', - name: '帮助后事件' - } - ); - } - - } else { - eventList = eventList.filter(e => e.label !== 'preEventCmd' && e.label !== 'postEventCmd'); - } - - // 智能输入框相关事件 - if (controlType === 'input-group') { - if (!eventList.find(e => e.label === 'click')) { - eventList.push( - { - label: 'click', - name: '点击事件' - } - ); - } - } else { - eventList = eventList.filter(e => e.label !== 'click'); - } - - return eventList; - } - - private setOpenModalConfigDisplay(propertyData: any, openModalPropConfigs: ElementPropertyConfig[]) { - if (!openModalPropConfigs || !propertyData.control) { - return; - } - if (propertyData.control.controltype !== 'input-group') { - openModalPropConfigs.forEach(config => { - config.hide = true; - }); - return; - } - openModalPropConfigs.forEach(config => { - if (config.categoryId === 'openModal') { - config.hide = propertyData.control.usageMode !== 'open-modal'; - } - if (config.categoryId === 'openRemoteModal') { - config.hide = propertyData.control.usageMode !== 'open-remote-modal'; - } - if (config.categoryId === 'modalConfig') { - config.hide = propertyData.control.usageMode === 'text'; - } - }); - } - - private getFormatIterators(fieldObject: any): KeyMap[] { - switch (fieldObject.control.controltype) { - case 'date': case 'singleDate': case 'datetime': { - return [ - { key: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, - { key: 'yyyy年MM月dd日', value: 'yyyy年MM月dd日' }, - { key: 'yyyy/MM/dd', value: 'yyyy/MM/dd' } - ]; - } - case 'year': case 'yearRange': { - return [ - { key: 'yyyy', value: 'yyyy' }, - { key: 'yyyy年', value: 'yyyy年' } - ]; - } - case 'month': case 'monthRange': { - return [ - { key: 'yyyy-MM', value: 'yyyy-MM' }, - { key: 'yyyy年MM月', value: 'yyyy年MM月' }, - { key: 'yyyy/MM', value: 'yyyy/MM' } - - ]; - } - case 'flexibleDate': { - if (fieldObject.control.showTime) { - return [ - { key: 'yyyy-MM-dd HH:mm:ss', value: 'yyyy-MM-dd HH:mm:ss' }, - { key: 'yyyy/MM/dd HH:mm:ss', value: 'yyyy/MM/dd HH:mm:ss' }, - { key: 'yyyy年MM月dd日 HH时mm分ss秒', value: 'yyyy年MM月dd日 HH时mm分ss秒' } - ]; - } else { - switch (fieldObject.control.showType) { - case 1: { - return [ - { key: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, - { key: 'yyyy年MM月dd日', value: 'yyyy年MM月dd日' }, - { key: 'yyyy/MM/dd', value: 'yyyy/MM/dd' } - ]; - } - case 2: { - return [ - { key: 'yyyy-MM', value: 'yyyy-MM' }, - { key: 'yyyy年MM月', value: 'yyyy年MM月' }, - { key: 'yyyy/MM', value: 'yyyy/MM' } - ]; - } - case 3: { - return [ - { key: 'yyyy', value: 'yyyy' }, - { key: 'yyyy年', value: 'yyyy年' } - ]; - } - } - } - } - } - } - - private getOpenModalPropConfigs(propertyData: any, viewModelId: string): ElementPropertyConfig[] { - const self = this; - const control = propertyData.control; - if (!control.modalConfig) { - propertyData.control.modalConfig = { - modalCmp: null, - mapFields: '', - showHeader: true, - title: '', - showCloseButton: true, - showMaxButton: true, - width: 800, - height: 600, - showFooterButtons: true, - footerButtons: [] - }; - } - return [{ - categoryId: 'openModal', - categoryName: '表单配置', - hide: control.usageMode !== 'open-modal', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'modalCmp', - propertyName: '弹出表单', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { containerType: DgControl.ModalContainer.type, containerId: propertyData.id, relativePath: this.formBasicService.formMetaBasicInfo.relativePath, name: this.formBasicService.formMetaBasicInfo.name }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - self.domService.deleteExternalComponent(oldValue); // 清空外部组件的声明节点 - } - }, - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - sourceMetadataId: control.modalConfig.formId, - viewModelId, - binding: { - type: 'Form' - }, - sourceMetadataType: 'form', - sourceMetadataName: '弹出表单' - }, - converter: new MappingConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!control.modalConfig || !control.modalConfig.formId) { - return { result: false, message: '请先选择弹出表单!' }; - } - // 取弹出表单和绑定的最新值 - this.editorParams.sourceMetadataId = control.modalConfig.formId; - return { result: true, message: '' }; - } - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'modalCmp': { - propData.component = parameters ? parameters.component : ''; - propData.formId = parameters ? parameters.uri : ''; - propData.mapFields = ''; - break; - } - } - Object.assign(propertyData.control.modalConfig, propData); - } - }, - { - categoryId: 'openRemoteModal', - categoryName: '表单配置', - hide: control.usageMode !== 'open-remote-modal', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: InputgroupFormMappingEditorComponent, - converter: new MappingConverter(), - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - Object.assign(propertyData.control.modalConfig, propData); - } - }, - { - categoryId: 'modalConfig', - categoryName: '弹出窗口配置', - hide: control.controltype !== 'input-group' || control.usageMode === 'text', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'showHeader', - propertyName: '显示标题栏', - propertyType: 'boolean' - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showCloseButton', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showMaxButton', - propertyName: '显示最大化按钮', - propertyType: 'boolean', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'height', - propertyName: '高度', - propertyType: 'number', - min: 0 - } - // { - // propertyID: 'showFooterButtons', - // propertyName: '显示底部按钮区', - // propertyType: 'boolean' - // }, - // { - // propertyID: 'footerButtons', - // propertyName: '按钮组', - // propertyType: 'modal', - // editor: ToolbarEditorComponent, - // editorParams: { viewModelId, disableChildItem: true, defaultBtnClass: 'btn' }, - // converter: new ToolBarConverter(), - // visible: control.modalConfig && control.modalConfig.showFooterButtons - // } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.category === 'header') { - p.visible = changeObject.propertyValue; - } - }); - - break; - } - case 'showFooterButtons': { - const footerButtons = this.properties.find(p => p.propertyID === 'footerButtons'); - if (footerButtons) { - footerButtons.visible = changeObject.propertyValue; - } - } - } - - Object.assign(propertyData.control.modalConfig, propData); - } - }]; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-data.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-data.ts deleted file mode 100644 index f1860a4d4dec16756cce67f234c3906cd4193f2c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-data.ts +++ /dev/null @@ -1,280 +0,0 @@ -import { FormSchemaEntityField, FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; - -export class ListFilterFieldCreator { - - /** 占位符显示区间的控件 */ - static rangePlaceHolderControl = ['date', 'datetime', 'number', 'yearRange', 'monthRange']; - - /** - * 根据指定的控件类型和schema信息生成筛选条control节点 - * @param controlType 控件类型 - * @param schemaField 字段schema信息 - */ - static getControlDataByType(controlType: string, schemaField: FormSchemaEntityField) { - switch (controlType) { - case 'dropdown': case 'radio': { - const o = { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - valueType: '1', - enumValues: [] - }; - // 因为筛选条与列表在同一个视图模型下,一旦列表中为字段配置了特殊的编辑器类型,这里的editor.$type就会发生变化,所以只能用字段类型进行判断 - if (schemaField.type.name === FormSchemaEntityFieldTypeName.Enum) { - o.valueType = '1'; - o.enumValues = schemaField.type.enumValues; - } else if (schemaField.type.name === FormSchemaEntityFieldTypeName.Boolean) { - o.valueType = '2'; - o.enumValues = [{ value: true, name: 'true' }, { value: false, name: 'false' }]; - } else if ([FormSchemaEntityFieldTypeName.String, FormSchemaEntityFieldTypeName.Number, FormSchemaEntityFieldTypeName.BigNumber].includes(schemaField.type.name)) { - o.valueType = '1'; - o.enumValues = []; - } - return o; - } - case 'help': { - return { - id: schemaField.id, - controltype: 'help', - isExtend: false, - required: false, - showLabel: true, - helpId: '', - uri: '', - idField: '', - valueField: '', - textField: '', - displayType: '', - enableFullTree: false, - loadTreeDataType: 'default', - multiSelect: false, - enableCascade: false, - expandLevel: -1 - }; - } - case 'checkboxgroup': { - const o = { - id: schemaField.id, - controltype: 'checkboxgroup', - isExtend: false, - required: false, - showLabel: true, - enumValues: [] - }; - if (schemaField.type.name === FormSchemaEntityFieldTypeName.Enum) { - o.enumValues = schemaField.type.enumValues; - - } else if (schemaField.type.name === FormSchemaEntityFieldTypeName.Boolean) { - o.enumValues = [{ value: true, name: 'true' }, { value: false, name: 'false' }]; - } - return o; - } - case 'date': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy-MM-dd' - }; - } - case 'datetime': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy-MM-dd' - }; - } - case 'singleDate': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy-MM-dd', - compareType: 0 - }; - } - case 'number': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - precision: schemaField.type.precision || 0, - bigNumber: schemaField.type.name === FormSchemaEntityFieldTypeName.BigNumber - }; - } - case 'year': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy', - compareType: 0 - }; - } - case 'yearRange': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy' - }; - } - case 'month': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy-MM', - compareType: 0 - }; - } - case 'monthRange': { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - format: 'yyyy-MM' - }; - } - case 'input-group': { - return { - id: schemaField.id, - controltype: 'input-group', - isExtend: false, - required: false, - showLabel: true, - editable: true, - groupText: '', - usageMode: 'text', - modalConfig: { - modalCmp: null, - mapFields: null, - showHeader: true, - title: '', - showCloseButton: true, - showMaxButton: true, - width: 800, - height: 600, - showFooterButtons: true, - footerButtons: [] - } - }; - } - case 'bool-check': { - return { - id: schemaField.id, - controltype: 'bool-check', - isExtend: false, - required: false, - showLabel: true - }; - } - case 'flexibleNumber': { - return { - id: schemaField.id, - controltype: 'flexibleNumber', - isExtend: false, - required: false, - precision: schemaField.type.precision || 0, - bigNumber: schemaField.type.name === FormSchemaEntityFieldTypeName.BigNumber, - single: true - }; - } - - case 'flexibleDate': { - return { - id: schemaField.id, - controltype: 'flexibleDate', - isExtend: false, - required: false, - showTime: false, - showType: 1, - format: 'yyyy-MM-dd', - single: true - }; - } - default: { - return { - id: schemaField.id, - controltype: controlType, - isExtend: false, - required: false, - showLabel: true, - }; - } - } - } - - /** - * 组装筛选条字段信息 - * @param schemaField 字段 - */ - static getFilterField(schemaField: any) { - if (schemaField.$type !== 'SimpleField') { - // console.warn('字段类型错误!'); - return; - } - - const fieldConfig: any = { - id: schemaField.id, - labelCode: schemaField.path, - code: schemaField.code, - name: schemaField.name, - control: {} - }; - - switch (schemaField.type.name) { - case FormSchemaEntityFieldTypeName.String: { - fieldConfig.control = ListFilterFieldCreator.getControlDataByType('text', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Number: case GSPElementDataType.Integer: case GSPElementDataType.Decimal: - case FormSchemaEntityFieldTypeName.BigNumber: { - fieldConfig.control = ListFilterFieldCreator.getControlDataByType('number', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Date: case FormSchemaEntityFieldTypeName.DateTime: { - fieldConfig.control = ListFilterFieldCreator.getControlDataByType('date', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Enum: case FormSchemaEntityFieldTypeName.Boolean: { - fieldConfig.control = ListFilterFieldCreator.getControlDataByType('dropdown', schemaField); - break; - } - default: { - fieldConfig.control = null; - } - } - if (this.rangePlaceHolderControl.includes(fieldConfig.control.controltype)) { - fieldConfig.beginPlaceHolder = ''; - fieldConfig.endPlaceHolder = ''; - } else { - fieldConfig.placeHolder = ''; - } - - return fieldConfig; - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-types.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-types.ts deleted file mode 100644 index 3beb30686e403213ced08c44ce9e573a8f6fe5b7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/editor/list-filter-fields-editor/query-data/field-control-types.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { KeyMap } from '@farris/ide-property-panel'; -import { FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; - -export class ListFilterFieldTypeEnums { - - - static getControlTypeEnum(fieldType: string, controlSource: string): KeyMap[] { - const controlTypes = []; - switch (fieldType) { - case FormSchemaEntityFieldTypeName.String: { - controlTypes.push({ key: 'text', value: '文本' }); - controlTypes.push({ key: 'search', value: '搜索' }); - controlTypes.push({ key: 'help', value: '帮助' }); - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'checkboxgroup', value: '复选组' }); - controlTypes.push({ key: 'number', value: '数值区间' }); - controlTypes.push({ key: 'radio', value: '单选组' }); - controlTypes.push({ key: 'year', value: '年度' }); - controlTypes.push({ key: 'yearRange', value: '年度范围' }); - controlTypes.push({ key: 'month', value: '年月' }); - controlTypes.push({ key: 'monthRange', value: '年月范围' }); - controlTypes.push({ key: 'input-group', value: '智能输入框' }); - break; - } - case FormSchemaEntityFieldTypeName.Number: case GSPElementDataType.Integer: case GSPElementDataType.Decimal: { - controlTypes.push({ key: 'number', value: '数值区间' }); - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - - // if (controlSource === 'light') { - // controlTypes.push({ key: 'flexibleNumber', value: '可变数值' }); - // } - break; - } - case FormSchemaEntityFieldTypeName.BigNumber: { - controlTypes.push({ key: 'number', value: '数值区间' }); - - // if (controlSource === 'light') { - // controlTypes.push({ key: 'flexibleNumber', value: '可变数值' }); - // } - break; - } - case FormSchemaEntityFieldTypeName.Date: case FormSchemaEntityFieldTypeName.DateTime: { - controlTypes.push({ key: 'date', value: '日期区间' }); - controlTypes.push({ key: 'singleDate', value: '日期' }); - controlTypes.push({ key: 'datetime', value: '日期时间区间' }); - - // if (controlSource === 'light') { - // controlTypes.push({ key: 'flexibleDate', value: '可变日期' }); - // } - - break; - } - case FormSchemaEntityFieldTypeName.Enum: { - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'checkboxgroup', value: '复选组' }); - controlTypes.push({ key: 'radio', value: '单选组' }); - break; - } - case FormSchemaEntityFieldTypeName.Boolean: { - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'checkboxgroup', value: '复选组' }); - controlTypes.push({ key: 'radio', value: '单选组' }); - - // if (controlSource === 'light') { - // controlTypes.push({ key: 'bool-check', value: '单选框' }); - // } - break; - } - } - return controlTypes; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/nocode-property-config.ts deleted file mode 100644 index ae258af24847fb18981f7b8885f27bf47e3e4706..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/nocode-property-config.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ListFilterProp } from './property-config'; - -export class NoCodeListFilterProp extends ListFilterProp { - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 常规属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/property-config.ts deleted file mode 100644 index 568b503953635bde99fde43b4a9b24ed8b404d2e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/property/property-config.ts +++ /dev/null @@ -1,379 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { UniformEditorDataUtil, FormBindingType } from '@farris/designer-services'; -import { FilterCommonProp } from '../../common/property/filter-common-property-config'; -import { NotifyOptions } from '@farris/ui-notify'; -import { ListFilterFieldsEditorComponent } from './editor/list-filter-fields-editor/list-filter-fields-editor.component'; -import { ListFilterFieldsConverter } from './editor/list-filter-fields-editor/list-filter-fields-converter'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - - -export class ListFilterProp extends FilterCommonProp { - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 常规属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - public getBasicPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - }, - { - propertyID: 'controlSource', - propertyName: '筛选方式', - propertyType: 'select', - description: '筛选方式选择', - iterator: [{ key: 'light', value: '轻量筛选' }, { key: 'normal', value: '常规筛选' }], - refreshPanelAfterChanged: true, - readonly: this.checkCanChangeControlSource(propertyData) - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'controlSource': { - // 轻量筛选条比常规筛选多三种控件类型,切换时给出提示,并强制删除 - self.changeControlSource(changeObject, propertyData, viewModelId); - } - } - } - }; - } - - public getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - - { - propertyID: 'alLeft', - propertyName: '表单左对齐', - propertyType: 'boolean', - description: '表单是否左侧对齐', - defaultValue: true, - visible: propertyData.controlSource === 'normal', - controlSource: 'normal' - }, - { - propertyID: 'autoWidth', - propertyName: '自适应列宽', - propertyType: 'boolean', - description: '列宽是否自动调整', - defaultValue: false, - visible: propertyData.controlSource === 'normal', - controlSource: 'normal' - }, - { - propertyID: 'filterClass', - propertyName: '筛选项样式', - propertyType: 'string', - description: '筛选项样式设置', - visible: !propertyData.autoWidth && propertyData.controlSource === 'normal', - controlSource: 'normal' - }, - { - propertyID: 'autoLabel', - propertyName: '自适应标签宽度', - propertyType: 'boolean', - description: '标签宽度是否自动调整', - defaultValue: true, - visible: propertyData.controlSource === 'normal', - controlSource: 'normal' - }, - { - propertyID: 'showReminder', - propertyName: '启用提示', - propertyType: 'boolean', - defaultValue: false, - description: '是否显示提示,一般用于前置任务中', - visible: propertyData.controlSource === 'light', - controlSource: 'light' - }, - { - propertyID: 'showExtendInSidebar', - propertyName: '启用侧边栏收折', - propertyType: 'boolean', - defaultValue: true, - description: '是否在侧边栏中展示收起的控件', - visible: propertyData.controlSource === 'light', - controlSource: 'light' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'autoWidth': { - const filterClass = this.properties.find(p => p.propertyID === 'filterClass'); - if (filterClass) { - filterClass.visible = !changeObject.propertyValue && propertyData.controlSource === 'normal'; - } - break; - } - } - } - }; - } - - public getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const inputConfig = { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'disable', - propertyName: '是否禁用', - propertyType: 'unity', - description: '是否禁用', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - stateMachine: this.stateMachineService.stateMachineMetaData - } - } - }, - { - propertyID: 'filterList', - propertyName: '筛选条字段', - propertyType: 'modal', - description: '筛选条字段设置', - editor: ListFilterFieldsEditorComponent, - editorParams: { viewModelId, controlSource: propertyData.controlSource }, - converter: new ListFilterFieldsConverter() - }, - { - propertyID: 'liveSearch', - propertyName: '实时搜索', - propertyType: 'boolean', - description: '是否启用实时搜索', - defaultValue: false, - visible: propertyData.controlSource === 'normal', - controlSource: 'normal' - }, - { - propertyID: 'binding', - propertyName: '默认值绑定', - propertyType: 'unity', - description: '默认值绑定设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - } - ] - }; - - return inputConfig; - } - - - - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = [ - { - label: 'query', - name: '查询事件' - }, - { - label: 'searchChange', - name: '搜索变化事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } - - /** - * 变更控件筛选方式后需要先判断是否包含常规筛选不支持的控件,若有,给出提示信息 - */ - private changeControlSource(changeObject: FormPropertyChangeObject, propertyData: any, viewModelId: string) { - const { msg, unSupportedFilterId } = this.checkSpecialControlTypeInLightFilter(changeObject, propertyData); - if (msg) { - changeObject.propertyValue = 'light'; - const listFilterElement = this.domService.domDgMap.get(propertyData.id); - - // 因为question异步,所以回调方法是在formService.afterPropertyChange方法之后执行的,所以dom结构的变更需要单独处理 - this.msgService.question('常规筛选不支持以下控件,切换后将移除:' + msg + ',确认移除?', - () => { - // 确认变更 - propertyData.filterList = propertyData.filterList.filter(f => !unSupportedFilterId.includes(f.id)); - - listFilterElement.filterList = propertyData.filterList; - listFilterElement.controlSource = 'normal'; - propertyData.controlSource = 'normal'; - this.changeRelateCategory(propertyData, viewModelId); - - // 再次触发组件的变更事件,用于刷新页面显示 - if (propertyData.elementChanged) { - changeObject.propertyValue = 'normal'; - propertyData.elementChanged.next(changeObject); - } - // this.checkHasDefaultValue(propertyData); - - }, - () => { - // 不变更 - changeObject.propertyValue = 'light'; - propertyData.controlSource = 'light'; - listFilterElement.controlSource = 'light'; - }); - } else { - this.changeRelateCategory(propertyData, viewModelId); - // this.checkHasDefaultValue(propertyData); - } - } - /** - * 轻量筛选比常规筛选多三种控件类型。所以从轻量筛选切换到常规筛选时,对于不支持的类型给出提示,并强制转换成默认类型 - */ - private checkSpecialControlTypeInLightFilter(changeObject: FormPropertyChangeObject, propertyData: any) { - let msg = ''; - const unSupportedFilterId = []; - - // 常规筛选不支持可变日期、可变数值、单选框控件,故增加检测,并给出提示 - if (changeObject.propertyValue === 'normal' && propertyData.filterList && propertyData.filterList.length) { - const flexibleDates = []; - const flexibleNumbers = []; - const boolChecks = []; - - propertyData.filterList.forEach(element => { - switch (element.control.controltype) { - case 'flexibleDate': { - unSupportedFilterId.push(element.id); - flexibleDates.push(element.name); - break; - } - case 'flexibleNumber': { - unSupportedFilterId.push(element.id); - flexibleNumbers.push(element.name); - break; - } - case 'bool-check': { - unSupportedFilterId.push(element.id); - boolChecks.push(element.name); - break; - } - } - }); - - if (flexibleDates.length) { - msg = ' 可变日期控件【' + flexibleDates.join('、') + '】'; - } - if (flexibleNumbers.length) { - msg = msg + (msg ? '、' : '') + ' 可变数值控件【' + flexibleNumbers.join('、') + '】'; - } - if (boolChecks.length) { - msg = msg + (msg ? '、' : '') + ' 单选框控件【' + boolChecks.join('、') + '】'; - } - } - - return { msg, unSupportedFilterId }; - } - - private changeRelateCategory(propertyData: any, viewModelId: string) { - // 变更【外观分类】下的属性 - const newAppearancePropConfig = this.getAppearancePropConfig(propertyData, viewModelId); - const currentAppearanceConfig = this.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = this.getBehaviorPropConfig(propertyData, viewModelId); - const currentBehaviorConfig = this.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - } - - /** - * 校验是否可以切换筛选类型:放在header下的轻量筛选(前置任务)不能切换为常规筛选 - */ - private checkCanChangeControlSource(propertyData: any): boolean { - if (propertyData.controlSource === 'normal') { - return false; - } - const grandParentElement = propertyData.parent && propertyData.parent.parent; - if (grandParentElement && grandParentElement.type === DgControl.ContentContainer.type && - grandParentElement.appearance && grandParentElement.appearance.class && - grandParentElement.appearance.class.includes('f-page-header-base')) { - return true; - } - return false; - } - - /** - * 两种类型筛选的默认值变量结构不一样,所以要给出提示信息 - */ - private checkHasDefaultValue(propertyData: any) { - if (propertyData.binding && propertyData.binding.type === FormBindingType.Variable) { - this.notifyService.warning({ - msg: '两种筛选方式支持的默认值绑定变量的结构不一致,请重新配置!', timeout: 6000 - } as NotifyOptions); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/schema/schema.ts deleted file mode 100644 index 978d685d07032e85219774ba4adf939bc9199aa0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/schema/schema.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const ListFilterSchema = { - id: 'list-filter', - type: 'ListFilter', - appearance: null, - controlSource: 'light', - filterList: [], - liveSearch: false, - alLeft: true, - autoWidth: false, - filterClass: '', - autoLabel: true, - query: '', - binding: null, - disable: false, - showReminder: false, - showExtendInSidebar: true, - visible: true, - searchChange: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/form.ts deleted file mode 100644 index f9795588766650c37068934f669874d76954c52b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/form.ts +++ /dev/null @@ -1,180 +0,0 @@ -export default (ctx: any) => { - if (ctx.component.controlSource === 'normal') { - return resolveNormalFilterTemplate(ctx); - } else { - return resolveLightFilterTemplate(ctx); - } - -}; - -/** - * 渲染常规筛选条 - */ -function resolveNormalFilterTemplate(ctx: any) { - - // 自动宽度相关样式 - const autoWidth = ctx.component.autoWidth ? 'list-filter-autoWidth' : ''; - const listPadding = ctx.showMoreIcon ? 'list-filter-padding' : ''; - - // 父级div的样式 - const filterInputsCls = getFilterInputCls(ctx); - - // 实时搜索区域 - const liveSearch = getLiveSearch(ctx); - - // 主区域 - let mainDiv = ''; - if (autoWidth) { - const alLeftCls = !ctx.component.alLeft ? 'justify-content-end' : ''; - - - mainDiv = ` -
    -
    - ${ctx.filterControlTpls} -
    -
    - - ${liveSearch} - `; - } else { - mainDiv = ` - ${ctx.filterControlTpls} - ${liveSearch} - `; - } - - const moreIconPanel = getMoreIconPanel(ctx); - - return ` -
    -
    - ${mainDiv} -
    - - ${moreIconPanel} -
    - `; - -} - -/** - * 渲染轻量筛选条 - */ -function resolveLightFilterTemplate(ctx: any) { - // 控件区 - let controlTpls = ''; - if (ctx.showInPageFilterList && ctx.showInPageFilterList.length) { - ctx.showInPageFilterList.forEach(filterConfig => { - controlTpls += ` -
    -
    - ${filterConfig.name} -
    -
    ` - }) - } - // 高级筛选 - let sidebarBtn = ''; - if (ctx.component.showExtendInSidebar && ctx.showMoreIcon) { - sidebarBtn = ` -
    - -
    `; - } - - // 筛选图标 - let advancedBtn = ''; - if (!ctx.component.showExtendInSidebar && ctx.showMoreIcon) { - advancedBtn = ` -
    - -
    `; - } - return ` -
    -
    -
    -
    -
    - ${controlTpls} -
    -
    - ${sidebarBtn} -
    - ${advancedBtn} - -
    - -
    - `; -} - - -// 父级div样式是根据是否自动宽度区分的 -function getFilterInputCls(ctx: any) { - const autoWidth = ctx.component.autoWidth; - let filterInputsCls = ''; - if (autoWidth) { - filterInputsCls = 'filter-inputs-main-basis-wrapper'; - if (!ctx.component.liveSearch) { - filterInputsCls += ' list-filter-wrapper-show-btn'; - if (!ctx.component.liveSearch && !ctx.showMoreIcon) { - filterInputsCls += ' list-filter-wrapper-show-btn-remove'; - } - } - } else { - filterInputsCls = 'filter-inputs-main f-form-layout farris-form farris-form-controls-inline'; - const showLength = ctx.showFilterListLength >= 6 ? 6 : ctx.showFilterListLength; - filterInputsCls += ' list-filter-type-' + showLength; - if (ctx.component.filterClass) { - filterInputsCls += ' list-filter-custom-type'; - } - if (!ctx.showMoreIcon) { - filterInputsCls += ' list-filter-show-reset'; - } - - if (ctx.component.liveSearch) { - filterInputsCls += ' list-filter-padding-none'; - } - } - - return filterInputsCls; -} - -// 实时搜索区域模板 -function getLiveSearch(ctx) { - let searchBtn = ` `; - if (!ctx.showMoreIcon) { - searchBtn += ' '; - } - if (ctx.component.liveSearch) { - return ''; - } - let cls = 'filter-search-btn'; - if (ctx.component.autoWidth) { - if (!ctx.showMoreIcon) { - cls += ' filter-search-btn-remove'; - } - - } else { - const showLength = ctx.showFilterListLength >= 6 ? 6 : ctx.showFilterListLength; - cls += ' filter-search-btn-type-' + showLength; - - if (ctx.component.filterClass) { - cls += ' filter-search-custom-type'; - } - } - - return `
    ${searchBtn}
    `; -} - -function getMoreIconPanel(ctx: any) { - if (!ctx.showMoreIcon) { - return ''; - } - return ` -
    - -
    `; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/list-filter/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/control-mapping.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/control-mapping.ts deleted file mode 100644 index 85a47a4a54bff147700556c32c167f381e5db9e9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/control-mapping.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * 筛选方案控件类型与输入控件类型的映射 - */ -export const QuerySchemeControlMapping = { - // 文本 - text: 'TextBox', - - // 帮助 - help: 'LookupEdit', - - // 下拉帮助 - 'combolist-help': 'LookupEdit', - - // 下拉选择 - dropdown: 'EnumField', - - // 年度 - 'single-year': 'DateBox', - - // 单月份 - 'single-month': 'DateBox', - - // 月份区间 - month: 'DateRange', - - // 日期区间 - date: 'DateRange', - - // 日期 - 'single-date': 'DateBox', - - // 日期时间区间 - 'date-time': 'DateRange', - - // 单日期时间 - 'single-date-time': 'DateBox', - - // 智能输入框 - 'input-group': 'InputGroup', - - // 数值区间 - number: 'NumberRange', - - // 数值 - 'single-number': 'NumericBox', - - // 单选组 - radio: 'RadioGroup', - - // 复选框 - 'bool-check': 'CheckBox' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/fd-queryScheme.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/fd-queryScheme.ts deleted file mode 100644 index d8b6c4d8e890e4c103f7b707a33bda7be98478d5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/fd-queryScheme.ts +++ /dev/null @@ -1,263 +0,0 @@ -import { QuerySchemeSchema } from '../schema/schema'; -import { BuilderHTMLElement } from '@farris/designer-element'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { QuerySchemeItemComponent } from './filter-bar-item/component/fd-query-scheme-item'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { QuerySchemeProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { RowNode } from '@farris/ui-treetable'; -import { QuerySchemeContextMenuManager } from '../context-menu/context-menu.manager'; -import { DgControl } from '../../../../utils/dg-control'; -import { DomService, FormSchemaEntityField$Type, SchemaService, WebCmdService } from '@farris/designer-services'; -import { QuerySchemaFieldCreator } from '../property/editor/query-scheme-fields-editor/query-data/field-control-data'; -import { QuerySchemaFieldTypeEnums } from '../property/editor/query-scheme-fields-editor/query-data/field-control-types'; - -export default class QuerySchemeComponent extends FarrisDesignBaseComponent { - - // 展示在界面上的控件模板字符串 - filterControlTpls = ''; - - - getClassName(): string { - return super.getClassName() + ' query-solution'; - } - getDefaultSchema(): any { - return QuerySchemeSchema; - } - - init() { - this.checkFieldSchemaAndControl(); - } - - render(): any { - this.assembleFilterControls(); - - return super.render(this.renderTemplate('QueryScheme', { - component: this.component, - filterControlTpls: this.filterControlTpls, - })); - - } - - attach(element: any): any { - const superAttach: any = super.attach(element); - - const domService = this.options.designerHost.getService('DomService') as DomService; - - // 将各筛选项追加到domservice的map中,目的是为了在交互面板【已绑定命令】中展示路径信息 - const filterList = this.component.fieldConfigs || []; - filterList.forEach(filterConfig => { - if (!filterConfig.control || !filterConfig.control.controltype) { - return; - } - domService.controlBasicInfoMap.set(filterConfig.control.id, { - showName: filterConfig.name, - parentPathName: `筛选方案 > ${filterConfig.name}` - }); - }); - return superAttach; - } - - - /** - * 判断是否可以接收拖拽新增的子级控件 - * @param data 新控件的类型、所属分类 - * @returns boolean - */ - canAccepts(el: BuilderHTMLElement, target: BuilderHTMLElement) { - return false; - } - - /** - * 构造筛选项 - */ - private assembleFilterControls(): void { - const presetFieldConfigs = this.component.presetFieldConfigs || []; - - this.filterControlTpls = ''; - - presetFieldConfigs.forEach(presetFieldConfigItem => { - if (!presetFieldConfigItem.control || !presetFieldConfigItem.control.controltype) { - return; - } - const itemTemplate = this.renderNormalItem(presetFieldConfigItem); - this.filterControlTpls += ' ' + itemTemplate; - }); - } - - /** - * 常规筛选:渲染单个输入框 - * @param filterConfig 配置数据 - */ - private renderNormalItem(filterConfig: any): any { - const inputProp = Object.assign({}, { - controltype: filterConfig.control.controltype, - require: filterConfig.control.require, - enumData: filterConfig.control.enumValues, - items: filterConfig.control.enumValues, - placeHolder: filterConfig.placeHolder || '', - beginPlaceHolder: filterConfig.beginPlaceHolder || '', - endPlaceHolder: filterConfig.endPlaceHolder || '', - isHorizontal: true, - groupText: filterConfig.control.groupText, - className: filterConfig.control.className - }); - const itemComponent = new QuerySchemeItemComponent(inputProp, this.options, this); - - return itemComponent.renderItem(filterConfig); - } - - /** - * 属性面板构造数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: QuerySchemeProp = new QuerySchemeProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - const mappingPropIds = ['presetQuerySolutionName', 'fieldConfigs', 'presetFieldConfigs', 'isControlInline', 'showCompleteLabel']; - - if (mappingPropIds.includes(changeObject.propertyID)) { - this.triggerRedraw(); - - // 涉及到字段绑定事件的变更,故触发同步actions操作 - if (changeObject.propertyID === 'fieldConfigs') { - const webCmdService = this.options.designerHost.getService('WebCmdService') as WebCmdService; - webCmdService.syncActions(); - } - } - } - - - /** - * 组装右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new QuerySchemeContextMenuManager(this, rowNode); - return menuManager.setContextMenuConfig(); - } - - /** - * 从控件工具箱拖拽生成控件时获取控件必须的上下文容器 - */ - getMetadataContextInDrag() { - - } - - - /** - * 禁止移动 - */ - checkCanMoveComponent(): boolean { - return false; - } - - /** - * 删除筛选方案时连带删除上层容器Section - */ - onRemoveComponent() { - const parentSchema = this.parent && this.parent.component; - if (!parentSchema) { - return; - } - const parentClass = parentSchema.appearance ? parentSchema.appearance.class : ''; - const parentClassList = parentClass ? parentClass.split(' ') : []; - - const grandParent = this.parent.parent; - const grandParentSchema = grandParent && grandParent.component; - - // 上层为筛选方案容器,则需要将容器一同移除 - if (grandParentSchema && parentSchema.type === DgControl.Section.type && parentClassList.includes('f-section-scheme')) { - const sectionIndex = grandParentSchema.contents.findIndex(c => c.id === parentSchema.id); - if (sectionIndex > -1) { - grandParentSchema.contents.splice(sectionIndex, 1); - - - // 移除根节点对应的样式 - this.removeSchemeClassInRootLayout(); - - // 为了后续触发重绘的父级组件,返回筛选条容器的父级容器 - return { parentComponentInstance: grandParent }; - } - - } - } - - /** - * 移除根节点对应的筛选方案样式 - */ - private removeSchemeClassInRootLayout() { - - const domService = this.options.designerHost.getService('DomService') as DomService; - const rootComponentJson = domService.getComponentById('root-component'); - const templateOutlineSchema = domService.templateOutlineSchema || []; - const schemeConfig = templateOutlineSchema.find(schema => schema.queryScheme && schema.queryScheme.canEnable); - if (schemeConfig && schemeConfig.queryScheme && schemeConfig.queryScheme.relatedClass && schemeConfig.queryScheme.relatedClass.length) { - const relatedClass = schemeConfig.queryScheme.relatedClass[0]; - - const relateDom = domService.getNodeByIdPath(rootComponentJson, relatedClass.path); - if (relateDom) { - if (relateDom.appearance && relateDom.appearance.class) { - relateDom.appearance.class = relateDom.appearance.class.replace(relatedClass.class, ''); - } - } - - - } - } - - /** - * 检查字段类型与控件类型的适配度 - */ - private checkFieldSchemaAndControl() { - const schemService = this.options.designerHost.getService('SchemaService') as SchemaService; - this.component.fieldConfigs.forEach(fieldConfig => { - if (!fieldConfig.id || !fieldConfig.control) { - return; - } - const schemaField = schemService.getFieldByID(fieldConfig.id); - // 1、字段不存在:自动删除 - if (!schemaField) { - fieldConfig.isInValid = true; - const presetFieldConfig = this.component.presetFieldConfigs.find(c => c.id === fieldConfig.id); - if (presetFieldConfig) { - presetFieldConfig.isInValid = true; - } - return; - } - // 2、字段由简单字段变更为复杂字段:自动删除 - if (schemaField.$type === FormSchemaEntityField$Type.ComplexField) { - fieldConfig.isInValid = true; - const presetFieldConfig = this.component.presetFieldConfigs.find(c => c.id === fieldConfig.id); - if (presetFieldConfig) { - presetFieldConfig.isInValid = true; - } - return; - } - const schemaFieldType = schemaField.type.name; - const allowedQueryControlTypes = QuerySchemaFieldTypeEnums.getControlTypeEnum(schemaFieldType); - if (!allowedQueryControlTypes.find(type => type.key === fieldConfig.control.controltype)) { - // 3、字段类型与控件类型不匹配:自动替换控件 - const newControl = QuerySchemaFieldCreator.getSolutionField(schemaField); - Object.assign(fieldConfig, newControl); - const presetFieldConfig = this.component.presetFieldConfigs.find(c => c.id === fieldConfig.id); - if (presetFieldConfig) { - Object.assign(presetFieldConfig, fieldConfig); - } - - } - - }); - this.component.fieldConfigs = this.component.fieldConfigs.filter(config => !config.isInValid); - this.component.presetFieldConfigs = this.component.presetFieldConfigs.filter(config => !config.isInValid); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/component/fd-query-scheme-item.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/component/fd-query-scheme-item.ts deleted file mode 100644 index 4a9e6cdc39bf32bf63f06edf2537abaf093226a0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/component/fd-query-scheme-item.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { QuerySchemeControlMapping } from '../../control-mapping'; - -/** - * 为了复用输入类控件的模板,这里将筛选项当做一个component - */ -export class QuerySchemeItemComponent extends FarrisDesignBaseComponent { - - parentQuerySchemeInstance: FarrisDesignBaseComponent; - - constructor(component: any, options: any, parentQuerySchemeInstance: any) { - super(component, options); - this.parentQuerySchemeInstance = parentQuerySchemeInstance; - } - - /** - * 渲染单个输入框 - * @param filterConfig 配置数据 - */ - renderItem(filterConfig: any): any { - // const parentSchema = this.parentQuerySchemeInstance.component; - const controlType = QuerySchemeControlMapping[this.component.controltype]; - const inputTemplate = this.renderTemplate(controlType, { - component: this.component - }); - return this.renderTemplate('QuerySchemeItem', { - component: this.component, - filterConfig, - input: inputTemplate, - }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/form.ts deleted file mode 100644 index 6483c6bc3d6f547a1ccb3c5afb06db8a828087dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/form.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default (ctx: any) => { - const require = ctx.filterConfig.control.require ? '*' : ''; - const className = ctx.component.className ? ctx.component.className : 'col-12 col-md-6 col-xl-3 col-el-2'; - - const item = ` - -
    -
    - - ${ctx.input} -
    -
    - `; - return ` -
    - ${item} -
    - `; -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/component/filter-bar-item/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu-config.ts deleted file mode 100644 index 75056f947842d6730c15d7c4a09c1616880db437..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu-config.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const contextMenu = [ - { - title: '切换为筛选条', - id: 'changeToListFilter' - }, - { - title: '移除筛选方案', - id: 'removeQueryScheme' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu.manager.ts deleted file mode 100644 index 1f6323a77a6c99452e0af0725260fc64f394c4fa..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,264 +0,0 @@ -import { contextMenu } from './context-menu-config'; -import { cloneDeep } from 'lodash-es'; -import { RowNode } from '@farris/ui-treetable'; -import { ContextMenuManager } from '../../../../service/context-menu.manager'; -import { ControlContextMenuItem } from '../../../../entity/control-context-menu'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { ComponentFactoryResolver } from '@angular/core'; -import { DgControl } from '../../../../utils/dg-control'; -import { ListFilterFieldsEditorComponent } from '../../list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component'; -import { ListFilterBuilderService } from '../../list-filter/context-menu/filter-builder'; -import { QuerySchemeBuilderService } from './query-scheme-builder'; - -const CHANGE_TO_LISTFILTER_COMMAND = 'changeToListFilter'; - -export class QuerySchemeContextMenuManager extends ContextMenuManager { - - private msgService: MessagerService; - private modalService: BsModalService; - private resolver: ComponentFactoryResolver; - - /** 筛选方案外层容器Id */ - querySchemeContainerId: string; - - /** 筛选条所在的列表组件 */ - listFilterDataGridComponent: any; - - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode) { - super(cmp, rowNode); - - this.msgService = this.injector.get(MessagerService); - this.resolver = this.injector.get(ComponentFactoryResolver); - this.modalService = this.injector.get(BsModalService); - - } - /** - * 过滤、修改控件树右键菜单 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - - menuConfig = this.assembleChangeToListFilterMenu(menuConfig); - - - // 配置菜单点击事件 - this.addContextMenuHandle(menuConfig); - - return menuConfig || []; - } - - /** - * 点击控件树右键菜单 - */ - contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - switch (menu.id) { - case 'changeToListFilter': { - this.openListFilterModal(); - break; - } - case 'removeQueryScheme': { - this.removeQueryScheme(); - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - - } - - - assembleChangeToListFilterMenu(menuConfig: ControlContextMenuItem[]) { - const changeToListFilterMenu = menuConfig.find(menu => menu.id === CHANGE_TO_LISTFILTER_COMMAND); - if (!changeToListFilterMenu) { - return menuConfig; - } - this.getListFilterDataGridComponent(); - - // 当前模板若不能启用筛选条,则移除菜单 - if (!this.listFilterDataGridComponent) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_LISTFILTER_COMMAND); - return menuConfig; - } - - // 若列表组件已有筛选条,则移除菜单 - const listFilterNode = this.domService.selectNode(this.listFilterDataGridComponent, item => item.type === DgControl.ListFilter.type); - if (listFilterNode) { - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_LISTFILTER_COMMAND); - return menuConfig; - } - - // 筛选方案外层没有模板预置的容器,则不支持切换筛选条 - const querySchemeContainerId = this.cmpInstance.parent.id; - const querySchemeContainerNode = this.domService.domDgMap.get(querySchemeContainerId); - if (querySchemeContainerNode.type !== DgControl.Section.type || !querySchemeContainerNode.appearance || - !querySchemeContainerNode.appearance.class || !querySchemeContainerNode.appearance.class.includes('f-section-scheme')) { - - // console.log('未检测到筛选方案容器'); - menuConfig = menuConfig.filter(menu => menu.id !== CHANGE_TO_LISTFILTER_COMMAND); - return menuConfig; - } - - this.querySchemeContainerId = querySchemeContainerId; - return menuConfig; - } - - /** - * 定位到可以启用筛选条的列表组件 - */ - private getListFilterDataGridComponent() { - this.listFilterDataGridComponent = null; - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const listFilterConfig = templateOutlineSchema.find(schema => schema.listFilter && schema.listFilter.canEnable); - if (!listFilterConfig) { - return; - } - - const rootComponent = this.domService.getComponentById('root-component'); - let dataGridContainerNode; - if (typeof (listFilterConfig.path) === 'string') { - dataGridContainerNode = this.domService.getNodeByIdPath(rootComponent, listFilterConfig.path as string); - } else { - for (const path of listFilterConfig.path) { - dataGridContainerNode = this.domService.getNodeByIdPath(rootComponent, path as string); - if (dataGridContainerNode) { - break; - } - } - } - - if (!dataGridContainerNode) { - return; - } - - const allComponentRefs = []; - this.selectAllNodes(dataGridContainerNode, item => item.type === DgControl.ComponentRef.type, allComponentRefs); - for (const refNode of allComponentRefs) { - const dataGridRef = this.domService.components.find(co => - co.id === refNode.component && co.componentType === 'dataGrid'); - if (dataGridRef) { - this.listFilterDataGridComponent = dataGridRef; - return; - } - } - } - /** - * 根据指定的条件遍历查找节点 - * @param rootNode 容器节点 - * @param predict 条件 - */ - private selectAllNodes(rootNode: any, predict: (item: any) => boolean, targetNodes: any[]) { - if (!rootNode) { - return; - } - if (predict(rootNode)) { - targetNodes.push(rootNode); - return; - } - if (rootNode.contents) { - for (const item of rootNode.contents) { - this.selectAllNodes(item, predict, targetNodes); - } - } - return; - } - private openListFilterModal() { - - this.msgService.question('确定切换为筛选条?', () => { - - const compFactory = this.resolver.resolveComponentFactory(ListFilterFieldsEditorComponent); - const compRef = compFactory.create(this.injector); - - const modalConfig = { - title: '筛选条字段编辑器', - width: 950, - height: 500, - showButtons: true, - showMaxButton: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.value = []; - compRef.instance.editorParams = { - viewModelId: this.listFilterDataGridComponent.viewModel, - controlSource: 'normal' - }; - compRef.instance.showPropertyPanel = false; - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe((data) => { - if (data && data.value) { - const filterBuilderService = new ListFilterBuilderService(this.injector); - - // 1、创建筛选条 - const dataGridNode = this.domService.selectNode(this.listFilterDataGridComponent, - item => item.type === DgControl.DataGrid.type); - filterBuilderService.createListFilterInDocument(data.value, this.listFilterDataGridComponent.viewModel, dataGridNode.id); - this.notifyService.success('启用成功'); - - // 2、移除筛选方案 - const querySchemBuilderSerive = new QuerySchemeBuilderService(this.injector); - querySchemBuilderSerive.removeQuerySchemeInDocument(); - - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - } - modalPanel.close(); - }); - }); - - } - - /** - * 移除筛选方案 - */ - removeQueryScheme() { - this.msgService.question('确定移除筛选方案?', () => { - - const viewModelId = this.cmpInstance.viewModelId; - const schemeId = this.cmpInstance.id; - - // 1、清除筛选方案DOM和配套的父级Section容器的DOM 结构 - const component = this.domService.getComponentByVMId(viewModelId); - const sectionContainerNode = this.domService.getControlParentById(component, schemeId); - - if (sectionContainerNode.type !== DgControl.Section.type || !sectionContainerNode.appearance || - !sectionContainerNode.appearance.class || !sectionContainerNode.appearance.class.includes('f-section-scheme')) { - - sectionContainerNode.contents = sectionContainerNode.contents.filter(c => c.id !== schemeId); - } else { - const sectionContainerParentNode = this.domService.getControlParentById(component, sectionContainerNode.id); - - sectionContainerParentNode.contents = sectionContainerParentNode.contents.filter(c => c.id !== sectionContainerNode.id); - } - - // 移除根节点对应的样式 - const rootComponentJson = this.domService.getComponentById('root-component'); - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const schemeConfig = templateOutlineSchema.find(schema => schema.queryScheme && schema.queryScheme.canEnable); - if (schemeConfig && schemeConfig.queryScheme && schemeConfig.queryScheme.relatedClass && schemeConfig.queryScheme.relatedClass.length) { - const relatedClass = schemeConfig.queryScheme.relatedClass[0]; - - const relateDom = this.domService.getNodeByIdPath(rootComponentJson, relatedClass.path); - if (relateDom) { - if (relateDom.appearance && relateDom.appearance.class) { - relateDom.appearance.class = relateDom.appearance.class.replace(relatedClass.class, ''); - } - } - - - } - - // 清除属性面板并刷新界面 - this.cmpInstance.emit('clearPropertyPanel'); - this.refreshFormService.refreshFormDesigner.next(); - }); - - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/query-scheme-builder.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/query-scheme-builder.ts deleted file mode 100644 index d90167bee13fb6f2ba022703a09643fa0240625d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/context-menu/query-scheme-builder.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { Injector } from '@angular/core'; -import { ControlService } from '../../../../service/control.service'; -import { DgControl } from '../../../../utils/dg-control'; -import { DomService, RefreshFormService, FormBasicService, WebCmdService } from '@farris/designer-services'; -import { IdService } from '@farris/ui-common'; - -export class QuerySchemeBuilderService { - - private domService: DomService; - public refreshFormService: RefreshFormService; - private controlService: ControlService; - private formBasicService: FormBasicService; - private webCmdService: WebCmdService; - - - - // 筛选方案相关配置 - querySchemeConfig: any; - - /** 加载命令的控制器id */ - loadCommandCmpId = '54bddc89-5f7e-4b91-9c45-80dd6606cfe9'; - - constructor(private injector: Injector) { - - this.domService = this.injector.get(DomService); - this.refreshFormService = this.injector.get(RefreshFormService); - this.controlService = this.injector.get(ControlService); - this.formBasicService = this.injector.get(FormBasicService); - this.webCmdService = this.injector.get(WebCmdService); - - const templateOutlineSchema = this.domService.templateOutlineSchema || []; - const schemeConfig = templateOutlineSchema.find(schema => schema.queryScheme && schema.queryScheme.canEnable); - if (schemeConfig) { - this.querySchemeConfig = schemeConfig.queryScheme; - } - } - - /** - * 创建筛选方案控件 - * @param fieldConfigs 方案选定的字段 - * @param controlDraggable 容器是否可拖拽 - */ - createQuerySchemeInDocument(fieldConfigs: any[], presetFieldConfigs = []) { - if (!this.querySchemeConfig) { - return; - } - // 1、组装筛选方案容器和筛选方案dom结构 - const querySchemeContainer = this.controlService.getControlMetaData(DgControl.Section.type); - const querySchemeMetadata = this.controlService.getControlMetaData(DgControl.QueryScheme.type); - - const gridPrefix = Math.random().toString(36).slice(2, 6); - Object.assign(querySchemeContainer, { - id: 'query-scheme-container-' + gridPrefix, - appearance: { - class: 'f-section-scheme f-section-in-managelist' - }, - showHeader: false, - mainTitle: '', - enableAccordion: false, - enableMaximize: false, - contents: [querySchemeMetadata] - - }); - - Object.assign(querySchemeMetadata, { - id: 'query-scheme-' + gridPrefix, - fieldConfigs, - presetFieldConfigs, - formId: this.formBasicService.formMetaBasicInfo.code - }); - - // 2、在指定位置插入筛选(默认为根组件) - const rootComponentJson = this.domService.getComponentById('root-component'); - const listFilterContainerParent = this.domService.getNodeByIdPath(rootComponentJson, this.querySchemeConfig.position); - listFilterContainerParent.contents.unshift(querySchemeContainer); - - - // 3、关联DOM处理--目前只处理新增样式 - if (this.querySchemeConfig.relatedClass && this.querySchemeConfig.relatedClass.length) { - this.querySchemeConfig.relatedClass.forEach(r => { - const relateDom = this.domService.getNodeByIdPath(rootComponentJson, r.path); - if (relateDom) { - if (!relateDom.appearance) { - relateDom.appearance.class = r.class; - } else { - relateDom.appearance.class = relateDom.appearance.class + ' ' + r.class; - } - } - - }); - } - // 4、预置筛选方案相关的变量 - const viewModel = this.domService.getViewModelById(rootComponentJson.viewModel); - if (viewModel && viewModel.states) { - if (!viewModel.states.find(state => state.code === 'originalFilterConditionList')) { - viewModel.states.push( - { - id: new IdService().generate(), - category: 'locale', - code: 'originalFilterConditionList', - name: '筛选方案筛选条件', - type: 'String' - } - ); - } - } - // 5、预制筛选方案查询命令 - let newFilterCommandId; - if (viewModel && viewModel.commands) { - let filterCommand = viewModel.commands.find(command => command.handlerName === 'Filter' && command.cmpId === this.loadCommandCmpId); - if (!filterCommand) { - newFilterCommandId = new IdService().generate(); - filterCommand = { - id: newFilterCommandId, - code: 'rootviewmodelFilter1', - name: '过滤并加载数据1', - params: [ - { - name: 'filter', - shownName: '过滤条件', - value: '{UISTATE~/root-component/originalFilterConditionList}' - }, - { - name: 'sort', - shownName: '排序条件', - value: '' - } - ], - handlerName: 'Filter', - cmpId: this.loadCommandCmpId, - shortcut: {}, - extensions: [] - }; - viewModel.commands.push(filterCommand); - } - - const filterCommandCode = filterCommand.code; - querySchemeMetadata.onQuery = filterCommandCode; - } - - // 6、预置筛选方案查询数据的构件 - if (this.domService.module.webcmds) { - let loadDataCmd = this.domService.module.webcmds.find(cmd => cmd.id === this.loadCommandCmpId); - if (!loadDataCmd) { - loadDataCmd = { - id: this.loadCommandCmpId, - path: 'igix/Web/WebCmp/bo-webcmp/metadata/webcmd/data-commands', - name: 'LoadCommands.webcmd', - refedHandlers: [] - }; - this.domService.module.webcmds.push(loadDataCmd); - } - if (newFilterCommandId) { - loadDataCmd.refedHandlers.push( - { - host: newFilterCommandId, - handler: 'Filter' - } - ); - - } - } - - // 因为涉及到新增【LoadCommands控制器】,所以这里需要获取控制器信息,方便交互面板展示命令数据 - this.webCmdService.checkCommands(); - } - - /** - * 移除筛选方案 - */ - removeQuerySchemeInDocument() { - if (!this.querySchemeConfig) { - return; - } - - // 1、移除指定位置的筛选(默认为根组件) - const rootComponentJson = this.domService.getComponentById('root-component'); - const listFilterContainerParent = this.domService.getNodeByIdPath(rootComponentJson, this.querySchemeConfig.position); - const querySectionIndex = listFilterContainerParent.contents.findIndex(c => c.type === DgControl.Section.type && - c.appearance && c.appearance.class && c.appearance.class.includes('f-section-scheme')); - if (querySectionIndex < 0) { - // console.log('未检测到筛选方案容器'); - return; - } - const querySection = listFilterContainerParent.contents[querySectionIndex]; - if (!querySection.contents || querySection.contents.findIndex(c => c.type === DgControl.QueryScheme.type) < 0) { - // console.log('未检测到筛选方案控件'); - return; - } - listFilterContainerParent.contents.splice(querySectionIndex, 1); - - - // 2、关联DOM处理--目前只处理样式 - if (this.querySchemeConfig.relatedClass && this.querySchemeConfig.relatedClass.length) { - this.querySchemeConfig.relatedClass.forEach(r => { - const relateDom = this.domService.getNodeByIdPath(rootComponentJson, r.path); - if (relateDom) { - if (relateDom.appearance && relateDom.appearance.class) { - relateDom.appearance.class = relateDom.appearance.class.replace(r.class, ''); - } - } - - }); - } - // 3、移除筛选方案相关的变量 - const viewModel = this.domService.getViewModelById(rootComponentJson.viewModel); - if (viewModel && viewModel.states) { - const filterVariableIndex = viewModel.states.findIndex(state => state.code === 'originalFilterConditionList'); - if (filterVariableIndex > -1) { - viewModel.states.splice(filterVariableIndex, 1); - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/export.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/export.ts deleted file mode 100644 index c265f91fe4eadb1ad00fdd83b9b17d5543399fe3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/export.ts +++ /dev/null @@ -1,19 +0,0 @@ -import QuerySchemeComponent from './component/fd-queryScheme'; -import { QuerySchemeSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdQuerySchemeTemplates from './templates'; -import FdQuerySchemeItemTemplates from './component/filter-bar-item/templates'; - -export const QueryScheme: ComponentExportEntity = { - type: 'QueryScheme', - component: QuerySchemeComponent, - template: FdQuerySchemeTemplates, - metadata: QuerySchemeSchema -}; - - -export const QuerySchemeItem: ComponentExportEntity = { - type: 'QuerySchemeItem', - template: FdQuerySchemeItemTemplates, - metadata: {} -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.html b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.html deleted file mode 100644 index 1a10b42056a83b6e111ee02b5121a2b3d85c4bdb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.html +++ /dev/null @@ -1,17 +0,0 @@ -
    - - -
    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.ts deleted file mode 100644 index f42f10e6d23b7510718e64ab934148ac483bc1fb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, HostBinding } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { IdService } from '@farris/ui-common'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; - -/** - * 智能输入框弹出表单,填写映射 "{'id':'company.company','name':'company.company_Name'}" - */ -@Component({ - selector: 'app-inputgroup-form-mapping-editor', - templateUrl: './inputgroup-form-mapping-editor.html' -}) -export class InputgroupFormMappingEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @Input() value: string; - - @Input() editorParams: any = {}; - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - modalConfig = { - title: '映射编辑器', - width: 900, - height: 500, - showButtons: true - }; - - @ViewChild('itemsFooter') modalFooter: TemplateRef; - @ViewChild('dg') dg: DatagridComponent; - - // 当前编辑数据 - mapValues = []; - - columns = [ - { field: 'helpLabel', title: '弹出表单字段', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'formLabel', title: '绑定字段', editor: { type: EditorTypes.TEXTBOX } } - ]; - - constructor(private notifyService: NotifyService, private idServ: IdService) { } - - ngOnInit() { - if (this.value) { - this.convertMapStr2Array(); - } - } - - - private convertMapStr2Array() { - let mapObject; - try { - const regExp = new RegExp('\'', 'g'); - const value = this.value.replace(regExp, '\"'); - mapObject = JSON.parse(value); - const helpLabels = Object.keys(mapObject); - if (helpLabels.length === 0) { - return; - } - helpLabels.forEach(helpLabel => { - const formLabel = mapObject[helpLabel]; - this.mapValues.push({ - helpLabel, - formLabel, - hId: this.idServ.generate() - }); - - }); - } catch (error) { - this.notifyService.error('mapFields 格式错误!!'); - } - - - } - - addItem() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - const newData = this.createData(); - this.dg.appendRow(newData); - } - private createData(): any { - return { - helpLabel: '', - formLabel: '', - hId: this.idServ.generate() - }; - - } - - removeItem() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - const row = this.dg.selectedRow; - if (row) { - this.dg.deleteRow(row.id); - this.dg.clearSelections(); - } else { - this.notifyService.warning('请选中要删除的行'); - } - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - // 触发单元格结束编辑 - this.dg.endEditing(); - - // 获取最新数组 - const latestData = []; - this.dg.data.forEach(d => { - const { hId, ...other } = d; - latestData.push(other); - }); - - - // 校验 - if (!this.checkBeforeSave(latestData)) { - return; - } - - - const mapObject = {}; - latestData.forEach(map => { - mapObject[map.helpLabel] = map.formLabel; - }); - let mapStr = JSON.stringify(mapObject); - const regExp = new RegExp('\"', 'g'); - mapStr = mapStr.replace(regExp, '\''); - - this.submitModal.emit({ value: mapStr }); - - - } - - - - /** - * 保存前检查 - */ - checkBeforeSave(data: any[]): boolean { - - - // ② 非空,则校验每个的键值是否为空 - for (const item of data) { - if (!item.helpLabel) { - this.notifyService.warning('弹出表单字段不允许为空。'); - return false; - } - if (!item.formLabel) { - this.notifyService.warning('绑定字段不允许为空。'); - return false; - } - - } - - // ③ 不允许重复 - const helpLabels = data.map(e => e.helpLabel); - const keySet = new Set(helpLabels); - const exclusiveKeys = Array.from(keySet); - if (helpLabels.length !== exclusiveKeys.length) { - this.notifyService.warning('弹出表单字段不允许重复。'); - return false; - } - - const formLabels = data.map(e => e.formLabel); - const keySetForm = new Set(helpLabels); - const exclusiveKeysForm = Array.from(keySetForm); - if (formLabels.length !== exclusiveKeysForm.length) { - this.notifyService.warning('绑定字段字段不允许重复。'); - return false; - } - - - - - return true; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-data.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-data.ts deleted file mode 100644 index de0e8a5da7c3b6e9b29aa0d9fa4950e7b1db5302..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-data.ts +++ /dev/null @@ -1,309 +0,0 @@ -import { FormSchemaEntityField, FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; -import { DgControl } from '../../../../../../../utils/dg-control'; - -export class QuerySchemaFieldCreator { - - /** 占位符显示区间的控件 */ - static rangePlaceHolderControl = ['number', 'date', 'date-time', 'month']; - - /** - * 根据指定的控件类型和schema信息生成筛选方案control节点 - * @param controlType 控件类型 - * @param schemaField 字段schema信息 - */ - static getControlDataByType(controlType: string, schemaField: FormSchemaEntityField): any { - switch (controlType) { - case 'dropdown': { - if (schemaField.editor.$type === DgControl.EnumField.type) { - return { - id: schemaField.id, - controltype: 'dropdown', - require: false, - valueType: '1', - enumValues: schemaField.type.enumValues, - className: '', - multiSelect: false, - panelHeight: null, - idField: 'value', - textField: 'name', - uri: '' - }; - } else if (schemaField.editor.$type === DgControl.CheckBox.type) { - return { - id: schemaField.id, - controltype: 'dropdown', - require: false, - valueType: '2', - enumValues: [{ value: true, name: 'true' }, { value: false, name: 'false' }], - className: '', - multiSelect: false, - panelHeight: null, - idField: 'value', - textField: 'name', - uri: '' - }; - } else if (schemaField.editor.$type === DgControl.TextBox.type || schemaField.editor.$type === DgControl.NumericBox.type) { - return { - id: schemaField.id, - controltype: 'dropdown', - require: false, - valueType: '1', - enumValues: [], - className: '', - multiSelect: false, - panelHeight: null, - idField: 'value', - textField: 'name', - uri: '' - }; - } - break; - } - case 'help': { - return { - id: schemaField.id, - controltype: 'help', - require: false, - helpId: '', - uri: '', - idField: '', - valueField: '', - textField: '', - displayType: '', - enableExtendLoadMethod: true, - enableFullTree: false, - loadTreeDataType: 'default', - multiSelect: false, - enableCascade: false, - cascadeStatus: 'enable', - expandLevel: -1, - className: '', - nosearch: false, - displayFields: '', - clearFields: '', - editable: false, - pageList: '10,20,30,50,100', - pageSize: 20, - dialogTitle: '', - panelHeight: null, - panelWidth: null, - quickSelect: { - enable: false, - showItemsCount: 10, - formatter: null, - showMore: true - } - }; - } - case 'combolist-help': { - return { - id: schemaField.id, - controltype: 'combolist-help', - require: false, - className: '', - helpId: '', - uri: '', - idField: '', - valueField: '', - textField: '', - displayType: '', - enableExtendLoadMethod: true, - enableFullTree: false, - loadTreeDataType: 'default', - multiSelect: false, - expandLevel: -1, - panelHeight: null, - panelWidth: null - }; - } - case 'number': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - textAlign: 'left', - precision: schemaField.type.precision || 0, - isBigNumber: schemaField.type.name === FormSchemaEntityFieldTypeName.BigNumber - }; - } - case 'single-number': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - textAlign: 'left', - precision: schemaField.type.precision || 0, - isBigNumber: schemaField.type.name === FormSchemaEntityFieldTypeName.BigNumber - }; - } - case 'date': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - format: 'yyyy-MM-dd', - returnFormat: 'yyyy-MM-dd', - weekSelect: false, - startFieldCode: [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name) ? schemaField.path : undefined, - endFieldCode: [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name) ? schemaField.path : undefined - }; - } - case 'single-date': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - format: 'yyyy-MM-dd', - returnFormat: 'yyyy-MM-dd', - isDynamicDate: false - }; - } - case 'date-time': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - enableCustomFormat: true, - format: 'yyyy-MM-dd HH:mm:ss', - returnFormat: 'yyyy-MM-dd HH:mm:ss', - // startFieldCode: [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name) ? schemaField.path : undefined, - // endFieldCode: [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name) ? schemaField.path : undefined - }; - } - case 'single-date-time': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - enableCustomFormat: true, - format: 'yyyy-MM-dd HH:mm:ss', - returnFormat: 'yyyy-MM-dd HH:mm:ss' - }; - } - case 'single-month': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - format: 'yyyy-MM', - returnFormat: 'yyyy-MM' - }; - } - case 'month': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - format: 'yyyy-MM', - returnFormat: 'yyyy-MM' - }; - } - case 'single-year': { - return { - id: schemaField.id, - controltype: controlType, - require: false, - format: 'yyyy', - returnFormat: 'yyyy' - }; - } - case 'radio': { - return { - id: schemaField.id, - controltype: 'radio', - require: false, - valueType: '1', - enumValues: schemaField.type.enumValues, - className: '', - horizontal: true, - showLabel: false - }; - } - case 'input-group': { - return { - id: schemaField.id, - controltype: 'input-group', - require: false, - className: '', - editable: true, - groupText: '', - usageMode: 'text', - modalConfig: { - modalCmp: null, - mapFields: null, - showHeader: true, - title: '', - showCloseButton: true, - showMaxButton: true, - width: 800, - height: 600, - showFooterButtons: true, - footerButtons: [] - } - }; - } - default: { - return { - id: schemaField.id, - controltype: controlType, - require: false - }; - } - } - } - - /** - * 组装查询方案字段信息 - * @param schemaField 字段 - */ - static getSolutionField(schemaField: any) { - if (schemaField.$type !== 'SimpleField') { - // console.warn('字段类型错误!'); - return; - } - let control = {} as any; - switch (schemaField.type.name) { - case FormSchemaEntityFieldTypeName.String: { - control = QuerySchemaFieldCreator.getControlDataByType('text', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Number: case GSPElementDataType.Integer: case GSPElementDataType.Decimal: - case FormSchemaEntityFieldTypeName.BigNumber: { - control = QuerySchemaFieldCreator.getControlDataByType('number', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Date: case FormSchemaEntityFieldTypeName.DateTime: { - control = QuerySchemaFieldCreator.getControlDataByType('date', schemaField); - break; - } - case FormSchemaEntityFieldTypeName.Enum: case FormSchemaEntityFieldTypeName.Boolean: { - control = QuerySchemaFieldCreator.getControlDataByType('dropdown', schemaField); - break; - } - default: { - control = null; - } - } - - const fieldConfig: any = { - id: schemaField.id, - labelCode: schemaField.path, - code: schemaField.code, - name: schemaField.name, - placeHolder: '', - control - }; - - if (this.rangePlaceHolderControl.includes(fieldConfig.control.controltype)) { - fieldConfig.beginPlaceHolder = ''; - fieldConfig.endPlaceHolder = ''; - } else { - fieldConfig.placeHolder = ''; - } - - return fieldConfig; - } - -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-types.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-types.ts deleted file mode 100644 index f6744b3dd2680bdced10887c5cbcd193c34e35a3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-data/field-control-types.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { KeyMap } from '@farris/ide-property-panel'; -import { FormSchemaEntityFieldTypeName } from '@farris/designer-services'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; - -export class QuerySchemaFieldTypeEnums { - - - static getControlTypeEnum(fieldType: string): KeyMap[] { - const controlTypes = []; - switch (fieldType) { - case FormSchemaEntityFieldTypeName.String: { - controlTypes.push({ key: 'text', value: '文本' }); - controlTypes.push({ key: 'help', value: '帮助' }); - controlTypes.push({ key: 'combolist-help', value: '下拉帮助' }); - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'single-year', value: '年度' }); - controlTypes.push({ key: 'single-month', value: '单月份' }); - controlTypes.push({ key: 'month', value: '月份区间' }); - controlTypes.push({ key: 'date', value: '日期区间' }); - controlTypes.push({ key: 'single-date', value: '日期' }); - controlTypes.push({ key: 'date-time', value: '日期时间区间' }); - controlTypes.push({ key: 'single-date-time', value: '单日期时间' }); - controlTypes.push({ key: 'input-group', value: '智能输入框' }); - break; - } - case FormSchemaEntityFieldTypeName.Number: case GSPElementDataType.Integer: case GSPElementDataType.Decimal: { - controlTypes.push({ key: 'number', value: '数值区间' }); - controlTypes.push({ key: 'single-number', value: '数值' }); - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - break; - } - case FormSchemaEntityFieldTypeName.BigNumber: { - controlTypes.push({ key: 'number', value: '数值区间' }); - controlTypes.push({ key: 'single-number', value: '数值' }); - break; - } - case FormSchemaEntityFieldTypeName.Date: { - controlTypes.push({ key: 'date', value: '日期区间' }); - controlTypes.push({ key: 'single-date', value: '日期' }); - controlTypes.push({ key: 'date-time', value: '日期时间区间' }); - break; - } - case FormSchemaEntityFieldTypeName.DateTime: { - controlTypes.push({ key: 'date', value: '日期区间' }); - controlTypes.push({ key: 'single-date', value: '日期' }); - controlTypes.push({ key: 'date-time', value: '日期时间区间' }); - controlTypes.push({ key: 'single-date-time', value: '单日期时间' }); - break; - } - case FormSchemaEntityFieldTypeName.Enum: { - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'radio', value: '单选组' }); - break; - } - case FormSchemaEntityFieldTypeName.Boolean: { - controlTypes.push({ key: 'dropdown', value: '下拉选择' }); - controlTypes.push({ key: 'bool-check', value: '复选框' }); - break; - } - } - return controlTypes; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-field-converter.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-field-converter.ts deleted file mode 100644 index 437e652998bf129182cc15a71877212f736653ca..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-field-converter.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class QuerySchemeFieldConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data) { - return '共 ' + data.length + ' 项'; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.css deleted file mode 100644 index 69367c23c1cc9bcb8f33af80403a9eff408a513b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.css +++ /dev/null @@ -1,3 +0,0 @@ -.querySchemeMultiSelect .f-multi-select-list-btns:last-child { - display: none; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.html deleted file mode 100644 index eb744665c7a98df6167fca7ff986dcba2172db2c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.html +++ /dev/null @@ -1,22 +0,0 @@ -
    - - - {{ data.name }} [ {{ data.bindingField }}] - - - -
    - -
    - - -
    - - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.ts deleted file mode 100644 index 9f44401c9d91bbe619d54390b08a0a3622217c66..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component.ts +++ /dev/null @@ -1,308 +0,0 @@ -import { - Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef, HostBinding, ViewEncapsulation, NgZone, OnDestroy -} from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeNode } from '@farris/ui-treetable'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { SchemeFeatureService } from './query-scheme.service'; -import { cloneDeep } from 'lodash-es'; -import { MessagerService } from '@farris/ui-messager'; -import { FormSchemaEntityField$Type, FormSchemaEntityFieldTypeName, DesignViewModelService, DomService } from '@farris/designer-services'; -import { MultiSelectComponent } from '@farris/ui-multi-select'; -import { Subscription } from 'rxjs'; -import { QuerySchemaFieldCreator } from './query-data/field-control-data'; - -@Component({ - selector: 'app-query-scheme-fields-editor', - templateUrl: './query-scheme-fields-editor.component.html', - providers: [SchemeFeatureService], - styleUrls: ['./query-scheme-fields-editor.component.css'], - encapsulation: ViewEncapsulation.None -}) -export class QuerySchemeFieldsEditorComponent implements OnInit, OnDestroy { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { viewModelId: '', presetFieldConfigs: [] }; - - /** 是否显示属性面板 */ - @Input() showPropertyPanel = true; - - @ViewChild('footer') modalFooter: TemplateRef; - modalConfig = { - title: '筛选方案字段编辑器', - width: 1200, - height: 700, - showButtons: true, - showMaxButton: true - }; - // 筛选方案定义的字段 - fieldConfigs = []; - - // 预设的字段 - presetFieldConfigs = []; - - // 左侧树表数据 - treeData: TreeNode[] = []; - - // 当前可选的所有字段ID - treeNodeIds: string[] = []; - - // 选中的字段 - selectedFieldIds = []; - - // 右侧选中行对应的schema字段信息 - selectedSchemaField; - - - // 属性面板配置 - propertyConfig: ElementPropertyConfig[]; - - // 属性面板值 - propertyData; - - // 大数值类型的字段ID--用于schema变更后修改数字控件的isBigNumber属性 - // bigNumberFields = []; - - /** 平铺的树表数据 */ - plainTreeNodes = []; - - @HostBinding('class') - class = 'd-flex h-100'; - - @ViewChild(MultiSelectComponent) multiSelectCmp: MultiSelectComponent; - - timer: any; - - private triggerSaveAndCloseEditorSub: Subscription; - - /** 记录编辑器刚打开时的DOM actions数据。编辑器内部交互面板在操作过程中可能会修改actions节点,导致点击【取消】按钮时无法还原actions数据。所以这里记录一份原始数据,方便还原。 */ - private previousActions: any[]; - - /** 记录编辑器刚打开时的DOM viewmodels数据。编辑器内部交互面板在操作过程中可能会修改viewmodels节点,导致点击【取消】按钮时无法还原viewmodels数据。所以这里记录一份原始数据,方便还原。 */ - private previousViewModels: any[]; - - - constructor( - private dgVMService: DesignViewModelService, private notifyService: NotifyService, - private schemeFeatureServ: SchemeFeatureService, private msgService: MessagerService, - private domService: DomService, - private ngZone: NgZone) { } - - ngOnInit(): void { - if (!this.editorParams || !this.value) { - return; - } - this.fieldConfigs = cloneDeep(this.value); - this.treeData = this.dgVMService.getAllFields2TreeByVMId(this.editorParams.viewModelId); - this.plainTreeNodes = []; - this.filterAllowedType(this.treeData); - - this.presetFieldConfigs = this.editorParams.presetFieldConfigs; - - this.selectedFieldIds = this.value.map(v => v.id); - - this.filterSchemFields(); - - // 触发保存并关闭当前窗口 - this.triggerSaveAndCloseEditorSub = this.schemeFeatureServ.triggerSaveAndCloseEditor.subscribe(() => { - this.clickConfirm(); - }); - - // 默认选中第一行 - if (this.selectedFieldIds.length && this.multiSelectCmp['selectItem']) { - this.ngZone.runOutsideAngular(() => { - this.timer = setTimeout(() => { - this.multiSelectCmp['selectItem'](this.selectedFieldIds[0]); - }); - }); - } - - - this.previousActions = cloneDeep(this.domService.module.actions); - this.previousViewModels = cloneDeep(this.domService.module.viewmodels); - } - - ngOnDestroy(): void { - this.schemeFeatureServ.triggerSaveAndCloseEditor.unsubscribe(); - - if (this.triggerSaveAndCloseEditorSub) { - this.triggerSaveAndCloseEditorSub.unsubscribe(); - } - - if (this.timer) { - clearTimeout(this.timer); - } - - } - - /** - * 过滤筛选方案支持的字段 - * @param treeData 树数据 - */ - filterAllowedType(treeData: TreeNode[]) { - treeData.forEach(treeNode => { - this.plainTreeNodes.push(treeNode.data); - if (treeNode.data.$type === FormSchemaEntityField$Type.SimpleField) { - if (!this.schemeFeatureServ.allowedFieldType.includes(treeNode.data.type.name)) { - treeNode.selectable = false; - } else { - this.treeNodeIds.push(treeNode.data.id); - // if (treeNode.data.type.name === FormSchemaEntityFieldTypeName.BigNumber) { - // this.bigNumberFields.push(treeNode.data.id); - // } - } - } - if (treeNode.children && treeNode.children.length > 0) { - this.filterAllowedType(treeNode.children); - } - }); - } - filterSchemFields() { - const removedFields = []; - this.selectedFieldIds.forEach(id => { - const field = this.fieldConfigs.find(f => f.id === id); - if (!this.treeNodeIds.includes(id)) { - // schema中已移除的字段 - removedFields.push(field.name); - this.fieldConfigs = this.fieldConfigs.filter(f => f.id !== id); - this.selectedFieldIds = this.selectedFieldIds.filter(fid => fid !== id); - return; - } - if (!field.control || !field.control.controltype) { - return; - } - const schemaField = this.plainTreeNodes.find(node => node.path === field.labelCode); - if (!schemaField) { - return; - } - // 补充大数字值 - if (field.control.controltype.includes('number')) { - field.control.isBigNumber = schemaField.type.name === FormSchemaEntityFieldTypeName.BigNumber; - } - // 日期类型的字段,配置为日期区间控件或日期时间区间控件,需要补充开始字段和结束字段 - if (['date'].includes(field.control.controltype)) { - if ([FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name)) { - field.control.startFieldCode = field.control.startFieldCode ? field.control.startFieldCode : schemaField.path; - field.control.endFieldCode = field.control.endFieldCode ? field.control.endFieldCode : schemaField.path; - } - } - }); - if (removedFields.length > 0) { - - this.ngZone.runOutsideAngular(() => { - setTimeout(() => { - this.msgService.warning('已选择字段【' + removedFields.toString() + '】已移除、变更或暂不支持添加,点击确定后将自动删除字段'); - }); - }); - } - } - - /** - * 改变选中字段事件 - * @param e 选中的行数据 - */ - changeSelectField(e: any[]) { - if (!e) { - return; - } - const fieldConfigs = []; - if (e.length === 0) { - this.propertyConfig = []; - this.fieldConfigs = []; - return; - } - e.forEach(data => { - const co = this.fieldConfigs.find(c => c.id === data.id); - if (co) { - fieldConfigs.push(co); - } else { - const newConfig = QuerySchemaFieldCreator.getSolutionField(data); - if (newConfig.control) { - fieldConfigs.push(newConfig); - } - } - }); - this.fieldConfigs = fieldConfigs; - - - if (this.selectedSchemaField && !fieldConfigs.find(f => f.id === this.selectedSchemaField.id)) { - this.propertyConfig = []; - } - - this.schemeFeatureServ.fieldConfigs = this.fieldConfigs; - } - - /** - * 切换右侧行 - * @param e 行数据 - */ - changeRightSelect(e) { - if (!e.selected || !e.data) { - return; - } - this.triggerShowPropertyPanel(e.data); - } - - triggerShowPropertyPanel(rowData: any) { - this.selectedSchemaField = rowData; - - this.propertyData = this.fieldConfigs.find(f => f.id === rowData.id); - this.propertyConfig = this.schemeFeatureServ.getPropertyConfig(rowData, this.propertyData, - this.editorParams.viewModelId, this.fieldConfigs); - - } - - - propertyChanged(changeObject: PropertyChangeObject) { - - // 修改控件名称后,要同步控件的路径信息,用于交互面板的显示 - if (changeObject.propertyID === 'name') { - - this.domService.controlBasicInfoMap.set(this.propertyData.id, { - showName: changeObject.propertyValue, - parentPathName: `筛选方案 > ${changeObject.propertyValue}` - }); - } - - - } - - submitPropertyModal(data: { changeObject: PropertyChangeObject, parameters: any }) { - const changeObject = data.changeObject; - // 交互面板变更后,同步控件的路径信息 - if (changeObject.categoryId === 'eventsEditor') { - - this.domService.controlBasicInfoMap.set(this.propertyData.id, { - showName: this.propertyData.name, - parentPathName: `筛选方案 > ${this.propertyData.name}` - }); - } - - } - clickCancel() { - this.domService.module.actions = this.previousActions; - this.domService.module.viewmodels = this.previousViewModels; - - this.closeModal.emit(); - } - - clickConfirm() { - if (this.fieldConfigs.length === 0) { - this.notifyService.warning('请选择字段'); - return; - } - if (this.presetFieldConfigs && this.presetFieldConfigs.length > 0) { - // 同步移除的字段 - const fieldIds = this.fieldConfigs.map(f => f.id); - this.presetFieldConfigs = this.presetFieldConfigs.filter(pf => fieldIds.includes(pf.id)); - // 同步修改的属性 - this.presetFieldConfigs.forEach(presetF => { - const field = this.fieldConfigs.find(f => f.id === presetF.id); - Object.assign(presetF, field); - }); - - } - this.submitModal.emit({ value: this.fieldConfigs, parameters: this.presetFieldConfigs }); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme.service.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme.service.ts deleted file mode 100644 index 9a00983967edcaca461204780c98dc9305e739ab..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme.service.ts +++ /dev/null @@ -1,1514 +0,0 @@ -// tslint:disable:max-line-length -import { ElementPropertyConfig, BeforeOpenModalResult, PropertyEntity, KeyMap } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { DgControl } from '../../../../../../utils/dg-control'; -import { ItemCollectionEditorComponent, ItemCollectionConverter, MappingConverter, SelectMappingComponent } from '@farris/designer-devkit'; -// import { SelectHelpMetadataComponent } from '../../../../../input/lookup-edit/property/editors/select-help-metadata/select-help-metadata.component'; -// import { SelectHelpConverter } from '../../../../../input/lookup-edit/property/editors/select-help-metadata/select-help-converter'; -// import { SelectHelpTextFieldComponent } from '../../../../../input/lookup-edit/property/editors/select-help-text-field/select-help-text-field.component'; -import { EventEditorService, FormSchemaEntityField, FormSchemaEntityFieldTypeName, WebCmdService, FormBasicService, DomService, FormSchemaEntityFieldType$Type, DesignViewModelService, SchemaService } from '@farris/designer-services'; -import { CodeEditorComponent, ImportCmpComponent, ImportCmpConverter } from '@farris/designer-devkit'; -import { SelectHelpClearFieldsEditorComponent } from './select-help-clear-fields/select-help-clear-fields.component'; -import { InputgroupFormMappingEditorComponent } from './inputgroup-form-mapping-editor/inputgroup-form-mapping-editor'; -import { QuerySchemaFieldCreator } from './query-data/field-control-data'; -import { QuerySchemaFieldTypeEnums } from './query-data/field-control-types'; -import { DATE_FORMATS } from '../../../../../input/date-box/property/date-format'; -// import { SelectHelpDisplayFieldsComponent } from '../../../../../input/lookup-edit/property/editors/select-help-display-fields/select-help-display-fields.component'; -import { Injectable } from '@angular/core'; -import { EventsEditorFuncUtils } from '../../../../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../../../../entity/property-change-entity'; -import { MessagerService } from '@farris/ui-messager'; -import { Subject } from 'rxjs'; - -/** - * 筛选方案相关特性 - */ -@Injectable() -export class SchemeFeatureService { - - /** 字段配置 */ - fieldConfigs: any[]; - - /** 属性配置 */ - propertyConfig: ElementPropertyConfig[]; - - /** 触发关闭编辑器,用于在交互面板中跳转到代码视图之前将编辑器弹窗关闭 */ - triggerSaveAndCloseEditor = new Subject(); - - constructor( - private domService: DomService, - private webCmdService: WebCmdService, - private formBasicService: FormBasicService, - private eventEditorService: EventEditorService, - private msgService: MessagerService, - private schemaService: SchemaService, - private dgVMService: DesignViewModelService) { } - - /** - * 筛选方案支持的编辑器类型 - */ - allowedFieldType = [ - FormSchemaEntityFieldTypeName.String, - FormSchemaEntityFieldTypeName.Number, - FormSchemaEntityFieldTypeName.BigNumber, - FormSchemaEntityFieldTypeName.Date, - FormSchemaEntityFieldTypeName.DateTime, - FormSchemaEntityFieldTypeName.Boolean, - FormSchemaEntityFieldTypeName.Enum - ]; - - enumDataConfig; - - - getPropertyConfig(schemaField: FormSchemaEntityField, fieldObject: any, viewModelId: string, fieldConfigs: any[]): ElementPropertyConfig[] { - if (!fieldObject) { - return []; - } - this.fieldConfigs = fieldConfigs || []; - const self = this; - if (fieldObject.control) { - fieldObject.control.id = fieldObject.id; - } - this.enumDataConfig = this.getEnumDataConfig(fieldObject.control, schemaField); - this.propertyConfig = []; - let openModalPropConfigs; - if (schemaField.type.name === FormSchemaEntityFieldTypeName.String) { - // 智能输入框----弹出表单框属性 - openModalPropConfigs = this.getOpenModalPropConfigs(fieldObject, viewModelId); - } - const properties = this.getUsualPropertyEntities(schemaField, fieldObject, viewModelId, fieldConfigs); - const usualConfig: ElementPropertyConfig = { - categoryId: 'usual', - categoryName: '常规', - hideTitle: true, - properties, - setPropertyRelates(changeObject: any, propertyData: any, parameters: any) { - switch (changeObject.propertyID) { - case 'controltype': { - // 切换类型:重新设置control节点,以便清除与当前类型无关的属性值;保留className属性 - const oldControl = propertyData.control; - propertyData.control = QuerySchemaFieldCreator.getControlDataByType( - changeObject.propertyValue, schemaField); - Object.assign(propertyData.control, { - className: oldControl.className, - require: oldControl.require - }); - self.setOpenModalConfigDisplay(propertyData, openModalPropConfigs); - self.enumDataConfig = self.getEnumDataConfig(propertyData.control, schemaField); - - // 重置属性分类 - const newProps = self.getUsualPropertyEntities(schemaField, propertyData, viewModelId, fieldConfigs); - Object.assign(this.properties, newProps); - - // 重置帮助快捷选择分类 - const newHelpQuickSelectConfig = self.getHelpQuickSelectPropConfig(propertyData, viewModelId); - const currentHelpQuickSelectConfig = self.propertyConfig.find(cat => cat.categoryId === 'helpQuickSelect'); - Object.assign(currentHelpQuickSelectConfig, newHelpQuickSelectConfig); - - // 重置事件分类 - const newEventConfig = self.getEventPropertyConfig(propertyData, viewModelId); - const currentEventConfig = self.propertyConfig.find(cat => cat.categoryId === 'eventsEditor'); - Object.assign(currentEventConfig, newEventConfig); - - break; - } - case 'helpId': { - // 选择帮助元数据返回的是DataSource,需要拆分出uri和idField - if (!changeObject.propertyValue) { - Object.assign(propertyData.control, - { - helpId: '', uri: '', idField: '', valueField: '', textField: '', displayType: '', - enableExtendLoadMethod: true, enableFullTree: false, loadTreeDataType: 'default', - multiSelect: false, expandLevel: -1 - }); - if (propertyData.control.controltype === 'help') { - propertyData.control.enableCascade = false; - propertyData.control.displayFields = ''; - } - } else { - const { uri, idField } = changeObject.propertyValue; - propertyData.control.uri = uri; - propertyData.control.idField = idField; - Object.assign(propertyData.control, parameters); - - propertyData.control.displayFields = ''; - - const controlProp = this.properties.find(p => p.propertyID === 'control'); - - controlProp.cascadeConfig.map(p => { - // 旧表单手动添加的displayType 大小写不一定,故转换为小写再对比 - if (p.propertyID === 'enableFullTree' || p.propertyID === 'expandLevel') { - p.visible = parameters.displayType.toLowerCase() === 'treelist' || - parameters.displayType.toLowerCase() === 'navtreelist'; - } - if (p.propertyID === 'enableCascade') { - p.visible = propertyData.control.controltype === 'help' && propertyData.control.multiSelect && - (parameters.displayType.toLowerCase() === 'treelist' || - parameters.displayType.toLowerCase() === 'navtreelist'); - } - if (p.propertyID === 'cascadeStatus') { - p.visible = propertyData.control.controltype === 'help' && propertyData.control.multiSelect && - (parameters.displayType.toLowerCase() === 'treelist' || - parameters.displayType.toLowerCase() === 'navtreelist') && propertyData.control.enableCascade; - } - if (p.propertyID === 'loadTreeDataType') { - p.visible = parameters.displayType.toLowerCase() === 'treelist'; - } - if (p.propertyID === 'enableExtendLoadMethod') { - p.visible = true; - } - // 映射属性中配置帮助id - if (p.propertyID === 'mapFields') { - p.editorParams.sourceMetadataId = parameters ? parameters.helpId : ''; - } - - // 分页属性 - if (p.propertyID === 'pageList') { - p.visible = propertyData.control.controltype === 'help' && parameters.displayType && parameters.displayType.toLowerCase() !== 'treelist'; - } - if (p.propertyID === 'pageSize') { - p.visible = propertyData.control.controltype === 'help' && parameters.displayType && parameters.displayType.toLowerCase() !== 'treelist'; - if (p.visible) { - p.iterator = self.getPageSizeIterator(propertyData.control.pageList); - } - } - }); - } - - // 重置帮助快捷选择分类 - const newHelpQuickSelectConfig = self.getHelpQuickSelectPropConfig(propertyData, viewModelId); - const currentHelpQuickSelectConfig = self.propertyConfig.find(cat => cat.categoryId === 'helpQuickSelect'); - Object.assign(currentHelpQuickSelectConfig, newHelpQuickSelectConfig); - - break; - } - case 'multiSelect': { - const control = propertyData.control; - if (control.controltype === 'help' && control.displayType && - (control.displayType.toLowerCase() === 'treelist' || control.displayType.toLowerCase() === 'navtreelist')) { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const enableCascade = controlProp.cascadeConfig.find(p => p.propertyID === 'enableCascade'); - enableCascade.visible = propertyData.control.multiSelect; - - const cascadeStatus = controlProp.cascadeConfig.find(p => p.propertyID === 'cascadeStatus'); - if (cascadeStatus) { - cascadeStatus.visible = propertyData.control.multiSelect && propertyData.control.enableCascade; - } - - } - // 重置帮助快捷选择分类 - if (control.controltype === 'help') { - const newHelpQuickSelectConfig = self.getHelpQuickSelectPropConfig(propertyData, viewModelId); - const currentHelpQuickSelectConfig = self.propertyConfig.find(cat => cat.categoryId === 'helpQuickSelect'); - Object.assign(currentHelpQuickSelectConfig, newHelpQuickSelectConfig); - } - break; - } - case 'maxValue': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const minProp = controlProp.cascadeConfig.find(p => p.propertyID === 'minValue'); - if (minProp) { - const newPropConfig = self.getMinDatePropConfig(fieldObject, viewModelId); - Object.assign(minProp, newPropConfig); - } - break; - } - case 'minValue': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const maxProp = controlProp.cascadeConfig.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - const newPropConfig = self.getMaxDatePropConfig(fieldObject, viewModelId); - Object.assign(maxProp, newPropConfig); - } - break; - } - case 'precision': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const minProp = controlProp.cascadeConfig.find(p => p.propertyID === 'minValue'); - const maxProp = controlProp.cascadeConfig.find(p => p.propertyID === 'maxValue'); - - minProp.decimals = changeObject.propertyValue; - maxProp.decimals = changeObject.propertyValue; - break; - } - case 'usageMode': { - self.setOpenModalConfigDisplay(propertyData, openModalPropConfigs); - if (propertyData.control.modalConfig) { - propertyData.control.modalConfig.mapFields = ''; - propertyData.control.modalConfig.modalCmp = ''; - propertyData.control.modalConfig.component = ''; - propertyData.control.modalConfig.formId = ''; - } - break; - } - case 'pageList': { - changeObject.propertyValue = propertyData.control.pageList = self.checkPageList(changeObject.propertyValue); - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const pageSize = controlProp.cascadeConfig.find(p => p.propertyID === 'pageSize'); - - if (pageSize) { - pageSize.iterator = self.getPageSizeIterator(changeObject.propertyValue); - } - if (!changeObject.propertyValue.includes(propertyData.control.pageSize)) { - propertyData.control.pageSize = null; - } - break; - } - case 'enableCustomFormat': { - const controltype = propertyData.control.controltype; - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const format = controlProp.cascadeConfig.find(p => p.propertyID === 'format'); - if (format) { - format.iterator = self.getDateFormatIteratror(controltype, changeObject.propertyValue, propertyData.control.returnFormat); - } - const formatKeys = format.iterator.map(i => i.key); - if (!formatKeys.includes(propertyData.control.format)) { - propertyData.control.format = formatKeys[0]; - } - - const returnFormat = controlProp.cascadeConfig.find(p => p.propertyID === 'returnFormat'); - if (returnFormat) { - returnFormat.iterator = self.getDateReturnFormatIteratror(controltype, changeObject.propertyValue); - } - - break; - } - case 'returnFormat': { - const controltype = propertyData.control.controltype; - const controlProp = this.properties.find(p => p.propertyID === 'control'); - - const enableCustomFormat = controlProp.cascadeConfig.find(p => p.propertyID === 'enableCustomFormat'); - if (enableCustomFormat) { - enableCustomFormat.readonly = changeObject.propertyValue && !changeObject.propertyValue.includes('HH'); - } - if (enableCustomFormat.readonly) { - propertyData.control.enableCustomFormat = enableCustomFormat.readonly; - } - - - const format = controlProp.cascadeConfig.find(p => p.propertyID === 'format'); - if (format) { - format.iterator = self.getDateFormatIteratror(controltype, propertyData.control.enableCustomFormat, propertyData.control.returnFormat); - } - const formatKeys = format.iterator.map(i => i.key); - if (!formatKeys.includes(propertyData.control.format)) { - propertyData.control.format = formatKeys[0]; - } - break; - } - case 'enumValues': { - if (self.enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.control.idField = parameters.valueField; - propertyData.control.textField = parameters.nameField; - } - break; - } - case 'enableCascade': { - const controlProp = this.properties.find(p => p.propertyID === 'control'); - const cascadeStatus = controlProp.cascadeConfig.find(p => p.propertyID === 'cascadeStatus'); - if (cascadeStatus) { - cascadeStatus.visible = changeObject.propertyValue; - } - } - } - } - }; - this.propertyConfig.push(usualConfig); - if (openModalPropConfigs) { - this.propertyConfig = this.propertyConfig.concat(openModalPropConfigs); - } - - const helpQuickSelectConfig = this.getHelpQuickSelectPropConfig(fieldObject, viewModelId); - if (helpQuickSelectConfig) { - this.propertyConfig.push(helpQuickSelectConfig); - } - const eventConfig = this.getEventPropertyConfig(fieldObject, viewModelId); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - /** - * 获取交互面板配置 - * @param propertyData 属性值 - */ - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - let eventList = []; - const controlData = propertyData.control; - eventList = this.switchEvents(controlData, eventList); - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, eventList, this.switchEvents), - tabId: 'commands', - tabName: '交互', - enableCascade: true, - propertyData: controlData, - parentPropertyID: 'control', - setPropertyRelates(changeObject: FormPropertyChangeObject, data: any, parameters: any) { - delete controlData[viewModelId]; - // 若需要跳转到代码视图,首先要求用户将当前弹出窗口关闭 - if (parameters.isAddControllerMethod) { - self.msgService.question('确定关闭当前编辑器并跳转到代码视图吗?', () => { - // 暂存控件信息,用于自动创建新方法的方法编号和名称 - parameters.controlInfo = { type: propertyData.code, name: propertyData.name }; - - self.triggerSaveAndCloseEditor.next(); - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, controlData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, parameters['events'], self.switchEvents); - }); - } else { - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, controlData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, controlData, viewModelId, parameters['events'], self.switchEvents); - } - - } - }; - } - /** - * 处理动态事件属性 - * @param fieldObject 属性值 - * @param eventList 事件列表 - */ - private switchEvents(fieldObjectControl: any, eventList: { label: string, name: string }[]) { - const controlType = fieldObjectControl.controltype; - // 帮助相关事件 - if (controlType.includes('help')) { - if (!eventList.find(e => e.label === 'preEventCmd')) { - eventList.push( - { - label: 'preEventCmd', - name: '帮助前事件' - }, - { - label: 'postEventCmd', - name: '帮助后事件' - } - ); - } - - if (controlType === 'help') { - if (!eventList.find(e => e.label === 'clear')) { - eventList.push( - { - label: 'clear', - name: '帮助清空事件' - } - ); - } - } - - } else { - eventList = eventList.filter(e => e.label !== 'preEventCmd' && e.label !== 'postEventCmd' && e.label !== 'clear'); - } - - // 智能输入框相关事件 - if (controlType === 'input-group') { - if (!eventList.find(e => e.label === 'click')) { - eventList.push( - { - label: 'click', - name: '点击事件' - } - ); - } - } else { - eventList = eventList.filter(e => e.label !== 'click'); - } - - // 下拉选择事件 - if (controlType.includes('dropdown')) { - if (!eventList.find(e => e.label === 'beforeShow')) { - eventList.push( - { - label: 'beforeShow', - name: '面板显示前事件' - }, - { - label: 'beforeHide', - name: '面板隐藏前事件' - } - ); - } - } else { - eventList = eventList.filter(e => e.label !== 'beforeShow' && e.label !== 'beforeHide'); - } - - // 日期选择值变化事件 - if (controlType.includes('year') || controlType.includes('month') || controlType.includes('date')) { - if (!eventList.find(e => e.label === 'valueChangedCmd')) { - eventList.push( - { - label: 'valueChangedCmd', - name: '值变化事件' - } - ); - } - } else { - eventList = eventList.filter(e => e.label !== 'valueChangedCmd'); - } - - return eventList; - } - - private getPlaceHolder(controlType: string) { - return [ - { - propertyID: 'beginPlaceHolder', - propertyName: '开始占位符文本', - propertyType: 'string', - visible: QuerySchemaFieldCreator.rangePlaceHolderControl.includes(controlType) - }, - { - propertyID: 'endPlaceHolder', - propertyName: '结束占位符文本', - propertyType: 'string', - visible: QuerySchemaFieldCreator.rangePlaceHolderControl.includes(controlType) - }, - { - propertyID: 'placeHolder', - propertyName: '占位符文本', - propertyType: 'string', - visible: !QuerySchemaFieldCreator.rangePlaceHolderControl.includes(controlType) - } - ]; - } - - private setOpenModalConfigDisplay(propertyData: any, openModalPropConfigs: ElementPropertyConfig[]) { - if (!openModalPropConfigs || !propertyData.control) { - return; - } - if (propertyData.control.controltype !== 'input-group') { - openModalPropConfigs.forEach(config => { - config.hide = true; - }); - return; - } - openModalPropConfigs.forEach(config => { - if (config.categoryId === 'openModal') { - config.hide = propertyData.control.usageMode !== 'open-modal'; - } - if (config.categoryId === 'openRemoteModal') { - config.hide = propertyData.control.usageMode !== 'open-remote-modal'; - } - if (config.categoryId === 'modalConfig') { - config.hide = propertyData.control.usageMode === 'text'; - } - }); - } - - private getUsualPropertyEntities(schemaField: any, fieldObject: any, viewModelId: string, fieldConfigs: any[]): PropertyEntity[] { - - const controlTypes = QuerySchemaFieldTypeEnums.getControlTypeEnum(schemaField.type.name); - const controlType = fieldObject.control.controltype; - const placeHolderProp = this.getPlaceHolder(controlType); - const maxValuePropConfig = this.getMaxDatePropConfig(fieldObject, viewModelId); - const minValuePropConfig = this.getMinDatePropConfig(fieldObject, viewModelId); - const dateFieldList = this.getDateFieldInSchema(schemaField, viewModelId); - - const self = this; - - return [{ - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true - }, { - propertyID: 'code', - propertyName: '编号', - propertyType: 'string', - readonly: true - }, { - propertyID: 'labelCode', - propertyName: '标签', - propertyType: 'string', - readonly: true - }, { - propertyID: 'name', - propertyName: '控件名称', - propertyType: 'string' - }, - ...placeHolderProp, - { - propertyID: 'control', - propertyName: '控件', - propertyType: 'cascade', - isExpand: true, - hideCascadeTitle: true, - visible: true, - cascadeConfig: [ - { - propertyID: 'controltype', - propertyName: '控件类型', - propertyType: 'select', - iterator: controlTypes - }, { - propertyID: 'className', - propertyName: '样式', - propertyType: 'string' - }, { - propertyID: 'require', - propertyName: '是否必填', - propertyType: 'boolean', - defaultValue: false - }, - // { - // propertyID: 'helpId', - // propertyName: '帮助元数据', - // propertyType: 'modal', - // visible: controlType.includes('help'), - // category: ['help', 'combolist-help'], - // editor: SelectHelpMetadataComponent, - // editorParams: { - // viewModelId, - // bindingField: schemaField.bindingField, - // bindingType: 'Form', - // relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - // boId: this.formBasicService.formMetaBasicInfo.bizobjectID, - // }, - // converter: new SelectHelpConverter(), - // showClearButton: true - // }, - { - propertyID: 'uri', - propertyName: 'uri', - propertyType: 'string', - visible: ['help', 'combolist-help', 'dropdown'].includes(controlType), - category: ['help', 'combolist-help', 'dropdown'], - readonly: ['help', 'combolist-help'].includes(controlType) - }, - // { - // propertyID: 'textField', - // propertyName: '文本字段', - // propertyType: 'modal', - // visible: ['help', 'combolist-help'].includes(controlType), - // category: ['help', 'combolist-help'], - // editor: SelectHelpTextFieldComponent, - // editorParams: { - // helpId: fieldObject.control.helpId - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // if (!fieldObject.control.helpId) { - // return { result: false, message: '请先选择帮助元数据!' }; - // } - // // 取帮助最新值 - // this.editorParams.helpId = fieldObject.control.helpId; - // return { result: true, message: '' }; - - // } - // }, - // { - // propertyID: 'valueField', - // propertyName: '值字段', - // propertyType: 'modal', - // visible: controlType.includes('help'), - // category: ['help', 'combolist-help'], - // editor: SelectHelpTextFieldComponent, - // editorParams: { - // helpId: fieldObject.control.helpId - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // if (!fieldObject.control.helpId) { - // return { result: false, message: '请先选择帮助元数据!' }; - // } - // // 取帮助最新值 - // this.editorParams.helpId = fieldObject.control.helpId; - // return { result: true, message: '' }; - - // } - // }, - { - propertyID: 'idField', - propertyName: '标识字段', - propertyType: 'string', - visible: ['help', 'combolist-help'].includes(controlType), - category: ['help', 'combolist-help'], - readonly: true - }, { - propertyID: 'displayType', - propertyName: '显示类型', - propertyType: 'string', - visible: controlType.includes('help'), - category: ['help', 'combolist-help'], - readonly: true - }, { - propertyID: 'mapFields', - propertyName: '映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - viewModelId, - sourceMetadataId: fieldObject.control.helpId, - binding: { - type: 'Form', - field: fieldObject.id - } - }, - converter: new MappingConverter(), - visible: controlType.includes('help'), - category: ['help', 'combolist-help'] - }, { - propertyID: 'enableExtendLoadMethod', - propertyName: '是否启用扩展取数', - propertyType: 'boolean', - visible: fieldObject.control.helpId && controlType.includes('help'), - category: ['help', 'combolist-help'], - defaultValue: false - }, - { - propertyID: 'enableFullTree', - propertyName: '构造完整树', - propertyType: 'boolean', - defaultValue: false, - category: ['help', 'combolist-help'], - visible: controlType.includes('help') && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'loadTreeDataType', - propertyName: '数据加载方式', - propertyType: 'select', - defaultValue: 'default', - iterator: - [{ key: 'default', value: '默认' }, { key: 'loadall', value: '全部加载' }, { key: 'layerload', value: '分层加载' }], - visible: controlType.includes('help') && fieldObject.control.displayType && fieldObject.control.displayType.toLowerCase() === 'treelist', - category: ['help', 'combolist-help'] - }, - { - propertyID: 'multiSelect', - propertyName: '是否多选', - propertyType: 'boolean', - defaultValue: false, - category: ['help', 'combolist-help', 'dropdown'], - visible: ['help', 'combolist-help', 'dropdown'].includes(controlType) - }, - { - propertyID: 'enableCascade', - propertyName: '启用级联选择', - propertyType: 'boolean', - defaultValue: false, - category: ['help', 'combolist-help'], - visible: controlType === 'help' && fieldObject.control.multiSelect - && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || - fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'cascadeStatus', - propertyName: '级联状态', - propertyType: 'select', - description: '级联状态选择', - defaultValue: 'enable', - iterator: [ - { key: 'enable', value: '启用级联' }, - { key: 'up', value: '仅向上级联' }, - { key: 'down', value: '仅向下级联' }, - { key: 'disable', value: '禁用级联' }], - visible: controlType === 'help' && fieldObject.control.multiSelect - && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || - fieldObject.control.displayType.toLowerCase() === 'navtreelist') && - fieldObject.control.enableCascade, - }, - { - propertyID: 'expandLevel', - propertyName: '默认展开层级', - propertyType: 'number', - decimals: 0, - min: -1, - defaultValue: -1, - category: ['help', 'combolist-help'], - visible: controlType.includes('help') && fieldObject.control.displayType && - (fieldObject.control.displayType.toLowerCase() === 'treelist' || fieldObject.control.displayType.toLowerCase() === 'navtreelist') - }, - { - propertyID: 'editable', - propertyName: '是否允许输入', - propertyType: 'boolean', - category: ['help', 'input-group'], - visible: controlType === 'input-group' || controlType === 'help' - }, - { - propertyID: 'nosearch', - propertyName: '任意输入', - propertyType: 'boolean', - defaultValue: false, - category: ['help'], - visible: controlType === 'help' - }, - // { - // propertyID: 'displayFields', - // propertyName: '展示字段', - // propertyType: 'modal', - // category: ['help'], - // visible: controlType === 'help', - // editor: SelectHelpDisplayFieldsComponent, - // editorParams: { - // helpId: fieldObject.control.helpId - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // if (!fieldObject.control.helpId) { - // return { result: false, message: '请先选择帮助元数据!' }; - // } - // // 取帮助最新值 - // this.editorParams.helpId = fieldObject.control.helpId; - // return { result: true, message: '' }; - - // } - // }, - { - propertyID: 'clearFields', - propertyName: '值变化时清空字段', - propertyType: 'modal', - category: ['help'], - visible: controlType === 'help', - editor: SelectHelpClearFieldsEditorComponent, - editorParams: { - fieldConfigs, - currentId: fieldObject.id - }, - showClearButton: true, - beforeOpenModal(): BeforeOpenModalResult { - // 取配置字段的最新值 - this.editorParams.fieldConfigs = self.fieldConfigs; - return { result: true, message: '' }; - - } - }, - { - propertyID: 'pageList', - propertyName: '分页条数', - propertyType: 'string', - description: '请输入以英文逗号分开的数字,最大值为1000。例如:10,20,30,50,100', - category: ['help'], - visible: controlType === 'help' && fieldObject.control.displayType && fieldObject.control.displayType.toLowerCase() !== 'treelist', - notAllowedChars: [/[^\d,]/g] - }, - { - propertyID: 'pageSize', - propertyName: '默认分页条数', - propertyType: 'select', - iterator: this.getPageSizeIterator(fieldObject.control.pageList), - category: ['help'], - visible: controlType === 'help' && fieldObject.control.displayType && fieldObject.control.displayType.toLowerCase() !== 'treelist' - }, - { - propertyID: 'valueType', - propertyName: '值类型', - propertyType: 'select', - visible: controlType === 'dropdown', - category: ['dropdown'], - iterator: [{ key: '1', value: '字符串' }, { key: '0', value: '整型' }, { key: '2', value: '布尔' }] - }, - { - propertyID: 'enumValues', - propertyName: '枚举数组', - propertyType: 'modal', - visible: controlType === 'dropdown', - category: ['dropdown'], - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...this.enumDataConfig.editorConfig, - }, - { - propertyID: 'startFieldCode', - propertyName: '开始日期字段', - propertyType: 'select', - category: ['date'], - visible: ['date'].includes(controlType) && [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name), - iterator: dateFieldList - }, - { - propertyID: 'endFieldCode', - propertyName: '结束日期字段', - propertyType: 'select', - category: ['date'], - visible: ['date'].includes(controlType) && [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime].includes(schemaField.type.name), - iterator: dateFieldList - }, - ...this.getFormatProps(fieldObject, schemaField), - { - propertyID: 'weekSelect', - propertyName: '是否启用周选择', - propertyType: 'boolean', - category: ['date'], - visible: controlType === 'date' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - decimals: 0, - min: 0, - visible: controlType === 'number' || controlType === 'single-number', - category: ['number', 'single-number'] - }, - { - propertyID: 'dialogTitle', - propertyName: '帮助标题', - propertyType: 'string', - visible: controlType === 'help' - }, - { - propertyID: 'panelWidth', - propertyName: '面板宽度', - propertyType: 'number', - decimals: 0, - min: 0, - visible: controlType === 'combolist-help' || controlType === 'help', - category: ['combolist-help', 'help'] - }, - { - propertyID: 'panelHeight', - propertyName: '面板高度', - propertyType: 'number', - decimals: 0, - min: 0, - visible: controlType === 'dropdown' || controlType === 'combolist-help' || controlType === 'help', - category: ['dropdown', 'combolist-help', 'help'] - }, - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - iterator: [ - { key: 'left', value: '靠左' }, - { key: 'center', value: '居中' }, - { key: 'right', value: '靠右' } - ], - visible: controlType === 'number' || controlType === 'single-number', - category: ['number', 'single-number'] - }, - maxValuePropConfig, - minValuePropConfig, - { - propertyID: 'horizontal', - propertyName: '是否水平布局', - propertyType: 'boolean', - category: ['radio'], - visible: controlType === 'radio' - }, - { - propertyID: 'showLabel', - propertyName: '是否显示标签', - propertyType: 'boolean', - defaultValue: false, - category: ['radio'], - visible: controlType === 'radio' - }, - { - propertyID: 'groupText', - propertyName: '按钮显示文本', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - category: ['input-group'], - visible: controlType === 'input-group' - }, - // { - // propertyID: 'textAlign', - // propertyName: '数据水平对齐方式', - // propertyType: 'select', - // iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - // }, - { - propertyID: 'usageMode', - propertyName: '使用模式', - propertyType: 'select', - iterator: [ - { key: 'text', value: '文本' }, - { key: 'open-modal', value: '弹出表单' }, - { key: 'open-remote-modal', value: '弹出远端表单' } - ], - refreshPanelAfterChanged: true, - category: ['input-group'], - visible: controlType === 'input-group' - }, - { - propertyID: 'isDynamicDate', - propertyName: '是否支持动态日期', - propertyType: 'boolean', - defaultValue: false, - category: ['single-date'], - visible: controlType === 'single-date' - } - ] - }]; - } - - private getDateFieldInSchema(schemaField: FormSchemaEntityField, viewModelId: string) { - const dateFieldTypes = [FormSchemaEntityFieldTypeName.Date, FormSchemaEntityFieldTypeName.DateTime]; - if (!dateFieldTypes.includes(schemaField.type.name)) { - return []; - } - const schemaFields: FormSchemaEntityField[] = this.schemaService.getFieldsByViewModelId(viewModelId); - // const dgVM = this.dgVMService.getDgViewModel(viewModelId); - const dateFields = schemaFields.filter(field => dateFieldTypes.includes(field.type.name)); - - const iterators = []; - dateFields.forEach(element => { - iterators.push({ - key: element.code, - value: element.name - }); - }); - return iterators; - } - /** - * 帮助控件快捷选择属性 - */ - private getHelpQuickSelectPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - // const self = this; - const control = propertyData.control; - // 适配旧表单没有quickSelect节点 - if (control.controltype === 'help' && !control.quickSelect) { - propertyData.control.quickSelect = { - enable: false, - showItemsCount: 10, - formatter: null, - showMore: true - }; - } - - let showQuickSelect = false; - // 规则:单列表或左树右列表类型的弹出帮助 - if (control.controltype === 'help' && ['list', 'navtreelist', 'navlist'].includes(control.displayType.toLowerCase())) { - // 若启用多选,只支持标签类型的帮助 - if (control.multiSelect) { - showQuickSelect = control.viewType === 'tag'; - } else { - // 不启用多选 - showQuickSelect = true; - } - } - - return { - categoryId: 'helpQuickSelect', - categoryName: '快捷配置', - hide: !showQuickSelect, - propertyData: control.quickSelect, - enableCascade: true, - parentPropertyID: 'control.quickSelect', - properties: [ - { - propertyID: 'enable', - propertyName: '启用快捷选择', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'showItemsCount', - propertyName: '展示数据条数', - propertyType: 'number', - visible: control.quickSelect && control.quickSelect.enable, - min: 5, - max: 10, - decimals: 0 - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'modal', - visible: control.quickSelect && control.quickSelect.enable, - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: "(data) => {\r\n return `${data['name']} - ${data['birthday']}`\r\n}\r\n\r\n注: data 帮助中的每行数据" - } - }, - { - propertyID: 'showMore', - propertyName: '显示更多按钮', - propertyType: 'boolean', - description: '是否显示更多按钮', - visible: control.quickSelect && control.quickSelect.enable - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enable': { - this.properties.map(p => { - if (p.propertyID !== 'enable') { - p.visible = changeObject.propertyValue; - } - }); - break; - } - } - } - }; - } - private getOpenModalPropConfigs(propertyData: any, viewModelId: string): ElementPropertyConfig[] { - const self = this; - const control = propertyData.control; - if (!control.modalConfig) { - propertyData.control.modalConfig = { - modalCmp: null, - mapFields: null, - showHeader: true, - title: '', - showCloseButton: true, - showMaxButton: true, - width: 800, - height: 600, - showFooterButtons: true, - footerButtons: [] - }; - } - return [{ - categoryId: 'openModal', - categoryName: '表单配置', - hide: control.usageMode !== 'open-modal', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'modalCmp', - propertyName: '弹出表单', - propertyType: 'modal', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { containerType: DgControl.ModalContainer.type, containerId: propertyData.id, relativePath: this.formBasicService.formMetaBasicInfo.relativePath, name: this.formBasicService.formMetaBasicInfo.name }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - self.domService.deleteExternalComponent(oldValue); // 清空外部组件的声明节点 - } - }, - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: SelectMappingComponent, - editorParams: { - sourceMetadataId: control.modalConfig.formId, - viewModelId, - binding: { - type: 'Form' - }, - sourceMetadataType: 'form', - sourceMetadataName: '弹出表单' - }, - converter: new MappingConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!control.modalConfig || !control.modalConfig.formId) { - return { result: false, message: '请先选择弹出表单!' }; - } - // 取弹出表单和绑定的最新值 - this.editorParams.sourceMetadataId = control.modalConfig.formId; - return { result: true, message: '' }; - } - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'modalCmp': { - propData.component = parameters ? parameters.component : ''; - propData.formId = parameters ? parameters.uri : ''; - propData.mapFields = ''; - break; - } - } - Object.assign(propertyData.control.modalConfig, propData); - } - }, - { - categoryId: 'openRemoteModal', - categoryName: '表单配置', - hide: control.usageMode !== 'open-remote-modal', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - editor: InputgroupFormMappingEditorComponent, - converter: new MappingConverter(), - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - Object.assign(propertyData.control.modalConfig, propData); - } - }, - { - categoryId: 'modalConfig', - categoryName: '弹出窗口配置', - hide: control.controltype !== 'input-group' || control.usageMode === 'text', - propertyData: control.modalConfig, - enableCascade: true, - parentPropertyID: 'control.modalConfig', - properties: [ - { - propertyID: 'showHeader', - propertyName: '显示标题栏', - propertyType: 'boolean' - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showCloseButton', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showMaxButton', - propertyName: '显示最大化按钮', - propertyType: 'boolean', - visible: control.modalConfig && control.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number', - min: 0 - }, - { - propertyID: 'height', - propertyName: '高度', - propertyType: 'number', - min: 0 - } - // { - // propertyID: 'showFooterButtons', - // propertyName: '显示底部按钮区', - // propertyType: 'boolean' - // }, - // { - // propertyID: 'footerButtons', - // propertyName: '按钮组', - // propertyType: 'modal', - // editor: ToolbarEditorComponent, - // editorParams: { viewModelId, disableChildItem: true, defaultBtnClass: 'btn' }, - // converter: new ToolBarConverter(), - // visible: control.modalConfig && control.modalConfig.showFooterButtons - // } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.category === 'header') { - p.visible = changeObject.propertyValue; - } - }); - - break; - } - case 'showFooterButtons': { - const footerButtons = this.properties.find(p => p.propertyID === 'footerButtons'); - if (footerButtons) { - footerButtons.visible = changeObject.propertyValue; - } - } - } - - Object.assign(propertyData.control.modalConfig, propData); - } - }]; - } - - private getPageSizeIterator(pageList: string) { - if (!pageList) { - // pageList = '10,20,30,50,100'; - return []; - } - const iterator = []; - pageList.split(',').forEach(pageSize => { - iterator.push({ - key: Number.parseInt(pageSize, 10), - value: pageSize - }); - }); - return iterator; - } - - /** - * 控制输入的分页最大值为1000 - */ - private checkPageList(pageList: string) { - if (!pageList) { - return ''; - } - let iterator = pageList.split(','); - iterator = iterator.filter(i => Number.parseInt(i, 10) <= 1000); - return iterator.join(','); - } - - private getMaxDatePropConfig(fieldObject: any, viewModelId: string) { - const controlType = fieldObject.control.controltype; - let visible = false; - switch (fieldObject.control.controltype) { - case 'number': case 'single-number': { - visible = (controlType === 'number' || controlType === 'single-number') && !fieldObject.control.isBigNumber; - break; - } - // case 'single-year': { - // visible = true; - // break; - // } - } - return { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'number', - visible, - category: ['number', 'single-number'], - min: fieldObject.control.minValue ? fieldObject.control.minValue : undefined, - decimals: fieldObject.control.precision, - // editor: BindingCustomEditorComponent, - // editorParams: { - // modalTitle: '最大值编辑器', - // viewModelId, - // allowedBindingType: 'LocaleVariable,RemoteVariable' - // }, - // converter: new BindingCustomEditorConverter() - }; - - } - - private getMinDatePropConfig(fieldObject: any, viewModelId: string) { - const controlType = fieldObject.control.controltype; - let visible = false; - switch (fieldObject.control.controltype) { - case 'number': case 'single-number': { - visible = (controlType === 'number' || controlType === 'single-number') && !fieldObject.control.isBigNumber; - break; - } - } - return { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'number', - visible, - category: ['number', 'single-number'], - max: fieldObject.control.maxValue ? fieldObject.control.maxValue : undefined, - decimals: fieldObject.control.precision - }; - - } - - private getFormatProps(propertyData: any, schemaField: FormSchemaEntityField): PropertyEntity[] { - - const controlData = propertyData.control; - const controlType = controlData.controltype; - - const isStringField = schemaField.type.name === FormSchemaEntityFieldTypeName.String; - const supportFormatControlType = ['date', 'single-date', 'date-time', 'single-date-time', 'single-year', 'single-month', 'month']; - - const returnFormat = isStringField ? controlData.returnFormat : null; - return [ - { - propertyID: 'returnFormat', - propertyName: '查询格式', - propertyType: 'select', - iterator: this.getDateReturnFormatIteratror(controlType, controlData.enableCustomFormat), - visible: isStringField && supportFormatControlType.includes(controlType), - description: '数据在服务器端sql查询时所用的格式', - }, - { - propertyID: 'enableCustomFormat', - propertyName: '启用自定义显示格式', - propertyType: 'boolean', - visible: ['date-time', 'single-date-time'].includes(controlType), - description: '若不启用自定义格式,将自动为显示格式追加时分秒', - readonly: controlData.returnFormat && !controlData.returnFormat.includes('HH') - }, - { - propertyID: 'format', - propertyName: '显示格式', - propertyType: 'select', - iterator: this.getDateFormatIteratror(controlType, controlData.enableCustomFormat, returnFormat), - visible: supportFormatControlType.includes(controlType), - description: '显示在界面上的格式', - } - ]; - - - - - } - - /** - * 日期存储格式化枚举项 - */ - private getDateReturnFormatIteratror(controlType: string, enableCustomFormat = false): KeyMap[] { - const returnFormats = []; - const { timeFormats, yMdFormats, yMFormats, mdFormats, yFormats } = DATE_FORMATS; - - switch (controlType) { - // 日期区间、单日期 - case 'date': case 'single-date': { - returnFormats.push(...yMdFormats, ...yMFormats, ...yFormats, ...mdFormats); - break; - } - // 日期时间区间、单日期时间 - case 'date-time': case 'single-date-time': { - if (enableCustomFormat) { - returnFormats.push(...timeFormats, ...yMdFormats, ...yMFormats, ...yFormats, ...mdFormats); - } else { - returnFormats.push(...timeFormats); - } - break; - } - // 单年度 - case 'single-year': { - returnFormats.push(...yFormats); - break; - } - // 单月份、月份区间 - case 'single-month': case 'month': { - returnFormats.push(...yMFormats); - break; - } - } - - return returnFormats; - } - - /** - * 日期显示格式化枚举项 - */ - private getDateFormatIteratror(controlType: string, enableCustomFormat = false, returnFormat?: string): KeyMap[] { - let formats = []; - - const { timeFormats, yMdFormats, yMFormats, mdFormats, yFormats } = DATE_FORMATS; - - switch (controlType) { - // 日期区间、单日期 - case 'date': case 'single-date': { - formats.push(...yMdFormats, ...yMFormats, ...yFormats, ...mdFormats); - break; - } - // 日期时间区间、单日期时间 - case 'date-time': case 'single-date-time': { - if (enableCustomFormat) { - formats.push(...timeFormats, ...yMdFormats, ...yMFormats, ...yFormats, ...mdFormats); - } else { - formats.push(...yMdFormats); - } - break; - } - // 单年度 - case 'single-year': { - formats.push(...yFormats); - break; - } - // 单月份、月份区间 - case 'single-month': case 'month': { - formats.push(...yMFormats); - break; - } - } - formats = this.filterFormatNotInReturnFormat(formats, returnFormat); - return formats; - } - - - - - - /** - * 根据选择的存储格式过滤显示格式。 - * 例如存储格式为yyyy年MM月,那么显示格式就不能配置yyyy年MM月dd日 - * @param formatIterator 显示格式枚举项 - * @param selectedReturnFormat 存储格式 - */ - filterFormatNotInReturnFormat(formatIterator: KeyMap[], selectedReturnFormat: string) { - if (!selectedReturnFormat) { - return formatIterator; - } - const hasReturnYFormat = selectedReturnFormat.includes('yyyy'); - const hasReturnMFormat = selectedReturnFormat.includes('MM'); - const hasReturndFormat = selectedReturnFormat.includes('dd'); - const hasReturnHFormat = selectedReturnFormat.includes('HH'); - const hasReturnmFormat = selectedReturnFormat.includes('mm'); - const hasReturnsFormat = selectedReturnFormat.includes('ss'); - - - if (!hasReturnYFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('yyyy')); - } - if (!hasReturnMFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('MM')); - } - if (!hasReturndFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('dd')); - } - if (!hasReturnHFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('HH')); - } - if (!hasReturnmFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('mm')); - } - if (!hasReturnsFormat) { - formatIterator = formatIterator.filter(format => !format.key.includes('ss')); - } - - return formatIterator; - } - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - private getEnumDataConfig(propertyData: any, schemaField: any): { editorConfig: any, dynamicMappingKeys: boolean } { - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: schemaField.type.name === 'Boolean' ? EditorTypes.CHECKBOX : EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - } - }; - - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (schemaField.type.name === 'Enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - - editorConfig.editorParams.dynamicMappingKeys = true; - editorConfig.editorParams.valueField = propertyData.idField; - editorConfig.editorParams.nameField = propertyData.textField; - - return { editorConfig, dynamicMappingKeys: true }; - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.html b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.html deleted file mode 100644 index 1aadb3549907d5d361fa36b30004eceec4477957..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.html +++ /dev/null @@ -1,12 +0,0 @@ -
    - - - {{ data.name }} [ {{ data.labelCode }}] - - -
    - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.ts deleted file mode 100644 index 3bf26eeb633625eb4a6adbcd14b9e1f45172e1cc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef } from '@angular/core'; - -@Component({ - selector: 'app-select-help-clear-fields', - templateUrl: './select-help-clear-fields.component.html' -}) -export class SelectHelpClearFieldsEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { - fieldConfigs: [], - // 排除字段本身 - currentId: '' - }; - @ViewChild('footer') modalFooter: TemplateRef; - - modalConfig = { - title: '字段选择器', - width: 900, - height: 500, - showButtons: true, - showMaxButton: false - }; - - // 左侧列表数据 - fieldConfigData = []; - - // 选中的字段label列表 - selectedFieldIds = []; - - // 选中的字段列表 - selectedFields = []; - - constructor() { } - - ngOnInit(): void { - if (!this.editorParams) { - return; - } - this.fieldConfigData = this.editorParams.fieldConfigs.filter(f => f.id !== this.editorParams.currentId); - - if (this.value) { - this.selectedFields = this.selectedFieldIds = this.value.split(','); - } - } - - changeSelectField(e) { - this.selectedFields = e.map(f => f.labelCode); - } - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - /** - * 确定 - */ - clickConfirm() { - this.submitModal.emit({ value: this.selectedFields.join(',') }); - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.html deleted file mode 100644 index a53947e582f295b3a7c9674b7a0893221f2edba8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.html +++ /dev/null @@ -1,12 +0,0 @@ -
    - - - {{ data.name }} [ {{ data.labelCode }}] - - -
    - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.ts deleted file mode 100644 index dbd6df7c8ebf388bc14acd162ebc019c0f57ddfa..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Component, OnInit, Output, Input, EventEmitter, ViewChild, TemplateRef } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; - -@Component({ - selector: 'app-query-scheme-preset-fields-editor', - templateUrl: './query-scheme-preset-fields-editor.component.html', - styleUrls: ['./query-scheme-preset-fields-editor.component.css'] -}) -export class QuerySchemePresetFieldsEditorComponent implements OnInit { - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - @Input() value; - @Input() editorParams = { fieldConfigs: [] }; - @ViewChild('footer') modalFooter: TemplateRef; - - modalConfig = { - title: '筛选方案预置字段编辑器', - width: 900, - height: 500, - showButtons: true, - showMaxButton: false - }; - - // 左侧列表数据 - fieldConfigData = []; - - // 选中的字段ID列表 - selectedFieldIds = []; - - // 选中的字段列表 - selectedFields = []; - - constructor( - private notifyService: NotifyService, - ) { } - - ngOnInit(): void { - if (!this.editorParams) { - return; - } - this.fieldConfigData = this.editorParams.fieldConfigs; - - if (this.value && this.value.length > 0) { - this.selectedFieldIds = this.value.map(v => v.id); - this.selectedFields = this.value; - } - } - - changeSelectField(e) { - this.selectedFields = e; - } - /** - * 取消 - */ - clickCancel() { - this.closeModal.emit(); - } - /** - * 确定 - */ - clickConfirm() { - - if (this.selectedFields.length === 0) { - this.notifyService.warning('请选择预置字段'); - return; - } - this.submitModal.emit({ value: this.selectedFields }); - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/property-config.ts deleted file mode 100644 index d910ca879c378522f716b681bf587b77435d6ee5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/property/property-config.ts +++ /dev/null @@ -1,244 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; -import { FilterCommonProp } from '../../common/property/filter-common-property-config'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { QuerySchemeFieldsEditorComponent } from './editor/query-scheme-fields-editor/query-scheme-fields-editor.component'; -import { QuerySchemeFieldConverter } from './editor/query-scheme-fields-editor/query-scheme-field-converter'; -import { QuerySchemePresetFieldsEditorComponent } from './editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class QuerySchemeProp extends FilterCommonProp { - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 常规属性 - const usualPropConfig = this.getBasicPropConfig(propertyData); - this.propertyConfig.push(usualPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - private getBasicPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - } - ] - }; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'isControlInline', - propertyName: '控件标签独占一列', - propertyType: 'boolean', - description: '控件标签是否独占一列', - defaultValue: true - }, - { - propertyID: 'showCompleteLabel', - propertyName: '控件标签完全显示', - propertyType: 'unity', - description: '控件标签是否完全显示', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - }, - }, - }, - { - propertyID: 'expanded', - propertyName: '展开', - propertyType: 'unity', - description: '是否展开', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - }, - }, - ] - }; - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const inputConfig = { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - { - propertyID: 'presetQuerySolutionName', - propertyName: '系统预置查询方案名称', - propertyType: 'string', - description: '系统预置查询方案名称设置' - }, - { - propertyID: 'fieldConfigs', - propertyName: '筛选方案字段', - propertyType: 'modal', - description: '筛选方案字段设置', - editor: QuerySchemeFieldsEditorComponent, - editorParams: { viewModelId, presetFieldConfigs: propertyData.presetFieldConfigs }, - converter: new QuerySchemeFieldConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取预置方案字段的最新值 - this.editorParams.presetFieldConfigs = propertyData.presetFieldConfigs || []; - return { result: true, message: '' }; - } - }, - { - propertyID: 'presetFieldConfigs', - propertyName: '系统预置字段', - propertyType: 'modal', - description: '系统预置字段设置', - editor: QuerySchemePresetFieldsEditorComponent, - editorParams: { fieldConfigs: propertyData.fieldConfigs }, - converter: new QuerySchemeFieldConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取预置方案字段的最新值 - this.editorParams.fieldConfigs = propertyData.fieldConfigs || []; - return { result: true, message: '' }; - } - }, - { - propertyID: 'binding', - propertyName: '默认值绑定', - propertyType: 'unity', - description: '默认值绑定设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - } - }, - { - propertyID: 'enableInitQuery', - propertyName: '自动查询', - propertyType: 'boolean', - description: '是否自动查询', - defaultValue: false - }, - { - propertyID: 'enableHistory', - propertyName: '支持历史记录', - propertyType: 'boolean', - description: '是否支持历史记录', - defaultValue: false - }, - { - propertyID: 'resetFieldConfigs', - propertyName: '动态字段', - propertyType: 'unity', - description: '动态字段设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - } - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - if (changeObject.propertyID === 'fieldConfigs') { - propertyData.presetFieldConfigs = parameters || []; - - changeObject.relateChangeProps = [{ - propertyID: 'presetFieldConfigs', - propertyValue: parameters - }]; - } - } - }; - - return inputConfig; - } - - - private getEventPropertyConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'onQuery', - name: '查询事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/schema/schema.ts deleted file mode 100644 index e8f8d554722c9492f36e5a4cf0d3688d9da4a94c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/schema/schema.ts +++ /dev/null @@ -1,18 +0,0 @@ -export const QuerySchemeSchema = { - id: 'queryScheme1', - type: 'QueryScheme', - fieldConfigs: [], - presetFieldConfigs: [], - formId: 'formId', - isDisabled: false, - presetQuerySolutionName: '默认筛选方案', - isControlInline: true, - visible: true, - onQuery: '', - binding: null, - enableInitQuery: false, - showCompleteLabel: false, - expanded: true, - enableHistory: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/form.ts deleted file mode 100644 index b368f87ac2ffe8d386bf8542f92329e332d881fe..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/form.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default (ctx: any) => { - - const controlsInlineCls = ctx.component.isControlInline ? ' farris-form-controls-inline' : ''; - const completeCls = ctx.component.showCompleteLabel ? 'f-form-label-xl condition-with-complete' : ''; - return ` - -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - -
    -
    -
    - -
    - ${ctx.filterControlTpls} -
    -
    - - `; - -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/filter/queryScheme/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/component/fd-avatar.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/component/fd-avatar.ts deleted file mode 100644 index e181b694a79271286dbe02f8bb9a37a19b92aa03..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/component/fd-avatar.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { AvatarSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { AvatarProp } from '../property/property-config'; - -export default class FdAvatarComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return AvatarSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('Avatar', { - component: this.component - }), false); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: AvatarProp = new AvatarProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/export.ts deleted file mode 100644 index 320d59dcab4fb14579ae71b2adf5485376d31e74..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdAvatarComponent from './component/fd-avatar'; -import { AvatarSchema } from './schema/schema'; - -import FdAvatarTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const Avatar: ComponentExportEntity = { - type: 'Avatar', - component: FdAvatarComponent, - template: FdAvatarTemplates, - metadata: cloneDeep(AvatarSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/property/property-config.ts deleted file mode 100644 index 7895ae9652bc057ae0fc01266441376b6fe954e1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/property/property-config.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class AvatarProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getAvatarEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - - return this.propertyConfig; - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const self = this; - let appearanceProperties = []; - if (showPosition === 'card') { - let appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId); - const supportedProps = 'responseLayout,appearance,size'; - appearanceCommonProps = appearanceCommonProps.filter(p => supportedProps.includes(p.propertyID)); - - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'cover', - propertyName: '头像图片默认路径', - propertyType: 'string', - description: '头像图片默认路径设置' - }, - { - propertyID: 'maxSize', - propertyName: '允许图片大小(M)', - propertyType: 'number', - description: '图片最大size 单位M', - min: 0, - }, - { - propertyID: 'imgType', - propertyName: '允许图片格式', - propertyType: 'multiSelect', - description: '图片限制的类型', - iterator: [ - { key: 'png', value: 'png' }, - { key: 'jpg', value: 'jpg' }, - { key: 'jpeg', value: 'jpeg' }, - { key: 'webp', value: 'webp' }, - { key: 'svg', value: 'svg' }, - { key: 'gif', value: 'gif' }, - { key: 'bmp', value: 'bmp' } - ], - multiSelectDataType: 'array' - }, - { - propertyID: 'imgShape', - propertyName: '头像形状', - propertyType: 'select', - description: '头像形状选择', - iterator: [ - { key: 'circle', value: '圆形' }, - { key: 'square', value: '方形' } - ] - }, - { - propertyID: 'imgTitle', - propertyName: '头像标题', - propertyType: 'string', - description: '头像悬停时的标题' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getAvatarEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'imgChange', - name: '图片变化后事件' - }, - ]; - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getAvatarEventPropConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/schema/schema.ts deleted file mode 100644 index 6afa702622d76703dec6a644191f3f31ad456e36..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/schema/schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const AvatarSchema ={ - id: 'avatar', - type: 'Avatar', - title: '图像', - size: null, - disable: false, - appearance: null, - border: null, - cover: '', - maxSize: null, - imgType: null, - imgShape: 'circle', - readonly: false, - imgTitle: null, - imgChange: null, - visible: true, - linkedLabelEnabled: false, - linkedLabelClick: null -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/form.ts deleted file mode 100644 index 33ebc9b0350065f46caacf5a7fae4c56bf4ac88e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/form.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; - -export default (ctx: any) => { - let resultStr = ''; - if (ctx.component.showInTable) { - resultStr = `
    `; - } else { - resultStr = `
    `; - } - resultStr += `
    - -
    -
    `; - return resultStr; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/avatar/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/component/fd-check-group.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/component/fd-check-group.ts deleted file mode 100644 index 251c7939c8ef71bf004a0e35c5528366fcb074fe..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/component/fd-check-group.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { CheckGroupSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CheckGroupProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeCheckGroupProp } from '../property/nocode-property-config'; -import { DesignerEnvType } from '@farris/designer-services'; - -export default class FdCheckGroupComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return CheckGroupSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('CheckGroup', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeCheckGroupProp = new NoCodeCheckGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: CheckGroupProp = new CheckGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['isHorizontal', 'items']); - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/export.ts deleted file mode 100644 index da18382d3df5d6d9e30f64db89614505262a640d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdCheckGroupComponent from './component/fd-check-group'; -import { CheckGroupSchema } from './schema/schema'; - -import FdCheckGroupTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const CheckGroup: ComponentExportEntity = { - type: 'CheckGroup', - component: FdCheckGroupComponent, - template: FdCheckGroupTemplates, - metadata: cloneDeep(CheckGroupSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/nocode-property-config.ts deleted file mode 100644 index 75bd899d4eb45de8af8680487b0d86152afbe533..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/nocode-property-config.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeCheckGroupProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - - } - - - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - appearanceProperties.push( - { - propertyID: 'isHorizontal', - propertyName: '水平布局', - propertyType: 'boolean', - description: '是否水平布局' - }, - { - propertyID: 'splitter', - propertyName: '分隔符', - propertyType: 'string', - description: '分隔符设置' - } - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'items', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } } - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '选项编辑器', - canEmpty: false, - dynamicMappingKeys: true, - valueField: propertyData.valueField, - nameField: propertyData.textField - }, - converter: new ItemCollectionConverter(), - visible: propertyData.dataSourceType === 'static' - } - ); - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/property-config.ts deleted file mode 100644 index 27aa3aa5e33ca847cc2a97dd9d6943f0c327a5b1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/property/property-config.ts +++ /dev/null @@ -1,277 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class CheckGroupProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getCheckGroupEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - appearanceProperties.push( - { - propertyID: 'isHorizontal', - propertyName: '水平布局', - propertyType: 'boolean', - description: '是否水平布局' - }, - { - propertyID: 'splitter', - propertyName: '分隔符', - propertyType: 'string', - description: '分隔符设置' - } - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'dataSourceType', - propertyName: '数据源类型', - propertyType: 'select', - description: '数据源类型设置', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - defaultValue: 'static' - }, - { - propertyID: 'items', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } } - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '选项编辑器', - canEmpty: false, - dynamicMappingKeys: true, - valueField: propertyData.valueField, - nameField: propertyData.textField - }, - converter: new ItemCollectionConverter(), - visible: propertyData.dataSourceType === 'static' - }, - { - propertyID: 'bindDataSource', - propertyName: '绑定数据源', - propertyType: 'unity', - description: '绑定数据源设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - } - }, - visible: propertyData.dataSourceType === 'dynamic', - }, - { - propertyID: 'valueField', - propertyName: '枚举值字段', - propertyType: 'string', - description: '枚举值字段设置', - defaultValue: 'value', - readonly: propertyData.dataSourceType === 'static', - }, - { - propertyID: 'textField', - propertyName: '枚举名称字段', - propertyType: 'string', - description: '举名称字段设置', - defaultValue: 'name', - readonly: propertyData.dataSourceType === 'static', - } - ); - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject.propertyID) { - case 'dataSourceType': { - const items = this.properties.find(p => p.propertyID === 'items'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - const valueField = this.properties.find(p => p.propertyID === 'valueField'); - const textField = this.properties.find(p => p.propertyID === 'textField'); - - if (items) { - items.visible = changeObject.propertyValue === 'static'; - } - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue !== 'static'; - } - if (valueField) { - valueField.readonly = changeObject.propertyValue === 'static'; - } - if (textField) { - textField.readonly = changeObject.propertyValue === 'static'; - } - break; - } - case 'items': { - if (parameters) { - propertyData.valueField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - changeObject.relateChangeProps = [{ - propertyID: 'valueField', - propertyValue: propertyData.valueField - }, - { - propertyID: 'textField', - propertyValue: propertyData.textField - }]; - - break; - } - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 事件属性 - */ - private getCheckGroupEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'setCheckboxData', - name: '设置复选框数据事件' - }, - { - label: 'changeValue', - name: '切换复选框事件' - } - ]; - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventConfig = this.getCheckGroupEventPropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/schema/schema.ts deleted file mode 100644 index 95d36b100ce13b2add50dd7eba3eafd7a2d6a509..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/schema/schema.ts +++ /dev/null @@ -1,34 +0,0 @@ -export const CheckGroupSchema = { - id: '', - type: 'CheckGroup', - titleSourceType: 'static', - title: '复选框组', - controlSource: 'Farris', - appearance: null, - checked: false, - readonly: false, - require: false, - disable: false, - binding: null, - visible: true, - size: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - setCheckboxData: '', - items: null, - isHorizontal: true, - splitter: null, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - dataSourceType: 'static', - textField: 'name', - valueField: 'value', - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - changeValue: null -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/form.ts deleted file mode 100644 index bb07ab9245d907a5bb4d2d32e7018002379318df..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/form.ts +++ /dev/null @@ -1,19 +0,0 @@ - - -export default (ctx: any) => { - const textField = ctx.component.textField || 'name'; - const valueField = ctx.component.valueField || 'value'; - const checkDatas = ctx.component.items && ctx.component.items.length>0 ? ctx.component.items : [{ value: '1', name: '选项1' }]; - let checkItems = ''; - checkDatas.forEach((item, index) => { - checkItems += `
    `; - checkItems += ` `; - checkItems += `
    `; - }); - let resultStr = `
    ${checkItems}
    `; - return resultStr; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/check-group/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/component/fd-checkbox.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/component/fd-checkbox.ts deleted file mode 100644 index 03ecd39e832bfd5f2e783ee94653084a036b2493..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/component/fd-checkbox.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { CheckBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CheckBoxProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeCheckBoxProp } from '../property/nocode-property-config'; -export default class FdCheckBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - init(): void { - super.init(); - this.adaptOldControl(); - } - - getDefaultSchema(): any { - return CheckBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - return super.render(this.renderTemplate('CheckBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeCheckBoxProp = new NoCodeCheckBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: CheckBoxProp = new CheckBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - private adaptOldControl() { - // 移除冗余的属性 - if (this.component.hasOwnProperty('checked')) { - delete this.component.checked; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/export.ts deleted file mode 100644 index 926bbf7b228e0fc5718849e83505d5c5c29ca035..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdCheckBoxComponent from './component/fd-checkbox'; -import { CheckBoxSchema } from './schema/schema'; - -import FdCheckBoxrTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const CheckBox: ComponentExportEntity = { - type: 'CheckBox', - component: FdCheckBoxComponent, - template: FdCheckBoxrTemplates, - metadata: cloneDeep(CheckBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/nocode-property-config.ts deleted file mode 100644 index e4b55b85ee368380311b327f71803052bab4dec0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/nocode-property-config.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeCheckBoxProp extends NoCodeInputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/property-config.ts deleted file mode 100644 index d857ac6352ec84ddaffb776f993f4fdfb9cc8256..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/property/property-config.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class CheckBoxProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string, isSimpleTable: boolean): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - if (isSimpleTable) { - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/schema/schema.ts deleted file mode 100644 index c02ac0ae6e8b64c6773b51fe1b2af9bae0b13872..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/schema/schema.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const CheckBoxSchema ={ - id: '', - type: 'CheckBox', - titleSourceType: 'static', - title: '复选框', - readonly: false, - require: false, - disable: false, - binding: null, - visible: true, - appearance: null, - size: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/form.ts deleted file mode 100644 index a77bd9c3257136d9ca0eee5edfd03762afb8f6ce..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/form.ts +++ /dev/null @@ -1,11 +0,0 @@ - - -export default (ctx: any) => { - return ` -
    -
    - - -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/checkbox/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/component/fd-city-selector.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/component/fd-city-selector.ts deleted file mode 100644 index 7fc3c86b959abd262a5ba19684b3aca9b6db1446..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/component/fd-city-selector.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { DesignerEnvType } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import FarrisDesignField from '../../common/field/component/field'; -import { NoCodeCitySelectorProp } from '../property/nocode-property-config'; -import { CitySelectorProp } from '../property/property-config'; -import { CitySelectorSchemas } from '../schema/schema'; - -export default class FdInputGroupComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return CitySelectorSchemas; - } - - getStyles(): string { - return 'display: inline-block;'; - } - - render(): any { - - return super.render(this.renderTemplate('CitySelector', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeCitySelectorProp = new NoCodeCitySelectorProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: CitySelectorProp = new CitySelectorProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject, ['groupText']); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/export.ts deleted file mode 100644 index 8f553c006d9b5353bc89555bcaeb7144abea0723..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdInputGroupComponent from './component/fd-city-selector'; -import { CitySelectorSchemas } from './schema/schema'; - -import { ComponentExportEntity } from '@farris/designer-element'; -import { cloneDeep } from 'lodash-es'; -import FdTemplates from './templates'; - -export const CitySelector: ComponentExportEntity = { - type: 'CitySelector', - component: FdInputGroupComponent, - template: FdTemplates, - metadata: cloneDeep(CitySelectorSchemas) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/nocode-property-config.ts deleted file mode 100644 index 0b21ca0310995cec90f3c3cf6621f9728a176e38..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/nocode-property-config.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeCitySelectorProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - return propertyConfig; - } - - - getOpenModalPropConfigs() { - - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig( - propertyData: any, viewModelId: string, showPosition = 'card'): - ElementPropertyConfig { - - const self = this; - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'select', - description: '是否允许输入', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - visible: false // 控件不支持 - }, - { - propertyID: 'enableClear', - propertyName: '启用清除按钮', - propertyType: 'select', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - isible: false // 控件不支持 - } - ); - - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject.propertyID) { - - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - - } - - /** - * 列编辑器属性 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/property-config.ts deleted file mode 100644 index 0d8c14a2e3c2334ed221ff69e12ed90a466b9a1c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/property/property-config.ts +++ /dev/null @@ -1,252 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class CitySelectorProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - } - - - getOpenModalPropConfigs() { - - } - - /** - * 外观属性 - */ - private getAppearancePropConfig( - propertyData: any, viewModelId: string, showPosition = 'card'): - ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig( - propertyData: any, viewModelId: string, showPosition = 'card'): - ElementPropertyConfig { - - const self = this; - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'boolean', - description: '是否允许输入', - visible: false // 控件不支持 - }, - { - propertyID: 'enableClear', - propertyName: '启用清除按钮', - propertyType: 'boolean', - isible: false // 控件不支持 - } - ); - - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject.propertyID) { - - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - - } - - /** - * 事件属性 - */ - private getEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - { - label: 'onBlur', - name: '失去焦点事件' - }, - { - label: 'onClear', - name: '清除事件' - } - ]; - - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - - } - - /** - * 动态事件 - * @param propertyData 属性值 - * @param eventList 已有事件 - */ - switchEvents(propertyData, eventList) { - eventList = super.switchEvents(propertyData, eventList); - - if (propertyData.enableClear) { - const onClear = eventList.find(eventListItem => eventListItem.label === 'onClear'); - if (!onClear) { - eventList.push({ - label: 'onClear', - name: '清除事件' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'onClear'); - } - - return eventList; - } - - /** - * 列编辑器属性 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(apperanceConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/schema/schema.ts deleted file mode 100644 index e3a2f2ac1a0c57e4fa1228e1fd5a694d603a6a83..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/schema/schema.ts +++ /dev/null @@ -1,34 +0,0 @@ - - -export const CitySelectorSchemas = { - id: '', - col: 'col-6', - type: 'CitySelector', - titleSourceType: 'static', - title: '城市选择', - enableTitleTips: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - appearance: null, - size: null, - placeHolder: '', - holdPlace: false, - isTextArea: true, - binding: '', - readonly: '', - require: false, - multiSelect: false, - viewType: 'tag', - busNum: 'www', - mapFields: '', - selectionsChange: '', - tagRemoved: '', - inputClear: '', - path: '', - autoHeight: false, - maxHeight: 500, - click: null, - onBlur: null, - onClear: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/form.ts deleted file mode 100644 index 3673fa9472ff79d0c9675c6d1ace7d3f17f78d37..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/form.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (ctx: any) => { - return ` -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/city-selector/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/component/field.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/component/field.ts deleted file mode 100644 index 3e845e4e31b68fa444f89db8b2a0bf528b454c41..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/component/field.ts +++ /dev/null @@ -1,398 +0,0 @@ -import { BuilderHTMLElement, FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DesignerEnvType, DesignViewModel, FormBasicService, FormBinding, RefreshFormService, SchemaService } from '@farris/designer-services'; -import { RowNode } from '@farris/ui-treetable'; -import { FormPropertyChangeObject } from '../../../../../entity/property-change-entity'; -import { DgControl } from '../../../.././../utils/dg-control'; -import { InputsContextMenuService } from '../context-menu/context-menu.manager'; -import { DesignViewModelService, DomService, FormBindingType, FormSchemaEntityField$Type } from '@farris/designer-services'; -import { ComponentFactoryResolver, Injector } from '@angular/core'; -import { BsModalService } from '@farris/ui-modal'; -import { SaveAsTemplateEditorComponent } from '@farris/designer-devkit'; -import { cloneDeep } from 'lodash-es'; - -export default class FarrisDesignField extends FarrisDesignBaseComponent { - /** 控件当前运行环境 */ - envType: DesignerEnvType; - /** 控件绑定字段或变量是否有效 */ - isValidBinding = true; - - constructor(component: any, options: any) { - super(component, options); - - // 组件所属分类为“输入类” - this.category = 'input'; - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - - - if (this.envType === DesignerEnvType.noCode) { - this.addSaveAsCustomToolbarConfig(); - } - } - - /** - * 获取组件级样式 - */ - getClassName(): string { - let clsName = super.getClassName(); - if (!this.parent) { - return clsName; - } - - - // 获取父级Form组件上配置的【控件标签与输入框在一行展示】属性,将样式追加到每个输入控件上。这样是为了防止拖拽过程中的元素不受此属性控制,出现掉出蓝框的现象。 - if (this.parent.type === DgControl.Form.type) { - clsName += this.checkControlsInLine(this.parent.component); - return clsName; - } - if (this.parent.type === DgControl.FieldSet.type && this.parent.parent && this.parent.parent.type === DgControl.Form.type) { - clsName += this.checkControlsInLine(this.parent.parent.component); - return clsName; - } - // 获取父级ResponseLayoutItem组件上配置的【控件标签与输入框在一行展示】属性,将样式追加到每个输入控件上。这样是为了防止拖拽过程中的元素不受此属性控制,出现掉出蓝框的现象。 - if (this.parent.type === DgControl.ResponseLayoutItem.type) { - const parentCmpSchema = this.parent.component; - if (parentCmpSchema && parentCmpSchema.appearance && parentCmpSchema.appearance.class && parentCmpSchema.appearance.class.includes('farris-form-controls-inline')) { - clsName += ' farris-form-controls-inline'; - } - return clsName; - } - // table内的可输入控件,需要增加样式 - if (this.component.showInTable) { - clsName += ' d-block h-100 inputInTable'; - } - return clsName; - } - - /** - * 判断控件样式中是否需要追加farris-form-controls-inline - * @param formNode 父级Form控件schema数据 - */ - private checkControlsInLine(formNode: any) { - - // 启用国际化适配:根据当前语言来判断 - if (formNode.formAutoIntl) { - const isZhCHSLanguage = localStorage && localStorage.getItem('languageCode') || 'zh-CHS'; - return isZhCHSLanguage === 'zh-CHS' ? ' farris-form-controls-inline' : ''; - } - - // 未启用国际化适配:根据controlsInline属性来判断 - return formNode.controlsInline ? ' farris-form-controls-inline' : ''; - } - /** - * 渲染输入类控件,将label提取出来 - * @param element 输入框部分的html - */ - render(element: any, showLabel: boolean = true): string { - this.checkBindingFieldValidation(); - - return super.render(this.renderTemplate('Field', { - element, - isValidBinding: this.isValidBinding, - showLabel - })); - } - - - attach(element: BuilderHTMLElement): Promise { - const superAttach: any = super.attach(element); - - if (this.element.className && this.element.className.includes('dgComponentSelected')) { - this.registerLableSpanContentEditable(); - } - - return superAttach; - } - /** - * 监听属性面板的属性变更事件,并触发模板重绘。默认监听样式类属性 - * @param changeObject 属性变更集 - * @param propertyIDs 需要额外监听变更的属性id列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - let dynamicPropertyIDs = ['title', 'enableTitleTips', 'titleTipsTemplate', 'appearance.class', 'appearance.style', 'size.width', 'size.height', 'require', 'placeHolder', 'col', 'labelAutoWidth']; - if (propertyIDs) { - dynamicPropertyIDs = dynamicPropertyIDs.concat(propertyIDs); - } - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - // 绑定无效字段的控件,切换绑定后,需要重绘模板并更新属性面板,所以这里触发了设计器上当前控件的刷新 - if (!this.isValidBinding && changeObject.propertyID === 'binding') { - const refreshFormService = this.options.designerHost.getService('RefreshFormService'); - refreshFormService.refreshFormDesigner.next(this.id); - } - } - - - /** - * 删除控件:同步移除视图模型配置数据 - */ - onRemoveComponent() { - const bindingField = this.component.binding && this.component.binding.field; - // 若有绑定关系,在删除控件时需要同步删除ViewModel.fields中的记录 - if (!bindingField) { - return; - } - const serviceHost = this.options.designerHost; - const dgViewModelService = serviceHost.getService('DesignViewModelService'); - const dgViewModel = dgViewModelService.getDgViewModel(this.viewModelId); - const schemaService = serviceHost.getService('SchemaService') as SchemaService; - - if (dgViewModel) { - dgViewModel.removeField([bindingField]); - } - - // 移除schema中的字段--零代码场景 - schemaService.removeSchemaField([bindingField]); - - // 若输入控件是放在布局容器中的,删除控件后需要更新容器的样式 - if (this.parent && this.parent.type === DgControl.ResponseLayoutItem.type && this.parent.removeFormClassFromResponseLayoutItem) { - this.parent.removeFormClassFromResponseLayoutItem(); - } - - // 若绑定字段配置了表达式,需要删除表达式 - const domService = serviceHost.getService('DomService') as DomService; - if (domService.expressions && domService.expressions.length) { - const expFieldIndex = domService.expressions.findIndex(e => e.fieldId === bindingField); - if (expFieldIndex > -1) { - domService.expressions.splice(expFieldIndex, 1); - } - - } - } - - onMoveComponent() { - // 需要考虑控件移入移出分组、移出到其他Component的场景 - } - - - /** - * 组装输入类右键菜单 - * @param rowNode 组件在控件树上对应的行数据 - */ - resolveContextMenuConfig(rowNode: RowNode) { - const menuManager = new InputsContextMenuService(this); - return menuManager.setContextMenuConfig(); - } - /** - * 检查控件的绑定是否有效 - */ - private checkBindingFieldValidation() { - this.isValidBinding = true; - if (!this.component.binding || !this.component.binding.field) { - return; - } - switch (this.component.binding.type) { - case FormBindingType.Form: { - this.isValidBinding = this.checkBindingFormFieldValidation(); - break; - } - case FormBindingType.Variable: { - this.isValidBinding = this.checkBindingVariableFieldValidation(); - } - } - - } - - private checkBindingFormFieldValidation() { - const dgVMService = this.options.designerHost.getService('DesignViewModelService') as DesignViewModelService; - const dgViewModel = dgVMService.getDgViewModel(this.viewModelId); - const dgVMField = dgViewModel.fields.find(f => f.id === this.component.binding.field); - - // schema中已移除的字段 - if (!dgVMField) { - return false; - } - // 在schema中类型已发生变更的字段,例如由普通文本字段改成了关联字段 - if (dgVMField.$type !== FormSchemaEntityField$Type.SimpleField) { - return false; - } - - return true; - } - - private checkBindingVariableFieldValidation() { - const domService = this.options.designerHost.getService('DomService') as DomService; - const bindingVarible = domService.getVariableById(this.component.binding.field); - - // vm中已移除的变量 - if (!bindingVarible) { - return false; - } - - return true; - } - - /** - * 零代码:支持输入控件另存为模板 - */ - private addSaveAsCustomToolbarConfig() { - if (!this.customToolbarConfigs) { - this.customToolbarConfigs = []; - } - // 目前只支持绑定简单类字段的控件 - if (this.component.binding && this.component.binding.path && !this.component.binding.path.includes('_')) { - this.customToolbarConfigs.push( - { - id: 'saveAsTemplate', - title: '另存为模板', - icon: 'f-icon f-icon-save', - click: (e) => { - e.stopPropagation(); - this.showSaveAsTemplateModal(); - } - }); - } - - } - - /** - * 零代码:弹出另存为模板的窗口 - */ - private showSaveAsTemplateModal() { - // 动态创建相关的服务需要从designerHost中获取 - const serviceHost = this.options.designerHost; - const resolver = serviceHost.getService('ComponentFactoryResolver') as ComponentFactoryResolver; - const injector = serviceHost.getService('Injector') as Injector; - const modalService = serviceHost.getService('ModalService') as BsModalService; - - const compFactory = resolver.resolveComponentFactory(SaveAsTemplateEditorComponent); - const compRef = compFactory.create(injector); - const modalConfig = compRef.instance.modalConfig as any; - modalConfig.height = 200; - modalConfig.width = 450; - modalConfig.buttons = compRef.instance.modalFooter; - - - const templateDom = cloneDeep(this.component); - - compRef.instance.editorParams = { - controlCategory: 'input', - controlTitle: this.component.title || '', - controlDom: templateDom, - viewModelId: this.viewModelId - } - - const modalPanel = modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - compRef.instance.submitModal.subscribe(() => { - modalPanel.close(); - - // 刷新控件工具箱 - const refreshFormService = this.options.designerHost.getService('RefreshFormService') as RefreshFormService; - if (refreshFormService && refreshFormService.refreshControlBox) { - refreshFormService.refreshControlBox.next(); - } - }); - } - - /** - * 点击输入类控件后,启用模板中标签区域的编辑 - * @param e - * @returns - */ - afterComponentClicked(e?: PointerEvent): void { - this.registerLableSpanContentEditable(); - } - - /** - * 取消点击输入控件后,移除标签区域的编辑特性 - * @param e - * @returns - */ - afterComponentCancelClicked(e?: PointerEvent): void { - if (!this.element) { - return; - } - const labelSpanEle = this.element.querySelector('.farris-label-text'); - if (!labelSpanEle) { - return; - } - labelSpanEle.removeAttribute('contenteditable'); - - this.removeEventListener('blur'); - } - - - /** - * 注册label标签的编辑事件 - */ - private registerLableSpanContentEditable() { - if (this.envType !== DesignerEnvType.noCode) { - return; - } - if (!this.element) { - return; - } - const labelSpanEle = this.element.querySelector('.farris-label-text'); - if (!labelSpanEle) { - return; - } - // 启用标签编辑属性 - labelSpanEle.setAttribute('contenteditable', 'true'); - - // 监听标签blur事件 - this.addEventListener(labelSpanEle, 'blur', (e) => { - const newTitle = e.target.innerText; - - if (this.component.title !== newTitle) { - - // 更新控件DOM - this.component.title = newTitle; - - // 更新模板提示信息 - labelSpanEle.setAttribute('title', newTitle); - - // 更新控件树 - const refreshFormService = this.options.designerHost.getService('RefreshFormService'); - refreshFormService.refreshControlTree.next(); - - // 更新属性面板 - this.emit('componentClicked', { componentInstance: this, needUpdatePropertyPanel: true }); - - - // 控件绑定字段:触发更新schema变更 - if (this.component.binding && this.component.binding.type === FormBindingType.Form) { - this.syncSchemaFieldAfterControlTitleChanged(newTitle); - } - - } - - }); - } - /** - * 修改控件标签后,同步schema字段 - */ - private syncSchemaFieldAfterControlTitleChanged(newTitle: string) { - // 1、同步viewModel字段增量 - const dgVMService = this.options.designerHost.getService('DesignViewModelService') as DesignViewModelService; - const dgViewModel = dgVMService.getDgViewModel(this.viewModelId); - const dgVMField = dgViewModel && dgViewModel.fields.find(f => f.id === this.component.binding.field); - if (dgVMField) { - dgViewModel.changeField(dgVMField.id, { name: newTitle }); - } - - // 2、若是零代码表单驱动模板,还需要更改schema里的字段信息 - const formBasicServ = this.options.designerHost.getService('FormBasicService') as FormBasicService; - if (this.envType === DesignerEnvType.noCode && formBasicServ.driveMode === 'form') { - const schemaService = this.options.designerHost.getService('SchemaService') as SchemaService; - - // 判断是否为拖拽新增的字段 - const schemaField = schemaService.getFieldByID(dgVMField.id); - if (schemaField && schemaService.addedFieldsByControlBox.includes(dgVMField.id)) { - schemaField.name = newTitle; - } - } - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.config.ts deleted file mode 100644 index dc1be2cf6466b0965cfb429fc873febaaa854fdc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const contextMenu = [ - { - id: 'moveTo', - title: '移动至' - } -]; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.manager.ts deleted file mode 100644 index e346350954cc25e11c41376b748d057b5eaef70f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/context-menu/context-menu.manager.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { ComponentSchema } from '@farris/designer-element'; -import { DesignViewModelService, DomService, RefreshFormService } from '@farris/designer-services'; -import { NotifyService } from '@farris/ui-notify'; -import { RowNode } from '@farris/ui-treetable'; -import { cloneDeep } from 'lodash-es'; -import { ControlContextMenuItem } from '../../../../../entity/control-context-menu'; -import { DgControl } from '../../../../../utils/dg-control'; -import FarrisDesignField from '../component/field'; -import { contextMenu } from './context-menu.config'; - -const MOVETO_COMMAND = 'moveTo'; - -export class InputsContextMenuService { - - - /** form组件实例 */ - private cmpInstance: FarrisDesignField; - - /** 操作表单DOM的工具类 */ - private domService: DomService; - - /** 操作表单设计时ViewModel的工具类 */ - private dgVMService: DesignViewModelService; - - private notifyService: NotifyService; - - private refreshFormService: RefreshFormService; - - - constructor(cmp: FarrisDesignField) { - this.cmpInstance = cmp; - - const serviceHost = cmp.options.designerHost; - const injector = serviceHost.getService('Injector'); - - this.domService = serviceHost.getService('DomService'); - this.dgVMService = serviceHost.getService('DesignViewModelService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.notifyService = injector.get(NotifyService); - } - - - /** - * 组装【移动至】菜单 - * @param controlNode 控件dom - * @param menuConfig 菜单配置 - */ - setContextMenuConfig() { - let menuConfig = cloneDeep(contextMenu) as ControlContextMenuItem[]; - if (!menuConfig) { - return []; - } - const moveToMenu = menuConfig.find(menu => menu.id === MOVETO_COMMAND); - if (!moveToMenu) { - return menuConfig; - } - - - const formComponent = this.domService.getComponentById(this.cmpInstance.componentId); - const formNode = this.domService.selectNode(formComponent, item => item.type === DgControl.Form.type); - if (!formNode) { - // console.log('未检测到Form控件'); - menuConfig = menuConfig.filter(menu => menu.id !== MOVETO_COMMAND); - return menuConfig; - } - - const binding = this.cmpInstance.component.binding; - const viewModel = this.domService.getViewModelById(formComponent.viewModel); - const viewModelField = viewModel.fields.find(field => field.id === binding.field); - if (!binding || !viewModelField) { - // console.log('控件没有绑定信息,不支持移动'); - menuConfig = menuConfig.filter(menu => menu.id !== MOVETO_COMMAND); - return menuConfig; - } - - // 分组内控件,只能移动至分组外,即component下 - if (viewModelField.groupId) { - moveToMenu.children = [{ - title: '卡片面板', - id: formNode.id, - controlType: DgControl.Form.type, - parentMenuId: 'moveTo', - handle: (e) => { this.contextMenuClicked(e); } - }]; - } else { - // 分组外控件,可以移动至分组内,即Form下所有的FieldSet节点内 - const fieldSetNodes = formNode.contents.filter(node => node.type === DgControl.FieldSet.type); - if (fieldSetNodes.length > 0) { - moveToMenu.children = []; - fieldSetNodes.forEach(fieldSet => { - moveToMenu.children.push({ - title: fieldSet.title, - id: fieldSet.id, - parentMenuId: 'moveTo', - controlType: DgControl.FieldSet.type, - handle: (e) => { this.contextMenuClicked(e); } - }); - }); - } else { - // console.log('当前面板中没有分组,不支持移动'); - menuConfig = menuConfig.filter(menu => menu.id !== MOVETO_COMMAND); - return menuConfig; - } - - } - - return menuConfig; - - } - - /** - * 点击控件树右键菜单 - */ - private contextMenuClicked(e: { data: RowNode, menu: ControlContextMenuItem }) { - - const menu = e.menu; - - switch (menu.parentMenuId) { - // 移动至 - case 'moveTo': { - this.moveControlTo(this.cmpInstance.component, menu); - break; - } - default: { - this.notifyService.warning('暂不支持'); - } - } - } - - - /** - * 移动至 - * @param dgControlNode 控件元素 - * @param menuItem 菜单 - */ - private moveControlTo(controlNode: ComponentSchema, menuItem: ControlContextMenuItem) { - const targetControlType = menuItem.controlType; - const targetControlId = menuItem.id; - - const formComponent = this.domService.getComponentById(this.cmpInstance.componentId); - const formNode = this.domService.selectNode(formComponent, item => item.type === DgControl.Form.type); - - const dgVM = this.dgVMService.getDgViewModel(this.cmpInstance.viewModelId); - - switch (targetControlType) { - // 从分组内移动至分组外 - case DgControl.Form.type: { - - dgVM.changeField(controlNode.binding.field, { groupId: null, groupName: null }); - - const currentFieldSetNode = this.cmpInstance.parent.component; - currentFieldSetNode.contents = currentFieldSetNode.contents.filter(c => c.id !== controlNode.id); - - formNode.contents.push(controlNode); - - // 若分组下没有控件了,需要移除分组 - if (currentFieldSetNode.contents.length === 0) { - formNode.contents = formNode.contents.filter(c => c.id !== currentFieldSetNode.id); - } - break; - } - // 从分组外移动至分组内 - case DgControl.FieldSet.type: { - const targetFieldSetNode = this.domService.domDgMap.get(targetControlId); - targetFieldSetNode.contents.push(controlNode); - - dgVM.changeField(controlNode.binding.field, { groupId: targetControlId, groupName: targetFieldSetNode.title }); - - formNode.contents = formNode.contents.filter(c => c.id !== controlNode.id); - break; - } - } - - this.notifyService.success('移动成功'); - this.refreshFormService.refreshFormDesigner.next(formNode.id); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/index.ts deleted file mode 100644 index 6b3f019e0dd5fd6f389bc30fc00b8e8f37e0ab6a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import FdFieldComponent from './component/field'; - -import FdFieldTemplates from './templates'; - - -export const Field = { - component: FdFieldComponent, - template: FdFieldTemplates -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/form.ts deleted file mode 100644 index 993157218e5d7d8da96e5e7ed2dc41d36d3b9dba..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/form.ts +++ /dev/null @@ -1,69 +0,0 @@ - - -export default (ctx: any) => { - - if (ctx.showLabel) { - return getTemplateWithLabel(ctx); - } else { - return getTemplateWithoutLabel(ctx); - } - -}; - -/** - * 包含标签的输入类模板 - */ -function getTemplateWithLabel(ctx: any) { - - const require = ctx.component.require === true ? '*' : ''; - const titleTips = ctx.component.enableTitleTips ? ` ` : ''; - let resultStr = `
    - ${ctx.element} - ${titleTips} -
    -
    `; - return resultStr; -} - - -/** - * 不包含标签的输入类模板 - */ -function getTemplateWithoutLabel(ctx: any) { - - const inValidBindingTips = getInValidBindingTipsAfterWrap(ctx); - - return ` ${ctx.element}${inValidBindingTips}`; -} - -/** 绑定字段失效提示,用于卡片内的输入控件 */ -function getInValidBindingTipsAfterLabel(ctx: any) { - if (ctx.isValidBinding) { - return ''; - } - return ``; -} - -/** 绑定字段失效提示,用于表格类控件没有label的场景 */ -function getInValidBindingTipsAfterWrap(ctx: any) { - if (ctx.isValidBinding) { - return ''; - } - return ``; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/field/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/expression-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/expression-property-config.ts deleted file mode 100644 index bc77cc21ae57b23c3c6fc749ef5e9d5380a71afb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/expression-property-config.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { DomService, FormBindingType } from '@farris/designer-services'; -import { DgControl } from '../../../../../utils/dg-control'; -import { ExpressionEditorComponent } from '@farris/designer-devkit'; - -export class ExpressionProp { - - constructor(public domService: DomService) { } - - getExpressionPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - if (!propertyData || !propertyData.binding || propertyData.binding.type !== FormBindingType.Form || !propertyData.binding.field) { - return; - } - const fieldId = propertyData.binding.field; - - // 将表达式数组转换为属性面板支持的对象式结构 - const expressionData: any = {}; - if (this.domService.expressions) { - const expField = this.domService.expressions.find(e => e.fieldId === fieldId); - if (expField && expField.expression && expField.expression.length) { - expField.expression.forEach(expr => { - expressionData[expr.type] = expr.value; - if (expr.type === 'validate') { - expressionData.validateMessage = expr.message; - } - if (expr.type === 'dataPicking') { - expressionData.dataPickingMessage = expr.message; - expressionData.dataPickingMessageType = expr.messageType; - } - }); - } - } - - // 为了发版,暂时将申报模板子表中的只读、必填属性的表达式选项屏蔽掉 - let showExpInTableTemplate = true; - const vmBindTo = this.domService.getViewModelById(viewModelId).bindTo; - if (this.domService.module.templateId === 'nav-table-fillin-form-template' && vmBindTo !== '/') { - showExpInTableTemplate = false; - } - const properties = this.getExpressionProperties(fieldId, viewModelId, expressionData, propertyData, showExpInTableTemplate); - - const config: ElementPropertyConfig = { - categoryId: 'expressionData', - categoryName: '表达式', - properties, - propertyData: expressionData, - enableCascade: true, - parentPropertyID: (showPosition === 'gridFieldEditor' || showPosition === 'tableTdEditor') ? 'editor' : '' - }; - - if (showPosition === 'gridFieldEditor' || showPosition === 'tableTdEditor') { - config.tabId = showPosition; - config.tabName = '编辑器'; - } - - return config; - } - - protected getExpressionProperties(fieldId, viewModelId: string, expressionData: any, propertyData: any, showExpInTableTemplate: boolean) { - return [ - { - propertyID: 'compute', - propertyName: '计算表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: {fieldId, viewModelId, expType: 'compute', modalTitle: '计算表达式编辑器'}, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'compute'); - } - }, - { - propertyID: 'dependency', - propertyName: '依赖表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: {fieldId, viewModelId, expType: 'dependency', modalTitle: '依赖表达式编辑器'}, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'dependency'); - } - }, - { - propertyID: 'validate', - propertyName: '校验表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: { - fieldId, - viewModelId, - expType: 'validate', - message: expressionData.validateMessage, - modalTitle: '校验表达式编辑器' - }, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'validate'); - } - }, - { - propertyID: 'dataPicking', - propertyName: '帮助前表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: { - fieldId, - viewModelId, - expType: 'dataPicking', - message: expressionData.dataPickingMessage, - messageType: expressionData.dataPickingMessageType, - modalTitle: '帮助前表达式编辑器' - }, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'dataPicking'); - }, - visible: propertyData.type === DgControl.LookupEdit.type && showExpInTableTemplate - } - ]; - } - - protected clearExpressionData(fieldId: string, expType: string) { - if (this.domService.expressions) { - const exp = this.domService.expressions.find(e => e.fieldId === fieldId); - if (!exp) { - return; - } - - exp.expression = exp.expression.filter(e => e.type !== expType); - } - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/nocode-expression-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/nocode-expression-property-config.ts deleted file mode 100644 index 94a84d75b0ad69b698d6ef5295a547b9730904f9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/expression/nocode-expression-property-config.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ExpressionEditorComponent } from '@farris/designer-devkit'; -import { ExpressionProp } from './expression-property-config'; - -export class NocodeExpressionProp extends ExpressionProp { - - - protected getExpressionProperties(fieldId, viewModelId: string, expressionData: any, propertyData: any, showExpInTableTemplate: boolean) { - return [ - { - propertyID: 'compute', - propertyName: '计算表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: {fieldId, viewModelId, expType: 'compute', modalTitle: '计算表达式编辑器'}, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'compute'); - } - }, - { - propertyID: 'dependency', - propertyName: '依赖表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: {fieldId, viewModelId, expType: 'dependency', modalTitle: '依赖表达式编辑器'}, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'dependency'); - } - }, - { - propertyID: 'validate', - propertyName: '校验表达式', - propertyType: 'modal', - editor: ExpressionEditorComponent, - editorParams: { - fieldId, - viewModelId, - expType: 'validate', - message: expressionData.validateMessage, - modalTitle: '校验表达式编辑器' - }, - showClearButton: true, - afterClickClearButton: () => { - this.clearExpressionData(fieldId, 'validate'); - } - } - ]; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/input-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/property/input-property-config.ts deleted file mode 100644 index 1d45bdf7590807fd07070112055b4384a78ab255..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/input-property-config.ts +++ /dev/null @@ -1,1484 +0,0 @@ -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -import { FormResponseLayoutContext, ResponseLayoutEditorService } from './response-layout-editor'; -import { ColumnWidthSettingComponent } from '@farris/response-layout-editor'; -import { FormUnifiedColumnLayout } from '../../../container/form/property/editor/form-layout-setting/form-unified-column-layout'; -import { IDesignerHost } from '@farris/designer-element'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { EventEditorService, WebCmdService, DomService, SchemaService, FormBindingType, DesignViewModelService, UniformEditorDataUtil, FormExpression, StateMachineService, DesignViewModelField, DataStatesService, FormSchemaEntityField$Type } from '@farris/designer-services'; -import { StyleEditorComponent, BindingEditorComponent, BindingEditorConverter } from '@farris/designer-devkit'; -import { ExpressionEditorComponent, ExpressionEditorParam, CodeEditorComponent } from '@farris/designer-devkit'; -import { ExpressionProp } from './expression/expression-property-config'; -import { DgControl } from '../../../../utils/dg-control'; -import { DesignerEnvType, FormBasicService, RefreshFormService, FormVariable } from '@farris/designer-services'; -import { Injector } from '@angular/core'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { NotifyService } from '@farris/ui-notify'; - -export class InputProps extends ExpressionProp { - /** 布局配置服务 */ - private responseLayoutService: ResponseLayoutEditorService; - public webCmdService: WebCmdService; - public domService: DomService; - public schemaService: SchemaService; - public dgVMService: DesignViewModelService; - public formBasicService: FormBasicService; - public eventEditorService: EventEditorService; - public controlCreatorService: any; - public refreshFormService: RefreshFormService; - public injector: Injector; - - public viewModelId: string; - public componentId: string; - - /** 控件绑定的模型字段 */ - private dgVMField: DesignViewModelField; - - stateMachineService: StateMachineService; - - dataStatesService: DataStatesService; - - /** Schema-控件映射类 */ - private schemaDOMMapping: any; - - // 在列表中使用控件,列数据 - gridFieldData: any; - /** 控件绑定的变量 */ - bindingVarible: FormVariable; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost.getService('DomService')); - - this.domService = serviceHost.getService('DomService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.schemaService = serviceHost.getService('SchemaService'); - this.dgVMService = serviceHost.getService('DesignViewModelService'); - this.stateMachineService = serviceHost.getService('StateMachineService'); - this.schemaDOMMapping = serviceHost.getService('SchemaDOMMapping'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.controlCreatorService = serviceHost.getService('ControlCreatorService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.injector = serviceHost.getService('Injector'); - this.viewModelId = viewModelId; - this.componentId = componentId; - - } - - getBasicCommonPropConfig(propertyData: any): PropertyEntity[] { - - const canChangeControlType = this.checkCanChangeControlType(propertyData, this.viewModelId); - let controlTypeList = []; - if (!canChangeControlType) { - controlTypeList = [{ - key: propertyData.type, - value: (DgControl[propertyData.type] && DgControl[propertyData.type].name) || propertyData.type - }]; - } - - if (this.dgVMField && this.dgVMField.$type === FormSchemaEntityField$Type.SimpleField) { - // 绑定字段 - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.dgVMField.type.name, this.dgVMField.multiLanguage, 'form', this.formBasicService.envType); - } else if (this.bindingVarible) { - // 绑定变量 - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.bindingVarible.type, false, 'form', this.formBasicService.envType); - } - - return [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - description: '组件的id', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - readonly: !canChangeControlType, - iterator: controlTypeList - } - ]; - } - getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - } - - }, - - }; - - } - /** - * 获取输入类控件的通用外观属性 - */ - getAppearanceCommonPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): PropertyEntity[] { - // 单选组、多选、多选组、开关控件 都不再支持静态文本、占位符 - const notAllowedControlTypes = [ - DgControl.CheckBox.type, - DgControl.CheckGroup.type, - DgControl.SwitchField.type, - DgControl.RadioGroup.type, - DgControl.Tags.type - ]; - - // 适配标签换行属性 - if (propertyData.appearance && propertyData.appearance.class && propertyData.appearance.class.includes('farris-group-multi-label')) { - propertyData.labelAutoOverflow = true; - } else { - propertyData.labelAutoOverflow = false; - } - - if (showPosition === 'tableTdEditor') { - return [ - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '标签名称', - visible: !propertyData.titleSourceType || propertyData.titleSourceType === 'static' - }, - { - propertyID: 'isTextArea', - propertyName: '启用静态文本', - propertyType: 'select', - description: '是否启用静态文本', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - visible: !notAllowedControlTypes.includes(propertyData.type) - }, - { - propertyID: 'placeHolder', - propertyName: '占位符', - propertyType: 'string', - description: '占位符文本', - readonly: false, - visible: !notAllowedControlTypes.includes(propertyData.type) - } - ]; - } - - this.responseLayoutService = new ResponseLayoutEditorService(this.domService, this.componentId); - return [ - { - propertyID: 'responseLayout', - propertyName: '布局配置', - propertyType: 'custom', - description: '布局配置设置', - editor: ColumnWidthSettingComponent, - visible: this.responseLayoutService.checkIsInFormComponent(), - beforeOpenModal: () => this.responseLayoutService.checkCanOpenLayoutEditor(propertyData) - }, - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string', - description: '组件的CSS样式' - }, - { - propertyID: 'style', - propertyName: 'style样式', - propertyType: 'modal', - description: '组件的内容样式', - editor: StyleEditorComponent, - showClearButton: true - } - ] - }, - { - propertyID: 'size', - propertyName: '尺寸', - propertyType: 'cascade', - visible: propertyData.type === DgControl.Avatar.type, // 目前只有头像控件支持size属性 - cascadeConfig: [ - { - propertyID: 'width', - propertyName: '宽度(px)', - propertyType: 'number', - description: '组件的宽度', - min: 0, - decimals: 0 - }, - { - propertyID: 'height', - propertyName: '高度(px)', - propertyType: 'number', - description: '组件的高度', - min: 0, - decimals: 0 - } - ] - }, - { - propertyID: 'titleSourceType', - propertyName: '标签类型', - propertyType: 'select', - description: '标签的状态', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }] - }, - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '标签名称', - visible: !propertyData.titleSourceType || propertyData.titleSourceType === 'static' - }, - { - propertyID: 'titleDataSource', - propertyName: '标签', - propertyType: 'unity', - description: '标签数据源', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - }, - }, - visible: propertyData.titleSourceType === 'dynamic' - }, - - { - propertyID: 'labelAutoWidth', // f-form-lable-auto - propertyName: '标签长度自适应', - propertyType: 'select', - description: '展示完整标签', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - visible: viewModelId === 'root-viewmodel', - refreshPanelAfterChanged: true - }, - { - propertyID: 'titleWidth', - propertyName: '标签长度', - propertyType: 'number', - description: '标签的长度', - decimals: 0, - min: 0, - visible: !propertyData.labelAutoWidth - }, - // { - // propertyID: 'labelAutoOverflow', - // propertyName: '标签换行', - // propertyType: 'boolean', - // description: '标签字数超长时,换行显示', - // defaultValue: false, - // iterator: [ - // { key: true, value: '是' }, - // { key: false, value: '否' } - // ],, - // visible: !propertyData.labelAutoWidth - // }, - { - propertyID: 'enableTitleTips', - propertyName: '启用标签提示', - propertyType: 'select', - description: '是否显示标签提示,一般用于前置任务中', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - }, - { - propertyID: 'titleTipsTemplate', - propertyName: '标签提示内容', - propertyType: 'modal', - description: '标签提示内容设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.enableTitleTips - }, - { - propertyID: 'placeHolder', - propertyName: '占位符', - propertyType: 'string', - description: '占位符文本', - readonly: false, - visible: !notAllowedControlTypes.includes(propertyData.type) - }, - { - propertyID: 'holdPlace', - propertyName: '隐藏时保留位置', - propertyType: 'select', - description: '组件隐藏时是否保留原有位置', - defaultValue: false, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'isTextArea', - propertyName: '启用静态文本', - propertyType: 'select', - description: '是否启用静态文本', - defaultValue: false, - visible: !notAllowedControlTypes.includes(propertyData.type), - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'autoHeight', - propertyName: '自动高度', - propertyType: 'select', - description: '控件是否启用自动高度', - visible: this.checkAutoHeightVisible(notAllowedControlTypes, propertyData), - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'maxHeight', - propertyName: '最大高度', - propertyType: 'number', - description: '启用自动高度后输入框的最大高度', - min: 0, - decimals: 0, - visible: this.checkAutoHeightVisible(notAllowedControlTypes, propertyData) && propertyData.autoHeight - } - ]; - } - /** - * 判断自动高度的显示条件 - * @param notAllowedControlTypes 不支持静态文本的控件列表 - * @param propertyData 控件属性 - */ - private checkAutoHeightVisible(notAllowedControlTypes: string[], propertyData: any) { - // 多行文本和富文本一直显示 - const alwaysShowControls = [DgControl.MultiTextBox.type, DgControl.RichTextBox.type]; - if (alwaysShowControls.includes(propertyData.type)) { - return true; - } - // 其他控件根据是否支持静态文本以及当前是否显示静态文本来控制 - return !notAllowedControlTypes.includes(propertyData.type) && propertyData.isTextArea; - } - - /** - * 处理外观类属性的联动 - */ - changeAppearancePropertyRelates(properties: PropertyEntity[], changeObject: FormPropertyChangeObject, propertyData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'linkedLabelEnabled': { - const linkedLabelClick = properties.find((p: PropertyEntity) => p.propertyID === 'linkedLabelClick'); - if (linkedLabelClick) { - linkedLabelClick.visible = changeObject.propertyValue; - } - break; - } - case 'title': { - changeObject.needUpdateControlTreeNodeName = true; - break; - } - case 'titleSourceType': { - const title = properties.find((p: PropertyEntity) => p.propertyID === 'title'); - const titleDataSource = properties.find(p => p.propertyID === 'titleDataSource'); - - if (title) { - title.visible = changeObject.propertyValue !== 'dynamic'; - } - if (titleDataSource) { - titleDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - break; - } - case 'enableTitleTips': { - const titleTipsTemplate = properties.find((p: PropertyEntity) => p.propertyID === 'titleTipsTemplate'); - if (titleTipsTemplate) { - titleTipsTemplate.visible = changeObject.propertyValue; - } - break; - } - case 'responseLayout': { - this.responseLayoutService.responseLayoutConfig = changeObject.propertyValue; - const formNodeId = this.responseLayoutService.changeFormControlsByResponseLayoutConfig(this.componentId); - // changeObject.notApplyToFormDom = true; - - this.updateUnifiedLayoutAfterResponseLayoutChanged(this.componentId); - - // 局部刷新组件 - if (formNodeId) { - changeObject.needRefreshedComponentId = formNodeId; - } - delete propertyData.responseLayout; - - break; - } - case 'class': { - if (changeObject.parentPropertyID === 'appearance') { - - this.updateUnifiedLayoutAfterControlChanged(changeObject.propertyValue, propertyData.id, this.componentId); - } - break; - } - case 'labelAutoOverflow': { - const labelAutoOverflowClass = ' farris-group-multi-label'; - if (changeObject.propertyValue) { - propertyData.appearance.class = propertyData.appearance.class + labelAutoOverflowClass; - } else { - propertyData.appearance.class = propertyData.appearance.class.replace(labelAutoOverflowClass, ''); - } - break; - } - case 'labelAutoWidth': { - const labelAutoWidthClass = ' f-form-lable-auto'; - if (changeObject.propertyValue) { - propertyData.appearance.class = propertyData.appearance.class + labelAutoWidthClass; - } else { - propertyData.appearance.class = propertyData.appearance.class.replace(labelAutoWidthClass, ''); - } - const titleWidth = properties.find((p: PropertyEntity) => p.propertyID === 'titleWidth'); - if (titleWidth) { - titleWidth.visible = !changeObject.propertyValue; - } - const labelAutoOverflow = properties.find((p: PropertyEntity) => p.propertyID === 'labelAutoOverflow'); - if (labelAutoOverflow) { - labelAutoOverflow.visible = !changeObject.propertyValue; - } - - break; - } - case 'isTextArea': { - // 多行文本和富文本一直显示 - const alwaysShowControls = [DgControl.MultiTextBox.type, DgControl.RichTextBox.type]; - if (!alwaysShowControls.includes(propertyData.type)) { - const autoHeight = properties.find(p => p.propertyID === 'autoHeight'); - if (autoHeight) { - autoHeight.visible = changeObject.propertyValue; - } - const maxHeight = properties.find(p => p.propertyID === 'maxHeight'); - if (maxHeight) { - maxHeight.visible = autoHeight.visible && changeObject.propertyValue && propertyData.autoHeight; - } - } - - break; - } - case 'autoHeight': { - const maxHeight = properties.find(p => p.propertyID === 'maxHeight'); - if (maxHeight) { - maxHeight.visible = changeObject.propertyValue; - } - break; - } - } - } - /** - * 获取输入类控件的通用行为属性 - */ - getBehaviorCommonPropConfig(propertyData: any, viewModelId: string): PropertyEntity[] { - // 只有绑定字段的控件支持表达式,绑定变量的控件不支持表达式 - const bindingFieldId = propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 运行时定制环境中不允许新增变量,因为新增的变量没有入口配置变量值 - const canAddVariable = this.formBasicService.envType === DesignerEnvType.designer; - - // 为了发版,暂时将申报模板子表中的只读、必填属性的表达式选项屏蔽掉 - let showExpInTableTemplate = true; - const vmBindTo = this.domService.getViewModelById(viewModelId).bindTo; - if (this.domService.module.templateId === 'nav-table-fillin-form-template' && vmBindTo !== '/') { - showExpInTableTemplate = false; - } - // 视图模型中[字段更新时机]属性现在要在控件上维护,所以在控件上复制一份属性值 - if (bindingFieldId) { - if (!this.dgVMField) { - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - this.dgVMField = dgViewModel.fields.find(f => f.id === bindingFieldId); - } - propertyData.updateOn = this.dgVMField.updateOn; - } - - return [ - { - propertyID: 'binding', - propertyName: '绑定', - propertyType: 'modal', - description: '绑定的表单字段', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: this.componentId, controlType: propertyData.type, unusedOnly: true }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'updateOn', - propertyName: '绑定字段更新时机', - propertyType: 'select', - iterator: [ - { key: 'change', value: '值变化时' }, - { key: 'blur', value: '控件失去焦点时' } - ], - description: '控件绑定字段的更新时机', - visible: !!bindingFieldId - }, - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: canAddVariable ? UniformEditorDataUtil.getControlName(propertyData) : undefined, - constType: 'enum', - editorOptions: { - types: bindingFieldId ? ['const', 'variable', 'custom', 'expression'] : ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '可见编辑器', 'visible'), - exprValue: this.getExprValue(expField, propertyData.visible) - } - } - } - }, - { - propertyID: 'readonly', - propertyName: '只读', - propertyType: 'unity', - description: '是否只读', - editorParams: { - controlName: canAddVariable ? UniformEditorDataUtil.getControlName(propertyData) : undefined, - constType: 'enum', - editorOptions: { - types: bindingFieldId && showExpInTableTemplate ? ['const', 'variable', 'custom', 'expression', 'stateMachine'] : ['const', 'variable', 'custom', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '只读编辑器', 'readonly'), - exprValue: this.getExprValue(expField, propertyData.readonly) - }, - stateMachine: this.stateMachineService.stateMachineMetaData, - } - }, - }, - - { - propertyID: 'require', - propertyName: '必填', - propertyType: 'unity', - description: '是否必填', - editorParams: { - controlName: canAddVariable ? UniformEditorDataUtil.getControlName(propertyData) : undefined, - constType: 'enum', - editorOptions: { - types: bindingFieldId && showExpInTableTemplate ? ['const', 'variable', 'custom', 'expression'] : ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '必填编辑器', 'require'), - exprValue: this.getExprValue(expField, propertyData.require) - } - } - } - }, - { - propertyID: 'tabindex', - propertyName: '控件Tab索引(从1开始)', - propertyType: 'number', - decimals: 0, - min: -1, - description: '-1:不启用索引。若启用索引请从1开始配置。', - visible: ![DgControl.Avatar.type, DgControl.Image.type, DgControl.Tags.type].includes(propertyData.type) - }, - { - propertyID: 'hasDefaultFocus', - propertyName: '具有默认焦点', - propertyType: 'select', - description: '是否具有默认焦点', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - defaultValue: false, - visible: ![DgControl.Avatar.type, DgControl.Image.type, DgControl.Tags.type].includes(propertyData.type) - }, - { - propertyID: 'focusState', - propertyName: '焦点状态', - propertyType: 'string', - description: '焦点状态设置', - visible: propertyData.hasDefaultFocus && ![DgControl.Avatar.type, DgControl.Image.type, DgControl.Tags.type].includes(propertyData.type) - } - ]; - } - /** - * 行为类属性的变更联动方法 - */ - changeBehaviorPropertyRelates( - properties: PropertyEntity[], changeObject: FormPropertyChangeObject, - propertyData: any, parameters, showPosition = 'card') { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'binding': { - this.updateControlDomAfterChangingBinding(propertyData, parameters, this.viewModelId, changeObject); - break; - } - case 'hasDefaultFocus': { - const focusState = properties.find(p => p.propertyID === 'focusState'); - if (focusState) { - focusState.visible = changeObject.propertyValue && ![DgControl.Avatar.type, DgControl.Image.type, DgControl.Tags.type].includes(propertyData.type); - } - break; - } - case 'readonly': case 'visible': case 'require': { - // 属性值从表达式切换为其他类型:需要清空DOM中的表达式配置 - const newValueType = changeObject.propertyValue && changeObject.propertyValue.type; - this.clearExpression(newValueType, propertyData, changeObject.propertyID); - break; - } - case 'updateOn': { - // 字段更新时机 - const dgVM = this.dgVMService.getDgViewModel(this.viewModelId); - if (dgVM && this.dgVMField) { - dgVM.changeField(this.dgVMField.id, { updateOn: changeObject.propertyValue }); - } - // delete propertyData.updateOn; - - break; - } - - } - - } - - /** - * 修改绑定后要同步变更控件path属性,若是帮助控件还要变更数据源属性并同步viewModel - */ - updateControlDomAfterChangingBinding(propertyData: any, parameters: any, viewModelId: string, changeObject: FormPropertyChangeObject) { - const selectedData = parameters && parameters.selectedData; - if (!selectedData) { - return; - } - // 变更path属性 - propertyData.path = selectedData.bindingPath; - - // 切换当前dgVMField - this.checkCanChangeControlType(propertyData, viewModelId); - - // 帮助控件变更dataSource.uri属性 - if (propertyData.type === DgControl.LookupEdit.type && propertyData.dataSource && propertyData.dataSource.uri) { - const uri = propertyData.dataSource.uri; - const index = uri.indexOf('.'); - if (index < 0) { - return; - } - - if (propertyData.binding.type === FormBindingType.Form) { - const newUri = uri.slice(0, index) + '.' + selectedData.bindingField; - propertyData.dataSource.uri = newUri; - - // 同步viewModel Field - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(propertyData.binding.field, { editor: { dataSource: propertyData.dataSource } }); - } else { - const newUri = uri.slice(0, index) + '.' + selectedData.code; - propertyData.dataSource.uri = newUri; - } - - } - if (propertyData.type === DgControl.LookupEdit.type) { - propertyData.lookupPickingExpression = null; - } - // 切换绑定后涉及到了表达式的移除,需要触发属性面板的更新 - if (parameters.expressionCleared) { - changeObject.needRefreshedComponentId = propertyData.id; - } - - // 刷新实体树 - this.refreshFormService.refreshSchamaTree.next(); - } - /** - * 修改某一输入控件的样式后更新Form的统一布局配置 - * @param controlClass 控件样式 - * @param controlId 控件Id - * @param componentId 控件所在组件id - */ - private updateUnifiedLayoutAfterControlChanged(controlClass: string, controlId: string, componentId: string) { - - const controlClassArray = controlClass.split(' '); - - let colClass = controlClassArray.find(item => /^col-([1-9]|10|11|12)$/.test(item)); - let colMDClass = controlClassArray.find(item => /^col-md-([1-9]|10|11|12)$/.test(item)); - let colXLClass = controlClassArray.find(item => /^col-xl-([1-9]|10|11|12)$/.test(item)); - let colELClass = controlClassArray.find(item => /^col-el-([1-9]|10|11|12)$/.test(item)); - - colClass = colClass || 'col-12'; - colMDClass = colMDClass || 'col-md-' + colClass.replace('col-', ''); - colXLClass = colXLClass || 'col-xl-' + colMDClass.replace('col-md-', ''); - colELClass = colELClass || 'col-el-' + colXLClass.replace('col-xl-', ''); - - const latestControlLayoutConfig = { - id: controlId, - columnInSM: parseInt(colClass.replace('col-', ''), 10), - columnInMD: parseInt(colMDClass.replace('col-md-', ''), 10), - columnInLG: parseInt(colXLClass.replace('col-xl-', ''), 10), - columnInEL: parseInt(colELClass.replace('col-el-', ''), 10), - }; - - this.updateUnifiedLayoutAfterResponseLayoutChanged(componentId, latestControlLayoutConfig); - } - - /** - * 修改控件布局配置后更新Form统一布局配置 - * @param componentId 组件Id - * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型 - */ - private updateUnifiedLayoutAfterResponseLayoutChanged(componentId: string, controlLayoutConfig?: any): FormUnifiedColumnLayout { - const componentNode = this.domService.getComponentById(componentId); - if (!componentNode || !componentNode.componentType || !componentNode.componentType.startsWith('form')) { - return; - } - const formNode = this.domService.selectNode(componentNode, item => item.type === DgControl.Form.type); - if (!formNode || !formNode.unifiedLayout) { - return; - } - - const responseLayoutConfig: FormResponseLayoutContext[] = []; - - this.responseLayoutService.getFormResonseLayoutConfig(formNode, responseLayoutConfig, 1); - - if (controlLayoutConfig) { - const changedControl = responseLayoutConfig.find(c => c.id === controlLayoutConfig.id); - Object.assign(changedControl, controlLayoutConfig); - } - - // 收集每种屏幕下的列数 - const columnInSMArray = responseLayoutConfig.map(config => config.columnInSM); - const columnInMDArray = responseLayoutConfig.map(config => config.columnInMD); - const columnInLGArray = responseLayoutConfig.map(config => config.columnInLG); - const columnInELArray = responseLayoutConfig.map(config => config.columnInEL); - - // 只有每个控件的宽度都一样时,才认为form上有统一宽度,否则认为是自定义的控件宽度,此处传递null - const uniqueColClassInSM = this.checkIsUniqueColumn(columnInSMArray) ? columnInSMArray[0] : null; - const uniqueColClassInMD = this.checkIsUniqueColumn(columnInMDArray) ? columnInMDArray[0] : null; - const uniqueColClassInLG = this.checkIsUniqueColumn(columnInLGArray) ? columnInLGArray[0] : null; - const uniqueColClassInEL = this.checkIsUniqueColumn(columnInELArray) ? columnInELArray[0] : null; - - - Object.assign(formNode.unifiedLayout, { - uniqueColClassInSM, - uniqueColClassInMD, - uniqueColClassInLG, - uniqueColClassInEL - }); - } - /** - * 校验宽度样式值是否一致 - */ - private checkIsUniqueColumn(columnsInScreen: number[]) { - const keySet = new Set(columnsInScreen); - const exclusiveKeys = Array.from(keySet); - - if (exclusiveKeys.length === 1) { - return true; - } - return false; - } - - - /** - * 获取表达式编辑需要的参数:在属性面板弹出表达式窗口时调用 - */ - private getExpressionEditorParams(propertyData: any, modalTitle: string, expressionType: string) { - - let expressionStr = null; - - const bindingFieldId = propertyData.binding && propertyData.binding.field; - - const expressionParams: ExpressionEditorParam = { - modalTitle: modalTitle || '表达式编辑器', - fieldId: bindingFieldId, - viewModelId: this.viewModelId, - expType: expressionType - }; - - // 必填表达式需要配置提示消息 - if (expressionType === 'require') { - expressionParams.message = ''; - } - - - const propertyValue = propertyData[expressionType]; - if (propertyValue && propertyValue.expressionId && bindingFieldId) { - const expField = this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 检测到现有的表达式配置 - if (expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig.value; - - if (expressionType === 'require') { - expressionParams.message = originalExpConfig.message; - } - } - } - - return { - editorParams: expressionParams, - value: expressionStr - }; - } - - /** - * 获取属性编辑器需要的初始绑定值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - private getExprValue(expField: FormExpression, propertyValue: any) { - let expressionStr = null; - if (propertyValue && propertyValue.expressionId && expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig && originalExpConfig.value; - - } - - return { - type: 'expression', - value: { - value: expressionStr, - parameters: propertyValue && propertyValue.expressionId, - type: 'Expression' - } - }; - } - /** - * 校验控件是否支持切换类型 - * @param control 控件 - */ - private checkCanChangeControlType(propertyData: any, viewModelId: string): boolean { - // 没有绑定信息的控件 - if (!propertyData.binding) { - return false; - } - - // 不可编辑的列表、树列不能切换类型 - if (propertyData.type === DgControl.TreeGridField.type || (propertyData.type === DgControl.GridField.type && !propertyData.editor)) { - return false; - } - if (propertyData.binding.type === 'Variable') { - this.bindingVarible = this.domService.getVariableById(propertyData.binding.field); - // vm中已移除的变量 - if (!this.bindingVarible) { - return false; - } - - } else { - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - this.dgVMField = dgViewModel.fields.find(f => f.id === propertyData.binding.field); - - // schema中已移除的字段 或者绑定复杂类型的字段 - if (!this.dgVMField || this.dgVMField.$type !== FormSchemaEntityField$Type.SimpleField) { - return false; - } - - } - return true; - - } - - /** - * 清除原表达式 - */ - clearExpression(newValueType: string, propertyData: any, propertyID: string) { - if (newValueType !== 'Expression') { - const bindingFieldId = propertyData.binding && propertyData.binding.field; - const exp = this.domService.expressions.find(e => e.fieldId === bindingFieldId); - if (!exp || !exp.expression) { - return; - } - exp.expression = exp.expression.filter(e => e.type !== propertyID); - } - - } - /** - * 卡片控件:切换控件类型后事件 - * @param propertyData 控件DOM属性 - * @param newControlType 新控件类型 - */ - changeControlType(propertyData, newControlType: string) { - // 1、定位控件父容器 - const cmp = this.domService.getComponentById(this.componentId); - const parentContainer = this.getControlParentContainer(propertyData.id, cmp); - if (!parentContainer) { - return; - } - const index = parentContainer.contents.findIndex(c => c.id === propertyData.id); - const oldControl = parentContainer.contents[index]; - - let newControl; - // 绑定字段 - if (this.dgVMField) { - // ①、记录viewModel 变更---全量替换editor - const dgViewModel = this.dgVMService.getDgViewModel(this.viewModelId); - dgViewModel.changeField(this.dgVMField.id, { - editor: { - $type: newControlType - }, - name: this.dgVMField.name, - require: this.dgVMField.require, - readonly: this.dgVMField.readonly - }, false); - // ② 创建新控件 - newControl = this.controlCreatorService.createControlBySchemaFeild(this.dgVMField, cmp.componentType); - } else { - // 绑定变量 - // ① 记录viewModel 变更---全量替换editor - const vmVariable = this.domService.getViewModelFieldById(this.viewModelId, this.bindingVarible.id); - Object.assign(vmVariable, { - editor: { - $type: newControlType - } - }); - // ② 创建新控件 - newControl = this.controlCreatorService.createControlByVariable(this.bindingVarible, cmp.componentType, newControlType, this.componentId); - } - - - // 保留原id和isRTControl、样式等属性 - Object.assign(newControl, { - id: oldControl.id, - isRTControl: !!oldControl.isRTControl, - appearance: oldControl.appearance, - size: oldControl.size, - titleSourceType: oldControl.titleSourceType, - title: oldControl.title, - titleDataSource: oldControl.titleDataSource, - titleWidth: oldControl.titleWidth, - labelAutoWidth: oldControl.labelAutoWidth, - labelAutoOverflow: oldControl.labelAutoOverflow, - enableTitleTips: oldControl.enableTitleTips, - titleTipsTemplate: oldControl.titleTipsTemplate, - isTextArea: newControl.isTextArea && oldControl.isTextArea, - placeHolder: oldControl.placeHolder, - holdPlace: oldControl.holdPlace, - readonly: oldControl.readonly, - require: oldControl.require, - visible: oldControl.visible - }); - - // 4、替换控件 - parentContainer.contents.splice(index, 1, newControl); - - // 5、触发父容器刷新 - this.refreshFormService.refreshFormDesigner.next(parentContainer.id); - - return parentContainer.id; - - } - - /** - * 获取控件:以contents为节点进行定位 - * @param controlId 控件ID - * @param domJson 容器 - */ - private getControlParentContainer(controlId: string, domJson: any) { - let container; - if (!domJson || !domJson.contents || domJson.contents.length === 0) { - return null; - } - - for (const content of domJson.contents) { - if (content.id === controlId) { - container = domJson; - return domJson; - } - container = this.getControlParentContainer(controlId, content); - if (container) { - return container; - } - } - } - - - /** - * 输入控件扩展区域属性配置 - * @param propertyData 属性值 - * @param viewModelId viewModelId - * @returns ElementPropertyConfig - */ - getInputAppendPropertyConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const props = [ - { - propertyID: 'enableAppend', - propertyName: '启用扩展区域', - propertyType: 'unity', - description: '是否启用扩展区域', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - }, - }, - { - propertyID: 'inputAppendText', - propertyName: '扩展文本', - propertyType: 'modal', - description: '扩展区域展示的文本内容', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'inputAppendType', - propertyName: '扩展类型', - propertyType: 'select', - description: '扩展区域展示的文本内容', - iterator: [{ key: 'text', value: '静态文本' }, { key: 'button', value: '按钮' }] - }, - { - propertyID: 'inputAppendDisabled', - propertyName: '是否禁用', - propertyType: 'unity', - description: '是否禁用扩展区域', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - } - ]; - - this.checkAppendVisible(props, propertyData); - const self = this; - - const config = { - categoryId: 'inputAppend', - categoryName: '扩展区域', - properties: props, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject && changeObject.propertyID) { - case 'enableAppend': case 'inputAppendType': { - self.checkAppendVisible(this.properties, propertyData); - break; - } - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 控制扩展区域属性显隐 - * @param props 属性配置 - * @param propertyData 属性值 - */ - private checkAppendVisible(props: PropertyEntity[], propertyData: any) { - props.forEach(prop => { - switch (prop.propertyID) { - case 'inputAppendText': case 'inputAppendType': { - prop.visible = propertyData.enableAppend !== false; - break; - } - case 'inputAppendDisabled': case 'inputAppendClickEvent': { - prop.visible = propertyData.enableAppend !== false && propertyData.inputAppendType === 'button'; - break; - } - } - }); - } - - /** - * 列编辑器类型切换属性 - */ - getGridFieldEditorTypePropertyConfig(gridFieldData: any, viewModelId: string): ElementPropertyConfig { - const self = this; - const propertyData = gridFieldData.editor; - this.gridFieldData = gridFieldData; - - - const canChangeControlType = this.checkCanChangeControlType(propertyData, viewModelId); - let controlTypeList = []; - - if (canChangeControlType) { - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.dgVMField.type.name, this.dgVMField.multiLanguage, 'dataGrid', this.formBasicService.envType); - } else if (this.dgVMField && this.dgVMField.$type === FormSchemaEntityField$Type.ComplexField) { - controlTypeList = [{ - key: propertyData.type, - value: (DgControl[propertyData.type] && DgControl[propertyData.type].name) || propertyData.type - }]; - - } - if (controlTypeList.length === 0) { - return; - } - return { - categoryId: 'gridFieldEditor_editorType', - categoryName: '编辑器类型', - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: 'gridFieldEditor', - tabName: '编辑器', - properties: [ - { - propertyID: 'type', - propertyName: '编辑器类型', - propertyType: 'select', - readonly: !canChangeControlType, - iterator: controlTypeList - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject && changeObject.propertyID) { - case 'type': { - self.changeGridFieldEditorType(changeObject.propertyValue, viewModelId); - break; - } - } - } - }; - } - /** - * datagrid field:列编辑器类型切换后事件 - * @param newControlType 新控件类型 - * @param viewModelId 视图模型ID - */ - changeGridFieldEditorType(newControlType: string, viewModelId: string) { - - // 1、记录viewModel 变更---全量替换editor - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(this.dgVMField.id, { - editor: { - $type: newControlType - }, - name: this.dgVMField.name, - require: this.dgVMField.require, - readonly: this.dgVMField.readonly - }, false); - - - // 2、定位列表 - const cmp = this.domService.getComponentByVMId(viewModelId); - const grid = this.domService.selectNode(cmp, item => item.type === DgControl.DataGrid.type || item.type === DgControl.TreeGrid.type); - - if (!grid) { - return; - } - // 3、创建新列 - const editable = grid.fieldEditable; - const dataField = this.dgVMField.bindingPath; - const gridFieldType = grid.type === DgControl.DataGrid.type ? DgControl.GridField.type : DgControl.TreeGridField.type; - - const newField = this.controlCreatorService.createGridFieldBySchemaFeild(this.dgVMField, dataField, editable, - gridFieldType, grid.controlSource); - - // 4、替换列编辑器 - const index = grid.fields.findIndex(c => c.id === this.gridFieldData.id); - if (index > -1 && grid.fields[index].editor) { - grid.fields[index].editor = Object.assign(newField.editor, { - id: grid.fields[index].editor.id, - isRTControl: !!grid.fields[index].editor.isRTControl, - title: grid.fields[index].editor.title - }); - } - - - } - - /** - * 追加列编辑器内的必填、字段更新时机属性 - * @param editorProp 列编辑器属性分类 - * @param gridFieldEditorData 列编辑器数据 - * @param viewModelId viewModelId - */ - appendBehaviorPropsForGridFieldEditor(editorProp: ElementPropertyConfig, gridFieldEditorData: any, viewModelId: string) { - // 获取绑定字段对应的表达式 - const bindingFieldId = gridFieldEditorData.binding && gridFieldEditorData.binding.type === FormBindingType.Form && gridFieldEditorData.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 视图模型中[字段更新时机]属性现在要在控件上维护,所以在控件上复制一份属性值 - if (bindingFieldId && !gridFieldEditorData.updateOn && this.dgVMField) { - gridFieldEditorData.updateOn = this.dgVMField.updateOn; - } - - editorProp.properties.unshift( - { - propertyID: 'require', - propertyName: '是否必填', - propertyType: 'unity', - description: '是否必填', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(gridFieldEditorData), - constType: 'enum', - newVariableType: 'Boolean', - newVariablePrefix: 'is', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(gridFieldEditorData, '必填编辑器', 'require'), - exprValue: this.getExprValue(expField, gridFieldEditorData.require) - } - } - } - }, - // { - // propertyID: 'updateOn', - // propertyName: '绑定字段更新时机', - // propertyType: 'select', - // iterator: [ - // { key: 'change', value: '值变化时' }, - // { key: 'blur', value: '控件失去焦点时' } - // ], - // description: '控件绑定字段的更新时机' - // } - ); - } - /** - * 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。 - * @param propertyData 属性值 - * @param viewModelId 视图模型id - * @param showPosition 面板展示位置 - * @param customEvent 输入控件特有的事件配置 - */ - public getEventPropertyConfig(propertyData: any, viewModelId: string, showPosition = 'card', customEvent?: { - customEventList?: { label: string, name: string }[], - setPropertyRelates?: (propertyData) => void - }): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - // 静态事件 - let eventList = []; - if (customEvent && customEvent.customEventList) { - eventList = eventList.concat(customEvent.customEventList); - } - // 动态事件 - eventList = this.switchEvents(propertyData, eventList); - - // 追加值变化、标签超链事件 - this.appendFieldValueChangeEvents(propertyData, eventList); - this.appendLinkLabelClickEvent(propertyData, eventList, showPosition); - - - - const config = { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, this.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data: any, parameters: any) { - delete propertyData[viewModelId]; - if (parameters) { - parameters.setPropertyRelates = this.setPropertyRelates; // 添加自定义方法后,调用此回调方法,用于处理联动属性 - parameters.controlInfo = { type: self.getControlMethodType(propertyData), name: propertyData.title }; // 暂存控件信息,用于自动创建新方法的方法编号和名称 - - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - - if (customEvent && customEvent.setPropertyRelates) { - customEvent.setPropertyRelates(propertyData); - } - - // 联动修改【启用标签超链接】属性 - if (showPosition === 'gridFieldEditor' && self.gridFieldData) { - // 列表列的超链接属性是在GridField上的,不是在editor里,所以这里要单独赋值 - const previousLinkedLabelEnabled = self.gridFieldData.linkedLabelEnabled; - self.gridFieldData.linkedLabelClick = propertyData.linkedLabelClick; - self.gridFieldData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - // 清除editor内的超链属性 - propertyData.linkedLabelClick = null; - propertyData.linkedLabelEnabled = false; - if (!previousLinkedLabelEnabled && self.gridFieldData.linkedLabelEnabled) { - const notifyService = self.injector.get(NotifyService); - notifyService.warning('启用标签超链事件后,列模板失效!'); - } - } else { - propertyData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - } - - - // 同步视图模型值变化事件 - const dgVM = self.dgVMService.getDgViewModel(self.viewModelId); - if (dgVM && self.dgVMField) { - dgVM.changeField(self.dgVMField.id, { valueChanging: propertyData.fieldValueChanging, valueChanged: propertyData.fieldValueChanged }); - } - } - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor' - }); - } - - return config; - } - /** - * 处理交互面板中的动态事件 - * @param propertyData 属性值 - * @param eventList 事件列表 - */ - switchEvents(propertyData: any, eventList: any[]) { - // 根据是否【启用扩展区域】属性判断是否显示【扩展按钮点击事件】 - if (propertyData.enableAppend !== false && propertyData.inputAppendType === 'button') { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'inputAppendClickEvent'); - if (!eventListExist) { - eventList.push( - { - label: 'inputAppendClickEvent', - name: '扩展按钮点击事件' - } - ); - } - } else { - if (eventList.length !== 0) { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'inputAppendClickEvent'); - } - } - - return eventList; - - } - /** - * 将标签超链属性追加到交互面板, - */ - private appendLinkLabelClickEvent(propertyData: any, eventList: any[], showPosition: string) { - // 只有卡片和可编辑列表中有标签超链 - if (showPosition !== 'card' && showPosition !== 'gridFieldEditor') { - return; - } - // 部分控件没有标签 - const controlsWithoutLabel = [DgControl.Avatar.type, DgControl.Image.type]; - if (controlsWithoutLabel.includes(propertyData.type)) { - return; - } - - eventList.push({ - label: 'linkedLabelClick', - name: '标签超链事件' - }); - - // 因为需要将GridField editor内的事件与GridField上超链事件合并起来展示到交互面板中,所以这里先将事件复制到editor里去 - if (showPosition === 'gridFieldEditor' && this.gridFieldData) { - propertyData.linkedLabelClick = this.gridFieldData.linkedLabelClick; - } - - } - /** - * 将字段值变化前事件、变化后事件追加到交互面板 - * 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下 - */ - private appendFieldValueChangeEvents(propertyData: any, eventList: any[]) { - // 若绑定了字段,则需要显示字段变更前后事件 - if (propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field) { - const valueChangingExist = eventList.find(eventListItem => eventListItem.label === 'fieldValueChanging'); - if (!valueChangingExist) { - eventList.push( - { - label: 'fieldValueChanging', - name: '绑定字段值变化前事件' - } - ); - } - const valueChangedExist = eventList.find(eventListItem => eventListItem.label === 'fieldValueChanged'); - if (!valueChangedExist) { - eventList.push( - { - label: 'fieldValueChanged', - name: '绑定字段值变化后事件' - } - ); - } - if (this.dgVMField) { - // 因为字段变更属性是存到VM中的,但是这里需要在控件上编辑,所以复制一份数据 - propertyData.fieldValueChanging = this.dgVMField.valueChanging; - propertyData.fieldValueChanged = this.dgVMField.valueChanged; - } - - - } else { - // 未绑定字段,则移除值变化事件 - eventList = eventList.filter(eventListItem => eventListItem.label !== 'fieldValueChanging' && eventListItem.label !== 'fieldValueChanged'); - } - } - - private getControlMethodType(propertyData: any) { - if (!propertyData.binding) { - return propertyData.type; - } - switch (propertyData.binding.type) { - case FormBindingType.Form: { - return propertyData.binding.path || propertyData.type; - } - case FormBindingType.Variable: { - return propertyData.binding.fullPath || propertyData.type; - } - } - - return propertyData.type; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/nocode-input-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/property/nocode-input-property-config.ts deleted file mode 100644 index b49615bb3274ca8034e5ff1080c71c23e81316da..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/nocode-input-property-config.ts +++ /dev/null @@ -1,1443 +0,0 @@ -import { Injector } from '@angular/core'; -import { ExpressionEditorComponent, ExpressionEditorParam, BindingEditorConverter } from '@farris/designer-devkit'; -import { IDesignerHost } from '@farris/designer-element'; -import { EventEditorService, DataStatesService, DesignViewModelField, DesignViewModelService, DomService, FormBasicService, FormBindingType, FormExpression, FormSchemaEntityField, FormSchemaEntityFieldType$Type, FormVariable, RefreshFormService, SchemaService, UniformEditorDataUtil, WebCmdService } from '@farris/designer-services'; -import { ElementPropertyConfig, PropertyEntity } from '@farris/ide-property-panel'; -// import { CustomWidthEditorComponent, DefaultValueEditorComponent } from '@farris/nocode-designer-plugin'; -import { ColumnWidthSettingComponent } from '@farris/response-layout-editor'; -import { NotifyService } from '@farris/ui-notify'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DgControl } from '../../../../utils/dg-control'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { FormUnifiedColumnLayout } from '../../../container/form/property/editor/form-layout-setting/form-unified-column-layout'; -import { ExpressionProp } from './expression/expression-property-config'; -import { FormResponseLayoutContext, ResponseLayoutEditorService } from './response-layout-editor'; - -export class NoCodeInputProps extends ExpressionProp { - /** 布局配置服务 */ - private responseLayoutService: ResponseLayoutEditorService; - public webCmdService: WebCmdService; - public domService: DomService; - public schemaService: SchemaService; - public dgVMService: DesignViewModelService; - public formBasicService: FormBasicService; - public controlCreatorService: any; - public refreshFormService: RefreshFormService; - public injector: Injector; - public notifyService: NotifyService; - public eventEditorService: EventEditorService; - - public viewModelId: string; - public componentId: string; - - /** 控件绑定的模型字段 */ - private dgVMField: DesignViewModelField; - - - dataStatesService: DataStatesService; - - /** Schema-控件映射类 */ - private schemaDOMMapping: any; - - // 在列表中使用控件,列数据 - gridFieldData: any; - /** 控件绑定的变量 */ - bindingVarible: FormVariable; - - /** 表单字段schema信息,与be保持一致 */ - fieldSchemaConsistentWithBE: FormSchemaEntityField; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost.getService('DomService')); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.domService = serviceHost.getService('DomService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.schemaService = serviceHost.getService('SchemaService'); - this.dgVMService = serviceHost.getService('DesignViewModelService'); - this.schemaDOMMapping = serviceHost.getService('SchemaDOMMapping'); - this.formBasicService = serviceHost.getService('FormBasicService'); - this.controlCreatorService = serviceHost.getService('ControlCreatorService'); - this.refreshFormService = serviceHost.getService('RefreshFormService'); - this.injector = serviceHost.getService('Injector'); - this.notifyService = this.injector.get(NotifyService); - this.viewModelId = viewModelId; - this.componentId = componentId; - } - - /** - * 获取基本信息属性配置 - * @param propertyData - * @param viewModelId - * @param showPosition - * @returns - */ - getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - case 'bindingCode': { - changeObject.needSyncToSchemaField = true; - break; - } - } - - }, - - }; - } - - getBasicCommonPropConfig(propertyData: any): PropertyEntity[] { - const canChangeControlType = this.checkCanChangeControlType(propertyData, this.viewModelId); - let controlTypeList = []; - if (!canChangeControlType) { - controlTypeList = [{ - key: propertyData.type, - value: (DgControl[propertyData.type] && DgControl[propertyData.type].name) || propertyData.type - }]; - } - - if (this.dgVMField) { - // 绑定字段 - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.dgVMField.type.name, this.dgVMField.multiLanguage, 'form', this.formBasicService.envType); - } else if (this.bindingVarible) { - // 绑定变量 - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.bindingVarible.type, false, 'form', this.formBasicService.envType); - } - const isSimpleField = this.dgVMField && this.dgVMField.label && !this.dgVMField.label.includes('_'); - const bindingFieldId = this.dgVMField ? this.dgVMField.id : null; - const isNewField = this.schemaService.addedFieldsByControlBox.includes(bindingFieldId); - return [ - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - readonly: true, - iterator: controlTypeList - }, - { - propertyID: 'binding', - propertyName: '绑定字段', - propertyType: 'string', - visible: false, - readonly: false, - converter: { - convertTo() { - return propertyData.binding.path; - } - } - }, - { - propertyID: 'bindingCode', - propertyName: '绑定字段', - propertyType: 'string', - readonly: !(isSimpleField && isNewField), // 目前只支持拖拽新增的简单字段修改编号。 - // notAllowedChars:[/^[A-Z0-9!@#$%^&*()_+=[\]{};':",./<>?\\|~-].*$/],///^[A-Z0-9!@#$%^&*()_+=\[\]{};':"\\|,.<>/?]+[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>/?]+$/ - defaultValue: propertyData.binding.path, - description: '绑定字段的编号。必须以小写英文字母开头, 并且只能由英文字母、数字组成!' - } - ]; - } - - /** - * 获取输入类控件的通用外观属性 - */ - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * 获取输入类控件的通用外观属性配置 - */ - getAppearanceCommonPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): PropertyEntity[] { - - // 文本、多行文本、数字、日期时间、富文本 - const placeHolderTypes = [ - DgControl.TextBox.type, - DgControl.MultiTextBox.type, - DgControl.NumericBox.type, - DgControl.DateBox.type, - DgControl.RichTextBox.type, - // DgControlType.EnumField, - ]; - - if (showPosition === 'tableTdEditor') { - return [ - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '标签名称', - visible: !propertyData.titleSourceType || propertyData.titleSourceType === 'static' - }, - { - propertyID: 'placeHolder', - propertyName: '占位符', - propertyType: 'string', - description: '占位符文本', - readonly: false, - visible: placeHolderTypes.includes(propertyData.type), - } - ]; - } - - this.responseLayoutService = new ResponseLayoutEditorService(this.domService, this.componentId); - return [ - { - propertyID: 'title', - propertyName: '标签', - propertyType: 'string', - description: '标签名称', - visible: !propertyData.titleSourceType || propertyData.titleSourceType === 'static' - }, - { - propertyID: 'placeHolder', - propertyName: '提示文字', - propertyType: 'string', - visible: placeHolderTypes.includes(propertyData.type), - notAllowedChars: ['\"', '\''] - }, - { - propertyID: 'labelAutoWidth', // f-form-lable-auto - propertyName: '标签长度自适应', - propertyType: 'boolean', - description: '展示完整标签', - defaultValue: false, - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - visible: viewModelId === 'root-viewmodel' - }, - { - propertyID: 'labelAutoOverflow', - propertyName: '标签换行', - defaultValue: false, - propertyType: 'select', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - visible: !propertyData.labelAutoWidth - }, - { - propertyID: 'responseLayout', - propertyName: '布局配置', - propertyType: 'custom', - description: '布局配置设置', - editor: ColumnWidthSettingComponent, - beforeOpenModal: () => this.responseLayoutService.checkCanOpenLayoutEditor(propertyData) - }, - // { - // propertyID: 'col', - // propertyName: '占用宽度(%)', - // propertyType: 'custom', - // editor: CustomWidthEditorComponent, - // beforeOpenModal: () => this.setWidthInitDefaultValue(propertyData, viewModelId) - // }, - { - propertyID: 'enableTitleTips', - propertyName: '启用标签提示', - propertyType: 'boolean', - description: '是否显示标签提示,一般用于前置任务中', - defaultValue: false, - visible: false - }, - { - propertyID: 'titleTipsTemplate', - propertyName: '标签提示内容', - propertyType: 'string', - description: '标签提示内容设置', - }, - { - propertyID: 'autoHeight', - propertyName: '自动高度', - propertyType: 'select', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - visible: [DgControl.MultiTextBox.type].includes(propertyData.type) - } - ]; - } - - /** - * 处理外观类属性的联动 - */ - changeAppearancePropertyRelates(properties: PropertyEntity[], changeObject: FormPropertyChangeObject, propertyData, parameters) { - if (!changeObject) { - return; - } - - switch (changeObject.propertyID) { - case 'title': { - if (propertyData.binding && propertyData.binding.field && propertyData.binding.type === FormBindingType.Form) { - changeObject.needSyncToSchemaField = true; - } - changeObject.needUpdateControlTreeNodeName = true; - - break; - } - case 'responseLayout': { - this.responseLayoutService.responseLayoutConfig = changeObject.propertyValue; - const formNodeId = this.responseLayoutService.changeFormControlsByResponseLayoutConfig(this.componentId); - this.updateUnifiedLayoutAfterResponseLayoutChanged(this.componentId); - - // 局部刷新组件 - if (formNodeId) { - changeObject.needRefreshedComponentId = formNodeId; - } - delete propertyData.responseLayout; - - break; - } - case 'col': { - const classList: Array = (propertyData.appearance.class || '').split(' '); - const newClassList = classList.filter((value, index) => { - return value.indexOf('col-') < 0; - }); - newClassList.push(propertyData.col); - propertyData.appearance.class = newClassList.toString().replace(/,/g, ' '); - break; - } - case 'labelAutoOverflow': { - const labelAutoOverflowClass = ' farris-group-multi-label'; - if (changeObject.propertyValue) { - propertyData.appearance.class = propertyData.appearance.class + labelAutoOverflowClass; - } else { - propertyData.appearance.class = propertyData.appearance.class.replace(labelAutoOverflowClass, ''); - } - break; - } - case 'titleTipsTemplate': { - propertyData.enableTitleTips = !!changeObject.propertyValue; - break; - } - case 'labelAutoWidth': { - const labelAutoWidthClass = ' f-form-lable-auto'; - if (changeObject.propertyValue) { - propertyData.appearance.class = propertyData.appearance.class + labelAutoWidthClass; - } else { - propertyData.appearance.class = propertyData.appearance.class.replace(labelAutoWidthClass, ''); - } - - const titleWidth = properties.find((p: PropertyEntity) => p.propertyID === 'titleWidth'); - if (titleWidth) { - titleWidth.visible = !changeObject.propertyValue; - } - const labelAutoOverflow = properties.find((p: PropertyEntity) => p.propertyID === 'labelAutoOverflow'); - if (labelAutoOverflow) { - labelAutoOverflow.visible = !changeObject.propertyValue; - } - break; - } - } - } - - /** - * 获取输入类控件的通用行为属性 - */ - getBehaviorCommonPropConfig(propertyData: any, viewModelId: string): PropertyEntity[] { - // 只有绑定字段的控件支持表达式,绑定变量的控件不支持表达式 - const bindingFieldId = propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 获取绑定字段schema中的长度属性 - // let fieldLength; - let canModifyLength = false; - let canModifyDefaultValue = false; - let entityTypeCanModifyDefaultValue = false; - let fieldInfo; - // 视图模型中[字段更新时机]属性现在要在控件上维护,所以在控件上复制一份属性值 - if (bindingFieldId) { - if (!this.dgVMField) { - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - this.dgVMField = dgViewModel.fields.find(f => f.id === bindingFieldId); - } - propertyData.updateOn = this.dgVMField.updateOn; - - if (propertyData.binding && propertyData.binding.fullPath && propertyData.binding.fullPath.indexOf('.') > -1) { - fieldInfo = this.schemaService.getFieldByPathAndVMID(propertyData.binding.fullPath.split('.')[0], this.viewModelId); - } else { - fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - } - if (fieldInfo && fieldInfo.schemaField) { - // fieldLength = fieldInfo.schemaField.type.length; - canModifyLength = fieldInfo.schemaField.type.$type === FormSchemaEntityFieldType$Type.StringType; - - this.fieldSchemaConsistentWithBE = this.getFieldSchemaConsistentWithBE(propertyData.binding.field); - // fieldLengthInBE = this.fieldSchemaConsistentWithBE && this.fieldSchemaConsistentWithBE.type.length; - - canModifyDefaultValue = [ - FormSchemaEntityFieldType$Type.StringType, FormSchemaEntityFieldType$Type.NumericType, - FormSchemaEntityFieldType$Type.DateType, FormSchemaEntityFieldType$Type.DateTimeType].includes(fieldInfo.schemaField.type.$type); - entityTypeCanModifyDefaultValue = [ - FormSchemaEntityFieldType$Type.EntityType, - FormSchemaEntityFieldType$Type.ObjectType - ].includes(fieldInfo.schemaField.type.$type); - propertyData.defaultValue = fieldInfo.schemaField.defaultValue; - } - } - - - return [ - // { - // propertyID: 'binding', - // propertyName: '绑定', - // propertyType: 'modal', - // description: '绑定的表单字段', - // editor: BindingEditorComponent, - // editorParams: { viewModelId, componentId: this.componentId, controlType: propertyData.type }, - // converter: new BindingEditorConverter() - // }, - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - constType: 'enum', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '可见编辑器', 'visible'), - exprValue: this.getExprValue(expField, propertyData.visible) - } - } - } - }, - { - propertyID: 'readonly', - propertyName: '只读', - propertyType: 'unity', - description: '是否只读', - editorParams: { - constType: 'enum', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '只读编辑器', 'readonly'), - exprValue: this.getExprValue(expField, propertyData.readonly) - } - } - }, - }, - - { - propertyID: 'require', - propertyName: '必填', - propertyType: 'unity', - description: '是否必填', - editorParams: { - constType: 'enum', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(propertyData, '必填编辑器', 'require'), - exprValue: this.getExprValue(expField, propertyData.require) - } - } - } - }, - // { - // propertyID: 'maxLength', - // propertyName: '长度', - // propertyType: 'number', - // description: '最大长度', - // decimals: 0, - // visible: canModifyLength - // }, - { - propertyID: 'defaultValue', - propertyName: '默认值', - propertyType: 'unity', - description: '绑定字段默认值', - visible: canModifyDefaultValue, - editorParams: { - constType: 'string', - editorOptions: { - types: ['custom', 'expression'], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getDefaultValueExpressionEditorParams(propertyData, viewModelId), - exprValue: this.getDefaultValueExprValue(propertyData, viewModelId) - } - } - } - - }, - // { - // propertyID: 'defaultValue2', - // propertyName: '默认值', - // propertyType: 'custom', - // description: '绑定字段默认值2', - // visible: entityTypeCanModifyDefaultValue, - // editor: DefaultValueEditorComponent, - // beforeOpenModal: () => this.getDefaultValueExprValue2(propertyData, viewModelId) - // } - ]; - } - - /** - * 行为类属性的变更联动方法 - */ - changeBehaviorPropertyRelates( - properties: PropertyEntity[], changeObject: FormPropertyChangeObject, - propertyData: any, parameters, showPosition = 'card') { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'binding': { - this.updateControlDomAfterChangingBinding(propertyData, parameters, this.viewModelId); - break; - } - case 'readonly': case 'visible': case 'require': { - // 属性值从表达式切换为其他类型:需要清空DOM中的表达式配置 - const newValueType = changeObject.propertyValue && changeObject.propertyValue.type; - this.clearExpression(newValueType, propertyData, changeObject.propertyID); - break; - } - case 'updateOn': { - // 字段更新时机 - const dgVM = this.dgVMService.getDgViewModel(this.viewModelId); - if (dgVM && this.dgVMField) { - dgVM.changeField(this.dgVMField.id, { updateOn: changeObject.propertyValue }); - } - // delete propertyData.updateOn; - - break; - } - case 'maxLength': { - this.syncSchemaAfterLengthChanged(changeObject, propertyData); - - break; - } - case 'defaultValue': { - // 默认值同步至schema,在表单保存时同步be vo - if (propertyData.binding && propertyData.binding.field) { - let fieldInfo; - if (propertyData.binding.fullPath && propertyData.binding.fullPath.indexOf('.') > -1) { - fieldInfo = this.schemaService.getFieldByPathAndVMID(propertyData.binding.fullPath.split('.')[0], this.viewModelId); - } else { - fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); - } - if (fieldInfo && fieldInfo.schemaField) { - if (!changeObject.propertyValue || typeof (changeObject.propertyValue) === 'string') { - fieldInfo.schemaField.defaultValue = changeObject.propertyValue || ''; - } else { - fieldInfo.schemaField.defaultValue = { - type: "expression", - value: changeObject.propertyValue.expressionId - }; - } - - } - delete propertyData.defaultValue; - } - break; - } - case 'defaultValue2': { - // 默认值同步至schema,在表单保存时同步be vo - if (propertyData.binding && propertyData.binding.field) { - let fieldInfo; - if (propertyData.binding.fullPath && propertyData.binding.fullPath.indexOf('.') > -1) { - fieldInfo = this.schemaService.getFieldByPathAndVMID(propertyData.binding.fullPath.split('.')[0], this.viewModelId); - } else { - fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); - } - if (fieldInfo && fieldInfo.schemaField) { - if (!changeObject.propertyValue || typeof (changeObject.propertyValue) === 'string') { - fieldInfo.schemaField.defaultValue = changeObject.propertyValue || ''; - } else { - fieldInfo.schemaField.defaultValue = { - type: 'expression', - value: changeObject.propertyValue.expressionId - }; - } - - } - delete propertyData.defaultValue2; - } - break; - } - - } - - } - - - /** - * 根据字段ID获取schema字段信息 - */ - private getFieldSchemaConsistentWithBE(fieldId: string) { - const previousDomJson = this.domService.getPreviousDomJson(); - const entities = previousDomJson.module.schemas[0].entities; - if (!entities || entities.length === 0) { - return; - } - for (const viewModel of this.domService.viewmodels) { - if (viewModel.bindTo === '/' && !viewModel.parent) { - continue; - } - const fields = this.schemaService.getTableFieldsByBindTo(entities, viewModel.bindTo); - if (!fields) { - continue; - } - const result = this.schemaService.getFieldInfoByID(fields, '', fieldId); - if (result && result.schemaField) { - return result.schemaField; - } - } - } - /** - * 修改长度后同步schema - * @param changeObject 变更集 - * @param propertyData 属性值 - */ - private syncSchemaAfterLengthChanged(changeObject: FormPropertyChangeObject, propertyData: any) { - const previousFieldLength = this.fieldSchemaConsistentWithBE && this.fieldSchemaConsistentWithBE.type.length; - let currentFieldLength; - // 当前拖拽新增的字段,be中没有:同步schema - if (!previousFieldLength) { - currentFieldLength = changeObject.propertyValue; - } else { - // be中已有的字段:若将长度大于be长度,则同步;若长度小于be长度,则将schema长度修改为be中的长度 - currentFieldLength = changeObject.propertyValue > previousFieldLength ? changeObject.propertyValue : previousFieldLength; - } - - // 长度同步至schema,在表单保存时同步be vo - if (propertyData.binding && propertyData.binding.field) { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, this.viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - fieldInfo.schemaField.type.length = currentFieldLength; - } - } - - } - - /** - * 修改绑定后要同步变更控件path属性,若是帮助控件还要变更数据源属性并同步viewModel - */ - updateControlDomAfterChangingBinding(propertyData: any, parameters: any, viewModelId: string) { - const selectedData = parameters && parameters.selectedData; - if (!selectedData) { - return; - } - // 变更path属性 - propertyData.path = selectedData.bindingPath; - - // 切换当前dgVMField - this.checkCanChangeControlType(propertyData, viewModelId); - - // 帮助控件变更dataSource.uri属性 - if (propertyData.type === DgControl.LookupEdit.type && propertyData.dataSource && propertyData.dataSource.uri) { - const uri = propertyData.dataSource.uri; - const index = uri.indexOf('.'); - if (index < 0) { - return; - } - - if (propertyData.binding.type === FormBindingType.Form) { - const newUri = uri.slice(0, index) + '.' + selectedData.bindingField; - propertyData.dataSource.uri = newUri; - - // 同步viewModel Field - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(propertyData.binding.field, { editor: { dataSource: propertyData.dataSource } }); - } else { - const newUri = uri.slice(0, index) + '.' + selectedData.code; - propertyData.dataSource.uri = newUri; - } - - } - } - - /** - * 修改控件布局配置后更新Form统一布局配置 - * @param componentId 组件Id - * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型 - */ - private updateUnifiedLayoutAfterResponseLayoutChanged(componentId: string, controlLayoutConfig?: any): FormUnifiedColumnLayout { - const componentNode = this.domService.getComponentById(componentId); - if (!componentNode || !componentNode.componentType || !componentNode.componentType.startsWith('form')) { - return; - } - const formNode = this.domService.selectNode(componentNode, item => item.type === DgControl.Form.type); - if (!formNode || !formNode.unifiedLayout) { - return; - } - - const responseLayoutConfig: FormResponseLayoutContext[] = []; - - this.responseLayoutService.getFormResonseLayoutConfig(formNode, responseLayoutConfig, 1); - - if (controlLayoutConfig) { - const changedControl = responseLayoutConfig.find(c => c.id === controlLayoutConfig.id); - Object.assign(changedControl, controlLayoutConfig); - } - - // 收集每种屏幕下的列数 - const columnInSMArray = responseLayoutConfig.map(config => config.columnInSM); - const columnInMDArray = responseLayoutConfig.map(config => config.columnInMD); - const columnInLGArray = responseLayoutConfig.map(config => config.columnInLG); - const columnInELArray = responseLayoutConfig.map(config => config.columnInEL); - - // 只有每个控件的宽度都一样时,才认为form上有统一宽度,否则认为是自定义的控件宽度,此处传递null - const uniqueColClassInSM = this.checkIsUniqueColumn(columnInSMArray) ? columnInSMArray[0] : null; - const uniqueColClassInMD = this.checkIsUniqueColumn(columnInMDArray) ? columnInMDArray[0] : null; - const uniqueColClassInLG = this.checkIsUniqueColumn(columnInLGArray) ? columnInLGArray[0] : null; - const uniqueColClassInEL = this.checkIsUniqueColumn(columnInELArray) ? columnInELArray[0] : null; - - - Object.assign(formNode.unifiedLayout, { - uniqueColClassInSM, - uniqueColClassInMD, - uniqueColClassInLG, - uniqueColClassInEL - }); - } - /** - * 校验宽度样式值是否一致 - */ - private checkIsUniqueColumn(columnsInScreen: number[]) { - const keySet = new Set(columnsInScreen); - const exclusiveKeys = Array.from(keySet); - - if (exclusiveKeys.length === 1) { - return true; - } - return false; - } - - - /** - * 获取表达式编辑需要的参数:在属性面板弹出表达式窗口时调用 - */ - private getExpressionEditorParams(propertyData: any, modalTitle: string, expressionType: string) { - - let expressionStr = null; - - const bindingFieldId = propertyData.binding && propertyData.binding.field; - - const expressionParams: ExpressionEditorParam = { - modalTitle: modalTitle || '表达式编辑器', - fieldId: bindingFieldId, - viewModelId: this.viewModelId, - expType: expressionType - }; - - // 必填表达式需要配置提示消息 - if (expressionType === 'require') { - expressionParams.message = ''; - } - - - const propertyValue = propertyData[expressionType]; - if (propertyValue && propertyValue.expressionId && bindingFieldId) { - const expField = this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 检测到现有的表达式配置 - if (expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig.value; - - if (expressionType === 'require') { - expressionParams.message = originalExpConfig.message; - } - } - } - - return { - editorParams: expressionParams, - value: expressionStr - }; - } - - /** - * 获取属性编辑器需要的初始绑定值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - private getExprValue(expField: FormExpression, propertyValue: any) { - let expressionStr = null; - if (propertyValue && propertyValue.expressionId && expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig && originalExpConfig.value; - - } - - return { - type: 'expression', - value: { - value: expressionStr, - parameters: propertyValue && propertyValue.expressionId, - type: 'Expression' - } - }; - } - - /** - * 获取默认值表达式编辑需要的参数:在属性面板弹出表达式窗口时调用 - */ - private getDefaultValueExpressionEditorParams(propertyData: any, viewModelId: string) { - - const expressionParams: ExpressionEditorParam = { - modalTitle: '默认值编辑器', - fieldId: propertyData.binding && propertyData.binding.field, - viewModelId: null, - expType: 'defaultValue', - hideFieldSchema: true - }; - - let defaultValue = null; - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo) { - defaultValue = fieldInfo.schemaField.defaultValue; - } - - // 组装成多值属性编辑器要求的格式 - - if (typeof (defaultValue) === 'string') { - return { - editorParams: expressionParams, - value: null - } - } else { - return { - editorParams: expressionParams, - value: defaultValue.value - } - } - - - } - /** - * 获取属性编辑器需要的初始绑定值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - private getDefaultValueExprValue(propertyData: any, viewModelId: string) { - let defaultValue = null; - let fieldInfo = null; - if (propertyData.binding.fullPath && propertyData.binding.fullPath.indexOf('.') > -1) { - fieldInfo = this.schemaService.getFieldByPathAndVMID(propertyData.binding.fullPath.split('.')[0], this.viewModelId); - } else { - fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - } - if (fieldInfo) { - defaultValue = fieldInfo.schemaField.defaultValue; - } - - // 组装成多值属性编辑器要求的格式 - if (!defaultValue || typeof (defaultValue) === 'string') { - return { - type: 'expression', - value: { - value: null, - type: 'Expression' - } - } - - } else { - return { - type: 'expression', - value: { - value: defaultValue.value, - type: 'Expression' - } - } - } - - } - - /** - * 获取属性编辑器需要的初始绑定值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - private getDefaultValueExprValue2(propertyData: any, viewModelId: string) { - let defaultValue = null; - let fieldInfo = null; - if (propertyData.binding.fullPath && propertyData.binding.fullPath.indexOf('.') > -1) { - fieldInfo = this.schemaService.getFieldByPathAndVMID(propertyData.binding.fullPath.split('.')[0], this.viewModelId); - } else { - fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - } - if (fieldInfo) { - defaultValue = fieldInfo.schemaField.defaultValue; - } - - //组装成多值属性编辑器要求的格式 - let returnValue = { - result: true, - parameters: { - type: propertyData.type, - multiSelect: propertyData.multiSelect, - value: defaultValue - } - } - if (propertyData.type == DgControl.AdminOrganizationSelector.type) { - returnValue.parameters['onlyDisplayCompany'] = propertyData.hasOwnProperty('onlyDisplayCompany') ? propertyData.onlyDisplayCompany : false; - } - return returnValue; - } - - /** - * 校验控件是否支持切换类型 - * @param control 控件 - */ - private checkCanChangeControlType(propertyData: any, viewModelId: string): boolean { - if (!propertyData.binding) { - return false; - } - // 没有绑定信息的控件 - if (!propertyData.binding) { - return false; - } - - // 不可编辑的列表、树列不能切换类型 - if (propertyData.type === DgControl.TreeGridField.type || (propertyData.type === DgControl.GridField.type && !propertyData.editor)) { - return false; - } - if (propertyData.binding.type === 'Variable') { - this.bindingVarible = this.domService.getVariableById(propertyData.binding.field); - // vm中已移除的变量 - if (!this.bindingVarible) { - return false; - } - - } else { - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - this.dgVMField = dgViewModel.fields.find(f => f.id === propertyData.binding.field); - - // schema中已移除的字段 - if (!this.dgVMField) { - return false; - } - - } - return true; - - } - - /** - * 清除原表达式 - */ - clearExpression(newValueType: string, propertyData: any, propertyID: string) { - if (newValueType !== 'Expression' && this.domService.expressions) { - const bindingFieldId = propertyData.binding && propertyData.binding.field; - const exp = this.domService.expressions.find(e => e.fieldId === bindingFieldId); - if (!exp || !exp.expression) { - return; - } - exp.expression = exp.expression.filter(e => e.type !== propertyID); - } - - } - /** - * 卡片控件:切换控件类型后事件 - * @param propertyData 控件DOM属性 - * @param newControlType 新控件类型 - */ - changeControlType(propertyData, newControlType: string) { - // 1、定位控件父容器 - const cmp = this.domService.getComponentById(this.componentId); - const parentContainer = this.getControlParentContainer(propertyData.id, cmp); - if (!parentContainer) { - return; - } - const index = parentContainer.contents.findIndex(c => c.id === propertyData.id); - const oldControl = parentContainer.contents[index]; - - let newControl; - // 绑定字段 - if (this.dgVMField) { - // ①、记录viewModel 变更---全量替换editor - const dgViewModel = this.dgVMService.getDgViewModel(this.viewModelId); - dgViewModel.changeField(this.dgVMField.id, { - editor: { - $type: newControlType - }, - name: this.dgVMField.name, - require: this.dgVMField.require, - readonly: this.dgVMField.readonly - }, false); - // ② 创建新控件 - newControl = this.controlCreatorService.createControlBySchemaFeild(this.dgVMField, cmp.componentType); - } else { - // 绑定变量 - // ① 记录viewModel 变更---全量替换editor - const vmVariable = this.domService.getViewModelFieldById(this.viewModelId, this.bindingVarible.id); - Object.assign(vmVariable, { - editor: { - $type: newControlType - } - }); - // ② 创建新控件 - newControl = this.controlCreatorService.createControlByVariable(this.bindingVarible, cmp.componentType, newControlType, this.componentId); - } - - - // 保留原id和isRTControl、样式等属性 - Object.assign(newControl, { - id: oldControl.id, - isRTControl: !!oldControl.isRTControl, - appearance: oldControl.appearance, - size: oldControl.size, - titleSourceType: oldControl.titleSourceType, - title: oldControl.title, - titleDataSource: oldControl.titleDataSource, - titleWidth: oldControl.titleWidth, - labelAutoWidth: oldControl.labelAutoWidth, - labelAutoOverflow: oldControl.labelAutoOverflow, - enableTitleTips: oldControl.enableTitleTips, - titleTipsTemplate: oldControl.titleTipsTemplate, - isTextArea: newControl.isTextArea && oldControl.isTextArea, - placeHolder: oldControl.placeHolder, - holdPlace: oldControl.holdPlace, - readonly: oldControl.readonly, - require: oldControl.require, - visible: oldControl.visible - }); - - // 4、替换控件 - parentContainer.contents.splice(index, 1, newControl); - - // 5、触发父容器刷新 - this.refreshFormService.refreshFormDesigner.next(parentContainer.id); - - return parentContainer.id; - - } - - /** - * 获取控件:以contents为节点进行定位 - * @param controlId 控件ID - * @param domJson 容器 - */ - private getControlParentContainer(controlId: string, domJson: any) { - let container; - if (!domJson || !domJson.contents || domJson.contents.length === 0) { - return null; - } - - for (const content of domJson.contents) { - if (content.id === controlId) { - container = domJson; - return domJson; - } - container = this.getControlParentContainer(controlId, content); - if (container) { - return container; - } - } - } - - - /** - * 列编辑器类型切换属性 - */ - getGridFieldEditorTypePropertyConfig(gridFieldData: any, viewModelId: string) { - const self = this; - const propertyData = gridFieldData.editor; - this.gridFieldData = gridFieldData; - let config: ElementPropertyConfig; - - const canChangeControlType = this.checkCanChangeControlType(propertyData, viewModelId); - - if (canChangeControlType) { - let controlTypeList = []; - // tslint:disable-next-line:max-line-length - controlTypeList = this.schemaDOMMapping.getEditorTypesByMDataType(this.dgVMField.type.name, this.dgVMField.multiLanguage, 'dataGrid', this.formBasicService.envType); - config = { - categoryId: 'gridFieldEditor_editorType', - categoryName: '编辑器类型', - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: 'gridFieldEditor', - tabName: '编辑器', - properties: [ - { - propertyID: 'type', - propertyName: '编辑器类型', - propertyType: 'select', - readonly: !canChangeControlType, - iterator: controlTypeList, - refreshPanelAfterChanged: true - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - switch (changeObject && changeObject.propertyID) { - case 'type': { - self.changeGridFieldEditorType(changeObject.propertyValue, viewModelId); - break; - } - } - } - }; - - } - return config; - } - /** - * datagrid field:列编辑器类型切换后事件 - * @param newControlType 新控件类型 - * @param viewModelId 视图模型ID - */ - changeGridFieldEditorType(newControlType: string, viewModelId: string) { - - // 1、记录viewModel 变更---全量替换editor - const dgViewModel = this.dgVMService.getDgViewModel(viewModelId); - dgViewModel.changeField(this.dgVMField.id, { - editor: { - $type: newControlType - }, - name: this.dgVMField.name, - require: this.dgVMField.require, - readonly: this.dgVMField.readonly - }, false); - - - // 2、定位列表 - const cmp = this.domService.getComponentByVMId(viewModelId); - const grid = this.domService.selectNode(cmp, item => item.type === DgControl.DataGrid.type || item.type === DgControl.TreeGrid.type); - - if (!grid) { - return; - } - // 3、创建新列 - const editable = grid.fieldEditable; - const dataField = this.dgVMField.bindingPath; - const gridFieldType = grid.type === DgControl.DataGrid.type ? DgControl.GridField.type : DgControl.TreeGridField.type; - - const newField = this.controlCreatorService.createGridFieldBySchemaFeild(this.dgVMField, dataField, editable, - gridFieldType, grid.controlSource); - - // 4、替换列编辑器 - const index = grid.fields.findIndex(c => c.id === this.gridFieldData.id); - if (index > -1 && grid.fields[index].editor) { - grid.fields[index].editor = Object.assign(newField.editor, { - id: grid.fields[index].editor.id, - isRTControl: !!grid.fields[index].editor.isRTControl, - title: grid.fields[index].editor.title - }); - } - - - } - - /** - * 追加列编辑器内的必填、字段更新时机属性 - * @param editorProp 列编辑器属性分类 - * @param gridFieldEditorData 列编辑器数据 - * @param viewModelId viewModelId - */ - appendBehaviorPropsForGridFieldEditor(editorProp: ElementPropertyConfig, gridFieldEditorData: any, viewModelId: string) { - // 获取绑定字段对应的表达式 - const bindingFieldId = gridFieldEditorData.binding && gridFieldEditorData.binding.type === FormBindingType.Form && gridFieldEditorData.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 视图模型中[字段更新时机]属性现在要在控件上维护,所以在控件上复制一份属性值 - if (bindingFieldId && !gridFieldEditorData.updateOn && this.dgVMField) { - gridFieldEditorData.updateOn = this.dgVMField.updateOn; - } - - editorProp.properties.unshift( - { - propertyID: 'require', - propertyName: '是否必填', - propertyType: 'unity', - description: '是否必填', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(gridFieldEditorData), - constType: 'enum', - newVariableType: 'Boolean', - newVariablePrefix: 'is', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getExpressionEditorParams(gridFieldEditorData, '必填编辑器', 'require'), - exprValue: this.getExprValue(expField, gridFieldEditorData.require) - } - } - } - }, - // { - // propertyID: 'updateOn', - // propertyName: '绑定字段更新时机', - // propertyType: 'select', - // iterator: [ - // { key: 'change', value: '值变化时' }, - // { key: 'blur', value: '控件失去焦点时' } - // ], - // description: '控件绑定字段的更新时机' - // } - ); - } - - /** - * 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。 - * @param propertyData 属性值 - * @param viewModelId 视图模型id - * @param showPosition 面板展示位置 - * @param customEvent 输入控件特有的事件配置 - */ - public getEventPropertyConfig(propertyData: any, viewModelId: string, showPosition = 'card', customEvent?: { - customEventList?: { label: string, name: string }[], - setPropertyRelates?: (propertyData) => void - }): ElementPropertyConfig { - const self = this; - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - - // 静态事件 - let eventList = []; - if (customEvent && customEvent.customEventList) { - eventList = eventList.concat(customEvent.customEventList); - } - // 动态事件 - eventList = this.switchEvents(propertyData, eventList); - - // 追加值变化、标签超链事件 - this.appendFieldValueChangeEvents(propertyData, eventList); - this.appendLinkLabelClickEvent(propertyData, eventList, showPosition); - - - - const config = { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, this.switchEvents), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data: any, parameters: any) { - delete propertyData[viewModelId]; - if (parameters) { - parameters.setPropertyRelates = this.setPropertyRelates; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, parameters['events'], parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, parameters['events'], self.switchEvents); - } - - if (customEvent && customEvent.setPropertyRelates) { - customEvent.setPropertyRelates(propertyData); - } - - // 联动修改【启用标签超链接】属性 - if (showPosition === 'gridFieldEditor' && self.gridFieldData) { - // 列表列的超链接属性是在GridField上的,不是在editor里,所以这里要单独赋值 - self.gridFieldData.linkedLabelClick = propertyData.linkedLabelClick; - self.gridFieldData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - // 清除editor内的超链属性 - propertyData.linkedLabelClick = null; - propertyData.linkedLabelEnabled = false; - } else { - propertyData.linkedLabelEnabled = !!propertyData.linkedLabelClick; - } - - - // 同步视图模型值变化事件 - const dgVM = self.dgVMService.getDgViewModel(self.viewModelId); - if (dgVM && self.dgVMField) { - dgVM.changeField(self.dgVMField.id, { valueChanging: propertyData.fieldValueChanging, valueChanged: propertyData.fieldValueChanged }); - } - } - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor' - }); - } - - return config; - } - - /** - * 处理交互面板中的动态事件 - * @param propertyData 属性值 - * @param eventList 事件列表 - */ - switchEvents(propertyData: any, eventList: any[]) { - // 根据是否【启用扩展区域】属性判断是否显示【扩展按钮点击事件】 - if (propertyData.enableAppend !== false && propertyData.inputAppendType === 'button') { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'inputAppendClickEvent'); - if (!eventListExist) { - eventList.push( - { - label: 'inputAppendClickEvent', - name: '扩展按钮点击事件' - } - ); - } - } else { - if (eventList.length !== 0) { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'inputAppendClickEvent'); - } - } - - return eventList; - - } - /** - * 将标签超链属性追加到交互面板, - */ - private appendLinkLabelClickEvent(propertyData: any, eventList: any[], showPosition: string) { - // 只有卡片和可编辑列表中有标签超链 - if (showPosition !== 'card' && showPosition !== 'gridFieldEditor') { - return; - } - // 部分控件没有标签 - const controlsWithoutLabel = [DgControl.Avatar.type, DgControl.Image.type]; - if (controlsWithoutLabel.includes(propertyData.type)) { - return; - } - - eventList.push({ - label: 'linkedLabelClick', - name: '标签超链事件' - }); - - // 因为需要将GridField editor内的事件与GridField上超链事件合并起来展示到交互面板中,所以这里先将事件复制到editor里去 - if (showPosition === 'gridFieldEditor' && this.gridFieldData) { - propertyData.linkedLabelClick = this.gridFieldData.linkedLabelClick; - } - - } - /** - * 将字段值变化前事件、变化后事件追加到交互面板 - * 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下 - */ - private appendFieldValueChangeEvents(propertyData: any, eventList: any[]) { - // 若绑定了字段,则需要显示字段变更前后事件 - if (propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field) { - const valueChangingExist = eventList.find(eventListItem => eventListItem.label === 'fieldValueChanging'); - if (!valueChangingExist) { - eventList.push( - { - label: 'fieldValueChanging', - name: '绑定字段值变化前事件' - } - ); - } - const valueChangedExist = eventList.find(eventListItem => eventListItem.label === 'fieldValueChanged'); - if (!valueChangedExist) { - eventList.push( - { - label: 'fieldValueChanged', - name: '绑定字段值变化后事件' - } - ); - } - if (this.dgVMField) { - // 因为字段变更属性是存到VM中的,但是这里需要在控件上编辑,所以复制一份数据 - propertyData.fieldValueChanging = this.dgVMField.valueChanging; - propertyData.fieldValueChanged = this.dgVMField.valueChanged; - } - - - } else { - // 未绑定字段,则移除值变化事件 - eventList = eventList.filter(eventListItem => eventListItem.label !== 'fieldValueChanging' && eventListItem.label !== 'fieldValueChanged'); - } - } - - /** - * 获取自定义宽度控件设置初始默认值 - * @param propertyData 属性值 - * @param viewModelId 视图模型id - */ - setWidthInitDefaultValue(propertyData: any, viewModelId: string) { - const iterator = [ - { value: '25', label: 'col-3' }, - { value: '33', label: 'col-4' }, - { value: '50', label: 'col-6' }, - { value: '75', label: 'col-9' }, - { value: '100', label: 'col-12' } - ]; - const result = { - result: true, - parameters: { - customOptions: iterator, - defaultValue: '' - } - }; - if (propertyData.appearance.class) { - let styleClass = propertyData.appearance.class.split(' '); - for (let i in styleClass) { - switch (styleClass[i]) { - case 'col-md-3': case 'col-md-4': - case 'col-md-6': case 'col-md-9': - case 'col-md-12': { - propertyData.col = '1'; - } - } - }; - } - const value = propertyData.col; - result.parameters.defaultValue = value ? value : 'col-6'; - return result; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/response-layout-editor.ts b/packages/designer/projects/designer-ui/src/lib/components/input/common/property/response-layout-editor.ts deleted file mode 100644 index b77b98914385c46c378bb0c21a90b0800e861d99..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/common/property/response-layout-editor.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { BeforeOpenModalResult } from '@farris/ide-property-panel'; -import { DgControl } from '../../../../utils/dg-control'; - -/** - * 响应式布局服务类 - */ -export class ResponseLayoutEditorService { - componentId: string; - - constructor(private domService: any, componentId: string) { - this.componentId = componentId; - } - - /** 布局配置参数 */ - responseLayoutConfig: FormResponseLayoutContext[]; - - /** 控件 */ - originalControlMap = new Map(); - - /** 当前组件内的form节点 */ - formNode: any; - - /** 记录当前选中控件id */ - currentControlId: string; - - /** 记录当前选中控件所在的区域id */ - defaultGroupNumber: number; - - /** - * 遍历控件所属Form下所有的控件,检测是否能弹出布局配置窗口,并收集配置参数 - * @param propertyData 控件属性值 - */ - checkCanOpenLayoutEditor(propertyData: any): BeforeOpenModalResult { - - const componentNode = this.domService.domDgMap.get(this.componentId); - if (!componentNode || !componentNode.componentType || !componentNode.componentType.startsWith('form-col-')) { - return { result: false, message: '只在卡片类组件中启用布局配置' }; - } - - this.formNode = this.domService.selectNode(componentNode, item => item.type === DgControl.Form.type); - if (!this.formNode || !this.formNode.contents || this.formNode.contents.length === 0) { - return { result: false, message: 'Form区域内没有控件,请先添加控件' }; - } - this.currentControlId = propertyData.id; - - this.responseLayoutConfig = []; - this.originalControlMap.clear(); - const firstGroup = this.formNode.contents[0].type === DgControl.FieldSet.type ? 0 : 1; - this.getFormResonseLayoutConfig(this.formNode, this.responseLayoutConfig, firstGroup); - - - const hasInvalidControl = this.responseLayoutConfig.find(config => !config.isSupportedClass); - - const responseParam: FormResponseLayoutParam = { - defaultState: { - defaultGroupNumber: this.defaultGroupNumber || 1, - model: hasInvalidControl ? 'customize' : 'standard' - }, - importData: this.responseLayoutConfig - }; - - return { - result: true, - parameters: responseParam - }; - - } - - checkIsInFormComponent() { - const componentNode = this.domService.domDgMap.get(this.componentId); - if (!componentNode || !componentNode.componentType || !componentNode.componentType.startsWith('form-col-')) { - return false; - } - return true; - } - // tslint:disable-next-line:max-line-length - getFormResonseLayoutConfig(propertyData: any, responseLayoutConfig: FormResponseLayoutContext[], group: number, isFieldSet = false) { - // 前一个控件是否为分组控件,用于计算group值 - let isLastControlFieldSet = false; - - propertyData.contents.forEach(control => { - if (control.type === DgControl.FieldSet.type) { - - group = group + 1; - this.getFormResonseLayoutConfig(control, responseLayoutConfig, group, true); - isLastControlFieldSet = true; - return; - } - if (isLastControlFieldSet) { - group = group + 1; - isLastControlFieldSet = false; - } - const controlClass = control.appearance && control.appearance.class; - const formResponseLayoutContext = new FormResponseLayoutContext(); - if (!controlClass) { - formResponseLayoutContext.isSupportedClass = false; - - } else { - this.resovleResponseContext(controlClass, formResponseLayoutContext); - } - formResponseLayoutContext.label = control.title || control.id; - formResponseLayoutContext.id = control.id; - formResponseLayoutContext.group = group; - - if (isFieldSet) { - formResponseLayoutContext.fieldSetId = propertyData.id; - } - - if (this.currentControlId === control.id) { - this.defaultGroupNumber = group; - } - this.originalControlMap.set(control.id, control); - responseLayoutConfig.push(formResponseLayoutContext); - }); - } - /** - * 按照控件class样式,组装列编辑器需要的参数。 - * 标准的模板样式为col-12 col-md-6 col-xl-3 col-el-2 - * @param controlClass 控件class样式 - * @param formResponseLayoutContext 响应式布局参数实体 - */ - private resovleResponseContext(controlClass: string, formResponseLayoutContext: FormResponseLayoutContext) { - - const controlClassArray = controlClass.split(' '); - const colClassItems = controlClassArray.filter(classItem => classItem.startsWith('col-')); - - // 没有写任何col-xx 的样式,不支持配置布局 - if (colClassItems.length === 0) { - formResponseLayoutContext.isSupportedClass = false; - return; - } - let colClass = colClassItems.find(item => /^col-([1-9]|10|11|12)$/.test(item)); - let colMDClass = colClassItems.find(item => /^col-md-([1-9]|10|11|12)$/.test(item)); - let colXLClass = colClassItems.find(item => /^col-xl-([1-9]|10|11|12)$/.test(item)); - let colELClass = colClassItems.find(item => /^col-el-([1-9]|10|11|12)$/.test(item)); - - // 小屏幕:列数只支持1 - colClass = colClass || 'col-12'; - formResponseLayoutContext.columnInSM = parseInt(colClass.replace('col-', ''), 10); - formResponseLayoutContext.displayWidthInSM = formResponseLayoutContext.columnInSM / 12; - if (formResponseLayoutContext.displayWidthInSM !== 1) { - formResponseLayoutContext.isSupportedClass = false; - } - - // 中等屏幕,列数支持1,2 - colMDClass = colMDClass || 'col-md-' + formResponseLayoutContext.columnInSM; - formResponseLayoutContext.columnInMD = parseInt(colMDClass.replace('col-md-', ''), 10); - formResponseLayoutContext.displayWidthInMD = formResponseLayoutContext.columnInMD / 6; - if (![1, 2].includes(formResponseLayoutContext.displayWidthInMD)) { - formResponseLayoutContext.isSupportedClass = false; - } - - // 大屏幕,列数支持1,2, 3, 4 - colXLClass = colXLClass || 'col-xl-' + formResponseLayoutContext.columnInMD; - formResponseLayoutContext.columnInLG = parseInt(colXLClass.replace('col-xl-', ''), 10); - formResponseLayoutContext.displayWidthInLG = formResponseLayoutContext.columnInLG / 3; - if (![1, 2, 3, 4].includes(formResponseLayoutContext.displayWidthInLG)) { - formResponseLayoutContext.isSupportedClass = false; - } - - // 超大等屏幕,列数支持1,2, 3, 4, 5, 6 - colELClass = colELClass || 'col-el-' + formResponseLayoutContext.columnInLG; - formResponseLayoutContext.columnInEL = parseInt(colELClass.replace('col-el-', ''), 10); - formResponseLayoutContext.displayWidthInEL = formResponseLayoutContext.columnInEL / 2; - if (![1, 2, 3, 4, 5, 6].includes(formResponseLayoutContext.displayWidthInEL)) { - formResponseLayoutContext.isSupportedClass = false; - } - } - - /** - * 按照列编辑器返回的配置修改控件class和顺序,并触发页面刷新 - * (针对带有分组的卡片,编辑器只支持控件在原分组下进行拖动,所以这里的处理相对简单,不涉及viewModel的修改) - * @param componentId 控件所在组件ID - */ - changeFormControlsByResponseLayoutConfig(componentId: string) { - const componentNode = this.domService.domDgMap.get(componentId); - const formNode = this.domService.selectNode(componentNode, item => item.type === DgControl.Form.type); - - const newFormContents = []; - this.responseLayoutConfig.forEach(config => { - // 原控件节点 - const controlNode = this.originalControlMap.get(config.id); - const controlClass = controlNode.appearance && controlNode.appearance.class; - - if (controlClass) { - const controlClassArray = controlClass.split(' '); - const otherClassItems = controlClassArray.filter(classItem => !classItem.startsWith('col-')); - - const colClass = 'col-' + config.columnInSM; - const colMDClass = 'col-md-' + config.columnInMD; - const colXLClass = 'col-xl-' + config.columnInLG; - const colELClass = 'col-el-' + config.columnInEL; - - const newClassItems = [colClass, colMDClass, colXLClass, colELClass].concat(otherClassItems); - controlNode.appearance.class = newClassItems.join(' '); - } - - if (config.fieldSetId) { - // 分组节点 - const originFieldSetNode = formNode.contents.find(c => c.id === config.fieldSetId); - const newFieldSetNode = newFormContents.find(c => c.id === config.fieldSetId); - if (!newFieldSetNode) { - newFormContents.push(originFieldSetNode); - originFieldSetNode.contents = [controlNode]; - } else { - newFieldSetNode.contents.push(controlNode); - } - } else { - // 未分组节点 - newFormContents.push(controlNode); - } - - }); - - formNode.contents = newFormContents; - return formNode.id; - - // this.formServ.refreshFormDesigner.next(); - } -} - - - -/** - * 响应式布局参数实体。 - * 默认按照小屏sm、中等md、大屏lg、超大屏el 划分屏幕大小 - * ux约定:小屏上显示1列(每个控件占12栅格),中屏显示2列(每个控件占6栅格),大屏显示4列(每个控件占3栅格),超大屏显示6列(每个控件占2栅格), - */ -export class FormResponseLayoutContext { - - /** 控件标题 */ - public label: string; - - /** 控件id */ - public id: string; - - /** 每个控件占用的栅格数 */ - public columnInSM = 12; - public columnInMD = 6; - public columnInLG = 3; - public columnInEL = 2; - - - /** 每个控件占用的列数 */ - public displayWidthInSM = 1; - public displayWidthInMD = 1; - public displayWidthInLG = 1; - public displayWidthInEL = 1; - - /** 编辑器内部默认显示的屏幕大小-----可以去掉 */ - public displayColumnCountAtBreakPoint = 'md'; - - /** 控件所在行,传0即可-----编辑器内部使用 */ - public tagRow = 0; - - /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */ - public showTopBorder = 0; - - /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */ - public group: number; - - /** 控件是否符合标准的class配置(设计器用的) */ - public isSupportedClass = true; - - /** 控件所在分组id(设计器用的) */ - public fieldSetId: string; - -} - -class FormResponseLayoutParam { - defaultState: { - /** 当前控件所在的区域 */ - defaultGroupNumber: number; - - /** 控件是否符合标准的class配置。只要当前卡片中有一个控件样式不符合标准,那么所有控件的model属性都是customize */ - model: 'standard' | 'customize'; - }; - importData: FormResponseLayoutContext[]; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/component/fd-date-box.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/component/fd-date-box.ts deleted file mode 100644 index 73845a1cf1d8eb441ada9a92f5fd83499182f0e8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/component/fd-date-box.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { DateBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { DateBoxProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeDateBoxProp } from '../property/nocode-property-config'; - -export default class FdDateBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return DateBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('DateBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeDateBoxProp = new NoCodeDateBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: DateBoxProp = new DateBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/export.ts deleted file mode 100644 index afe60efb4a5fe5131e6b9bda4b6d70ed1b491a41..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdDateBoxComponent from './component/fd-date-box'; -import { DateBoxSchema } from './schema/schema'; - -import FdDateBoxTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const DateBox: ComponentExportEntity = { - type: 'DateBox', - component: FdDateBoxComponent, - template: FdDateBoxTemplates, - metadata: cloneDeep(DateBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/date-format.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/date-format.ts deleted file mode 100644 index ed14248e6ee662c3fc608fd7c5f0d69eb3526383..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/date-format.ts +++ /dev/null @@ -1,42 +0,0 @@ - - -export const DATE_FORMATS = { - - timeFormats: [ - { key: 'yyyy-MM-dd HH:mm:ss', value: 'yyyy-MM-dd HH:mm:ss' }, - { key: 'yyyy/MM/dd HH:mm:ss', value: 'yyyy/MM/dd HH:mm:ss' }, - { key: 'yyyy年MM月dd日 HH时mm分ss秒', value: 'yyyy年MM月dd日 HH时mm分ss秒' }, - { key: 'yyyyMMddHHmmss', value: 'yyyyMMddHHmmss' }, - { key: 'yyyy-MM-dd HH:mm', value: 'yyyy-MM-dd HH:mm' }, - { key: 'yyyy/MM/dd HH:mm', value: 'yyyy/MM/dd HH:mm' }, - { key: 'yyyy年MM月dd日 HH时mm分', value: 'yyyy年MM月dd日 HH时mm分' }, - { key: 'yyyyMMddHHmm', value: 'yyyyMMddHHmm' } - ], - - yMdFormats: [ - { key: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, - { key: 'yyyy年MM月dd日', value: 'yyyy年MM月dd日' }, - { key: 'yyyy/MM/dd', value: 'yyyy/MM/dd' }, - { key: 'yyyyMMdd', value: 'yyyyMMdd' }, - { key: 'MM/dd/yyyy', value: 'MM/dd/yyyy' } - ], - - yMFormats: [ - { key: 'yyyy年MM月', value: 'yyyy年MM月' }, - { key: 'yyyy-MM', value: 'yyyy-MM' }, - { key: 'yyyy/MM', value: 'yyyy/MM' }, - { key: 'yyyyMM', value: 'yyyyMM' } - ], - - mdFormats: [ - { key: 'MM/dd', value: 'MM/dd' }, - { key: 'MM月dd日', value: 'MM月dd日' }, - { key: 'MMdd', value: 'MMdd' }, - { key: 'MM-dd', value: 'MM-dd' } - ], - - yFormats: [ - { key: 'yyyy', value: 'yyyy' }, - { key: 'yyyy年', value: 'yyyy年' } - ] -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/nocode-property-config.ts deleted file mode 100644 index 3312f0aa58ddfcb5f62aeb07ba4ccfead2e73466..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/nocode-property-config.ts +++ /dev/null @@ -1,487 +0,0 @@ -import { BindingCustomEditorComponent, BindingCustomEditorConverter, BindingCustomType } from '@farris/designer-devkit'; -import { BeforeOpenModalResult, ElementPropertyConfig, KeyMap, PropertyEntity } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -import { DATE_FORMATS } from './date-format'; - -export class NoCodeDateBoxProp extends NoCodeInputProps { - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const dateBoxAppearanceProps = this.getDateBoxAppearanceProps(propertyData); - appearanceProperties = appearanceProperties.concat(dateBoxAppearanceProps); - - appearanceProperties.concat([ - { - propertyID: 'viewType', - propertyName: '展示类型', - propertyType: 'select', - defaultValue: 'switch', - iterator: [ - { key: 'switch', value: '日期/时间切换' }, - { key: 'together', value: '日期|时间' } - ], - controlSource: 'Farris', - visible: true - }, - { - propertyID: 'viewType', - propertyName: '显示模式', - propertyType: 'select', - visible: propertyData.showTime, - iterator: [ - { key: 'together', value: '并排显示' }, - { key: 'switch', value: '切换显示' }, - ] - } - ]) - - - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getDateBoxAppearanceProps(propertyData: any) { - const controlSource = propertyData.controlSource; - return [ - { - propertyID: 'dateFormat', - propertyName: '日期格式化', - propertyType: 'select', - description: '日期格式化方式选择', - controlSource: 'Farris', - visible: controlSource === 'Farris', - iterator: this.getDateFormatIteratror(propertyData) - } - ]; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const controlSource = propertyData.controlSource; - - let behaviorProperties: PropertyEntity[] = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'modal', - editor: BindingCustomEditorComponent, - editorParams: { - modalTitle: '最大值编辑器', - viewModelId, - customType: propertyData.showTime ? BindingCustomType.datetime : BindingCustomType.date, - minDate: propertyData.minValue && typeof propertyData.minValue === 'string' ? propertyData.minValue : undefined - }, - converter: new BindingCustomEditorConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取参数最新值:最小值为固定日期时才进行限制 - this.editorParams.minDate = propertyData.minValue && typeof propertyData.minValue === 'string' ? propertyData.minValue : undefined; - return { result: true, message: '' }; - } - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'modal', - editor: BindingCustomEditorComponent, - editorParams: { - modalTitle: '最小值编辑器', - viewModelId, - customType: propertyData.showTime ? BindingCustomType.datetime : BindingCustomType.date, - maxDate: propertyData.maxValue && typeof propertyData.maxValue === 'string' ? propertyData.maxValue : undefined - }, - converter: new BindingCustomEditorConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取参数最新值 - - this.editorParams.maxDate = propertyData.maxValue && typeof propertyData.maxValue === 'string' ? propertyData.maxValue : undefined; - return { result: true, message: '' }; - } - }, - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'select', - description: '日期格式选择', - iterator: [ - { key: '\'yyyy-MM-dd\'', value: 'yyyy-MM-dd' }, - { key: '\'yyyy/MM/dd\'', value: 'yyyy/MM/dd' }, - { key: '\'yyyy年MM月dd日\'', value: 'yyyy年MM月dd日' }], - controlSource: 'Kendo', - visible: controlSource === 'Kendo' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'editType': { - const dialogWidth = this.properties.find(p => p.propertyID === 'dialogWidth'); - if (dialogWidth) { - dialogWidth.visible = changeObject.propertyValue === 'dialog'; - } - const dialogHeight = this.properties.find(p => p.propertyID === 'dialogHeight'); - if (dialogHeight) { - dialogHeight.visible = changeObject.propertyValue === 'dialog'; - } - break; - } - case 'dateRange': { - const delimiterProp = this.properties.find(p => p.propertyID === 'dateRangeDatesDelimiter'); - if (delimiterProp) { - delimiterProp.visible = changeObject.propertyValue; - } - // 关闭日期范围模式时,显示类型不能配置成"周选择" - const showType = this.properties.find(p => p.propertyID === 'showType'); - if (showType) { - showType.iterator = self.getShowTypeIterator(propertyData); - if (!changeObject.propertyValue && propertyData.showType === 4) { - propertyData.showType = 1; - } - } - // 重新获取日期格式枚举项 - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - } - } - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'showType', - propertyValue: propertyData.showType - }, - { - propertyID: 'showTime', - propertyValue: propertyData.showTime - }]; - break; - } - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'showType': { - // 切换显示类型时对应修改日期格式 - switch (changeObject.propertyValue) { - case 1: case 4: { - propertyData.dateFormat = 'yyyy-MM-dd'; - break; - } - case 2: { - propertyData.dateFormat = 'yyyy-MM'; - propertyData.showTime = false; - break; - } - case 3: { - propertyData.dateFormat = 'yyyy'; - propertyData.showTime = false; - break; - } - } - - // 显示类型为全部时 才可以启用时间选择 - const showTime = this.properties.find(p => p.propertyID === 'showTime'); - if (showTime) { - showTime.visible = (changeObject.propertyValue === 1 || changeObject.propertyValue === 4) && - propertyData.fieldType !== 'Date'; - } - // 重新获取日期格式枚举项 - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - } - } - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'showTime', - propertyValue: propertyData.showTime - }]; - break; - } - - case 'showTime': { - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - - if (changeObject.propertyValue) { - propertyData.dateFormat = 'yyyy-MM-dd HH:mm:ss'; - propertyData.returnFormat = 'yyyy-MM-dd HH:mm:ss'; - } else { - propertyData.dateFormat = 'yyyy-MM-dd'; - propertyData.returnFormat = 'yyyy-MM-dd'; - } - } - } - - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'returnFormat', - propertyValue: propertyData.returnFormat - }]; - - - // 联动修改最大值最小值属性的参数 - const maxMinProps = this.properties.filter(p => p.propertyID === 'maxValue' || p.propertyID === 'minValue'); - if (maxMinProps.length) { - maxMinProps.forEach(prop => { - prop.editorParams.customType = changeObject.propertyValue ? BindingCustomType.datetime : BindingCustomType.date; - }); - } - break; - } - } - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - /** - * 显示类型枚举项 - */ - private getShowTypeIterator(propertyData: any) { - const showTypes = [ - { key: 1, value: '全部' }, - { key: 2, value: '显示年月' }, - { key: 3, value: '仅显示年' } - ]; - if (propertyData.dateRange) { - showTypes.push({ key: 4, value: '显示周' }); - } - return showTypes; - } - - /** - * 日期格式化枚举项 - */ - private getDateFormatIteratror(propertyData: any): KeyMap[] { - let formats = []; - const { timeFormats, yMdFormats, yMFormats, mdFormats, yFormats } = DATE_FORMATS; - - switch (propertyData.showType) { - // 年月 - case 2: { - return yMFormats; - } - // 年 - case 3: { - return yFormats; - } - // 全部 - case 1: { - if (propertyData.showTime) { - formats = formats.concat(timeFormats); - } - formats = formats.concat(yMdFormats); - formats = formats.concat(yMFormats); - formats = formats.concat(yFormats); - formats = formats.concat(mdFormats); - - break; - } - - // 周 - case 4: { - if (propertyData.showTime) { - formats = formats.concat(timeFormats); - } - formats = formats.concat(yMdFormats); - formats = formats.concat(mdFormats); - - - break; - } - } - - return formats; - } - /** - * 存储格式枚举项 - */ - getReturnFormatIteratror(): KeyMap[] { - - return [ - { key: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, - { key: 'yyyy/MM/dd', value: 'yyyy/MM/dd' }, - { key: 'MM/dd/yyyy', value: 'MM/dd/yyyy' }, - { key: 'yyyy-MM-dd HH:mm:ss', value: 'yyyy-MM-dd HH:mm:ss' }, - { key: 'yyyy/MM/dd HH:mm:ss', value: 'yyyy/MM/dd HH:mm:ss' }, - { key: 'yyyyMM', value: 'yyyyMM' }, - { key: 'yyyy', value: 'yyyy' } - ]; - - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/property-config.ts deleted file mode 100644 index 4caa42d3253c697fdde24719a94630d9ad725508..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/property/property-config.ts +++ /dev/null @@ -1,691 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, KeyMap, PropertyEntity } from '@farris/ide-property-panel'; -import { BindingCustomEditorComponent, BindingCustomType, BindingCustomEditorConverter } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { DATE_FORMATS } from './date-format'; - -export class DateBoxProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - public getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - basicProperties.push( - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Farris', value: 'Farris' }, { key: 'Kendo', value: 'Kendo' }], - refreshPanelAfterChanged: true, - visible: showPosition === 'card' && propertyData.controlSource !== 'Farris' - } - ); - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - case 'controlSource': { - - // 变更【外观分类】下的属性 - const newAppearancePropConfig = self.getAppearancePropConfig(propertyData, viewModelId); - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = self.getBehaviorPropConfig(propertyData, viewModelId); - const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - } - } - - }, - - }; - - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const dateBoxAppearanceProps = this.getDateBoxAppearanceProps(propertyData); - appearanceProperties = appearanceProperties.concat(dateBoxAppearanceProps); - - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getDateBoxAppearanceProps(propertyData: any) { - const controlSource = propertyData.controlSource; - return [ - { - propertyID: 'dateFormat', - propertyName: '日期格式化', - propertyType: 'select', - description: '日期格式化方式选择', - controlSource: 'Farris', - visible: controlSource === 'Farris', - iterator: this.getDateFormatIteratror(propertyData) - } - ]; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const controlSource = propertyData.controlSource; - - let behaviorProperties: PropertyEntity[] = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'modal', - editor: BindingCustomEditorComponent, - editorParams: { - modalTitle: '最大值编辑器', - viewModelId, - customType: propertyData.showTime ? BindingCustomType.datetime : BindingCustomType.date, - minDate: propertyData.minValue && typeof propertyData.minValue === 'string' ? propertyData.minValue : undefined - }, - converter: new BindingCustomEditorConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取参数最新值:最小值为固定日期时才进行限制 - this.editorParams.minDate = propertyData.minValue && typeof propertyData.minValue === 'string' ? propertyData.minValue : undefined; - return { result: true, message: '' }; - } - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'modal', - editor: BindingCustomEditorComponent, - editorParams: { - modalTitle: '最小值编辑器', - viewModelId, - customType: propertyData.showTime ? BindingCustomType.datetime : BindingCustomType.date, - maxDate: propertyData.maxValue && typeof propertyData.maxValue === 'string' ? propertyData.maxValue : undefined - }, - converter: new BindingCustomEditorConverter(), - beforeOpenModal(): BeforeOpenModalResult { - // 取参数最新值 - - this.editorParams.maxDate = propertyData.maxValue && typeof propertyData.maxValue === 'string' ? propertyData.maxValue : undefined; - return { result: true, message: '' }; - } - }, - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'select', - description: '日期格式选择', - iterator: [ - { key: '\'yyyy-MM-dd\'', value: 'yyyy-MM-dd' }, - { key: '\'yyyy/MM/dd\'', value: 'yyyy/MM/dd' }, - { key: '\'yyyy年MM月dd日\'', value: 'yyyy年MM月dd日' }], - controlSource: 'Kendo', - visible: controlSource === 'Kendo' - }, - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'select', - description: '是否允许手动输入日期', - controlSource: 'Farris', - visible: controlSource === 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'dateRange', - propertyName: '使用日期范围模式', - propertyType: 'select', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }], - description: '是否使用日期范围模式', - controlSource: 'Farris', - visible: controlSource === 'Farris' && propertyData.fieldType === 'String' && showPosition === 'card', - refreshPanelAfterChanged: true - }, - { - propertyID: 'dateRangeDatesDelimiter', - propertyName: '日期分隔符', - propertyType: 'string', - description: '日期分隔符设置', - controlSource: 'Farris', - visible: propertyData.dateRange && controlSource === 'Farris' && showPosition === 'card' - }, - { - propertyID: 'showType', - propertyName: '显示类型', - propertyType: 'select', - description: '日期显示类型选择', - iterator: this.getShowTypeIterator(propertyData), - controlSource: 'Farris', - visible: controlSource === 'Farris', - refreshPanelAfterChanged: true - }, - { - propertyID: 'showTime', - propertyName: '启用时间选择', - propertyType: 'select', - description: '是否启用时间选择', - controlSource: 'Farris', - visible: controlSource === 'Farris' && propertyData.fieldType !== 'Date' && - (propertyData.showType === 1 || propertyData.showType === 4), - refreshPanelAfterChanged: true, - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'returnFormat', - propertyName: '存储格式', - propertyType: 'select', - description: '存储格式选择', - controlSource: 'Farris', - visible: controlSource === 'Farris' && propertyData.fieldType === 'String', - iterator: this.getReturnFormatIteratror() - }, - { - propertyID: 'showWeekNumbers', - propertyName: '显示第几周', - propertyType: 'select', - description: '是否显示第几周', - controlSource: 'Farris', - visible: controlSource === 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'useDefault', - propertyName: '使用默认值', - propertyType: 'select', - description: '是否使用默认值', - visible: propertyData.binding && propertyData.binding.type !== 'Form' && controlSource === 'Farris', - controlSource: 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'localization', - propertyName: '启用数据国际化', - propertyType: 'select', - description: '是否启用数据国际化', - visible: controlSource === 'Farris' && showPosition === 'card', - controlSource: 'Farris', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'localizationType', - propertyName: '数据国际化类型', - propertyType: 'select', - description: '数据国际化类型选择', - visible: controlSource === 'Farris' && showPosition === 'card' && propertyData.localization, - controlSource: 'Farris', - iterator: this.getLocalizationTypes(propertyData) - }, - { - propertyID: 'firstDayOfWeek', - propertyName: '每周起始日', - propertyType: 'select', - description: '每周起始日', - iterator: [{ key: 'mo', value: '星期一' }, { key: 'su', value: '星期日' }] - }, - { - propertyID: 'hourStep', - propertyName: '时步长', - propertyType: 'number', - description: '时步长设置', - decimals: 0, - min: 1, - visible: propertyData.showTime, - }, - { - propertyID: 'minuteStep', - propertyName: '分步长', - propertyType: 'number', - description: '分步长设置', - decimals: 0, - min: 1, - visible: propertyData.showTime, - }, - { - propertyID: 'secondStep', - propertyName: '秒步长', - propertyType: 'number', - description: '秒步长设置', - decimals: 0, - min: 1, - visible: propertyData.showTime, - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'editType': { - const dialogWidth = this.properties.find(p => p.propertyID === 'dialogWidth'); - if (dialogWidth) { - dialogWidth.visible = changeObject.propertyValue === 'dialog'; - } - const dialogHeight = this.properties.find(p => p.propertyID === 'dialogHeight'); - if (dialogHeight) { - dialogHeight.visible = changeObject.propertyValue === 'dialog'; - } - break; - } - case 'dateRange': { - const delimiterProp = this.properties.find(p => p.propertyID === 'dateRangeDatesDelimiter'); - if (delimiterProp) { - delimiterProp.visible = changeObject.propertyValue; - } - // 关闭日期范围模式时,显示类型不能配置成"周选择" - const showType = this.properties.find(p => p.propertyID === 'showType'); - if (showType) { - showType.iterator = self.getShowTypeIterator(propertyData); - if (!changeObject.propertyValue && propertyData.showType === 4) { - propertyData.showType = 1; - } - } - // 重新获取日期格式枚举项 - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - } - } - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'showType', - propertyValue: propertyData.showType - }, - { - propertyID: 'showTime', - propertyValue: propertyData.showTime - }]; - break; - } - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'showType': { - // 切换显示类型时对应修改日期格式 - switch (changeObject.propertyValue) { - case 1: case 4: { - propertyData.dateFormat = 'yyyy-MM-dd'; - break; - } - case 2: { - propertyData.dateFormat = 'yyyy-MM'; - propertyData.showTime = false; - break; - } - case 3: { - propertyData.dateFormat = 'yyyy'; - propertyData.showTime = false; - break; - } - } - - // 显示类型为全部时 才可以启用时间选择 - const showTime = this.properties.find(p => p.propertyID === 'showTime'); - if (showTime) { - showTime.visible = (changeObject.propertyValue === 1 || changeObject.propertyValue === 4) && - propertyData.fieldType !== 'Date'; - } - // 时间步长属性 - const timeProps = this.properties.filter(p => ['hourStep', 'minuteStep', 'secondStep'].includes(p.propertyID)); - if (timeProps && timeProps.length) { - timeProps.forEach(t => t.visible = propertyData.showTime && showTime.visible); - - } - // 重新获取日期格式枚举项 - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - } - } - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'showTime', - propertyValue: propertyData.showTime - }]; - break; - } - - case 'localization': { - const localizationType = this.properties.find(p => p.propertyID === 'localizationType'); - if (localizationType) { - localizationType.visible = changeObject.propertyValue; - } - break; - } - case 'showTime': { - const appearanceConfig = self.propertyConfig.find(c => c.categoryId.includes('appearance')); - if (appearanceConfig) { - const dateFormat = appearanceConfig.properties.find(p => p.propertyID === 'dateFormat'); - if (dateFormat) { - dateFormat.iterator = self.getDateFormatIteratror(propertyData); - - if (changeObject.propertyValue) { - propertyData.dateFormat = 'yyyy-MM-dd HH:mm:ss'; - propertyData.returnFormat = 'yyyy-MM-dd HH:mm:ss'; - } else { - propertyData.dateFormat = 'yyyy-MM-dd'; - propertyData.returnFormat = 'yyyy-MM-dd'; - } - } - } - - - changeObject.relateChangeProps = [{ - propertyID: 'dateFormat', - propertyValue: propertyData.dateFormat - }, - { - propertyID: 'returnFormat', - propertyValue: propertyData.returnFormat - }]; - - - // 联动修改最大值最小值属性的参数 - const maxMinProps = this.properties.filter(p => p.propertyID === 'maxValue' || p.propertyID === 'minValue'); - if (maxMinProps.length) { - maxMinProps.forEach(prop => { - prop.editorParams.customType = changeObject.propertyValue ? BindingCustomType.datetime : BindingCustomType.date; - }); - } - - // 时间步长属性 - const timeProps = this.properties.filter(p => ['hourStep', 'minuteStep', 'secondStep'].includes(p.propertyID)); - if (timeProps && timeProps.length) { - timeProps.forEach(t => t.visible = changeObject.propertyValue); - - } - break; - } - } - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - /** - * 国际化类型枚举项 - */ - private getLocalizationTypes(propertyData: any): KeyMap[] { - switch (propertyData.fieldType) { - case 'Date': { - return [{ key: 'Date', value: '日期' }]; - } - case 'DateTime': { - return [{ key: 'DateTime', value: '日期时间' }]; - } - default: { - return [{ key: 'Date', value: '日期' }, { key: 'DateTime', value: '日期时间' }]; - } - } - } - /** - * 显示类型枚举项 - */ - private getShowTypeIterator(propertyData: any) { - const showTypes = [ - { key: 1, value: '全部' }, - { key: 2, value: '显示年月' }, - { key: 3, value: '仅显示年' } - ]; - if (propertyData.dateRange) { - showTypes.push({ key: 4, value: '显示周' }); - } - return showTypes; - } - - /** - * 日期格式化枚举项 - */ - private getDateFormatIteratror(propertyData: any): KeyMap[] { - let formats = []; - const { timeFormats, yMdFormats, yMFormats, mdFormats, yFormats } = DATE_FORMATS; - - switch (propertyData.showType) { - // 年月 - case 2: { - return yMFormats; - } - // 年 - case 3: { - return yFormats; - } - // 全部 - case 1: { - if (propertyData.showTime) { - formats = formats.concat(timeFormats); - } - formats = formats.concat(yMdFormats); - formats = formats.concat(yMFormats); - formats = formats.concat(yFormats); - formats = formats.concat(mdFormats); - - break; - } - - // 周 - case 4: { - if (propertyData.showTime) { - formats = formats.concat(timeFormats); - } - formats = formats.concat(yMdFormats); - formats = formats.concat(mdFormats); - - - break; - } - } - - return formats; - } - /** - * 存储格式枚举项 - */ - getReturnFormatIteratror(): KeyMap[] { - - return [ - { key: 'yyyy-MM-dd', value: 'yyyy-MM-dd' }, - { key: 'yyyy/MM/dd', value: 'yyyy/MM/dd' }, - { key: 'MM/dd/yyyy', value: 'MM/dd/yyyy' }, - { key: 'yyyy-MM-dd HH:mm:ss', value: 'yyyy-MM-dd HH:mm:ss' }, - { key: 'yyyy/MM/dd HH:mm:ss', value: 'yyyy/MM/dd HH:mm:ss' }, - { key: 'yyyyMM', value: 'yyyyMM' }, - { key: 'yyyy', value: 'yyyy' } - ]; - - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/schema/schema.ts deleted file mode 100644 index ba035bb21c7eb403cb4d2857ce637e3a31aab7e3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/schema/schema.ts +++ /dev/null @@ -1,49 +0,0 @@ -export const DateBoxSchema = { - id: 'date', - type: 'DateBox', - titleSourceType: 'static', - title: '日期选择', - controlSource: 'Farris', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - validation: null, - value: null, - editable: true, - dateRange: false, - showTime: false, - showType: 1, - dateFormat: 'yyyy-MM-dd', - returnFormat: 'yyyy-MM-dd', - maxValue: null, - minValue: null, - disableDates: [], - showWeekNumbers: false, - dateRangeDatesDelimiter: '~', - shortcuts: [], - fieldType: null, - useDefault: false, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - isTextArea: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - localization: false, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500, - hourStep: 1, - minuteStep: 1, - secondStep: 1, - firstDayOfWeek: 'mo' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/form.ts deleted file mode 100644 index e765fad68b6f6b9ca18ae8f34c84709cd2dcd6c1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/form.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - - -export default (ctx: any) => { - - // 启用扩展区域 - let inputAppendEle = ''; - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - - return ` -
    -
    -
    - -
    - -
    - ${inputAppendEle} -
    -
    -
    `; -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-range/export.ts deleted file mode 100644 index a7e9ef4bbe291889c9c2488df8494f0fb66e0cbd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/export.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdDateRangeTemplates from './templates'; -/** - * 日期区间,目前只用于筛选条和筛选方案,不单独使用。 - */ -export const DateRange: ComponentExportEntity = { - type: 'DateRange', - template: FdDateRangeTemplates, - metadata: {} -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/form.ts deleted file mode 100644 index cc716f8f842a9a8070ad6e2819d025214905d63f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/form.ts +++ /dev/null @@ -1,20 +0,0 @@ - - -export default (ctx: any) => { - const beginPlaceHolder = ctx.component && ctx.component.beginPlaceHolder || '请输入开始日期'; - const endPlaceHolder = ctx.component && ctx.component.endPlaceHolder || '请输入结束日期'; - - return `
    -
    -
    -
    - -
    - -
    - -
    -
    -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/date-range/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/component/fd-img-upload.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/component/fd-img-upload.ts deleted file mode 100644 index 7d16cf3b3522d6df7c960c280212f36159e78bb3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/component/fd-img-upload.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ImageUploadSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { ImageUploadProp } from '../property/property-config'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; - -export default class FdImageUploadComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('img-upload.css'); - } - - - - getDefaultSchema(): any { - return ImageUploadSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('ImageUpload', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ImageUploadProp = new ImageUploadProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/export.ts deleted file mode 100644 index 9e03aa63abbe7bd16bf057edc60d702019674a17..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdImageUploadComponent from './component/fd-img-upload'; -import { ImageUploadSchema } from './schema/schema'; - -import { ComponentExportEntity } from '@farris/designer-element'; -import { cloneDeep } from 'lodash-es'; -import FdImageUploadTemplates from './templates'; - -export const ImageUpload: ComponentExportEntity = { - type: 'ImageUpload', - component: FdImageUploadComponent, - template: FdImageUploadTemplates, - metadata: cloneDeep(ImageUploadSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/property/property-config.ts deleted file mode 100644 index ab88940654fc3c7d15a6df7a6494fe9af539e9ea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/property/property-config.ts +++ /dev/null @@ -1,334 +0,0 @@ -import { ExpressionEditorComponent, ExpressionEditorParam } from '@farris/designer-devkit'; -import { IDesignerHost } from '@farris/designer-element'; -import { - DesignerEnvType, - FormBindingType, - FormExpression, - StateMachineService, - UniformEditorDataUtil -} from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -export class ImageUploadProp extends NoCodeInputProps { - - stateMachineService: StateMachineService; - propertyConfig: ElementPropertyConfig[]; - - constructor(private serviceHost1: IDesignerHost, viewModelId: string, componentId: string) { - super(serviceHost1, viewModelId, componentId); - this.stateMachineService = serviceHost1.getService('StateMachineService'); - } - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 服务器属性 - const customPropConfig = this.getServerPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(customPropConfig); - - // 事件属性 - const eventPropConfig = this.getImageEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getPrivateBehaviorPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'maxUploads', - propertyName: '最大上传个数', - propertyType: 'number', - decimals: 0, - min: 0, - description: '值为0时表示不限制上传个数', - }, - { - propertyID: 'maxSize', - propertyName: '允许图片大小(M)', - propertyType: 'number', - decimals: 0, - min: 0, - description: '图片最大size 单位M', - }, - { - propertyID: 'imgType', - propertyName: '允许图片格式', - propertyType: 'multiSelect', - description: '图片限制的类型', - iterator: [ - { key: 'png', value: 'png' }, - { key: 'jpg', value: 'jpg' }, - { key: 'jpeg', value: 'jpeg' }, - { key: 'webp', value: 'webp' }, - { key: 'svg', value: 'svg' }, - { key: 'gif', value: 'gif' }, - { key: 'bmp', value: 'bmp' } - ], - multiSelectDataType: 'array' - }, - { - propertyID: 'storeType', - propertyName: '图片存储格式', - propertyType: 'select', - description: '选择图片存储的方式', - iterator: [{ key: 'metadata', value: 'metadata' }, { key: 'base64', value: 'base64' }], - defaultValue: 'metadata', - visible: false // 仅有少量使用 base64 方式,后续不再支持 - } - ); - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - private getServerPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'server', - categoryName: '服务器配置', - properties: [ - { - propertyID: 'rootId', - propertyName: '图片服务器根目录', - propertyType: 'string' - }, - { - propertyID: 'formId', - propertyName: '二级目录', - propertyType: 'unity', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['custom', 'variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - description: '必填,根据【附件信息】业务字段所在位置区分:1、在子表,二级目录建议绑定主表ID。2:在主表:二级目录建议填写当前表单元数据ID' - } - ] - }; - } - - private getImageEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventConfig = this.getImageEventPropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - - getPrivateBehaviorPropConfig(propertyData: any, viewModelId: string) { - const bindingFieldId = propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field; - const expField = this.domService.expressions && this.domService.expressions.find(e => e.fieldId === bindingFieldId); - // 运行时定制环境中不允许新增变量,因为新增的变量没有入口配置变量值 - const canAddVariable = this.formBasicService.envType === DesignerEnvType.designer; - // 为了发版,暂时将申报模板子表中的只读、必填属性的表达式选项屏蔽掉 - let showExpInTableTemplate = true; - const vmBindTo = this.domService.getViewModelById(viewModelId).bindTo; - if (this.domService.module.templateId === 'nav-table-fillin-form-template' && vmBindTo !== '/') { - showExpInTableTemplate = false; - } - return [ - { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - constType: 'enum', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getPrivateExpressionEditorParams(propertyData, '可见编辑器', 'visible'), - exprValue: this.getPrivateExprValue(expField, propertyData.visible) - } - } - } - }, - { - propertyID: 'readonly', - propertyName: '只读', - propertyType: 'unity', - description: '是否只读', - editorParams: { - controlName: canAddVariable ? UniformEditorDataUtil.getControlName(propertyData) : undefined, - constType: 'enum', - editorOptions: { - types: bindingFieldId && showExpInTableTemplate ? ['const', 'variable', 'custom', 'expression', 'stateMachine'] : ['const', 'variable', 'custom', 'stateMachine'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is', - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getPrivateExpressionEditorParams(propertyData, '只读编辑器', 'readonly'), - exprValue: this.getPrivateExprValue(expField, propertyData.readonly) - }, - stateMachine: this.stateMachineService.stateMachineMetaData, - } - }, - }, - { - propertyID: 'require', - propertyName: '必填', - propertyType: 'unity', - description: '是否必填', - editorParams: { - constType: 'enum', - editorOptions: { - types: ['const', 'expression'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - expressionConfig: - { - editor: ExpressionEditorComponent, - beforeOpenModal: () => this.getPrivateExpressionEditorParams(propertyData, '必填编辑器', 'require'), - exprValue: this.getPrivateExprValue(expField, propertyData.require) - } - } - } - } - ]; - } - - /** - * 获取表达式编辑需要的参数:在属性面板弹出表达式窗口时调用 - */ - getPrivateExpressionEditorParams(propertyData: any, modalTitle: string, expressionType: string) { - let expressionStr = null; - const bindingFieldId = propertyData.binding && propertyData.binding.field; - const expressionParams: ExpressionEditorParam = { - modalTitle: modalTitle || '表达式编辑器', - fieldId: bindingFieldId, - viewModelId: this.viewModelId, - expType: expressionType - }; - - // 必填表达式需要配置提示消息 - if (expressionType === 'require') { - expressionParams.message = ''; - } - - - const propertyValue = propertyData[expressionType]; - if (propertyValue && propertyValue.expressionId && bindingFieldId) { - const expField = this.domService.expressions.find(e => e.fieldId === bindingFieldId); - - // 检测到现有的表达式配置 - if (expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig.value; - - if (expressionType === 'require') { - expressionParams.message = originalExpConfig.message; - } - } - } - - return { - editorParams: expressionParams, - value: expressionStr - }; - } - - /** - * 获取属性编辑器需要的初始绑定值 - * @param expField 表达式配置字段 - * @param propertyValue 属性值 - */ - getPrivateExprValue(expField: FormExpression, propertyValue: any) { - let expressionStr = null; - if (propertyValue && propertyValue.expressionId && expField) { - const originalExpConfig = expField.expression.find(exp => exp.id === propertyValue.expressionId); - expressionStr = originalExpConfig && originalExpConfig.value; - - } - - return { - type: 'expression', - value: { - value: expressionStr, - parameters: propertyValue && propertyValue.expressionId, - type: 'Expression' - } - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/schema/schema.ts deleted file mode 100644 index 7c627c39fadbefbd5abe67f327d4cc001cb2ba8b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/schema/schema.ts +++ /dev/null @@ -1,31 +0,0 @@ -export const ImageUploadSchema = { - id: 'ImageUpload', - type: 'ImageUpload', - title: '图像上传', - size: null, - disable: false, - appearance: null, - border: null, - maxUploads: 0, - maxSize: null, - imgType: [ - 'png', - 'jpg', - 'jpeg', - 'webp', - 'svg', - 'gif', - 'bmp' - ], - storeType: 'metadata', - rootId: 'default-root', - formId: 'viewModel.bindingData && viewModel.bindingData[\'id\']', - readonly: false, - require: false, - visible: true, - click: null, - imgChange: null, - linkedLabelEnabled: false, - linkedLabelClick: null -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/form.ts deleted file mode 100644 index 03cb705cd19c0ba40f796f958a4639c305fee26b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/form.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default (ctx: any) => { - return ` -
    -
    -
    -
    - - - -
    -
    -
    -
    -`; -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image-upload/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/component/fd-image.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/component/fd-image.ts deleted file mode 100644 index 6eafc3920200a7b05085e2e68e2fd897ec567750..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/component/fd-image.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { ImageSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { ImageProp } from '../property/property-config'; - -export default class FdImageComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return ImageSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('Image', { - component: this.component - }),false); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: ImageProp = new ImageProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/export.ts deleted file mode 100644 index cf2051fd7e7f8c1d719dea5f60468e6fa7367345..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdImageComponent from './component/fd-image'; -import { ImageSchema } from './schema/schema'; - -import FdImageTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const Image: ComponentExportEntity = { - type: 'Image', - component: FdImageComponent, - template: FdImageTemplates, - metadata: cloneDeep(ImageSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/property/property-config.ts deleted file mode 100644 index ba2dc65a4d1099cc06d4d54a391d22fc82d59819..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/property/property-config.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class ImageProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getImageEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const self = this; - let appearanceProperties = []; - if (showPosition === 'card') { - let appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId); - const supportedProps = 'responseLayout,appearance,size'; - appearanceCommonProps = appearanceCommonProps.filter(p => supportedProps.includes(p.propertyID)); - - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'rootId', - propertyName: '服务器根目录', - propertyType: 'string', - description: '服务器根目录id设置' - }, - { - propertyID: 'src', - propertyName: '图片地址', - propertyType: 'string', - description: '图片地址设置' - }, - { - propertyID: 'alt', - propertyName: '替代文本', - propertyType: 'string', - description: '图片未找到时替代文本设置' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - private getImageEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'click', - name: '点击事件' - } - ]; - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventConfig = this.getImageEventPropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/schema/schema.ts deleted file mode 100644 index 6344af16a8d82a4bb1c3aca94c8f2a57fd74460a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/schema/schema.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const ImageSchema = { - id: 'image', - type: 'Image', - title: '图像', - disable: false, - appearance: null, - border: null, - src: null, - alt: null, - visible: true, - click: null, - rootId: 'default-root' -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/form.ts deleted file mode 100644 index 51fda0d384548299e3e932414540640a3736213c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/form.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; - -export default (ctx: any) => { - const imgAlt = ctx.component.alt ? ctx.component.alt : '图片'; - const imgStr = `
    ${imgAlt}
    `; - if (ctx.component.showInTable) { - return `
    - ${imgStr} -
    `; - } else { - return imgStr; - } -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/image/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/component/fd-input-group.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/component/fd-input-group.ts deleted file mode 100644 index a14675127d5f84d6db69d51b98bb2b93f04d0c9b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/component/fd-input-group.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { InputGroupSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { InputGroupProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DesignerEnvType, DomService } from '@farris/designer-services'; -import { NoCodeInputGroupProp } from '../property/nocode-property-config'; -import { BuilderHTMLElement } from '@farris/designer-element'; - -export default class FdInputGroupComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - init(): void { - super.init(); - this.adaptOldControl(); - } - - getDefaultSchema(): any { - return InputGroupSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - return super.render(this.renderTemplate('InputGroup', { - component: this.component - }), !this.component.showInTable); - } - - attach(element: BuilderHTMLElement): any { - const superAttach: any = super.attach(element); - - - - return superAttach; - } - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeInputGroupProp = new NoCodeInputGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: InputGroupProp = new InputGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject, ['groupText']); - } - - /** - * 智能输入框启用弹出表单模式后,需要记录配置的按钮展示名称和路径,用于交互面板已绑定事件窗口 - */ - setComponentBasicInfoMap() { - super.setComponentBasicInfoMap(); - - this.setComponentExtendInfoMap(); - - } - - /** - * 内部嵌套控件的路径信息 - */ - setComponentExtendInfoMap() { - if (!this.component.modalConfig || !this.component.modalConfig.footerButtons || !this.component.modalConfig.footerButtons.length) { - return; - } - const domService = this.options.designerHost.getService('DomService') as DomService; - const inputGroupPath = domService.controlBasicInfoMap.get(this.component.id); - - this.component.modalConfig.footerButtons.forEach(toolbar => { - domService.controlBasicInfoMap.set(toolbar.id, { - showName: toolbar.text, - parentPathName: `${inputGroupPath.parentPathName} > ${toolbar.text}` - }); - }); - } - - private adaptOldControl() { - // 移除冗余的属性 - if (this.component.hasOwnProperty('valueChange')) { - delete this.component.valueChange; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/export.ts deleted file mode 100644 index c8d18ca34eb04382d0e4927c19fe3ed054d16301..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdInputGroupComponent from './component/fd-input-group'; -import { InputGroupSchema } from './schema/schema'; - -import FdInputGroupTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const InputGroup: ComponentExportEntity = { - type: 'InputGroup', - component: FdInputGroupComponent, - template: FdInputGroupTemplates, - metadata: cloneDeep(InputGroupSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/nocode-property-config.ts deleted file mode 100644 index 3eb2079b6e156126ced85e2bb28d809b47a6767e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/nocode-property-config.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { InputGroupProp } from './property-config'; - -export class NoCodeInputGroupProp extends InputGroupProp { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig: ElementPropertyConfig[] = []; - - // 弹出表单框属性 - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, this.viewModelId); - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId, openModalPropConfigs); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId, openModalPropConfigs); - propertyConfig.push(behaviorPropConfig); - propertyConfig = propertyConfig.concat(openModalPropConfigs); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/property-config.ts deleted file mode 100644 index c5708d3fac29e5b5cdf8e2656d2e3d85e3e05005..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/property/property-config.ts +++ /dev/null @@ -1,536 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CodeEditorComponent, CollectionWithPropertyConverter, CollectionWithPropertyEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { DgControl } from '../../../../utils/dg-control'; -import { ImportCmpComponent, ImportCmpConverter, MappingConverter, SelectMappingComponent } from '@farris/designer-devkit'; -import { ToolBarItemProp } from '../../../command/toolbar/component/toolbaritem/property/property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; - -export class InputGroupProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - let propertyConfig: ElementPropertyConfig[] = []; - - // 弹出表单框属性 - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, this.viewModelId); - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId, openModalPropConfigs); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId, openModalPropConfigs); - propertyConfig.push(behaviorPropConfig); - propertyConfig = propertyConfig.concat(openModalPropConfigs); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - } - - - /** - * 外观属性 - */ - getAppearancePropConfig( - propertyData: any, viewModelId: string, openModalPropConfigs: ElementPropertyConfig[], showPosition = 'card'): - ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - - appearanceProperties.push( - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式设置', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - } - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - getBehaviorPropConfig( - propertyData: any, viewModelId: string, openModalPropConfigs: ElementPropertyConfig[], showPosition = 'card'): - ElementPropertyConfig { - - const self = this; - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'boolean', - description: '是否允许输入', - }, - { - propertyID: 'groupText', - propertyName: '按钮显示文本', - propertyType: 'modal', - description: '按钮显示文本设置', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - }, - { - propertyID: 'showButtonWhenDisabled', - propertyName: '禁用时显示按钮', - propertyType: 'boolean', - description: '禁用时是否显示按钮' - }, - { - propertyID: 'isPassword', - propertyName: '密码输入框', - propertyType: 'boolean', - description: '是否为密码输入框', - defaultValue: false - }, - { - propertyID: 'enableViewPassword', - propertyName: '允许查看密码', - propertyType: 'boolean', - description: '是否允许查看密码', - defaultValue: false, - visible: propertyData.isPassword - }, - { - propertyID: 'usageMode', - propertyName: '使用模式', - propertyType: 'select', - description: '使用模式选择', - detail: "https://igix.inspures.com/igixword/main.html#inputgroup", - iterator: [ - { key: 'text', value: '文本' }, - { key: 'open-modal', value: '弹出表单' }, - { key: 'open-remote-modal', value: '弹出远端表单' } - ], - refreshPanelAfterChanged: true - }, - { - propertyID: 'enableClear', - propertyName: '启用清除按钮', - propertyType: 'boolean' - } - ); - - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject.propertyID) { - case 'isPassword': { - const enableViewPassword = this.properties.find(p => p.propertyID === 'enableViewPassword'); - if (enableViewPassword) { - enableViewPassword.visible = changeObject.propertyValue; - propertyData.enableViewPassword = changeObject.propertyValue ? propertyData.enableViewPassword : false; - } - changeObject.relateChangeProps = [{ - propertyID: 'enableViewPassword', - propertyValue: propertyData.enableViewPassword - }]; - break; - } - case 'usageMode': { - if (openModalPropConfigs && openModalPropConfigs.length) { - openModalPropConfigs.forEach(c => { - if (c.categoryId === 'openModal') { - c.hide = propertyData.usageMode !== 'open-modal'; - } else { - c.hide = propertyData.usageMode === 'text'; - } - }); - } - break; - } - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - - } - - /** - * 事件属性 - */ - getEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - { - label: 'onBlur', - name: '失去焦点事件' - }, - { - label: 'onClear', - name: '清除事件' - } - ]; - - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - - } - - /** - * 动态事件 - * @param propertyData 属性值 - * @param eventList 已有事件 - */ - switchEvents(propertyData, eventList) { - eventList = super.switchEvents(propertyData, eventList); - - if (propertyData.enableClear) { - const onClear = eventList.find(eventListItem => eventListItem.label === 'onClear'); - if (!onClear) { - eventList.push({ - label: 'onClear', - name: '清除事件' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'onClear'); - } - - return eventList; - } - /** - * 弹出表单配置属性 - */ - getOpenModalPropConfigs(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig[] { - - - const toolbarItemProp = new ToolBarItemProp(this.injector, this.viewModelId); - - const self = this; - return [{ - categoryId: 'openModal', - categoryName: '表单配置', - hide: propertyData.usageMode !== 'open-modal', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition !== 'card' ? 'editor.modalConfig' : 'modalConfig', - tabId: showPosition !== 'card' ? showPosition : null, - tabName: showPosition !== 'card' ? '编辑器' : null, - properties: [ - { - propertyID: 'modalCmp', - propertyName: '弹出表单', - propertyType: 'modal', - description: '弹出表单元数据窗口', - editor: ImportCmpComponent, - converter: new ImportCmpConverter(), - editorParams: { containerType: DgControl.ModalContainer.type, containerId: propertyData.id, relativePath: this.formBasicService.formMetaBasicInfo.relativePath, name: this.formBasicService.formMetaBasicInfo.name }, - showClearButton: true, - afterClickClearButton(oldValue: string) { - self.domService.deleteExternalComponent(oldValue); // 清空外部组件的声明节点 - } - }, - { - propertyID: 'mapFields', - propertyName: '字段映射', - propertyType: 'modal', - description: '表单映射编辑', - editor: SelectMappingComponent, - editorParams: { - sourceMetadataId: propertyData.modalConfig.formId, - viewModelId, - binding: propertyData.binding, - sourceMetadataType: 'form', - sourceMetadataName: '弹出表单' - }, - converter: new MappingConverter(), - beforeOpenModal(): BeforeOpenModalResult { - if (!propertyData.binding) { - return { result: false, message: '请先选择绑定!' }; - } - if (!propertyData.modalConfig || !propertyData.modalConfig.formId) { - return { result: false, message: '请先选择弹出表单!' }; - } - // 取弹出表单和绑定的最新值 - this.editorParams.sourceMetadataId = propertyData.modalConfig.formId; - this.editorParams.binding = propertyData.binding; - return { result: true, message: '' }; - } - } - - ], - setPropertyRelates(changeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'modalCmp': { - propData.component = parameters ? parameters.component : ''; - propData.formId = parameters ? parameters.uri : ''; - propData.mapFields = ''; - break; - } - } - } - }, - { - categoryId: 'modalConfig', - categoryName: '弹出窗口配置', - hide: propertyData.usageMode === 'text', - propertyData: propertyData.modalConfig, - enableCascade: true, - parentPropertyID: showPosition !== 'card' ? 'editor.modalConfig' : 'modalConfig', - tabId: showPosition !== 'card' ? showPosition : null, - tabName: showPosition === 'gridFieldEditor' ? '编辑器' : null, - properties: [ - { - propertyID: 'showHeader', - propertyName: '显示标题栏', - propertyType: 'boolean', - description: '弹出窗口是否显示标题栏' - }, - { - propertyID: 'title', - propertyName: '标题', - propertyType: 'string', - description: '弹出窗口标题', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showCloseButton', - propertyName: '显示关闭按钮', - propertyType: 'boolean', - description: '弹出窗口是否显示关闭按钮', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'showMaxButton', - propertyName: '显示最大化按钮', - propertyType: 'boolean', - description: '弹出窗口是否显示最大化按钮', - visible: propertyData.modalConfig && propertyData.modalConfig.showHeader, - category: 'header' - }, - { - propertyID: 'width', - propertyName: '宽度', - propertyType: 'number', - description: '弹出窗口宽度', - min: 0 - }, - { - propertyID: 'height', - propertyName: '高度', - propertyType: 'number', - description: '弹出窗口高度', - min: 0 - }, - { - propertyID: 'showFooterButtons', - propertyName: '显示底部按钮区', - propertyType: 'boolean', - description: '弹出窗口是否显示底部按钮区' - }, - { - propertyID: 'footerButtons', - propertyName: '按钮组', - propertyType: 'modal', - description: '弹出窗口按钮区维护', - editor: CollectionWithPropertyEditorComponent, - converter: new CollectionWithPropertyConverter(), - editorParams: { - modalTitle: '工具栏编辑器', - viewModelId, - idKey: 'id', - textKey: 'text', - maxCascadeLevel: 1, - controlType: DgControl.ToolBarItem.type, - defaultControlValue: { - id: 'toolBarItem', - text: '按钮', - appearance: { - class: 'btn' - } - }, - parentNodeId: propertyData.id, - getPropertyConfig: (selectedNode, triggerModalSave: any) => toolbarItemProp.getPropertyConfigInTree(viewModelId, true, selectedNode, triggerModalSave), - beforeSave: () => toolbarItemProp.beforeToolbarSaved(propertyData.parent && propertyData.parent.id, viewModelId) - }, - visible: propertyData.modalConfig && propertyData.modalConfig.showFooterButtons - } - - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showHeader': { - this.properties.map(p => { - if (p.category === 'header') { - p.visible = changeObject.propertyValue; - } - }); - - break; - } - case 'showFooterButtons': { - const footerButtons = this.properties.find(p => p.propertyID === 'footerButtons'); - if (footerButtons) { - footerButtons.visible = changeObject.propertyValue; - } - } - } - } - }]; - } - - /** - * 列编辑器属性 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 弹出表单框属性 - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, viewModelId, 'gridFieldEditor'); - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, openModalPropConfigs, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, openModalPropConfigs, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - this.propertyConfig = this.propertyConfig.concat(openModalPropConfigs); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - - // 弹出表单框属性 - const openModalPropConfigs = this.getOpenModalPropConfigs(propertyData, viewModelId, 'tableTdEditor'); - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, openModalPropConfigs, 'tableTdEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, openModalPropConfigs, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - this.propertyConfig = this.propertyConfig.concat(openModalPropConfigs); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/schema/schema.ts deleted file mode 100644 index c5e846c7023b1e3ec44d4c3e6e3c35d1cc59ab1f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/schema/schema.ts +++ /dev/null @@ -1,48 +0,0 @@ -export const InputGroupSchema = { - id: 'input-group', - type: 'InputGroup', - titleSourceType: 'static', - title: '', - visible: true, - appearance: null, - binding: null, - readonly: false, - require: false, - editable: true, - enableClear: true, - groupText: '', - showButtonWhenDisabled: false, - placeHolder: '', - holdPlace: false, - isTextArea: true, - click: '', - onBlur: '', - onClear: '', - isPassword: false, - enableViewPassword: false, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - linkedLabelEnabled: false, - linkedLabelClick: null, - textAlign: 'left', - usageMode: 'text', - modalConfig: { - modalCmp: null, - mapFields: null, - showHeader: true, - title: '', - showCloseButton: true, - showMaxButton: true, - width: 800, - height: 600, - showFooterButtons: true, - footerButtons: [] - }, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500 -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/form.ts deleted file mode 100644 index 33059a46e87d115ede2e50662d56567ef25c5f48..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/form.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - -export default (ctx: any) => { - const groupTextSpan = ctx.component.groupText ? ctx.component.groupText : ``; - - // 启用扩展区域 - let inputAppendEle = ''; - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - - return ` -
    -
    -
    - -
    - ${groupTextSpan} -
    - ${inputAppendEle} -
    -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/input-group/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/component/fd-language.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/component/fd-language.ts deleted file mode 100644 index 1d616cd7dbaae9f9ad63ec6b7a49bfecbd907c95..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/component/fd-language.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { LanguageTextBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { LanguageTextBoxProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdLanguageTextBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return LanguageTextBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('LanguageTextBox', { - component: this.component - }),!this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: LanguageTextBoxProp = new LanguageTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/export.ts deleted file mode 100644 index 362f1ef4df62618f806973a4f9ddee756d1a2f6e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdLanguageTextBoxComponent from './component/fd-language'; -import { LanguageTextBoxSchema } from './schema/schema'; - -import FdLanguageTextBoxTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const LanguageTextBox: ComponentExportEntity = { - type: 'LanguageTextBox', - component: FdLanguageTextBoxComponent, - template: FdLanguageTextBoxTemplates, - metadata: cloneDeep(LanguageTextBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/property/property-config.ts deleted file mode 100644 index af5e60ee28f2083308db1d09e575011fa8f75b20..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/property/property-config.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class LanguageTextBoxProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - const appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - behaviorProperties.push( - { - propertyID: 'languages', - propertyName: '语言列表', - propertyType: 'modal', - description: '语言列表设置', - editor: ItemCollectionEditorComponent, - editorParams: { - columns: [ - { field: 'code', title: '编号', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '名称', editor: { type: EditorTypes.TEXTBOX } }], - requiredFields: ['code', 'name'], - uniqueFields: ['code', 'name'], - modalTitle: '语言编辑器', - canEmpty: false - }, - converter: new ItemCollectionConverter(), - visible: showPosition === 'card' || showPosition === 'tableTdEditor' - }, - // { - // propertyID: 'enableClear', - // propertyName: '启用清除按钮', - // propertyType: 'boolean', - // description: '是否启用清除按钮' - // }, - { - propertyID: 'useFrameworkLanguage', - propertyName: '使用框架语种', - propertyType: 'boolean', - description: '是否使用框架语种', - visible: showPosition === 'card' || showPosition === 'tableTdEditor' - }, - { - propertyID: 'editable', - propertyName: '允许编辑', - propertyType: 'boolean', - description: '是否允许编辑' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventConfig = this.getEventPropertyConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(apperanceConfig); - - - // // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - // this.propertyConfig.push(appendPropConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/schema/schema.ts deleted file mode 100644 index 846f22ab4226ed3dfe2b6f97e107b052f513a050..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/schema/schema.ts +++ /dev/null @@ -1,33 +0,0 @@ -export const LanguageTextBoxSchema = { - id: 'LanguageTextBox', - type: 'LanguageTextBox', - titleSourceType: 'static', - title: '文本', - appearance: null, - languages: [], - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - enableClear: true, - placeHolder: '', - maxLength: null, - holdPlace: false, - isTextArea: true, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - useFrameworkLanguage: true, - editable: false, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500 -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/form.ts deleted file mode 100644 index 2092d34c6b5b7f2448b1fe537c62c845524ff22f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/form.ts +++ /dev/null @@ -1,15 +0,0 @@ - - -export default (ctx: any) => { - return ` -
    -
    -
    - -
    - -
    -
    -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/language-text-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/component/fd-multi-text-box.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/component/fd-multi-text-box.ts deleted file mode 100644 index 85f50497b0749ffc24ce4c1ca5afddd572267501..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/component/fd-multi-text-box.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { MultiTextBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { MultiTextBoxProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeMultiTextBoxProp } from '../property/nocode-property-config'; - -export default class FdMultiTextBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return MultiTextBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('MultiTextBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeMultiTextBoxProp = new NoCodeMultiTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: MultiTextBoxProp = new MultiTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - super.onPropertyChanged(changeObject, ['height']) - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/export.ts deleted file mode 100644 index 96987a19dec2fb85145efa23146a8df9a2707763..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdMultiTextBoxComponent from './component/fd-multi-text-box'; -import { MultiTextBoxSchema } from './schema/schema'; - -import FdMultiTextBoxTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const MultiTextBox: ComponentExportEntity = { - type: 'MultiTextBox', - component: FdMultiTextBoxComponent, - template: FdMultiTextBoxTemplates, - metadata: cloneDeep(MultiTextBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/nocode-property-config.ts deleted file mode 100644 index f27f1af5343c836cdbfc4013a5d2fdcc0047cd24..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/nocode-property-config.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -import { getInputExByInputType, InputControlTypeMapping } from '../../text-box/property/nocode-input-format-map'; - -export class NoCodeMultiTextBoxProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - /** - * 外观属性 - */ - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 字数属性 - // const wordCountPropConfig = this.getWordCountPropConfig(propertyData, 'tableTdEditor'); - // this.propertyConfig.push(wordCountPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/property-config.ts deleted file mode 100644 index 9e334b23386c9a644ec3a138320058bf40bdbdff..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/property/property-config.ts +++ /dev/null @@ -1,360 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class MultiTextBoxProp extends InputProps { - - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 字数属性 - const wordCountPropConfig = this.getWordCountPropConfig(propertyData); - this.propertyConfig.push(wordCountPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - /** - * 外观属性 - */ - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties: PropertyEntity[] = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties: PropertyEntity[] = []; - - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - let maxLength = 0; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - } - } - behaviorProperties.push( - { - propertyID: 'editType', - propertyName: '允许弹出编辑', - propertyType: 'select', - description: '是否允许弹出编辑', - iterator: [{ key: 'default', value: '不允许' }, { key: 'dialog', value: '允许' }], - defaultValue: 'default', - refreshPanelAfterChanged: true - }, - { - propertyID: 'dialogWidth', - propertyName: '窗口宽度', - propertyType: 'number', - description: '弹出编辑窗口宽度', - decimals: 0, - min: 1, - visible: propertyData.editType === 'dialog' - }, - { - propertyID: 'dialogHeight', - propertyName: '窗口高度', - propertyType: 'number', - description: '弹出编辑窗口高度', - decimals: 0, - min: 1, - visible: propertyData.editType === 'dialog' - }, - { - propertyID: 'maxLength', - propertyName: '最大长度', - propertyType: 'number', - numberFormat: 'n0', - decimals: 0, - min: 0, - max: maxLength > 0 ? maxLength : undefined, - description: '文本框允许输入的最大字数' - }, - { - propertyID: 'useComments', - propertyName: '启用常用记录', - propertyType: 'select', - description: '是否启用常用输入项', - iterator: [{ key: true, value: '启用' }, { key: false, value: '不启用' }], - visible: showPosition === 'card' - } - - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject.propertyID) { - case 'editType': { - const dialogWidth = this.properties.find(p => p.propertyID === 'dialogWidth'); - if (dialogWidth) { - dialogWidth.visible = changeObject.propertyValue === 'dialog'; - } - const dialogHeight = this.properties.find(p => p.propertyID === 'dialogHeight'); - if (dialogHeight) { - dialogHeight.visible = changeObject.propertyValue === 'dialog'; - } - - // 变更【字数分类】下的【字数显示位置】属性 - const wordCountConfig = self.propertyConfig.find(cat => cat.categoryId.includes('wordCount')); - if (wordCountConfig && wordCountConfig.properties) { - const onlyShowInDialog = wordCountConfig.properties.find(p => p.propertyID === 'onlyShowInDialog'); - if (onlyShowInDialog) { - onlyShowInDialog.visible = changeObject.propertyValue === 'dialog' && propertyData.enableWordCount; - } - } - if (changeObject.propertyValue !== 'dialog') { - propertyData.onlyShowInDialog = false; - changeObject.relateChangeProps = [ - { - propertyID: 'onlyShowInDialog', - propertyValue: propertyData.onlyShowInDialog - } - ]; - - } - - break; - } - } - } - }; - - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - - return config; - } - - /** - * 字数属性 - */ - private getWordCountPropConfig(propertyData: any, showPosition = 'card'): ElementPropertyConfig { - - const countProperties = [ - { - propertyID: 'enableWordCount', - propertyName: '启用字数统计', - propertyType: 'select', - iterator: [{ key: true, value: '启用' }, { key: false, value: '不启用' }], - description: '是否启用字数统计' - }, - { - propertyID: 'countType', - propertyName: '统计方式', - propertyType: 'select', - description: '字数统计方式', - iterator: [{ key: 'surplus', value: '显示剩余字数' }, { key: 'length', value: '显示已输入字数' }], - visible: propertyData.enableWordCount - }, - { - propertyID: 'onlyShowInDialog', - propertyName: '字数显示位置', - propertyType: 'select', - description: '字数显示位置', - iterator: [{ key: true, value: '仅在弹窗中显示' }, { key: false, value: '在组件本身与弹窗中同时显示' }], - visible: propertyData.enableWordCount && propertyData.editType === 'dialog' - } - ]; - - const config = { - categoryId: 'wordCount', - categoryName: '字数统计', - properties: countProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enableWordCount': { - const countType = this.properties.find(p => p.propertyID === 'countType'); - if (countType) { - countType.visible = changeObject.propertyValue; - } - const onlyShowInDialog = this.properties.find(p => p.propertyID === 'onlyShowInDialog'); - if (onlyShowInDialog) { - onlyShowInDialog.visible = changeObject.propertyValue && propertyData.editType === 'dialog'; - } - break; - } - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string): ElementPropertyConfig[] { - const self = this; - - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - - this.propertyConfig.push(behaviorConfig); - - // 字数统计 - const wordCountConfig = this.getWordCountPropConfig(propertyData, 'gridFieldEditor'); - if (wordCountConfig) { - this.propertyConfig.push(wordCountConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 字数属性 - const wordCountPropConfig = this.getWordCountPropConfig(propertyData, 'tableTdEditor'); - this.propertyConfig.push(wordCountPropConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/schema/schema.ts deleted file mode 100644 index 61c7b65e2c23688911676b6ee77f13fd3370c3ea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/schema/schema.ts +++ /dev/null @@ -1,36 +0,0 @@ -export const MultiTextBoxSchema = { - id: 'multiTextBox', - type: 'MultiTextBox', - titleSourceType: 'static', - title: '多行文本框', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - maxLength: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - isTextArea: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - editType: 'default', - dialogWidth: 500, - dialogHeight: 400, - autoHeight: false, - maxHeight: 500, - enableWordCount: false, - countType: 'surplus', - onlyShowInDialog: false, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - useComments: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/form.ts deleted file mode 100644 index 0c566a3d799f9f6b32c082128ae0ce1078f7b114..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/form.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - - -export default (ctx: any) => { - const styleHeight = ctx.component.size && ctx.component.size.height ? 'height:' + ctx.component.size.height + 'px' : ''; - - let inputEle = ``; - - // 启用扩展区域 - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputEle = InputAppendUtils.getMultiTextBoxAppendElement(ctx, inputEle); - } - return ` -
    - ${inputEle} -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/multi-text-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/component/fd-number-range.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/component/fd-number-range.ts deleted file mode 100644 index 9f3baea3b5259bbad6d46a13cf5ba8025b11902d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/component/fd-number-range.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { NumberRangeSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { NumberRangeProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeNumberRangeProp } from '../property/nocode-property-config'; - -export default class FdNumberRangeComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return NumberRangeSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('NumberRange', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeNumberRangeProp = new NoCodeNumberRangeProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: NumberRangeProp = new NumberRangeProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/export.ts deleted file mode 100644 index f1906d9129fa6a25c3d09591bd6806c847d1f562..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdNumberRangeComponent from './component/fd-number-range'; -import { NumberRangeSchema } from './schema/schema'; - -import FdNumberRangeTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const NumberRange: ComponentExportEntity = { - type: 'NumberRange', - component: FdNumberRangeComponent, - template: FdNumberRangeTemplates, - metadata: cloneDeep(NumberRangeSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/nocode-property-config.ts deleted file mode 100644 index 7a8a61b02d0774ee7402ed6b993378e1685ed6c0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/nocode-property-config.ts +++ /dev/null @@ -1,319 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeNumberRangeProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig: ElementPropertyConfig[] = []; - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - } - - /** - * 外观属性 - */ - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - - appearanceProperties.push( - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式设置', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - }, - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - // 获取绑定字段schema中的长度、精度属性 - let maxLength; - let maxPrecision; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - maxPrecision = fieldInfo.schemaField.type.precision; - } - } - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - - { - propertyID: 'maxLength', - propertyName: '取值最大长度', - propertyType: 'number', - description: '取值最大长度设置', - decimals: 0, - min: 0, - max: maxLength - }, - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'number', - description: '数字最大值设置', - min: propertyData.minValue ? propertyData.minValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'number', - description: '数字最小值设置', - max: propertyData.maxValue ? propertyData.maxValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'precisionSourceType', - propertyName: '精度类型', - propertyType: 'select', - description: '数字精度类型设置', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - visible: maxPrecision !== 0 - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - max: maxPrecision, - visible: propertyData.precisionSourceType === 'static', - }, - { - propertyID: 'precisionDataSource', - propertyName: '精度数据源', - propertyType: 'unity', - description: '数字精度数据源设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - } - }, - visible: propertyData.precisionSourceType === 'dynamic' - }, - { - propertyID: 'useThousands', - propertyName: '使用千分值', - propertyType: 'boolean', - description: '是否使用千分值', - defaultValue: true - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'modal', - description: '格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: number): string | number => {\r\n return '$' + value;\r\n}\r\n" - } - }, - { - propertyID: 'parser', - propertyName: '反格式化', - propertyType: 'modal', - description: '反格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: string):number => {\r\n return Number(value.substring(1));\r\n}\r\n" - } - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'precision': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.decimals = changeObject.propertyValue; - } - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.decimals = changeObject.propertyValue; - } - break; - } - case 'precisionSourceType': { - const precision = this.properties.find(p => p.propertyID === 'precision'); - if (precision) { - precision.visible = changeObject.propertyValue === 'static'; - } - const precisionDataSource = this.properties.find(p => p.propertyID === 'precisionDataSource'); - if (precisionDataSource) { - precisionDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - break; - } - } - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/property-config.ts deleted file mode 100644 index 864d7c7a862847fbeea7f02dff57ab771d7af48b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/property/property-config.ts +++ /dev/null @@ -1,341 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class NumberRangeProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - /** - * 外观属性 - */ - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - - appearanceProperties.push( - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式设置', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }] - }, - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - // 获取绑定字段schema中的长度、精度属性 - let maxLength; - let maxPrecision; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - maxPrecision = fieldInfo.schemaField.type.precision; - } - } - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - - { - propertyID: 'maxLength', - propertyName: '取值最大长度', - propertyType: 'number', - description: '取值最大长度设置', - decimals: 0, - min: 0, - max: maxLength - }, - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'number', - description: '数字最大值设置', - min: propertyData.minValue ? propertyData.minValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'number', - description: '数字最小值设置', - max: propertyData.maxValue ? propertyData.maxValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'precisionSourceType', - propertyName: '精度类型', - propertyType: 'select', - description: '数字精度类型设置', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - visible: maxPrecision !== 0 - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度设置', - decimals: 0, - min: 0, - max: maxPrecision, - visible: propertyData.precisionSourceType === 'static', - }, - { - propertyID: 'precisionDataSource', - propertyName: '精度数据源', - propertyType: 'unity', - description: '数字精度数据源设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - } - }, - visible: propertyData.precisionSourceType === 'dynamic' - }, - { - propertyID: 'useThousands', - propertyName: '使用千分值', - propertyType: 'boolean', - description: '是否使用千分值', - defaultValue: true - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'modal', - description: '格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: number): string | number => {\r\n return '$' + value;\r\n}\r\n" - } - }, - { - propertyID: 'parser', - propertyName: '反格式化', - propertyType: 'modal', - description: '反格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: string):number => {\r\n return Number(value.substring(1));\r\n}\r\n" - } - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'precision': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.decimals = changeObject.propertyValue; - } - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.decimals = changeObject.propertyValue; - } - break; - } - case 'precisionSourceType': { - const precision = this.properties.find(p => p.propertyID === 'precision'); - if (precision) { - precision.visible = changeObject.propertyValue === 'static'; - } - const precisionDataSource = this.properties.find(p => p.propertyID === 'precisionDataSource'); - if (precisionDataSource) { - precisionDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - break; - } - } - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/schema/schema.ts deleted file mode 100644 index bcf720ca449de39bf302f16a70fe2dc7e802e6e0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/schema/schema.ts +++ /dev/null @@ -1,42 +0,0 @@ -export const NumberRangeSchema = { - id: 'NumberRange', - type: 'NumberRange', - titleSourceType: 'static', - title: '数值框', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - textAlign: 'left', - precisionSourceType: 'static', - precision: null, - validation: null, - maxValue: null, - minValue: null, - step: 1, - useThousands: true, - formatter: null, - parser: null, - canNull: true, - bigNumber: false, - maxLength: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - isTextArea: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - localization: false, - showZero: true, - showButton: true, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/form.ts deleted file mode 100644 index 841e14af617b12643ac9a6687b8bf3793e444f70..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/form.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - -export default (ctx: any) => { - // 启用扩展区域 - let inputAppendEle = ''; - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - const beginPlaceHolder = ctx.component && ctx.component.beginPlaceHolder || '请输入开始数字'; - const endPlaceHolder = ctx.component && ctx.component.endPlaceHolder || '请输入结束数字'; - return ` -
    -
    -
    -
    -
    - -
    - ~ -
    -
    -
    - ${inputAppendEle} -
    -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/number-range/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/component/fd-numeric-box.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/component/fd-numeric-box.ts deleted file mode 100644 index 5218af4eb12fd4557d79704800f7578f93aee8f9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/component/fd-numeric-box.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { NumericBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { NumericBoxProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeNumericBoxProp } from '../property/nocode-property-config'; - - -export default class FdNumericBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - getDefaultSchema(): any { - return NumericBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('NumericBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeNumericBoxProp = new NoCodeNumericBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: NumericBoxProp = new NumericBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/export.ts deleted file mode 100644 index 7d18364b788198711c1952a90e9c046622b376d9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import FdNumericBoxComponent from './component/fd-numeric-box'; -import { NumericBoxSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdNumericBoxTemplates from './templates'; - - -export const NumericBox: ComponentExportEntity = { - type: 'NumericBox', - component: FdNumericBoxComponent, - template: FdNumericBoxTemplates, - metadata: NumericBoxSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/nocode-property-config.ts deleted file mode 100644 index 90a58d833178802ff49f3043d78e61230fe42e15..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/nocode-property-config.ts +++ /dev/null @@ -1,264 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeNumericBoxProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig= []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - // const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - }, - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - // 获取绑定字段长度和精度 - let maxLength; - let maxPrecision; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - maxPrecision = fieldInfo.schemaField.type.precision; - } - } - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'number', - description: '数字最大值', - min: propertyData.minValue ? propertyData.minValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'number', - description: '数字最小值', - max: propertyData.maxValue ? propertyData.maxValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'precisionSourceType', - propertyName: '精度类型', - propertyType: 'select', - description: '精度类型选择', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - visible: propertyData.controlSource === 'Farris' && maxPrecision !== 0, - controlSource: 'Farris' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度', - decimals: 0, - min: 0, - max: maxPrecision, - visible: propertyData.controlSource === 'Farris' && propertyData.precisionSourceType === 'static', - controlSource: 'Farris' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'precision': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.decimals = changeObject.propertyValue; - } - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.decimals = changeObject.propertyValue; - } - break; - } - case 'precisionSourceType': { - const precision = this.properties.find(p => p.propertyID === 'precision'); - if (precision) { - precision.visible = propertyData.controlSource === 'Farris' && changeObject.propertyValue === 'static'; - } - const precisionDataSource = this.properties.find(p => p.propertyID === 'precisionDataSource'); - if (precisionDataSource) { - precisionDataSource.visible = - propertyData.controlSource === 'Farris' && changeObject.propertyValue === 'dynamic'; - } - break; - } - - } - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - // const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - // this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - // const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - // this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/property-config.ts deleted file mode 100644 index 81e4986d4ec3fb3eadc6626db04e9dd9aac527ff..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/property/property-config.ts +++ /dev/null @@ -1,437 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class NumericBoxProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - public getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - basicProperties.push( - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Farris', value: 'Farris' }, { key: 'Kendo', value: 'Kendo' }], - refreshPanelAfterChanged: true, - visible: showPosition === 'card' && propertyData.controlSource !== 'Farris' - } - ); - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - case 'controlSource': { - - // 变更【外观分类】下的属性 - const newAppearancePropConfig = self.getAppearancePropConfig(propertyData, viewModelId); - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = self.getBehaviorPropConfig(propertyData, viewModelId); - const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - } - } - - }, - - }; - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - let appearanceProperties = []; - - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - - appearanceProperties.push( - { - propertyID: 'textAlign', - propertyName: '数据水平对齐方式', - propertyType: 'select', - description: '数据水平对齐方式设置', - defaultValue: 'left', - iterator: [{ key: 'left', value: '靠左' }, { key: 'right', value: '靠右' }, { key: 'center', value: '居中' }], - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'formatter', - propertyName: '格式化', - propertyType: 'modal', - description: '格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: number): string | number => {\r\n return '$' + value;\r\n}\r\n" - }, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'parser', - propertyName: '反格式化', - propertyType: 'modal', - description: '反格式化设置', - editor: CodeEditorComponent, - editorParams: { - language: 'javascript', - exampleCode: - "\r\n (value: string):number => {\r\n return Number(value.substring(1));\r\n}\r\n" - }, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - } - ); - } - - appearanceProperties.push( - { - propertyID: 'showButton', - propertyName: '显示微调按钮', - propertyType: 'boolean', - description: '是否显示微调按钮', - controlSource: 'Farris' - }, - { - propertyID: 'showZero', - propertyName: '显示0值', - propertyType: 'boolean', - description: '是否显示0值', - controlSource: 'Farris' - }, - { - propertyID: 'canNull', - propertyName: '显示空值', - propertyType: 'boolean', - description: '是否允许显示空值' - }, - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'string', - description: '格式设置', - visible: !propertyData.controlSource || propertyData.controlSource === 'Kendo', - controlSource: 'Kendo' - } - ); - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - }, - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - // 获取绑定字段长度和精度 - let maxLength; - let maxPrecision; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - maxPrecision = fieldInfo.schemaField.type.precision; - } - } - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - behaviorProperties.push( - { - propertyID: 'maxLength', - propertyName: '取值最大长度', - propertyType: 'number', - description: '数字取值最大长度', - decimals: 0, - min: 0, - max: maxLength - }, - { - propertyID: 'maxValue', - propertyName: '最大值', - propertyType: 'number', - description: '数字最大值', - min: propertyData.minValue ? propertyData.minValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'minValue', - propertyName: '最小值', - propertyType: 'number', - description: '数字最小值', - max: propertyData.maxValue ? propertyData.maxValue : undefined, - decimals: propertyData.precision, - isBigNumber: propertyData.bigNumber - }, - { - propertyID: 'step', - propertyName: '步长', - propertyType: 'number', - description: '步长设置', - min: 0 - }, - { - propertyID: 'precisionSourceType', - propertyName: '精度类型', - propertyType: 'select', - description: '精度类型选择', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - visible: propertyData.controlSource === 'Farris' && maxPrecision !== 0, - controlSource: 'Farris' - }, - { - propertyID: 'precision', - propertyName: '精度', - propertyType: 'number', - description: '数字精度', - decimals: 0, - min: 0, - max: maxPrecision, - visible: propertyData.controlSource === 'Farris' && propertyData.precisionSourceType === 'static', - controlSource: 'Farris' - }, - { - propertyID: 'precisionDataSource', - propertyName: '精度', - propertyType: 'unity', - description: '数字精度数据源设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService) - } - }, - visible: propertyData.controlSource === 'Farris' && propertyData.precisionSourceType === 'dynamic' - }, - { - propertyID: 'useThousands', - propertyName: '使用千分值', - propertyType: 'boolean', - description: '是否使用千分值', - defaultValue: true, - visible: propertyData.controlSource === 'Farris', - controlSource: 'Farris' - }, - { - propertyID: 'bigNumber', - propertyName: '是否大数值', - propertyType: 'boolean', - description: '是否为大数值', - readonly: true - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'maxValue': { - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.max = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'minValue': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.min = changeObject.propertyValue ? changeObject.propertyValue : undefined; - } - break; - } - case 'precision': { - const maxProp = this.properties.find(p => p.propertyID === 'maxValue'); - if (maxProp) { - maxProp.decimals = changeObject.propertyValue; - } - const minProp = this.properties.find(p => p.propertyID === 'minValue'); - if (minProp) { - minProp.decimals = changeObject.propertyValue; - } - break; - } - case 'precisionSourceType': { - const precision = this.properties.find(p => p.propertyID === 'precision'); - if (precision) { - precision.visible = propertyData.controlSource === 'Farris' && changeObject.propertyValue === 'static'; - } - const precisionDataSource = this.properties.find(p => p.propertyID === 'precisionDataSource'); - if (precisionDataSource) { - precisionDataSource.visible = - propertyData.controlSource === 'Farris' && changeObject.propertyValue === 'dynamic'; - } - break; - } - - } - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/schema/schema.ts deleted file mode 100644 index 6b22146087367b80222ef2d459aee53cfa027d05..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/schema/schema.ts +++ /dev/null @@ -1,45 +0,0 @@ -export const NumericBoxSchema = { - id: 'numericBox', - type: 'NumericBox', - titleSourceType: 'static', - title: '数值框', - controlSource: 'Farris', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - textAlign: 'left', - precisionSourceType: 'static', - precision: null, - validation: null, - maxValue: null, - minValue: null, - step: 1, - useThousands: true, - formatter: null, - parser: null, - canNull: true, - bigNumber: false, - maxLength: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - isTextArea: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - localization: false, - showZero: true, - showButton: true, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500 -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/form.ts deleted file mode 100644 index 7da5528a2ce9e875fb16879a3e43139afbe7067c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/form.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - -export default (ctx: any) => { - let inputAppendEle = ''; - - // 启用扩展区域 - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - - return ` -
    -
    -
    - - -
    - - -
    - ${inputAppendEle} -
    -
    -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/numeric-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/component/fd-radio-group.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/component/fd-radio-group.ts deleted file mode 100644 index 13439cc747fbc54f757fefcfe6ef0e2b5563222d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/component/fd-radio-group.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { RadioGroupSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { RadioGroupProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeRadioGroupProp } from '../property/nocode-property-config'; - -export default class FdRadioGroupComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - getDefaultSchema(): any { - return RadioGroupSchema; - } - - getStyles(): string { - return 'display: inline-block;'; - } - - render(): any { - - return super.render(this.renderTemplate('RadioGroup', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeRadioGroupProp = new NoCodeRadioGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: RadioGroupProp = new RadioGroupProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['isHorizontal', 'enumData']); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/export.ts deleted file mode 100644 index c4e6c986ce52726fb71acd9c417a9f583ca24a44..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdRadioGroupComponent from './component/fd-radio-group'; -import { RadioGroupSchema } from './schema/schema'; - -import FdRadioGroupTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const RadioGroup: ComponentExportEntity = { - type: 'RadioGroup', - component: FdRadioGroupComponent, - template: FdRadioGroupTemplates, - metadata: cloneDeep(RadioGroupSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/nocode-property-config.ts deleted file mode 100644 index 4dec15d9c6d9fa74d3c392f730165e190f0f9b76..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/nocode-property-config.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { DesignerEnvType, FormSchemaEntityFieldType$Type, UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeRadioGroupProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - - } - - - /** - * 外观属性 - */ - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - - let appearanceProperties = []; - if (showPosition === 'card') { - const commonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId); - appearanceProperties = appearanceProperties.concat(commonProps); - } - - // appearanceProperties.push( - // { - // propertyID: 'isHorizontal', - // propertyName: '水平布局', - // propertyType: 'boolean', - // description: '是否水平布局' - // } - // ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - const behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - - behaviorProperties.push( - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: propertyData.dataSourceType === 'static' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - getEnumDataConfig(propertyData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!propertyData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: false - } - }; - // 判断枚举数据是否只读 - editorConfig.editorParams.readonly = this.checkEnumDataReadonly(propertyData, viewModelId); - - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (propertyData.binding.type === 'Form') { - const dgVM = this.dgVMService.getDgViewModel(viewModelId); - const dgVMField = dgVM.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField.type.name === 'Enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - } - editorConfig.editorParams.dynamicMappingKeys = true; - editorConfig.editorParams.valueField = propertyData.valueField; - editorConfig.editorParams.nameField = propertyData.textField; - - return { editorConfig, dynamicMappingKeys: true }; - } - - - - /** - * 判断枚举数据是否只读:运行时定制环境中的下拉框若绑定基础表单的枚举字段,则不可新增、删除、修改枚举值 - * @param propertyData 下拉框控件属性值 - * @param viewModelId 控件所在视图模型id - */ - private checkEnumDataReadonly(propertyData: any, viewModelId: string): boolean { - if (this.formBasicService.envType !== DesignerEnvType.runtimeCustom) { - return false; - } - // 没有绑定信息或者绑定变量 - if (!propertyData.binding || propertyData.binding.type !== 'Form') { - return false; - } - - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField && fieldInfo.schemaField.type && - fieldInfo.schemaField.type.$type === FormSchemaEntityFieldType$Type.EnumType) { - const code = fieldInfo.schemaField.code; - const label = fieldInfo.schemaField.label; - - // 扩展字段label的规则:'ext_' + code + '_Lv9',不符合规则的字段认为是基础表单字段 - if (label !== 'ext_' + code + '_Lv9') { - return true; - } - } - - return false; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/property-config.ts deleted file mode 100644 index 755c24304abe39d687879d370af30bb68bbcbd08..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/property/property-config.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { DesignerEnvType, FormSchemaEntityFieldType$Type, UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class RadioGroupProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - } - - - /** - * 外观属性 - */ - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const self = this; - - let appearanceProperties = []; - if (showPosition === 'card') { - const commonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId); - appearanceProperties = appearanceProperties.concat(commonProps); - } - - appearanceProperties.push( - { - propertyID: 'isHorizontal', - propertyName: '水平布局', - propertyType: 'boolean', - description: '是否水平布局' - } - ); - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 行为属性 - */ - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - const behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - - behaviorProperties.push( - { - propertyID: 'dataSourceType', - propertyName: '数据源类型', - propertyType: 'select', - description: '数据源类型选择', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - defaultValue: 'static' - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: propertyData.dataSourceType === 'static' - }, - { - propertyID: 'bindDataSource', - propertyName: '绑定数据源', - propertyType: 'unity', - description: '绑定数据源设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Array', - newVariablePrefix: '' - } - }, - visible: propertyData.dataSourceType === 'dynamic', - }, - { - propertyID: 'valueField', - propertyName: '枚举值字段', - propertyType: 'string', - description: '枚举值字段设置', - readonly: propertyData.dataSourceType === 'static', - }, - { - propertyID: 'textField', - propertyName: '枚举名称字段', - propertyType: 'string', - description: '枚举名称字段设置', - readonly: propertyData.dataSourceType === 'static', - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - if (!changeObject) { - return; - } - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - switch (changeObject && changeObject.propertyID) { - case 'dataSourceType': { - const enumData = this.properties.find(p => p.propertyID === 'enumData'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - const valueField = this.properties.find(p => p.propertyID === 'valueField'); - const textField = this.properties.find(p => p.propertyID === 'textField'); - - if (enumData) { - enumData.visible = changeObject.propertyValue === 'static'; - } - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue !== 'static'; - } - if (valueField) { - valueField.readonly = changeObject.propertyValue === 'static'; - } - if (textField) { - textField.readonly = changeObject.propertyValue === 'static'; - } - - - break; - } - case 'enumData': { - if (enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.valueField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - changeObject.relateChangeProps = [{ - propertyID: 'valueField', - propertyValue: propertyData.valueField - }, - { - propertyID: 'textField', - propertyValue: propertyData.textField - }]; - break; - } - - } - } - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - getEnumDataConfig(propertyData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!propertyData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: false - } - }; - // 判断枚举数据是否只读 - editorConfig.editorParams.readonly = this.checkEnumDataReadonly(propertyData, viewModelId); - - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (propertyData.binding.type === 'Form') { - const dgVM = this.dgVMService.getDgViewModel(viewModelId); - const dgVMField = dgVM.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField.type.name === 'Enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - } - editorConfig.editorParams.dynamicMappingKeys = true; - editorConfig.editorParams.valueField = propertyData.valueField; - editorConfig.editorParams.nameField = propertyData.textField; - - return { editorConfig, dynamicMappingKeys: true }; - } - - - - /** - * 判断枚举数据是否只读:运行时定制环境中的下拉框若绑定基础表单的枚举字段,则不可新增、删除、修改枚举值 - * @param propertyData 下拉框控件属性值 - * @param viewModelId 控件所在视图模型id - */ - private checkEnumDataReadonly(propertyData: any, viewModelId: string): boolean { - if (this.formBasicService.envType !== DesignerEnvType.runtimeCustom) { - return false; - } - // 没有绑定信息或者绑定变量 - if (!propertyData.binding || propertyData.binding.type !== 'Form') { - return false; - } - - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField && fieldInfo.schemaField.type && - fieldInfo.schemaField.type.$type === FormSchemaEntityFieldType$Type.EnumType) { - const code = fieldInfo.schemaField.code; - const label = fieldInfo.schemaField.label; - - // 扩展字段label的规则:'ext_' + code + '_Lv9',不符合规则的字段认为是基础表单字段 - if (label !== 'ext_' + code + '_Lv9') { - return true; - } - } - - return false; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/schema/schema.ts deleted file mode 100644 index 823e8424096068f0ac15ab12cd8f5e9b3ed4a392..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/schema/schema.ts +++ /dev/null @@ -1,26 +0,0 @@ -export const RadioGroupSchema ={ - id: '', - type: 'RadioGroup', - titleSourceType: 'static', - title: '单选组', - binding: null, - placeHolder: '', - enumData: null, - isHorizontal: true, - readonly: false, - require: false, - disable: false, - appearance: null, - size: null, - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - dataSourceType: 'static', - textField: 'name', - valueField: 'value' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/form.ts deleted file mode 100644 index be70b4bff0f7935c4c58112ed53664c3decab182..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/form.ts +++ /dev/null @@ -1,19 +0,0 @@ - - -export default (ctx: any) => { - const textField = ctx.component.textField || 'name'; - const valueField = ctx.component.valueField || 'value'; - const radioDatas = ctx.component.enumData && ctx.component.enumData.length > 0 ? ctx.component.enumData : [{ value: '1', name: '选项1' }]; - let radioItems = ''; - radioDatas.forEach((item, index) => { - radioItems += `
    `; - radioItems += ` `; - radioItems += `
    `; - }); - let resultStr = `
    ${radioItems}
    `; - return resultStr; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/radio-group/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/component/fd-rich-text-box.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/component/fd-rich-text-box.ts deleted file mode 100644 index e30fa80ad6e53be45751692df212eac8e4d12d16..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/component/fd-rich-text-box.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { RichTextBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { RichTextBoxProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeRichTextBoxProp } from '../property/nocode-property-config'; - - -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdRichTextBoxComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return RichTextBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('RichTextBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeRichTextBoxProp = new NoCodeRichTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: RichTextBoxProp = new RichTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['controlSource']) - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/export.ts deleted file mode 100644 index 8a675e6f8e323fe1bd162269cf3eda434abf1f7f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdRichTextBoxComponent from './component/fd-rich-text-box'; -import { RichTextBoxSchema } from './schema/schema'; - -import FdRichTextBoxTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const RichTextBox: ComponentExportEntity = { - type: 'RichTextBox', - component: FdRichTextBoxComponent, - template: FdRichTextBoxTemplates, - metadata: cloneDeep(RichTextBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/nocode-property-config.ts deleted file mode 100644 index 0ed1a8eb0d4f9b2d104164f79b8ee8ce9012e09a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/nocode-property-config.ts +++ /dev/null @@ -1,286 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, KeyMap, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { ItemCollectionConverter, ItemCollectionEditorComponent, StyleEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -import { RichTextEditorComponent } from '@farris/rich-text-designer'; - -export class NoCodeRichTextBoxProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - - // 格式校验属性 - // const formatPropConfig = this.getformatValidation(propertyData, this.viewModelId); - // propertyConfig.push(formatPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - - // protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - // let appearanceProperties = []; - // if (showPosition === 'card' || showPosition === 'tableTdEditor') { - // appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - // } - // appearanceProperties.push( - // { - // propertyID: 'controlSource', - // propertyName: '主题类型', - // propertyType: 'select', - // description: '组件的控件主题类型', - // iterator: [{ key: 'concise', value: '简洁' }, { key: 'advanced', value: '高级' }] - // }, - // { - // propertyID: 'theme', - // propertyName: '编辑器主题', - // propertyType: 'select', - // description: '控件主题类型为简洁时编辑器主题', - // iterator: [{ key: 'snow', value: 'snow' }, { key: 'bubble', value: 'bubble' }], - // controlSource: 'concise' - // }, - // { - // propertyID: 'minLength', - // propertyName: '最小长度', - // propertyType: 'number', - // description: '控件主题类型为简洁时编辑器最小长度', - // decimals: 0, - // min: 0, - // controlSource: 'concise' - // }, - // { - // propertyID: 'customToolbarPosition', - // propertyName: '自定义工具条位置', - // propertyType: 'select', - // description: '控件主题类型为简洁时工具条位置设置', - // iterator: [{ key: 'top', value: '顶部' }, { key: 'bottom', value: '底部' }], - // controlSource: 'concise' - // }, - // { - // propertyID: 'customEditorStyle', - // propertyName: '自定义编辑区样式', - // propertyType: 'modal', - // description: '控件主题类型为简洁时编辑区样式设置', - // editor: StyleEditorComponent, - // showClearButton: true, - // controlSource: 'concise' - // }, - // { - // propertyID: 'fontFamilyList', - // propertyName: '字体列表', - // propertyType: 'modal', - // description: '控件主题类型为高级时字体可选列表', - // editor: ItemCollectionEditorComponent, - // converter: new ItemCollectionConverter(), - // editorParams: { - // columns: [ - // { field: 'value', title: '字体', editor: { type: EditorTypes.TEXTBOX } }, - // ], - // requiredFields: ['value'], - // uniqueFields: ['value'], - // modalTitle: '字体列表', - // canEmpty: true, - // isSimpleArray: true - // }, - // showClearButton: true, - // controlSource: 'advanced' - // }, - // { - // propertyID: 'defaultFontFamily', - // propertyName: '默认字体', - // propertyType: 'select', - // description: '控件主题类型为高级时默认字体类型', - // iterator: this.getDefaultFontFamilyIterator(propertyData.fontFamilyList), - // controlSource: 'advanced' - // }, - // { - // propertyID: 'customToolbar', - // propertyName: '启用自定义功能项', - // propertyType: 'boolean', - // defaultValue: false - // }, - // { - // propertyID: 'toolbar', - // propertyName: '自定义功能项配置', - // propertyType: 'modal', - // visible: propertyData.customToolbar, - // editor: RichTextEditorComponent, - // editorParams: { - // editorType: propertyData.controlSource, - // enablePreview: false, - // enableCode: false - // }, - // beforeOpenModal(): BeforeOpenModalResult { - // // 取类型最新值 - // this.editorParams.editorType = propertyData.controlSource; - // return { result: true, message: '' }; - // } - // } - // ); - // appearanceProperties.forEach((p: PropertyEntity) => { - // if (p.controlSource) { - // p.visible = propertyData.controlSource === p.controlSource; - // } - // }); - - // const self = this; - // const config = { - // categoryId: 'appearance', - // categoryName: '外观', - // properties: appearanceProperties, - // setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - // if (!changeObject) { - // return; - // } - // self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - // switch (changeObject.propertyID) { - // case 'controlSource': { - // this.properties.map(p => { - // if (p.controlSource) { - // p.visible = p.controlSource === changeObject.propertyValue; - // } - // }); - // propertyData.toolbar = null; - // break; - // } - // case 'fontFamilyList': { - // const defaultFontFamily = this.properties.find(p => p.propertyID === 'defaultFontFamily'); - // if (defaultFontFamily) { - // defaultFontFamily.iterator = self.getDefaultFontFamilyIterator(changeObject.propertyValue); - // } - // if (changeObject.propertyValue) { - // propertyData.defaultFontFamily = changeObject.propertyValue.includes(propertyData.defaultFontFamily) ? - // propertyData.defaultFontFamily : ''; - // } else { - // propertyData.defaultFontFamily = ''; - // } - - // break; - // } - // case 'customToolbar': { - // const toolbar = this.properties.find(p => p.propertyID === 'toolbar'); - // if (toolbar) { - // toolbar.visible = changeObject.propertyValue; - // } - // break; - // } - // } - // } - // }; - - // if (showPosition !== 'card') { - // Object.assign(config, { - // categoryId: showPosition + '_' + config.categoryId, - // propertyData, - // enableCascade: true, - // parentPropertyID: 'editor', - // tabId: showPosition, - // tabName: '编辑器' - // }); - // } - // return config; - // } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - // private getDefaultFontFamilyIterator(fontFamilyList: any[]): KeyMap[] { - // if (!fontFamilyList || fontFamilyList.length === 0) { - // return []; - // } - // const iterators = []; - // fontFamilyList.forEach(font => { - // iterators.push({ - // key: font, - // value: font - // }); - // }); - // return iterators; - // } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - // const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - // this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/property-config.ts deleted file mode 100644 index cce4a4575674e984fb0e5e439c50022d8790436f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/property/property-config.ts +++ /dev/null @@ -1,288 +0,0 @@ -import { BeforeOpenModalResult, ElementPropertyConfig, KeyMap, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { ItemCollectionConverter, ItemCollectionEditorComponent, StyleEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { RichTextEditorComponent } from '@farris/rich-text-designer'; - -export class RichTextBoxProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - } - const placeHolder = appearanceProperties.find(p => p.propertyID === 'placeHolder'); - if (placeHolder) { - placeHolder.controlSource = 'concise'; - } - appearanceProperties.push( - { - propertyID: 'controlSource', - propertyName: '主题类型', - propertyType: 'select', - description: '组件的控件主题类型', - iterator: [{ key: 'concise', value: '简洁' }, { key: 'advanced', value: '高级' }] - }, - { - propertyID: 'theme', - propertyName: '编辑器主题', - propertyType: 'select', - description: '控件主题类型为简洁时编辑器主题', - iterator: [{ key: 'snow', value: 'snow' }, { key: 'bubble', value: 'bubble' }], - controlSource: 'concise' - }, - { - propertyID: 'minLength', - propertyName: '最小长度', - propertyType: 'number', - description: '控件主题类型为简洁时编辑器最小长度', - decimals: 0, - min: 0, - controlSource: 'concise' - }, - { - propertyID: 'customToolbarPosition', - propertyName: '自定义工具条位置', - propertyType: 'select', - description: '控件主题类型为简洁时工具条位置设置', - iterator: [{ key: 'top', value: '顶部' }, { key: 'bottom', value: '底部' }], - controlSource: 'concise' - }, - { - propertyID: 'customEditorStyle', - propertyName: '自定义编辑区样式', - propertyType: 'modal', - description: '控件主题类型为简洁时编辑区样式设置', - editor: StyleEditorComponent, - showClearButton: true, - controlSource: 'concise' - }, - { - propertyID: 'fontFamilyList', - propertyName: '字体列表', - propertyType: 'modal', - description: '控件主题类型为高级时字体可选列表', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - editorParams: { - columns: [ - { field: 'value', title: '字体', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value'], - uniqueFields: ['value'], - modalTitle: '字体列表', - canEmpty: true, - isSimpleArray: true - }, - showClearButton: true, - controlSource: 'advanced' - }, - { - propertyID: 'defaultFontFamily', - propertyName: '默认字体', - propertyType: 'select', - description: '控件主题类型为高级时默认字体类型', - iterator: this.getDefaultFontFamilyIterator(propertyData.fontFamilyList), - controlSource: 'advanced' - }, - { - propertyID: 'customToolbar', - propertyName: '启用自定义功能项', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'toolbar', - propertyName: '自定义功能项配置', - propertyType: 'modal', - visible: propertyData.customToolbar, - editor: RichTextEditorComponent, - editorParams: { - editorType: propertyData.controlSource, - enablePreview: false, - enableCode: false - }, - beforeOpenModal(): BeforeOpenModalResult { - // 取类型最新值 - this.editorParams.editorType = propertyData.controlSource; - return { result: true, message: '' }; - } - } - ); - appearanceProperties.forEach((p: PropertyEntity) => { - if (p.controlSource) { - p.visible = propertyData.controlSource === p.controlSource; - } - }); - - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - switch (changeObject.propertyID) { - case 'controlSource': { - this.properties.map(p => { - if (p.controlSource) { - p.visible = p.controlSource === changeObject.propertyValue; - } - }); - propertyData.toolbar = null; - break; - } - case 'fontFamilyList': { - const defaultFontFamily = this.properties.find(p => p.propertyID === 'defaultFontFamily'); - if (defaultFontFamily) { - defaultFontFamily.iterator = self.getDefaultFontFamilyIterator(changeObject.propertyValue); - } - if (changeObject.propertyValue) { - propertyData.defaultFontFamily = changeObject.propertyValue.includes(propertyData.defaultFontFamily) ? - propertyData.defaultFontFamily : ''; - } else { - propertyData.defaultFontFamily = ''; - } - - break; - } - case 'customToolbar': { - const toolbar = this.properties.find(p => p.propertyID === 'toolbar'); - if (toolbar) { - toolbar.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - private getDefaultFontFamilyIterator(fontFamilyList: any[]): KeyMap[] { - if (!fontFamilyList || fontFamilyList.length === 0) { - return []; - } - const iterators = []; - fontFamilyList.forEach(font => { - iterators.push({ - key: font, - value: font - }); - }); - return iterators; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/schema/schema.ts deleted file mode 100644 index 6e4d15ebfe5d3014975544977cf3a6b8ab85f016..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/schema/schema.ts +++ /dev/null @@ -1,37 +0,0 @@ -export const RichTextBoxSchema = { - id: 'richTextBox', - type: 'RichTextBox', - titleSourceType: 'static', - title: '富文本框', - controlSource: 'concise', - appearance: null, - size: null, - customEditorStyle: '', - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - theme: 'snow', - maxLength: null, - minLength: null, - customToolbarPosition: 'top', - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - isTextArea: true, - fontFamilyList: [ - 'Microsoft YaHei', 'Helvetica Neue', 'PingFang SC', 'sans-serif', 'simsun', 'serif', - 'SimHei', 'arial', 'helvetica', 'arial black', 'avant garde', 'book antiqua', 'palatino', 'FangSong' - ], - defaultFontFamily: 'Microsoft YaHei', - customToolbar: false, - toolbar: null, - autoHeight: false, - maxHeight: 500 -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/form.ts deleted file mode 100644 index 15fafaf8b27f7409bba5cf75a5dc2abc768b4c39..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/form.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; - - -export default (ctx: any) => { - let srcStr = `${ControlCssLoaderUtils.getAssetsUrl()}/images/input/rich-text-box/`; - if (ctx.component.controlSource === 'concise') { - srcStr += 'normal.jpg'; - } - if (ctx.component.controlSource === 'advanced') { - srcStr += 'advanced.jpg'; - } - return ` -
    - -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/rich-text-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/search/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/search/export.ts deleted file mode 100644 index 6b3b3462f000127442955745873756d4aee4c034..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/search/export.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdSearchTemplates from './templates'; -/** - * 搜索控件,目前只用于筛选条和筛选方案,不单独使用。 - */ -export const Search: ComponentExportEntity = { - type: 'Search', - template: FdSearchTemplates, - metadata: {} -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/form.ts deleted file mode 100644 index ded2001fab6aa2d01c61fe77416664d7adf031e1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/form.ts +++ /dev/null @@ -1,17 +0,0 @@ - -export default (ctx: any) => { - return ` -
    -
    -
    - -
    - - -
    -
    -
    -
    - `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/search/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/component/fd-select.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/component/fd-select.ts deleted file mode 100644 index f8f3dfdd4e9231ab9f465d2689d6747909e4b0e3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/component/fd-select.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { EnumFieldSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeEnumFieldProp } from '../property/nocode-property-config'; -import { EnumFieldProp } from '../property/property-config'; - -export default class FdEnumFieldComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return EnumFieldSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('EnumField', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeEnumFieldProp = new NoCodeEnumFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: EnumFieldProp = new EnumFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/export.ts deleted file mode 100644 index 7c9850a7ace4b86ecd97d6aa06a30151a1bf1b05..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdEnumFieldComponent from './component/fd-select'; -import { EnumFieldSchema } from './schema/schema'; - -import FdEnumFieldTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const EnumField: ComponentExportEntity = { - type: 'EnumField', - component: FdEnumFieldComponent, - template: FdEnumFieldTemplates, - metadata: cloneDeep(EnumFieldSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/property/nocode-property-config.ts deleted file mode 100644 index b0b6ed118049fecc372cb2d72d9a2957e883b909..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/property/nocode-property-config.ts +++ /dev/null @@ -1,305 +0,0 @@ -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -export class NoCodeEnumFieldProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - const { maxLength, bindingFieldType } = this.getMaxLengthOfBindingField(propertyData, viewModelId); - const controlSource = propertyData.controlSource; - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - behaviorProperties.push( - { - propertyID: 'bindDataSource', - propertyName: '枚举数据', - propertyType: 'unity', - description: '枚举数据设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Array', - newVariablePrefix: '' - }, - }, - visible: controlSource === 'Farris' && propertyData.dataSourceType === 'dynamic', - showClearButton: true - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: propertyData.dataSourceType === 'static' && (showPosition === 'card' || showPosition === 'tableTdEditor') - }, - { - propertyID: 'autoWidth', - propertyName: '自动宽度', - propertyType: 'select', - description: '宽度是否自动调整', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'viewType', - propertyName: '展示类型', - propertyType: 'select', - description: '展示类型选择', - iterator: [{ key: 'text', value: '文本' }, { key: 'tag', value: '标签' }], - controlSource: 'Farris', - visible: controlSource === 'Farris' && propertyData.multiSelect && - (showPosition === 'card' || showPosition === 'tableTdEditor') - }, - { - propertyID: 'enableClear', - propertyName: '启用清除按钮', - propertyType: 'select', - description: '是否启用清除按钮', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - controlSource: 'Farris', - visible: controlSource === 'Farris' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - if (!changeObject) { - return; - } - switch (changeObject && changeObject.propertyID) { - case 'multiSelect': { - this.properties.map(p => { - if (p.propertyID === 'viewType') { - p.visible = controlSource === 'Farris' && changeObject.propertyValue && showPosition === 'card'; - } - }); - break; - } - case 'enumData': { - if (enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.idField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - // 枚举同步至schema,在表单保存时同步be vo - if (propertyData.binding && propertyData.binding.field) { - const fieldInfo = self.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - fieldInfo.schemaField.type.enumValues = changeObject.propertyValue || []; - } - } - - break; - } - case 'dataSourceType': { - const enumData = this.properties.find(p => p.propertyID === 'enumData'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - const idField = this.properties.find(p => p.propertyID === 'idField'); - const textField = this.properties.find(p => p.propertyID === 'textField'); - - if (enumData) { - enumData.visible = changeObject.propertyValue === 'static' && showPosition === 'card'; - } - - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - if (idField) { - idField.readonly = changeObject.propertyValue === 'static'; - } - if (textField) { - textField.readonly = changeObject.propertyValue === 'static'; - } - - break; - } - case 'noSearch': { - const maxSearchLength = this.properties.find(p => p.propertyID === 'maxSearchLength'); - if (maxSearchLength) { - maxSearchLength.visible = changeObject.propertyValue; - } - break; - } - } - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - getEnumDataConfig(propertyData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!propertyData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - } - }; - if (propertyData.controlSource !== 'Farris') { - return { editorConfig, dynamicMappingKeys: false }; - } - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (propertyData.binding.type === 'Form') { - const dgVM = this.dgVMService.getDgViewModel(viewModelId); - const dgVMField = dgVM.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField.type.name === 'Enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - } - editorConfig.editorParams.dynamicMappingKeys = true; - editorConfig.editorParams.valueField = propertyData.idField; - editorConfig.editorParams.nameField = propertyData.textField; - - return { editorConfig, dynamicMappingKeys: true }; - } - /** - * 获取绑定字段schema中的长度、类型属性 - */ - private getMaxLengthOfBindingField(propertyData: any, viewModelId: string) { - let maxLength; - let bindingFieldType; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - bindingFieldType = fieldInfo.schemaField.type.name; - } - } - return { maxLength, bindingFieldType }; - } - - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/property/property-config.ts deleted file mode 100644 index 83723d9645d94ca1164d05cf7461970a87feb8b9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/property/property-config.ts +++ /dev/null @@ -1,566 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { FormSchemaEntityFieldTypeName, UniformEditorDataUtil } from '@farris/designer-services'; -import { ItemCollectionConverter, ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { cloneDeep } from 'lodash-es'; -export class EnumFieldProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventPropConfig = this.getSelectEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - - } - - public getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - basicProperties.push( - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Farris', value: 'Farris' }, { key: 'Kendo', value: 'Kendo' }], - refreshPanelAfterChanged: true, - visible: showPosition === 'card' && propertyData.controlSource !== 'Farris' - } - ); - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - case 'controlSource': { - - // 变更【外观分类】下的属性 - const newAppearancePropConfig = self.getAppearancePropConfig(propertyData, viewModelId); - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = self.getBehaviorPropConfig(propertyData, viewModelId); - const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - // 变更【事件分类】下的属性 - const newEventPropConfig = self.getSelectEventPropConfig(propertyData, viewModelId); - const currentEventConfig = self.propertyConfig.find(cat => cat.categoryId === 'event'); - Object.assign(currentEventConfig, newEventPropConfig); - - - } - } - - }, - - }; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const enumDataConfig = this.getEnumDataConfig(propertyData, viewModelId); - const { maxLength, bindingFieldType } = this.getMaxLengthOfBindingField(propertyData, viewModelId); - const controlSource = propertyData.controlSource; - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - - behaviorProperties.push( - { - propertyID: 'dataSourceType', - propertyName: '数据源类型', - propertyType: 'select', - description: '数据源类型选择', - iterator: [{ key: 'static', value: '静态' }, { key: 'dynamic', value: '动态' }], - defaultValue: 'static', - controlSource: 'Farris', - visible: controlSource === 'Farris' && (showPosition === 'card' || showPosition === 'tableTdEditor') - }, - { - propertyID: 'bindDataSource', - propertyName: '枚举数据', - propertyType: 'unity', - description: '枚举数据设置', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Array', - newVariablePrefix: '' - }, - }, - visible: controlSource === 'Farris' && propertyData.dataSourceType === 'dynamic', - showClearButton: true - }, - { - propertyID: 'enumData', - propertyName: '枚举数据', - propertyType: 'modal', - description: '枚举数据设置', - editor: ItemCollectionEditorComponent, - converter: new ItemCollectionConverter(), - ...enumDataConfig.editorConfig, - visible: propertyData.dataSourceType === 'static' && (showPosition === 'card' || showPosition === 'tableTdEditor') - }, - { - propertyID: 'idField', - propertyName: '枚举值字段', - propertyType: 'string', - description: '枚举值字段设置', - controlSource: 'Farris', - visible: controlSource === 'Farris' && (showPosition === 'card' || showPosition === 'tableTdEditor'), - readonly: propertyData.dataSourceType === 'static' - }, - { - propertyID: 'textField', - propertyName: '枚举名称字段', - propertyType: 'string', - description: '枚举名称字段设置', - controlSource: 'Farris', - visible: controlSource === 'Farris' && (showPosition === 'card' || showPosition === 'tableTdEditor'), - readonly: propertyData.dataSourceType === 'static' - }, - { - propertyID: 'mappingField', - propertyName: '映射字段', - propertyType: 'string', - description: '映射字段设置', - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'multiSelect', - propertyName: '允许多选', - propertyType: 'boolean', - description: '是否允许多选', - controlSource: 'Farris', - visible: controlSource === 'Farris' && bindingFieldType !== FormSchemaEntityFieldTypeName.Enum - }, - { - propertyID: 'uri', - propertyName: '服务端API', - propertyType: 'string', - description: '服务端API设置', - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'editable', - propertyName: '允许编辑', - propertyType: 'boolean', - description: '是否允许编辑', - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'autoWidth', - propertyName: '自动宽度', - propertyType: 'boolean', - description: '宽度是否自动调整', - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'viewType', - propertyName: '展示类型', - propertyType: 'select', - description: '展示类型选择', - iterator: [{ key: 'text', value: '文本' }, { key: 'tag', value: '标签' }], - controlSource: 'Farris', - visible: controlSource === 'Farris' && propertyData.multiSelect && - (showPosition === 'card' || showPosition === 'tableTdEditor') - }, - { - propertyID: 'enableCancelSelected', - propertyName: '重复点击取消选中项', - propertyType: 'boolean', - description: '重复点击是否取消选中项', - controlSource: 'Farris', - visible: controlSource === 'Farris' - }, - { - propertyID: 'noSearch', - propertyName: '任意输入', - propertyType: showPosition === 'gridFieldEditor' ? 'boolean' : 'unity', - description: '是否允许任意输入', - readonly: bindingFieldType === FormSchemaEntityFieldTypeName.Enum, - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: 'true' }, { key: false, value: 'false' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }, - { - propertyID: 'maxSearchLength', - propertyName: '输入字符的最大长度', - propertyType: 'number', - description: '输入字符的最大长度设置', - decimals: 0, - min: 0, - max: maxLength, - visible: propertyData.noSearch - }, - { - propertyID: 'enableClear', - propertyName: '启用清除按钮', - propertyType: 'boolean', - description: '是否启用清除按钮', - controlSource: 'Farris', - visible: controlSource === 'Farris' - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - - if (!changeObject) { - return; - } - switch (changeObject && changeObject.propertyID) { - case 'multiSelect': { - this.properties.map(p => { - if (p.propertyID === 'viewType') { - p.visible = controlSource === 'Farris' && changeObject.propertyValue && showPosition === 'card'; - } - }); - break; - } - case 'enumData': { - if (enumDataConfig.dynamicMappingKeys && parameters) { - propertyData.idField = parameters.valueField; - propertyData.textField = parameters.nameField; - } - changeObject.relateChangeProps = [{ - propertyID: 'idField', - propertyValue: propertyData.idField - }, - { - propertyID: 'textField', - propertyValue: propertyData.textField - }]; - break; - } - case 'dataSourceType': { - const enumData = this.properties.find(p => p.propertyID === 'enumData'); - const bindDataSource = this.properties.find(p => p.propertyID === 'bindDataSource'); - const idField = this.properties.find(p => p.propertyID === 'idField'); - const textField = this.properties.find(p => p.propertyID === 'textField'); - - if (enumData) { - enumData.visible = changeObject.propertyValue === 'static' && showPosition === 'card'; - } - - if (bindDataSource) { - bindDataSource.visible = changeObject.propertyValue === 'dynamic'; - } - if (idField) { - idField.readonly = changeObject.propertyValue === 'static'; - } - if (textField) { - textField.readonly = changeObject.propertyValue === 'static'; - } - - break; - } - case 'noSearch': { - const maxSearchLength = this.properties.find(p => p.propertyID === 'maxSearchLength'); - if (maxSearchLength) { - maxSearchLength.visible = changeObject.propertyValue; - } - break; - } - } - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 事件属性 - */ - private getSelectEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition); - } - - switchEvents(propertyData, eventList) { - eventList = super.switchEvents(propertyData, eventList); - const events = [ - { - label: 'beforeShow', - name: '面板显示前事件' - }, - { - label: 'beforeHide', - name: '面板隐藏前事件' - }, - { - label: 'onShown', - name: '面板打开事件' - }, - { - label: 'onHidden', - name: '面板关闭事件' - }, - { - label: 'valueChanged', - name: '值变化事件' - } - ]; - if (propertyData.controlSource === 'Farris') { - const eventListExist = eventList.find(eventListItem => eventListItem.label === 'beforeShow'); - if (!eventListExist) { - events.forEach(event => { eventList.push(cloneDeep(event)); }); - } - } else { - events.forEach(event => { - eventList = eventList.filter(eventListItem => eventListItem.label !== event.label); - }); - } - - if (propertyData.enableClear) { - const onClear = eventList.find(eventListItem => eventListItem.label === 'onClear'); - if (!onClear) { - eventList.push({ - label: 'onClear', - name: '清除事件' - }); - } - } else { - eventList = eventList.filter(eventListItem => eventListItem.label !== 'onClear'); - } - - return eventList; - } - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventConfig = this.getSelectEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - - - /** - * 枚举数据的编辑器不同: - * kendo的控件确定只有value-name键值 - * farris的控件若绑定了枚举字段只有value-name 键值;若绑定了变量或者字符串字段则可以自行指定idField 和textField - */ - getEnumDataConfig(propertyData: any, viewModelId: string): { editorConfig: any, dynamicMappingKeys: boolean } { - if (!propertyData.binding) { - return { editorConfig: null, dynamicMappingKeys: false }; - } - - const editorConfig: any = { - editorParams: { - columns: [ - { field: 'value', title: '枚举值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'name', title: '枚举名称', editor: { type: EditorTypes.TEXTBOX } }, - ], - requiredFields: ['value', 'name'], - uniqueFields: ['value', 'name'], - modalTitle: '枚举编辑器', - canEmpty: true - } - }; - if (propertyData.controlSource !== 'Farris') { - return { editorConfig, dynamicMappingKeys: false }; - } - // 绑定枚举字段的 下拉控件,编辑器只支持value-name - if (propertyData.binding.type === 'Form') { - const dgVM = this.dgVMService.getDgViewModel(viewModelId); - const dgVMField = dgVM.fields.find(f => f.id === propertyData.binding.field); - if (dgVMField.type.name === 'Enum') { - return { editorConfig, dynamicMappingKeys: false }; - } - } - editorConfig.editorParams.dynamicMappingKeys = true; - editorConfig.editorParams.valueField = propertyData.idField; - editorConfig.editorParams.nameField = propertyData.textField; - - return { editorConfig, dynamicMappingKeys: true }; - } - /** - * 获取绑定字段schema中的长度、类型属性 - */ - private getMaxLengthOfBindingField(propertyData: any, viewModelId: string) { - let maxLength; - let bindingFieldType; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - bindingFieldType = fieldInfo.schemaField.type.name; - } - } - return { maxLength, bindingFieldType }; - } - - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventConfig = this.getSelectEventPropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/schema/schema.ts deleted file mode 100644 index 76c71bbab6839b80d19c9c694bd748cc18b00afc..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/schema/schema.ts +++ /dev/null @@ -1,47 +0,0 @@ -export const EnumFieldSchema ={ - id: '', - type: 'EnumField', - titleSourceType: 'static', - title: '下拉框', - controlSource: 'Farris', - appearance: null, - size: null, - binding: null, - placeHolder: '', - readonly: false, - require: false, - disable: false, - enumData: null, - idField: 'value', - textField: 'name', - holdPlace: false, - isTextArea: true, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - multiSelect: false, - uri: '', - autoWidth: true, - enableClear: false, - onClear: null, - valueChanged: null, - onShown: null, - onHidden: null, - editable: false, - enableCancelSelected: false, - beforeShow: null, - beforeHide: null, - dataSourceType: 'static', - viewType: 'text', - noSearch: false, - maxSearchLength: null, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500 -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/form.ts deleted file mode 100644 index 4220f9779ec5e33b8134f367f15c6e5187d50def..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/form.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - - -export default (ctx: any) => { - // 启用扩展区域 - let inputAppendEle = ''; - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - - return `
    -
    -
    - -
    - -
    - ${inputAppendEle} -
    -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/select/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/component/fd-switch.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/component/fd-switch.ts deleted file mode 100644 index e72531821698385a6f8d23c745671e515758c8db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/component/fd-switch.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { SwitchFieldSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { SwitchFieldProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeSwitchFieldProp } from '../property/nocode-property-config'; - -export default class FdSwitchFieldComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - init(): void { - super.init(); - this.adaptOldControl(); - } - - getDefaultSchema(): any { - return SwitchFieldSchema; - } - - getStyles(): string { - return 'display: inline-block;'; - } - - render(): any { - - return super.render(this.renderTemplate('SwitchField', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeSwitchFieldProp = new NoCodeSwitchFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: SwitchFieldProp = new SwitchFieldProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - super.onPropertyChanged(changeObject, ['square']); - } - - private adaptOldControl() { - // 移除冗余的属性 - if (this.component.hasOwnProperty('checked')) { - delete this.component.checked; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/export.ts deleted file mode 100644 index 81712c6e8288d1b65af57f695332feca27f75c6d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdSwitchFieldComponent from './component/fd-switch'; -import { SwitchFieldSchema } from './schema/schema'; - -import FdSwitchFieldTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const SwitchField: ComponentExportEntity = { - type: 'SwitchField', - component: FdSwitchFieldComponent, - template: FdSwitchFieldTemplates, - metadata: cloneDeep(SwitchFieldSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/nocode-property-config.ts deleted file mode 100644 index b8d31d075a8bf2b66e2f432ad41fb21f877b912b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/nocode-property-config.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeSwitchFieldProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - if (propertyData.controlSource === 'Farris') { - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - } - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - - - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - { - propertyID: 'square', - propertyName: '显示矩形开关', - propertyType: 'select', - description: '是否显示矩形开关', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - defaultValue: false - }, - { - propertyID: 'checkedLabel', - propertyName: '打开时标签', - propertyType: 'string', - description: '打开时标签设置', - defaultValue: '开', - }, - { - propertyID: 'uncheckedLabel', - propertyName: '关闭时标签', - propertyType: 'string', - description: '关闭时标签设置', - defaultValue: '关', - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string, isSimpleTable: boolean): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - if (isSimpleTable) { - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/property-config.ts deleted file mode 100644 index 02b4f1ab112cfe7be5f367017435a0765eea5345..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/property/property-config.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { ElementPropertyConfig, PropertyChangeObject, PropertyEntity } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class SwitchFieldProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - if (propertyData.controlSource === 'Farris') { - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - } - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - - - } - - - public getBasicPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const basicProperties = this.getBasicCommonPropConfig(propertyData); - basicProperties.push( - { - propertyID: 'controlSource', - propertyName: '控件来源', - propertyType: 'select', - description: '组件的控件来源', - iterator: [{ key: 'Farris', value: 'Farris' }, { key: 'Kendo', value: 'Kendo' }], - refreshPanelAfterChanged: true, - visible: showPosition === 'card' && propertyData.controlSource !== 'Farris' - } - ); - const self = this; - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: basicProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - self.changeControlType(propertyData, changeObject.propertyValue); - break; - } - case 'controlSource': { - - // 变更【外观分类】下的属性 - const newAppearancePropConfig = self.getAppearancePropConfig(propertyData, viewModelId); - const currentAppearanceConfig = self.propertyConfig.find(cat => cat.categoryId === 'appearance'); - Object.assign(currentAppearanceConfig, newAppearancePropConfig); - - // 变更【行为分类】下的属性 - const newBehaviorPropConfig = self.getBehaviorPropConfig(propertyData, viewModelId); - const currentBehaviorConfig = self.propertyConfig.find(cat => cat.categoryId === 'behavior'); - Object.assign(currentBehaviorConfig, newBehaviorPropConfig); - - } - } - - }, - - }; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - { - propertyID: 'square', - propertyName: '显示矩形开关', - propertyType: 'boolean', - description: '是否显示矩形开关', - defaultValue: false - }, - { - propertyID: 'checkedLabel', - propertyName: '打开时标签', - propertyType: 'string', - description: '打开时标签设置', - defaultValue: '开', - }, - { - propertyID: 'uncheckedLabel', - propertyName: '关闭时标签', - propertyType: 'string', - description: '关闭时标签设置', - defaultValue: '关', - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string, isSimpleTable: boolean): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - if (isSimpleTable) { - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - } - - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/schema/schema.ts deleted file mode 100644 index 628c134e91d3a9ca8800ec5db7af9cbd728fdfa2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/schema/schema.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const SwitchFieldSchema = { - id: '', - type: 'SwitchField', - controlSource: 'Farris', - titleSourceType: 'static', - title: '开关', - readonly: false, - require: false, - disable: false, - binding: null, - visible: true, - appearance: null, - size: null, - square: false, - checkedLabel: '', - uncheckedLabel: '', - holdPlace: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/form.ts deleted file mode 100644 index 58ec8f1b9c71625a15620d968f946990379c0990..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/form.ts +++ /dev/null @@ -1,15 +0,0 @@ - - -export default (ctx: any) => { - const clsStr = ctx.component.square ? ' square' : ''; - return ` -
    -
    - - - -
    -
    - `; -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/switch/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/component/fd-tags.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/component/fd-tags.ts deleted file mode 100644 index c24a639f413080d911e8f6684b00bba35ceda881..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/component/fd-tags.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { TagsSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { TagsProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { NoCodeTagsProp } from '../property/nocode-property-config'; -import { DesignerEnvType } from '@farris/designer-services'; - -export default class FdTagsComponent extends FarrisDesignField { - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('tags.css'); - } - - - - getDefaultSchema(): any { - return TagsSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('Tags', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeTagsProp = new NoCodeTagsProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: TagsProp = new TagsProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject, ['className', 'color', 'tagType']); - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/export.ts deleted file mode 100644 index c8bf6fe7bf61d1666a1368bb0b49610d6c12b65d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdTagsComponent from './component/fd-tags'; -import { TagsSchema } from './schema/schema'; - -import FdTagsTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const Tags: ComponentExportEntity = { - type: 'Tags', - component: FdTagsComponent, - template: FdTagsTemplates, - metadata: cloneDeep(TagsSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/nocode-property-config.ts deleted file mode 100644 index 8f6d1944a5df41051d931914c8911ad6c0bdb847..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/nocode-property-config.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeTagsProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig: ElementPropertyConfig[] = []; - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return this.propertyConfig; - } - - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const commonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(commonProps); - } - appearanceProperties.push( - { - propertyID: 'className', - propertyName: '自定义样式', - propertyType: 'string', - description: '自定义样式类名。' - }, - { - propertyID: 'color', - propertyName: '自定义背景色', - propertyType: 'string', - description: '标记的背景色值,请使用十六进制颜色码,例如#ff0000' - }, - { - propertyID: 'tagType', - propertyName: '标记类型', - propertyType: 'select', - iterator: [ - { key: 'none', value: '无' }, - { key: 'success', value: '成功类' }, - { key: 'info', value: '提示类' }, - { key: 'error', value: '错误类' }, - { key: 'warning', value: '警告类' } - ], - description: '预置的标记类型,优先级低于自定义背景色。' - } - ); - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/property-config.ts deleted file mode 100644 index 77f8dc0e2fab540788c428ba682733ee36a0eca8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/property/property-config.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class TagsProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - - return this.propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const self = this; - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const commonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(commonProps); - } - appearanceProperties.push( - { - propertyID: 'className', - propertyName: '自定义样式', - propertyType: 'string', - description: '自定义样式类名。' - }, - { - propertyID: 'color', - propertyName: '自定义背景色', - propertyType: 'string', - description: '标记的背景色值,请使用十六进制颜色码,例如#ff0000' - }, - { - propertyID: 'tagType', - propertyName: '标记类型', - propertyType: 'select', - iterator: [ - { key: 'none', value: '无' }, - { key: 'success', value: '成功类' }, - { key: 'info', value: '提示类' }, - { key: 'error', value: '错误类' }, - { key: 'warning', value: '警告类' } - ], - description: '预置的标记类型,优先级低于自定义背景色。' - } - ); - - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - }, - - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const eventList = [ - { - label: 'click', - name: '点击事件' - }, - { - label: 'dataChanged', - name: '标记数量变更事件' - }, - { - label: 'closed', - name: '关闭标记事件' - } - ]; - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - return this.propertyConfig; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/schema/schema.ts deleted file mode 100644 index 46f362141365014e7be1b4008c8d7557dcfaf338..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/schema/schema.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const TagsSchema = { - id: 'tags1', - type: 'Tags', - titleSourceType: 'static', - title: '', - appearance: null, - size: null, - visible: true, - dataSourceType: 'dynamic', - tagData: '', - binding: null, - checkable: false, - className: null, - color: null, - tagType: 'none', - readonly: false, - linkedLabelEnabled: false, - linkedLabelClick: null, - holdPlace: false, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - tabindex: -1, - click: null, - dataChanged: null, - closed: null -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/form.ts deleted file mode 100644 index dadd31fd0fa67e51471cd16e331fe1be222efa9f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/form.ts +++ /dev/null @@ -1,60 +0,0 @@ - - -export default (ctx: any) => { - let tagsData = ctx.component.dataSourceType === 'dynamic' ? '标记一,标记二' : ctx.component.tagData; - let tagArrays = tagsData.split(',').filter(item => { - if (item !== '') { - return item; - } - }); - function hexToRgba(hex, opacity = 1) { - const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; - var sColor = hex.toLowerCase(); - if (sColor && reg.test(sColor)) { - if (sColor.length === 4) { - var sColorNew = "#"; - for (var i = 1; i < 4; i += 1) { - sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)); - } - sColor = sColorNew; - } - //处理六位的颜色值 - var sColorChange = []; - for (var i = 1; i < 7; i += 2) { - sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2))); - } - return "RGB(" + sColorChange.join(",") + ',' + opacity + ")"; - } else { - return sColor; - } - } - - let colorStyle = ``; - if (ctx.component.color) { - colorStyle = `color:${ctx.component.color};border-color:${ctx.component.color};background:${hexToRgba(ctx.component.color, 0.1)}`; - } - if (!tagArrays) tagArrays = []; - - let resultStr = ''; - resultStr = `
      `; - let itemsStr = ``; - tagArrays.forEach(tagName => { - itemsStr += `
    • ${tagName} - - - -
    • ` - }); - resultStr += `${itemsStr}
    • - - 添加 -
    `; - return resultStr; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/tags/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/component/fd-text.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/component/fd-text.ts deleted file mode 100644 index ba10e66a50b7fc7ba48e3da4a221b58ecae0516a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/component/fd-text.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { TextBoxSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { TextBoxProp } from '../property/property-config'; -import { DesignerEnvType } from '@farris/designer-services'; -import { NoCodeTextBoxProp } from '../property/nocode-property-config'; - -export default class FdTextComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return TextBoxSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('TextBox', { - component: this.component - }), !this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeTextBoxProp = new NoCodeTextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: TextBoxProp = new TextBoxProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/export.ts deleted file mode 100644 index 0c350a67b2ebaba96829a881efee4c5c89fd110b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdTextComponent from './component/fd-text'; -import { TextBoxSchema } from './schema/schema'; - -import FdTextTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const TextBox: ComponentExportEntity = { - type: 'TextBox', - component: FdTextComponent, - template: FdTextTemplates, - metadata: cloneDeep(TextBoxSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/input-format-map.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/input-format-map.ts deleted file mode 100644 index 80ca0260c36667becd80122e4af1241381829874..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/input-format-map.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { GSPElementDataType, GSPElementObjectType } from '@gsp-bef/gsp-cm-metadata'; - - -/** - * 输入格式校验 - * - * 输入文本类型 - */ -export const InputControlTypeMapping = { - [GSPElementDataType.String]: [ - { key: 'none', value: '无', Ex: 'nononononono' }, - { key: 'cellNumber', value: '手机号' }, - { key: 'tel', value: '座机号/传真号' }, - { key: 'telOrCell', value: '手机号/座机号/传真号' }, - { key: 'postCode', value: '邮编' }, - // { key: 'workCode', value: '工号' }, - { key: 'email', value: '电子邮箱' }, - { key: 'idCode', value: '身份证号' }, - { key: 'carCode', value: '车牌号' }, - // { key: 'carCodeNew', value: '新能源车牌号' }, - { key: 'subjectCode', value: '10位数字会计科目代码' }, - { key: 'custom', value: '自定义' }, - ], - [GSPElementDataType.Text]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Decimal]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Integer]: [ - { key: 'none', value: '无' }, - ], - Number: [ - { key: 'none', value: '无' }, - ], - BigNumber: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Date]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.DateTime]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Boolean]: [ - { key: 'none', value: '无' }, - ], - [GSPElementObjectType.Enum]: [ - { key: 'none', value: '无' }, - ], - Object: [ - { key: 'none', value: '无' }, - ] -}; - - - -/** - * 根据所选输入类型获取校验正则 - */ -export function getInputExByInputType(inputTypeKey: string): string { - switch (inputTypeKey) { - case 'none': { - return ''; - } - case 'cellNumber': { - return '^1[0-9]{10}$'; - } - case 'tel': { - return '^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$'; - } - case 'telOrCell': { - return '^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$'; - } - case 'postCode': { - return '^[1-9]\\d{5}(?!\\d)$'; - } - case 'workCode': { - return '^\\d{8}$'; - } - case 'email': { - return '^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$'; - } - case 'idCode': { - return '^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$'; - } - case 'carCode': { - return '[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}'; - } - case 'carCodeNew': { - return '[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))'; - } - case 'subjectCode': { - return '^\\d{10}$'; - } - } - return ''; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-input-format-map.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-input-format-map.ts deleted file mode 100644 index 19adc1b972b2fb9eeac87e52d501a4b7081dd52d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-input-format-map.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { GSPElementDataType, GSPElementObjectType } from '@gsp-bef/gsp-cm-metadata'; - - -/** - * 输入格式校验 - * - * 输入文本类型 - */ -export const InputControlTypeMapping = { - [GSPElementDataType.String]: [ - { key: 'none', value: '无', Ex: 'nononononono' }, - { key: 'cellNumber', value: '手机号' }, - { key: 'tel', value: '座机号/传真号' }, - { key: 'telOrCell', value: '手机号/座机号/传真号' }, - { key: 'postCode', value: '邮编' }, - // { key: 'workCode', value: '工号' }, - { key: 'email', value: '电子邮箱' }, - { key: 'idCode', value: '身份证号' }, - { key: 'carCode', value: '车牌号' }, - // { key: 'carCodeNew', value: '新能源车牌号' }, - { key: 'subjectCode', value: '10位数字会计科目代码' } - ], - [GSPElementDataType.Text]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Decimal]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Integer]: [ - { key: 'none', value: '无' }, - ], - Number: [ - { key: 'none', value: '无' }, - ], - BigNumber: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Date]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.DateTime]: [ - { key: 'none', value: '无' }, - ], - [GSPElementDataType.Boolean]: [ - { key: 'none', value: '无' }, - ], - [GSPElementObjectType.Enum]: [ - { key: 'none', value: '无' }, - ], - Object: [ - { key: 'none', value: '无' }, - ] -}; - - - -/** - * 根据所选输入类型获取校验正则 - */ -export function getInputExByInputType(inputTypeKey: string): string { - switch (inputTypeKey) { - case 'none': { - return ''; - } - case 'cellNumber': { - return '^1[0-9]{10}$'; - } - case 'tel': { - return '^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$'; - } - case 'telOrCell': { - return '^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$'; - } - case 'postCode': { - return '^[1-9]\\d{5}(?!\\d)$'; - } - case 'workCode': { - return '^\\d{8}$'; - } - case 'email': { - return '^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$'; - } - case 'idCode': { - return '^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$'; - } - case 'carCode': { - return '[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}'; - } - case 'carCodeNew': { - return '[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))'; - } - case 'subjectCode': { - return '^\\d{10}$'; - } - } - return ''; -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-property-config.ts deleted file mode 100644 index 5856efd0d44524eff9ae3eb658df6b85e3d3b612..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/nocode-property-config.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; -import { getInputExByInputType, InputControlTypeMapping } from './nocode-input-format-map'; - -export class NoCodeTextBoxProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - - // 格式校验属性 - const formatPropConfig = this.getformatValidation(propertyData, this.viewModelId); - propertyConfig.push(formatPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - - return propertyConfig; - } - - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - public getformatValidation(propertyData: any, viewModelId: string) { - - const self = this; - - return { - categoryId: 'formatValidation', - categoryName: '输入格式校验', - enableCascade: true, - propertyData: propertyData.formatValidation, - parentPropertyID: 'formatValidation', - properties: [ - { - propertyID: 'expression', - propertyName: '匹配正则', - propertyType: 'string', - defaultValue: '', - visible: false - }, - { - propertyID: 'type', - propertyName: '输入类型', - propertyType: 'select', - iterator: InputControlTypeMapping.String, - defaultValue: 'none' - }, - { - propertyID: 'message', - propertyName: '输入错误提示', - propertyType: 'string', - defaultValue: '', - visible: propertyData.formatValidation && propertyData.formatValidation.type !== 'none' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - propData.expression = getInputExByInputType(changeObject.propertyValue); - if (propData.expression) { - propData.message = `请输入正确的${self.getMessage(changeObject.propertyValue)}`; - } - if (changeObject.propertyValue === 'none') { - propData.message = ''; - } - - const messageProp = this.properties.find(prop => prop.propertyID === 'message'); - messageProp.visible = propertyData.formatValidation && propertyData.formatValidation.type !== 'none'; - break; - } - } - } - }; - - } - - private getMessage(propertyValue) { - let msg = ''; - InputControlTypeMapping[GSPElementDataType.String].forEach((element) => { - if (element.key === propertyValue) { - msg = element.value; - } - }); - return msg; - } - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/property-config.ts deleted file mode 100644 index 93c144391981fe3eabdb7fba7f23ba3e9885942a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/property/property-config.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { GSPElementDataType } from '@gsp-bef/gsp-cm-metadata'; -import { FormPropertyChangeObject } from '../../../../../lib/entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; -import { getInputExByInputType, InputControlTypeMapping } from './input-format-map'; - -export class TextBoxProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - propertyConfig.push(appearanceProperties); - - - // 格式校验属性 - const formatPropConfig = this.getformatValidation(propertyData, this.viewModelId); - propertyConfig.push(formatPropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // propertyConfig.push(appendPropConfig); - - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - propertyConfig.push(exprPropConfig); - } - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - const appearanceProperties = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - // 获取绑定字段schema中的长度属性 - let maxLength; - if (propertyData.binding && propertyData.binding.type === 'Form') { - const fieldInfo = this.schemaService.getFieldByIDAndVMID(propertyData.binding.field, viewModelId); - if (fieldInfo && fieldInfo.schemaField) { - maxLength = fieldInfo.schemaField.type.length; - } - } - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - { - propertyID: 'maxLength', - propertyName: '最大长度', - propertyType: 'number', - description: '最大长度', - decimals: 0, - min: 0, - max: maxLength - }, - { - propertyID: 'isPassword', - propertyName: '密码输入框', - propertyType: 'boolean', - description: '是否为密码输入框', - defaultValue: false - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - const propertyData = gridFieldData.editor; - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventPropConfig); - - return this.propertyConfig; - } - - - - public getformatValidation(propertyData: any, viewModelId: string) { - - const self = this; - - return { - categoryId: 'formatValidation', - categoryName: '输入格式校验', - enableCascade: true, - propertyData: propertyData.formatValidation, - parentPropertyID: 'formatValidation', - properties: [ - { - propertyID: 'type', - propertyName: '输入类型', - propertyType: 'select', - iterator: InputControlTypeMapping.String, - defaultValue: 'none' - }, - { - propertyID: 'expression', - propertyName: '匹配正则', - propertyType: 'string', - defaultValue: '', - visible: propertyData.formatValidation && propertyData.formatValidation.type === 'custom' - }, - { - propertyID: 'message', - propertyName: '输入错误提示', - propertyType: 'string', - defaultValue: '', - visible: propertyData.formatValidation && propertyData.formatValidation.type !== 'none' - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'type': { - propData.expression = getInputExByInputType(changeObject.propertyValue); - if (propData.expression) { - const msg = self.getMessage(changeObject.propertyValue); - propData.message = msg ? `请输入正确的${msg}` : ''; - } - if (changeObject.propertyValue === 'none' || changeObject.propertyValue === 'custom') { - propData.message = ''; - } - - - const expProp = this.properties.find(prop => prop.propertyID === 'expression'); - expProp.visible = propertyData.formatValidation && propertyData.formatValidation.type === 'custom'; - - const messageProp = this.properties.find(prop => prop.propertyID === 'message'); - messageProp.visible = propertyData.formatValidation && propertyData.formatValidation.type !== 'none'; - - break; - } - } - } - }; - - } - - private getMessage(propertyValue) { - let msg = ''; - InputControlTypeMapping[GSPElementDataType.String].forEach((element) => { - if (element.key === propertyValue) { - msg = element.value; - } - }); - return msg; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/schema/schema.ts deleted file mode 100644 index 2bc6fe5a671d92419c399194cc03e0f9eecffffa..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/schema/schema.ts +++ /dev/null @@ -1,40 +0,0 @@ -export const TextBoxSchema = { - id: 'textbox', - type: 'TextBox', - titleSourceType: 'static', - title: '文本框', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - placeHolder: '', - format: null, - validation: null, - value: null, - maxLength: 36, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - holdPlace: false, - isTextArea: true, - isPassword: false, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - enableTips: true, - path: '', - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - formatValidation: { - type: 'none', - expression: '', - message: '', - }, - autoHeight: false, - maxHeight: 500 -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/form.ts deleted file mode 100644 index 659d0859190194d461078540a2bfe4d685e7587c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/form.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - -export default (ctx: any) => { - let inputEle = ``; - - // 启用扩展区域 - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputEle = InputAppendUtils.getTextBoxAppendElement(ctx, inputEle); - } - - return `
    ${inputEle}
    `; - -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/text-box/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/component/fd-time-picker.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/component/fd-time-picker.ts deleted file mode 100644 index 338b547ffc9b87a5759e3175ae80594bdafd77b7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/component/fd-time-picker.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { TimePickerSchema } from '../schema/schema'; -import FarrisDesignField from '../../common/field/component/field'; -import { ElementPropertyConfig, PropertyChangeObject } from '@farris/ide-property-panel'; -import { TimePickerProp } from '../property/property-config'; -import { NoCodeTimePickerProp } from '../property/nocode-property-config'; -import { DesignerEnvType } from '@farris/designer-services'; - -export default class FdTimePickerComponent extends FarrisDesignField { - - component; - constructor(component: any, options: any) { - super(component, options); - } - - - - getDefaultSchema(): any { - return TimePickerSchema; - } - - - getStyles(): string { - return 'display: inline-block;'; - } - - - render(): any { - - return super.render(this.renderTemplate('TimePicker', { - component: this.component - }),!this.component.showInTable); - } - - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode) { - const prop: NoCodeTimePickerProp = new NoCodeTimePickerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: TimePickerProp = new TimePickerProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/export.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/export.ts deleted file mode 100644 index 0979a94eecb81668ace59d85e92952ffdef15656..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/export.ts +++ /dev/null @@ -1,13 +0,0 @@ -import FdTimePickerComponent from './component/fd-time-picker'; -import { TimePickerSchema } from './schema/schema'; - -import FdTimePickerTemplates from './templates'; -import { cloneDeep } from 'lodash-es'; -import { ComponentExportEntity } from '@farris/designer-element'; - -export const TimePicker: ComponentExportEntity = { - type: 'TimePicker', - component: FdTimePickerComponent, - template: FdTimePickerTemplates, - metadata: cloneDeep(TimePickerSchema) -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/nocode-property-config.ts deleted file mode 100644 index d22e1565e35875b014b9d68b57370745dc0c0c8e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/nocode-property-config.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { NoCodeInputProps } from '../../common/property/nocode-input-property-config'; - -export class NoCodeTimePickerProp extends NoCodeInputProps { - - propertyConfig: ElementPropertyConfig[]; - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorProperties = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorProperties); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - protected getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - appearanceProperties.push( - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'string', - description: '格式设置' - } - ); - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'select', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - description: '是否允许输入', - }, - { - propertyID: 'use12Hours', - propertyName: '使用12小时输入模式', - propertyType: 'select', - iterator: [ - { key: true, value: '是' }, - { key: false, value: '否' } - ], - description: '是否使用12小时输入模式', - }, - { - propertyID: 'hourStep', - propertyName: '时步长', - propertyType: 'number', - description: '时步长设置', - decimals: 0, - min: 1 - }, - { - propertyID: 'minuteStep', - propertyName: '分步长', - propertyType: 'number', - description: '分步长设置', - decimals: 0, - min: 1 - }, - { - propertyID: 'secondStep', - propertyName: '秒步长', - propertyType: 'number', - description: '秒步长设置', - decimals: 0, - min: 1 - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - return this.propertyConfig; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/property-config.ts deleted file mode 100644 index 7b52be64ddade792c7d1de8f31066e54e859497a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/property/property-config.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { InputProps } from '../../common/property/input-property-config'; - -export class TimePickerProp extends InputProps { - - propertyConfig: ElementPropertyConfig[]; - - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - this.propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearanceProperties = this.getAppearancePropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(appearanceProperties); - - // 行为属性 - const behaviorProperties = this.getBehaviorPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(behaviorProperties); - - // 扩展区域属性 - // const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, this.viewModelId); - // this.propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventPropConfig = this.getTimeEventPropConfig(propertyData, this.viewModelId); - this.propertyConfig.push(eventPropConfig); - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, this.viewModelId); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - - return this.propertyConfig; - } - - private getAppearancePropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - let appearanceProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - const appearanceCommonProps = this.getAppearanceCommonPropConfig(propertyData, viewModelId, showPosition); - appearanceProperties = appearanceProperties.concat(appearanceCommonProps); - } - - appearanceProperties.push( - { - propertyID: 'format', - propertyName: '格式', - propertyType: 'string', - description: '格式设置' - }, - { - propertyID: 'showHeader', - propertyName: '显示时分秒标题', - propertyType: 'select', - description: '时间选择器是否显示时分秒的标题', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - } - ); - const self = this; - const config = { - categoryId: 'appearance', - categoryName: '外观', - properties: appearanceProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - - if (!changeObject) { - return; - } - self.changeAppearancePropertyRelates(this.properties, changeObject, propertyData, parameters); - - } - - }; - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - - let behaviorProperties = []; - if (showPosition === 'card' || showPosition === 'tableTdEditor') { - behaviorProperties = this.getBehaviorCommonPropConfig(propertyData, viewModelId); - } - - behaviorProperties.push( - { - propertyID: 'editable', - propertyName: '允许输入', - propertyType: 'select', - description: '是否允许输入', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'use12Hours', - propertyName: '使用12小时输入模式', - propertyType: 'select', - description: '是否使用12小时输入模式', - iterator: [{ key: true, value: '是' }, { key: false, value: '否' }] - }, - { - propertyID: 'hourStep', - propertyName: '时步长', - propertyType: 'number', - description: '时步长设置', - decimals: 0, - min: 1 - }, - { - propertyID: 'minuteStep', - propertyName: '分步长', - propertyType: 'number', - description: '分步长设置', - decimals: 0, - min: 1 - }, - { - propertyID: 'secondStep', - propertyName: '秒步长', - propertyType: 'number', - description: '秒步长设置', - decimals: 0, - min: 1 - } - ); - - const self = this; - const config = { - categoryId: 'behavior', - categoryName: '行为', - properties: behaviorProperties, - setPropertyRelates(changeObject: FormPropertyChangeObject, prop, parameters) { - self.changeBehaviorPropertyRelates(this.properties, changeObject, propertyData, parameters, showPosition); - } - }; - - if (showPosition !== 'card') { - Object.assign(config, { - categoryId: showPosition + '_' + config.categoryId, - propertyData, - enableCascade: true, - parentPropertyID: 'editor', - tabId: showPosition, - tabName: '编辑器' - }); - } - return config; - } - - private getTimeEventPropConfig(propertyData: any, viewModelId: string, showPosition = 'card'): ElementPropertyConfig { - const eventList = []; - if (showPosition !== 'gridFieldEditor') { - eventList.push({ - label: 'openChange', - name: '面板打开状态切换' - }); - } - - return this.getEventPropertyConfig(propertyData, viewModelId, showPosition, { customEventList: eventList }); - } - - - - /** - * 列编辑器属性 - * @param gridFieldData 列数据 - */ - getGridFieldEdtiorPropConfig(gridFieldData: any, viewModelId: string) { - - const propertyData = gridFieldData.editor; - - this.propertyConfig = []; - - // 编辑器类型属性 - const editorTypeConfig = this.getGridFieldEditorTypePropertyConfig(gridFieldData, viewModelId); - if (editorTypeConfig) { - this.propertyConfig.push(editorTypeConfig); - } - - // 外观属性 - const apperanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(apperanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.appendBehaviorPropsForGridFieldEditor(behaviorConfig, propertyData, viewModelId); - this.propertyConfig.push(behaviorConfig); - - // 事件属性 - const eventConfig = this.getTimeEventPropConfig(propertyData, viewModelId, 'gridFieldEditor'); - this.propertyConfig.push(eventConfig); - - return this.propertyConfig; - } - - /** - * table单元格编辑器属性 - * @param tdData 单元格数据 - * @param viewModelId viewModelId - * @returns 属性配置 - */ - getTableTdEdtiorPropConfig(tdData: any, viewModelId: string): ElementPropertyConfig[] { - const propertyData = tdData.editor; - - this.propertyConfig = []; - - // 外观属性 - const appearanceConfig = this.getAppearancePropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appearanceConfig); - - // 行为属性 - const behaviorConfig = this.getBehaviorPropConfig(propertyData, viewModelId, 'tableTdEditor'); - behaviorConfig.properties = behaviorConfig.properties.filter(p => !'binding,visible'.includes(p.propertyID)); - this.propertyConfig.push(behaviorConfig); - - // 扩展区域属性 - const appendPropConfig = this.getInputAppendPropertyConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(appendPropConfig); - - // 事件属性 - const eventConfig = this.getTimeEventPropConfig(propertyData, viewModelId, 'tableTdEditor'); - this.propertyConfig.push(eventConfig); - - - // 表达式属性 - const exprPropConfig = this.getExpressionPropConfig(propertyData, viewModelId, 'tableTdEditor'); - if (exprPropConfig) { - this.propertyConfig.push(exprPropConfig); - } - return this.propertyConfig; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/schema/schema.ts deleted file mode 100644 index 679a87adcd193ac775bcbb68034908f764ec3018..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/schema/schema.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const TimePickerSchema = { - id: 'timepicker', - type: 'TimePicker', - titleSourceType: 'static', - title: '时间选择', - appearance: null, - size: null, - binding: null, - readonly: false, - require: false, - disable: false, - use12Hours: false, - format: 'hh:mm:ss', - placeHolder: '', - hourStep: 1, - minuteStep: 1, - secondStep: 1, - holdPlace: false, - isTextArea: true, - linkedLabelEnabled: false, - linkedLabelClick: null, - visible: true, - tabindex: -1, - hasDefaultFocus: false, - focusState: null, - titleWidth: null, - editable: true, - enableAppend: false, - inputAppendType: 'button', - inputAppendDisabled: false, - autoHeight: false, - maxHeight: 500, - openChange: null, - showHeader: false -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/form.ts deleted file mode 100644 index 87cf1226da384c10bf1e7bb15c82fcfebff4bc90..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/form.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { InputAppendUtils } from '../../../../utils/input-append.utils'; - - -export default (ctx: any) => { - // 启用扩展区域 - let inputAppendEle = ''; - if (ctx.component.enableAppend !== false && ctx.component.inputAppendText) { - inputAppendEle = InputAppendUtils.getInputGroupAppendElement(ctx); - } - - return `
    -
    -
    - -
    - - - -
    - ${inputAppendEle} -
    -
    `; -}; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/input/time-picker/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/component/base.component.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/common/component/base.component.ts deleted file mode 100644 index 018038fcdecbd53932d176d4683f3816541ab733..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/component/base.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DesignerEnvType, FormBasicService } from '@farris/designer-services'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; - -export default class FdStaticBaseComponent extends FarrisDesignBaseComponent { - envType: DesignerEnvType; - - triggerBelongedComponentToMoveWhenMoved = true; - - constructor(component: any, options: any) { - super(component, options); - - // 组件所属分类为“附件” - this.category = 'file'; - - const serviceHost = this.options.designerHost; - const formBasicService = serviceHost.getService('FormBasicService') as FormBasicService; - if (formBasicService) { - this.envType = formBasicService.envType; - } - } - - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - * @param propertyIDs 需要额外监听的属性ID列表 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - let dynamicPropertyIDs = ['appearance.class', 'appearance.style']; - if (propertyIDs) { - dynamicPropertyIDs = dynamicPropertyIDs.concat(propertyIDs); - } - - const propertyPath = changeObject.propertyPath ? changeObject.propertyPath + '.' : ''; - if (dynamicPropertyIDs.includes(propertyPath + changeObject.propertyID)) { - this.triggerRedraw(); - } - - } - - - /** - * 不允许单独删除附件控件,若要删除需要定位到所属Component去删除 - */ - checkCanDeleteComponent(): boolean { - return false; - } - - /** - * 是否支持移动取决于所属Component是否支持移动 - */ - checkCanMoveComponent(): boolean { - const belongedCmpInstance = this.getBelongedComponentInstance(this); - return belongedCmpInstance.checkCanMoveComponent(); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/nocode-static-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/nocode-static-property-config.ts deleted file mode 100644 index 8b67b291b22e1f751572d017af6af03327460508..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/nocode-static-property-config.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { IDesignerHost } from '@farris/designer-element'; -import { EventEditorService, DomService, FormBasicService, SchemaService, UniformEditorDataUtil, WebCmdService } from '@farris/designer-services'; -import { ElementPropertyConfig, PropertyEntity } from "@farris/ide-property-panel"; -import { DgControl } from '../../../../utils/dg-control'; - -export class NoCodeStaticUsualProp { - - public domService: DomService; - public formBasicService: FormBasicService; - public schemaService: SchemaService; - //事件编辑器集成 - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - public eventEditorService: EventEditorService; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.domService = serviceHost.getService('DomService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - } - - getBasicPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - // { - // propertyID: 'id', - // propertyName: '标识', - // propertyType: 'string', - // readonly: true - // }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - } - ] - }; - } - - getAppearancePropConfig(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - // { - // propertyID: 'appearance', - // propertyName: '样式', - // propertyType: 'cascade', - // cascadeConfig: [ - // { - // propertyID: 'class', - // propertyName: 'class样式', - // propertyType: 'string' - // }, - // { - // propertyID: 'style', - // propertyName: 'style样式', - // propertyType: 'modal', - // editor: StyleEditorComponent, - // showClearButton: true - // } - // ] - // } - ] - }; - } - - getVisiblePropEntity(propertyData: any, viewModelId: string): PropertyEntity { - - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/static-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/static-property-config.ts deleted file mode 100644 index 6b3c09b6201299c797ce017cf5656c37b92ddb99..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/common/property/static-property-config.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { StyleEditorComponent } from '@farris/designer-devkit'; -import { IDesignerHost } from '@farris/designer-element'; -import { EventEditorService, DomService, FormBasicService, SchemaService, UniformEditorDataUtil, WebCmdService } from '@farris/designer-services'; -import { ElementPropertyConfig, PropertyEntity } from "@farris/ide-property-panel"; -import { DgControl } from '../../../../utils/dg-control'; - -export class StaticUsualProp { - - public domService: DomService; - public formBasicService: FormBasicService; - public schemaService: SchemaService; - public eventEditorService: EventEditorService; - //事件编辑器集成 - public webCmdService: WebCmdService; - public viewModelId: string; - public componentId: string; - - constructor(private serviceHost: IDesignerHost, viewModelId: string, componentId: string) { - this.viewModelId = viewModelId; - this.componentId = componentId; - this.domService = serviceHost.getService('DomService'); - this.eventEditorService = serviceHost.getService('EventEditorService'); - this.webCmdService = serviceHost.getService('WebCmdService'); - this.formBasicService = serviceHost.getService('FormBasicService'); - } - - getBasicPropConfig(propertyData: any): ElementPropertyConfig { - - return { - categoryId: 'basic', - categoryName: '基本信息', - properties: [ - { - propertyID: 'id', - propertyName: '标识', - propertyType: 'string', - readonly: true - }, - { - propertyID: 'type', - propertyName: '控件类型', - propertyType: 'select', - description: '组件的类型', - iterator: [{ key: propertyData.type, value: DgControl[propertyData.type].name }], - readonly: true - } - ] - }; - } - - getAppearancePropConfig(): ElementPropertyConfig { - - return { - categoryId: 'appearance', - categoryName: '外观', - properties: [ - { - propertyID: 'appearance', - propertyName: '样式', - propertyType: 'cascade', - cascadeConfig: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string' - }, - { - propertyID: 'style', - propertyName: 'style样式', - propertyType: 'modal', - editor: StyleEditorComponent, - showClearButton: true - } - ] - } - ] - }; - } - - getVisiblePropEntity(propertyData: any, viewModelId: string): PropertyEntity { - - return { - propertyID: 'visible', - propertyName: '是否可见', - propertyType: 'unity', - description: '运行时组件是否可见', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'variable'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'Boolean', - newVariablePrefix: 'is' - } - } - }; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/component/static-text.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/component/static-text.ts deleted file mode 100644 index 8a76d10735a5c00c1a59fcf1e45d9e9323db700d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/component/static-text.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { DesignerEnvType } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormPropertyChangeObject } from '../../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../../utils/control-css-loader'; -import { NoCodeFilePreviewProp } from '../../static-text/property/nocode-property-config'; -import FdStaticBaseComponent from '../../common/component/base.component'; -import { FilePreviewProp } from '../property/property-config'; -import { StaticTextSchema } from '../schema/schema'; -import { cloneDeep } from 'lodash-es'; -import { SectionSchema } from '../../../container/section/schema/schema'; - -export default class FdStaticTextComponent extends FdStaticBaseComponent { - - constructor(component: any, options: any) { - super(component, options); - - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('file-upload-preview.css'); - } - static getMetadataInControlBox() { - const staticTextCommentsSchema = cloneDeep(StaticTextSchema); - Object.assign(staticTextCommentsSchema, { - id: staticTextCommentsSchema.id + '-' + Math.random().toString(36).slice(2, 6), - }); - - // const sectionSchema = cloneDeep(SectionSchema); - // Object.assign(sectionSchema, { - // id: 'static-text-' + Math.random().toString(36).slice(2, 6), - // mainTitle: '静态文本', - // contents: [staticTextCommentsSchema], - // visible: true, - // }); - - return staticTextCommentsSchema; - } - - getStyles(): string { - return 'display: block;'; - } - getDefaultSchema(): any { - - return StaticTextSchema; - } - - // 渲染模板 - render(): any { - - return super.render(this.renderTemplate('FilePreview', { - component: this.component - })); - } - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - - if (this.envType === DesignerEnvType.noCode){ - const prop: NoCodeFilePreviewProp = new NoCodeFilePreviewProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } else { - const prop: FilePreviewProp = new FilePreviewProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - } - - onPropertyChanged(changeObject: FormPropertyChangeObject, propertyIDs?: string[]): void { - super.onPropertyChanged(changeObject, ['enableBatchDownload', 'showType']); - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/export.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/export.ts deleted file mode 100644 index 5df1fd4170c9187922c2dab90ac301c6c32c1a32..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/export.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ComponentExportEntity } from '@farris/designer-element'; -import FdStaticTextComponent from './component/static-text'; -import { StaticTextSchema } from './schema/schema'; -import FdStaticTextTemplates from './templates'; - - -export const StaticText: ComponentExportEntity = { - type: 'StaticText', - component: FdStaticTextComponent, - template: FdStaticTextTemplates, - metadata: StaticTextSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/nocode-property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/nocode-property-config.ts deleted file mode 100644 index c12470fdec85241eb00e383c76b14849aec8698b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/nocode-property-config.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { BindingEditorComponent, BindingEditorConverter, CodeEditorComponent } from '@farris/designer-devkit'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { NoCodeStaticUsualProp } from '../../common/property/nocode-static-property-config'; - -export class NoCodeFilePreviewProp extends NoCodeStaticUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 附件属性 - const customPropConfig = this.getFilePreviewPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string) { - const visibleProp = this.getVisiblePropEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'readonly', - propertyName: '是否只读', - propertyType: 'unity', - description: '运行时组件是否只读', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - } - } - } - ] - }; - - } - private getFilePreviewPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'file', - categoryName: '附件属性', - properties: [ - { - propertyID: 'previewAreaTemplate', - propertyName: '预览区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'rootId', - propertyName: '附件服务器根目录', - propertyType: 'string' - }, - { - propertyID: 'formId', - propertyName: '二级目录', - propertyType: 'unity', - description: '默认为主表ID', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['custom', 'variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - }, - { - propertyID: 'fieldIdKey', - propertyName: '附件ID字段', - propertyType: 'modal', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: propertyData.componentId, controlType: propertyData.type }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'fileNameKey', - propertyName: '附件名称字段', - propertyType: 'modal', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: propertyData.componentId, controlType: propertyData.type }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'enableBatchDownload', - propertyName: '是否启用批量下载', - propertyType: 'boolean' - }, - { - propertyID: 'filePreviewToolbarTemplate', - propertyName: '批量下载区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.enableBatchDownload - }, - { - propertyID: 'showType', - propertyName: '附件展示类型', - propertyType: 'select', - iterator: [{ key: 'card', value: '卡片' }, { key: 'list', value: '列表' }] - }, - { - propertyID: 'itemCls', - propertyName: '附件预览项样式', - propertyType: 'string' - }, - { - propertyID: 'canRename', - propertyName: '是否启用重命名', - propertyType: 'boolean', - defaultValue: false - } - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enableBatchDownload': { - const filePreviewToolbarTemplate = this.properties.find(p => p.propertyID === 'filePreviewToolbarTemplate'); - if (filePreviewToolbarTemplate) { - filePreviewToolbarTemplate.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'removeFile', - name: '预览附件删除事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/property-config.ts deleted file mode 100644 index 64d702bab1f6b1e4837a9a70f7820e52adbffae0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/property/property-config.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { BindingEditorComponent, BindingEditorConverter, CodeEditorComponent } from '@farris/designer-devkit'; -import { UniformEditorDataUtil } from '@farris/designer-services'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { EventsEditorFuncUtils } from '../../../../utils/events-editor-func'; -import { StaticUsualProp } from '../../common/property/static-property-config'; - -export class FilePreviewProp extends StaticUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - - - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 附件属性 - const customPropConfig = this.getFilePreviewPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string) { - const visibleProp = this.getVisiblePropEntity(propertyData, viewModelId); - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'readonly', - propertyName: '是否只读', - propertyType: 'unity', - description: '运行时组件是否只读', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - constType: 'enum', - editorOptions: { - types: ['const', 'custom'], - enums: [{ key: true, value: '是' }, { key: false, value: '否' }], - } - } - } - ] - }; - - } - private getFilePreviewPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'file', - categoryName: '附件属性', - properties: [ - { - propertyID: 'previewAreaTemplate', - propertyName: '预览区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'rootId', - propertyName: '附件服务器根目录', - propertyType: 'string' - }, - { - propertyID: 'formId', - propertyName: '二级目录', - propertyType: 'unity', - description: '默认为主表ID', - editorParams: { - controlName: UniformEditorDataUtil.getControlName(propertyData), - editorOptions: { - types: ['custom', 'variable'], - variables: UniformEditorDataUtil.getVariables(viewModelId, this.domService), - getVariables: () => UniformEditorDataUtil.getVariables(viewModelId, this.domService), - newVariableType: 'String' - } - }, - }, - { - propertyID: 'fieldIdKey', - propertyName: '附件ID字段', - propertyType: 'modal', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: propertyData.componentId, controlType: propertyData.type }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'fileNameKey', - propertyName: '附件名称字段', - propertyType: 'modal', - editor: BindingEditorComponent, - editorParams: { viewModelId, componentId: propertyData.componentId, controlType: propertyData.type }, - converter: new BindingEditorConverter() - }, - { - propertyID: 'enableBatchDownload', - propertyName: '是否启用批量下载', - propertyType: 'boolean' - }, - { - propertyID: 'filePreviewToolbarTemplate', - propertyName: '批量下载区域模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - }, - visible: propertyData.enableBatchDownload - }, - { - propertyID: 'showType', - propertyName: '附件展示类型', - propertyType: 'select', - iterator: [{ key: 'card', value: '卡片' }, { key: 'list', value: '列表' }] - }, - { - propertyID: 'itemCls', - propertyName: '附件预览项样式', - propertyType: 'string' - }, - { - propertyID: 'canRename', - propertyName: '是否启用重命名', - propertyType: 'boolean', - defaultValue: false - } - ], - setPropertyRelates(changeObject, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'enableBatchDownload': { - const filePreviewToolbarTemplate = this.properties.find(p => p.propertyID === 'filePreviewToolbarTemplate'); - if (filePreviewToolbarTemplate) { - filePreviewToolbarTemplate.visible = changeObject.propertyValue; - } - break; - } - } - } - }; - } - - private getEventPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'removeFile', - name: '预览附件删除事件' - }, - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService, domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/schema/schema.ts deleted file mode 100644 index 5be8c553aa77fef378c6692af63bef55bb9325d8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/schema/schema.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const StaticTextSchema = { - id: 'static-text', - type: 'HtmlTemplate', - visible: true, - html: '

    文本字段

    ' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/form.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/form.ts deleted file mode 100644 index 4c216f1a1d200269876478b593d3a643a16afaf9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/form.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default (ctx: any) => { - return ``; - -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/index.ts b/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/index.ts deleted file mode 100644 index b975f6e8dfacf33ccef400d0342339f920b052d3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/static-text/static-text/templates/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './form'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail-container.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail-container.ts deleted file mode 100644 index 91f6c7f35df909fd39cd6aafa9b2b67b6af26f08..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail-container.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { WizardDetailContainerSchema } from '../schema/schema'; - -export default class FdWizardDetailContainerComponent extends FarrisDesignBaseNestedComponent { - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componentId; - } - getDefaultSchema(): any { - return WizardDetailContainerSchema; - } - - getTemplateName(): string { - return 'WizardDetailContainer'; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail.ts deleted file mode 100644 index f7053ae6aa505362d65c9e0d636336ace74fc991..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard-detail.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { BuilderHTMLElement, FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { WizardDetailSchema } from '../schema/schema'; -import { FormPropertyChangeObject } from '../../../entity/property-change-entity'; -import { WizardDetailProp } from '../property/property-config-wizard-detail'; -import { DgControl } from '../../../utils/dg-control'; - -export default class FdWizardDetailComponent extends FarrisDesignBaseNestedComponent { - private wizardFill = true; - constructor(component: any, options: any) { - super(component, options); - this.viewModelId = this.parent.viewModelId; - this.componentId = this.parent.componentId; - } - getClassName(): any { - return super.getClassName() + (this.wizardFill ? ' f-utils-fill-flex-column' : ''); - } - getDefaultSchema(): any { - return WizardDetailSchema; - } - - getTemplateName(): string { - return 'WizardDetail'; - } - checkCanDeleteComponent(): boolean { - return false; - } - checkCanMoveComponent(): boolean { - return false; - } - // 初始化 - init(): void { - this.wizardFill = this.parent.component.fill; - super.init(); - } - // 渲染模板 - render(): any { - return super.render(this.renderTemplate('WizardDetail', { - component: this.component, - children: this.renderComponents(), - nestedKey: this.nestedKey, - wizardFill: this.wizardFill - })); - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: WizardDetailProp = new WizardDetailProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - if (changeObject.categoryId === 'appearance' || changeObject.categoryId === 'behavior') { - this.triggerRedraw(); - } - - // 变更步骤条后需要重构页面 - if (changeObject.propertyID === 'stepMessages') { - this.rebuild(); - } - } - - canAccepts(sourceElement: BuilderHTMLElement, targetElement?: BuilderHTMLElement): boolean { - const serviceHost = this.options.designerHost; - const dragResolveService = serviceHost.getService('DragResolveService'); - const resolveContext = dragResolveService.getComponentResolveContext(sourceElement, this); - - - - // 只接收外部容器 - return resolveContext.controlType === DgControl.ExternalContainer.type; - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard.ts deleted file mode 100644 index 20dfd65f01f58e49d8812029dfecd1ac573c2e81..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/component/fd-wizard.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { WizardSchema } from '../schema/schema'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FarrisDesignBaseNestedComponent } from '@farris/designer-element'; -import { WizardProp } from '../property/property-config'; -import { FormPropertyChangeObject } from '../../../entity/property-change-entity'; -import { ControlCssLoaderUtils } from '../../../utils/control-css-loader'; -import FdWizardDetailContainerComponent from './fd-wizard-detail-container'; - -export default class FdWizardComponent extends FarrisDesignBaseNestedComponent { - // 标记步骤项的实例 - wizardPageContainers = []; - // 标记详情 - wizardPageDetails = []; - // 标记当前步骤的id - curWizardPageIndex = ''; - component; - // 向导页标记,用于绑定子组件事件 - get wizardPageKey(): string { - return `wizardPage-${this.key}`; - } - // 向导页步骤标记 - get wizardStepKey(): string { - return `wizardStep-${this.key}`; - } - constructor(component: any, options: any) { - super(component, options); - // 加载css相关文件 - ControlCssLoaderUtils.loadCss('progress-steps.css'); - ControlCssLoaderUtils.loadCss('wizard.css'); - - // 组件所属分类为“容器” - this.category = 'container'; - } - getClassName(): any { - return super.getClassName() + (this.components.fill ? ' f-utils-fill-flex-column' : ''); - } - /** 隐藏间距 */ - hideNestedPaddingInDesginerView() { - return true; - } - - getDefaultSchema(): any { - return WizardSchema; - } - - getTemplateName(): string { - return 'Wizard'; - } - - // 初始化 - init(): void { - this.components = []; - this.wizardPageContainers = []; - this.component.contents.forEach((wizardPage, index) => { - // 缓存container的实例 - const options = Object.assign({}, this.options, { parent: this }); - const wizardPageIns = new FdWizardDetailContainerComponent(wizardPage, options); - - this.wizardPageContainers.push(wizardPageIns); - // 创建Detail - this.wizardPageDetails[index] = []; - - wizardPage.contents = wizardPage.contents || []; - const pageOptions = Object.assign({}, this.options, { parent: this }); - wizardPage.contents.forEach(comp => { - const wizardDetailCmp: any = this.createComponent(comp, pageOptions, null); - this.wizardPageDetails[index].push(wizardDetailCmp); - }); - }); - - this.curWizardPageIndex = this.component.progressData.activeIndex || 0; - - } - initWizardStep() { - - } - - // 渲染模板 - render(): any { - this.initWizardStep(); - return super.render(this.renderTemplate('Wizard', { - component: this.component, - wizardPageDetailCmps: this.wizardPageDetails.map(wizardDetail => this.renderComponents(wizardDetail)), - curWizardPageIndex: this.curWizardPageIndex, - wizardPageKey: this.wizardPageKey, - wizardStepKey: this.wizardStepKey - })); - } - // 绑定事件 - attach(element: any): any { - this.loadRefs(element, { - [this.wizardPageKey]: 'multiple', - [this.wizardStepKey]: 'single' - }); - const superAttach: any = super.attach(element); - - const stepContainer = this.refs[this.wizardStepKey]; - const stepEls = stepContainer.querySelectorAll('.step'); - stepEls.forEach((stepEl, index) => { - this.addEventListener(stepEl, 'click', (event) => { - event.stopPropagation(); - if (this.curWizardPageIndex != index) { - this.curWizardPageIndex = index; - this.redraw(); - } - }); - }); - - // 绑定子组件 - this.refs[this.wizardPageKey].forEach((wizardPage, index) => { - this.attachComponents(wizardPage, this.wizardPageDetails[index], this.component.contents[index].contents); - }); - - return superAttach; - } - - /** - * 组装属性面板配置数据 - */ - getPropertyConfig(): ElementPropertyConfig[] { - const serviceHost = this.options.designerHost; - const prop: WizardProp = new WizardProp(serviceHost, this.viewModelId, this.componentId); - const propertyConfig: ElementPropertyConfig[] = prop.getPropConfig(this.component); - return propertyConfig; - } - - /** - * 属性变更后事件:默认监听样式类属性变更,并触发模板重绘 - * @param changeObject 变更集 - */ - onPropertyChanged(changeObject: FormPropertyChangeObject): void { - - if (changeObject.categoryId === 'appearance') { - this.triggerRedraw(); - } - - // 变更步骤条后需要重构页面 - if (changeObject.propertyID === 'stepMessages') { - this.rebuild(); - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/export.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/export.ts deleted file mode 100644 index 6d45059797daa3de951818a538edc06dc8a3c9a8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/export.ts +++ /dev/null @@ -1,29 +0,0 @@ -import FdWizardComponent from './component/fd-wizard'; -import FdWizardDetailComponent from './component/fd-wizard-detail'; -import FdWizardDetailContainerComponent from './component/fd-wizard-detail-container'; -import { WizardSchema, WizardDetailContainerSchema, WizardDetailSchema } from './schema/schema'; -import { ComponentExportEntity } from '@farris/designer-element'; -import FdWizardTemplates from './templates/index-wizard'; -import FdWizardDetailTemplates from './templates/index-wizard-detail'; -import FdWizardDetailContainerTemplates from './templates/index-wizard-detail-container'; - -export const Wizard: ComponentExportEntity = { - type: 'Wizard', - component: FdWizardComponent, - template: FdWizardTemplates, - metadata: WizardSchema -}; - -export const WizardDetailContainer: ComponentExportEntity = { - type: 'WizardDetailContainer', - component: FdWizardDetailContainerComponent, - template: FdWizardDetailContainerTemplates, - metadata: WizardDetailContainerSchema -}; - -export const WizardDetail: ComponentExportEntity = { - type: 'WizardDetail', - component: FdWizardDetailComponent, - template: FdWizardDetailTemplates, - metadata: WizardDetailSchema -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-convert.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-convert.ts deleted file mode 100644 index e9458bfb936c7ccc457a2ed067b3fff478cb932e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-convert.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TypeConverter } from '@farris/ide-property-panel'; - -export class ProgressStepsConverter implements TypeConverter { - - constructor() { } - convertTo(data): string { - if (data && data.length > 0) { - return '共 ' + data.length + ' 步'; - } - return '共 0 步'; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.css b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.html b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.html deleted file mode 100644 index dd10492be73d089a70d6f69e8ec407d7257e9576..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.html +++ /dev/null @@ -1,15 +0,0 @@ -
    - - -
    - -
    - - -
    - - - - \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.ts deleted file mode 100644 index 6e9ed49f5e0e29000c41f2185f3686f08c439edb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { Component, OnInit, Output, EventEmitter, Input, ViewChild, TemplateRef, HostBinding } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { IdService } from '@farris/ui-common'; -import { DatagridComponent } from '@farris/ui-datagrid'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { ControlService } from '../../../../../service/control.service'; -import { DgControl } from '../../.../../../../../utils/dg-control'; - - -export class StepMessage { - id: string; - title: string; - icon: string; - - constructor(id: string, title: string, icon: string) { - this.id = id; - this.title = title; - this.icon = icon; - } -} - - - -@Component({ - selector: 'app-progress-steps-editor', - templateUrl: './progress-steps-editor.component.html', - styleUrls: ['./progress-steps-editor.component.css'] -}) -export class ProgressStepsEditorComponent implements OnInit { - - - @Output() closeModal = new EventEmitter(); - // 模态框确定后关闭,并传递参数 - @Output() submitModal = new EventEmitter(); - @Input() value: StepMessage[]; - @Input() editorParams = { wizardPages: [], activeIndex: 0 }; - - - @ViewChild('itemsFooter') modalFooter: TemplateRef; - modalConfig = { - title: '步骤条编辑器', - width: 900, - height: 500, - showButtons: true - }; - /** 数据源 用来保存过程中编辑数据 */ - data: StepMessage[]; - - @ViewChild('dg') dg: DatagridComponent; - - columns = [ - { field: 'id', title: '值', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'title', title: '名称', editor: { type: EditorTypes.TEXTBOX } }, - { field: 'icon', title: '图标', editor: { type: EditorTypes.TEXTBOX } } - ]; - - - @HostBinding('class') - class = 'd-flex f-utils-fill-flex-column h-100'; - - constructor( - private notifyService: NotifyService, - private controlServ: ControlService, - private idServ: IdService) { } - - ngOnInit() { - if (!this.value || this.value.length === 0) { - this.data = []; - return; - } - this.data = Object.assign([], this.value); - this.data.forEach((v: any) => { - v.hId = this.idServ.generate(); - }); - } - - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - - // 触发单元格结束编辑 - this.dg.endEditing(); - - // 获取最新数组 - const latestData = []; - this.dg.data.forEach(d => { - const { hId, ...other } = d; - latestData.push(other); - }); - - // 校验 - if (!this.checkBeforeSave(latestData)) { - return; - } - - - const newWizardPages = this.assembleWizardPages(latestData); - if (latestData.length > 0 && this.editorParams.activeIndex > latestData.length - 1) { - this.notifyService.warning('请重新设置【默认显示页面索引】属性'); - } - // parameters 数组传递新向导页数据wizardPages - this.submitModal.emit({ value: latestData, parameters: newWizardPages }); - } - - - private assembleWizardPages(latestData: StepMessage[]): any[] { - if (!latestData || latestData.length === 0) { - return []; - } - const oldPages = this.editorParams.wizardPages; - const newPages = []; - latestData.forEach(step => { - const page = oldPages.find(p => p.id === step.id); - if (page) { - page.name = step.title; - newPages.push(page); - } else { - // 新建步骤,默认预置详情页,详情页中预置外部组件。 - const pageMetadata = this.controlServ.getControlMetaData(DgControl.WizardDetailContainer.type); - pageMetadata.id = step.id; - pageMetadata.name = step.title; - const wizardDetail = pageMetadata.contents[0]; - wizardDetail.id = wizardDetail.id + '_' + step.id; - wizardDetail.footerTemplate = "
    \r\n\t\r\n\t\r\n\t\r\n \r\n
    "; - const externalContainer = this.controlServ.getControlMetaData(DgControl.ExternalContainer.type); - externalContainer.id = externalContainer.id + '_' + step.id; - externalContainer.appearance = { - class: 'h-100 position-relative' - }; - wizardDetail.contents.push(externalContainer); - newPages.push(pageMetadata); - } - }); - return newPages; - } - - /** - * 保存前检查 - */ - checkBeforeSave(latestData: StepMessage[]): boolean { - // ① 空 - if (!latestData || latestData.length === 0) { - this.notifyService.warning('请添加值。'); - return false; - } - // ② 非空,则校验每个的键值是否为空; - for (const item of latestData) { - if (!item.id || !item.title) { - this.notifyService.warning('值和名称均不允许为空。'); - return false; - } - } - // ③ 键不允许重复; - const itemKeys = latestData.map(e => e.id); - const keySet = new Set(itemKeys); - const exclusiveKeys = Array.from(keySet); - if (itemKeys.length !== exclusiveKeys.length) { - this.notifyService.warning('值不允许重复。'); - return false; - } - - return true; - - } - - /** - * 新增值 - */ - addHandler() { - - // 触发单元格结束编辑 - this.dg.endEditing(); - - const newData = new StepMessage('', '', ''); - this.dg.appendRow({ - hId: this.idServ.generate(), - ...newData - }); - } - - /** - * 删除 - */ - removeHandler(): void { - - - // 触发单元格结束编辑 - this.dg.endEditing(); - - const row = this.dg.selectedRow; - if (row) { - this.dg.deleteRow(row.id); - this.dg.clearSelections(); - } else { - this.notifyService.warning('请选中要删除的行'); - } - } -} - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config-wizard-detail.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config-wizard-detail.ts deleted file mode 100644 index 29f0c930655dd9587a5c1d73877d39cd0c72bf0a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config-wizard-detail.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { CodeEditorComponent } from '@farris/designer-devkit'; -import { ContainerUsualProp } from '../../container/common/property/container-property-config'; -import { EventsEditorFuncUtils } from '../../../utils/events-editor-func'; -import { FormPropertyChangeObject } from '../../../entity/property-change-entity'; - -export class WizardDetailProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig: ElementPropertyConfig[] = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - // 事件属性 - const eventPropConfig = this.getEventPropertyConfig(propertyData, this.viewModelId); - propertyConfig.push(eventPropConfig); - - return propertyConfig; - } - - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId); - const advProperties = [ - visibleProp, - { - propertyID: 'headerTemplate', - propertyName: '头部模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'contentTemplate', - propertyName: '内容模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - { - propertyID: 'footerTemplate', - propertyName: '底部模板', - propertyType: 'modal', - editor: CodeEditorComponent, - editorParams: { - language: 'html' - } - }, - ]; - return { - categoryId: 'behavior', - categoryName: '行为', - properties: advProperties - }; - } - - - - private getEventPropertyConfig(propertyData: any, viewModelId: string) { - const domService = this.domService; - const webCmdService = this.webCmdService; - const formBasicService = this.formBasicService; - const eventEditorService = this.eventEditorService; - const eventList = [ - { - label: 'pageDetailSelected', - name: '详情页面选中后事件' - } - ]; - return { - categoryId: 'eventsEditor', - categoryName: '事件', - hideTitle: true, - properties: EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList), - tabId: 'commands', - tabName: '交互', - setPropertyRelates(changeObject: FormPropertyChangeObject, data, parameters) { - delete propertyData[viewModelId]; - EventsEditorFuncUtils.saveRelatedParameters(eventEditorService,domService, webCmdService, propertyData, viewModelId, eventList, parameters); - this.properties = EventsEditorFuncUtils.formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList); - - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config.ts deleted file mode 100644 index 05233e17752fdb364cab4a83889fdb985b45729b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/property/property-config.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { ContainerUsualProp } from '../../container/common/property/container-property-config'; -import { FormPropertyChangeObject } from '../../../entity/property-change-entity'; -import { ProgressStepsConverter } from './editor/progress-steps-editor/progress-steps-convert'; -import { ProgressStepsEditorComponent } from './editor/progress-steps-editor/progress-steps-editor.component'; - -export class WizardProp extends ContainerUsualProp { - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 基本信息属性 - const basicPropConfig = this.getBasicPropConfig(propertyData, this.viewModelId); - propertyConfig.push(basicPropConfig); - - // 外观属性 - const appearancePropConfig = this.getAppearancePropConfig(); - propertyConfig.push(appearancePropConfig); - - // 数据属性 - const customPropConfig = this.getDataPropConfig(propertyData, this.viewModelId); - propertyConfig.push(customPropConfig); - - // 行为属性 - const behaviorPropConfig = this.getBehaviorPropConfig(propertyData, this.viewModelId); - propertyConfig.push(behaviorPropConfig); - - return propertyConfig; - } - - private getAppearancePropConfig(): ElementPropertyConfig { - const commonProps = this.getCommonAppearanceProperties(); - commonProps.push( - { - propertyID: 'fill', - propertyName: '是否填充', - propertyType: 'boolean' - }, - { - propertyID: 'stepDirection', - propertyName: '步骤条排列方式', - propertyType: 'select', - iterator: [{ key: 'vertical', value: '垂直' }, { key: 'horizontal', value: '水平' }] - }, - { - propertyID: 'stepPosition', - propertyName: '步骤条摆放位置', - propertyType: 'select', - iterator: [ - { key: 'PageLeft', value: '左侧' }, - { key: 'Top', value: '左上方' }, - { key: 'HeaderRight', value: '右上方' }, - { key: 'None', value: '隐藏' }, - ] - } - ); - return { - categoryId: 'appearance', - categoryName: '外观', - properties: commonProps - }; - } - - private getBehaviorPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - const visibleProp = this.getVisiblePropertyEntity(propertyData, viewModelId) - return { - categoryId: 'behavior', - categoryName: '行为', - properties: [ - visibleProp, - { - propertyID: 'stepClickable', - propertyName: '步骤条是否支持点击', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'storedIndex', - propertyName: '是否存储进度', - propertyType: 'boolean', - defaultValue: false - }, - { - propertyID: 'storedIndexState', - propertyName: '保持状态', - propertyType: 'boolean', - defaultValue: false - } - ] - }; - } - - private getDataPropConfig(propertyData: any, viewModelId: string): ElementPropertyConfig { - return { - categoryId: 'progressData', - categoryName: '数据配置', - propertyData: propertyData.progressData, - enableCascade: true, - parentPropertyID: 'progressData', - properties: [ - { - propertyID: 'stepMessages', - propertyName: '步骤条', - propertyType: 'modal', - editor: ProgressStepsEditorComponent, - editorParams: { - wizardPages: propertyData.contents, - activeIndex: propertyData.progressData ? propertyData.progressData.activeIndex : 0 - }, - converter: new ProgressStepsConverter() - }, - { - propertyID: 'activeIndex', - propertyName: '默认显示页面索引', - propertyType: 'number', - decimals: 0, - min: 0, - max: propertyData.progressData && propertyData.progressData.stepMessages && - propertyData.progressData.stepMessages.length > 0 ? - propertyData.progressData.stepMessages.length - 1 : 0, - defaultValue: 0 - } - ], - setPropertyRelates(changeObject: FormPropertyChangeObject, propData, parameters: any) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - - case 'stepMessages': { - const activeIndex = this.properties.find(p => p.propertyID === 'activeIndex'); - if (activeIndex) { - activeIndex.max = changeObject.propertyValue.length > 0 ? changeObject.propertyValue.length - 1 : 0; - } - if (propertyData.progressData.activeIndex > activeIndex.max) { - propertyData.progressData.activeIndex = 0; - } - propertyData.contents = parameters; - - // 属性变更后,触发刷新页面 - changeObject.needRefreshForm = true; - - break; - } - - } - } - }; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/schema/schema.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/schema/schema.ts deleted file mode 100644 index f4c2201b7f7bb1ae56761b29bac8ce6e4c69ad81..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/schema/schema.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 向导 - */ -export const WizardSchema = { - id: 'wizard-form', - type: 'Wizard', - visible: true, - appearance: null, - header: { - headerTemplate: '', - contents: [] - }, - progressData: { - activeIndex: 0, - stepMessages: [] - }, - stepClickable: true, - storedIndex: false, - fill: true, - stepDirection: 'vertical', - stepPosition: 'PageLeft', - currentPageId: '', - stateChange: '', - contents: [] -}; -/** - * 向导详情容器 - */ -export const WizardDetailContainerSchema = { - id: 'wizard-detail-container', - type: 'WizardDetailContainer', - name: 'wizard-detail-container', - pageSelected: '', - contents: [{ - id: 'wizard-detail', - type: 'WizardDetail', - appearance: null, - headerTemplate: '', - contentTemplate: '', - footerTemplate: '', - pageDetailSelected: '', - contents: [] - }] -}; -/** - * 向导详情 - */ -export const WizardDetailSchema = { - id: 'wizard-detail', - type: 'WizardDetail', - visible: true, - appearance: null, - headerTemplate: '', - contentTemplate: '', - footerTemplate: '', - pageDetailSelected: '', - contents: [] -}; - diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail-container.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail-container.ts deleted file mode 100644 index 9b85260afe36e960f48112fb3b96cfae90198f10..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail-container.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './tmpl-wizard-detail-container'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail.ts deleted file mode 100644 index ae2214301bfe8599671b7066ab4abda3a1d4fe21..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard-detail.ts +++ /dev/null @@ -1,3 +0,0 @@ -import form from './tmpl-wizard-detail'; - -export default { form }; diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard.ts deleted file mode 100644 index 8763ba2954f04bfd5ede7fb642000edb57c41581..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/index-wizard.ts +++ /dev/null @@ -1,6 +0,0 @@ -import form from './tmpl-wizard'; - -export default { form }; - - - diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail-container.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail-container.ts deleted file mode 100644 index e6a820790c7086b688c86f3ce39bc25e00b0f065..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail-container.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default (ctx: any) => { - return `${ctx.children}`; -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail.ts deleted file mode 100644 index a314b3a24eb832f1eaf5c6bf728e61132283bd81..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard-detail.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default (ctx: any) => { - let headerTmplStr = ''; - if (ctx.component.headerTemplate) { - headerTmplStr = `
    ${ctx.component.headerTemplate}
    `; - } - let contentTmplStr = ''; - if (ctx.component.contentTemplate) { - contentTmplStr = `
    ${ctx.component.contentTemplate}
    `; - } else { - contentTmplStr = `
    -
    - ${ctx.children} -
    `; - } - let footerTmplStr = ''; - if (ctx.component.footerTemplate) { - footerTmplStr = ``; - } - // fill属性传自wizard组件 - return `
    - ${headerTmplStr}${contentTmplStr}${footerTmplStr} -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard.ts b/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard.ts deleted file mode 100644 index cfd676b3c8ea3f1653fbc34a151309fc3bba5ead..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/components/wizard/templates/tmpl-wizard.ts +++ /dev/null @@ -1,136 +0,0 @@ -export default (ctx: any) => { - // 向导步骤相关样式 - let wizardStepCls = ''; - switch (ctx.component.stepPosition) { - case 'Top': - wizardStepCls = 'f-component-wizard-step-top'; - break; - case 'HeaderRight': - wizardStepCls = 'f-component-wizard-step-headerright'; - - break; - case 'PageLeft': - wizardStepCls = 'f-component-wizard-step-pageleft'; - break; - case "None": - wizardStepCls = 'f-component-wizard-step-none'; - break; - default: - wizardStepCls = ''; - } - /** - * 步骤条字符串 - */ - function getStepStructure() { - let stepCtx = { - direction: ctx.component.stepDirection ? ctx.component.stepDirection : 'horizontal', - fill: false, - extendTemplate: '', - stepsCls: '', - stepsData: ctx.component.progressData.stepMessages, - activeIndex: ctx.curWizardPageIndex - } - // 列表样式 - let listCls = ''; - if (stepCtx.direction == 'horizontal') { - listCls = 'f-progress-step-list'; - if (stepCtx.fill == true) { - listCls += ' f-progress-step-horizontal-fill'; - } - } else { - listCls = 'f-progress-step-list-block'; - if (stepCtx.fill == true) { - listCls += ' f-progress-step-vertical-fill'; - } - } - if (stepCtx.extendTemplate) { - listCls += ' f-progress-step-has-extend'; - } - listCls += ' ' + stepCtx.stepsCls; - // 列表结构 - let listStr = ''; - // - for (let k = 0; k < stepCtx.stepsData.length; k++) { - let curStep = stepCtx.stepsData[k]; - let liCls = k < stepCtx.activeIndex ? ' finish' : ''; - liCls += curStep.hasOwnProperty('class') && curStep['class'] ? ' ' + curStep['class'] : ''; - liCls += k == stepCtx.activeIndex ? ' active' : ''; - liCls += stepCtx.extendTemplate ? ' step-has-extend' : ''; - let stepRowCls = k < stepCtx.activeIndex ? ' step-finish' : ''; - stepRowCls += k == stepCtx.activeIndex ? ' step-active' : ''; - let iconStr = ''; - if (curStep.hasOwnProperty('icon') && curStep['icon']) { - iconStr = ``; - } else { - if (k >= stepCtx.activeIndex) { - iconStr = `${k + 1}`; - } else { - iconStr = ``; - } - } - let lineStr = ''; - if (k < stepCtx.stepsData.length - 1) { - lineStr = `
    - -
    `; - } - listStr += `
  • -
    -
    - ${iconStr} -
    -

    ${curStep.title}

    -
    -
    ${lineStr} -
    - ${stepCtx.extendTemplate} -
  • `; - } - - // 空数据 - let emptyStr = ''; - if (stepCtx.stepsData.length == 0) { - emptyStr = '
    暂无数据
    '; - } - return `
    -
      - ${listStr} -
    - ${emptyStr} -
    `; - } - let stepStr = getStepStructure(); - // 步骤条位置 - let wizardStepStr = ''; - if (ctx.component.stepPosition == 'Top') { - wizardStepStr = stepStr; - } else if (ctx.component.stepPosition == 'None') { - wizardStepStr = `
    ${stepStr}
    `; - } - // Header字符串 - let headerStr = ''; - // 因为没有 HeaderTemplate 属性 - if (ctx.component.stepPosition == 'HeaderRight') { - headerStr = `
    ${stepStr}
    `; - } - // content字符串 - let contentStr = `
    `; - if (ctx.component.stepPosition == 'PageLeft') { - contentStr += stepStr; - } - let wizardPagesStr = ''; - ctx.component.contents.forEach((wizardPage, index) => { - let pageCls = index == ctx.curWizardPageIndex ? ' active' : ''; - wizardPagesStr += `
    - ${ctx.wizardPageDetailCmps[index]} -
    `; - }); - contentStr += `
    ${wizardPagesStr}
    `; - - return `
    - ${wizardStepStr} -
    - ${headerStr}${contentStr} -
    -
    `; -}; diff --git a/packages/designer/projects/designer-ui/src/lib/designer-ui.module.ts b/packages/designer/projects/designer-ui/src/lib/designer-ui.module.ts deleted file mode 100644 index f4fea6097bf2588125da4ca20aed977905a5ee4a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/designer-ui.module.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { LOCALE_ID, NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { FarrisDesignerDevkitModule } from '@farris/designer-devkit'; -import { ColumnGroupEditorComponent, HeaderGroupEditorModule } from '@farris/header-group-editor'; -import { PropertyPanelModule } from '@farris/ide-property-panel'; -// import { CustomWidthEditorComponent, DefaultValueEditorComponent, NocodeDesignerPluginModule } from '@farris/nocode-designer-plugin'; -import { ColumnWidthSettingComponent, ResponseLayoutEditorModule } from '@farris/response-layout-editor'; -import { RichTextDesignerModule } from '@farris/rich-text-designer'; -import { ComboListModule } from '@farris/ui-combo-list'; -import { FarrisContextMenuModule } from '@farris/ui-context-menu'; -import { DatagridModule } from '@farris/ui-datagrid'; -import { DatagridEditorsModule, EditorProviders } from '@farris/ui-datagrid-editors'; -import { FilterModule } from '@farris/ui-filter-editor'; -import { FarrisFormsModule } from '@farris/ui-forms'; -import { InputGroupModule } from '@farris/ui-input-group'; -import { LoadingModule } from '@farris/ui-loading'; -import { MultiSelectModule } from '@farris/ui-multi-select'; -import { NotifyModule } from '@farris/ui-notify'; -import { NumberSpinnerModule } from '@farris/ui-number-spinner'; -import { ProgressStepModule } from '@farris/ui-progress-step'; -import { FarrisTabsModule } from '@farris/ui-tabs'; -import { TreeTableModule } from '@farris/ui-treetable'; -// import { GSPMetadataServiceModule, MetadataSelectModule } from '@gsp-lcm/metadata-selector'; -// import { GSPMetadataRTServiceModule, MetadataRTSelectModule } from '@gsp-lcm/metadatart-selector'; -// import { ExpressionModule, ExpressionService } from '@gsp-svc/expression'; -import { FieldStyleConfigComponent } from './components/collection/common/property/editor/field-style-config/field-style-config.component'; -// import { EntityFilterConditionComponent } from './components/collection/common/property/editor/filter-condition/entity-filter-condition.component'; -import { GridFieldEditorComponent } from './components/collection/common/property/editor/grid-field-editor/grid-field-editor.component'; -import { GroupFieldEditorComponent } from './components/collection/common/property/editor/group-field-editor/group-field-editor.component'; -import { PresetTemplateSelectorComponent } from './components/collection/list-view/property/editor/preset-template-selector/preset-template-selector.component'; -import { TemplateBindingEditorComponent } from './components/collection/list-view/property/editor/template-binding-editor/template-binding-editor.component'; -import { TemplateButtonEditorComponent } from './components/collection/list-view/property/editor/template-binding-editor/template-button-editor/template-button-editor.component'; -import { VariableListItemComponent } from './components/collection/list-view/property/editor/template-binding-editor/variable-list-item/variable-list-item.component'; -import { VariableListComponent } from './components/collection/list-view/property/editor/template-binding-editor/variable-list/variable-list.component'; -import { SplitFormComponent } from './components/container/component/context-menu/editor/split-form-component/split-form-component.component'; -import { CreateDynamicItemComponent } from './components/container/dynamic-area/component/editor/create-dynamic-item/create-dynamic-item.component'; -import { CreateFieldSetComponent } from './components/container/form/context-menu/editor/create-field-set/create-field-set.component'; -import { FormLayoutSettingComponent } from './components/container/form/property/editor/form-layout-setting/form-layout-setting.component'; -import { PageToolbarEditorComponent } from './components/container/header/property/editor/page-toolbar-editor/page-toolbar-editor.component'; -import { MultiViewEditorComponent } from './components/container/multi-view-container/property/editor/multi-view-editor/multi-view-editor.component'; -import { ListFilterFieldsEditorComponent } from './components/filter/list-filter/property/editor/list-filter-fields-editor/list-filter-fields-editor.component'; -import { InputgroupFormMappingEditorComponent } from './components/filter/queryScheme/property/editor/query-scheme-fields-editor/inputgroup-form-mapping-editor/inputgroup-form-mapping-editor'; -import { QuerySchemeFieldsEditorComponent } from './components/filter/queryScheme/property/editor/query-scheme-fields-editor/query-scheme-fields-editor.component'; -import { SelectHelpClearFieldsEditorComponent } from './components/filter/queryScheme/property/editor/query-scheme-fields-editor/select-help-clear-fields/select-help-clear-fields.component'; -import { QuerySchemePresetFieldsEditorComponent } from './components/filter/queryScheme/property/editor/query-scheme-preset-fields-editor/query-scheme-preset-fields-editor.component'; -// import { SelectHelpConditionComponent } from './components/input/lookup-edit/property/editors/select-help-condition/select-help-condition.component'; -// import { SelectHelpDisplayFieldsComponent } from './components/input/lookup-edit/property/editors/select-help-display-fields/select-help-display-fields.component'; -// import { SelectHelpMetadataComponent } from './components/input/lookup-edit/property/editors/select-help-metadata/select-help-metadata.component'; -// import { SelectHelpTextFieldComponent } from './components/input/lookup-edit/property/editors/select-help-text-field/select-help-text-field.component'; -import { ProgressStepsEditorComponent } from './components/wizard/property/editor/progress-steps-editor/progress-steps-editor.component'; -// import { AppNavigationUdtComponent, AppNavigationUdtModule } from '@farris/app-navigation-udt'; -import { AppNavigationBeComponent, AppNavigationBeModule } from '@farris/app-navigation-be'; -import { FarrisColorpickerPlusComponent, FarrisColorpickerPlusModule } from '@farris/colorpicker-plus'; -import { PaginationControlsComponent, PaginationModule } from '@farris/ui-pagination'; -import { ResponseLayoutSplitterComponent } from './components/container/response-layout/property/editor/response-layout-splitter/response-layout-splitter.component'; -import { CalendarFieldsEditorComponent } from './components/collection/appointment-calendar/property/editor/calendar-fields-editor/calendar-fields-editor.component'; -import { PlaceDataSourceSelectorComponent } from './components/collection/appointment-calendar/property/editor/place-datasource-selector/place-datasource-selector.component'; -// import { AppNavigationBeModule } from '@farris/app-navigation-be'; -import { PlaceTemplateEditorComponent } from './components/collection/appointment-calendar/property/editor/place-template-editor/place-template-editor.component'; -import { PlaceFieldSelectorComponent } from './components/collection/appointment-calendar/property/editor/place-field-selector/place-field-selector.component'; -// import { NocodePlaceDataSourceSelectorComponent } from './components/collection/appointment-calendar/property/editor/nocode-place-datasource-selector/nocode-place-datasource-selector.component'; -// import { SelectHelpLinkMappingComponent } from './components/input/lookup-edit/property/editors/select-help-link-mapping/select-help-link-mapping.component'; -// import { SelectHelpLinkMappingItemComponent } from './components/input/lookup-edit/property/editors/select-help-link-mapping/mapping-item/mapping-item.component'; -import { ComboLookupModule } from '@farris/ui-combo-lookup'; - -@NgModule({ - declarations: [ - // SelectHelpTextFieldComponent, - // SelectHelpMetadataComponent, - // SelectHelpConditionComponent, - FormLayoutSettingComponent, - CreateFieldSetComponent, - SplitFormComponent, - MultiViewEditorComponent, - PageToolbarEditorComponent, - GroupFieldEditorComponent, - GridFieldEditorComponent, - FieldStyleConfigComponent, - ListFilterFieldsEditorComponent, - SelectHelpClearFieldsEditorComponent, - QuerySchemeFieldsEditorComponent, - QuerySchemePresetFieldsEditorComponent, - // SelectHelpDisplayFieldsComponent, - InputgroupFormMappingEditorComponent, - ProgressStepsEditorComponent, - CreateDynamicItemComponent, - PresetTemplateSelectorComponent, - TemplateBindingEditorComponent, - VariableListComponent, - VariableListItemComponent, - TemplateButtonEditorComponent, - // EntityFilterConditionComponent, - ResponseLayoutSplitterComponent, - CalendarFieldsEditorComponent, - PlaceDataSourceSelectorComponent, - // NocodePlaceDataSourceSelectorComponent, - PlaceTemplateEditorComponent, - PlaceFieldSelectorComponent, - // SelectHelpLinkMappingComponent, - // SelectHelpLinkMappingItemComponent - ], - imports: [ - CommonModule, - FormsModule, - NotifyModule.forRoot(), - LoadingModule.forRoot({ message: '加载中,请稍候...' }), - // ApprovalCommentsModule, - // NocodeDesignerPluginModule, - ResponseLayoutEditorModule, - FarrisDesignerDevkitModule, - FarrisFormsModule, - // ExpressionModule, - TreeTableModule, - InputGroupModule, - // MetadataRTSelectModule, - // GSPMetadataRTServiceModule.forRoot(''), - // GSPMetadataServiceModule.forRoot(''), - // MetadataSelectModule, - BrowserAnimationsModule, - FilterModule, - PropertyPanelModule, - ComboListModule, - HeaderGroupEditorModule, - NumberSpinnerModule, - MultiSelectModule, - DatagridModule, - DatagridEditorsModule, - DatagridModule.forRoot([ - ...EditorProviders - ]), - ProgressStepModule, - FarrisContextMenuModule, - - FarrisTabsModule, - RichTextDesignerModule, - // AppNavigationUdtModule, - AppNavigationBeModule, - PaginationModule, - FarrisColorpickerPlusModule, - ComboLookupModule - // AppNavigationBeModule - ], - exports: [], - entryComponents: [ - // ApprovalCommentEditorComponent, - // CustomWidthEditorComponent, - ColumnWidthSettingComponent, - // DefaultValueEditorComponent, - // SelectHelpTextFieldComponent, - // SelectHelpMetadataComponent, - // SelectHelpConditionComponent, - FormLayoutSettingComponent, - CreateFieldSetComponent, - SplitFormComponent, - MultiViewEditorComponent, - PageToolbarEditorComponent, - GroupFieldEditorComponent, - GridFieldEditorComponent, - ColumnGroupEditorComponent, - FieldStyleConfigComponent, - ListFilterFieldsEditorComponent, - QuerySchemeFieldsEditorComponent, - QuerySchemePresetFieldsEditorComponent, - SelectHelpClearFieldsEditorComponent, - // SelectHelpDisplayFieldsComponent, - InputgroupFormMappingEditorComponent, - ProgressStepsEditorComponent, - CreateDynamicItemComponent, - // JointSearchComponent, - PresetTemplateSelectorComponent, - TemplateBindingEditorComponent, - // EntityFilterConditionComponent, - // AppNavigationUdtComponent, - AppNavigationBeComponent, - PaginationControlsComponent, - FarrisColorpickerPlusComponent, - ResponseLayoutSplitterComponent, - CalendarFieldsEditorComponent, - PlaceDataSourceSelectorComponent, - PlaceTemplateEditorComponent, - PlaceFieldSelectorComponent, - // NocodePlaceDataSourceSelectorComponent, - // SelectHelpLinkMappingComponent, - // SelectHelpLinkMappingItemComponent - ], - providers: [ - { provide: LOCALE_ID, useValue: 'zh-CHS' }, - // { provide: Server_Host, useValue: '' }, - // { provide: Load_Data_Uri, useValue: '' }, - // ExpressionService - ] -}) -export class FarrisDesignerUIModule { -} diff --git a/packages/designer/projects/designer-ui/src/lib/entity/control-context-menu.ts b/packages/designer/projects/designer-ui/src/lib/entity/control-context-menu.ts deleted file mode 100644 index e5fc30eb66b802b8ff0433f96afda1d378d410b9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/entity/control-context-menu.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ContextMenuItem } from '@farris/ui-context-menu'; - -export class ControlContextMenuItem implements ContextMenuItem { - /** 菜单id */ - public id: string; - /** 菜单标题 */ - public title: string; - /** 菜单点击命令 */ - public handle?: (e?: any) => any; - - children?: ControlContextMenuItem[]; - - /** 菜单是否可见 */ - visible?: (e: any) => boolean | boolean; - - /** 菜单是否禁用 */ - disable?: (e: any) => boolean | boolean; - - /** - * 子菜单对应的控件分类,用于二级菜单是某一分类下的所有控件 - */ - public parentMenuId?: string; - - /** 菜单需要的额外参数 */ - [propName: string]: any; -} diff --git a/packages/designer/projects/designer-ui/src/lib/entity/property-change-entity.ts b/packages/designer/projects/designer-ui/src/lib/entity/property-change-entity.ts deleted file mode 100644 index 1d1fecbbf8a3438b70ce67ffece84b6f8a7d9356..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/entity/property-change-entity.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { PropertyChangeObject } from '@farris/ide-property-panel'; - -/** - * 属性变更实体类 - */ -export class FormPropertyChangeObject extends PropertyChangeObject { - - /** 属性变更后是否需要整体刷新表单 */ - needRefreshForm?: boolean; - - /** 属性变更后需要局部刷新的组件id */ - needRefreshedComponentId?: string; - - /** 是否需要刷新控件树 */ - needRefreshControlTree?: boolean; - - /** 是否需要更新控件树节点名称 */ - needUpdateControlTreeNodeName?: boolean; - - /** 关联变更的属性集合,用于更新表单DOM属性 */ - relateChangeProps?: Array<{ - propertyID: string, - propertyValue: any - }>; - - /** 属性变更后是否需要向schema字段同步 */ - needSyncToSchemaField?: boolean; - -} diff --git a/packages/designer/projects/designer-ui/src/lib/service/context-menu.manager.ts b/packages/designer/projects/designer-ui/src/lib/service/context-menu.manager.ts deleted file mode 100644 index f06cb0ad0a170daa3d2693cef238ad99172d7ba8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/service/context-menu.manager.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { RowNode } from '@farris/ui-treetable'; -import { FarrisDesignBaseComponent } from '@farris/designer-element'; -import { DesignViewModelService, DomService, RefreshFormService, WebCmdService } from '@farris/designer-services'; -import { IDesignerHost } from '@farris/designer-element'; -import { NotifyService } from '@farris/ui-notify'; -import { Injector } from '@angular/core'; -import { ControlContextMenuItem } from '../entity/control-context-menu'; - - -export class ContextMenuManager { - /** 控件树节点行数据 */ - public rowNode: RowNode; - - /** form组件实例 */ - public cmpInstance: FarrisDesignBaseComponent; - - /** 操作表单DOM的工具类 */ - public domService: DomService; - public webCmdService: WebCmdService; - /** 操作表单设计时ViewModel的工具类 */ - public dgVMService: DesignViewModelService; - - public notifyService: NotifyService; - - public refreshFormService: RefreshFormService; - - public injector: Injector; - - - /** 服务提供接口 */ - public serviceHost: IDesignerHost; - - constructor(cmp: FarrisDesignBaseComponent, rowNode: RowNode) { - - this.rowNode = rowNode; - this.cmpInstance = cmp; - - this.serviceHost = cmp.options['designerHost']; - this.injector = this.serviceHost.getService('Injector'); - this.webCmdService = this.serviceHost.getService('WebCmdService'); - this.domService = this.serviceHost.getService('DomService'); - this.dgVMService = this.serviceHost.getService('DesignViewModelService'); - this.refreshFormService = this.serviceHost.getService('RefreshFormService'); - this.notifyService = this.injector.get(NotifyService); - - } - - /** - * 配置菜单点击事件 - * @param menuConfig 菜单项 - */ - addContextMenuHandle(menuConfig: ControlContextMenuItem[]) { - menuConfig.forEach(menu => { - if (typeof (menu) === 'object') { - menu.handle = (e) => { this.contextMenuClicked(e); }; - - if (menu.children) { - menu.children.forEach(childMenu => { - if (typeof (childMenu) === 'object') { - childMenu.handle = (e) => { this.contextMenuClicked(e); }; - childMenu.parentMenuId = menu.id; - } - }); - } - } - }); - } - - /** 菜单点击事件,由各控件实现 */ - contextMenuClicked(e) { - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/service/control-creator.service.ts b/packages/designer/projects/designer-ui/src/lib/service/control-creator.service.ts deleted file mode 100644 index fcbb25409ed2853d20854d6a046d905f19ef0e95..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/service/control-creator.service.ts +++ /dev/null @@ -1,550 +0,0 @@ -import { Injectable } from '@angular/core'; -import { SchemaDOMMapping } from './schema-dom-mapping'; -import { DgControl } from '../utils/dg-control'; -import { ControlService } from './control.service'; -import { FormBindingType, FormVariable, FormVariableCategory, FormSchemaEntityField, FormSchemaEntityFieldType$Type, FormSchemaEntityFieldTypeName, DomService } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; - -const Languages = [ - { - code: 'zh-CHS', - name: '中文简体' - }, { - code: 'en', - name: 'English' - } -]; - -/** - * 根据字段/变量创建控件的逻辑。目前区分卡片区域、列表区域、Table等 - */ -@Injectable({ - providedIn: 'root' -}) -export class ControlCreatorService { - - constructor(private controlService: ControlService, private domService: DomService) { } - - /** - * 创建Form中的控件,并根据SchemaField配置DOM属性 - * @param schemaField schema字段 - * @param componentType 组件类型 dataGrid/form-col-4/form-col-1.... - * @param editorType 编辑器类型 - * @param componentId 控件所属组件ID,用于判断控件样式 - */ - public createControlBySchemaFeild(schemaField: FormSchemaEntityField, componentType: string, editorType?: string, componentId?: string): any { - if (!schemaField.type) { - return; - } - const controlType = editorType || (schemaField.editor ? schemaField.editor.$type : 'TextBox'); - const controlMetadata: any = this.controlService.getControlMetaData(controlType); - if (!controlMetadata) { return; } - - const metadata = cloneDeep(controlMetadata); - // 通用属性 - const domField = SchemaDOMMapping.getControlName(controlType); - metadata[domField] = schemaField.name; - metadata.require = schemaField.require; - - // 若当前表单包含状态机,则配置只读属性 - if (this.domService.module.stateMachines && this.domService.module.stateMachines.length > 0) { - metadata.readonly = schemaField.readonly ? true : '!viewModel.stateMachine[\'editable\']'; - } - - // 控件ID:字段bindingField_字段ID前8位(中划线转下划线)_四位随机码 - metadata.id = schemaField.id.length > 8 ? schemaField.id.slice(0, 8) : schemaField.id; - metadata.id = schemaField.bindingField + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - - metadata.binding = { - type: FormBindingType.Form, - path: schemaField.bindingField, - field: schemaField.id, - fullPath: schemaField.path - }; - // 把schema里面记录的path复制到控件,解决udt字段path找不到的问题。 - metadata.path = schemaField.bindingPath; - - // type 属性 - // 文本类型和数字类型映射长度 - if (controlType === DgControl.TextBox.type || controlType === DgControl.MultiTextBox.type || - controlType === DgControl.NumericBox.type) { - metadata.maxLength = schemaField.type.length; - } - - // 枚举类型 - if (controlType === DgControl.RadioGroup.type) { - metadata.enumData = schemaField.type.enumValues; - } - if (controlType === DgControl.EnumField.type) { - metadata.enumData = schemaField.type.enumValues; - if (metadata.enumData) { - metadata.idField = 'value'; - metadata.textField = 'name'; - } - - } - // 多语字段 - if (schemaField.multiLanguage && controlType === DgControl.LanguageTextBox.type) { - metadata.languages = Languages; - } - - // 数字类型精度 - if (controlType === DgControl.NumericBox.type) { - metadata.precision = schemaField.type.precision; - if (schemaField.type.$type === FormSchemaEntityFieldType$Type.BigNumericType) { - metadata.bigNumber = true; - } - } - // 默认创建controlSOurce=Farris 的DateBox控件;增加数据国际化配置 - if (controlType === DgControl.DateBox.type) { - metadata.fieldType = schemaField.type.name; - metadata.localization = false; - if (schemaField.type.name === FormSchemaEntityFieldTypeName.Date || - schemaField.type.name === FormSchemaEntityFieldTypeName.DateTime) { - metadata.localizationType = schemaField.type.name; - } - if (schemaField.type.name === FormSchemaEntityFieldTypeName.String) { - metadata.localizationType = 'Date'; - } - // 日期时间类型字段:启用时间选择属性 - if (metadata.fieldType === 'DateTime') { - metadata.showTime = true; - metadata.dateFormat = 'yyyy-MM-dd HH:mm:ss'; - metadata.returnFormat = 'yyyy-MM-dd HH:mm:ss'; - - } - } - // 下拉列表、帮助控件允许任意输入时的最大字符长度 - if (controlType === DgControl.EnumField.type || controlType === DgControl.LookupEdit.type) { - metadata.maxSearchLength = schemaField.type.length; - } - - // editor 属性 - if (schemaField.editor) { - const { $type, ...editor } = schemaField.editor; - Object.assign(metadata, editor); - } - - // 设置class - let className = this.resolveControlClassByComponentType(componentType); - if (componentId) { - className = this.domService.getControlClassByFormUnifiedLayout(className, componentId); - } - metadata.appearance = { - class: className - }; - - return metadata; - } - - - /** - * 创建表格列控件,并根据SchemaField配置DOM属性。 - * 若包含列编辑器,则新建列编辑器控件 - * @param schemaField schema字段 - * @param dataField 列表dataField字段:可取schemaField.bindingPath (此参数可删除) - * @param gridFieldEditable 列表是否可编辑 - * @param gridFieldType GridField/TreeGridField - * @param controlSource Kendo/Farris - */ - public createGridFieldBySchemaFeild( - schemaField: FormSchemaEntityField, dataField: string, - gridFieldEditable = false, gridFieldType: string, controlSource = 'Kendo', gridFieldEditorType?: string) { - if (!schemaField.type) { - return; - } - const metadata: any = this.controlService.getControlMetaData(gridFieldType); - if (!metadata) { - return; - } - // 通用属性 - // 控件ID:字段bindingField_字段ID(中划线转下划线)_四位随机码 - metadata.id = schemaField.id.length > 8 ? schemaField.id.slice(0, 8) : schemaField.id; - metadata.id = schemaField.bindingField + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - - metadata.caption = schemaField.name; - metadata.binding = { - type: FormBindingType.Form, - path: schemaField.bindingField, - field: schemaField.id, - fullPath: schemaField.path - }; - metadata.controlSource = controlSource; - - // dataField 字段 - metadata.dataField = dataField || schemaField.bindingPath; - - // 列类型 - const dataType = SchemaDOMMapping.mapMDataType2GridFieldType(schemaField.type); - metadata.dataType = dataType; - - // 枚举 - if (schemaField.type.enumValues) { - metadata.enumData = schemaField.type.enumValues; - } - - // 多语字段 - if (schemaField.multiLanguage) { - metadata.languages = Languages; - } - metadata.multiLanguage = !!schemaField.multiLanguage; - - // DateBox类型字段;增加数据国际化配置 - if (schemaField.type.name === FormSchemaEntityFieldTypeName.Date || - schemaField.type.name === FormSchemaEntityFieldTypeName.DateTime) { - metadata.localization = false; - metadata.localizationType = schemaField.type.name; - } - if (schemaField.type.name === FormSchemaEntityFieldTypeName.String) { - metadata.localization = false; - metadata.localizationType = 'Date'; - } - - if (!schemaField.editor) { - return metadata; - } - // 列格式 - if (controlSource === 'Farris' || controlSource === 'Primeng') { - metadata.frozen = 'none'; - this.setFarrisGridFieldFormatter(dataType, metadata, schemaField); - } else if (schemaField.editor && schemaField.editor.format) { - metadata.format = schemaField.editor.format; - } - - // 列编辑器 - if (gridFieldEditable) { - const editor = this.createControlBySchemaFeild(schemaField, 'GridField', gridFieldEditorType); - // 列表列编辑中不设状态机,故此处注释掉状态机赋值 - delete editor.readonly; - metadata.editor = editor; - } - - return metadata; - } - - /** - * Farris列格式 - * @param gridFieldType 列数据类型 - * @param metadata 列dom - * @param schemaField 字段 - */ - private setFarrisGridFieldFormatter(gridFieldType: string, metadata: any, schemaField: any) { - - switch (gridFieldType) { - case 'number': { - metadata.formatter = { - type: 'number', - precision: schemaField.type.precision, - thousand: ',', - decimal: '.' - }; - break; - } - case 'date': { - metadata.formatter = { - type: 'date', - dateFormat: 'yyyy-MM-dd' - }; - break; - } - case 'datetime': { - metadata.formatter = { - type: 'date', - dateFormat: 'yyyy-MM-dd HH:mm:ss' - }; - break; - } - case 'boolean': { - metadata.formatter = { - type: 'boolean', - trueText: '是', - falseText: '否' - }; - break; - } - case 'enum': { - metadata.formatter = { - type: 'enum' - }; - break; - } - } - } - - /** - * 根据变量创建控件 - * 暂时不支持对象类型和数组类型变量 - */ - public createControlByVariable(varField: FormVariable, componentType: string, controlType = '', componentId?: string) { - if (!varField.type) { - return; - } - if (!controlType) { - controlType = SchemaDOMMapping.getEditorTypeByVariableType(varField.type); - } - - const metadata: any = this.controlService.getControlMetaData(controlType); - if (!metadata) { return; } - - // 通用属性 - const domField = SchemaDOMMapping.getControlName(controlType); - metadata[domField] = varField.name; - - - // 控件ID:字段bindingField_字段ID(中划线转下划线)_四位随机码 - metadata.id = varField.id.length > 8 ? varField.id.slice(0, 8) : varField.id; - metadata.id = varField.code + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - - if (!varField.category || varField.category === FormVariableCategory.locale) { - // 本地变量 - // 判断本地变量是否为当前组件的,若不是,需要修改path属性 - let isVaribleAndControlInSameComponent = true; - if (componentId) { - const variableViewModelId = this.getViewModelIdOfVariable(varField.id); - const cmp = this.domService.getComponentById(componentId); - isVaribleAndControlInSameComponent = variableViewModelId === cmp.viewModel; - } - metadata.binding = { - type: FormBindingType.Variable, - path: isVaribleAndControlInSameComponent ? varField.code : 'root-component.' + varField.code, - field: varField.id, - fullPath: varField.code - }; - } else { - // 后端变量 - metadata.binding = { - type: FormBindingType.Variable, - path: 'root-component.' + varField.code, - field: varField.id, - fullPath: varField.code - }; - - } - - // 默认创建controlSOurce=Farris 的DateBox控件 - if (controlType === DgControl.DateBox.type) { - metadata.fieldType = varField.type; - } - // 设置样式:若所属Form有统一布局配置,需要采用统一配置样式;若无,则根据ComponentType判断 - // 设置class - let className = this.resolveControlClassByComponentType(componentType); - if (componentId) { - className = this.domService.getControlClassByFormUnifiedLayout(className, componentId); - } - metadata.appearance = { - class: className - }; - - // 配置状态机。因为变量没有只读属性,所以控件不是只读的 - if (this.domService.module.stateMachines && this.domService.module.stateMachines.length > 0) { - metadata.readonly = '!viewModel.stateMachine[\'editable\']'; - } - - return metadata; - - } - /** - * 创建Table TD中的输入控件,并根据SchemaField配置DOM属性 - * @param schemaField schema字段 - */ - createTableTdControlBySchemaFeild(schemaField: FormSchemaEntityField, editorType?: string): any { - if (!schemaField.type) { - return; - } - const controlType = editorType || (schemaField.editor ? schemaField.editor.$type : 'TextBox'); - const metadata: any = this.controlService.getControlMetaData(controlType); - if (!metadata) { return; } - - // 通用属性 - const domField = SchemaDOMMapping.getControlName(controlType); - metadata[domField] = schemaField.name; - metadata.require = schemaField.require; - metadata.readonly = schemaField.readonly ? true : 'viewModel.stateMachine && !viewModel.stateMachine[\'editable\']'; - - // 控件ID:字段bindingField_字段ID前8位(中划线转下划线)_四位随机码 - metadata.id = schemaField.id.length > 8 ? schemaField.id.slice(0, 8) : schemaField.id; - metadata.id = schemaField.bindingField + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - - metadata.binding = { - type: FormBindingType.Form, - path: schemaField.bindingField, - field: schemaField.id, - fullPath: schemaField.path - }; - // 把schema里面记录的path复制到控件,解决udt字段path找不到的问题。 - metadata.path = schemaField.bindingPath; - - // type 属性 - // 文本类型和数字类型映射长度 - if (controlType === DgControl.TextBox.type || controlType === DgControl.MultiTextBox.type || - controlType === DgControl.NumericBox.type) { - metadata.maxLength = schemaField.type.length; - } - - // 枚举类型 - if (controlType === DgControl.RadioGroup.type) { - metadata.enumData = schemaField.type.enumValues; - } - if (controlType === DgControl.EnumField.type) { - metadata.enumData = schemaField.type.enumValues; - if (metadata.enumData) { - metadata.idField = 'value'; - metadata.textField = 'name'; - } - - } - // 多语字段 - if (schemaField.multiLanguage && controlType === DgControl.LanguageTextBox.type) { - metadata.languages = Languages; - } - - // 数字类型精度 - if (controlType === DgControl.NumericBox.type) { - metadata.precision = schemaField.type.precision; - if (schemaField.type.$type === FormSchemaEntityFieldType$Type.BigNumericType) { - metadata.bigNumber = true; - } - } - // 默认创建controlSOurce=Farris 的DateBox控件;增加数据国际化配置 - if (controlType === DgControl.DateBox.type) { - metadata.fieldType = schemaField.type.name; - metadata.localization = false; - if (schemaField.type.name === FormSchemaEntityFieldTypeName.Date || - schemaField.type.name === FormSchemaEntityFieldTypeName.DateTime) { - metadata.localizationType = schemaField.type.name; - - } - // 日期时间类型字段:启用时间选择属性 - if (metadata.fieldType === 'DateTime') { - metadata.showTime = true; - metadata.dateFormat = 'yyyy-MM-dd HH:mm:ss'; - metadata.returnFormat = 'yyyy-MM-dd HH:mm:ss'; - - } - - - metadata.returnType = 'String'; - } - // 下拉列表、帮助控件允许任意输入时的最大字符长度 - if (controlType === DgControl.EnumField.type || controlType === DgControl.LookupEdit.type) { - metadata.maxSearchLength = schemaField.type.length; - } - - // editor 属性 - if (schemaField.editor) { - const { $type, ...editor } = schemaField.editor; - Object.assign(metadata, editor); - } - - metadata.showInTable = true; - - return metadata; - } - - /** - * 根据变量创建Table控件 - * 暂时不支持对象类型和数组类型变量 - */ - createTableTdControlByVariable(varField: FormVariable, controlType = '') { - if (!varField.type) { - return; - } - if (!controlType) { - controlType = SchemaDOMMapping.getEditorTypeByVariableType(varField.type); - } - - const metadata: any = this.controlService.getControlMetaData(controlType); - if (!metadata) { return; } - - // 通用属性 - const domField = SchemaDOMMapping.getControlName(controlType); - metadata[domField] = varField.name; - - - // 控件ID:字段bindingField_字段ID(中划线转下划线)_四位随机码 - metadata.id = varField.id.length > 8 ? varField.id.slice(0, 8) : varField.id; - metadata.id = varField.code + '_' + metadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); - - if (!varField.category || varField.category === FormVariableCategory.locale) { - // 本地变量 - metadata.binding = { - type: FormBindingType.Variable, - path: varField.code, - field: varField.id, - fullPath: varField.code - }; - } else { - // 后端变量 - metadata.binding = { - type: FormBindingType.Variable, - path: 'root-component.' + varField.code, - field: varField.id, - fullPath: varField.code - }; - - } - - // 默认创建controlSOurce=Farris 的DateBox控件 - if (controlType === DgControl.DateBox.type) { - metadata.fieldType = varField.type; - } - - metadata.showInTable = true; - - return metadata; - - } - - private resolveControlClassByComponentType(componentType: string) { - // 设置class 待优化 - let className = ''; - switch (componentType) { - case 'form-col-1': { - className = 'col-12 col-md-12 col-xl-12 col-el-12'; - break; - } - case 'form-col-12': { - className = 'col-12 col-md-12 col-xl-12 col-el-12'; - break; - } - case 'form-col-2': { - className = 'col-12 col-md-6 col-xl-6 col-el-6'; - break; - } - case 'form-col-3': { - className = 'col-12 col-md-6 col-xl-4 col-el-4'; - break; - } - case 'form-col-4': { - className = 'col-12 col-md-6 col-xl-3 col-el-2'; - break; - } - case 'form-col-6': { - className = 'col-12 col-md-6 col-xl-6 col-el-6'; - break; - } - case 'Frame': { - className = 'col-12'; - break; - } - } - - return className; - } - - private getViewModelIdOfVariable(variableId: string) { - const viewModels = this.domService.viewmodels; - if (!viewModels || viewModels.length === 0) { - return; - } - - for (const viewModel of viewModels) { - const variable = viewModel.states.find(v => v.id === variableId); - if (variable) { - return viewModel.id; - } - } - - - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/service/control-property-changed.service.ts b/packages/designer/projects/designer-ui/src/lib/service/control-property-changed.service.ts deleted file mode 100644 index c86742edfae96c0a44b18252b1b54eb23bd47bc8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/service/control-property-changed.service.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { Injectable } from '@angular/core'; -import { FormPropertyChangeObject } from '../entity/property-change-entity'; -import { set } from 'lodash-es'; -import { DesignViewModelService, RefreshFormService, DomService, FormBindingType, SchemaService } from '@farris/designer-services'; -import { DgControl } from '../utils/dg-control'; -import { SchemaDOMMapping } from './schema-dom-mapping'; -import { lowerFirst } from 'lodash-es'; - -/** - * 控件属性变更后,同步DOM结构 - */ -@Injectable() -export class ControlPropertyChangedService { - - constructor( - private domService: DomService, - private schemaService: SchemaService, - private dgViewModelService: DesignViewModelService, - private refreshFormService: RefreshFormService) { } - - afterPropertyChanged( - changeObject: FormPropertyChangeObject, - propertyData: any, - parameters: any, - focusedComponentInstance: any) { - if (!focusedComponentInstance) { - return; - } - const viewModelId = focusedComponentInstance.viewModelId; - - // 保存新增的变量 - this.addNewVariableToViewModel(changeObject, viewModelId); - - // 表达式相关属性:需要单独更新DOM结构 - this.updateExpressionAfterPropChange(propertyData.id, changeObject, parameters); - - // 收集关联属性(用于dgViewModel的变更) - const changes = this.relateChangeObjects(changeObject); - - - // 更新dgViewModel - this.changeDgViewModel(propertyData, changes, viewModelId); - - // 通知控件应用变更 - if (focusedComponentInstance && focusedComponentInstance.onPropertyChanged) { - focusedComponentInstance.onPropertyChanged(changeObject); - } - - // 某些属性更新后需要重新刷新表单和控件树 - this.refreshFormAfterPropChanged(changeObject); - } - - /** - * 新版属性编辑器,在编辑过程中可能会新增变量,此处需要将新增的变量追加到ViewModel中 - */ - private addNewVariableToViewModel(changeObject: FormPropertyChangeObject, viewModelId: string) { - const newPropertyValue = changeObject.propertyValue; - if (newPropertyValue && newPropertyValue.isNewVariable && typeof newPropertyValue === 'object' && - newPropertyValue.type === 'Variable') { - // 如果有则加入新变量 - delete newPropertyValue.isNewVariable; - const newVar = { - id: newPropertyValue.field, - category: 'locale', - code: newPropertyValue.path, - name: newPropertyValue.path, - type: newPropertyValue.newVariableType || 'String' - }; - delete newPropertyValue.newVariableType; - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel.states.find(s => s.id === newVar.id)) { - viewModel.states.push(newVar); - } - } - } - - /** - * 收集关联属性的变更(用于dgViewModel的变更) - * @param changeObject 变更集 - */ - private relateChangeObjects(changeObject: FormPropertyChangeObject) { - const changes: any[] = [changeObject]; - if (changeObject.relateChangeProps && changeObject.relateChangeProps.length) { - changes.push(...changeObject.relateChangeProps); - } - - if (changeObject.categoryId && changeObject.categoryId.includes('gridFieldEditor')) { - changes.forEach(change => { - Object.assign(change, { - categoryId: changeObject.categoryId, - propertyPath: changeObject.propertyPath - }); - }); - } - - return changes; - } - - /** - * 属性面板更新后同步DOM结构 - * @param controlId 控件ID - * @param changeObject 变更集 - */ - private updateExpressionAfterPropChange(controlId: string, changeObject: FormPropertyChangeObject, parameters: any): any { - - if (changeObject.categoryId === 'expressionData') { - const domJson = this.domService.domDgMap.get(controlId); - this.updateExpressionDomAfterPropChange(domJson, changeObject, parameters); - } - - } - - /** - * 更新表达式相关dom:帮助前表达式需要额外记录ID - * @param domJson 控件DOM结构 - * @param change 变更集 - * @param parameters 表达式ID - */ - private updateExpressionDomAfterPropChange(domJson: any, change: any, parameters: any) { - if (change.categoryId !== 'expressionData' || change.propertyID !== 'dataPicking') { - return; - } - - if (!change.propertyPath) { - domJson.lookupPickingExpression = parameters; - return; - } - - set(domJson, change.propertyPath + '.lookupPickingExpression', parameters); - } - - - /** - * 收集Schema字段的变更 - * @param propertyData 属性值 - * @param changeObjects 变更集 - * @param viewModelId VMID - */ - private changeDgViewModel(propertyData: any, changeObjects: FormPropertyChangeObject[], viewModelId: string) { - - const dgVM = this.dgViewModelService.getDgViewModel(viewModelId); // 当前VM - if (!dgVM) { - return; - } - changeObjects.map(changeObject => { - switch (propertyData.type) { - case DgControl.FieldSet.type: { - // 分组节点修改标题后需要同步ViewModel字段的分组 - if (changeObject.propertyID === 'title') { - dgVM.changeGroupName(propertyData.id, changeObject.propertyValue); - } - break; - } - default: { - // 控件节点 - let dgVMField; - if (propertyData.binding && propertyData.binding.type === FormBindingType.Form && propertyData.binding.field) { - dgVMField = dgVM.fields.find(f => f.id === propertyData.binding.field); - } - if (dgVMField) { - const dgVMChange = this.getSchemaChangeByDomChange(propertyData, changeObject); - dgVM.changeField(dgVMField.id, dgVMChange); - } - } - } - }); - } - - /** - * 更新DOM的修改至Schema实体 - * @param propertyData 属性值 - * @param changeObject 变更集 - */ - getSchemaChangeByDomChange(propertyData, changeObject: FormPropertyChangeObject) { - const schemaChange: any = {}; - - let mappingArray = []; - if (changeObject.categoryId && (changeObject.categoryId.includes('gridFieldEditor') || changeObject.categoryId.includes('tableTdEditor'))) { // 列编辑器属性 - mappingArray = SchemaDOMMapping.mappingDomPropAndSchemaProp(propertyData.editor); - } else if (!changeObject.propertyPath) { - mappingArray = SchemaDOMMapping.mappingDomPropAndSchemaProp(propertyData); - } - const mappingEntity = mappingArray.find(f => f.domField === changeObject.propertyID); - if (!mappingEntity) { - return {}; - } - // 只读、必填属性:只有在设置为布尔值时才更新到schema,设置为状态机、变量、表达式时不更新 - if (changeObject.propertyID === 'readonly' || changeObject.propertyID === 'require') { - if (typeof (changeObject.propertyValue) !== 'boolean') { - return schemaChange; - } - } - const shemaFieldPath = mappingEntity.schemaField; - set(schemaChange, shemaFieldPath, changeObject.propertyValue); - return schemaChange; - } - - /** - * 某些属性更新后需要重新刷新表单和控件树 - * @param propertyType 控件类型 - * @param changeObject 属性变更 - */ - refreshFormAfterPropChanged(changeObject: FormPropertyChangeObject) { - // 表单整体刷新 - if (changeObject.needRefreshForm) { - this.refreshFormService.refreshFormDesigner.next(); - } - // 表单局部刷新 - if (changeObject.needRefreshedComponentId) { - this.refreshFormService.refreshFormDesigner.next(changeObject.needRefreshedComponentId); - } - } - - /** - * 属性变更后,将属性同步到Schema字段上,目前用于零代码表单驱动 - * @param changeObject 变更集 - * @param propertyData 控件schema - * @param viewModelId 模型id - */ - syncSchemaFieldAfterControlPropChanged(changeObject: FormPropertyChangeObject, propertyData: any, viewModelId: string) { - if (!changeObject.needSyncToSchemaField || !propertyData.binding || propertyData.binding.type !== FormBindingType.Form) { - return; - } - - const fieldId = propertyData.binding.field; - if (!this.schemaService.addedFieldsByControlBox || !this.schemaService.addedFieldsByControlBox.some(id => id === fieldId)) { - return; - } - - // 设计时字段 - const dgvm = this.dgViewModelService.getDgViewModel(viewModelId); - const dgField = dgvm.fields.find(f => f.id === fieldId); - - // schema字段 - const schemaField = this.schemaService.getFieldByID(fieldId); - if (!schemaField || !dgField) { - return; - } - - switch (changeObject.propertyID) { - case 'title': { - schemaField.name = changeObject.propertyValue; - break; - } - case 'bindingCode': { - let rule = /^[a-z][a-zA-Z0-9]{0,14}$/; - const bindingCode = lowerFirst(changeObject.propertyValue); - if (rule.test(bindingCode)) { - schemaField.bindingField = bindingCode; - schemaField.bindingPath = bindingCode; - schemaField.code = bindingCode; - schemaField.label = bindingCode; - schemaField.path = bindingCode; - - dgField.bindingField = bindingCode; - dgField.bindingPath = bindingCode; - dgField.code = bindingCode; - dgField.label = bindingCode; - dgField.path = bindingCode; - - propertyData.binding.fullPath = bindingCode; - propertyData.path = bindingCode; - propertyData.binding.path = bindingCode; - } - break; - } - } - - - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/service/control.service.ts b/packages/designer/projects/designer-ui/src/lib/service/control.service.ts deleted file mode 100644 index 941ef3bdedb7a81354005b2033017b49f1848b04..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/service/control.service.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { AllComponents } from '../utils/component-list'; -import { FarrisDesignBaseElement, IControlService } from '@farris/designer-element'; -import { Injectable } from '@angular/core'; -import { ComponentExportEntity } from '@farris/designer-element'; -import { cloneDeep } from 'lodash-es'; -import { DgControl } from '../utils/dg-control'; -import { ControlEventPropertyIDList } from '../utils/control-event-prop'; - -@Injectable({ - providedIn: 'root' -}) -export class ControlService extends IControlService { - - getDgControl() { - return DgControl; - } - - /** - * 根据控件类型获取控件元数据 - * @param controlType 控件类型 - * @param isFromControlBox 是否为从控件工具箱拖拽生成控件 - */ - getControlMetaData(controlType: string, isFromControlBox = false, targetComponentInstance?: FarrisDesignBaseElement, controlFeature?: any) { - const cmp = AllComponents[controlType] as ComponentExportEntity; - if (!cmp) { - return; - } - - let metadata; - // 有些场景下从工具箱拖拽生成控件时不止需要控件本身的schema结构,还需要外层包裹容器。例如标签页区域需要生成Container-Section-Tab三层结构,而不是只有Tab - if (isFromControlBox && cmp.component.getMetadataInControlBox) { - metadata = cloneDeep(cmp.component.getMetadataInControlBox(targetComponentInstance, controlFeature)); - } else { - metadata = cloneDeep(cmp.metadata); - } - - // 某些控件自带子级,并且需要保证子级的id唯一。例如toolbar - if (cmp.uniqueMedataItems) { - cmp.uniqueMedataItems(metadata); - } - - return metadata; - } - - /** 获取所有的事件名称 */ - getControlEventPropertyIDList() { - return ControlEventPropertyIDList; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/service/schema-dom-mapping.ts b/packages/designer/projects/designer-ui/src/lib/service/schema-dom-mapping.ts deleted file mode 100644 index 3d7d32f433e8760aa7c6bc857c4d020f339e0838..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/service/schema-dom-mapping.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { DgControl } from '../utils/dg-control'; -import { GSPElementDataType, GSPElementObjectType } from '@gsp-bef/gsp-cm-metadata'; -import { GridFieldDataType, FormSchemaEntityFieldType, DesignerEnvType } from '@farris/designer-services'; - - -/** - * 提供schema字段和DOM控件属性的映射 - */ -export class SchemaDOMMapping { - - /** - * <字段类型,可配置的控件类型列表>的映射 - */ - static fieldControlTypeMapping = { - String: [ - { key: DgControl.TextBox.type, value: DgControl.TextBox.name }, - { key: DgControl.LookupEdit.type, value: DgControl.LookupEdit.name }, - { key: DgControl.Image.type, value: DgControl.Image.name }, - { key: DgControl.DateBox.type, value: DgControl.DateBox.name }, - { key: DgControl.TimePicker.type, value: DgControl.TimePicker.name }, - { key: DgControl.CheckGroup.type, value: DgControl.CheckGroup.name }, - { key: DgControl.RadioGroup.type, value: DgControl.RadioGroup.name }, - { key: DgControl.InputGroup.type, value: DgControl.InputGroup.name }, - { key: DgControl.EnumField.type, value: DgControl.EnumField.name }, - { key: DgControl.MultiTextBox.type, value: DgControl.MultiTextBox.name }, - { key: DgControl.RichTextBox.type, value: DgControl.RichTextBox.name }, - { key: DgControl.Tags.type, value: DgControl.Tags.name }, - { key: DgControl.PersonnelSelector.type, value: DgControl.PersonnelSelector.name }, - { key: DgControl.OrganizationSelector.type, value: DgControl.OrganizationSelector.name }, - { key: DgControl.EmployeeSelector.type, value: DgControl.EmployeeSelector.name, supportedEnvType: DesignerEnvType.noCode }, - { key: DgControl.AdminOrganizationSelector.type, value: DgControl.AdminOrganizationSelector.name, supportedEnvType: DesignerEnvType.noCode }, - { key: DgControl.OaRelation.type, value: DgControl.OaRelation.name, supportedEnvType: DesignerEnvType.noCode }, - { key: DgControl.ExtIntergration.type, value: DgControl.ExtIntergration.name, supportedEnvType: DesignerEnvType.noCode } - ], - Text: [ - { key: DgControl.MultiTextBox.type, value: DgControl.MultiTextBox.name }, - { key: DgControl.RichTextBox.type, value: DgControl.RichTextBox.name }, - { key: DgControl.Avatar.type, value: DgControl.Avatar.name }, - { key: DgControl.ImageUpload.type, value: DgControl.ImageUpload.name, supportedEnvType: DesignerEnvType.noCode }, - { key: DgControl.LookupEdit.type, value: DgControl.LookupEdit.name } - ], - Decimal: [ - { key: DgControl.NumericBox.type, value: DgControl.NumericBox.name } - ], - Integer: [ - { key: DgControl.NumericBox.type, value: DgControl.NumericBox.name } - ], - Number: [ - { key: DgControl.NumericBox.type, value: DgControl.NumericBox.name } - ], - BigNumber: [ - { key: DgControl.NumericBox.type, value: DgControl.NumericBox.name } - ], - Date: [ - { key: DgControl.DateBox.type, value: DgControl.DateBox.name } - ], - DateTime: [ - { key: DgControl.DateBox.type, value: DgControl.DateBox.name } - ], - Boolean: [ - { key: DgControl.SwitchField.type, value: DgControl.SwitchField.name }, - { key: DgControl.CheckBox.type, value: DgControl.CheckBox.name }, - ], - Enum: [ - { key: DgControl.EnumField.type, value: DgControl.EnumField.name }, - { key: DgControl.RadioGroup.type, value: DgControl.RadioGroup.name }, - ], - Object: [ - { key: DgControl.LookupEdit.type, value: DgControl.LookupEdit.name }, - { key: DgControl.EnumField.type, value: DgControl.EnumField.name }, - { key: DgControl.RadioGroup.type, value: DgControl.RadioGroup.name }, - ], - EmployeeSelector: [ - { key: DgControl.EmployeeSelector.type, value: DgControl.EmployeeSelector.name } - ], - AdminOrganizationSelector: [ - { key: DgControl.AdminOrganizationSelector.type, value: DgControl.AdminOrganizationSelector.name } - ] - }; - - /** - * 提供字段名称和DOM控件标题的映射 - * @param controlType 控件类型 - */ - static getControlName(controlType) { - let domField = ''; - // 字段名称的映射根据控件类型区分 - switch (controlType) { - case 'Button': { domField = 'text'; break; } - case 'GridField': case 'TreeGridField': { domField = 'caption'; break; } - default: { domField = 'title'; break; } - } - return domField; - } - - - /** - * 提供schema字段基础属性和DOM控件属性的映射 - * @param control 控件元数据 - */ - static mappingDomPropAndSchemaProp(control) { - const controlType = control.type; - // 1、 基础字段 - const array = []; - - if (controlType !== DgControl.GridField.type && controlType !== DgControl.TreeGridField.type) { - array.push({ domField: 'require', schemaField: 'require' }); - array.push({ domField: 'defaultValue', schemaField: 'defaultValue' }); - } - - // 只读属性 - if (controlType !== DgControl.TreeGridField.type) { - array.push({ domField: 'readonly', schemaField: 'readonly' }); - } - - // 字段名称的映射根据控件类型区分 - switch (controlType) { - case DgControl.Button.type: { array.push({ domField: 'text', schemaField: 'name' }); break; } - case DgControl.GridField.type: case DgControl.TreeGridField.type: - { array.push({ domField: 'caption', schemaField: 'name' }); break; } - default: { array.push({ domField: 'title', schemaField: 'name' }); } - } - - // 2、类型字段 - // 文本类型和数字类型映射长度 - if (controlType === DgControl.TextBox.type || controlType === DgControl.MultiTextBox.type - || controlType === DgControl.NumericBox.type || controlType === DgControl.NumberRange.type) { - array.push({ domField: 'maxLength', schemaField: 'type.length' }); - } - // 数字类型映射精度 - if (controlType === DgControl.NumericBox.type || controlType === DgControl.NumberRange.type) { - array.push({ domField: 'precision', schemaField: 'type.precision' }); - } - - // 枚举类型:下拉控件、表格列控件 - if (controlType === DgControl.EnumField.type || controlType === DgControl.GridField.type || - controlType === DgControl.TreeGridField.type || controlType === DgControl.RadioGroup.type) { - array.push({ domField: 'enumData', schemaField: 'type.enumValues' }); - } - - // 3、编辑器字段 - if (controlType !== DgControl.GridField.type && controlType !== DgControl.TreeGridField.type) { - array.push({ domField: 'type', schemaField: 'editor.$type' }); - } - - // 日期类型 - if (controlType === DgControl.DateBox.type) { - array.push({ domField: 'dateFormat', schemaField: 'editor.format' }); - array.push({ domField: 'fieldType', schemaField: 'type.name' }); - } - // 数字类型、日期类型映射最大、最小值 - if (controlType === DgControl.DateBox.type - || controlType === DgControl.NumericBox.type || controlType === DgControl.NumberRange.type) { - array.push({ domField: 'maxValue', schemaField: 'editor.maxValue' }); - array.push({ domField: 'minValue', schemaField: 'editor.minValue' }); - } - // 帮助类型 - if (controlType === DgControl.LookupEdit.type) { - array.push({ domField: 'dataSource', schemaField: 'editor.dataSource' }); - array.push({ domField: 'valueField', schemaField: 'editor.valueField' }); - array.push({ domField: 'textField', schemaField: 'editor.textField' }); - array.push({ domField: 'displayType', schemaField: 'editor.displayType' }); - array.push({ domField: 'mapFields', schemaField: 'editor.mapFields' }); - array.push({ domField: 'helpId', schemaField: 'editor.helpId' }); - - } - // 列表多语 - if (controlType === DgControl.GridField.type) { - array.push({ domField: 'multiLanguage', schemaField: 'multiLanguage' }); - } - // 列编辑器 - if ((controlType === DgControl.GridField.type || controlType === DgControl.TreeGridField.type) && control.editor) { - const editorMaps = this.mappingDomPropAndSchemaProp(control.editor); - editorMaps.map(m => m.domField = 'editor.' + m.domField); - array.push(...editorMaps); - } - - // 字段label相关的属性 - array.push({ domField: 'path', schemaField: 'bindingPath' }); - array.push({ domField: 'binding.path', schemaField: 'bindingField' }); - array.push({ domField: 'binding.fullPath', schemaField: 'path' }); - if (controlType === DgControl.GridField.type || controlType === DgControl.TreeGridField.type) { - array.push({ domField: 'dataField', schemaField: 'bindingPath' }); - } - return array; - } - - - /** - * 将字段类型 映射为表单表格列上的类型dataType - * @param fieldType 字段类型 - */ - static mapMDataType2GridFieldType(fieldType: FormSchemaEntityFieldType): string { - switch (fieldType.name) { - case GSPElementDataType.String: case GSPElementDataType.Text: return GridFieldDataType.string; - case GSPElementDataType.Decimal: case GSPElementDataType.Integer: - case 'Number': case 'BigNumber': return GridFieldDataType.number; - case GSPElementDataType.Date: return GridFieldDataType.date; - case GSPElementDataType.DateTime: return GridFieldDataType.datetime; - case GSPElementDataType.Boolean: return GridFieldDataType.boolean; - case GSPElementObjectType.Enum: return GridFieldDataType.enum; - } - - return ''; - } - - /** - * 根据字段类型获取可用的控件类型 - * @param fieldType 字段类型 - * @param multiLanguage 是否多语 - * @param cmpType 控件所在的组件类型 - * @param envType 设计器运行环境 - */ - static getEditorTypesByMDataType(fieldType: string, multiLanguage = false, cmpType: string, envType: string): any[] { - if (multiLanguage) { - return [{ key: DgControl.LanguageTextBox.type, value: '多语言输入框' }]; - } - let editorTypeIterator = this.fieldControlTypeMapping[fieldType]; - - // 列表列编辑器支持的控件类型有限 - if (cmpType === 'dataGrid' && editorTypeIterator) { - const notAllowedType = [ - DgControl.CheckGroup.type, DgControl.RadioGroup.type, DgControl.RichTextBox.type, - DgControl.Image.type, DgControl.Tags.type, DgControl.Avatar.type]; - editorTypeIterator = editorTypeIterator.filter(ele => !notAllowedType.includes(ele.key)); - } - - // 某些控件只在特定环境下展示,例如外部服务只在零代码环境上才显示 - editorTypeIterator = editorTypeIterator.filter(ele => !ele.supportedEnvType || ele.supportedEnvType === envType); - - return editorTypeIterator || []; - } - - - - /** - * 根据变量类型获取控件编辑器类型 - */ - static getEditorTypeByVariableType(type: string) { - switch (type) { - case GSPElementDataType.String: { - return DgControl.TextBox.type; - } - case 'Number': { - return DgControl.NumericBox.type; - } - case GSPElementDataType.Boolean: { - return DgControl.CheckBox.type; - } - case GSPElementDataType.Date: case GSPElementDataType.DateTime: { - return DgControl.DateBox.type; - } - case GSPElementDataType.Text: { - return DgControl.MultiTextBox.type; - } - } - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/utils/appearance-property-config.ts b/packages/designer/projects/designer-ui/src/lib/utils/appearance-property-config.ts deleted file mode 100644 index 44ea921f5e9c5ce0633619778f497296e8e14cb6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/appearance-property-config.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { AdvancedStyleEditorComponent } from '@farris/designer-devkit'; -import { ElementPropertyConfig } from '@farris/ide-property-panel'; - -/** - * 内联样式属性面板配置 - */ -export class ControlAppearancePropertyConfig { - - - static getAppearanceStylePropConfigs(propertyData: any, showProperties?: string[]): ElementPropertyConfig[] { - - if (propertyData) { - propertyData.appearance = propertyData.appearance ? propertyData.appearance : { class: '', style: '' }; - } - return [ - { - categoryId: 'appearance', - categoryName: '外联样式', - enableCascade: true, - parentPropertyID: 'appearance', - propertyData: propertyData.appearance, - tabId: 'appearance', - tabName: '样式', - properties: [ - { - propertyID: 'class', - propertyName: 'class样式', - propertyType: 'string', - description: '组件的CSS样式' - } - ] - }, - { - categoryId: 'appearanceStyle', - categoryName: '内联样式', - tabId: 'appearance', - tabName: '样式', - properties: [ - { - propertyID: 'inlineStyle', - propertyName: '', - propertyType: 'custom', - editor: AdvancedStyleEditorComponent, - editorParams: { - appearance: propertyData && propertyData.appearance - } - } - ] - } - ]; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/utils/component-list.ts b/packages/designer/projects/designer-ui/src/lib/utils/component-list.ts deleted file mode 100644 index 99663ebc3c8ad64c3226f897d5bb35be5a8e7308..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/component-list.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { DataGrid, DataGridContextMenuItem, GridField } from '../components/collection/datagrid/export'; -import { ListView } from '../components/collection/list-view/export'; -import { Table, TableTd } from '../components/collection/table/export'; -import { TreeGrid, TreeGridField } from '../components/collection/treegrid/export'; -import { Button } from '../components/command/button/export'; -import { NavTab } from '../components/command/nav-tab/export'; -import { Scrollspy } from '../components/command/scrollspy/export'; -import { Steps } from '../components/command/steps/export'; -import { Tag } from '../components/command/tag/export'; -import { ToolBarItem } from '../components/command/toolbar/component/toolbaritem/export'; -import { ToolBar } from '../components/command/toolbar/export'; -import { ViewChange } from '../components/command/view-change/export'; -import { ComponentRef } from '../components/container/component-ref/export'; -import { Component } from '../components/container/component/export'; -import { ContentContainer } from '../components/container/content-container/export'; -import { DynamicArea, DynamicAreaItem } from '../components/container/dynamic-area/export'; -import { ExternalContainer } from '../components/container/external-container/export'; -import { FieldSet } from '../components/container/field-set/export'; -import { FormHeader } from '../components/container/form-header/export'; -import { Form } from '../components/container/form/export'; -import { Header, HeaderToolBar, HeaderToolBarItem } from '../components/container/header/export'; -import { HiddenContainer } from '../components/container/hidden-container/export'; -import { HtmlTemplate } from '../components/container/html-template/export'; -import { ListNav } from '../components/container/list-nav/export'; -import { LoopContainer } from '../components/container/loop-container/export'; -import { ModalContainer } from '../components/container/modal-container/export'; -import { ModalFooter, ModalFooterToolBar, ModalFooterToolBarItem } from '../components/container/modal-footer/export'; -import { MultiViewContainer, MultiViewItem } from '../components/container/multi-view-container/export'; -import { QueryForm } from '../components/container/query-form/export'; -import { RouteContainer } from '../components/container/route-container/export'; -import { ScrollCollapsibleArea } from '../components/container/scroll-collapsible-area/export'; -import { Section, SectionToolbar, SectionToolbarItem } from '../components/container/section/export'; -import { Sidebar } from '../components/container/sidebar/export'; -import { Splitter, SplitterPane } from '../components/container/splitter/export'; -import { Tab, TabPage, TabToolbar, TabToolbarItem } from '../components/container/tab/export'; -import { DisplayField } from '../components/data/display-field/export'; -import { MultiSelect } from '../components/data/multi-select/export'; -import { ListFilter, ListFilterItem } from '../components/filter/list-filter/export'; -import { QueryScheme, QuerySchemeItem } from '../components/filter/queryScheme/export'; -import { Avatar } from '../components/input/avatar/export'; -import { CheckGroup } from '../components/input/check-group/export'; -import { CheckBox } from '../components/input/checkbox/export'; -import { CitySelector } from '../components/input/city-selector/export'; -import { Field } from '../components/input/common/field'; -import { DateBox } from '../components/input/date-box/export'; -import { DateRange } from '../components/input/date-range/export'; -import { Image } from '../components/input/image/export'; -import { ImageUpload } from '../components/input/image-upload/export'; -import { InputGroup } from '../components/input/input-group/export'; -import { LanguageTextBox } from '../components/input/language-text-box/export'; -// import { LookupEdit } from '../components/input/lookup-edit/export'; -import { MultiTextBox } from '../components/input/multi-text-box/export'; -import { NumberRange } from '../components/input/number-range/export'; -import { NumericBox } from '../components/input/numeric-box/export'; -import { RadioGroup } from '../components/input/radio-group/export'; -import { RichTextBox } from '../components/input/rich-text-box/export'; -import { Search } from '../components/input/search/export'; -import { EnumField } from '../components/input/select/export'; -import { SwitchField } from '../components/input/switch/export'; -import { Tags } from '../components/input/tags/export'; -import { TextBox } from '../components/input/text-box/export'; -import { TimePicker } from '../components/input/time-picker/export'; -import { StaticText } from '../components/static-text/static-text/export'; -import { Wizard, WizardDetail, WizardDetailContainer } from '../components/wizard/export'; -import { ResponseLayout, ResponseLayoutItem } from '../components/container/response-layout/export'; -import { AppointmentCalendar } from '../components/collection/appointment-calendar/export'; - -export const AllComponents: any = { - // 命令类 - Button, - ViewChange, - ToolBar, - ToolBarItem, - Scrollspy, - Steps, - NavTab, - Tag, - - // 输入类 - Field, - TextBox, - Avatar, - CheckGroup, - CheckBox, - DateBox, - Image, - ImageUpload, - RadioGroup, - InputGroup, - LanguageTextBox, - // LookupEdit, - MultiTextBox, - NumberRange, - NumericBox, - RichTextBox, - EnumField, - TimePicker, - SwitchField, - Tags, - CitySelector, - - // 容器类 - ContentContainer, - Form, - QueryForm, - FormHeader, - Component, - Tab, - TabPage, - TabToolbar, - TabToolbarItem, - HtmlTemplate, - Section, - SectionToolbar, - SectionToolbarItem, - Splitter, - SplitterPane, - ComponentRef, - FieldSet, - ListNav, - ExternalContainer, - Sidebar, - MultiViewContainer, - MultiViewItem, - Header, - HeaderToolBar, - HeaderToolBarItem, - ModalFooterToolBar, - ModalFooterToolBarItem, - ModalFooter, - HiddenContainer, - ModalContainer, - ScrollCollapsibleArea, - RouteContainer, - LoopContainer, - DynamicArea, - DynamicAreaItem, - ResponseLayout, - ResponseLayoutItem, - - // 数据集合类 - DataGrid, - GridField, - DataGridContextMenuItem, - TreeGrid, - TreeGridField, - ListView, - Table, - TableTd, - AppointmentCalendar, - - // 筛选类 - ListFilter, - ListFilterItem, - DateRange, - Search, - QueryScheme, - QuerySchemeItem, - - // 向导 - Wizard, - WizardDetail, - WizardDetailContainer, - - // 数据类 - MultiSelect, - DisplayField, - - // 其它 - StaticText -}; diff --git a/packages/designer/projects/designer-ui/src/lib/utils/control-css-loader.ts b/packages/designer/projects/designer-ui/src/lib/utils/control-css-loader.ts deleted file mode 100644 index 77fb0fab89b4719da32547c233c110942fa4dc4a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/control-css-loader.ts +++ /dev/null @@ -1,46 +0,0 @@ -export class ControlCssLoaderUtils { - /** - * 加载控件样式文件 - * @param href 资源地址 - */ - static loadCss(href: string) { - // 防止重复添加 - let cssLoaded = false; - const links = document.body.getElementsByTagName('link'); - const assetsUrl = ControlCssLoaderUtils.getAssetsUrl(); - if (links && links.length) { - const linkItem = document.location.origin + assetsUrl + '/style/' + href; - for (const link of Array.from(links)) { - if (link && link.href) { - const linkPath = link.href.slice(0, link.href.indexOf('?')); - if (linkItem === linkPath) { - cssLoaded = true; - break; - } - - } - } - } - if (!cssLoaded) { - const listFilterCssFile = document.createElement('link'); - listFilterCssFile.setAttribute('rel', 'stylesheet'); - listFilterCssFile.setAttribute('type', 'text/css'); - listFilterCssFile.setAttribute('href', `${assetsUrl}/style/${href}?v=${new Date().getTime()} `); - - document.body.appendChild(listFilterCssFile); - } - - - } - - static getAssetsUrl() { - if (document.location.origin.includes('4200')) { - return `/assets/farris-design-control`; - } else { - return `/platform/common/web/assets/farris-design-control`; - } - } -} - - - diff --git a/packages/designer/projects/designer-ui/src/lib/utils/control-event-prop.ts b/packages/designer/projects/designer-ui/src/lib/utils/control-event-prop.ts deleted file mode 100644 index 76b618330416848c9143d4ef121f15454228c896..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/control-event-prop.ts +++ /dev/null @@ -1,97 +0,0 @@ -export const ControlEventPropertyIDList = { - click: '点击事件', - valueChange: '控件值变化事件', - valueChanged: '值变化事件', - linkedLabelClick: '标签超链事件', - onInit: '初始化事件', - afterViewInit: '视图初始化后事件', - onSelectionChange: '行切换事件', - appendRow: '回车新增行事件', - lookupPicking: '帮助前事件', - lookupPicked: '帮助后事件', - pageChange: '切换页码事件', - expandNode: '节点展开事件', - tabChange: '切换标签页事件', - tabRemove: '移除标签页事件', - clear: '清除事件', - changeState: '侧边栏状态切换后事件', - pageSelected: '选中页面变更事件', - pageDetailSelected: '详情页面选中后事件', - stateChange: '页面状态改变事件', - onBlur: '失去焦点事件', - onClear: '清除事件', - onShown: '面板打开事件', - onHidden: ' 面板关闭事件', - beforeSelect: '选中前事件', - beforeUnSelect: '取消选中前事件', - beforeCheck: '勾选前事件', - beforeUnCheck: '取消勾选前事件', - checkedChange: '勾选改变后事件', - dblClickRow: '行双击事件', - beforeShow: '面板显示前事件', - beforeHide: '面板隐藏前事件', - rowClick: '行点击事件', - pageSizeChanged: '分页条数变化事件', - checked: '勾选后事件', - unChecked: '取消勾选事件', - beforeEdit: '编辑前事件', - checkAll: '全选事件', - unCheckAll: '取消全选事件', - beforeClickNode: '选中前事件', - nodeUnSelected: '取消选中事件', - nodeChecked: '勾选事件', - nodeUnChecked: '取消勾选事件', - beforeCheckAll: '全选前事件', - beforeUnCheckAll: '取消全选前事件', - listClick: '行点击事件', - filterChanged: '过滤事件', - columnSorted: '排序事件', - scrollYLoad: '滚动加载事件', - onEditClicked: '操作列点击编辑', - onDeleteClicked: '操作列点击删除', - checkChange: '多选改变事件', - pageChanged: '切换分页事件', - childsPageChanged: '子级节点分页事件', - navPicking: '切换前事件', - navChange: '切换事件', - toolTypeChange: '视图类型切换事件', - viewTypeChange: '视图类型切换事件', - beforeCloseSidebar: '侧边栏关闭前事件', - queryUserCommand: '@用户取数事件', - addCommentCommand: '提交评论事件', - queryAllOrgs: '查询部门事件', - queryFrequentAtUsers: '查询常用@用户事件', - queryCommentsCommand: '查询评论事件', - removeFile: '预览附件删除事件', - afterUpload: '附件上传后事件', - removeUpload: '附件删除事件', - fUploadDoneEvent: '附件上传后事件', - fileRemoveEvent: '附件预览删除事件', - query: '查询事件', - searchChange: '搜索变化事件', - preEventCmd: '帮助前事件', - postEventCmd: '帮助后事件', - onQuery: '查询事件', - inputAppendClickEvent: '扩展按钮点击事件', - beforeQuery: '查询前事件', - fieldValueChanging: '绑定字段值变化前事件', - fieldValueChanged: '绑定字段值变化后事件', - selectionsChange: '选中数据后事件', - tagRemoved: '删除单个标签事件', - inputClear: '清空事件', - filterChange: '日期变化后事件', - selectChange: '选中事件', - editHandler: '详情卡片编辑事件', - removeHandler: '详情卡片删除事件', - reservation: '日视图新增预定事件', - beforeSelectData: '数据选择确认前事件', - imgChange: '图片变化后事件', - dataChanged: '标记数量变更事件', - closed: '关闭标记事件', - openChange: '面板打开状态切换', - changeValue: '切换复选框事件', - footerDataCommand: '合计命令', - rzStart: '拖拽开始时事件', - rzResizing: '拖拽时事件', - rzStop: '拖拽结束时事件' -}; diff --git a/packages/designer/projects/designer-ui/src/lib/utils/dg-control.ts b/packages/designer/projects/designer-ui/src/lib/utils/dg-control.ts deleted file mode 100644 index 0574a87387d640792196d9c4a2c7c85eb8a46dd0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/dg-control.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { IDgControl } from '@farris/designer-element'; - -// jumphere -export const DgControl: IDgControl = { - Button: { type: 'Button', name: '按钮', icon: 'Button' }, - - ButtonGroup: { type: 'ButtonGroup', name: '按钮组', icon: 'ButtonGroup' }, - - ToolBar: { type: 'ToolBar', name: '工具栏', icon: 'ButtonGroup' }, - - ToolBarItem: { type: 'ToolBarItem', name: '工具栏项', icon: 'Button' }, - - ContentContainer: { type: 'ContentContainer', name: '容器', icon: 'ContentContainer' }, - - DisplayField: { type: 'DisplayField', name: '标签', icon: 'DisplayField' }, - - TextBox: { type: 'TextBox', name: '文本', icon: 'TextBox' }, - - MultiTextBox: { type: 'MultiTextBox', name: '多行文本', icon: 'MultiTextBox' }, - - LookupEdit: { type: 'LookupEdit', name: '帮助', icon: 'LookupEdit' }, - - NumericBox: { type: 'NumericBox', name: '数值', icon: 'NumericBox' }, - - DateBox: { type: 'DateBox', name: '日期', icon: 'DateBox' }, - - SwitchField: { type: 'SwitchField', name: '开关', icon: 'SwitchField' }, - - RadioGroup: { type: 'RadioGroup', name: '单选组', icon: 'RadioGroup' }, - - CheckBox: { type: 'CheckBox', name: '复选框', icon: 'CheckBox' }, - - CheckGroup: { type: 'CheckGroup', name: '复选框组', icon: 'CheckGroup' }, - - EnumField: { type: 'EnumField', name: '下拉列表', icon: 'EnumField' }, - /** 暂时没用 */ - FlexLayout: { type: 'FlexLayout', name: '弹性布局' }, - /** 暂时没用 */ - FlowLayout: { type: 'FlowLayout', name: '流布局' }, - - ResponseLayout: { type: 'ResponseLayout', name: '布局容器', icon: 'ResponseLayout3' }, - - ResponseLayoutItem: { type: 'ResponseLayoutItem', name: '布局', icon: 'ResponseLayout1' }, - - TreeGrid: { type: 'TreeGrid', name: '树表格', icon: 'TreeGrid' }, - - TreeGridField: { type: 'TreeGridField', name: '树表格列' }, - - FieldSet: { type: 'FieldSet', name: '分组', icon: 'FieldSet' }, - - Form: { type: 'Form', name: '卡片面板', icon: 'Form' }, - - QueryForm: { type: 'QueryForm', name: '查询面板', icon: 'Form' }, - - DataGrid: { type: 'DataGrid', name: '表格', icon: 'DataGrid' }, - - GridField: { type: 'GridField', name: '表格列' }, - - Panel: { type: 'Panel', name: '面板', icon: 'ContentContainer' }, - - Module: { type: 'Module', name: '模块', icon: 'Module' }, - - Component: { type: 'Component', name: '组件', icon: 'Component' }, - - ExternalContainer: { type: 'ExternalContainer', name: '外部容器', icon: 'ContentContainer' }, - - Image: { type: 'Image', name: '图像', icon: 'Image' }, - - ImageUpload: { type: 'ImageUpload', name: '图片上传', icon: 'imageupload' }, - - HiddenContainer: { type: 'HiddenContainer', name: '隐藏区域', icon: 'ContentContainer' }, - - ModalContainer: { type: 'ModalContainer', name: '弹窗容器', icon: 'ContentContainer' }, - - RouteContainer: { type: 'RouteContainer', name: '路由区域', icon: 'ContentContainer' }, - - Tab: { type: 'Tab', name: '标签页', icon: 'Tab' }, - - TabPage: { type: 'TabPage', name: '标签页项', dependentParentControl: 'Tab' }, - - TabToolbarItem: { type: 'TabToolbarItem', name: '标签页工具栏按钮', icon: 'Button' }, - - Tag: { type: 'Tag', name: 'Tag', icon: 'Tag' }, - - Sidebar: { type: 'Sidebar', name: '侧边栏', icon: 'Sidebar' }, - - HtmlTemplate: { type: 'HtmlTemplate', name: '模版容器', icon: 'HtmlTemplate' }, - - ListView: { type: 'ListView', name: '列表', icon: 'ListView' }, - - RichTextBox: { type: 'RichTextBox', name: '富文本', icon: 'RichTextBox' }, - - TimeSpinner: { type: 'TimeSpinner', name: '时间调节器', icon: 'TimePicker' }, - - TimePicker: { type: 'TimePicker', name: '时间选择', icon: 'TimePicker' }, - - Section: { type: 'Section', name: '分组面板', icon: 'Section' }, - - SectionToolbar: { type: 'SectionToolbar', name: '分组面板工具栏' }, - - SectionToolbarItem: { type: 'SectionToolbarItem', name: '分组面板按钮' }, - - QueryScheme: { type: 'QueryScheme', name: '筛选方案', icon: 'QueryScheme' }, - - FormHeader: { type: 'FormHeader', name: '翻页' }, - - Splitter: { type: 'Splitter', name: '分栏面板', icon: 'Splitter' }, - - SplitterPane: { type: 'SplitterPane', name: '分栏面板项', dependentParentControl: 'Splitter' }, - - WizardDetail: { type: 'WizardDetail', name: '向导详情页' }, - - WizardDetailContainer: { type: 'WizardDetailContainer', name: '向导详情容器' }, - - Wizard: { type: 'Wizard', name: '向导', icon: 'Wizard' }, - - MultiSelect: { type: 'MultiSelect', name: '数据分配', icon: 'MultiSelect' }, - - InputGroup: { type: 'InputGroup', name: '智能输入框', icon: 'InputGroup' }, - - Steps: { type: 'Steps', name: '步骤条', icon: 'Steps' }, - - Avatar: { type: 'Avatar', name: '头像', icon: 'Avatar' }, - - ListFilter: { type: 'ListFilter', name: '筛选条', icon: 'ListFilter' }, - - ListNav: { type: 'ListNav', name: '列表导航', icon: 'ListNav' }, - - NumberRange: { type: 'NumberRange', name: '数字区间选择', icon: 'NumericBox' }, - - Scrollspy: { type: 'Scrollspy', name: '滚动监听', icon: 'Scrollspy' }, - - LanguageTextBox: { type: 'LanguageTextBox', name: '多语言输入框', icon: 'LanguageTextBox' }, - - ComponentRef: { type: 'ComponentRef', name: '组件引用节点' }, - - FileUpload: { type: 'FileUpload', name: '附件上传', icon: 'FileUpload' }, - - FilePreview: { type: 'FilePreview', name: '附件预览', icon: 'FilePreview' }, - - ViewChange: { type: 'ViewChange', name: '多视图切换', icon: 'Button' }, - - MultiViewContainer: { type: 'MultiViewContainer', name: '多视图', icon: 'MultiViewContainer' }, - - MultiViewItem: { type: 'MultiViewItem', name: '多视图项', dependentParentControl: 'MultiViewContainer' }, - - Footer: { type: 'Footer', name: '页脚' }, - - DiscussionEditor: { type: 'DiscussionEditor', name: '评论编辑区', icon: 'DiscussionEditor' }, - - DiscussionList: { type: 'DiscussionList', name: '评论列表', icon: 'DiscussionList' }, - - NavTab: { type: 'NavTab', name: '标签类导航', icon: 'NavTab' }, - - Tags: { type: 'Tags', name: '标记组', icon: 'Tags' }, - - Portlet: { type: 'Portlet', name: '小部件', icon: 'dingzhi' }, - - Header: { type: 'Header', name: '页头', icon: 'Header' }, - - ModalFooter: { type: 'ModalFooter', name: '弹窗页脚', icon: 'ModalFooter' }, - - ScrollCollapsibleArea: { type: 'ScrollCollapsibleArea', name: '滚动收折区域', icon: 'ScrollCollapsibleArea' }, - - PersonnelSelector: { type: 'PersonnelSelector', name: '人员选择', icon: 'PersonnelSelector' }, - - Table: { type: 'Table', name: '表格', icon: 'DataGrid' }, - - LoopContainer: { type: 'LoopContainer', name: '循环容器', icon: 'ContentContainer' }, - - FileUploadPreview: { type: 'FileUploadPreview', name: '附件上传预览', icon: 'FileUpload' }, - - DynamicArea: { type: 'DynamicArea', name: '动态区域', icon: 'ContentContainer' }, - - DynamicAreaItem: { type: 'DynamicAreaItem', name: '动态区域项', icon: 'ContentContainer' }, - - TabToolbar: { type: 'TabToolbar', name: '标签页工具栏', icon: 'TabToolbar' }, - - HeaderToolBar: { type: 'HeaderToolBar', name: '头部组件工具栏', icon: 'HeaderToolBar' }, - - ModalFooterToolBar: { type: 'ModalFooterToolBar', name: '底部组件工具栏', icon: 'ModalFooterToolBar' }, - - HeaderToolBarItem: { type: 'HeaderToolBarItem', name: '头部组件工具栏按钮', icon: 'HeaderToolBarItem' }, - - ModalFooterToolBarItem: { type: 'ModalFooterToolBarItem', name: '底部组件工具栏按钮', icon: 'ModalFooterToolBarItem' }, - - OrganizationSelector: { type: 'OrganizationSelector', name: '组织选择', icon: 'OrganizationSelector' }, - - AdminOrganizationSelector: { type: 'AdminOrganizationSelector', name: '组织选择', icon: 'OrganizationSelector' }, - - EmployeeSelector: { type: 'EmployeeSelector', name: '人员选择', icon: 'PersonnelSelector' }, - - OaRelation: { type: 'OaRelation', name: '关联行政审批', icon: 'TextBox' }, - - CitySelector: { type: 'CitySelector', name: '城市选择', icon: 'CitySelector' }, - - - ExtIntergration: { type: 'ExtIntergration', name: '外部服务集成', icon: 'ViewModel' }, - - AppointmentCalendar: { type: 'AppointmentCalendar', name: '预约日历', icon: 'DateBox' }, - - /** 查询类 start */ - Charts: { type: 'Charts', name: '图表', icon: 'Charts' }, - - QdpFramework: { type: 'QdpFramework', name: '查询结果工具栏', icon: 'QdpFramework' }, - - SpreadSheet: { type: 'SpreadSheet', name: '查询表格控件', icon: 'Charts' }, - - QdpConditionDialog: { type: 'QdpConditionDialog', name: '查询筛选对话框', icon: 'ContentContainer' }, - - QdpConditionDialogTab: { type: 'QdpConditionDialogTab', name: '查询筛选标签页', icon: 'Tab' }, - /** 查询类 end */ - - /** 审批类 start */ - ApprovalLogs: { type: 'ApprovalLogs', name: '审批记录', icon: 'ApprovalLogs' }, - - ApprovalComments: { type: 'ApprovalComments', name: '审批意见', icon: 'shenpiyijian' }, - /** 审批类 end */ -}; diff --git a/packages/designer/projects/designer-ui/src/lib/utils/events-editor-func.ts b/packages/designer/projects/designer-ui/src/lib/utils/events-editor-func.ts deleted file mode 100644 index 74714df59adbd11e46419715b868df603af75e27..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/events-editor-func.ts +++ /dev/null @@ -1,380 +0,0 @@ -import { DomService, WebCmdService, EventEditorService } from '@farris/designer-services'; -import { cloneDeep } from 'lodash-es'; -import { actions, mapItem } from './interface'; -import { DgControl } from './dg-control'; - -export class EventsEditorFuncUtils { - constructor() { } - - - /** 初始传入值 */ - static formProperties(eventEditorService, formBasicService, domService, webCmdService, propertyData, viewModelId, eventList, switchEvents?: (propertyData, eventList) => {}) { - const componentLists = this.getcomponentLists(domService, viewModelId); - const commandList = webCmdService.generateInternalCommandList(); - const allComponentList = eventEditorService.allComponentList && eventEditorService.allComponentList(domService); - let viewModelDisplay = webCmdService.viewModelDisplay(); - let properties = [ - { - propertyID: viewModelId, - propertyType: 'events', - /** 内置构件显示的命令列表 */ - internalCommandList: commandList, - /** (事件设定)可绑定事件默认列表; */ - events: eventList, - /** 已绑定的事件(拼接已有的参数值,拼接当前事件->待集成-从dom结构中取值,事件及对应的字符串) */ - boundEventsList: webCmdService.findParamtersPosition(propertyData, eventList, viewModelId, allComponentList), - /** 视图模型已有命令 */ - viewModel: viewModelDisplay, - /** 目标组件对应的所有可选的组件 */ - componentLists: componentLists, - /** 所有组件列表 */ - allComponentList: allComponentList, - /** 接收this.formBasicService.formMetaBasicInfo.relativePath */ - relativePath: formBasicService.formMetaBasicInfo.relativePath, - /** 接收this.formBasicService.envType */ - envType: formBasicService.envType, - /** 初始为空,用于存储用户点击「导入新命令」的控制器值 */ - newController: [], - isAddControllerMethod: false, - /** 开关控制类按钮的回调函数 */ - getEventList: () => EventsEditorFuncUtils.refreshEventsAndCommandList(webCmdService, propertyData, commandList, eventList, switchEvents), - /** 获取事件的路径 */ - getEventPath: () => eventEditorService.getEventPath(propertyData.id, viewModelId, webCmdService), - }, - ]; - return properties; - } - - /** 事件编辑器传出值处理 */ - static saveRelatedParameters(eventEditorService: EventEditorService, domService: DomService, webCmdService: WebCmdService, propertyData: any, viewModelId: string, eventList, parameters: any) { - if (parameters.isAddControllerMethod) { - - if (!parameters.controlInfo && propertyData.type) { - parameters.controlInfo = { type: propertyData.type, name: DgControl[propertyData.type] && DgControl[propertyData.type].name }; - } - - webCmdService.addControllerMethod(propertyData, viewModelId, parameters); - return; - } - - /** 根据返回值整合为actions结构 */ - let actions = this.formActionsStructure(eventEditorService, propertyData, parameters); - /** 增删改组件dom中事件绑定值 */ - this.eventsValueChanged(propertyData, actions, eventList, domService); - /** 更新dom中的actions节点 */ - let domActions = cloneDeep(this.domActionsChanged(domService, actions)); - /** 更新dom中viewModel的绑定值 */ - webCmdService.viewModelDomChanged(propertyData, eventList, viewModelId, domActions); - /** 删除viewModel中冗余的命令 */ - if (parameters['preCommand'] != undefined) { - // 将preCommand中的命令与action节点的命令相比较,若action节点中不存在,则在视图模型中删除 - this.delViewModelCommand(domService, parameters, domActions); - } - /** 更新dom中的webcmds节点 */ - this.domWebcmdChanged(domService, parameters); - /** 更新函数中获取到的webcmds*/ - this.functionWebcmdsChanged(webCmdService, parameters); - /** 存在重复被使用的「已绑定命令」,则更新actions节点 */ - if (parameters['repititionCommand']) { - this.repititionCommandExist(domService, parameters, propertyData); - } - } - - /** 目标组件规则判定 */ - static getcomponentLists(domService, viewModelId) { - const dom = domService.getDomJson(); - let componentListsItem = { - componentId: '', - viewModelId: '' - } - let componentLists = []; - let curComponent = 0; - for (let i = 0; i < dom.module.components.length; i++) { - //筛选出root-component及form类型的component - if (dom.module.components[i].componentType != 'Frame' && !dom.module.components[i].componentType.includes('form')) { - componentListsItem.componentId = cloneDeep(dom.module.components[i].id); - componentListsItem.viewModelId = cloneDeep(dom.module.viewmodels[i].id); - componentLists.push(cloneDeep(componentListsItem)); - } - if (viewModelId == dom.module.viewmodels[i].id) { - curComponent = i; - } - } - //当前组件是否为root-component及form类型的component - if (viewModelId == dom.module.viewmodels[curComponent].id) { - if (dom.module.components[curComponent].componentType != 'Frame') { - componentLists = []; - } - } - return componentLists; - } - - /** 根据返回值整合为actions结构 */ - static formActionsStructure(eventEditorService, data, parameters) { - let actions: actions = { - sourceComponent: { - id: data.id, - viewModelId: cloneDeep(parameters.viewModelId), - map: [] - } - }; - parameters.boundEventsList.forEach(boundEventItem => { - let mapItem: mapItem = { - event: { - label: boundEventItem.boundEvents.label, - name: boundEventItem.boundEvents.name, - }, - targetComponent: cloneDeep(eventEditorService.formTargetComponent(boundEventItem, parameters.viewModelId)), - command: { - id: boundEventItem.controllerList.id, - label: boundEventItem.controllerList.label, - name: boundEventItem.controllerList.name, - handlerName: boundEventItem.controllerList.handlerName, - params: cloneDeep(boundEventItem.controllerList.property), - isNewGenerated: boundEventItem.controllerList.isNewGenerated || false, - isRTCmd: boundEventItem.controllerList['isRTCmd'], - isInvalid: boundEventItem.controllerList.isInvalid || false, - }, - controller: { - id: boundEventItem.controllerName.id, - label: boundEventItem.controllerName.label, - name: boundEventItem.controllerName.name, - } - } - if (boundEventItem.controllerList['targetComponent']) { - mapItem.targetComponent.id = boundEventItem.controllerList.targetComponent; - } - if (mapItem.targetComponent.viewModelId != undefined) { - actions.sourceComponent.map.push(cloneDeep(mapItem)); - } - }); - return actions; - } - /** 增删改组件dom中事件绑定值 */ - static eventsValueChanged(data, actions, eventList, domService) { - //增加或修改:data[事件id] = 'viewModelId.targetComponent-viewModelId.command'; - actions.sourceComponent.map.forEach(mapItem => { - //判断是存储为三段path或一段path - if (mapItem.targetComponent.viewModelId && (actions.sourceComponent.viewModelId != mapItem.targetComponent.viewModelId)) { - data[mapItem.event.label] = cloneDeep(`root-viewmodel.${mapItem.targetComponent.viewModelId}.${mapItem.command.label}`); - } else { - data[mapItem.event.label] = cloneDeep(`${mapItem.command.label}`); - } - }) - /** 删除 data[事件id] = null */ - eventList.forEach(event => { - let exist = actions.sourceComponent.map.find(mapItem => mapItem.event.label == event.label) - if (!exist) { - data[event.label] = null; - this.delActionItem(data.id, event.label, domService); - } - }) - } - /** 更新dom中的acions节点 */ - static domActionsChanged(domService, actions) { - if (actions.sourceComponent.map.length) { - if (domService.module.actions == undefined) { - domService.module.actions = []; - domService.module.actions.push(cloneDeep(actions)); - } - else { - let domActions = domService.module.actions; - let actionExist = false; - //判断是否存在源组件id - domActions.forEach(domActionItem => { - if (actions.sourceComponent.id == domActionItem.sourceComponent.id) { - actionExist = true; - //若存在相同源组件,则判断是否存在同一个事件id - actions.sourceComponent.map.forEach(mapItem => { - let eventExist = false; - domActionItem.sourceComponent.map.forEach(function (domMapItem, index) { - //存储过该事件,覆盖 - if (mapItem.event.label == domMapItem.event.label) { - domActionItem.sourceComponent.map[index] = cloneDeep(mapItem); - eventExist = true; - } - }); - //没有存储该事件,则增加 - if (!eventExist) { - domActionItem.sourceComponent.map.push(cloneDeep(mapItem)); - } - }) - } - }) - if (!actionExist) { - domActions.push(cloneDeep(actions)); - } - domService.module.actions = cloneDeep(domActions); - } - } - let domActions = cloneDeep(domService.module.actions); - return domActions; - } - /** 删除viewModel中冗余的命令 */ - static delViewModelCommand(domService, parameters, domActions) { - let preCommandExist = false; - let targetComponent; - domActions.forEach(domActionsItem => { - domActionsItem.sourceComponent.map.forEach(mapItem => { - if (mapItem.command.id == parameters.preCommand.id && mapItem.command.label == parameters.preCommand.label) { - preCommandExist = true; - targetComponent = mapItem.targetComponent.viewModelId; - } - }) - }); - //该命令没有被任何事件绑定,且该命令是事件面板内置的命令,则删除 - if (!preCommandExist) { - const viewModelcommand = cloneDeep(domService.module.viewmodels) - viewModelcommand.forEach(vmItem => { - vmItem.commands.forEach((vmCommandsItem, index) => { - if (parameters.preCommand.isNewGenerated && vmCommandsItem.id == parameters.preCommand.id && vmCommandsItem.code == parameters.preCommand.label) { - const isDeclared = domService.module['declarations'] ? this.checkIfDelViewModelCommand(domService, vmCommandsItem) : false; - if (!isDeclared) { vmItem.commands.splice(index, 1) } - } - }); - }); - domService.module.viewmodels = cloneDeep(viewModelcommand); - } - } - /** 检测是否在组件声明中声明过该命令,若有声明,则不删除 */ - static checkIfDelViewModelCommand(domService, vmCommandsItem) { - const declarations = domService.module.declarations; - // root-viewmodel.data-grid-component-viewmodel.loadCard1; - let i = 0; - while (i < declarations.commands.length) { - const command = declarations.commands[i].command; - i++; - if (vmCommandsItem.code == command) { - return true; - } - } - return false; - } - /** 更新dom中的webcmds节点 */ - static domWebcmdChanged(domService, parameters) { - if (domService.module.webcmds == undefined) { - domService.module.webcmds = []; - } - - const relativePath = parameters.relativePath; - let webcmds = domService.module.webcmds; - if (parameters.boundEventsList) { - parameters.boundEventsList.forEach(boundEventListItem => { - let command = { - host: boundEventListItem.controllerList.id, - handler: boundEventListItem.controllerList.handlerName, - } - let exist = false; - webcmds.forEach(webcmdsItem => { - //已经存储过该控制器 - if (webcmdsItem.id == boundEventListItem.controllerName.id) { - exist = true; - let commandExist = -1; - if (webcmdsItem.refedHandlers) { - commandExist = webcmdsItem.refedHandlers.findIndex(commandItem => - command.host == commandItem.host) - } - if (!webcmdsItem.refedHandlers) { - webcmdsItem['refedHandlers'] = []; - webcmdsItem.refedHandlers.push(cloneDeep(command)); - } - if (commandExist == -1) { - webcmdsItem.refedHandlers.push(cloneDeep(command)); - } - } - }) - //没有存储过该控制器 - if (!exist && boundEventListItem.controllerName.label) { - let content = { - id: boundEventListItem.controllerName.id, - path: relativePath, - name: `${boundEventListItem.controllerName.label}.webcmd`, - refedHandlers: [], - // 控制器code和nameSpace; - // code:'', - // nameSpace:'', - } - content.refedHandlers.push(cloneDeep(command)); - webcmds.push(cloneDeep(content)); - } - }) - domService.module.webcmds = cloneDeep(webcmds); - } - domService.module.webcmds = cloneDeep(webcmds); - } - /** 更新函数中获取到的webcmds*/ - static functionWebcmdsChanged(webCmdService, parameters) { - if (parameters.newController) { - webCmdService.webCmdsChanged(parameters.newController); - } - } - /** 删除事件时同时移除actions对应节点 */ - static delActionItem(id, eventLabel, domService) { - const domActions = domService.module.actions; - domActions.forEach(function (actionsItem, index) { - if (actionsItem.sourceComponent.id == id) { - actionsItem.sourceComponent.forEach(function (mapItem, index) { - if (mapItem.event.label == eventLabel) { - actionsItem.sourceComponent.map.splice(index, 1) - } - }); - } - if (actionsItem.sourceComponent.map.length == 0) { - domActions.splice(index, 1) - } - }); - domService.module.actions = cloneDeep(domActions); - } - /** 存在重复被使用的「已绑定命令」,则更新actions节点 */ - static repititionCommandExist(domService, parameters, propertyData) { - if (parameters['repititionCommand'].length != 0) { - let actions = cloneDeep(domService.module.actions); - const repititionCommand = cloneDeep(parameters.repititionCommand); - repititionCommand.forEach(repititionCommandItem => { - let copiedEventLabel; - // 提取使用了「已绑定命令」的 事件的相关值 - parameters.boundEventsList.forEach(boundEventsListItem => { - copiedEventLabel = (boundEventsListItem.controllerList.id == repititionCommandItem.command.id) ? boundEventsListItem.boundEvents.label : undefined; - }) - if (copiedEventLabel != undefined) { - let data; - actions.forEach(actionsItem => { - actionsItem.sourceComponent.map.forEach(mapItem => { - if (propertyData.id == actionsItem.sourceComponent.id && mapItem.controller.id == repititionCommandItem.controller.id && mapItem.command.id == repititionCommandItem.command.id && mapItem.event.label == copiedEventLabel) { - //记录 使用了「已绑定命令」的 事件的相关值 - data = { - targetComponent: mapItem.targetComponent, - command: mapItem.command - } - } - }) - }); - actions.forEach(actionsItem => { - actionsItem.sourceComponent.map.forEach(mapItem => { - //更新「已绑定命令」原始数据 - if (mapItem.command.id == repititionCommandItem.command.id && mapItem.controller.id == repititionCommandItem.controller.id && mapItem.event.label == repititionCommandItem.event.label) { - mapItem.targetComponent = cloneDeep(data['targetComponent']); - mapItem.command = cloneDeep(data['command']); - } - }) - }); - domService.module.actions = cloneDeep(actions); - } - }); - } - } - - /** 开关控制类按钮的回调函数 */ - static refreshEventsAndCommandList(webCmdService, propertyData, commandList: any[], eventList, switchEvents?: (propertyData, eventList) => {}) { - if (switchEvents) { - eventList = switchEvents(propertyData, eventList); - } - commandList = webCmdService.generateInternalCommandList(); - - return { - internalCommandList: commandList, - events: eventList - }; - } - -} diff --git a/packages/designer/projects/designer-ui/src/lib/utils/input-append.utils.ts b/packages/designer/projects/designer-ui/src/lib/utils/input-append.utils.ts deleted file mode 100644 index fd1ee334db6cf5071b7d2255f460379d58e3a384..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/input-append.utils.ts +++ /dev/null @@ -1,64 +0,0 @@ - -/** - * 启用扩展区域后的输入类控件模板 - */ -export class InputAppendUtils { - /** - * 文本TextBox的扩展区域模板 - * @param ctx 控件schema - * @param input 输入框部分的模板 - */ - static getTextBoxAppendElement(ctx: any, input: string) { - const inputAppendType = ctx.component.inputAppendType; - // 根据扩展类型区分样式 - const inputAppendCls = inputAppendType === 'button' ? 'input-append-button' : 'input-append-text'; - - const inputWithAppendEle = ` -
    - ${input} -
    -
    ${ctx.component.inputAppendText}
    -
    -
    - `; - return inputWithAppendEle; - } - - /** - * 多行文本MultiTextBox的扩展区域模板 - * @param ctx 控件schema - * @param input 输入框部分的模板 - */ - static getMultiTextBoxAppendElement(ctx: any, input: string) { - const inputAppendType = ctx.component.inputAppendType; - // 根据扩展类型区分样式 - const inputAppendCls = inputAppendType === 'button' ? 'input-append-button' : 'input-append-text'; - - const inputWithAppendEle = ` -
    - ${input} -
    -
    ${ctx.component.inputAppendText}
    -
    -
    - `; - return inputWithAppendEle; - } - /** - * 智能输入类(DateBox、InputGroup、Number、Select等)的扩展区域模板 - * @param ctx 控件schema - * @param input 输入框部分的模板 - */ - static getInputGroupAppendElement(ctx: any) { - const inputAppendType = ctx.component.inputAppendType; - // 根据扩展类型区分样式 - const inputAppendCls = inputAppendType === 'button' ? 'input-append-button' : 'input-append-text'; - - const inputWithAppendEle = ` -
    -
    ${ctx.component.inputAppendText}
    -
    - `; - return inputWithAppendEle; - } -} diff --git a/packages/designer/projects/designer-ui/src/lib/utils/interface.ts b/packages/designer/projects/designer-ui/src/lib/utils/interface.ts deleted file mode 100644 index 0a3b2ae1789cbcee2243dd4e6063369728558f2a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/interface.ts +++ /dev/null @@ -1,38 +0,0 @@ - -export interface actions { - sourceComponent: { - id: string, - viewModelId: string, - map: mapItem[], - }, -}; - -export interface mapItem { - event: { - label: string, - name: string, - }, - command: { - id: string, - label: string, - name: string, - handlerName: string, - params?: any, - showTargetComponent?: boolean; - targetComponentId?: string; - isNewGenerated?: boolean, - isRTCmd?:true, - isInvalid: Boolean; - - }, - controller: { - id: string, - label: string, - name: string, - }, - targetComponent: { - id: string, - viewModelId: string, - }, - -} \ No newline at end of file diff --git a/packages/designer/projects/designer-ui/src/lib/utils/operate.utils.ts b/packages/designer/projects/designer-ui/src/lib/utils/operate.utils.ts deleted file mode 100644 index f85b4d64c6caaa9be711524496dfa3a1ee81c012..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/lib/utils/operate.utils.ts +++ /dev/null @@ -1,299 +0,0 @@ -import ToolBarComponent from "../components/command/toolbar/component/fd-toolbar"; - -export class OperateUtils { - - static hasClass(obj, cls) { - return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); - } - - static addClass(obj, cls) { - if (!this.hasClass(obj, cls)) obj.className += " " + cls; - } - - static removeClass(obj, cls) { - if (this.hasClass(obj, cls)) { - var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); - obj.className = obj.className.replace(reg, ' '); - } - } - - static toggleClass(obj, cls) { - if (this.hasClass(obj, cls)) { - this.removeClass(obj, cls); - } else { - this.addClass(obj, cls); - } - } - /** - * 处理Tab、Section工具栏对应的按钮结构 - */ - static getTabToolbarStr(toolbar, options?, element?: any) { - if (!toolbar) { - return ''; - } - if (!toolbar.hasOwnProperty('contents')) { - return ''; - } - const tabPageToolBarComponent = new ToolBarComponent(toolbar, options); - tabPageToolBarComponent.init(); - tabPageToolBarComponent.rebuild(); - const toolBtnsStr = tabPageToolBarComponent.render(); - tabPageToolBarComponent.attach(element); - // toolbar.contents.forEach(btnItem => { - // let btnCls = btnItem.appearance && btnItem.appearance.class ? btnItem.appearance.class : "btn btn-secondary"; - // let isDisabled = btnItem.disable == true ? ' disabled' : ''; - // toolBtnsStr += ``; - // }); - return toolBtnsStr; - } - /* - * 处理响应式工具栏、Sidebar对应的按钮结构 - */ - static getResponseToolbarStr(toolbar, size = 'default') { - if (!toolbar) { - return ''; - } - let toolbarDatas = []; - if (Array.isArray(toolbar)) { - toolbarDatas = toolbar; - } else if (toolbar.hasOwnProperty('items')) { - toolbarDatas = toolbar.items; - } else { - return ''; - } - let toolBtnsStr = ""; - toolbarDatas.forEach(btnItem => { - // 新footer和header上构造的结构中没有appearance这个样式 - let btnCls = - btnItem.appearance && btnItem.appearance.class - ? " " + btnItem.appearance.class - : (btnItem.class ? " " + btnItem.class : " btn-secondary"); - btnCls += btnItem.disable === true ? " disabled" : ""; - btnCls += size == 'default' ? '' : ' btn-' + size; - toolBtnsStr += ``; - }); - return toolBtnsStr; - } - /** - * 获取ViewChange的字符串 - * @param toolbarData - * @param viewType - * @param currentItem - */ - static getViewChangeStr(toolbarData, viewType, currentItem) { - if (toolbarData.length == 0) { - return `
    未配置
    `; - } - let result = ''; - let btnsStr = ''; - if (viewType == 'tile') { - // 如果是平铺 - toolbarData.forEach(item => { - let btnCls = item.type == currentItem.type ? ' tile-btn-active' : ''; - btnCls += item.disable == true ? ' tile-btn-disable' : ''; - btnsStr += `
    - -
    `; - }); - result = `
    - ${btnsStr} -
    ` - } else { - toolbarData.forEach(item => { - let btnCls = item.type == currentItem.type ? ' typelist-item-active' : ''; - btnCls += item.disable == true ? ' tile-btn-disable' : ''; - btnsStr += `
  • - - - ${item.title} -
  • `; - }); - result = `
    -
    - -
    -
    -
    -
    -
      - ${btnsStr} -
    -
    -
    -
    `; - } - return result; - } - /** - * 查找父元素 - * @param ele - */ - static getFormParent(ele) { - if (ele.parentElement == document.body) { - return null; - } - if (ele.parentElement.hasAttribute('ref') && ele.parentElement.getAttribute('ref') == "form") { - return ele.parentElement; - } else { - return this.getFormParent(ele.parentElement); - } - } - /** - * - * @param eventListener 绑定事件的方式 - * @param viewChangeDatas viewchange的数据 - * @param activeTypeItem 当前类型的项 - * @param relatedElements {parentEl:查找的父元素,viewItems:找到的同一个groupId下的viewContainer项,viewChangeEl:viewChange元素} - * @param tileBtns - * @param afterClickFunc - */ - static bindTileEventForViewChange(eventListener, viewChangeDatas, activeTypeItem, viewChangeEl, beforeClickFunc = null, afterClickFunc = null) { - if (!viewChangeEl) { - return; - } - const tileBtns = viewChangeEl.querySelectorAll('.f-view-change-tile-btn'); - if (tileBtns) { - tileBtns.forEach(tileBtn => { - eventListener(tileBtn, 'click', (event) => { - event.stopPropagation(); - if (beforeClickFunc) { - // 获取相关值 - let { multiViewContainerEl } = beforeClickFunc(); - activeTypeItem = this.viewChangeBtnClick(tileBtn, activeTypeItem, viewChangeDatas, multiViewContainerEl); - } - if (afterClickFunc) { - afterClickFunc(activeTypeItem); - } - // this.redraw(); - }); - }); - } - } - /** - * - * @param eventListener 绑定事件的方式 - * @param viewChangeDatas viewchange的数据 - * @param activeTypeItem 当前类型的项 - * @param parentEl:查找的父元素viewItems:找到的同一个groupId下的viewContainer项,viewChangeEl:viewChange元素 - * @param afterClickFunc - */ - static bindDropdownEventForViewChange(eventListener, viewChangeDatas, activeTypeItem, viewChangeEl, beforeClickFunc = null, afterClickFunc = null) { - //下拉 - // 展开收起下拉面板 - const viewDropdown = viewChangeEl.querySelector('.f-view-change-dropdown'); - const viewDroppanel = viewChangeEl.querySelector('.f-view-change-typelist'); - // 按钮 - const listItems = viewChangeEl.querySelectorAll('.typelist-item'); - listItems.forEach(tileBtn => { - eventListener(tileBtn, 'click', (event) => { - event.stopPropagation(); - if (beforeClickFunc) { - // 获取相关值 - let { multiViewContainerEl } = beforeClickFunc(); - activeTypeItem = this.viewChangeBtnClick(tileBtn, activeTypeItem, viewChangeDatas, multiViewContainerEl); - if (afterClickFunc) { - afterClickFunc(activeTypeItem); - } - } - viewDroppanel.style.display = 'none'; - }); - }); - eventListener(viewDropdown, 'mouseenter', (event) => { - event.stopPropagation(); - viewDroppanel.style.display = 'block'; - }); - eventListener(viewDropdown, 'mouseleave', (event) => { - event.stopPropagation(); - viewDroppanel.style.display = 'none'; - }); - } - /** - * - * @param tileBtn 当前点击的按钮 - * @param activeTypeItem 当前Type项 - * @param viewChangeDatas viewchange的数据 - * @param parentEl 查找的父元素 - * @param viewContainerItems 查找到的项 - */ - static viewChangeBtnClick(tileBtn, activeTypeItem, viewChangeDatas, viewContainerItems) { - let activeType = tileBtn.getAttribute('viewChange'); - if (activeType != activeTypeItem.type) { - this.changeRelatedViewItem(viewContainerItems, activeType); - // 设定当前 --不能变更当前activeTypeItem - activeTypeItem = this.viewChangeInitActiveItem(activeType, activeTypeItem, viewChangeDatas); - } - return activeTypeItem; - } - /** - * 根据当前项,通过DOM操作改变viewchange状态 - * @param activeTypeItem - * @param viewChangeEl - */ - static updateTileByActiveType(viewType, activeTypeItem, viewChangeEl) { - if (!activeTypeItem) { - return; - } - if (viewType == 'tile') { - const tileBtns = viewChangeEl.querySelectorAll('.f-view-change-tile-btn'); - if (tileBtns) { - let findType = false; - tileBtns.forEach(tileBtn => { - let activeType = tileBtn.getAttribute('viewChange'); - if (activeType == activeTypeItem.type) { - findType = true; - this.addClass(tileBtn, 'tile-btn-active'); - } else { - this.removeClass(tileBtn, 'tile-btn-active'); - } - }); - if (!findType) { - this.addClass(tileBtns[0], 'tile-btn-active'); - } - } - } else if (viewType == 'dropdown') { - const dropBtn = viewChangeEl.querySelectorAll('.toggle-btn-icon'); - dropBtn.className = 'toggle-btn-icon ' + activeTypeItem.iconName; - } - } - /** - * - * @param parentEl 查找的范围元素 - * @param multiViewContainerEl 对应的viewContainer元素 - * @param viewChangeType - * @param viewGroupId - */ - static changeRelatedViewItem(multiViewContainerEl, viewChangeType) { - if (!multiViewContainerEl) { - return; - } - const multiViewContainerInstance = multiViewContainerEl.componentInstance; - if (!multiViewContainerInstance || !multiViewContainerInstance.updateCurrentViewItem) { - return; - } - multiViewContainerInstance.updateCurrentViewItem(viewChangeType); - } - /**----------------------此处的逻辑可能有问题,activeTypeItem可能无用 - * viewChange数据中获取当前项 - * @param activeType 当前Type类型 - * @param activeTypeItem 当前TypeItem项 - * @param viewChangeDatas viewChange数据 - */ - static viewChangeInitActiveItem(activeType, activeTypeItem, viewChangeDatas) { - if (viewChangeDatas && viewChangeDatas.length > 0) { - if (activeType) { - let item = viewChangeDatas.find((bar) => { - return bar['type'] === activeType; - }) - activeTypeItem = item; - } - else { - activeTypeItem = viewChangeDatas[0]; - } - return activeTypeItem; - } - return null; - } - -} diff --git a/packages/designer/projects/designer-ui/src/public-api.ts b/packages/designer/projects/designer-ui/src/public-api.ts deleted file mode 100644 index e767ef47613dfcbb03d755c2404432bcb14c8e80..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/public-api.ts +++ /dev/null @@ -1,18 +0,0 @@ - -export { AllComponents } from './lib/utils/component-list'; - -export { DgControl } from './lib/utils/dg-control'; - -export { FormPropertyChangeObject } from './lib/entity/property-change-entity'; - -export * from './lib/designer-ui.module'; - -export { ControlService } from './lib/service/control.service'; - -export { MultiViewManageService } from './lib/components/container/multi-view-container/property/services/multi-view-manage.service'; - -export { ControlEventPropertyIDList } from './lib/utils/control-event-prop'; - -export { SchemaDOMMapping } from './lib/service/schema-dom-mapping'; -export { ControlPropertyChangedService } from './lib/service/control-property-changed.service'; -export { ControlCreatorService } from './lib/service/control-creator.service'; diff --git a/packages/designer/projects/designer-ui/src/test.ts b/packages/designer/projects/designer-ui/src/test.ts deleted file mode 100644 index e11ff1c97b82c411cff67eb2623e12fbf7004b8a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/src/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'core-js/es7/reflect'; -import 'zone.js/dist/zone'; -import 'zone.js/dist/zone-testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/packages/designer/projects/designer-ui/tsconfig.lib.json b/packages/designer/projects/designer-ui/tsconfig.lib.json deleted file mode 100644 index 3fe337fcf5323bf91d023d92aa1effd9062209dd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/tsconfig.lib.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "module": "es2015", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "inlineSources": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "types": [], - "lib": [ - "dom", - "es2018" - ] - }, - "angularCompilerOptions": { - "annotateForClosureCompiler": true, - "skipTemplateCodegen": true, - "strictMetadataEmit": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "enableResourceInlining": true - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/packages/designer/projects/designer-ui/tsconfig.spec.json b/packages/designer/projects/designer-ui/tsconfig.spec.json deleted file mode 100644 index 16da33db072ce34e8607114c6c705bed73936724..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/packages/designer/projects/designer-ui/tslint.json b/packages/designer/projects/designer-ui/tslint.json deleted file mode 100644 index 124133f8499a773c98b161fbc21122698deb6282..0000000000000000000000000000000000000000 --- a/packages/designer/projects/designer-ui/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tslint.json", - "rules": { - "directive-selector": [ - true, - "attribute", - "lib", - "camelCase" - ], - "component-selector": [ - true, - "element", - "lib", - "kebab-case" - ] - } -} diff --git a/packages/designer/projects/form-designer-e2e/protractor.conf.js b/packages/designer/projects/form-designer-e2e/protractor.conf.js deleted file mode 100644 index 86776a391a5b48b32506eb0fa62b15ed6c926b69..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer-e2e/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.e2e.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; \ No newline at end of file diff --git a/packages/designer/projects/form-designer-e2e/src/app.e2e-spec.ts b/packages/designer/projects/form-designer-e2e/src/app.e2e-spec.ts deleted file mode 100644 index 84e1ee763333798107d5db23925d8cda87042ca3..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer-e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AppPage } from './app.po'; -import { browser, logging } from 'protractor'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getTitleText()).toEqual('Welcome to form-designer!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/packages/designer/projects/form-designer-e2e/src/app.po.ts b/packages/designer/projects/form-designer-e2e/src/app.po.ts deleted file mode 100644 index 5776aa9eb80d8e5ad05ed75ec9a04e7ee5060ba9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer-e2e/src/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get(browser.baseUrl) as Promise; - } - - getTitleText() { - return element(by.css('app-root h1')).getText() as Promise; - } -} diff --git a/packages/designer/projects/form-designer-e2e/tsconfig.e2e.json b/packages/designer/projects/form-designer-e2e/tsconfig.e2e.json deleted file mode 100644 index e3a479b7c1a7a5845eb7b3984f92ed129229df0f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer-e2e/tsconfig.e2e.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/app", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/browserslist b/packages/designer/projects/form-designer/browserslist deleted file mode 100644 index 37371cb04b9f1986d952499cdf9613c9d5d8ca8c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/browserslist +++ /dev/null @@ -1,11 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries -# -# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed - -> 0.5% -last 2 versions -Firefox ESR -not dead -not IE 9-11 \ No newline at end of file diff --git a/packages/designer/projects/form-designer/karma.conf.js b/packages/designer/projects/form-designer/karma.conf.js deleted file mode 100644 index 9c4eab7340c500b5e35246dd63343c0504859cea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../../coverage/form-designer'), - reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/packages/designer/projects/form-designer/src/app/app.component.css b/packages/designer/projects/form-designer/src/app/app.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/form-designer/src/app/app.component.html b/packages/designer/projects/form-designer/src/app/app.component.html deleted file mode 100644 index c8e5b9acadab6cb3fe9deec9ab23670fa751f33e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/app.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
    - - -
    - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/app.component.spec.ts b/packages/designer/projects/form-designer/src/app/app.component.spec.ts deleted file mode 100644 index da1619d7171da5b49e929b8ab5a65ae50231eb70..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - }); - - it(`should have as title 'form-designer'`, () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('form-designer'); - }); - - it('should render title in a h1 tag', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to form-designer!'); - }); -}); diff --git a/packages/designer/projects/form-designer/src/app/app.component.ts b/packages/designer/projects/form-designer/src/app/app.component.ts deleted file mode 100644 index a34d5747b47f99581db47ca3c749f63ab0a7423f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/app.component.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Component, OnDestroy, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -// import { CodeViewComponent, SaveResult } from '@farris/ide-code-view'; -import { FormEditorComponent } from './form-editor/form-editor.component'; -import { WebCmdService } from '@farris/designer-services'; -import { MessagerService } from '@farris/ui-messager'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent implements OnDestroy { - title = 'form-designer'; - - /** 界面展示类型:formEditor表单设计器;codeEditor构件编辑器 */ - // showType = 'formEditor'; - - /** 元数据路径 */ - metadataPath: string; - - /** 代码视图组件实例 */ - // @ViewChild(CodeViewComponent) private codeViewComponent: CodeViewComponent; - - @ViewChild(FormEditorComponent) private formViewComponent: FormEditorComponent; - - constructor(private notifyService: NotifyService, private webCmdService: WebCmdService, private msgService: MessagerService) { - - // this.metadataPath = gsp.ide.getParam('id'); - // this.webCmdService.webCmpBuilderService.openCodeViewWithNewMethod.subscribe(data => { - // const { tsFilePathName: tsFilePath, methodCode, methodName } = data; - // if (tsFilePath) { - - // // 触发刷新代码视图的文件树 - // this.codeViewComponent.refreshNavTree(tsFilePath); - - // // 触发打开新创建的ts代码编辑器 - // this.codeViewComponent.open(tsFilePath); - - // // 触发新增方法 - // this.codeViewComponent.sendNotification(tsFilePath, { eventName: 'AddNewMethod', eventPayload: { methodCode, methodName } }).subscribe(result => { - // if (result && result.methodCode && result.methodName) { - // this.webCmdService.bindNewMethodToControl(result.methodCode, result.methodName); - // } - // }); - - // // 切换到代码视图 - // this.showType = 'codeEditor'; - // } - // }); - } - - ngOnDestroy(): void { - this.webCmdService.webCmpBuilderService.openCodeViewWithNewMethod.unsubscribe(); - } - - /** - * 切换视图类型 - * @param type 视图类型 - * @param tsFilePath ts文件路径,用于设计器中新建构件后触发打开ts代码 - */ - // changeViewType(type: string, tsFilePath?: string) { - // this.showType = type; - // } - /** - * 表单保存后触发代码视图的保存 - */ - onFormSaved() { - // this.codeViewComponent.throttledSaveAllFile(); - } - - /** - * 全量保存代码视图 - */ - // onCodeEditorAllSaved(results: SaveResult[]) { - // if (results) { - // const successes = results.filter(r => r.success); - // if (successes.length === results.length) { - // this.notifyService.success('保存成功'); - - // if (window.saveFormAndCodeView) { - // parent.IGIX.closeTabWithoutDirtyCheck(this.metadataPath); - // } - // } else { - // const failed = results.filter(r => !r.success); - // let message = ''; - // failed.forEach(f => { - // message += `

    ${f.name} ${f.tip}

    `; - // }); - // const modalOptions = { - // title: '错误提示', - // showMaxButton: false, - // safeHtml: false - // }; - // this.msgService.show('error', message, modalOptions); - // } - // } - - // window.saveFormAndCodeView = false; - - // // 保存代码视图后刷新web构件 - // this.formViewComponent.refreshWebCmdAfterCodeViewSaved(); - // } - // /** - // * 保存单个代码视图 - // */ - // onCodeEditorSaved() { - // // 保存代码视图后刷新web构件 - // this.formViewComponent.refreshWebCmdAfterCodeViewSaved(); - // } - - // /** - // * 代码视图发生变化,需要向IDE发送变更通知 - // */ - // detectCodeFileDirty(flag: boolean) { - - // window.isFormCodeViewChanged = flag; - - // const hasChanges = window.isFormCodeViewChanged || window.isFormMetadataChanged; - // if (gsp.ide && gsp.ide.setDesignerStatus) { - // gsp.ide.setDesignerStatus(this.metadataPath, hasChanges); - // } - - // } -} diff --git a/packages/designer/projects/form-designer/src/app/app.module.ts b/packages/designer/projects/form-designer/src/app/app.module.ts deleted file mode 100644 index 2c48c2cff475ac4725f4670430cd7501ab1b86bd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/app.module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { AppComponent } from './app.component'; -import { FormsModule } from '@angular/forms'; -// import { GSP, CacheService } from '@farris/ide-devkit'; -import { FormEditorModule } from './form-editor/form-editor.module'; -// import { IdeCodeViewModule } from '@farris/ide-code-view'; -// import { IdeCodeViewConfigerModule } from '@farris/ide-code-view-configer'; - -// const globalGsp = (window.top as any).gsp; -// if (globalGsp && globalGsp.context) { -// (window as any).gsp = new GSP(globalGsp); -// } - -// 测试环境配置sessionId,iGix环境中删掉此行 -// gsp.cache.set('sessionId', 'default'); - -// 运行:http://localhost:4200/?id=/wangxhApp/wangxhSu/wangxhBo/bo-wangxhbofronttest/metadata/components/card11.frm -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - CommonModule, - FormsModule, - FormEditorModule, - // IdeCodeViewModule.forRoot(), - // IdeCodeViewConfigerModule - ], - // providers: [{ provide: CacheService, useValue: gsp.cache }], - bootstrap: [AppComponent], -}) -export class AppModule { } diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/form-designer-entity.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/form-designer-entity.ts deleted file mode 100644 index 00adef2be2d4c451b98c49525313ee2c2140ecac..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/form-designer-entity.ts +++ /dev/null @@ -1,43 +0,0 @@ - - -/** - * 设计器左侧tab页签 - */ -export enum LEFT_TAB_TYPE { - - /** 控件树节点--设计时 */ - controlTree = 'controlTree', - - /** 控件工具箱 */ - controllist = 'controllist', - - /** schema实体树 */ - schemaTree = 'schemaTree', - -} - -/** - * 右侧为控件设计器时,区分三种子页面 - */ -export enum BOTTOM_TAB_TYPE { - - /** - * 可视化设计器 - */ - formDesigner = 'formDesigner', - - /** - * 代码编辑器 - */ - codeEditor = 'codeEditor', - /** - * 样式编辑器 - */ - classEditor = 'classEditor', - - /** - * 表单设置 - */ - formSetting = 'formSetting' -} - diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/frame-property-config.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/frame-property-config.ts deleted file mode 100644 index 3f41fddab6f1b305bce58cce915253457685f6e7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/entity/frame-property-config.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { ElementPropertyConfig } from '@farris/ide-property-panel'; -import { FormBasicService } from '@farris/designer-services'; -import { Injector } from '@angular/core'; - - -export class FrameProp { - - constructor(private injector: Injector) { } - - getPropConfig(propertyData: any): ElementPropertyConfig[] { - const propertyConfig = []; - - // 常本信息属性 - const usualPropConfig = this.getUsualPropConfig(propertyData); - propertyConfig.push(usualPropConfig); - - - return propertyConfig; - - } - - private getUsualPropConfig(propertyData: any): ElementPropertyConfig { - const formBasicServ = this.injector.get(FormBasicService); - if (propertyData.module && !propertyData.module.metadataId) { - propertyData.module.metadataId = formBasicServ.formMetaBasicInfo.id; - } - - return { - categoryId: 'Basic', - categoryName: '基本信息', - propertyData: propertyData.module, - enableCascade: true, - parentPropertyID: 'module', - properties: [ - { - propertyID: 'metadataId', - propertyName: '标识', - propertyType: 'string', - description: '表单元数据的id', - readonly: true - }, - { - propertyID: 'code', - propertyName: '编号', - propertyType: 'string', - description: '表单元数据的编号', - readonly: true - }, - { - propertyID: 'name', - propertyName: '名称', - propertyType: 'string', - description: '表单元数据的名称', - readonly: true - }, - { - propertyID: 'showType', - propertyName: '展示形式', - propertyType: 'select', // 目前只支持弹框类卡片模板切换展示形式 - iterator: [ - { key: 'modal', value: '弹出表单' }, - { key: 'page', value: '标签页' }, - { key: 'sidebar', value: '侧边栏' } - ], - visible: propertyData.module.templateId === 'modal-card-template', - readonly: true - } - ], setPropertyRelates(changeObject: any, data, parameters) { - if (!changeObject) { - return; - } - switch (changeObject.propertyID) { - case 'showType': { - changeObject.needRefreshForm = true; - } - } - } - }; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.css b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.css deleted file mode 100644 index 52c5961017066251f397dac4dcfa8744194ad6ca..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.css +++ /dev/null @@ -1,196 +0,0 @@ -.fd-page { - top: 0; - bottom: 0; - position: absolute; - right: 0; - left: 0; - display: flex; - flex-direction: column; - overflow: hidden; - background: #F2F6FC; -} - -.fd-page-navigate .fd-page-main { - display: flex; - flex-direction: column; - overflow: hidden -} - -.fd-page-navigate .fd-page-content { - flex-shrink: 1; - flex-grow: 1; - flex-basis: 0; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - overflow: hidden -} - -.fd-page-navigate .fd-page-content>.col, .fd-page-navigate .fd-page-content>[class*=col-] { - padding-left: 0; - padding-right: 0 -} - -.fd-page-navigate .fd-page-content-nav { - display: flex; - flex-direction: column; - box-shadow: 0 0 8px 0 rgba(0, 28, 64, .08); - padding: .5rem 0; - position: relative; - z-index: 100 -} - -.fd-page-navigate .fd-page-content-main { - flex-shrink: 1; - flex-grow: 1; - flex-basis: 0; - overflow: auto -} - -.fd-page-navigate .fd-page-content-main>.f-section:last-child::after { - display: none -} - -.fd-page-navigate .fd-page-content-nav.f-component-splitter-pane { - padding: 0 -} - -:host { - height: 100%; - position: relative; - display: block; -} - -.formDesigner .leftBar { - /* min-width: 260px; */ - height: 100%; -} - -/******************tab页签****************/ - -.formDesigner .tab-panel { - display: flex; - overflow: hidden; - line-height: 30px; - min-height: 35px; - text-align: right; - white-space: nowrap; - justify-content: space-between; - background-color: #fff; -} - -.formDesigner .tab-panel .tab-container { - display: flex; - margin: 0 auto; - padding: 0; - width: 100%; -} - -.formDesigner .leftBar .tab-content::ng-deep .farris-treetable .farris-treetable-tbody tr { - color: rgba(0, 0, 0, 0.85); -} - -.formDesigner .leftBar .tab-content::ng-deep .farris-treetable .farris-treetable-tbody tr.f-treetable-disable-row { - color: #A8ADB8; -} - -.formDesigner .leftBar .tab-panel { - background: #fff; - padding: 5px; -} - -.formDesigner .leftBar .tab-panel .tab-container { - margin: 5px; - height: 32px; - background: #EFF5FF; - border-radius: 6px; - padding: 2px; -} - -.formDesigner .leftBar .tab-panel .tab-container .left-tab-item { - font-size: 14px; - color: #6080AD; - line-height: 23px; - font-weight: 400; - padding: 2; - display: flex; - cursor: pointer; - align-items: center; - width: 33%; -} - -.formDesigner .leftBar .tab-panel .tab-container .left-tab-item.checked { - background: rgba(255, 255, 255, 0.90); - box-shadow: 0px 4px 10px 0px rgba(2, 75, 193, 0.1); - border-radius: 6px; - color: #2A87FF; -} - -.formDesigner .leftBar .tab-panel .tab-container .left-tab-item .tab-label { - margin: 0 auto; -} - -/******************tab页签 end****************/ - -.formDesigner .leftBar .tab-content { - display: block; - height: 100%; - overflow: hidden; - background-color: #FCFDFF !important; -} - -.formDesigner .editorDiv { - background-color: #dbe6f7; - overflow-x: auto; -} - -.formDesigner .editorDiv .editorPanel { - position: relative; - height: 100%; - font-size: 14px; - min-width: 900px; -} - -.formDesigner .editorDiv .editorPanel.Mobile { - max-width: 500px; - margin: auto; -} - -.formDesigner .mainPanel { - overflow: auto; -} - -.formDesigner .designerCodePanel .customMonacoEditor { - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} - -.formDesigner .pane-content { - height: 100%; -} - -.formDesigner .propertyResizeLeft { - left: 0 !important; -} - -.formDesigner .fd-page-content-main .tab-panel .tab-container { - align-items: center; - height: 43px; -} - -.formDesigner .fd-page-content-main .tab-panel .tab-container .bottom-tab-item { - height: 26px; - color: #8DA3CE; - border-radius: 5px; - padding: 4px 10px; - line-height: 18px; - cursor: pointer; -} - -.formDesigner .fd-page-content-main .tab-panel .tab-container .bottom-tab-item.checked { - background: #EEF4FF; - color: #3486FF; -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.html b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.html deleted file mode 100644 index 69a342938ed46d2661a29d9a47a54c053cac1c07..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.html +++ /dev/null @@ -1,116 +0,0 @@ -
    - - -
    -
    -
    - -
    -
    -
    - - -
    -
    - -
    - -
    - -
    -
    - -
    -
    -
    - -
    -
    - - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    - -
    - - -
    -
    - -
    - -
    - -
    - -
    - -
    - - - -
    -
    - -
    -
    -
    - -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.spec.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.spec.ts deleted file mode 100644 index c349ca5fe3ed71ffe47dcbd3676c5498b6b402e2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FormDesignerComponent } from './form-designer.component'; - -describe('FormDesignerComponent', () => { - let component: FormDesignerComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FormDesignerComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FormDesignerComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.ts deleted file mode 100644 index c24d40e7072818da04d4af998d0d5e24378d3da0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/form-designer.component.ts +++ /dev/null @@ -1,940 +0,0 @@ -/* eslint-disable @typescript-eslint/indent */ -import { - ChangeDetectorRef, Component, ComponentFactoryResolver, ElementRef, Injector, - NgZone, OnDestroy, OnInit, ViewChild -} from '@angular/core'; - -import { DesignerHost } from './service/designer-host'; -import { BOTTOM_TAB_TYPE, LEFT_TAB_TYPE } from './entity/form-designer-entity'; -import { MessagerService } from '@farris/ui-messager'; -import { FrameProp } from './entity/frame-property-config'; -import { ClassEditorComponent } from './panels/class-editor/class-editor.component'; -import { BsModalService } from '@farris/ui-modal'; -import { RowNode, TreeNode } from '@farris/ui-treetable'; -import ResizeObserver from 'resize-observer-polyfill'; -import { PropertyPanelComponent, ShowMode } from '@farris/ide-property-panel'; -import { DomValidtionService } from './service/dom-validation.service'; -import { DesignerMetadataService } from '../service/designer-metadata.service'; -import { isEqual } from 'lodash-es'; -import { AdaptOldFormService } from './service/adapt-old-form.service'; -import { BuilderHTMLElement, IDesignerHost, FarrisDesignBaseComponent, DesignerBuilder } from '@farris/designer-element'; -import { - DomService, EventEditorService, DesignViewModelService, SchemaService, DesignerHostSettingService, - StateMachineService, DataStatesService, RefreshFormService, FormBasicService, WebCmdService, FarrisMetadataService -} from '@farris/designer-services'; -import { - AllComponents, ControlService, FormPropertyChangeObject, ControlEventPropertyIDList, - ControlPropertyChangedService, ControlCreatorService, SchemaDOMMapping, DgControl -} from '@farris/designer-ui'; -import { - DragResolveService, ControlBoxComponent, ControlTreeNodeType, ControlTreeNode, - ControlTreeComponent, SchemaTreeComponent -} from '@farris/designer-devkit'; - -const DEFAULT_PROPERTY_PANEL_WIDTH = '300px'; - -@Component({ - selector: 'app-form-designer', - templateUrl: './form-designer.component.html', - styleUrls: ['./form-designer.component.css'], - providers: [ControlPropertyChangedService, - ] -}) -export class FormDesignerComponent implements OnInit, OnDestroy { - - /** 可视化区域构造器 */ - public designBuilder: DesignerBuilder; - - /** 当前右侧显示的视图类型 */ - public bottomTabActive = BOTTOM_TAB_TYPE.formDesigner; - - /** 当前左侧显示的tab页 */ - public leftTabActive = LEFT_TAB_TYPE.controlTree; - - /** 页面控件实例集合 */ - public componentInstanceList: FarrisDesignBaseComponent[]; - - /** 当前选中控件实例 */ - public focusedComponentInstance: any; - - /** 属性面板配置数据 */ - public propertyConfig = []; - - /** 属性面板绑定数据 */ - public propertyData: any; - - /** 当前选中的属性面板标签页ID */ - public selectedPropertyTabId: string; - - /** 当前在控件树上选中的视图模型id */ - public focusedViewModelId: string; - - /** 属性面板是否支持左右拖动 */ - public propertyPanelResizeable = true; - - /** 属性面板宽度 */ - public propertyPanelWidth: string = DEFAULT_PROPERTY_PANEL_WIDTH; - - /** 表单完整DOM结构 */ - get domJson() { - return this.domService.getDomJson(); - } - - /** 代码编辑器绑定的字符串 */ - public monacoCode: string; - - /** 代码编辑器实例 */ - private monacoEditor: any; - - /** 控件树组件实例 */ - @ViewChild('controlTree') private controlTree: ControlTreeComponent; - - /** 控件工具箱实例 */ - @ViewChild('controlBox') private controlBox: ControlBoxComponent; - - /** 实体树组件实例 */ - @ViewChild('schemaTree') private schemaTree: SchemaTreeComponent; - - /** 样式编辑器组件实例 */ - @ViewChild(ClassEditorComponent) private classEditorComponent: ClassEditorComponent; - - @ViewChild(PropertyPanelComponent) private propertyPanelComponent: PropertyPanelComponent; - - private ro: ResizeObserver = null; - - private elRef: ElementRef = null; - - private _roTimer = null; - - private iFrameTabId: string; - - /** 代码编辑器内容发生变更 */ - private isMonacoEditorChanged = false; - - constructor( - private domService: DomService, - private schemaService: SchemaService, - private dgVMService: DesignViewModelService, - private controlService: ControlService, - private stateMachineService: StateMachineService, - private dataStatesService: DataStatesService, - private modalService: BsModalService, - private msgService: MessagerService, - private componentFactoryResolver: ComponentFactoryResolver, - private injector: Injector, - private designerHostSettingService: DesignerHostSettingService, - private controlPropertyChangedService: ControlPropertyChangedService, - private ngZone: NgZone, - private dragResolveService: DragResolveService, - private controlCreatorService: ControlCreatorService, - private refreshFormService: RefreshFormService, - private formBasicService: FormBasicService, - private webCmdService: WebCmdService, - private eventEditorService: EventEditorService, - private cd: ChangeDetectorRef, - ) { - - this.elRef = this.injector.get(ElementRef); - // this.iFrameTabId = gsp.ide.getParam('id'); - } - - ngOnInit() { - // 监听外部刷新表单的事件 - this.refreshFormService.refreshFormDesigner.subscribe((targetComponentId) => { - this.refreshFormAndTree(targetComponentId); - }); - // 监听外部刷新实体树的事件 - this.refreshFormService.refreshSchamaTree.subscribe(() => { - this.schemaTree.refreshTreeData(); - }); - // 监听外部刷新控件树的事件 - this.refreshFormService.refreshControlTree.subscribe(() => { - this.controlTree.refreshControlTree(); - }); - } - - ngOnDestroy() { - if (this.ro) { - this.ro.unobserve(this.elRef.nativeElement); - this.ro.disconnect(); - this.ro = null; - } - - this.designBuilder = null; - this.refreshFormService.refreshFormDesigner.unsubscribe(); - this.refreshFormService.refreshSchamaTree.unsubscribe(); - this.refreshFormService.refreshControlTree.unsubscribe(); - } - - render(dom: any) { - - // 保存DOM - this.domService.setDomJson(dom, - (path: string, newValue: any, previousValue: any) => this.domChangedCallback(path, newValue, previousValue)); - - // 适配旧表单 - const adaptFormService = new AdaptOldFormService(this.injector); - adaptFormService.adaptOldForm(); - - // 事件编辑器集成 - this.webCmdService.checkCommands(); - - // 组合ViewModel数据:schema field+VM changeset => dgViewModel - this.dgVMService.assembleDesignViewModel(); - - // 渲染页面 - this.createDesignBuilder(this.domJson); - - // 刷新实体树 - this.schemaTree.refreshTreeData(); - } - - private domChangedCallback(path: string, newValue: any, previousValue: any): void { - // 不重复发送变更通知 - if (window.isFormMetadataChanged) { - return; - } - // 当前处于变更挂起状态 - if (window.suspendChangesOnForm) { - return; - } - // 排除的节点,仅用于设计时,用于不感知 - if (['module.actions'].includes(path)) { - return; - } - // 部分属性是设计器控制显示状态的,无关运行时,可以不保存,所以不记录变更 - if (path && (path.includes('InDesignerView') || path.includes('currentViewShowType'))) { - return; - } - - // 新旧值相同,不记录变更 - if (newValue && previousValue) { - if (isEqual(newValue, previousValue)) { - return; - } - } - - // 通知IDE设计器变更 - // if (gsp && gsp.ide && gsp.ide.setDesignerStatus) { - // window.isFormMetadataChanged = true; - - // gsp.ide.setDesignerStatus(this.iFrameTabId, true); - // // console.log('domChanged,path=', path); - // } - } - - private createDesignBuilder(domJson: any) { - // 画布渲染过程中,可能会在控件上补充属性,这种变更用户不感知,所以不需要通知IDE框架 - window.suspendChangesOnForm = true; - - const elements = document.getElementsByClassName('editorPanel'); - let rootElement; - if (elements && elements.length) { - rootElement = elements[0]; - } - - if (!DesignerBuilder) { - return; - } - - this.addServiceToDevkit(); - const designerHost = this.addServiceToUI(); - - const childComponents = domJson.module.components.slice(1); - const rootComponent = domJson.module.components[0]; - const designerSchema = { - contents: [rootComponent] - }; - this.designBuilder = new DesignerBuilder(rootElement, designerSchema, childComponents, AllComponents, designerHost); - this.designBuilder.instance.ready.then(() => { - this.onBuilderReady(); - - // 加载控件工具箱 - this.controlBox.getDisplayedControls(); - - // this.isBuilderReady = true; - // 设计器渲染完毕,开始监听DOM变更 - window.suspendChangesOnForm = false; - }); - - this.designBuilder.instance.on('change', () => { - this.onComponentChanged(); - }); - this.designBuilder.instance.on('removeComponent', () => { - this.updatePropertyPanel(null); - this.onComponentChanged(); - }); - } - - /** - * 将UI中定义的控件相关服务添加到Devkit中 - */ - private addServiceToDevkit() { - const designerHost = new DesignerHost(); - - designerHost.addService('ControlService', this.controlService); - designerHost.addService('ControlCreatorService', this.controlCreatorService); - designerHost.addService('SchemaDOMMapping', SchemaDOMMapping); - designerHost.addService('ControlEventPropertyIDList', ControlEventPropertyIDList); - designerHost.addService('Injector', this.injector); - this.designerHostSettingService.setDesignerHost(designerHost); - - } - - /** - * 将服务添加到UI包中 - */ - private addServiceToUI(): IDesignerHost { - const designerHost = new DesignerHost(); - designerHost.addService('DomService', this.domService); - designerHost.addService('SchemaService', this.schemaService); - designerHost.addService('DesignViewModelService', this.dgVMService); - designerHost.addService('DragResolveService', this.dragResolveService); - designerHost.addService('StateMachineService', this.stateMachineService); - designerHost.addService('DataStatesService', this.dataStatesService); - designerHost.addService('WebCmdService', this.webCmdService); - designerHost.addService('EventEditorService', this.eventEditorService); - designerHost.addService('ControlCreatorService', this.controlCreatorService); - designerHost.addService('SchemaDOMMapping', SchemaDOMMapping); - designerHost.addService('RefreshFormService', this.refreshFormService); - designerHost.addService('FormBasicService', this.formBasicService); - - // 注入公共服务,用于控件中动态创建angular组件 - designerHost.addService('Injector', this.injector); - designerHost.addService('ModalService', this.modalService); - designerHost.addService('MessagerService', this.msgService); - designerHost.addService('ComponentFactoryResolver', this.componentFactoryResolver); - return designerHost; - } - - public onBuilderReady() { - - this.componentInstanceList = this.designBuilder.instance.getAllComponents(); - - // 更新控件json映射 - this.domService.updateDomDgMap(this.componentInstanceList); - - // 重新挂载控件事件 - this.reAttachComponentEvent(this.componentInstanceList); - - // 监听容器尺寸变化 - this.registerResizeListenner(); - - // 监听容器横向滚动条 - this.bindEditorPanelScrollListener(); - - // 更新actions - this.webCmdService.syncActions(); - } - - /** - * 画布内控件发生变更 - */ - private onComponentChanged() { - this.onBuilderReady(); - - this.focusedComponentInstance = null; - // 刷新控件树 - this.controlTree.refreshControlTree(); - - // 刷新实体树(涉及到字段图标的颜色变化) - this.schemaTree.refreshTreeData(); - } - - /** - * 挂载控件点击事件 - * @param componentInstanceList 控件实例列表 - */ - private reAttachComponentEvent(componentInstanceList: any[]) { - componentInstanceList.forEach((cmp: any) => { - // 响应点击事件 - cmp.on('componentClicked', (data) => { this.onComponentClicked(data); }); - - // 响应清除属性面板事件,常用于控件被移除的场景 - cmp.on('clearPropertyPanel', (data) => { this.updatePropertyPanel(null); }); - - // 响应组件内部触发的变更事件,常用于控件内部触发的新增、删除子控件的场景 - cmp.on('componentChanged', (data) => { this.onComponentChanged(); }); - }); - } - - /** - * 监听可视化区域的控件点击事件 - * @param controlComponent 选中的组件实例 - */ - private onComponentClicked(data: any) { - if (!data || !data.length) { - return; - } - const { e, componentInstance, needUpdatePropertyPanel } = data[0]; - if (!componentInstance) { - return; - } - - // 触发选中控件树节点。直接点击控件时e有值;点击控件树节点时e为undefined - if (e) { - this.controlTree.triggerTreeFocus(componentInstance.component.id); - } - - // 触发更新属性面板(TODO 属性的收集逻辑在某些场景下会执行两遍) - if (!this.focusedComponentInstance || componentInstance.id !== this.focusedComponentInstance.id || needUpdatePropertyPanel) { - this.updatePropertyPanel(componentInstance); - } - - // 记录选中的控件实例 - this.focusedComponentInstance = componentInstance; - } - - /** - * 触发更新属性面板 - */ - updatePropertyPanel(componentInstance: any) { - window.suspendChangesOnForm = true; - if (!componentInstance || !componentInstance.component) { - this.propertyConfig = []; - this.propertyData = {}; - - window.suspendChangesOnForm = false; - return; - } - - if (componentInstance.getPropertyConfig) { - this.propertyConfig = componentInstance.getPropertyConfig() || []; - } else { - this.propertyConfig = []; - } - this.propertyData = componentInstance.component; - - window.suspendChangesOnForm = false; - } - - /** - * 变更控件树节点 - * @param node 选中的树节点 - */ - public changeControlTreeNode(data: { treeNode: ControlTreeNode, dependentTreeNode?: ControlTreeNode, outsideNodeId?: string }) { - - const node = data.treeNode; - if (!node) { - this.updatePropertyPanel(null); - return; - } - const { dependentTreeNode } = data; - const { outsideNodeId } = data; - if (outsideNodeId) { - this.clickControlNode(node, dependentTreeNode, outsideNodeId); - return; - } - switch (node.type) { - // 表单控件节点 - case ControlTreeNodeType.Control: - case ControlTreeNodeType.Component: { - if (!this.updateDOMByMonacoCode()) { - return; - } - this.clickControlNode(node, dependentTreeNode); - break; - } - // 顶层frame节点 - case ControlTreeNodeType.Frame: { - if (!this.updateDOMByMonacoCode()) { - return; - } - this.clickFrameTreeNode(node); - break; - } - } - } - - /** - * 控件树单击组件节点或控件节点 - */ - private clickControlNode(node: ControlTreeNode, dependentTreeNode?: ControlTreeNode, outsideNodeId?: string) { - // 场景1:选择控件树上没有的控件 - if (outsideNodeId) { - const componentInstance = this.componentInstanceList.find(instance => instance.id === outsideNodeId); - if (componentInstance) { - componentInstance.triggerComponentClick(); - this.updateMonacoCode(); - } - return; - } - // 场景2:有依赖关系的节点,触发依赖节点的点击事件 - if (dependentTreeNode) { - const componentInstance = this.componentInstanceList.find(instance => instance.id === dependentTreeNode.data.id); - if (componentInstance && componentInstance.triggerComponentInsideClick) { - componentInstance.triggerComponentInsideClick(node); - } - } else { - // 场景3:获取节点对应的控件实例,并触发点击事件,从而显示属性面板 - const focusedComponentInstance = this.componentInstanceList.find(instance => instance.id === node.data.id); - if (focusedComponentInstance) { - focusedComponentInstance.triggerComponentClick(); - } - } - - this.updateMonacoCode(); - } - - /** - * 点击控件树顶层表单frame节点 - */ - private clickFrameTreeNode(node: ControlTreeNode) { - window.suspendChangesOnForm = true; - - this.focusedComponentInstance = null; - - // 触发显示属性面板 - const frameProp = new FrameProp(this.injector); - const customPropConfig = frameProp.getPropConfig(this.domJson); - this.propertyConfig = customPropConfig; - this.propertyData = this.domJson; - - // 移除可视化区域的选定边框 - const elements = document.getElementsByClassName('dgComponentSelected') as HTMLCollectionOf; - if (elements && elements.length > 0) { - Array.from(elements).forEach(element => { - element.classList.remove('dgComponentSelected'); - if (element.componentInstance && element.componentInstance.afterComponentCancelClicked) { - element.componentInstance.afterComponentCancelClicked(null); - } - }); - - } - // 当前显示代码编辑器:获取最新DOM结构并进行格式化 - if (this.bottomTabActive === BOTTOM_TAB_TYPE.codeEditor) { - this.updateMonacoCode(); - } else { - window.suspendChangesOnForm = false; - - } - - } - - /** - * 切换底部tab页 - */ - changeBottomBar(key) { - - // 重复点击无效 - if (this.bottomTabActive === key) { - return; - } - switch (key) { - // 切到代码编辑器 - case BOTTOM_TAB_TYPE.codeEditor: { - this.saveClassEditorCode(); - this.updateMonacoCode(); - break; - } - // 切到样式编辑器 - case BOTTOM_TAB_TYPE.classEditor: { - if (!this.updateDOMByMonacoCode()) { - return; - } - break; - } - // 切到可视化设计器 - case BOTTOM_TAB_TYPE.formDesigner: { - this.saveClassEditorCode(); - if (!this.updateDOMByMonacoCode()) { - return; - } - this.refreshFormAndTree(); - } - } - this.bottomTabActive = key; - } - - /** - * 刷新页面 - * @param targetComponentId 需要刷新的目标组件id,若不传,则刷新整个页面 - */ - private refreshFormAndTree(targetComponentId?: string) { - - // 组合ViewModel数据:schema field+VM changeset => dgViewModel - this.dgVMService.assembleDesignViewModel(); - - // 更新DOM结构和子组件(不可少) - const childComponents = this.domJson.module.components.slice(1); - const rootComponent = this.domJson.module.components[0]; - const designerSchema = { - contents: [rootComponent] - }; - this.designBuilder.updateChildComponents(designerSchema, childComponents); - - // 挂起变更 - window.suspendChangesOnForm = true; - // 局部重绘 - if (targetComponentId) { - const needToBeRefreshedCmp = this.componentInstanceList.find(c => c.id === targetComponentId); - if (needToBeRefreshedCmp) { - needToBeRefreshedCmp.rebuild().then(() => { - this.onComponentChanged(); - - window.suspendChangesOnForm = false; - }); - } - } else { - // 整个页面重绘 - this.designBuilder.instance.rebuild().then(() => { - this.onComponentChanged(); - - // 更新拖拽容器中的实体树和控件树 - // this.schemaTree.updateTreeNodesInDragula(); - this.controlBox.updateCategoryPanelsInDragula(); - - window.suspendChangesOnForm = false; - - }); - } - - } - - /** - * 切换左侧标签页 - */ - public changeSideBarTabTo(panelCode: string) { - this.leftTabActive = panelCode as any; - - // 默认切换回可视化设计器,不展示代码编辑器或者设置视图 - if (this.bottomTabActive !== BOTTOM_TAB_TYPE.formDesigner) { - this.bottomTabActive = BOTTOM_TAB_TYPE.formDesigner; - } - } - - /** - * 切换属性面板标签页 - * @param tabId 标签页id - */ - public onSelectedPropertyTabChanged(tabId) { - this.selectedPropertyTabId = tabId; - } - - /** - * 属性变更后事件 - * @param changeObject 变更集 - */ - public onPropertyChanged(changeObject: FormPropertyChangeObject) { - - this.controlPropertyChangedService.afterPropertyChanged( - changeObject, - this.propertyData, - null, - this.focusedComponentInstance); - - this.updateControlTreeAfterPropertyChanged(changeObject); - } - - /** - * 属性变更后事件 - * @param data 变更集 - */ - public onPropertyModalChanged(data) { - - const { changeObject, parameters } = data; - this.controlPropertyChangedService.afterPropertyChanged( - changeObject, - this.propertyData, - parameters, - this.focusedComponentInstance); - - this.updateControlTreeAfterPropertyChanged(changeObject); - - } - - /** - * 属性面板展示模式发生变化 - */ - public onPropertyPanelShowModelChange(event: any) { - const { mode = ShowMode.panel, width = undefined } = event || {}; - if (mode === ShowMode.panel) { - this.propertyPanelWidth = width; - this.propertyPanelResizeable = true; - } else if (mode === ShowMode.sidebar) { - this.propertyPanelWidth = width; - this.propertyPanelResizeable = false; - } - this.cd.detectChanges(); - } - - /** - * 刷新控件树 - * @param changeObject 变更集 - */ - private updateControlTreeAfterPropertyChanged(changeObject: FormPropertyChangeObject) { - // 控件树整体刷新 - if (changeObject.needRefreshControlTree) { - this.controlTree.refreshControlTree(); - } - - // 更新控件树节点名称 - if (changeObject.needUpdateControlTreeNodeName) { - let shownName = changeObject.propertyValue && changeObject.propertyValue.trim(); - - if (!changeObject.propertyValue) { - shownName = (DgControl[this.propertyData.type] && DgControl[this.propertyData.type].name) || this.propertyData.id; - } - this.controlTree.updateControlTreeNodeData(this.propertyData.id, { name: shownName }); - } - } - - /** - * 代码编辑器初始化后事件,用于格式化代码 - */ - onMonacoInit($event) { - this.monacoEditor = $event.editor; - this.formatMonacoCode(); - - // 监听代码编辑器的文本变化 - // this.monacoEditor.onDidChangeModelContent(() => { - // if (!window.suspendChangesOnForm) { - // this.isMonacoEditorChanged = true; - - // if (!window.isFormMetadataChanged) { - // if (gsp && gsp.ide && gsp.ide.setDesignerStatus) { - // gsp.ide.setDesignerStatus(this.iFrameTabId, true); - // } - // window.isFormMetadataChanged = true; - // } - - // } - // }); - } - - private formatMonacoCode() { - if (!this.monacoEditor) { - return; - } - this.ngZone.runOutsideAngular(() => { - // 挂起变更 - window.suspendChangesOnForm = true; - setTimeout(() => { - - const action = this.monacoEditor.getAction('editor.action.formatDocument'); - if (action) { - - action.run().then(() => { - // 格式化结束,恢复变更 - window.suspendChangesOnForm = false; - }); - } else { - window.suspendChangesOnForm = false; - } - }, 200); - }); - } - - /** - * 若是当前显示自定义样式页签,需要先保存定义样式 - */ - private saveClassEditorCode() { - if (this.bottomTabActive === BOTTOM_TAB_TYPE.classEditor && this.classEditorComponent) { - this.classEditorComponent.saveClassEditor(); - } - } - - /** - * 更新代码编辑绑定数据 - */ - updateMonacoCode() { - if (this.focusedComponentInstance) { - this.monacoCode = JSON.stringify(this.focusedComponentInstance.component); - } else { - this.monacoCode = this.domJson ? JSON.stringify(this.domJson) : ''; - } - - this.formatMonacoCode(); - } - - /** - * 根据代码编辑器修改后的数据,更新表单DOM JSON - */ - updateDOMByMonacoCode() { - if (this.bottomTabActive !== BOTTOM_TAB_TYPE.codeEditor) { - return true; - } - // 内容未发生变更 - if (!this.isMonacoEditorChanged) { - return true; - } - // 校验数据,若校验失败禁止切换视图 - if (!this.monacoCode || !this.isJsonString(this.monacoCode)) { - this.msgService.warning('代码格式错误,请检查标红部分'); - return false; - } - - const newDomJson = JSON.parse(this.monacoCode); - - // 修改控件domDgMap - if (this.focusedComponentInstance && this.focusedComponentInstance.type !== ControlTreeNodeType.Frame) { - const oldDomJson = this.domService.domDgMap.get(this.focusedComponentInstance.id); - if (oldDomJson) { - Object.assign(oldDomJson, newDomJson); - this.updateChildContentsDgMap(newDomJson); - } - } else { - Object.assign(this.domJson, newDomJson); - } - - // 校验DOM中viewmodel和component是否一一对应。主要用于手动修改代码编辑器后,导致的编译失败问题 - const validationServ = new DomValidtionService(this.domService, this.webCmdService, this.msgService); - if (!validationServ.checkComponentAndViewModelCanMatch(this.domJson)) { - return false; - } - - return true; - } - - /** - * 根据代码编辑器序列化值更新DOM结构:容器类节点赋值后更新所有子节点DOM结构 - */ - private updateChildContentsDgMap(newDomJson: any) { - - if (Object.keys(newDomJson).includes('contents')) { - newDomJson.contents.forEach(co => { - this.domService.domDgMap.set(co.id, co); - this.updateChildContentsDgMap(co); - }); - } - } - - /** - * 保存前准备,主要解决: - * 1. 在代码编辑器视图中修改dom后直接点保存的场景。 - * 2、校验dom中有没有冗余或者无效的代码片段 - */ - prepareBeforeFormSaved() { - if (this.bottomTabActive === BOTTOM_TAB_TYPE.codeEditor) { - if (!this.updateDOMByMonacoCode()) { - return; - } - - } - if (this.bottomTabActive === BOTTOM_TAB_TYPE.classEditor) { - this.classEditorComponent.saveClassEditor(); - } - const validationServ = new DomValidtionService(this.domService, this.webCmdService, this.msgService); - return validationServ.checkDocumentValidBeforeSaved(); - } - - /** - * 控件树展示右键菜单前事件:用于组装菜单数据 - * @param data 控件树右键行数据 - */ - beforeShowContextMenu = (rowNode: RowNode, parentRowNode: RowNode) => { - if (!rowNode) { - return; - } - const treeNode = rowNode.node as TreeNode; - - let showMenu = false; - let menus = []; - - // 获取右键菜单对应的组件实例 - let menuFocusedComponentInstance; - if (parentRowNode) { - menuFocusedComponentInstance = this.componentInstanceList.find(instance => instance.id === parentRowNode.node.id); - } else { - menuFocusedComponentInstance = this.componentInstanceList.find(instance => instance.id === treeNode.id); - } - - if (menuFocusedComponentInstance && menuFocusedComponentInstance.resolveContextMenuConfig) { - menus = menuFocusedComponentInstance.resolveContextMenuConfig(rowNode, parentRowNode); - if (menus && menus.length) { - showMenu = true; - } - } - - return { - show: showMenu, - menus - }; - }; - - /** - * 监听容器尺寸变化 - */ - private registerResizeListenner() { - // 监听画布内部区域的尺寸变化 - this.ro = new ResizeObserver(() => { - if (this._roTimer) { - clearTimeout(this._roTimer); - } - - this._roTimer = setTimeout(() => { - this.setPositionOfBtnGroup(); - }); - }); - // 因为画布有最小宽度,可能会出现滚动条,所以需要监听editorDiv的尺寸变化 - this.ro.observe(this.elRef.nativeElement.querySelector('.editorDiv')); - } - - /** - * 计算选中控件的工具栏位置 - */ - private setPositionOfBtnGroup() { - const selectDom = this.elRef.nativeElement.querySelector('.dgComponentSelected'); - if (!selectDom) { - return; - } - // 可视化区域在隐藏状态下,不计算工具栏定位。 - const selectDomRect = selectDom.getBoundingClientRect(); - if (selectDomRect.width === 0 && selectDomRect.height === 0) { - return; - } - // 计算工具栏定位 - const toolbar = selectDom.querySelector('.component-btn-group'); - if (toolbar) { - const toolbarRect = toolbar.getBoundingClientRect(); - const divPanel = toolbar.querySelector('div'); - const divPanelRect = divPanel.getBoundingClientRect(); - if (divPanel) { - divPanel.style.top = toolbarRect.top + 'px'; - - divPanel.style.left = (toolbarRect.left - divPanelRect.width) + 'px'; - - } - } - - } - - /** - * 监听可视化区域的横向滚动条 - */ - private bindEditorPanelScrollListener() { - const editorPanelEle = this.elRef.nativeElement.querySelector('.editorDiv'); - - editorPanelEle.addEventListener('scroll', (e) => { - this.setPositionOfBtnGroup(); - }); - } - - /** - * 从【模型】页签切换到【页面】页签时,模型中的命令、参数可能发生了变更,如果当前【页面】包括【交互面板】,则需要更新【交互面板】绑定的数据。 - */ - updatePropertyPanelAfterModelChanged() { - // 当前有已选的控件实例 - if (!this.focusedComponentInstance) { - return; - } - - // 当前控件的属性面板中包括【交互面板】 - const categoryTabs = this.propertyPanelComponent.categoryTabs || []; - if (categoryTabs.find(tab => tab.tabId === 'commands')) { - this.updatePropertyPanel(this.focusedComponentInstance); - } - } - - /** - * 判断字符串是否可以合法转换为json数据 - */ - private isJsonString(jsonStr: string) { - try { - JSON.parse(jsonStr); - } catch (error) { - return false; - } - return true; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.css b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.css deleted file mode 100644 index b9f3c31386e2b150e458c01ad9216fd5e280d051..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.css +++ /dev/null @@ -1,19 +0,0 @@ -:host { - height: 100%; - position: relative; - display: block; -} - -.customMonacoEditor { - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; -} - -.vm-list { - overflow: auto; - height: 100%; - background: #fcfdff !important; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.html b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.html deleted file mode 100644 index 8351ea91f68995a6c8c1ffd19882593a9387f78b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
    - - - -
    -
      -
      -
      -
      - -
      -
      -
      -
    -
    - -
    - -
    - -
    -
    -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.ts deleted file mode 100644 index 19771cf4862f869dddd26587b4195e70f16c4d1b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/panels/class-editor/class-editor.component.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { Component, NgZone, OnInit } from '@angular/core'; -import { DomService } from '@farris/designer-services'; -import { ViewModelListBuilder } from '../../../vm-designer/method-manager/services/vm-list-builder'; - -@Component({ - selector: 'class-editor', - templateUrl: './class-editor.component.html', - styleUrls: ['./class-editor.component.css'], - providers: [] -}) -export class ClassEditorComponent implements OnInit { - - /** 代码编辑器实例 */ - monacoEditor; - - /** 代码编辑器配置 */ - classEditorOptions = { - theme: 'vs-dark', - language: 'css', - formatOnType: true, - foldingStrategy: 'indentation', // 显示缩进 - folding: true, // 启用代码折叠功能 - showFoldingControls: 'always', // 默认显示装订线 - automaticLayout: true - }; - - /** 代码编辑器绑定值,组件样式 */ - classCode = ''; - - /** 组件列表 */ - cmpList: any[]; - - /** 当前选中组件id */ - activeCmpId: string; - - constructor( - private domService: DomService, - private ngZone: NgZone) { } - - ngOnInit() { - const vmBuilder = new ViewModelListBuilder(this.domService); - - const result = vmBuilder.resolveViewModelList(); - if (!result) { - return; - } - this.cmpList = result.viewModelTabs || []; - - // 选中根组件 - this.activeCmpId = this.cmpList[0].componentId; - this.onChangeSelectedCmp(this.activeCmpId); - } - - /** - * 切换组件 - */ - onChangeSelectedCmp(componentId: string) { - // 自动补充的属性,不记录变更 - window.suspendChangesOnForm = true; - - // 先保存上一次的编辑数据 - if (componentId !== this.activeCmpId) { - this.saveCustomClassToComponent(this.activeCmpId); - } - this.activeCmpId = componentId; - - // 获取新组件的自定义样式 - this.classCode = ''; - if (componentId) { - - if (!this.domService.module.customClass) { - this.domService.module.customClass = {}; - } - if (!this.domService.module.customClass[componentId]) { - this.domService.module.customClass[componentId] = ''; - } - this.classCode = this.domService.module.customClass[componentId]; - } - this.formatMonacoCode(); - - } - - /** - * 保存自定义样式 - */ - private saveCustomClassToComponent(componentId: string) { - const customClass = this.domService.module.customClass; - if (customClass && customClass[componentId] !== this.classCode) { - customClass[componentId] = this.classCode; - } - } - - public saveClassEditor() { - const componentId = this.activeCmpId; - if (componentId) { - const customClass = this.domService.module.customClass; - if (customClass[componentId] !== this.classCode) { - customClass[componentId] = this.classCode; - } - } - - } - - /** - * 格式化 - */ - private formatMonacoCode() { - this.ngZone.runOutsideAngular(() => { - // 挂起变更 - window.suspendChangesOnForm = true; - - setTimeout(() => { - const action = this.monacoEditor && this.monacoEditor.getAction('editor.action.formatDocument'); - if (action) { - action.run().then(() => { - window.suspendChangesOnForm = false; - }); - } else { - window.suspendChangesOnForm = false; - } - }, 200); - }); - } - - /** - * format editor’s content after initialized - */ - onMonacoInit($event) { - this.monacoEditor = $event.editor; - - // 监听代码编辑器的文本变化 - // this.monacoEditor.onDidChangeModelContent(() => { - // if (!window.suspendChangesOnForm && !window.isFormMetadataChanged) { - - // // 通知IDE显示变更图标 - // if (gsp.ide && gsp.ide.setDesignerStatus) { - // const iFrameTabId = gsp.ide.getParam('id'); - // gsp.ide.setDesignerStatus(iFrameTabId, true); - // } - - // // console.log('domChanged by editor'); - // window.isFormMetadataChanged = true; - // } - // }); - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/adapt-old-form.service.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/adapt-old-form.service.ts deleted file mode 100644 index c1b8a326dd6545fb4fc13edf97c1ba7db9b545f4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/adapt-old-form.service.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { Injector } from '@angular/core'; -import { FormBasicService, DomService, DesignerEnvType, FormDeclaration, Subscription } from '@farris/designer-services'; -import { Subject } from 'rxjs'; - -/** - * 对表单DOM节点进行适配检查 - */ -export class AdaptOldFormService { - private formBasicServ: FormBasicService; - - private domServ: DomService; - - private http: HttpClient; - - constructor(private injector: Injector) { - - this.formBasicServ = this.injector.get(FormBasicService); - this.domServ = this.injector.get(DomService); - this.http = this.injector.get(HttpClient); - } - - /** - * 对DOM节点进行兼容性适配检查 - */ - adaptOldForm() { - // 设计器自动补充的属性,不记录变更 - window.suspendChangesOnForm = true; - - this.adaptOldMoudle(); - // this.adaptOldSchema(); - this.adaptFormOptions(); - - // 适配表达式 - if (!this.domServ.module.hasOwnProperty.call('expressions')) { - this.domServ.module.expressions = []; - } - - window.suspendChangesOnForm = false; - } - - /** - * Module层的属性缺失 - */ - private adaptOldMoudle() { - - // 补充表单创建时的模板id---用于表单升级 - if (!this.domServ.module.templateId && this.domServ.module.bootstrap) { - this.domServ.module.templateId = this.domServ.module.bootstrap; - } - - // 设计时:增加表单所在工程名 - if (this.formBasicServ.envType === DesignerEnvType.designer && !this.domServ.module.projectName && - this.formBasicServ.formMetaBasicInfo && this.formBasicServ.formMetaBasicInfo.relativePath) { - const paths = this.formBasicServ.formMetaBasicInfo.relativePath.split('/'); - this.domServ.module.projectName = paths[3]; - } - - // 补充组合表单-组件声明-命令所在componentId的缺失 - if (this.domServ.module.declarations && this.domServ.module.declarations.commands && - this.domServ.module.declarations.commands.length) { - this.domServ.module.declarations.commands.forEach(command => { - if (command && !command.componentId) { - const pathArray = command.path.split('.'); - if (pathArray.length > 1) { - const viewModelId = pathArray[pathArray.length - 2]; - const cmp = this.domServ.module.components.find(c => c.viewModel === viewModelId); - if (cmp) { - command.componentId = cmp.id; - } - } - - } - }); - } - - // 补充组合表单-组件通讯-参数映射-目标参数所在的路径targetPath - if (this.domServ.module.subscriptions && this.domServ.module.subscriptions.length) { - this.domServ.module.subscriptions.forEach(subscription => { - if (subscription.targetComponent && subscription.paramMappings && subscription.paramMappings.length) { - const targetDeclartion = this.getDeclarationForSubscriptionTarget(subscription); - if (!targetDeclartion) { - return; - } - subscription.paramMappings.forEach(paramMapping => { - if (!paramMapping.targetPath && paramMapping.targetCode && targetDeclartion.states && - targetDeclartion.states.length) { - const targetState = targetDeclartion.states.find(state => state.code === paramMapping.targetCode); - paramMapping.targetPath = targetState.path; - } - }); - } - }); - } - - // 补充页面按钮的配置 - if (!this.domServ.module.toolbar) { - this.domServ.module.toolbar = { - items: {}, - configs: {} - }; - } - // 补充页面展示形式 - if (!this.domServ.module.showType) { - this.domServ.module.showType = 'page'; - } - - // 补充组件声明 - if (!this.domServ.module.declarations) { - this.domServ.module.declarations = { - events: [], - commands: [], - states: [] - }; - } - // 补充组件通讯 - if (!this.domServ.module.subscriptions) { - this.domServ.module.subscriptions = []; - } - // 补充外部模块 - if (!this.domServ.module.extraImports) { - this.domServ.module.extraImports = []; - } - - // 补充表单被组合标识 - // if (!this.domServ.options.hasOwnProperty.call('canBeComposed')) { - // const componentTemplate = ['list-component', 'tree-component', 'list-view-component']; - // this.domServ.options.canBeComposed = componentTemplate.includes(this.domServ.module.templateId); - // } - - } - - private getDeclarationForSubscriptionTarget(subscription: Subscription): FormDeclaration { - let targetComponent; - // 引入的外部表单 - if (this.domServ.module.externalComponents) { - targetComponent = this.domServ.module.externalComponents.find(c => c.id === subscription.targetComponent); - if (targetComponent) { - return targetComponent.declarations; - } - } - // 当前表单 - if (this.formBasicServ && this.formBasicServ.formMetaBasicInfo && - this.formBasicServ.formMetaBasicInfo.code === subscription.targetComponent) { - return this.domServ.module.declarations; - } - } - - /** - * 旧表单增加eapiId。适用于设计时环境 - */ - // private adaptOldSchema() { - // if (this.formBasicServ.envType !== DesignerEnvType.designer) { - // return; - // } - - // const schema = this.domServ.module.schemas[0]; - // if (schema.eapiId && schema.eapiNameSpace) { - // return; - // } - - // const subject = new Subject(); - - // // 1、schema.id 查询VO实体 - // const sessionId = ''; - // this.metadataServ.GetRefMetadata('', schema.id, sessionId).subscribe(data => { - - // if (data) { - // // 设计器自动补充的属性,不记录变更 - // window.suspendChangesOnForm = true; - - // const voMetadataPath = `${data.relativePath}/${data.fileName}`; - - // schema.voPath = data.relativePath; - // schema.voNameSpace = data.nameSpace; - - // // vo发布dll 获取eapiId - // this.http.post('/api/dev/main/v1.0/lookup/publish', '"' + voMetadataPath + '"', { - // headers: new HttpHeaders({ 'Content-Type': 'text/json', SessionId: '' }) - // }).subscribe((res: any) => { - // if (res.success) { - // // 设计器自动补充的属性,不记录变更 - // window.suspendChangesOnForm = true; - - // schema.eapiId = res.content.id; - // schema.eapiCode = res.content.code; - // schema.eapiName = res.content.name; - // schema.eapiNameSpace = this.formBasicServ.formMetaBasicInfo.nameSpace; - - // window.suspendChangesOnForm = false; - // } - - // // TODO 触发保存表单 - // }); - - // window.suspendChangesOnForm = false; - // } - - // }, error => { - // subject.next(); - // }); - - // return subject; - - // } - - /** - * 适配表单配置 - */ - private adaptFormOptions() { - if (!this.domServ.options) { - this.domServ.options = {}; - } - if (!this.domServ.options.hasOwnProperty.call('renderMode')) { - this.domServ.options.renderMode = 'compile'; - } - - if (!this.domServ.options.hasOwnProperty.call('changeSetPolicy')) { - this.domServ.options.changeSetPolicy = 'valid'; - } - - if (!this.domServ.options.hasOwnProperty.call('enableServerSideChangeDetection')) { - this.domServ.options.enableServerSideChangeDetection = false; - } - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/designer-host.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/designer-host.ts deleted file mode 100644 index a926386176576996ffeb10bf661e10302904d921..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/designer-host.ts +++ /dev/null @@ -1,16 +0,0 @@ - -import { IDesignerHost } from '@farris/designer-element'; - -export class DesignerHost extends IDesignerHost { - private desigenrHost = new Map(); - - addService(serviceType: string, service: any) { - - this.desigenrHost.set(serviceType, service); - - } - - getService(serviceType: string) { - return this.desigenrHost.get(serviceType); - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/dom-validation.service.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/dom-validation.service.ts deleted file mode 100644 index 96f8146ee3a7bc5418b4224907574e9580a050ae..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/dom-validation.service.ts +++ /dev/null @@ -1,250 +0,0 @@ -import { DomService, FormComponent, FormComponentType, WebCmdService } from '@farris/designer-services'; -import { MessagerService } from '@farris/ui-messager'; -import { DgControl } from '@farris/designer-ui'; - -/** - * 表单保存前进行DOM结构有效性校验 - */ -export class DomValidtionService { - - /** 表单完整DOM结构 */ - get domJson() { - return this.domService.getDomJson(); - } - - constructor( - private domService: DomService, - private webCmdService: WebCmdService, - private msgService: MessagerService) { - - } - - /** - * 校验当前DOM结构:若返回提示信息,则阻止表单保存 - */ - checkDocumentValidBeforeSaved(): boolean { - - // 移除弹窗容器导入的组件声明中fileName和filePath为空的记录-----这个是以前的bug引起的无效数据 - let externalComponents = this.domService.getExternalComponent(); - externalComponents = externalComponents.filter(comp => { - if (comp.type === DgControl.ModalContainer.type && comp.contentType === 'form' && !comp.fileName && !comp.filePath) { - return false; - } - return true; - }); - - // 校验DOM中viewmodel和component是否一一对应。主要用于手动修改代码编辑器后,导致的编译失败问题 - if (!this.checkComponentAndViewModelCanMatch(this.domService.getDomJson())) { - return false; - } - - // 校验DOM中所有绑定事件是否有效 - if (!this.checkControlEventValid()) { - return false; - } - - // 校验ui控件的配置是否有效 - if (!this.checkUIComponentsValid()) { - return false; - } - // 校验组件声明中的命令是否有效 - if (!this.checkDeclarationCommandValid()) { - return false; - } - // 校验组件声明中的变量是否有效 - if (!this.checkDeclarationStateValid()) { - return false; - } - return true; - } - - /** - * 校验控件绑定的命令是否有效 - */ - private checkControlEventValid(): boolean { - - const components = this.domJson.module.components.filter(c => !c.fakeDel); - const findEvents = []; - - // 普通控件的按钮事件 - let allBoundEvents = this.webCmdService.findBoundEvent(components, findEvents, 'root-viewmodel'); - - // 全局按钮的事件,例如Header、ModalFooter控件上的按钮 - if (this.domService.module.toolbar) { - allBoundEvents = this.webCmdService.findBoundEventInToolbar(this.domService.module.toolbar, allBoundEvents); - } - // 去重 - allBoundEvents = this.webCmdService.getUniqueEvent(allBoundEvents); - - if (allBoundEvents.length) { - for (const boundEvent of allBoundEvents) { - const vm = this.domService.getViewModelById(boundEvent.viewModelId); - let vmCommand; - - if (vm && vm.commands && vm.commands.length) { - vmCommand = vm.commands.find(c => c.code === boundEvent.commandLabel && !c.isInvalid); - } - if (!vmCommand) { - const controlInfo = this.domService.controlBasicInfoMap.get(boundEvent.id); - const controlName = (controlInfo && controlInfo.parentPathName) || boundEvent.id; - const msg = `控件【${controlName}】的【${boundEvent.eventName}】配置的命令已被移除,请重新选择。`; - this.msgService.warning(msg); - return false; - } - } - } - - - return true; - - } - - /** - * 校验控件的配置是否有效 - */ - private checkUIComponentsValid() { - return this.checkTreeGridValidation(); - - } - - /** - * 若树控件所在的组件配置了分层加载的命令,则树控件不支持启用多选 - */ - private checkTreeGridValidation() { - const dataGridCmps = this.domService.components.filter(c => c.componentType === FormComponentType.dataGrid); - if (dataGridCmps && dataGridCmps.length) { - const loadByLevelCmps = dataGridCmps.filter(cmp => { - if (!cmp.onInit) { - return false; - } - const viewmodel = this.domService.getViewModelById(cmp.viewModel); - if (!viewmodel || !viewmodel.commands || !viewmodel.commands.length) { - return false; - } - const loadByLevelCommand = viewmodel.commands.find(command => command.code === cmp.onInit && command.handlerName === 'LoadByLevel'); - if (loadByLevelCommand) { - return true; - } - return false; - }); - - if (loadByLevelCmps && loadByLevelCmps.length) { - const treeGridWithMultiSelect = loadByLevelCmps.filter(c => this.domService.selectNode(c, item => item.type === DgControl.TreeGrid.type && item.multiSelect)); - if (treeGridWithMultiSelect.length) { - this.msgService.warning('分层加载树勾选时无法勾选下级,请使用完全加载树或禁用多选!'); - return false; - - } - } - } - return true; - } - - /** - * 校验DOM中viewmodel和component是否一一对应。主要用于手动修改代码编辑器后,导致的编译失败问题 - */ - checkComponentAndViewModelCanMatch(domJson: any) { - if (!domJson.module) { - return true; - } - const { components, viewmodels } = domJson.module; - const cmpIdList = []; - for (const cmp of components) { - if (cmpIdList.includes(cmp.id)) { - this.msgService.showHtmlMsg('warning', '表单DOM结构错误', `id为【${cmp.id}】的component节点重复,请在代码编辑器中检查。`); - return; - } - cmpIdList.push(cmp.id); - const targetVM = viewmodels.find(vm => vm.id === cmp.viewModel); - if (!targetVM) { - this.msgService.showHtmlMsg('warning', '表单DOM结构错误', `id为【${cmp.id}】的component节点没有对应的viewmodel节点,请在代码编辑器中检查。`); - return false; - } - } - - const vmIdList = []; - for (const vm of viewmodels) { - if (vmIdList.includes(vm.id)) { - this.msgService.showHtmlMsg('warning', '表单DOM结构错误', `id为【${vm.id}】的viewmodel节点重复,请在代码编辑器中检查。`); - return; - } - vmIdList.push(vm.id); - const targetCmp = components.find(cmp => cmp.viewModel === vm.id); - if (!targetCmp) { - this.msgService.showHtmlMsg('warning', '表单DOM结构错误', `id为【${vm.id}】的viewmodel节点没有对应的component节点,请在代码编辑器中检查。`); - return false; - } - - } - - return true; - } - - /** - * 校验组件声明中的命令是否有效 - */ - private checkDeclarationCommandValid(): boolean { - const declarations = this.domJson.module.declarations; - if (!declarations) { - return true; - } - const commands = declarations.commands || []; - if (!commands.length) { - return true; - } - - for (const commandItem of commands) { - const { name, command, path } = commandItem; - if (name && command && path) { - const pathArray = path.split('.'); - if (pathArray.length >= 2) { - const viewModelId = pathArray[pathArray.length - 2]; - - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel || !viewModel.commands || !viewModel.commands.length || !viewModel.commands.find(co => co.code === command)) { - const msg = `组件声明中的命令【${name}】已失效,请重新选择。`; - this.msgService.warning(msg); - return false; - } - } - } - - } - - return true; - } - - /** - * 校验组件声明中的变量是否有效 - */ - private checkDeclarationStateValid(): boolean { - const declarations = this.domJson.module.declarations; - if (!declarations) { - return true; - } - const states = declarations.states || []; - if (!states.length) { - return true; - } - - for (const stateItem of states) { - const { name, state, path } = stateItem; - if (name && state && path) { - const pathArray = path.split('.'); - if (pathArray.length >= 2) { - const viewModelId = pathArray[pathArray.length - 2]; - - const viewModel = this.domService.getViewModelById(viewModelId); - if (!viewModel || !viewModel.states || !viewModel.states.length || !viewModel.states.find(co => co.code === state)) { - const msg = `组件声明中的变量【${name}】已失效,请重新选择。`; - this.msgService.warning(msg); - return false; - } - } - } - } - - return true; - } -} - diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/template-outline.service.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/template-outline.service.ts deleted file mode 100644 index 1b727ddf55ffe3308ad13d87128cc99d06637c4f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-designer/service/template-outline.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { DomService } from '@farris/designer-services'; - -export class TemplateOutlineSchemaService { - - constructor( - private http: HttpClient, - private domService: DomService - ) { - - } - - /** - * 获取当前模板schema - * @param type 控件类型 - */ - getTemplateSchema() { - const domModule = this.domService.module; - try { - this.http.get('assets/form/template-schema/' + domModule.templateId + '.json?version=0.0.1').subscribe((data) => { - if (data && data.length) { - this.domService.templateOutlineSchema = data; - } - }, () => { - // console.log('获取模板大纲schema失败,模板ID:' + this.domService.module.templateId); - }); - } catch (e) { } - - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.css b/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.css deleted file mode 100644 index e333fe524c085e553f2e2d3492b9618fc9b84f59..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.css +++ /dev/null @@ -1,100 +0,0 @@ -:host { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - user-select: none; -} - -.formEditor { - width: 100%; - height: 100%; - overflow: hidden; -} - -.formEditor .mainContent { - overflow: auto; -} - -.formEditor .toolbar { - font-size: 13px; - background: #fff; - display: flex; - min-height: 40px; - align-items: center; -} - -.formEditor .toolbar .disable { - color: #9ca5ad; -} - -.formEditor .viewTypePanel { - padding: 2px; - background: #F0F3F9; - border-radius: 5px; - margin-right: 15px; - margin-top: 5px; - margin-bottom: 5px; - display: flex; - margin-left: 17px; - height: 28px; - min-width: 145px; - cursor: pointer; - color: #8DA3CE; - align-self: center; -} - -.formEditor .viewTypePanel>div { - background: #F4F5F9; - display: flex; - text-align: center; - align-items: center; - padding: 0 8px; - border-radius: 4px; -} - -.formEditor .viewTypePanel>div.active { - color: #5B89FE; - background: #fff; - box-shadow: 0 0 4px 0 rgb(161 179 255 / 37%); -} - -.formEditor .viewTypePanel>div>div { - margin: 0 auto; - display: flex; -} - -.formEditor .viewTypePanel>div>div span { - width: 18px; - height: 15px; - margin-right: 4px; -} - -.formEditor .showTypePanel { - padding: 0px 20px; - height: 30px; - align-self: center; - font-size: 14px; - color: #000; - min-width: 210px; - /* min-width: 150px; */ -} - -.formEditor .showTypePanel .showTypeItem { - padding: 0 10px; - cursor: pointer; -} - -.formEditor .showTypePanel .showTypeItem>div { - padding: 4px 4px 9px 4px; -} - -.formEditor .showTypePanel .showTypeItem>div.active { - border-bottom: 2px solid #2A87FF; - color: #5B89FE; -} - -.formEditor>>>.dropdown-menu.show { - z-index: 1000; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.html b/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.html deleted file mode 100644 index 57244255c3f722a04b3acfd6161f88dc70e01d18..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.html +++ /dev/null @@ -1,51 +0,0 @@ -
    -
    - - - - - -
    - -
    -
    页面
    -
    - -
    -
    模型
    -
    -
    -
    配置
    -
    - -
    - - - - - - -
    - -
    - -
    -
    - -
    -
    - -
    -
    diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.ts deleted file mode 100644 index fd60891ab21a0ec24e863ea15aacb7d42715e956..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.component.ts +++ /dev/null @@ -1,716 +0,0 @@ -/* eslint-disable @typescript-eslint/indent */ -/* eslint-disable no-restricted-syntax */ -import { Component, ComponentFactoryResolver, EventEmitter, Injector, Output, ViewChild } from '@angular/core'; -import { NotifyService } from '@farris/ui-notify'; -import { ItemCollectionEditorComponent } from '@farris/designer-devkit'; -import { FormDesignerComponent } from './form-designer/form-designer.component'; -// import { FormMetadataService } from './service/form-metadata.service'; -import { LoadingComponent, LoadingService } from '@farris/ui-loading'; -import { MessagerService } from '@farris/ui-messager'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; -import { BsModalService } from '@farris/ui-modal'; -import { Observable, of, Subject } from 'rxjs'; -import { DgControl, MultiViewManageService } from '@farris/designer-ui'; -import { map } from 'rxjs/operators'; -// import { FormProcessService } from './service/form-process.service'; -import { - DomService, FormBasicService, StateMachineService, DataStatesService, WebCmdService, FarrisMetadataService -} from '@farris/designer-services'; -import { TemplateOutlineSchemaService } from './form-designer/service/template-outline.service'; -import { HttpClient } from '@angular/common/http'; - -// import { CmpExportComponent } from './toolbar/cmp-export/cmp-export.component'; -// import { EventCommunicationComponent } from './toolbar/event-communication/event-communication.component'; -import { VmDesignerComponent } from './vm-designer/vm-designer.component'; -// import { FormSaveAsComponent } from './toolbar/form-save-as-dialog/form-save-as.component'; -// import { PublishMenuComponent } from './toolbar/publish-menu/publish-menu.component'; -import { BOTTOM_TAB_TYPE } from './form-designer/entity/form-designer-entity'; -import { DesignerMetadataService } from './service/designer-metadata.service'; - -@Component({ - selector: 'webide-form-editor', - templateUrl: './form-editor.component.html', - styleUrls: ['./form-editor.component.css'], - providers: [DesignerMetadataService] -}) -export class FormEditorComponent { - - /** 切换设计器/代码视图 */ - @Output() switchView = new EventEmitter(); - - @Output() formSavedEmiiter = new EventEmitter(); - - @ViewChild(FormDesignerComponent) private formDesigner: FormDesignerComponent; - // @ViewChild(FormSaveAsComponent) private formSaveAsComponent: FormSaveAsComponent; - - @ViewChild('vmDesigner') private vmDesignerComponent: VmDesignerComponent; - - // private metadaService: FormMetadataService; - - /** 当前展示视图:页面(formDesigner)、实体(entityDesigner) */ - showDesignerType = 'formDesigner'; - - public designerToolbarItems = []; - - private iFrameTabId: string; - - constructor( - public injector: Injector, - private notifyService: NotifyService, - private domService: DomService, - private modalService: BsModalService, - private loadingService: LoadingService, - private msgService: MessagerService, - public formBasicService: FormBasicService, - private resolver: ComponentFactoryResolver, - private stateMachineService: StateMachineService, - private dataStatesService: DataStatesService, - private webCmdService: WebCmdService, - private http: HttpClient, - private multiViewManageService: MultiViewManageService, - private metadaService: DesignerMetadataService - ) { - // 设置元数据未修改标识 - // this.iFrameTabId = gsp.ide.getParam('id'); - // if (gsp.ide && gsp.ide.setDesignerStatus) { - // gsp.ide.setDesignerStatus(this.iFrameTabId, false); - // } - - // 设计器未渲染完毕,不监听DOM变更 - window.suspendChangesOnForm = true; - window.isFormMetadataChanged = false; - - this.metadaService.getFormMetadata().subscribe(domJson => { - - /** 渲染设计器 */ - this.formDesigner.render(domJson); - - // 状态机集成 - this.stateMachineService.initStateMachineMetaData(); - - this.dataStatesService.getDomJson(domJson); - - this.initForm(); - }); - - // 执行完毕加载进行事件订阅 不可延迟注册 因为框架是在界面打开就进行了注册 - // this.subscribeFormSaveCommand(); - - } - - /** - * 表单加载后注册 因为框架是在界面打开就进行了注册 - * 如果元数据未加载完毕,那么需要增加元数据加载完毕标识,未加载完毕不执行保存动作 - */ - // private subscribeFormSaveCommand() { - - // const eventName = 'ideSave:' + this.iFrameTabId; - - // gsp.eventBus.on(null, this.iFrameTabId, eventName, null, (value) => { - - // // 执行当前表单的保存 - // this.saveFormMetadata(null, true).subscribe((result) => { - // // 保存成功 - // if (result.success) { - // // 触发代码视图的保存 - // window.saveFormAndCodeView = true; - // this.formSavedEmiiter.emit(); - // } - // }); - // }); - // } - - initForm() { - - this.multiViewManageService.newCrosstabViewIds = []; - - // 获取当前表单所属的模板大纲结构 - const templateOutlineSchemaService = new TemplateOutlineSchemaService(this.http, this.domService); - templateOutlineSchemaService.getTemplateSchema(); - this.initDesignerToolbarItems(); - } - - /** - * 初始工具栏配置 - */ - private initDesignerToolbarItems() { - this.designerToolbarItems = [ - // { - // id: 'btn-save', - // text: '保存', - // class: 'btn-primary', - // isDP: true, - // split: true, - // children: [ - // { - // id: 'btn-saveAs', - // text: '另存为' - // } - // ] - // }, - { - id: 'btn-compileAndPreview', - text: '调试' - }, - // { - // id: 'btn-run', - // text: '运行', - // isDP: true, - // split: true, - // children: [ - // { - // id: 'btn-compileAndPreview', - // text: '调试' - // } - // ] - // }, - // { - // id: 'btn-zuhe', - // text: '组合表单', - // isDP: true, - // children: [ - // { - // id: 'btn-addExport', - // text: '组件声明' - // }, - // { - // id: 'btn-eventCommunication', - // text: '组件通讯' - // } - // ] - // }, - // { - // id: 'btn-showExtraModule', - // text: '外部模块' - // }, - // { - // id: 'btn-publishMenu', - // text: '发布菜单' - // }, - // { - // id: 'btn-publishWorkflow', - // text: '发布到工作流' - // } - ]; - } - - /** - * 工具栏点击事件 - */ - public designerrToolbarClickHandler(args: any) { - // switch (args.id) { - // // case 'btn-save': { - // // this.saveForm(); - // // break; - // // } - // // // 运行 - // // case 'btn-run': { - // // this.runForm(); - // // break; - // // } - // // 解析调试 - // case 'btn-compileAndPreview': { - // this.dynamicPreview(); - // break; - // } - // // case 'btn-addExport': { - // // this.addExport(); - // // break; - // // } - // // case 'btn-eventCommunication': { - // // this.eventCommunication(); - // // break; - // // } - // // case 'btn-showExtraModule': { - // // this.showExtraModule(); - // // break; - // // } - // // case 'btn-publishMenu': { - // // this.publishMenu(); - // // break; - // // } - // // case 'btn-publishWorkflow': { - // // this.publishWorkflow(); - // // break; - // // } - - // } - } - - /** - * 切换显示类型 - */ - onChangeShowDesigner(type: string) { - // 从页面切换到其他页签时,先确保应用代码编辑器的内容 - if (type !== 'formDesigner' && this.showDesignerType === 'formDesigner') { - this.formDesigner.changeBottomBar(BOTTOM_TAB_TYPE.formDesigner); - } - - // 切换到模型时,触发模型页面的数据刷新 - if (type === 'vmDesigner' && this.vmDesignerComponent) { - this.vmDesignerComponent.refreshVmDesigner(); - } - - // 从模型切换到页面时,触发命令刷新,以便于交互面板获取最新构件和命令 - if (type === 'formDesigner' && this.showDesignerType === 'vmDesigner') { - this.webCmdService.checkCommands(); - this.formDesigner.updatePropertyPanelAfterModelChanged(); - } - - this.showDesignerType = type; - } - - /** - * 代码视图切换时刷新 - */ - refreshWebCmdAfterCodeViewSaved() { - this.webCmdService.checkCommands().subscribe(data => { - this.formDesigner.updatePropertyPanelAfterModelChanged(); - }); - } - - /** - * 保存表单 - */ - // saveForm() { - - // const loading = this.loadingService.show({ container: 'body', message: '保存中,请稍候...' }); - - // this.saveFormMetadata(loading).subscribe(result => { - // if (result && result.success) { - // this.notifyService.success('表单保存成功!'); - // } else { - // loading.close(); - // } - // }, () => { - // this.notifyService.error('表单保存失败!'); - // loading.close(); - // }); - // } - - // /** - // * 校验并保存表单元数据 - // * @param showNotify 是否保存时显示进度提示 - // */ - // private saveFormMetadata(loading?: LoadingComponent, showNotify = true): Observable<{ success: boolean; message?: string }> { - // const subject = new Subject<{ success: boolean; message?: string }>(); - - // const isValid = this.formDesigner.prepareBeforeFormSaved(); - // if (!isValid) { - // return of({ success: false }); - // } - - // const domJson = this.domService.getDomJson(); - // this.metadaService.saveFormData(domJson).subscribe(() => { - // this.multiViewManageService.addVOActionsForCrosstabView(); - - // if (gsp.ide && gsp.ide.setDesignerStatus) { - // window.isFormMetadataChanged = false; - - // const changes = window.isFormCodeViewChanged || window.isFormMetadataChanged; - // gsp.ide.setDesignerStatus(this.iFrameTabId, changes); - // } - - // subject.next({ success: true, message: '' }); - // if (loading) { - // loading.close(); - // } - - // }, error => { - // const errorMessageResult = this.handleErrorMessage(error, '表单保存失败!', showNotify); - // subject.next({ success: false, message: errorMessageResult.message }); - - // if (loading) { - // loading.close(); - // } - // }); - - // return subject; - // } - - // /** - // * 截取保存表单的错误提示 - // */ - // private handleErrorMessage(error, notifyMsg: string, showNotify = true) { - // const extractedResult = this.extractErrorMessage(error, notifyMsg); - // if (showNotify) { - // if (extractedResult.useDefault) { - // this.notifyService.error(extractedResult.message); - // } else { - // const modalOptions = { - // title: '错误提示', - // showMaxButton: false, - // safeHtml: false - // }; - // this.msgService.show('error', extractedResult.message, modalOptions); - // } - // } - // return extractedResult; - // } - - // /** - // * 提取error的参数信息 - // */ - // private extractErrorMessage(error, defaultNotifyMsg): { - // message: string; - // useDefault: boolean; - // } { - // if (error && error._body) { - // if (error._body) { - // const befErrorToken = '#GSPBefError#'; - // const befMsg = JSON.parse(error._body).Message; - // if (befMsg && befMsg.includes(befErrorToken)) { - // const message = befMsg.split(befErrorToken); - // const errorMessage = message[1]; - // return { - // message: errorMessage, - // useDefault: false - // }; - // } - // } - // if (error.error) { - // return { - // message: error.error.message, - // useDefault: false - // }; - // } - // } - // if (error && error.error && error.error.Message) { - // return { - // message: error.error.Message, - // useDefault: false - // }; - // } - // return { - // message: defaultNotifyMsg, - // useDefault: true - // }; - - // } - - // /** - // * 另存为 - // */ - // saveFormAs() { - // if (this.domService.module.isComposedFrm) { - // this.notifyService.warning('暂不支持组合表单另存为'); - // return; - // } - // const self = this; - - // self.formSaveAsComponent.show(); - // } - - // /** - // * 配置外部模块 - // */ - // manageExtraModule() { - // const compFactory = this.resolver.resolveComponentFactory(ItemCollectionEditorComponent); - // const compRef = compFactory.create(this.injector); - // compRef.instance.editorParams = { - // modalTitle: '外部模块', - // columns: [ - // { field: 'name', title: '模块名称', editor: { type: EditorTypes.TEXTBOX } }, - // { field: 'path', title: '模块路径', editor: { type: EditorTypes.TEXTBOX } } - // ], - // requiredFields: ['name', 'path'], - // uniqueFields: ['name', 'path'], - // canEmpty: true - // }; - // const modalConfig = { - // title: '外部模块', - // width: 900, - // height: 500, - // showButtons: true, - // buttons: compRef.instance.modalFooter - // }; - // compRef.instance.value = this.domService.extraImports || []; - - // const modalPanel = this.modalService.show(compRef, modalConfig); - // compRef.instance.closeModal.subscribe(() => { - // modalPanel.close(); - // }); - - // compRef.instance.submitModal.subscribe((data) => { - // if (data) { - // this.domService.extraImports = data.value; - // modalPanel.close(); - // } - // }); - // } - - // /** - // * 运行:先保存再运行 - // */ - // runForm() { - // const loading = this.loadingService.show({ container: 'body' }); - // this.saveFormMetadata().subscribe(saveResult => { - // if (!saveResult.success) { - // loading.close(); - // return; - // } - // this.metadaService.getServerInfo().subscribe(serverInfo => { - // const serverIP = this.metadaService.getServerIP(serverInfo); - // if (serverIP === null) { - // loading.close(); - // return; - // } - // this.metadaService.getFormRoute().subscribe(data => { - // if (data) { - // const pageFlowRoute = data.slice(data.lastIndexOf('#') + 1, data.length); - // if (!pageFlowRoute) { - // this.notifyService.error('获取路由为空,请检查是否配置页面流!'); - // } else { - // serverIP === '' ? - // window.open(serverIP + '/platform/common/web/debug/index.html?url=' + data) : - // window.open(serverIP + '&redUrl=' + encodeURIComponent(data)); - // } - // } else { - // this.notifyService.error('获取路由为空!'); - // } - // loading.close(); - // }, error => { - // loading.close(); - // this.handleErrorMessage(error, '表单运行失败!'); - // }); - // }, error => { - // loading.close(); - // this.handleErrorMessage(error, '获取运行环境失败!'); - // }); - - // }); - - // } - - /** - * 解析型预览 - */ - // private dynamicPreview() { - // const isUnSupportedMsg = this.checkUnSupportedControlsForDynamicPreview(); - // if (isUnSupportedMsg) { - // this.notifyService.warning(isUnSupportedMsg); - // return; - // } - // const loading = this.loadingService.show({ container: 'body', message: '解析中,请稍候...' }); - // // 先保存 - // this.saveFormMetadata().subscribe(saveResult => { - // if (!saveResult.success) { - // loading.close(); - // return; - // } - // this.metadaService.interpretationPreviewGenerate().subscribe((data: any) => { - - // if (data) { - // const { code, message } = data; - // if (code === 1) { - // loading.close(); - - // const metadataPath = gsp.ide.getParam('id'); - // window.open('/platform/common/web/farris-render-preview/index.html#/?ispreviewmode=true&url=' + metadataPath); - // } else { - // const modalOptions = { - // title: '调试失败', - // showMaxButton: false, - // safeHtml: false - // }; - // this.msgService.show('error', message || '', modalOptions); - // loading.close(); - - // } - // } else { - // this.notifyService.error('调试失败'); - // loading.close(); - - // } - - // }, () => { - // this.notifyService.error('调试失败'); - // loading.close(); - // }); - - // }); - - // } - - // /** - // * 校验解析调试不支持的场景,并给出提示信息 - // */ - // private checkUnSupportedControlsForDynamicPreview() { - - // // 暂不支持qdp类模板 - // if (this.domService.module.qdpInfo) { - // return `暂不支持调试查询类表单`; - // } - // // 暂不支持多视图、滚动监听、侧边栏、多语输入框 - // const unSupportedControls = [ - // DgControl.MultiViewContainer.type, DgControl.Scrollspy.type, - // DgControl.Sidebar.type, DgControl.LanguageTextBox.type - // ]; - - // for (const cmp of this.domService.components) { - // const control = this.domService.selectNode(cmp, item => unSupportedControls.includes(item.type)); - // if (control) { - // return `暂不支持调试${DgControl[control.type].name}表单`; - // } - - // if (cmp.componentType === 'dataGrid') { - // const grid = this.domService.selectNode(cmp, item => item.type === DgControl.DataGrid.type); - - // if (grid && grid.fields) { - // if (JSON.stringify(grid.fields).includes(DgControl.LanguageTextBox.type)) { - // return `暂不支持调试${DgControl.LanguageTextBox.name}表单`; - // } - // } - // } - // } - - // } - - // /** - // * 发布菜单 - // */ - // publishMenu() { - // const loading = this.loadingService.show({ container: 'body' }); - // // 先保存,再发布 - // this.saveFormMetadata().subscribe(saveResult => { - // loading.close(); - - // if (!saveResult.success) { - // return; - // } - - // const compFactory = this.resolver.resolveComponentFactory(PublishMenuComponent); - // const compRef = compFactory.create(this.injector); - - // const modalConfig = { - // title: '发布菜单', - // width: 600, - // height: 520, - // showButtons: true, - // buttons: compRef.instance.modalFooter - // }; - // this.metadaService.getFormRoute().pipe( - // map(str => str.split('#')[0] + 'index.html') - // ).subscribe(path => { - // compRef.instance.publishPath = path; - - // const modalPanel = this.modalService.show(compRef, modalConfig); - // compRef.instance.closeModal.subscribe(() => { - // modalPanel.close(); - // }); - - // compRef.instance.submitModal.subscribe((data) => { - // if (data) { - // modalPanel.close(); - // } - // }); - // }, () => { - // this.notifyService.error('获取路由信息失败!'); - // }); - // }); - - // } - - // /** - // * 组件声明:添加导出事件、uistate - // */ - // addExport() { - // const compFactory = this.resolver.resolveComponentFactory(CmpExportComponent); - // const compRef = compFactory.create(this.injector); - - // const modalConfig = { - // title: '组件声明', - // width: 950, - // height: 600, - // resizable: false, - // buttons: compRef.instance.btns - // }; - // const modalPanel = this.modalService.show(compRef, modalConfig); - // compRef.instance.closeModal.subscribe(() => { - // modalPanel.close(); - // }); - // } - - // /** - // * 事件通讯 - // */ - // eventCommunication() { - // const compFactory = this.resolver.resolveComponentFactory(EventCommunicationComponent); - // const compRef = compFactory.create(this.injector); - - // const modalConfig = { - // title: '组件通讯', - // width: 950, - // height: 600, - // showButtons: true, - // buttons: compRef.instance.btns - // }; - // const modalPanel = this.modalService.show(compRef, modalConfig); - // compRef.instance.closeModal.subscribe(() => { - // modalPanel.close(); - // }); - // } - - // /** - // * 发布工作流 - // */ - // publishWorkflow() { - // const loading = this.loadingService.show({ container: 'body' }); - // // 先保存,再发布 - // this.saveFormMetadata().subscribe(saveResult => { - // loading.close(); - - // if (!saveResult.success) { - // return; - // } - // const wfService = new FormProcessService(this.injector); - // wfService.publish(); - // }); - - // } - - // /** - // * 切换到代码视图 - // */ - // onClickCodeEditor() { - // this.switchView.emit(); - // } - - // /** - // * 引入外部模块 - // */ - // showExtraModule() { - // const compFactory = this.resolver.resolveComponentFactory(ItemCollectionEditorComponent); - // const compRef = compFactory.create(this.injector); - // compRef.instance.editorParams = { - // modalTitle: '外部模块', - // columns: [ - // { field: 'name', title: '模块名称', editor: { type: EditorTypes.TEXTBOX } }, - // { field: 'path', title: '模块路径', editor: { type: EditorTypes.TEXTBOX } } - // ], - // requiredFields: ['name', 'path'], - // uniqueFields: ['name', 'path'], - // canEmpty: true - // }; - // const modalConfig = { - // title: '外部模块', - // width: 900, - // height: 500, - // showButtons: true, - // buttons: compRef.instance.modalFooter - // }; - // compRef.instance.value = this.domService.extraImports || []; - - // const modalPanel = this.modalService.show(compRef, modalConfig); - // compRef.instance.closeModal.subscribe(() => { - // modalPanel.close(); - // }); - - // compRef.instance.submitModal.subscribe((data) => { - // if (data) { - // this.domService.extraImports = data.value; - // modalPanel.close(); - // } - // }); - // } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.module.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-editor.module.ts deleted file mode 100644 index 9d3415cfbe47cbd6a3cc5fff256a6f305c1c1783..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-editor.module.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -// import { CacheService } from '@farris/ide-devkit'; -import { FarrisDesignerDevkitModule } from '@farris/designer-devkit'; -import { FarrisDesignerUIModule } from '@farris/designer-ui'; -import { FormDesignerComponent } from './form-designer/form-designer.component'; -import { PropertyPanelModule } from '@farris/ide-property-panel'; -import { SplitterModule } from '@farris/ui-splitter'; -import { ClassEditorComponent } from './form-designer/panels/class-editor/class-editor.component'; -import { FormSettingsComponent } from './form-settings/form-settings.component'; -import { LoadingService, LoadingModule } from '@farris/ui-loading'; -import { SwitchModule } from '@farris/ui-switch'; -import { FAreaResponseModule } from '@farris/ui-area-response'; -import { AngularDraggableModule } from '@farris/ui-draggable'; -import { TreeTableModule } from '@farris/ui-treetable'; -// import { GSPMetadataServiceModule } from '@gsp-lcm/metadata-selector'; -import { environment } from '../../environments/environment'; -import { MessagerModule } from '@farris/ui-messager'; -import { FormEditorComponent } from './form-editor.component'; -import { FarrisTabsModule } from '@farris/ui-tabs'; -import { DatagridModule } from '@farris/ui-datagrid'; -// import { CmpExportModule } from './toolbar/cmp-export/cmp-export.module'; -// import { EventCommunicationComponent } from './toolbar/event-communication/event-communication.component'; -import { VMDesignerModule } from './vm-designer/vm-designer.module'; -import { FResponseToolbarModule } from '@farris/ui-response-toolbar'; -// import { IDEPublishMenuModule } from './toolbar/publish-menu/publish-menu.module'; -import { ComboListModule } from '@farris/ui-combo-list'; -import { FarrisFormsModule } from '@farris/ui-forms'; -import { FarrisMetadataService } from '@farris/designer-services'; -import { DesignerMetadataService } from './service/designer-metadata.service'; - -@NgModule({ - - declarations: [ - FormEditorComponent, - FormDesignerComponent, - ClassEditorComponent, - FormSettingsComponent, - // EventCommunicationComponent - ], - imports: [ - BrowserModule, - CommonModule, - FormsModule, - PropertyPanelModule, - AngularDraggableModule, - SplitterModule, - SwitchModule, - LoadingModule.forRoot({ - message: '加载中,请稍候...' - }), - TreeTableModule, - FAreaResponseModule, - FarrisDesignerDevkitModule, - FarrisDesignerUIModule, - // GSPMetadataServiceModule.forRoot(environment.SERVER_IP), - MessagerModule, - FarrisTabsModule, - DatagridModule, - // CmpExportModule, - VMDesignerModule, - FResponseToolbarModule, - ComboListModule, - // IDEPublishMenuModule, - FarrisFormsModule - ], - providers: [ - LoadingService, - { provide: FarrisMetadataService, useClass: DesignerMetadataService } - // { provide: CacheService, useValue: gsp.cache } - ], - bootstrap: [FormEditorComponent], - exports: [FormEditorComponent], - entryComponents: [ - // EventCommunicationComponent - ], -}) -export class FormEditorModule { } diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.css b/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.css deleted file mode 100644 index 756bb605f3981aa27ebefe78a8d556f578f580bb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.css +++ /dev/null @@ -1,37 +0,0 @@ -:host { - padding: 20px 15px; - display: block; - background: rgb(248, 249, 251); - height: 100%; - overflow: auto; -} - -:host>div { - width: 70%; - margin: 0 auto; -} - -.optionPanel { - box-shadow: 0 0 10px 0 #eceff4; - border-radius: 5px; - background: #fff; - padding: 8px 14px; -} - -.optionPanel .f-section-header { - margin: 0 0 4px; -} - -.optionPanel .col-form-label { - justify-content: start !important; - width: auto; -} - -.optionPanel .badge { - padding: .25rem .5rem; -} - - -.optionPanel .text-muted { - color: #969ba5 !important; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.html b/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.html deleted file mode 100644 index 2b75a7a4db5172fd6688ad3845a25b21b9020a01..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.html +++ /dev/null @@ -1,155 +0,0 @@ -
    - - -
    -
    -
    -

    静态文本

    -
    -
    - 启用静态文本后输入类控件在只读状态下仅展示文本信息。 -
    -
    - -
    - -
    - 刷新表单 -
    -
    -
    - -
    -
    -
    -

    复用会话

    -
    -
    - 在组合表单的使用场景中开启该设置后,多个表单可以共用一个会话。 -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    -

    数据类型转换

    -
    -
    - 启用数据类型转换后,表单变量和VO变量会被转换为对应的数据类型。 -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    -

    变更集提交策略

    -
    -
    - 变更提交策略是指表单数据发生变化时前端往后端提交变更集的策略。 - 仅合法变更策略是指仅提交校验通过的变更项,适用于大部分场景。全部变更策略是指提交所有数据变化到后端,适用于暂存场景。 -
    -
    - - - -
    -
    -
    - -
    -
    -
    -

    服务器端变更检查

    -
    -
    - 菜单或应用关闭前及取消变更时调用后端接口确认后端缓存中的数据是否已经保存并提示用户。 - 该特性依赖HasChanges接口,请确认已在Api接口文档中添加。 -
    -
    - -
    - -
    -
    -
    -
    - - - - -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.ts deleted file mode 100644 index 3f52524c7541ee5e6797c5f0351592223660b688..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/form-settings/form-settings.component.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { MessagerService } from '@farris/ui-messager'; -import { NotifyService } from '@farris/ui-notify'; -import { DgControl } from '@farris/designer-ui'; -import { DomService, FormBasicService, FormViewModel } from '@farris/designer-services'; - -@Component({ - selector: 'app-form-settings', - templateUrl: './form-settings.component.html', - styleUrls: ['./form-settings.component.css'] -}) -export class FormSettingsComponent implements OnInit { - options; - - // 支持静态文本属性的控件 - inputControlWithTextArea = [ - DgControl.TextBox.type, DgControl.MultiTextBox.type, - DgControl.NumericBox.type, DgControl.DateBox.type, - DgControl.LookupEdit.type, DgControl.EnumField.type, - DgControl.TimePicker.type, DgControl.LanguageTextBox.type, - DgControl.InputGroup.type, DgControl.Avatar.type, - DgControl.NumberRange.type, DgControl.TimeSpinner.type, - DgControl.RichTextBox.type, - DgControl.PersonnelSelector.type, DgControl.OrganizationSelector.type - ]; - - /** 表单渲染方式 */ - public renderModes = [{ value: 'compile', name: '编译' }, { value: 'dynamic', name: '动态渲染' }]; - - public rootViewModel: FormViewModel; - - /** 变更集提交策略 */ - public changeSetPolicyList = [{ value: 'valid', name: '仅合法变更' }, { value: 'entire', name: '全部变更' }]; - - /** 是否为组件类模板 */ - public isComponentTemplate = false; - - constructor( - private domServ: DomService, - private notifyServ: NotifyService, - private msgServ: MessagerService, - public formBasicServ: FormBasicService) { } - - ngOnInit() { - this.options = this.domServ.options; - this.rootViewModel = this.domServ.module.viewmodels.find(v => !v.parent); - - this.isComponentTemplate = ['list-component', 'tree-component', 'list-view-component'].includes(this.domServ.module.templateId); - } - - /** - * 刷新静态文本 - */ - refreshInputTextArea() { - - const status = this.options.enableTextArea ? '启用' : '关闭'; - this.msgServ.question('输入类控件将' + status + '静态文本属性,确定刷新?', () => { - this.domServ.components.forEach(cmp => { - if (cmp.componentType && cmp.componentType.startsWith('form')) { - this.changeInputTextArea(cmp); - } - }); - this.notifyServ.success('刷新成功'); - }); - } - - /** - * 修改卡片组件内输入控件的静态文本属性 - */ - private changeInputTextArea(domJson: any) { - - if (this.inputControlWithTextArea.includes(domJson.type)) { - domJson.isTextArea = this.options.enableTextArea; - return; - } - if (domJson.contents) { - for (const content of domJson.contents) { - this.changeInputTextArea(content); - } - } - } - -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/service/designer-metadata.service.ts b/packages/designer/projects/form-designer/src/app/form-editor/service/designer-metadata.service.ts deleted file mode 100644 index 660b57159747b0dd855a48b859772b6784fa1800..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/service/designer-metadata.service.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Injectable, Injector } from '@angular/core'; -import { Observable, of, Subject } from 'rxjs'; -import { FormBasicService, FarrisMetadataService, FarrisMetadataDto, DesignerEnvType } from '@farris/designer-services'; -import { HttpClient } from '@angular/common/http'; -import { omit } from 'lodash-es'; -import { delay } from 'rxjs/operators'; - -/** -* 开源环境通用的获取元数据、保存元数据的服务 -*/ -@Injectable() -export class DesignerMetadataService implements FarrisMetadataService { - - constructor(private http: HttpClient, private injector: Injector) { } - - getMetadata(metadataId: string): Observable { - return this.http.get(`assets/metadata/${metadataId}.json`); - } - - // saveMetadata(metadataDto: FarrisMetadataDto): Observable { - // const sessionId = ''; - - // return this.metadataServ.SaveMetadata(metadataDto, sessionId); - // } - - getFormMetadata(): Observable { - const subject = new Subject(); - const formBasicServ = this.injector.get(FormBasicService); - formBasicServ.envType = DesignerEnvType.designer; - const metadataId = this.getQueryVariable('metadataId'); - this.http.get(`assets/metadata/${metadataId}.json`).subscribe((data: FarrisMetadataDto) => { - formBasicServ.formMetaBasicInfo = omit(data, 'content') as FarrisMetadataDto; - - // 兼容Contents 为string和object两种类型的表单 - let domJson = JSON.parse(data.content).Contents; - if (typeof (domJson) === 'string') { - domJson = JSON.parse(domJson); - } - subject.next(domJson); - }); - - return subject; - - } - - getMetadataList(typeName: string): Observable { - // const relativePath = this.formBasicServ.formMetaBasicInfo.relativePath; - // return this.metadataService.getMetadataList(relativePath, typeName); - // const subject = new Subject(); - - // subject.de - - return of([]).pipe(delay(300)); - } - - // validateRepeatName(relativePath: string, fileName: string): Subject { - // return this.metadataService.ValidateRepeatName(relativePath, fileName); - // } - - /** - * 获取url参数 - * @param variable 参数编号 - */ - private getQueryVariable(variable) { - - const query = window.location.href.substring(window.location.href.indexOf('?') + 1); - const vars = query.split('&'); - let targetVariable; - vars.some(v => { - const pair = v.split('='); - if (pair[0] === variable) { targetVariable = pair[1]; return true; } - }); - - return targetVariable; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.html b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.html deleted file mode 100644 index c2a70591ec6c8a5a60a6d207a48e806825a55bea..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.html +++ /dev/null @@ -1,32 +0,0 @@ -
    - -
    -
    - -
    - -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.ts deleted file mode 100644 index 02c0b10a521c682168d085a9c900b20d7b50e197..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/cmd-basic-editor/cmd-basic-editor.component.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Component, Input, ViewChild, TemplateRef, Output, EventEmitter, OnInit } from '@angular/core'; -import { Command } from '../entity/command'; -import { cloneDeep } from 'lodash-es'; -import { NotifyService } from '@farris/ui-notify'; -import { DomService } from '@farris/designer-services'; - -@Component({ - selector: 'app-cmd-basic-editor', - templateUrl: './cmd-basic-editor.component.html' -}) -export class CmdBasicEditorComponent implements OnInit { - @Input() currentCommand: Command; - @Input() viewModelId: string; - @Input() commands: Command[]; - - @Output() closeModal = new EventEmitter(); - @Output() submitModal = new EventEmitter(); - - @ViewChild('modalFooter') modalFooter: TemplateRef; - - value; - - constructor( - private notifySer: NotifyService, - private domServ: DomService) { } - - ngOnInit() { - this.value = cloneDeep(this.currentCommand); - } - clickCancel() { - this.closeModal.emit(); - } - - clickConfirm() { - if (!this.value.name || !this.value.name.trim()) { - this.notifySer.warning('请输入方法名称'); - return; - } - if (!this.value.code || !this.value.code.trim()) { - this.notifySer.warning('请输入方法编号'); - return; - } - - if (!this.validateCommand()) { - return; - } - const newCode = this.value.code.trim(); - if (this.currentCommand.code !== newCode) { - this.notifySer.warning('修改方法编号后请重新绑定控件交互事件!'); - } - this.currentCommand.code = newCode; - this.currentCommand.name = this.value.name.trim(); - - - this.submitModal.emit(this.currentCommand); - } - - /** - * 校验命令是否重复 - * 1、同一个VM下名称不重复 - * 2、当前VM下编号不重复,编号不区分大小写 - * 3、其他VM下编号不重复 - */ - validateCommand() { - const names = this.commands.map(c => { - if (c.id !== this.currentCommand.id) { return c.name; } - }); - if (names.includes(this.value.name.trim())) { - this.notifySer.warning('名称【' + this.value.name.trim() + '】已存在,请修改'); - return false; - } - const newCode = this.value.code.trim(); - for (const c of this.commands) { - if (c.id === this.currentCommand.id) { - continue; - } - if (c.code.toLowerCase() === newCode.toLowerCase()) { - this.notifySer.warning('已存在编号【' + c.code + '】,请修改'); - return false; - } - } - for (const vm of this.domServ.viewmodels) { - if (vm.id === this.viewModelId) { - continue; - } - for (const cmd of vm.commands) { - if (cmd.code.toLowerCase() === newCode.toLowerCase()) { - // this.notifySer.warning('视图模型【' + vm.id + '】中已存在命令编号【' + newCode + '】,请修改'); - this.notifySer.warning('已存在方法编号【' + newCode + '】,请修改'); - return false; - } - } - } - - return true; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.css b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.css deleted file mode 100644 index 49ca369727ee3838cb37c7de9e6914488227a5d9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.css +++ /dev/null @@ -1,60 +0,0 @@ -.method-panel { - padding-left: 12px; - padding-right: 12px; -} - -.method-toolbar { - display: flex; - align-items: center; - line-height: 18px; - color: #34495e; - padding-top: 4px; - padding-bottom: 10px; -} - -.method-toolbar .toolbar-item { - display: flex; - cursor: pointer; -} - -.method-toolbar .toolbar-item .toolbar-item-icon { - position: relative; - height: 15px; - width: 15px; - border: 1px solid #5b89fe; - border-radius: 3px; - margin-right: 6px; -} - -.method-toolbar .toolbar-item .toolbar-item-icon::after { - content: "T"; - position: absolute; - top: 0; - left: 2px; - font-size: 12px; - line-height: 12px; - color: #4e56c4; -} - -.method-toolbar .toolbar-item .toolbar-item-icon::before { - font-family: FarrisExtend; - display: flex; - justify-content: center; - align-items: flex-end; - height: 10px; - width: 10px; - line-height: 8px; - color: #00cdba; - background-color: #fff; - position: absolute; - bottom: -2px; - right: -4px; -} - -.method-toolbar .toolbar-item .toolbar-item-icon-add::before { - content: "\e11e"; -} - -.grid-panel { - border-radius: 6px; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.html b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.html deleted file mode 100644 index 0bfcbcd7e35c340be7a398545b9d75d479a106df..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.html +++ /dev/null @@ -1,23 +0,0 @@ -
    -
    -
    -
    - 添加控制器 -
    -
    - -
    - - - - -
    -
    - - - - - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.ts deleted file mode 100644 index b02a372d6a3261983bf4871ce3c39b7f372afe00..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/command-selector.component.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { WebcmdMetadataManager } from './webcmd-metadata.manager'; -import { - Component, OnInit, Output, EventEmitter, ViewChild, TemplateRef, ElementRef, ComponentFactoryResolver, - Injector, ChangeDetectorRef, ApplicationRef, NgZone -} from '@angular/core'; -import { BsModalService, BsModalRef, ModalOptions } from '@farris/ui-modal'; -import { DialogComponent } from '@farris/ui-dialog'; -import { LoadingService } from '@farris/ui-loading'; -import { FormBasicService, DesignerEnvType, FarrisMetadata4RefDto, WebCommand, WebCommandMetadata } from '@farris/designer-services'; -import { TreeTableComponent } from '@farris/ui-treetable'; -import { NotifyService } from '@farris/ui-notify'; -import { IdService } from '@farris/ui-common'; -import { AppNavigationSelectorComponent } from '@farris/app-navigation-selector'; - -@Component({ - selector: 'app-command-selector', - templateUrl: './command-selector.component.html', - styleUrls: ['./command-selector.component.css'], - providers: [WebcmdMetadataManager] -}) -export class CommandSelectorComponent implements OnInit { - @ViewChild('modalFooter') modalFooter: TemplateRef; - - selectedCommands: Array<{ cmd: WebCommand, cmp: WebCommandMetadata }>; - - @ViewChild('selector', { read: DialogComponent }) selector: DialogComponent; - - @ViewChild('commandSelector') loadingBox: ElementRef; - - controllers: Array; - - webcmds: WebCommandMetadata[]; - - webcmdsData: Array = []; - - // 有可能在打开选择命令的界面时,构件元数据尚未加载,需要显示loading界面,从服务端加载数据 - @Output() commandSelected = new EventEmitter<{ - selectedCommands: Array<{ cmd: WebCommand, cmp: WebCommandMetadata }>, - newCmds: Array - }>(); - - @Output() closeModal = new EventEmitter(); - - webcmdsCols = [{ field: 'name', title: '方法名称' }, { field: 'code', title: '方法编号' }]; - - @ViewChild('webcmdsTree') webcmdsTree: TreeTableComponent; - - private app: ApplicationRef; - - - // 新增的构件 - newCmds = []; - - constructor( - private modalService: BsModalService, - private loading: LoadingService, - private webcmdManager: WebcmdMetadataManager, - private formBasicService: FormBasicService, - private notifyServ: NotifyService, - private resolver: ComponentFactoryResolver, - private injector: Injector, - private idService: IdService, - private ngZone: NgZone - ) { - // this.controllers = actionManager.commandCmps; - // added by wang-xh: 运行时定制弹出选择构件的窗口后出现数据与页面不同步的现象,故增加强制刷新 - // this.app = this.injector.get(ApplicationRef); - } - - ngOnInit() { - this.webcmdsTree.clearAll(); - this.selectedCommands = []; - this.newCmds = []; - - this.loadCommandData(); - - // 监听数据变化 - this.webcmdManager.subscribe(webcmds => { - this.webcmdsData = []; - this.selectedCommands = []; - for (const webcmd of webcmds) { - const cmdData = { - data: { - id: webcmd.Id, name: webcmd.Name, code: webcmd.Code, children: [], originalData: webcmd, - isController: true - }, - children: [], - expanded: true - }; - this.webcmdsData.push(cmdData); - if (webcmd.Commands) { - for (const command of webcmd.Commands) { - const operationData = { - data: { - id: this.idService.generate(), // 部分构件下的命令id是重复的,影响了树表的勾选,故此处重置id - name: command.Name, code: command.Code, children: [], originalData: command, - isController: false - }, - children: [] - }; - cmdData.children.push(operationData); - } - } - } - - // 因为命令的id都重置了,treetable就没法默认勾选上次的行,所以执行一次clearAll - this.webcmdsTree.clearAll(); - - this.webcmdsData = this.unique(this.webcmdsData); - this.webcmdsTree.loadData(this.webcmdsData); - }); - } - - unique(arr: Array): Array { - const result = []; - let existToken = false; - arr.forEach(item => { - - const isExisted = result.find(res => res.data && item.data.id === res.data.id); - if (!isExisted) { - result.push(item); - } else { - existToken = true; - } - }); - // 暂时屏蔽 - // if (existToken) { - // alert('相同的动作构件已经存在'); - // } - // - return result; - } - - - openMetadataSelector() { - const compFactory = this.resolver.resolveComponentFactory(AppNavigationSelectorComponent); - // 依赖注入 - const compRef = compFactory.create(this.injector); - // 配置模态框参数 - compRef.instance.editorParams = { - relativePath: this.formBasicService.formMetaBasicInfo.relativePath, - envType: this.formBasicService.envType - }; - /** 弹窗相关设置 */ - const modalConfig: ModalOptions = { - title: '选择内置控制器', - width: 900, - height: 500, - resizable: false, - showButtons: false, - showMaxButton: false, - minWidth: 700, - minHeight: 400, - }; - const modalPanel: BsModalRef = this.modalService.show(compRef, modalConfig); - modalPanel.content.closeModal.subscribe(() => { - modalPanel.close(); - }); - modalPanel.content.submitModal.subscribe(data => { - this.metadataSelected(data); - modalPanel.close(); - }); - } - - - /** - * 处理构件元数据选择后的逻辑 - */ - metadataSelected(metadata4RefDto: FarrisMetadata4RefDto) { - const metadata = metadata4RefDto.metadata; - const newCmd = this.webcmdManager.addCmdMetadata(metadata); - - // 新构件 - if (newCmd && !this.newCmds.find(c => c.id === newCmd.id)) { - this.newCmds.push(newCmd); - } - } - - confirm() { - if (this.webcmdsTree.checkeds.length === 0) { - this.notifyServ.warning('请先选择方法'); - return; - } - const newCmds = []; - this.webcmdsTree.checkeds.forEach(selection => { - // 去除控制器节点 - if (selection.data.isController) { - return; - } - this.selectedCommands.push({ cmd: selection.data.originalData, cmp: selection.parent.data.originalData }); - - const n = this.newCmds.find(c => c.id === selection.parent.data.originalData.Id); - if (n) { - newCmds.push(n); - } - }); - this.commandSelected.emit({ - selectedCommands: this.selectedCommands, - newCmds - }); - } - - cancel() { - this.closeModal.emit(); - } - - - cmdTreeNodeClicked({ node }: any) { - // // 记录选中的命令,如果选中的是构件节点,把选中命令置为空,以禁用确定按钮 - // if (node.level === 2) { - // // 选中的是命令节点 - // this.selectedCommand = { cmd: node.originalData, cmp: node.parent.originalData }; - // } else { - // this.selectedCommand = null; - // } - } - - - - private loadCommandData() { - const loadingComp = this.loading.show({ container: this.loadingBox }); - - this.webcmdManager.loadCmdWithDom().subscribe(() => { - loadingComp.close(); - }); - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/webcmd-metadata.manager.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/webcmd-metadata.manager.ts deleted file mode 100644 index 902858f3b0b821ecbc45eeea076bac00abbbd4e9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/command-selector/webcmd-metadata.manager.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable, BehaviorSubject, forkJoin, of } from 'rxjs'; -import { map, switchMap, tap } from 'rxjs/operators'; -import { NotifyService } from '@farris/ui-notify'; -import { - FormBasicService, DesignerEnvType, DomService, FarrisMetadataDto, WebCommandMetadata, WebCommandMetadataConvertor -} from '@farris/designer-services'; -import { DesignerMetadataService } from '../../../service/designer-metadata.service'; - -@Injectable() -export class WebcmdMetadataManager extends BehaviorSubject { - private webCommands: WebCommandMetadata[] = []; - - constructor( - private domService: DomService, - private metadataService: DesignerMetadataService, - private notifyService: NotifyService, - private formBasicService: FormBasicService) { - super([]); - } - - loadCmdWithDom(): Observable { - const webcmdInfos = this.domService.getWebCmds(); - // 如果没有变化,则无需刷新界面 - const cmdMap = new Map(); - this.webCommands.forEach(cmd => { - cmdMap.set(cmd.Id, cmd); - }); - const isExternalCmdLoaded = webcmdInfos.every(item => cmdMap.has(item.id)); - let isInternalCmdLoaded = true; - - const loadingCmds = []; - // 如果刷新的话,dom里记录的全部需要加载 - loadingCmds.push(...webcmdInfos); - - const result = this.metadataService.getMetadataList('.webcmd'); - return result.pipe( - tap(list => { - if (!list) { - return; - } - list.forEach(item => { - let extendProperty: any; - try { - extendProperty = JSON.parse(item.extendProperty); - } catch (e) { } - - if (extendProperty && extendProperty.FormCode !== this.formBasicService.formMetaBasicInfo.code) { - // common or other form - return; - } - - if (!webcmdInfos.find(webcmdInfo => item.id === webcmdInfo.id)) { - // 只要是属于此表单的都需要加载,除非是已经添加到表单中 - const webcmd = { - id: item.id, - path: item.relativePath, - name: item.fileName - }; - loadingCmds.push(webcmd); - if (!cmdMap.has(item.id)) { - isInternalCmdLoaded = false; - } - - // 属于当前表单的加到表单dom中 - webcmdInfos.push(webcmd); - } - }); - }), - switchMap(() => { - if (isExternalCmdLoaded && isInternalCmdLoaded) { - // 都加载过,没有变化 - return of(null); - } - const obs = new Array(); - this.webCommands = new Array(); - const sessionId = ''; - - loadingCmds.forEach(webcmdInfo => { - const id = webcmdInfo.id; - const ob = new BehaviorSubject({}); - obs.push(ob); - const refMetadaSev = this.metadataService.getMetadata(id); - refMetadaSev.subscribe(metadata => { - const cmd = new WebCommandMetadataConvertor().InitFromJobject(JSON.parse(metadata.content)); - this.webCommands.push(cmd); - ob.next({}); - ob.complete(); - }, () => { - ob.next({}); - ob.complete(); - }); - }); - - return forkJoin(obs).pipe( - tap(() => super.next(this.webCommands)), - map(() => { }) - ); - - }) - ); - } - - /** - * 添加命令构件 - */ - addCmdMetadata(metadata: FarrisMetadataDto) { - const webcmd = new WebCommandMetadataConvertor().InitFromJobject(JSON.parse(metadata.content)); - const webcmdList = this.domService.getWebCmds(); - - // modify by wang-xh:选择命令后才把构件信息添加到dom中 - let newWebCmd; - const existingWebcmdIndex = webcmdList.findIndex(item => item.id === webcmd.Id); - if (existingWebcmdIndex >= 0) { - // webcmdList[existingWebcmdIndex] = newWebCmd; - this.notifyService.warning('相同的控制器已经存在'); - } else { - newWebCmd = { - id: webcmd.Id, - path: metadata.relativePath, - name: metadata.fileName, - code: metadata.code, - nameSpace: metadata.nameSpace - }; - this.webCommands.push(webcmd); - } - - super.next(this.webCommands); - - // 返回需要新增的构件 - return newWebCmd; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/case.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/case.ts deleted file mode 100644 index c7bf22034f76c56091da1c9dc361d6ce396db837..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/case.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Extension } from './extension'; -import { ITreeNode } from './tree-node'; -import { OperationCollection } from './operation-collection'; -import { ServiceRef } from './service-ref'; -import { AnimationKeyframesSequenceMetadata } from '@angular/animations'; - -export class Case implements ITreeNode { - get data(): { id: string; name: string; } { - return { id: this.id, name: this.name }; - } - get children(): ITreeNode[] { - return this.handlers; - } - expanded?: boolean; - - id: string; - name: string; - condition: string; - handlers: OperationCollection; - - belongedExt: Extension; - - root: ITreeNode; - - constructor(caseJson?: any, extension?: Extension) { - // 如果有参数就解析。必须是两个参数都存在。 - if (caseJson) { - this.parse(caseJson, extension); - } - } - - parse(caseJson: any, extension?: Extension) { - this.id = caseJson.id; - this.name = caseJson.name; - this.condition = caseJson.condition; - this.handlers = new OperationCollection(caseJson.handlers); - - if (extension) { - this.belongedExt = extension; - } - } - - toJson() { - const result = { - id: this.id, - name: this.name, - condition: this.condition, - handlers: [] - }; - for (const handler of this.handlers) { - result.handlers.push(handler.toJson()); - } - return result; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/command.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/command.ts deleted file mode 100644 index afcb4e1b01a1aadce93f8bc86385196df6c2049f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/command.ts +++ /dev/null @@ -1,337 +0,0 @@ -import { IOperationNode } from './operation-node'; -import { SwitchNode } from './switch-node'; -import { ExecuteNode, OperationExtendLevel } from './execute-node'; -import { - WebCommand, ICommandItem, CmpMethodRefering, BranchCollectionCommandItem, BranchCommandItem, WebCommandMetadata -} from '@farris/designer-services'; -import { OperationCollection } from './operation-collection'; -import { ITreeNode } from './tree-node'; -import { ParamConfig } from './param'; -import { Extension } from './extension'; -import { Case } from './case'; - -export class Command implements ITreeNode { - private webCommand: WebCommand; - - - get data(): { id: string; name: string; code: string, description: string, controllerCode?: string, controllerName?: string } { - return { id: this.id, name: this.name, code: this.code, description: this.description, controllerCode: this.controllerCode, controllerName: this.controllerName }; - } - - get children(): ITreeNode[] { - return this.handlers; - } - - expanded?: boolean; - - id: string; - - code: string; - - name: string; - - params: ParamConfig[] = []; - - cmpId: string; - - handlerName: string; - - extensions: Extension[] = []; - - handlers: OperationCollection; - - shortcut?: any; - - root: ITreeNode; - - /** 是否为运行时定制添加的命令 */ - isRTCmd?: boolean; - - /** 命令的参数是否需要刷新--用于构件中删除命令参数的场景 */ - needRefreshParam: boolean; - - /** 命令是否已失效(被删除) */ - isInValid?= false; - - /** 命令描述信息 */ - description?: string; - - /** 命令所属控制器的名称 */ - controllerName?: string; - - /** 命令所属控制器的编号 */ - controllerCode?: string; - - isNewGenerated?: boolean; - - targetComponent?: string; - - /** - * 构造命令信息 - * @param webCommand 构件中的命令结构 - * @param commandJsonOrCmpId 表单中记录的命令结构或者构件id - */ - constructor(webCommand: WebCommand, commandJsonOrCmpId: any | string, webCmd?: WebCommandMetadata) { - if (!webCommand) { - console.warn('参数错误,webCommand不能为空! 无效的命令'); - return; - } - this.root = this; - this.webCommand = webCommand; - - this.handlerName = this.webCommand.Code; - if (this.webCommand.Description === '此处添加方法描述') { - this.webCommand.Description = ''; - } - if (typeof commandJsonOrCmpId === 'string') { - // todo: 先使用构件命令的参数 在新建之后需要更新--actions-builder.ts中处理 - this.id = this.webCommand.Id; - this.code = this.webCommand.Code; - this.name = this.webCommand.Name; - this.cmpId = commandJsonOrCmpId; - this.description = this.webCommand.Description; - this.extensions = []; - this.addParamFromWebCommand(); - } else { - this.id = commandJsonOrCmpId.id; - this.code = commandJsonOrCmpId.code; - this.name = commandJsonOrCmpId.name; - this.description = this.webCommand.Description; - this.cmpId = commandJsonOrCmpId.cmpId; - this.isNewGenerated = commandJsonOrCmpId.isNewGenerated; - this.targetComponent = commandJsonOrCmpId.targetComponent; - this.extensions = []; - - // 添加快捷键配置 - this.shortcut = commandJsonOrCmpId.shortcut || {}; - - if (commandJsonOrCmpId.extensions) { - for (const extensionJson of commandJsonOrCmpId.extensions) { - const ext = new Extension(extensionJson); - ext.root = this; - this.extensions.push(ext); - } - } - - this.params = []; - // 先加载表单记录的参数信息,再从构件中加载参数 - if (commandJsonOrCmpId.params && commandJsonOrCmpId.params.length) { - for (const paramJson of commandJsonOrCmpId.params) { - this.params.push(new ParamConfig(paramJson)); - } - } - this.addParamFromWebCommand(); - } - - if (webCmd) { - this.controllerCode = webCmd.Code; - this.controllerName = webCmd.Name; - } - - this.handlers = new OperationCollection(); - this.handlers.push(...this.loadHandlers(this.webCommand.Items, this.getExtensionMap())); - - // this.data = { id: this.id, name: this.name }; - // this.children = this.handlers; - } - - toJson() { - const result: any = { - id: this.id, - code: this.code, - name: this.name, - params: [], - handlerName: this.handlerName, - cmpId: this.cmpId, - shortcut: this.shortcut ? JSON.parse(JSON.stringify(this.shortcut)) : {}, - extensions: [], - isRTCmd: this.isRTCmd, - isInvalid: this.isInValid - }; - if (this.isNewGenerated !== undefined) { - result.isNewGenerated = this.isNewGenerated; - } - if (this.targetComponent !== undefined) { - result.targetComponent = this.targetComponent; - } - // param - for (const param of this.params) { - result.params.push(param.toJson()); - } - - // extension - for (const extension of this.extensions) { - result.extensions.push(extension.toJson()); - } - - return result; - } - - /* #region private methods */ - /** - * 扩展信息放入map中. - * key是position最后一个guid,即被扩展节点的id. - * value是数组,一个节点可能有最多三种扩展:操作前,操作后,替换 - */ - private getExtensionMap() { - const map = new Map(); - for (const extension of this.extensions) { - const positionJson = extension.position; - let pos: string; - if (typeof positionJson === 'string') { - pos = positionJson; - } else { - pos = positionJson[extension.position.length - 1]; - } - if (map.has(pos)) { - map.get(pos).push(extension); - } else { - map.set(pos, [extension]); - } - } - return map; - } - - private loadHandlers(items: ICommandItem[], extensionMap: Map) { - const handlers = new Array(); - for (const item of items) { - let handler: ExecuteNode | SwitchNode; - if (item instanceof CmpMethodRefering) { - handler = new ExecuteNode(); - handler.id = item.Id; - handler.code = item.Code; - handler.name = item.Name; - handler.method = item.MethodCode; - handler.methodName = item.MethodName; - handler.cmpCode = item.ComponentCode; - handler.extendLevel = OperationExtendLevel.Comp; - handler.componentName = item.ComponentName; - handler.componentCode = item.ComponentCode; - - // 可扩展性 - handler.preExtendable = item.IsBeforeExpansion; - handler.replaceable = item.IsReplaced; - handler.postExtendable = item.IsAfterExpansion; - - handler.root = this; - - // 处理扩展 - const extensions = extensionMap.get(handler.id); - let beforeExtension: Extension, replaceExtension: Extension, afterExtension: Extension; - if (extensions && extensions.length) { - for (const extension of extensions) { - switch (extension.type) { - case 'InsertBefore': - beforeExtension = extension; - break; - case 'Replace': - replaceExtension = extension; - break; - case 'InsertAfter': - afterExtension = extension; - break; - default: - break; - } - } - } - - if (beforeExtension && item.IsBeforeExpansion) { - // handlers.push(beforeExtension); - handler.preExtension = beforeExtension; - } - if (replaceExtension && item.IsReplaced) { - // handlers.push(...replaceExtension.tasks); - handler.replaceExtension = replaceExtension; - handler.replaced = true; - } - handlers.push(handler); - if (afterExtension && item.IsAfterExpansion) { - // handlers.push(...afterExtension.tasks); - handler.postExtension = afterExtension; - } - } else if (item instanceof BranchCollectionCommandItem) { - handler = new SwitchNode(); - handler.id = item.Id; - handler.name = item.Name; - handler.root = this; - handler.cases = []; - for (const subItem of item.Items) { - if (subItem instanceof BranchCommandItem) { - const casee = new Case(); - casee.id = subItem.Id; - casee.name = subItem.Name; - casee.condition = subItem.Express; - casee.root = this; - casee.handlers = new OperationCollection(); - casee.handlers.push(...this.loadHandlers(subItem.Items, extensionMap)); - handler.cases.push(casee); - } - } - - handlers.push(handler); - } - } - - return handlers; - } - - /** - * 标识已移除的参数 - * @param params 已有的参数 - * @param webCommand 构件中记录的参数 - */ - private processParams(params: any[], webCommand: any[]) { - const webCommandCode = webCommand.map(item => item.Code); - params.forEach(param => { - if (!webCommandCode.includes(param.name)) { - param['isDisused'] = true; - } - }); - } - - /** - * 追加命令的参数:表单viewModel中没有,但是构件中有的参数 - * 对比方式:表单viewModel.command.name===构件命令Code( 构件的命令编号不能随意更改) - */ - private addParamFromWebCommand() { - if (!this.params) { this.params = []; } - if (!this.webCommand || !this.webCommand.Parameters) { return; } - - // 标识已移除的参数 - this.processParams(this.params, this.webCommand.Parameters); - - for (const parameter of this.webCommand.Parameters) { - const existingParam = this.params.find(item => item.name === parameter.Code); - if (existingParam) { - // 存在的参数,更新类型、名称、说明 - existingParam.type = parameter.ParameterType; - existingParam.shownName = parameter.Name; - existingParam['EditorType'] = parameter['EditorType']; - existingParam.description = parameter.Description; - existingParam.controlSource = parameter['controlSource']; - existingParam.defaultValue = parameter['defaultValue']; - continue; - } - - // 新增的参数 - const param = new ParamConfig(); - param.name = parameter.Code; - param.shownName = parameter.Name; - param.type = parameter.ParameterType; - param['EditorType'] = parameter && parameter['EditorType'] ? parameter['EditorType'] : null; - param.value = ''; - param.description = parameter.Description; - param.controlSource = parameter['controlSource']; - param.defaultValue = parameter['defaultValue']; - - this.params.push(param); - } - - } - - /* #endregion */ - private parseshortcut() { - - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/execute-node.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/execute-node.ts deleted file mode 100644 index eb260e6f541f98a790ab3051c9bc21881cad8112..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/execute-node.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { Extension } from './extension'; -import { ITreeNode } from './tree-node'; -import { IOperationNode } from './operation-node'; -import { ParamConfig } from './param'; - -export enum OperationExtendLevel { - /** 构件 */'Comp' = 1, - /** 表单 */'Form' = 2 -} - -export class ExecuteNode implements ITreeNode, IOperationNode { - get data(): { id: string; name: string; code: string; componentCode: string; componentName: string } { - return { id: this.id, name: this.methodName, code: this.code, componentCode: this.componentCode, componentName: this.componentName }; - } - - get children(): ITreeNode[] { - const children = new Array(); - if (this.preExtension) { - children.push(this.preExtension); - } - if (this.replaceExtension) { - children.push(this.replaceExtension); - } else { - children.push({ data: { id: this.id + 1, name: this.name }, children: [], root: this.root }); - } - if (this.postExtension) { - children.push(this.postExtension); - } - - if (children.length === 1 && children[0] !== this.replaceExtension) { - // 没有扩展 - return undefined; - } - - return children; - } - - id: string; - - code: string; - - name: string; - - // serviceRef: ServiceRef; // 记录任务引用的服务 - serviceRefId: string; - - serviceName: string; // 记录serviceRef的alias - - cmpCode: string; - - method: string; - - methodName: string; - - params: Array; - - extendLevel: OperationExtendLevel; - - preExtendable: boolean; - - replaceable: boolean; - - postExtendable: boolean; - - parent?: any; - - // 扩展节点属性 - belongedExt: Extension; - - // 基础节点属性 - replaced: boolean; - - preExtension: Extension; - - replaceExtension: Extension; - - postExtension: Extension; - - // 扩展编辑标志 - isEditing: boolean; - - root: ITreeNode; - - /** 操作所属的构件编号 */ - componentCode?: string; - - /** 操作所属的构件名称 */ - componentName?: string; - - constructor(executeNodeJson?: any, extension?: Extension) { - if (executeNodeJson) { - this.parse(executeNodeJson, extension); - } - } - - parse(executeNodeJson: any, extension?: Extension) { - this.id = executeNodeJson.id; - this.code = executeNodeJson.code; - this.name = executeNodeJson.name; - this.serviceRefId = executeNodeJson.serviceRefId; - this.serviceName = executeNodeJson.serviceName; - this.cmpCode = executeNodeJson.cmpCode; - this.method = executeNodeJson.method; - this.methodName = executeNodeJson.methodName; - this.extendLevel = executeNodeJson.extendLevel || OperationExtendLevel.Form; - this.componentCode = executeNodeJson.componentCode; - this.componentName = executeNodeJson.componentName; - - if (extension) { - this.belongedExt = extension; - } - this.replaced = false; - - this.params = new Array(); - if (executeNodeJson.params) { - for (const paramJson of executeNodeJson.params) { - this.params.push(new ParamConfig(paramJson)); - } - } - } - - toJson(): any { - const params = []; - for (const paramConfig of this.params) { - params.push(paramConfig.toJson()); - } - - return { - 'id': this.id, - 'type': 'executeNode', - 'code': this.code, - 'name': this.name, - 'serviceRefId': this.serviceRefId, - 'serviceName': this.serviceName, - 'cmpCode': this.cmpCode, - 'method': this.method, - 'params': params - }; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/extension.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/extension.ts deleted file mode 100644 index 76faa7d5000d07d97a8e23b8e53d9589bd4c5998..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/extension.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { IOperationNode } from './operation-node'; -import { ITreeNode } from './tree-node'; -import { ExecuteNode } from './execute-node'; -import { SwitchNode } from './switch-node'; - -export class Extension implements ITreeNode { - get data(): { id: string; name: string; } { - let name: string; - switch (this.type) { - case 'InsertBefore': - name = '操作前扩展'; - break; - case 'Replace': - name = '操作替换'; - break; - case 'InsertAfter': - name = '操作后扩展'; - break; - default: - // break; - } - return { id: this.id, name: name }; - } - - get children(): ITreeNode[] { - return this.tasks; - } - - isEditing: boolean; - - id: string; - position: string; - type: 'InsertBefore' | 'Replace' | 'InsertAfter'; // string; - tasks: Array; - - root: ITreeNode; - - constructor(extensionJson?: any) { - if (extensionJson) { - this.parse(extensionJson); - } - } - - parse(extensionJson: any) { - const positionJson = extensionJson.position; - if (positionJson) { - if (positionJson instanceof Array) { - this.position = positionJson[positionJson.length - 1]; - } else if (typeof positionJson === 'string') { - this.position = positionJson; - } - } - this.type = extensionJson.type; - // extension 没有id 拼一个上去,否则树节点展示会有问题 - this.id = this.type + this.position; - this.tasks = new Array(); - for (const taskJson of extensionJson.tasks) { - if (!taskJson.type) { - console.warn(`步骤节点信息不完整,跳过处理该节点。节点id:{${taskJson.id}}`); - continue; // 没有type节点,信息不完整,跳过处理 - } - - switch (taskJson.type) { - case 'executeNode': - this.tasks.push(new ExecuteNode(taskJson, this)); - break; - case 'switchNode': - this.tasks.push(new SwitchNode(taskJson, this)); - break; - default: - break; - } - } - } - - toJson() { - const result = { - position: this.position, - type: this.type, - tasks: [] - }; - - // task - for (const task of this.tasks) { - result.tasks.push(task.toJson()); - } - return result; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/operation-collection.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/operation-collection.ts deleted file mode 100644 index d298c88fc2237168080b8ce99b500ad1e1421a2c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/operation-collection.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Extension } from './extension'; -import { ITreeNode } from './tree-node'; -import { IOperationNode } from './operation-node'; -import { ExecuteNode } from './execute-node'; -import { SwitchNode } from './switch-node'; -// import { ICommandItem, CommandItemType, CmpMethodRefering, BranchCollectionCommandItem } from '@gsp-cmp/webcommand'; -import { ServiceRef } from './service-ref'; - -export class OperationCollection extends Array { - - constructor(handlersJson?: any) { - super(); - if (handlersJson) { - // this.parse(handlersJson); - for (const node of handlersJson) { - if (!node.type) { - continue; // 没有type节点,信息不完整,跳过处理 - } - - switch (node.type) { - case 'executeNode': - this./* operations. */push(new ExecuteNode(node)); - break; - case 'switchNode': - this./* operations. */push(new SwitchNode(node)); - break; - default: - break; - } - } - } - } - - parse(handlersJson: any) { - // this.operations = new Array(); - if (handlersJson) { - for (const node of handlersJson) { - if (!node.type) { - continue; // 没有type节点,信息不完整,跳过处理 - } - - switch (node.type) { - case 'executeNode': - this./* operations. */push(new ExecuteNode(node)); - break; - case 'switchNode': - this./* operations. */push(new SwitchNode(node)); - break; - default: - break; - } - } - } - } - - // parseFromWebCmdMetadata(items: Array, serviceRefs: Map) { - // // this.operations = new Array(); - // if (items) { - // for (const item of items) { - // if (item.GetItemType() === CommandItemType.MethodRefer && item instanceof CmpMethodRefering) { - // // executeNode - // const executeNode = new ExecuteNode(); - // executeNode.parseFromWebCmdMetadata(item, serviceRefs); - // this./* operations. */push(executeNode); - // } else if (item.GetItemType() === CommandItemType.BranchCollection && item instanceof BranchCollectionCommandItem) { - // // switchNode - // const switchNode = new SwitchNode(); - // switchNode.parseFromWebCmdMetadata(item, serviceRefs); - // this./* operations. */push(switchNode); - // } - // } - // } - // } - - toJson() { - const handlers = []; - for (const node of this) { - handlers.push(node.toJson()); - } - return handlers; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/param.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/param.ts deleted file mode 100644 index 0c1a985ebc0c1f6782a5bb96bbd9b84a6281e7cb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/param.ts +++ /dev/null @@ -1,47 +0,0 @@ -export class ParamConfig { - name: string; - shownName: string; - type: string; - value: string; // 表达式or值 - description: string; // 说明 - - /** 参数是否在构件中被移除 */ - isDisused: boolean; - - /** 参数的类型,用于参数编辑器 */ - controlSource: any; - - defaultValue: any; - - constructor(paramJson?: any) { - if (paramJson) { - this.parse(paramJson); - } - } - - parse(paramJson: any) { - this.name = paramJson.name; - this.shownName = paramJson.shownName; - this.value = paramJson.value; - this.description = paramJson.description; - this.controlSource = paramJson.controlSource; - this.defaultValue = paramJson.defaultValue; - - } - - /** - * 获取保存到DOM结构中的数据 - */ - toJson(): any { - const param: any = { - name: this.name, - shownName: this.shownName, - value: this.value - }; - if (this.defaultValue !== undefined) { - param.defaultValue = this.defaultValue; - } - - return param; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/service-ref.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/service-ref.ts deleted file mode 100644 index d176126790c2e98561982ed8bf87efc5f7e2e91a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/service-ref.ts +++ /dev/null @@ -1,31 +0,0 @@ -export class ServiceRef { - name: string; - path: string; - cmpId: string; - isCommon: string; - alias: string; - - constructor(serviceRefJson?: any) { - if (serviceRefJson) { - this.parse(serviceRefJson); - } - } - - private parse(serviceRefJson: any) { - this.name = serviceRefJson.name; - this.path = serviceRefJson.path; - this.cmpId = serviceRefJson.cmpId; - this.isCommon = serviceRefJson.isCommon; - this.alias = serviceRefJson.alias; - } - - toJson() { - return { - 'name': this.name, - 'path': this.path, - 'cmpId': this.cmpId, - 'isCommon': this.isCommon, - 'alias': this.alias - }; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/switch-node.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/switch-node.ts deleted file mode 100644 index 7a08fbdb4ae30dfe09b663528f1f56331b89f662..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/entity/switch-node.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Extension } from './extension'; -import { ITreeNode } from './tree-node'; -import { IOperationNode } from './operation-node'; -import { Case } from './case'; -import { ServiceRef } from './service-ref'; - -export class SwitchNode implements ITreeNode, IOperationNode { - get data(): { id: string; name: string; } { - return { id: this.id, name: this.name }; - } - expanded?: boolean; - get children(): ITreeNode[] { - return this.cases; - } - - id: string; - code: string; - name: string; - - cases: Array; - - belongedExt: Extension; - - root: ITreeNode; - - constructor(switchNodeJson?: any, extension?: Extension) { - if (switchNodeJson) { - this.parse(switchNodeJson, extension); - } - } - - parse(switchNodeJson: any, extension?: Extension) { - this.id = switchNodeJson.id; - this.code = switchNodeJson.code; - this.name = switchNodeJson.name; - // this.cases = new SwitchCases(switchNodeJson.cases, serviceRefs); - this.cases = new Array(); - for (const caseJson of switchNodeJson.cases) { - const casee = new Case(caseJson, extension); // case 是关键字。。。 - this.cases.push(casee); - } - - if (extension) { - this.belongedExt = extension; - } - } - - // parseFromWebCmdMetadata(branchCollection: BranchCollectionCommandItem, serviceRefs: Map) { - // this.id = branchCollection.Id; - // this.name = branchCollection.Name; - // this.cases = new Array(); - // for (const branch of branchCollection.Items) { - // const casee = new Case(); - // casee.parseFromWebCmdMetadata(branch, serviceRefs); - // this.cases.push(casee); - // } - // } - - toJson(): any { - const cases = []; - for (const casee of this.cases) { - cases.push(casee.toJson()); - } - return { - 'id': this.id, - 'type': 'switchNode', - 'code': this.code, - 'name': this.name, - 'cases': cases - }; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.css b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.css deleted file mode 100644 index 1870ba428a8bdf005d747b25cab4fcb802e52519..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.css +++ /dev/null @@ -1,204 +0,0 @@ -:host { - /* display: flex; - flex-grow: 1; - flex-basis: 0; - flex-direction: column !important; - flex-shrink: 1; */ - /* overflow: hidden; */ - height: 100%; - position: relative; -} - -.fd-page { - top: 0; - bottom: 0; - position: absolute; - right: 0; - left: 0; - display: flex; - flex-direction: column; - overflow: hidden; -} - -.fd-page-navigate .fd-page-main { - display: flex; - flex-direction: column; - overflow: hidden -} - -.fd-page-navigate .fd-page-content { - flex-shrink: 1; - flex-grow: 1; - flex-basis: 0; - display: flex; - flex-direction: row; - flex-wrap: nowrap; - overflow: hidden -} - -.fd-page-navigate .fd-page-content>.col, .fd-page-navigate .fd-page-content>[class*=col-] { - padding-left: 0; - padding-right: 0 -} - -.fd-page-navigate .fd-page-content-nav { - display: flex; - flex-direction: column; - box-shadow: 0 0 8px 0 rgba(0, 28, 64, .08); - padding: .5rem 0; - position: relative; - z-index: 100 -} - -.fd-page-navigate .fd-page-content-main { - flex-shrink: 1; - flex-grow: 1; - flex-basis: 0; - overflow: auto -} - -.fd-page-navigate .fd-page-content-main>.f-section:last-child::after { - display: none -} - -.fd-page-navigate .fd-page-content-nav.f-component-splitter-pane { - padding: 0 -} - -.vm-toolbar { - display: flex; - align-items: center; - line-height: 18px; - color: #34495e; - padding-top: 4px; - padding-bottom: 10px; -} - -.vm-toolbar .toolbar-item { - display: flex; - cursor: pointer; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon { - position: relative; - height: 15px; - width: 15px; - border: 1px solid #5b89fe; - border-radius: 3px; - margin-right: 6px; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon::after { - content: "T"; - position: absolute; - top: 0; - left: 2px; - font-size: 12px; - line-height: 12px; - color: #4e56c4; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon::before { - font-family: FarrisExtend; - display: flex; - justify-content: center; - align-items: flex-end; - height: 10px; - width: 10px; - line-height: 8px; - color: #00cdba; - background-color: #fff; - position: absolute; - bottom: -2px; - right: -4px; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon-add::before { - content: "\e11e"; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon-delete::before { - content: "\e11b"; - color: #fa6c00; -} - -.vm-toolbar .toolbar-item .toolbar-item-icon-edit::before { - content: "\e10b"; - color: #5670d5; -} - -.vm-toolbar .toolbar-item:hover { - color: #5B89FE; -} - -.vm-toolbar .toolbar-item-spilter { - width: 1px; - height: 12px; - margin: 0 10px; - background-image: linear-gradient(180deg, rgba(40, 60, 93, 0) 0%, rgba(40, 60, 93, 0.1) 23%, rgba(40, 60, 93, 0.1) 52%, rgba(40, 60, 93, 0.1) 84%, rgba(40, 60, 93, 0) 100%); - border-radius: 0.5px; -} - -.vm-toolbar .toolbar-item.disable { - color: #8b8686; - cursor: auto; -} - -.vm-toolbar .toolbar-item.disable .toolbar-item-icon-edit::before { - color: #8b8686; -} - -.vm-toolbar .toolbar-item.disable .toolbar-item-icon-edit::after { - color: #8b8686; -} - -.vm-toolbar .toolbar-item.disable .toolbar-item-icon { - border-color: #8b8686; -} - -.commandPanel { - border-radius: 6px; - -} - -.commandPanel>>>.treetable-cell span { - user-select: text; -} - -.commandPanel>>>.text-tip, .paramPanel .text-tip { - font-size: 14px; - -} - -.f-parameter-tooltip-class { - background-color: #878D99; - width: 100px; -} - -.paramPanel { - overflow-y: auto; -} - -.vm-list { - overflow: auto; - height: 100%; - background: #fcfdff !important; -} - -.main-panel { - min-width: 800px; - margin-bottom: 10px; -} - -.update-param { - line-height: 16px; - cursor: pointer; -} - -.update-param>.f-icon { - font-size: 14px; -} - -.commandPanel>>>.text-error { - color: #F24645 !important -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.html b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.html deleted file mode 100644 index 7f60497e8b5673983feff8a45ee6bee096d290d4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.html +++ /dev/null @@ -1,189 +0,0 @@ -
    - - -
    -
      -
      -
      -
      - -
      -
      -
      -
    -
    -
    - -
    -
    -
    -
    -
    - 添加方法 -
    -
    -
    -
    - 删除方法 -
    -
    -
    -
    - 编辑方法 -
    -
    - - -
    - -
    - - -
    - -
    -
    -
    -
    -
    -

    控制器

    -
    -
    -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    -

    方法参数

    - - - 更新 - -
    -
    -
    -
    -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -

    构件

    -
    -
    -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - - - - -
    - - - - - {{ctx.rowData['name']}} -
    - -
    - - - - - - - -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.ts deleted file mode 100644 index 4865b2bb01d15b0f7c14a56b254bc6113fbd071b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/method-manager.component.ts +++ /dev/null @@ -1,430 +0,0 @@ -import { Component, ComponentFactoryResolver, Injector, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core'; -import { DomService, FormViewModel, WebCommand, WebCommandMetadata } from '@farris/designer-services'; -import { LoadingService } from '@farris/ui-loading'; -import { MessagerService } from '@farris/ui-messager'; -import { BsModalService } from '@farris/ui-modal'; -import { NotifyService } from '@farris/ui-notify'; -import { TreeTableColumn, TreeTableComponent } from '@farris/ui-treetable'; -import { Subscription } from 'rxjs'; -import { ActionsBuilder } from './services/actions-builder'; -import { CmdBasicEditorComponent } from './cmd-basic-editor/cmd-basic-editor.component'; -import { Command } from './entity/command'; -import { WebCmdHandlerManager } from './services/webcmd-handler.manager'; -import { CommandSelectorComponent } from './command-selector/command-selector.component'; -// import { WebCommand, WebCommandMetadata } from '@gsp-cmp/webcommand'; -import { ViewModelListBuilder } from './services/vm-list-builder'; -import { ExecuteNode } from './entity/execute-node'; - - -@Component({ - selector: 'app-method-manager', - templateUrl: './method-manager.component.html', - styleUrls: ['./method-manager.component.css'], - providers: [ActionsBuilder, WebCmdHandlerManager] -}) -export class MethodManagerComponent implements OnInit, OnDestroy { - /** 导航条数据源 */ - viewModelTabs = []; - - /** 当前选中的视图模型 */ - activeViewModel: FormViewModel; - - /** 命令订阅 */ - private subscriptions: Subscription[]; - - /** 命令列表数据 */ - commandsData: Command[]; - - commandsDataColumn: TreeTableColumn[] = []; - - /** 参数列表 */ - paramsData = []; - - /** 按钮是否可用 */ - enableButtons = false; - - /** 选中已失效的命令: 只能删除不能编辑 */ - inValidCommandSelected = false; - - isSelectCommandNode = true; - - /** 当前选中的命令id,用于定位树表行 */ - selectedCommandId: string; - - /** 命令树表实例 */ - @ViewChild('tt') cmdTree: TreeTableComponent; - - /** 当前选中的左侧节点(命令) */ - currentTreeNode: Command | any; - - - @ViewChild('methodNameTpl') methodNameTpl: TemplateRef; - - constructor( - private domService: DomService, - private actionsBuilder: ActionsBuilder, - private msgService: MessagerService, - private notifyService: NotifyService, - private webCmdHandlerManager: WebCmdHandlerManager, - private resolver: ComponentFactoryResolver, - private modalService: BsModalService, - private injector: Injector, - private loading: LoadingService) { } - - ngOnInit(): void { - this.commandsDataColumn = [{ field: 'name', title: '方法名称', template: this.methodNameTpl, showTips: true }, { field: 'code', title: '方法编号', showTips: true }]; - - this.subscriptions = []; - this.subscriptions.push(this.actionsBuilder.subscribe( - commands => { - if (typeof (commands) === 'object' && commands.flag === 'error') { - this.loading.close(); - this.msgService.warning(commands.msg); - this.enableButtons = false; - } else { - this.refresh(commands); - this.enableButtons = true; - this.loading.close(); - } - - }, - err => { - this.loading.close(); - this.msgService.warning(err); - this.enableButtons = false; - })); - } - - ngOnDestroy() { - for (const subscription of this.subscriptions) { - subscription.unsubscribe(); - } - } - - /** - * 初始模型数据 - */ - refreshVmMethod() { - const vmBuilder = new ViewModelListBuilder(this.domService); - - const result = vmBuilder.resolveViewModelList(); - if (!result) { - return; - } - this.viewModelTabs = result.viewModelTabs || []; - - // 保留上次选中的模型 - if (this.activeViewModel) { - const vm = this.viewModelTabs.find(v => v.id === this.activeViewModel.id); - if (vm) { - this.activeViewModel = this.domService.module.viewmodels.find(v => v.id === vm.id); - } else { - this.activeViewModel = result.activeViewModel; - } - } else { - this.activeViewModel = result.activeViewModel; - } - - - this.loading.show(); - - this.currentTreeNode = null; - - window.suspendChangesOnForm = true; - - this.actionsBuilder.build(this.activeViewModel.commands); - } - - - /** - * 行颜色 - */ - rowCls = (treeNode) => { - if (treeNode.isInValid) { - return { - style: { - color: '#a2a2a2' - } - }; - } - return { - style: { - color: '#424347' - } - }; - } - - /** - * 切换组件 - * @param viewModelId 视图模型id - */ - onViewModelChanged(viewModelId: string) { - window.suspendChangesOnForm = true; - this.activeViewModel = this.domService.module.viewmodels.find(v => v.id === viewModelId); - this.loading.show(); - - this.selectedCommandId = null; - this.currentTreeNode = null; - - this.actionsBuilder.build(this.activeViewModel.commands); - } - - private refresh(data: any[]) { - - this.commandsData = data; - - // 记录选中id,treetable会在加载完成后触发定位 - if (data.length) { - this.cmdTree.selectValue = this.selectedCommandId ? this.selectedCommandId : this.commandsData[0].data.id; - } else { - this.cmdTree.selectValue = null; - } - - if (this.currentTreeNode && this.currentTreeNode.parent instanceof Command) { - const commandNode = this.commandsData.find(d => d.id === this.currentTreeNode.parent.id); - this.currentTreeNode = commandNode && commandNode.children.find(d => d.data.id === this.cmdTree.selectValue); - - } else { - this.currentTreeNode = this.commandsData.find(d => d.data && d.data.id === this.cmdTree.selectValue); - } - - this.updateViewModel(data); - this.refreshParamListData(); - - window.suspendChangesOnForm = false; - } - - /** - * 更新参数列表 - */ - private refreshParamListData() { - if (this.commandsData.length === 0) { - this.paramsData = []; - return; - } - if (this.currentTreeNode instanceof Command) { - this.paramsData = this.currentTreeNode.params || []; - } else { - this.paramsData = []; - } - } - - /** - * 将变更同步到表单DOM中 - * @param commands 命令列表 - */ - private updateViewModel(commands) { - if (!commands || !this.activeViewModel) { - return; - } - - const commandsJson = []; - if (commands.length > 0) { - for (const command of commands) { - if (command instanceof Command && command.toJson) { - commandsJson.push(command.toJson()); - } else { - commandsJson.push(command.data); - } - } - this.activeViewModel.commands = commandsJson; - } else { - this.activeViewModel.commands = []; - } - - } - - /** - * 切换选中的命令 - */ - changeSelectedComand(event: any) { - this.currentTreeNode = event.node; - - this.isSelectCommandNode = !!!event.node.parent; - this.selectedCommandId = this.currentTreeNode.id; - - // 已失效的命令: 只能删除,不能编辑 - if (event.node.isInValid) { - this.inValidCommandSelected = true; - this.paramsData = []; - return; - } - this.inValidCommandSelected = false; - - this.refreshParamListData(); - } - - /** - * 删除命令 - */ - onDeleteMethod() { - if (!this.currentTreeNode || !this.isSelectCommandNode) { - this.notifyService.warning('请先选择方法'); - return; - } - this.msgService.question('确定删除方法?', () => { - - // 删除后自动定位到下一条命令 - const index = this.commandsData.findIndex(d => d.id === this.currentTreeNode.id); - if (index > -1 && index < this.commandsData.length - 1) { - this.selectedCommandId = this.commandsData[index + 1].data.id; - } else { - this.selectedCommandId = null; - } - - const command = this.currentTreeNode as Command; - this.currentTreeNode = null; - - this.actionsBuilder.removeCommand(command); - this.webCmdHandlerManager.removeCommand(command); - - this.paramsData = []; - - this.notifyService.warning('删除方法后请重新绑定控件交互事件!'); - }); - - } - - /** - * 编辑命令名称和编号 - */ - onEditMethod() { - if (!this.currentTreeNode || !this.isSelectCommandNode) { - this.notifyService.warning('请先选择方法'); - return; - } - if (this.currentTreeNode.isInValid) { - this.notifyService.warning('方法已失效,不支持编辑'); - return; - } - const compFactory = this.resolver.resolveComponentFactory(CmdBasicEditorComponent); - const compRef = compFactory.create(this.injector); - const modalConfig = { - title: '编辑方法', - width: 450, - height: 220, - showMaxButton: false, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - compRef.instance.currentCommand = this.currentTreeNode; - compRef.instance.commands = this.commandsData; - compRef.instance.viewModelId = this.activeViewModel.id; - - const modalPanel = this.modalService.show(compRef, modalConfig); - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - - compRef.instance.submitModal.subscribe((data) => { - if (data) { - this.cmdTree.loadData(this.commandsData); - this.updateViewModel(this.commandsData); - modalPanel.close(); - } - }); - } - - /** - * 弹出命令选择器 - */ - onAddMethod() { - const compFactory = this.resolver.resolveComponentFactory(CommandSelectorComponent); - const compRef = compFactory.create(this.injector); - const modalConfig = { - title: '添加方法', - width: 600, - height: 560, - showMaxButton: true, - showButtons: true, - buttons: compRef.instance.modalFooter - }; - const modalPanel = this.modalService.show(compRef, modalConfig); - - compRef.instance.commandSelected.subscribe((d) => { - this.commandSelected(d.selectedCommands, d.newCmds); - modalPanel.close(); - }); - - compRef.instance.closeModal.subscribe(() => { - modalPanel.close(); - }); - } - - /** - * 添加命令事件 - */ - commandSelected(data: Array<{ cmd: WebCommand, cmp: WebCommandMetadata }>, newCmds: any[]) { - if (!data || data.length === 0) { - return; - } - - // 新增的构件 - const webcmdList = this.domService.getWebCmds(); - newCmds.forEach(newCmd => { - if (!webcmdList.find(c => c.id === newCmd.id)) { - webcmdList.push(newCmd); - } - }); - // 新增的命令 - data.forEach(d => { - const command = this.actionsBuilder.addCommand(d.cmd, d.cmp, this.activeViewModel.id); - this.webCmdHandlerManager.addCommand(command, d.cmd.Code); - }); - - - } - - /** - * 参数编辑器:选择应用时触发 - */ - onApplicationSelectionChange(event: any) { - const { result: { id = undefined, entrance = undefined } = null, command = null } = event || {}; - if (!command) { - return; - } - if (this.currentTreeNode.params) { - // 选择应用id后,自动填写应用入口参数 - if (entrance !== undefined) { - const property = this.currentTreeNode.params.find(item => item.name === 'appEntrance'); - if (property) { - property.value = entrance; - } - } - if (id !== undefined) { - const property = this.currentTreeNode.params.find(item => item.name === 'funcOrAppId'); - if (property) { - property.value = id; - } - } - } - this.updateViewModel(this.commandsData); - } - - /** - * 参数编辑器:变更参数值时触发 - * @param currentCommand 当前命令 - * @param currentParam 当前编辑参数 - * @param value 参数值 - */ - getParameterValue() { - this.updateViewModel(this.commandsData); - } - - - /** - * 更新当前命令的参数信息---用于构件中参数被移除的场景 - */ - updateCommandParamFromWebCmd() { - this.currentTreeNode.params = this.currentTreeNode.params.filter(co => !co.isDisused); - this.currentTreeNode.needRefreshParam = false; - - - this.refreshParamListData(); - - this.updateViewModel(this.commandsData); - - this.notifyService.success('更新成功'); - } - -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/actions-builder.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/actions-builder.ts deleted file mode 100644 index aacd7a3344ded66dfd916c0c45909422c47ed832..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/actions-builder.ts +++ /dev/null @@ -1,418 +0,0 @@ -/* eslint-disable @typescript-eslint/indent */ -import { NotifyService } from '@farris/ui-notify'; -import { map, catchError } from 'rxjs/operators'; -import { - FormBasicService, DomService, WebCommandMetadata, WebCommand, - FarrisMetadataDto, WebCommandMetadataConvertor -} from '@farris/designer-services'; -import { Case } from '../entity/case'; -import { ExecuteNode, OperationExtendLevel } from '../entity/execute-node'; -import { Extension } from '../entity/extension'; -import { OperationCollection } from '../entity/operation-collection'; -import { ParamConfig } from '../entity/param'; -import { SwitchNode } from '../entity/switch-node'; -import { ITreeNode } from '../entity/tree-node'; -import { Command } from '../entity/command'; -import { BehaviorSubject, ReplaySubject, Observable, of, forkJoin } from 'rxjs'; -import { Injectable } from '@angular/core'; -import { Operation, WebComponentMetadata } from '../entity/webcmp-metadata'; -import { IdService } from '@farris/ui-common'; -import { MessagerService } from '@farris/ui-messager'; -import { DesignerMetadataService } from '../../../service/designer-metadata.service'; - -@Injectable() -export class ActionsBuilder extends BehaviorSubject { - private commands: Command[] | any[]; - - private webcmds: ReplaySubject; - - private webcmps: ReplaySubject; - - constructor( - private domService: DomService, - private formBasicService: FormBasicService, - private metadataService: DesignerMetadataService, - private msgService: MessagerService, - private notifyService: NotifyService, - private idService: IdService - ) { - super([]); - this.commands = []; - this.webcmds = new ReplaySubject(1); - this.webcmps = new ReplaySubject(1); - } - - public build(commandsJson: any) { - this.loadWebcmd().subscribe(webcmds => { - this.commands = []; - commandsJson.forEach(commandJson => { - if (commandJson.isInvalid) { - const node = { - data: commandJson, - selectable: true, - code: commandJson.code, - cmpId: commandJson.cmpId, - isInValid: true - } as any; - this.commands.push(node); - return; - } - const webcmd = webcmds.find(item => item.Id === commandJson.cmpId); - if (!webcmd) { - return; - } - const webCommand = webcmd.Commands.find(item => item.Code === commandJson.handlerName); - if (!webCommand) { - const node = { - data: commandJson, - selectable: true, - id: commandJson.id, - code: commandJson.code, - cmpId: commandJson.cmpId, - isInValid: true - } as any; - this.commands.push(node); - return; - } - const command = new Command(webCommand, commandJson, webcmd); - - // 唯一化id,如果添加多个相同命令,操作的id会重复,树节点开不开。 - this.recursiveUniqueId(command.children); - - this.commands.push(command); - - // 记录命令的参数是否需要刷新 - if (command.params.length) { - const disusedParam = command.params.find(param => param.isDisused); - command.needRefreshParam = !!disusedParam; - } - }); - - this.next(this.commands); - }, err => { - // 若使用this.error 会导致流的中断,故使用next并增加flag标识 - this.next({ - flag: 'error', - msg: err - }); - }); - } - - /** - * 唯一化操作的id。如果添加多个相同命令,操作的id会重复,树节点的展开有问题 - */ - private recursiveUniqueId(arr: any[]) { - arr.forEach(item => { - item.id = this.idService.generate(); - if (item.children && item.children.length) { - this.recursiveUniqueId(item.children); - } - }); - } - - public addCommand(webCommand: WebCommand, cmp: WebCommandMetadata, viewModelId: string) { - const command = new Command(webCommand, cmp.Id, cmp); - command.id = this.idService.generate(); - - this.recursiveUniqueId(command.children); - - // 处理code、name - this.refreshCommandCodeName(command, viewModelId); - - this.commands.push(command); - this.next([...this.commands]); - return command; - } - - public removeCommand(command: Command) { - const index = this.commands.findIndex(item => item.id === command.id); - this.commands.splice(index, 1); - this.next([...this.commands]); - } - - public addExtension(type: number, parent: ExecuteNode) { - if (!parent) { - return; - } - - let msg; - let extension: Extension; - switch (type) { - case 1: - if (!parent.preExtendable) { - msg = '构件不允许正在编辑的节点进行操作前扩展。'; - break; - } else if (parent.preExtension) { - msg = '正在编辑的节点已经存在操作前扩展。'; - break; - } - extension = new Extension(); - extension.type = 'InsertBefore'; - parent.preExtension = extension; - break; - case 2: - if (!parent.replaceable) { - msg = '构件不允许正在编辑的节点进行操作替换。'; - break; - } else if (parent.replaceExtension) { - msg = '正在编辑的节点已经存在操作替换。'; - break; - } - extension = new Extension(); - extension.type = 'Replace'; - parent.replaceExtension = extension; - break; - case 3: - if (!parent.postExtendable) { - msg = '构件不允许正在编辑的节点进行操作后扩展。'; - break; - } else if (parent.postExtension) { - msg = '正在编辑的节点已经存在操作后扩展。'; - break; - } - extension = new Extension(); - extension.type = 'InsertAfter'; - parent.postExtension = extension; - break; - } - if (msg) { - this.notifyService.warning(msg); - } else if (extension) { - extension.isEditing = true; - extension.id = this.idService.generate(); - extension.position = parent.id; - extension.tasks = []; - this.next([...this.commands]); - (parent.root).extensions.push(extension); - (parent).expanded = true; - return extension; - } - } - - public addOperation(operation: Operation, parent: Extension | Case, cmpId: string, cmpCode: string) { - // 创建ExecuteNode - // const op = item.op; - const node = new ExecuteNode(); - node.id = this.idService.generate(); - const guid = this.idService.generate(); - node.code = operation.Code + '_' + guid.substr(0, 8); - node.name = operation.Name; - node.method = operation.Code; - node.serviceRefId = cmpId; - node.serviceName = ''; - node.cmpCode = cmpCode; - node.extendLevel = OperationExtendLevel.Form; - if (parent instanceof Extension) { - node.belongedExt = parent; - } else if (parent instanceof Case) { - node.belongedExt = parent.belongedExt; - } - node.params = []; - for (const parameter of operation.Parameters) { - const param = new ParamConfig(); - param.name = parameter.Code; - param.shownName = parameter.Name; - param.value = ''; - param.description = parameter.Description; - node.params.push(param); - } - // 插入节点到最后位置,,可以调整顺序。。 - parent.children.push(node); - - this.next([...this.commands]); - } - - public addSwitch(parent: ITreeNode) { - const siblings = parent.children; - if (siblings.length === 0) { - this.notifyService.warning('判断节点不能是第一个节点'); - return; - } - - const node = new SwitchNode(); - node.id = this.idService.generate(); - let i = 1; - let code: string; - while (true) { - code = 'Switch' + i; - if (!parent.children.find(item => item instanceof SwitchNode && item.code === code)) { - break; - } - ++i; - } - node.code = code; - node.name = '判断' + i; - node.cases = new Array(); - if (parent instanceof Extension) { - node.belongedExt = parent; - } else if (parent instanceof Case) { - node.belongedExt = parent.belongedExt; - } - parent.children.push(node); - - this.next([...this.commands]); - } - - public addCase(parent: ITreeNode) { - const node = new Case(); - node.id = this.idService.generate(); - node.name = '分支' + (parent.children.length + 1); - node.handlers = new OperationCollection(); - node.belongedExt = (parent).belongedExt; - parent.children.push(node); - - this.next(this.commands); - } - - public moveNode(node: ITreeNode, direction: 0 /*up*/ | 1 /*down*/) { - const parent = node.parent; - if (parent) { - const arr = parent.children; - const index = arr.findIndex(item => item === node); - if ((direction === 0 && index === 0) || (direction === 1 && index === arr.length - 1)) { - return; - } - const destIndex = index + direction * 2 - 1; // 上移+1 下移-1 - if ((destIndex === 0 && node instanceof SwitchNode) || (index === 0 && arr[destIndex] instanceof SwitchNode)) { - // 第一个节点不能是SwitchNode。 - this.notifyService.warning('判断节点不能是第一个节点'); - return; - } - arr[index] = arr[destIndex]; - arr[destIndex] = node; - this.next([...this.commands]); - } - } - - public removeExtNode(node: ITreeNode) { - const parent = node.parent; - - let msg: string; - if (!parent) { - this.showMsg('删除失败,未能正确查找到节点的父节点。', 'error'); - return; - } - - if (node instanceof Extension && parent instanceof ExecuteNode) { - switch (node.type) { - case 'InsertBefore': - parent.preExtension = null; - break; - case 'Replace': - parent.replaceExtension = null; - parent.replaced = false; - break; - case 'InsertAfter': - parent.postExtension = null; - break; - default: - break; - } - - const command = parent.root; - const extIndex = command.extensions.findIndex(item => item === node); - if (extIndex !== -1) { - command.extensions.splice(extIndex, 1); - } - } else { - const siblings = parent.children; - const index = siblings.findIndex(item => item === node); - - if (index === -1) { - this.showMsg('删除失败,无法定位此节点在数组中的位置。', 'error'); - return; - } - - if (index === 0 && siblings[1] instanceof SwitchNode) { - this.showMsg('无法删除。因为判断节点不能是第一个节点。', 'error'); - return; - } - - siblings.splice(index, 1); - } - - this.next([...this.commands]); - } - - /* #region private methods */ - - loadWebcmd() { - const webcmdInfos = this.domService.getWebCmds(); - const obs = []; - - const sessionId = ''; - const metadataInfo = this.formBasicService.formMetaBasicInfo; - const relativePath = metadataInfo ? metadataInfo.relativePath : ''; - for (const webcmdInfo of webcmdInfos) { - const metadataServ = this.metadataService.getMetadata(webcmdInfo.id); - const ob = metadataServ.pipe( - catchError(() => { - // return throwError(`应用服务器错误:获取元数据${webcmdInfo.name}【${webcmdInfo.id}】失败。`); - // 某一个控制器获取失败,不能影响其他控制器的数据组装 - this.msgService.warning(`获取元数据${webcmdInfo.name}失败,请检查。`); - return of(false); - }) - ); - obs.push(ob); - } - - let loadingObservable: Observable; - - if (obs.length) { - loadingObservable = forkJoin(obs); - } else { - loadingObservable = of([]); - } - - // 每次加载重新请求。 - return loadingObservable.pipe( - map(metadataList => { - return metadataList.filter(item => !!item).map(item => new WebCommandMetadataConvertor().InitFromJobject(JSON.parse(item.content))); - }) - ); - } - - getViewModelCommandLabel() { - const codeSet = new Set(); - const domJson = this.domService.getDomJson(); - const viewmodel = domJson.module.viewmodels; - viewmodel.forEach(viewmodelItem => { - viewmodelItem.commands.forEach(commandItem => { - codeSet.add(commandItem.code.toLowerCase()); - }); - }) - return codeSet; - } - - refreshCommandCodeName(command: Command, viewModelId: string) { - - // collect all command Codes - // const codeSet = new Set(); - // modified by wang-xh : code 不区分大小写 - // for (const item of this.commands) { - // codeSet.add(item.code.toLowerCase()); - // } - const codeSet = this.getViewModelCommandLabel(); - // generate code not used - let i = 1; - let newCode; - const vmId = viewModelId.replace(/-/g, ''); - while (true) { - newCode = vmId + command.code + i; - if (!codeSet.has(newCode.toLowerCase())) { - break; - } - ++i; - } - command.id = this.idService.generate(); - - // modified by wang-xh : 解决不同控制器handler重名的问题: 当前VMID+命令code+1 - command.name = command.name + i; - command.code = vmId + command.code + i; - } - - private showMsg(message: string, level: 'error' | 'warning' | 'info', title = '系统提示', timeout = 3000) { - this.notifyService[level](message); - } - /* #endregion */ -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/view-model-name.service.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/view-model-name.service.ts deleted file mode 100644 index e4942d5855d87021188381f98a62aaaceb6c137b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/view-model-name.service.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { DomService, FormComponentType } from '@farris/designer-services'; -import { DgControl } from '@farris/designer-ui'; - -export class ViewModelNameService { - - - constructor(private domService: DomService) { } - - getViewModelName(viewModelId: string, cmpName: string) { - const cmp = this.domService.getComponentByVMId(viewModelId); - if (cmp.fakeDel) { - return; - } - switch (cmp.componentType) { - case FormComponentType.Frame: { - return '根组件'; - } - case FormComponentType.dataGrid: { - return this.checkDataGridComponentName(cmp); - - } - case FormComponentType.attachmentPanel: case 'AttachmentPanel': { - return '附件组件'; - } - case FormComponentType.listView: case 'ListView': { - return '列表视图组件'; - } - case FormComponentType.appointmentCalendar: { - return '预约日历组件'; - } - case FormComponentType.modalFrame: { - return '弹窗页面组件'; - } - default: { - // 卡片组件取内部section的标题 - if (cmp.componentType.startsWith('form')) { - const section = cmp.contents.find(c => c.type === DgControl.Section.type); - if (section && section.mainTitle) { - return section.mainTitle + '组件'; - } - - } - } - } - return cmpName + '组件'; - } - - private checkDataGridComponentName(cmp: any) { - const treeGrid = this.domService.selectNode(cmp, (item) => item.type === DgControl.TreeGrid.type); - if (treeGrid) { - return '树表格组件'; - } - - const rootCmp = this.domService.components.find(c => c.componentType === 'Frame'); - const componentRefResult = this.domService.selectNodeAndParentNode(rootCmp, (item) => item.component === cmp.id, rootCmp); - if (!componentRefResult) { - return; - } - const componentRefParentContainer = componentRefResult.parentNode; - - // 列表组件取父层容器的标题:容器可能为标签页或者section - if (componentRefParentContainer.type === DgControl.TabPage.type) { - return componentRefParentContainer.title + '组件'; - } - if (componentRefParentContainer.type === DgControl.Section.type && componentRefParentContainer.mainTitle) { - return componentRefParentContainer.mainTitle + '组件'; - } - - return '表格组件'; - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/vm-list-builder.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/vm-list-builder.ts deleted file mode 100644 index f60076e9da49e40ab2f4b0e458bbae9491400707..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/vm-list-builder.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { DomService, FormComponentType, FormViewModel } from '@farris/designer-services'; -import { DgControl } from '@farris/designer-ui'; -import { ViewModelNameService } from './view-model-name.service'; - -/** - * 按照组件引用顺序构造视图模型列表 - */ -export class ViewModelListBuilder { - - constructor(private domService: DomService) { } - - resolveViewModelList(): { viewModelTabs: any[], activeViewModel: FormViewModel } { - if (!this.domService.module) { - return; - } - const vmNameService = new ViewModelNameService(this.domService); - const viewModelTabs = []; - - const viewModels = this.sortViewModels(); - viewModels.forEach(vm => { - if (vm.fakeDel) { - return; - } - const showName = vmNameService.getViewModelName(vm.id, vm.name); - if (showName) { - const cmp = this.domService.getComponentByVMId(vm.id); - viewModelTabs.push({ id: vm.id, name: showName, componentId: cmp.id }); - } - }); - return { viewModelTabs, activeViewModel: viewModels[0] }; - - } - /** - * 按照组件引用的顺序排列ViewModel节点 - */ - private sortViewModels() { - const rootCmp = this.domService.getComponentById('root-component'); - const cmpIdList = []; - this.getAllCmpIdsBySort(rootCmp, cmpIdList); - const components = this.domService.components.filter(c => c.componentType !== 'Frame'); - const sortedViewModels = []; - sortedViewModels.push(this.domService.getViewModelById(rootCmp.viewModel)); - cmpIdList.forEach(cmpId => { - const cmp = components.find(c => c.id === cmpId); - sortedViewModels.push(this.domService.getViewModelById(cmp.viewModel)); - }); - return sortedViewModels; - } - - private getAllCmpIdsBySort(domJson: any, cmpIdList: string[]) { - if (!domJson) { - return cmpIdList; - } - if (domJson.type === DgControl.ComponentRef.type) { - cmpIdList.push(domJson.component); - - // 列表弹出编辑/侧边栏编辑:单独处理 - const cmpNode = this.domService.getComponentById(domJson.component); - if (cmpNode && cmpNode.componentType === FormComponentType.dataGrid) { - const dataGrid = this.domService.selectNode(cmpNode, n => n.type === DgControl.DataGrid.type && n.enableEditByCard !== 'none' && n.modalComponentId); - if (dataGrid) { - const modalFrameCmp = this.domService.getComponentById(dataGrid.modalComponentId); - cmpIdList.push(dataGrid.modalComponentId); - this.getAllCmpIdsBySort(modalFrameCmp, cmpIdList); - } - } - } - - if (!domJson.contents || domJson.contents.length === 0) { - return cmpIdList; - } - for (const content of domJson.contents) { - - this.getAllCmpIdsBySort(content, cmpIdList); - } - return cmpIdList; - } - -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/webcmd-handler.manager.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/webcmd-handler.manager.ts deleted file mode 100644 index 059e0c08c71b6ef005675e7b95345466548fe9c2..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/method-manager/services/webcmd-handler.manager.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Command } from '../entity/command'; -import { DomService } from '@farris/designer-services'; -import { Injectable } from '@angular/core'; - -@Injectable() -export class WebCmdHandlerManager { - - constructor(private domService: DomService) { } - - addCommand(command: Command, handlerCode: string) { - const webCmds = this.domService.getWebCmds(); - if (webCmds instanceof Array) { - const webcmd = webCmds.find(item => item.id === command.cmpId); - if (webcmd) { - webcmd.refedHandlers = webcmd.refedHandlers || []; - webcmd.refedHandlers.push({ host: command.id, handler: handlerCode }); - } - } - } - - removeCommand(command: Command) { - const webCmds = this.domService.getWebCmds(); - if (webCmds instanceof Array) { - const webcmdIndex = webCmds.findIndex(item => item.id === command.cmpId); - if (webcmdIndex > -1) { - const webcmd = webCmds[webcmdIndex]; - const handlers = webcmd.refedHandlers; - const index = handlers.findIndex(item => item.host === command.id); - handlers.splice(index, 1); - if (handlers.length === 0) { - webCmds.splice(webcmdIndex, 1); - } - } - } - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/column.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/column.ts deleted file mode 100644 index e72d3e535230d827de4f1aca40bc5ba0caeb2cdd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/column.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { TemplateRef } from '@angular/core'; -import { FormVariableTypes } from '@farris/designer-services'; -import { EditorTypes } from '@farris/ui-datagrid-editors'; - -/** - * 初始列表的列配置 - */ -export const createVariableDataGridColumn = (opCell: TemplateRef) => { - return [ - { field: 'code', title: '变量编号', editor: { type: EditorTypes.TEXTBOX }, template: opCell, validators: [{ type: 'required', message: '变量编号不能为空!' }] }, - { field: 'name', title: '变量名称', editor: { type: EditorTypes.TEXTBOX }, template: opCell, validators: [{ type: 'required', message: '变量名称不能为空!' }] }, - { - field: 'type', title: '变量类型', - editor: { - type: EditorTypes.COMBOLIST, - options: { - valueField: 'value', - textField: 'text', - idField: 'value', - data: FormVariableTypes, - editable: false, - showClear: false, - enableCancelSelected: false - } - }, - formatter: { - type: 'enum', - options: { - valueField: 'value', - textField: 'text', - data: FormVariableTypes, - }, - }, - template: opCell - }, - { - field: 'category', title: '变量类别', readonly: true, - formatter: { - type: 'enum', - options: { - valueField: 'value', - textField: 'text', - data: [{ text: '组件变量', value: 'locale' }, { text: '表单变量', value: 'remote' }] - }, - }, - template: opCell - }, - { - field: 'sourceName', - title: '来源', - readonly: true - - } - ]; -}; diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.css b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.css deleted file mode 100644 index 0f1a55adc09fa7eecee6c87aa601de9f8b5ec7fb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.css +++ /dev/null @@ -1,117 +0,0 @@ -:host { - display: flex; - flex-grow: 1; - flex-basis: 0; - flex-direction: column !important; - flex-shrink: 1; - overflow: hidden; - height: 100%; -} - -.methodPanel { - padding: 10px 15px; -} - -.varible-toolbar { - display: flex; - align-items: center; - line-height: 18px; - color: #34495e; - padding-top: 4px; - padding-bottom: 10px; -} - -.varible-toolbar .toolbar-item { - display: flex; - cursor: pointer; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon { - position: relative; - height: 15px; - width: 15px; - border: 1px solid #5b89fe; - border-radius: 3px; - margin-right: 6px; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon::after { - content: "T"; - position: absolute; - top: 0; - left: 2px; - font-size: 12px; - line-height: 12px; - color: #4e56c4; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon::before { - font-family: FarrisExtend; - display: flex; - justify-content: center; - align-items: flex-end; - height: 10px; - width: 10px; - line-height: 8px; - color: #00cdba; - background-color: #fff; - position: absolute; - bottom: -2px; - right: -4px; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon-add::before { - content: "\e11e"; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon-delete::before { - content: "\e11b"; - color: #fa6c00; -} - -.varible-toolbar .toolbar-item .toolbar-item-icon-refresh::before { - content: "\e106"; -} - -.varible-toolbar .toolbar-item:hover { - color: #5B89FE; -} - -.varible-toolbar .toolbar-item-spilter { - width: 1px; - height: 12px; - margin: 0 10px; - background-image: linear-gradient(180deg, rgba(40, 60, 93, 0) 0%, rgba(40, 60, 93, 0.1) 23%, rgba(40, 60, 93, 0.1) 52%, rgba(40, 60, 93, 0.1) 84%, rgba(40, 60, 93, 0) 100%); - border-radius: 0.5px; -} - - -/* .vd-page-content-main .vd-page-content-grid { - display: flex; - flex: 1; - border: 1px solid #e9ecf3; - border-radius: 8px; - overflow: hidden; -} - -.vd-page-content-main .vd-page-content-grid .f-datagrid-header-fixed-left, -.vd-page-content-main .vd-page-content-grid .f-datagrid-body-fixed-left { - box-shadow: none; -} */ - -.cell-wrapper { - height: 100%; - display: flex; - justify-content: space-between; - align-items: center; - font-size: 13px; - color: #424347; -} - -.cell-wrapper .f-icon { - color: #878D99; -} - -.methodPanel>>>.f-datagrid-cell.cell-readonly .cell-text-box { - color: #424347; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.html b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.html deleted file mode 100644 index 48bd770fbe061cf6b2cb823af9557f9c190f17a1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.html +++ /dev/null @@ -1,35 +0,0 @@ -
    -
    -
    -
    - 添加变量 -
    -
    -
    -
    - 删除变量 -
    -
    -
    -
    - 刷新 -
    -
    -
    - - -
    -
    - - -
    - {{format(ctx)}} - - - - -
    -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.ts deleted file mode 100644 index 904beeab5617691943f5afeb02f6ab8be6585320..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/variable-manager/variable-manager.component.ts +++ /dev/null @@ -1,272 +0,0 @@ -import { - Component, - HostBinding, - OnInit, - TemplateRef, - ViewChild -} from '@angular/core'; -import { DomService, FormSchema, FormVariable, FormVariableCategory, FormVariableTypes, FormViewModel, SchemaService } from '@farris/designer-services'; -import { NotifyService } from '@farris/ui-notify'; -import { IdService } from '@farris/ui-common'; -import { DataColumn, DatagridComponent } from '@farris/ui-datagrid'; -import { of } from 'rxjs'; -import { createVariableDataGridColumn } from './column'; -import { ViewModelNameService } from '../method-manager/services/view-model-name.service'; - -const ROOT_VIEW_MODEL_ID = 'root-viewmodel'; -@Component({ - selector: 'app-variable-manager', - templateUrl: 'variable-manager.component.html', - styleUrls: ['variable-manager.component.css'] -}) -export class VaribleManagerComponent implements OnInit { - /** 列表列配置 */ - columns = []; - /** 变量类别枚举 */ - private categoryTypes = [{ text: '组件变量', value: 'locale' }, { text: '表单变量', value: 'remote' }]; - - /** 当前表单内所有的变量,不区分视图模型 */ - variableList = []; - - showAllCheckbox = true; - @ViewChild('opCell') opCell: TemplateRef; - @ViewChild('dg') dg: DatagridComponent; - - constructor( - private notifyService: NotifyService, - private domService: DomService, - private schemaService: SchemaService) { } - - ngOnInit(): void { - this.columns = createVariableDataGridColumn(this.opCell); - } - initVariableList() { - this.variableList = []; - if (!this.domService.module) { - return; - } - this.getRemoteVariables(); - this.getLocalVariables(); - } - /** - * 获取表单变量 - */ - private getRemoteVariables() { - const rootVm = this.domService.viewmodels[0]; - if (rootVm && rootVm.states) { - const remoteVars = rootVm.states.filter(s => s.category === FormVariableCategory.remote); - if (remoteVars && remoteVars.length) { - remoteVars.forEach(state => { - const nodeData = Object.assign({ hId: state.id, viewModelId: rootVm.id, sourceName: '视图对象' }, state); - this.variableList.push(nodeData); - }); - } - } - - } - /** - * 获取组件变量 - */ - private getLocalVariables() { - let hasLocalVar = false; - this.domService.viewmodels.forEach(vm => { - if (!vm.states || !vm.states.length) { - return; - } - vm.states.forEach(state => { - if (state.category === FormVariableCategory.locale) { - const sourceName = this.getViewModelSourceName(vm, state); - const hId = new IdService().generate(); - const nodeData = Object.assign({ hId, viewModelId: vm.id, sourceName }, state); - this.variableList.push(nodeData); - hasLocalVar = true; - } - - }); - }); - - this.showAllCheckbox = hasLocalVar; - } - /** - * 格式化单元格显示文本 - * @param row 行数据 - */ - format(row: any) { - const displayText = row.rowData[row.field]; - if (row.field === 'type') { - const data = FormVariableTypes.find(c => c.value === displayText); - return data ? data.text : displayText; - } - if (row.field === 'category') { - const data = this.categoryTypes.find(c => c.value === displayText); - return data ? data.text : displayText; - } - return displayText; - } - /** - * 同步表单变量(vo->schema) - */ - onRefresh() { - const voId = this.domService.module.schemas[0].id; - const sessionId = ''; - this.schemaService.converVO2Schema(voId, sessionId).subscribe((newSchema: FormSchema) => { - if (!newSchema) { - this.notifyService.error('更新失败!'); - } else { - const newVariables = newSchema.variables || []; - this.domService.updateRemoteVariables(newVariables); - this.initVariableList(); - this.dg.loadData(this.variableList); - this.notifyService.success('更新成功!'); - - this.dg.clearAll(); - this.dg.clearCheckeds(); - } - - }); - - } - /** - * 表单变量所在的行需要禁用 - */ - disableRowFn = (row) => { - return row.category === FormVariableCategory.remote; - } - - /** - * 添加变量,默认添加到根组件 - */ - onAddElement() { - const newData = new FormVariable(); - newData.id = new IdService().generate(); - newData['hId'] = new IdService().generate(); - newData.type = 'String'; - - this.variableList.push(Object.assign({ viewModelId: ROOT_VIEW_MODEL_ID, sourceName: '根组件' }, newData)); - this.dg.loadData(this.variableList); - - this.showAllCheckbox = true; - } - - - onDeleteElement() { - const checkeds = this.dg.checkeds; - if (!checkeds || !checkeds.length) { - this.notifyService.info('请勾选要删除的行!'); - return; - } - const remoteVariableIndex = checkeds.findIndex(c => c.data && c.data.category === FormVariableCategory.remote); - if (remoteVariableIndex > -1) { - this.notifyService.info('不可删除表单变量!'); - } - checkeds.forEach(c => { - if (c.data.category === FormVariableCategory.locale) { - this.variableList = this.variableList.filter(e => c.data.hId !== e.hId); - this.syncViewModelAfterDelete(c.data); - - } - }); - - this.dg.loadData(this.variableList); - this.dg.clearAll(); - this.dg.clearCheckeds(); - - const localIndex = this.variableList.findIndex(v => v.category === FormVariableCategory.locale); - this.showAllCheckbox = localIndex >= 0; - - } - - - afterGridEdit = (rowIndex: number, rowData: any, column?: DataColumn, editor?: any) => { - // 校验编号唯一 - if (column.field === 'code') { - if (!this.checkUniqueCode({ code: editor.formControl.value, id: rowData.id })) { - return of(false); - } - } - // 去除空格,不可为空 - if (column.field === 'code' && (!editor.formControl.value || !editor.formControl.value.trim())) { - // this.notifyService.warning('变量编号不能为空'); - return of(false); - } - // 去除空格,不可为空 - if (column.field === 'name' && (!editor.formControl.value || !editor.formControl.value.trim())) { - // this.notifyService.warning('变量名称不能为空'); - return of(false); - } - return of(true); - - } - /** - * 编辑结束后事件 - */ - endEdit(res: any) { - this.syncViewModelAfterEdit(res.rowData, { - field: res.column.field, - value: res.value, - }); - } - - private syncViewModelAfterEdit(rowData, changeObject) { - // 校验不通过时,单元格重置为编辑态 - if (changeObject.field === 'code' && !this.checkUniqueCode(rowData)) { - return; - } - const code = rowData.code && rowData.code.trim(); - const name = rowData.name && rowData.name.trim(); - if (!code || !name || !rowData.type) { - return; - } - - // 若当前行已填写完毕,则同步视图模型 - const viewModelId = rowData.viewModelId || ROOT_VIEW_MODEL_ID; - const vm = this.domService.getViewModelById(viewModelId); - if (vm) { - const stateInVM = vm.states.find(state => state.id === rowData.id); - if (stateInVM) { - Object.assign(stateInVM, { - code, - name, - type: rowData.type - }); - } else { - vm.states.push({ - id: rowData.id, - code, - name, - type: rowData.type, - category: rowData.category - }); - } - } - - - } - private syncViewModelAfterDelete(rowData) { - const viewModelId = rowData.viewModelId || ROOT_VIEW_MODEL_ID; - - const vm = this.domService.getViewModelById(viewModelId); - vm.states = vm.states.filter(s => s.id !== rowData.id); - } - private checkUniqueCode(newData: any) { - if (!newData.code) { - return true; - } - if (this.variableList.findIndex(d => d.code === newData.code && d.id !== newData.id) > -1) { - this.notifyService.warning('变量编号已存在,请修改'); - return false; - } - return true; - } - - private getViewModelSourceName(viewModel: FormViewModel, state: FormVariable) { - // 表单变量来源于vo - if (state.category === FormVariableCategory.remote) { - return '视图对象'; - } - - const vmNameService = new ViewModelNameService(this.domService); - - return vmNameService.getViewModelName(viewModel.id, viewModel.name); - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.css b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.css deleted file mode 100644 index fab9a426fb3261f109b3756ceac87cd93e542f51..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.css +++ /dev/null @@ -1,54 +0,0 @@ -.vm-navbar { - height: 44px; - min-height: 44px; - margin-top: 0 !important; - align-items: center; - display: flex; - margin-left: 20px; -} - -.vm-navbar .app-list .nav { - flex-wrap: nowrap; - margin: 0 auto; - border-radius: 10px; -} - -.vm-navbar .app-list .nav li { - font-size: 14px; - white-space: nowrap; - align-items: center; - display: flex; - cursor: pointer; - font-weight: 500; - padding: 0px 66px; -} - -.vm-navbar .app-list .nav li.active { - background: #eff4ff; - border-radius: 10px; - color: #5b89fe; -} - -.vm-navbar .app-list .nav li.active .line { - width: 80%; - height: 3px; - background-image: linear-gradient(46deg, #2E77FF 0%, #2A87FF 100%); - box-shadow: 0px 2px 10px 0px #8ba0d6; - position: absolute; - bottom: 4px; - border-radius: 1.5px -} - -.vm-navbar .app-list .arrow-down { - width: 52px; - line-height: 34px; - border-left: 1px solid #d8dce6; - display: block; - height: 28px; - color: #878d99; - cursor: pointer -} - -.vm-navbar .app-list .arrow-down span.f-icon { - font-size: 18px -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.html b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.html deleted file mode 100644 index 214739cc922eae99f4af782bc84e53bb5a37883d..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
    - -
    -
    - - -
    -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.ts deleted file mode 100644 index a83db63723a803fd8c8071e42fd744ea8fc307fd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, HostBinding, OnInit, ViewChild } from '@angular/core'; -import { MethodManagerComponent } from './method-manager/method-manager.component'; -import { VaribleManagerComponent } from './variable-manager/variable-manager.component'; - - -@Component({ - selector: 'app-vm-designer', - templateUrl: './vm-designer.component.html', - styleUrls: ['./vm-designer.component.css'] -}) -export class VmDesignerComponent implements OnInit { - - @ViewChild('variable') private variableComponent: VaribleManagerComponent; - @ViewChild('method') private methodComponent: MethodManagerComponent; - - - /** 右侧显示类型:方法method|变量variable */ - showType = 'method'; - - @HostBinding('class') - class = 'f-utils-fill-flex-row w-100 h-100 bg-white'; - - ngOnInit(): void { - } - - refreshVmMetadata() { - - this.methodComponent.refreshVmMethod(); - - // 初始右侧变量列表 - this.variableComponent.initVariableList(); - } - - onChangeLeftNode(type: string) { - this.showType = type; - } - - /** - * 由设计切换到实体视图时,自动刷新变量列表。(目的是刷新组件变量) - */ - refreshVmDesigner() { - this.refreshVmMetadata(); - } -} diff --git a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.module.ts b/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.module.ts deleted file mode 100644 index 7950542637827def3f4a1523b4ced878635f53cd..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/app/form-editor/vm-designer/vm-designer.module.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -// import { CacheService, GSP } from '@farris/ide-devkit'; -import { LoadingService, LoadingModule } from '@farris/ui-loading'; -import { SwitchModule } from '@farris/ui-switch'; -import { TreeTableModule } from '@farris/ui-treetable'; -import { MessagerModule } from '@farris/ui-messager'; -import { FarrisTabsModule } from '@farris/ui-tabs'; -import { FarrisTooltipModule } from '@farris/ui-tooltip'; -import { environment } from '../../../environments/environment'; -import { CmdBasicEditorComponent } from './method-manager/cmd-basic-editor/cmd-basic-editor.component'; -import { MethodManagerComponent } from './method-manager/method-manager.component'; -import { VaribleManagerComponent } from './variable-manager/variable-manager.component'; -import { VmDesignerComponent } from './vm-designer.component'; -import { DatagridModule } from '@farris/ui-datagrid'; -import { CommandSelectorComponent } from './method-manager/command-selector/command-selector.component'; -// import { FarrisIDEParameterEditorModule } from '@farris/ide-parameter-editor'; -import { SplitterModule } from '@farris/ui-splitter'; -import { AngularDraggableModule } from '@farris/ui-draggable'; -import { AppNavigationSelectorComponent, AppNavigationSelectorModule } from '@farris/app-navigation-selector'; - - -@NgModule({ - - declarations: [ - VmDesignerComponent, - MethodManagerComponent, - VaribleManagerComponent, - CmdBasicEditorComponent, - CommandSelectorComponent - ], - imports: [ - BrowserModule, - CommonModule, - FormsModule, - SwitchModule, - LoadingModule.forRoot({ - message: '加载中,请稍候...' - }), - TreeTableModule, - MessagerModule, - FarrisTabsModule, - FarrisTooltipModule, - DatagridModule, - // FarrisIDEParameterEditorModule, - SplitterModule, - AngularDraggableModule, - AppNavigationSelectorModule - ], - providers: [ - LoadingService, - // { provide: CacheService, useValue: gsp.cache } - ], - bootstrap: [VmDesignerComponent], - exports: [VmDesignerComponent], - entryComponents: [CmdBasicEditorComponent, CommandSelectorComponent, AppNavigationSelectorComponent], -}) -export class VMDesignerModule { } diff --git a/packages/designer/projects/form-designer/src/assets/.gitkeep b/packages/designer/projects/form-designer/src/assets/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.css deleted file mode 100644 index a7589e8f853dde8543242e7d1433d062f858cf34..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.css +++ /dev/null @@ -1,493 +0,0 @@ -@font-face { - font-family: "fd-i-Family"; - src:url('iconfont.ttf?t=1640255080725') format('truetype'); -} - -.fd-i-Family { - font-family: "fd-i-Family" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.fd_pc-ResponseLayout4:before { - content: "\e601"; -} - -.fd_pc-ResponseLayout3:before { - content: "\e602"; -} - -.fd_pc-ResponseLayout2:before { - content: "\e603"; -} - -.fd_pc-ResponseLayout1:before { - content: "\e604"; -} -.fd_pc-CitySelector:before { - content: "\e600"; -} -.fd_pc-shenpiyijian:before { - content: "\e073"; -} - -.fd_pc-a-1111:before { - content: "\e072"; -} - -.fd_pc-eventCode:before { - content: "\e071"; -} - -.fd_pc-delete-element:before { - content: "\e070"; -} - -.fd_pc-enable-function:before { - content: "\e06f"; -} - -.fd_pc-dragHandler:before { - content: "\e06e"; -} - -.fd_pc-editEvent:before { - content: "\e06d"; -} - -.fd_pc-extend-setting:before { - content: "\e06c"; -} - -.fd_pc-variable-setting:before { - content: "\e06b"; -} - -.fd_pc-leaf-node:before { - content: "\e06a"; -} - -.fd_pc-import-from-cdm:before { - content: "\e069"; -} - -.fd_pc-root-node:before { - content: "\e068"; -} - -.fd_pc-push:before { - content: "\e6067"; -} - -.fd_pc-save-sync:before { - content: "\e066"; -} - -.fd_pc-delete-obj:before { - content: "\e065"; -} - -.fd_pc-sync-bizelements:before { - content: "\e064"; -} - -.fd_pc-basic-info:before { - content: "\e063"; -} - -.fd_pc-advanced-setting:before { - content: "\e062"; -} - -.fd_pc-add-new-element:before { - content: "\e061"; -} - -.fd_pc-corner-marks-right-bottom:before { - content: "\e060"; -} - -.fd_pc-add-virtual-element:before { - content: "\e05f"; -} - -.fd_pc-cancel:before { - content: "\e05e"; -} - -.fd_pc-add-child-obj:before { - content: "\e05d"; -} - -.fd_pc-add-same-obj:before,.fd_pc-imageupload:before{ - content: "\e05c"; -} - -.fd_pc-yilaiguanxi:before { - content: "\e05b"; -} - -.fd_pc-shanchu:before { - content: "\e05a"; -} - -.fd_pc-gengduo:before { - content: "\e059"; -} - -.fd_pc-git:before { - content: "\e058"; -} - -.fd_pc-shouji:before { - content: "\e057"; -} - -.fd_pc-diannao:before { - content: "\e056"; -} - -.fd_pc-quanxian:before { - content: "\e055"; -} - -.fd_pc-daorudaochu:before { - content: "\e054"; -} - -.fd_pc-dayinshezhi:before { - content: "\e053"; -} - -.fd_pc-yewuliu:before { - content: "\e052"; -} - -.fd_pc-shujuzhuanhuanguize:before { - content: "\e051"; -} - -.fd_pc-shenjirizhi:before { - content: "\e050"; -} - -.fd_pc-bianmaguize:before { - content: "\e04f"; -} - -.fd_pc-zhuanyebanshejiqi:before { - content: "\e04e"; -} - -.fd_pc-lingdaimashejiqi:before { - content: "\e04d"; -} - -.fd_pc-didaimashejiqi:before { - content: "\e04c"; -} - -.fd_pc-geshidingzhi:before { - content: "\e04b"; -} - -.fd_pc-kuozhankaifa:before { - content: "\e04a"; -} - -.fd_pc-dingzhi:before { - content: "\e049"; -} - -.fd_pc-ziyuanguanliqi:before { - content: "\e048"; -} - -.fd_pc-zhedieshouqi:before { - content: "\e047"; -} - -.fd_pc-zhediezhankai:before { - content: "\e046"; -} - -.fd_pc-xianshiID:before { - content: "\e045"; -} - -.fd_pc-sousuo:before { - content: "\e044"; -} - -.fd_pc-shuaxin:before { - content: "\e043"; -} - -.fd_pc-anheimoshiqidongtai:before { - content: "\e042"; -} - -.fd_pc-anheimoshi:before { - content: "\e041"; -} -.fd_pc-Tag:before { - content: "\e040"; -} - -.fd_pc-HtmlTemplate:before { - content: "\e03f"; -} - -.fd_pc-ButtonGroup:before { - content: "\e03e"; -} - -.fd_pc-DisplayField:before,.fd_pc-StaticText:before { - content: "\e03d"; -} - -.fd_pc-QdpFramework:before { - content: "\e03c"; -} - -.fd_pc-CheckGroup:before { - content: "\e03b"; -} - -.fd_pc-ListNav:before { - content: "\e03a"; -} - -.fd_pc-NavTab:before { - content: "\e039"; -} - -.fd_pc-FilePreview:before { - content: "\e038"; -} - -.fd_pc-Section:before { - content: "\e037"; -} - -.fd_pc-jingtaiwenben:before { - content: "\e036"; -} - -.fd_pc-DiscussionList:before { - content: "\e035"; -} - -.fd_pc-PersonnelSelector:before { - content: "\e034"; -} - -.fd_pc-Tags:before { - content: "\e033"; -} - -.fd_pc-Module:before { - content: "\e032"; -} - -.fd_pc-MultiSelect:before { - content: "\e031"; -} - -.fd_pc-Sidebar:before { - content: "\e030"; -} - -.fd_pc-Steps:before { - content: "\e02f"; -} - -.fd_pc-Splitter:before { - content: "\e02e"; -} - -.fd_pc-Scrollspy:before { - content: "\e02d"; -} - -.fd_pc-MultiViewContainer:before { - content: "\e02c"; -} - -.fd_pc-ListView:before { - content: "\e02b"; -} - -.fd_pc-Charts:before { - content: "\e02a"; -} - -.fd_pc-Image:before { - content: "\e029"; -} - -.fd_pc-ScrollCollapsibleArea:before { - content: "\e028"; -} - -.fd_pc-ModalFooter:before { - content: "\e027"; -} - -.fd_pc-Wizard:before { - content: "\e026"; -} - -.fd_pc-Header:before { - content: "\e025"; -} - -.fd_pc-Component:before { - content: "\e024"; -} - -.fd_pc-DataGrid:before { - content: "\e023"; -} - -.fd_pc-mingxibiao2:before { - content: "\e022"; -} - -.fd_pc-tubiao:before { - content: "\e021"; -} - -.fd_pc-QueryScheme:before { - content: "\e020"; -} - -.fd_pc-liushuihao:before { - content: "\e01f"; -} - -.fd_pc-SwitchField:before { - content: "\e01e"; -} - -.fd_pc-LookupEdit:before { - content: "\e01d"; -} - -.fd_pc-erweima:before { - content: "\e01c"; -} - -.fd_pc-RadioGroup:before { - content: "\e01b"; -} - -.fd_pc-OrganizationSelector:before { - content: "\e01a"; -} - -.fd_pc-ApprovalLogs:before { - content: "\e019"; -} - -.fd_pc-EnumField:before { - content: "\e018"; -} - -.fd_pc-InputGroup:before { - content: "\e017"; -} - -.fd_pc-MultiTextBox:before { - content: "\e016"; -} - -.fd_pc-Tab:before { - content: "\e015"; -} - -.fd_pc-OCR:before { - content: "\e014"; -} - -.fd_pc-NumericBox:before { - content: "\e013"; -} - -.fd_pc-FieldSet:before { - content: "\e012"; -} - -.fd_pc-ListFilter:before { - content: "\e011"; -} - -.fd_pc-Avatar:before { - content: "\e010"; -} - -.fd_pc-DateBox:before { - content: "\e00f"; -} - -.fd_pc-LanguageTextBox:before { - content: "\e00e"; -} - -.fd_pc-DiscussionEditor:before { - content: "\e00d"; -} - -.fd_pc-Button:before { - content: "\e00c"; -} - -.fd_pc-yuyinshuru:before { - content: "\e00b"; -} - -.fd_pc-RichTextBox:before { - content: "\e00a"; -} - -.fd_pc-dizhi:before { - content: "\e009"; -} - -.fd_pc-TimePicker:before { - content: "\e008"; -} - -.fd_pc-TextBox:before { - content: "\e007"; -} - -.fd_pc-ViewModel:before { - content: "\e006"; -} - -.fd_pc-CheckBox:before { - content: "\e005"; -} - -.fd_pc-FileUpload:before { - content: "\e004"; -} - -.fd_pc-TreeGrid:before { - content: "\e003"; -} - -.fd_pc-Form:before { - content: "\e002"; -} - -.fd_pc-ContentContainer:before { - content: "\e001"; -} - -.fd_pc-fenlanmianban:before { - content: "\e000"; -} - diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.ttf b/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.ttf deleted file mode 100644 index d30de0f48c4d33baa082d126edacd6a4aa9a6687..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/icon/iconfont.ttf and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-1.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-1.png deleted file mode 100644 index acca8ce20ac267d0745017fb68fa65922375864c..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-1.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-2.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-2.png deleted file mode 100644 index 737cf25b0190e86069161f0f9a3876f3073455ad..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-2.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-3.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-3.png deleted file mode 100644 index 8323a173b843d5658fe2a9ea50cec5aed0277a7f..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/collection/list-view/avatar-3.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/discussion/list/avatar.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/discussion/list/avatar.png deleted file mode 100644 index 737cf25b0190e86069161f0f9a3876f3073455ad..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/discussion/list/avatar.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/avatar/avatar-input.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/avatar/avatar-input.png deleted file mode 100644 index c25a1ef639ef56d95ad39bd861c6a9f63afb1487..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/avatar/avatar-input.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/image/img-input.jpg b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/image/img-input.jpg deleted file mode 100644 index 67db76098ff3d996b2930a44713876f0df405edc..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/image/img-input.jpg and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/qr-code/qr-code.png b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/qr-code/qr-code.png deleted file mode 100644 index 389c7fb1e60f7f097fa10fd8082ef89a78be8005..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/qr-code/qr-code.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/advanced.jpg b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/advanced.jpg deleted file mode 100644 index 16cc60fa8968aada8604baec704675407912f4c9..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/advanced.jpg and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/normal.jpg b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/normal.jpg deleted file mode 100644 index fb98fc0228dc872e12eb14c505ba320906e7f7af..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/input/rich-text-box/normal.jpg and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/charts/charts.jpg b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/charts/charts.jpg deleted file mode 100644 index a253be934e533ae6abf0c54108a51bb7cb92ec0b..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/charts/charts.jpg and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/spreadsheet/spreadsheet.svg b/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/spreadsheet/spreadsheet.svg deleted file mode 100644 index fb4ab0262728595ae1115f3f724eeff31991a423..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/images/qdp/spreadsheet/spreadsheet.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - 编组 8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/appointment-calendar.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/appointment-calendar.css deleted file mode 100644 index 0c3f31a2efbe79d9b538a8b7c48761e4201b26c0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/appointment-calendar.css +++ /dev/null @@ -1,332 +0,0 @@ -@charset "UTF-8"; - -.rtv-container { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - background: white; -} - -.rtv-container .room-subject { - background: #dae9ff; - border-radius: 2px; - height: 100%; - cursor: pointer; -} - -.rtv-container .room-subject dt { - font-size: 13px; - text-overflow: ellipsis; - overflow: hidden; -} - -.rtv-container .room-subject_category { - padding: 0px 4px; - border-radius: 4px; - margin-right: 8px; - font-size: 12px; - display: inline-block; - line-height: 20px; -} - -.rtv-container .room-subject.gray { - background-color: #f0f0f0; -} - -.rtv-container .room-subject.gray .room-subject_category { - border: 1px solid #cccccc; - background: #F2F3F5; - color: #878d99; -} - -.rtv-container .room-subject.blue { - background: #dae9ff; -} - -.rtv-container .room-subject.blue .room-subject_category { - border: 1px solid #99bbff; - background: #99bbff; - color: #ffffff; -} - -.rtv-container .room-subject.orange { - background: #ffedda; -} - -.rtv-container .room-subject.orange .room-subject_category { - border: 1px solid #ff772e; - background: #ff772e; - color: #fff5ea; -} - -.rtv-container .room-subject.mintgreen { - background: #daffe0; -} - -.rtv-container .room-subject.mintgreen .room-subject_category { - border: 1px solid #42fc57; - background: #42fc57; - color: #449e00; -} - -.rtv-container .room-subject.red { - background: #ffdada; -} - -.rtv-container .room-subject.red .room-subject_category { - border: 1px solid #ff8383; - background: #ffa4a4; - color: #ae0000; -} - -.rtv-container .room-subject.pink { - background: #f6daff; -} - -.rtv-container .room-subject.pink .room-subject_category { - border: 1px solid #f867d6; - background: #f867d6; - color: #ffe2ef; -} - -.rtv-container .room-subject.bluegreen { - background: #dafffe; -} - -.rtv-container .room-subject.bluegreen .room-subject_category { - border: 1px solid #2ac3ac; - background: #2ac3ac; - color: #efffe5; -} - -.rtv-container .text-center { - align-items: center; - justify-content: center; -} - -.rtv-container .toolbar { - height: 50px; - width: 100%; - border-bottom: 1px solid #E9ECF3; - display: flex; - align-items: center; - padding-left: 20px; -} - -.rtv-container .toolbar button:focus, .rtv-container .toolbar button:active { - outline: none !important; -} - -.rtv-container .toolbar .view-type { - width: 131px; - height: 32px; - line-height: 32px; - background: #EFF5FF; - border-radius: 32px; - display: flex; - align-items: center; -} - -.rtv-container .toolbar .view-type .btn-day, .rtv-container .toolbar .view-type .btn-week { - width: 64px; - height: 30px; - border-radius: 32px; - background: none; - border: 0; - font-weight: 400; - cursor: pointer; -} - -.rtv-container .toolbar .view-type .btn-active { - background: rgba(255, 255, 255, 0.75); - box-shadow: 0px 4px 18px 0px rgba(2, 75, 193, 0.2); - color: #0091DA; - cursor: default; -} - -.rtv-container .toolbar .line { - height: 20px; - width: 20px; - display: inline-block; - border-right: 1px solid #E6E9F0; - margin-right: 20px; -} - -.rtv-container .toolbar .btns { - display: flex; - width: 112px; - margin-right: 20px; -} - -.rtv-container .toolbar .btns button { - height: 26px; - background: #FFFFFF; - border: 1px solid rgb(232, 235, 242); - box-shadow: 0px 2px 6px 0px rgba(31, 35, 41, 0.06); - border-radius: 6px; - outline: none; - cursor: pointer; -} - -.rtv-container .toolbar .btns .btn-today { - width: 50px; - margin-right: 5px; -} - -.rtv-container .toolbar .btns .btn-group { - width: 53px; - flex-grow: 1; - display: flex; -} - -.rtv-container .toolbar .btns .btn-group button { - width: 26px; -} - -.rtv-container .toolbar .btns .btn-prev { - border-radius: 6px 0 0 6px; -} - -.rtv-container .toolbar .btns .btn-next { - border-radius: 0 6px 6px 0; -} - -.rtv-container .main { - flex-grow: 1; - display: flex; - flex-direction: column; - overflow: hidden; -} - -.rtv-container .main .fixed-left { - position: sticky !important; - left: 0px; - z-index: 9; - flex: none !important; - width: 300px; -} - -.rtv-container .main .roomname { - align-items: center; - justify-content: start; - background-color: white !important; -} - -.rtv-container .main .header { - height: 40px; - overflow: hidden; - border-bottom: 1px solid #E6E9F0; -} - -.rtv-container .main .header-row { - display: flex; - flex-direction: row; - width: 2700px; - height: 100%; -} - -.rtv-container .main .header-cell { - height: 100%; - display: flex; - flex-grow: 0; - border-right: 1px solid #E6E9F0; - border-bottom: 1px solid #e6e9f0; -} - -.rtv-container .main .header-cell>span.time { - margin-left: -20px; - font-size: 14px; - color: #5A5E66; - font-weight: 500; -} - -.rtv-container .main .time-cell { - width: 100px; - align-items: center; -} - -.rtv-container .main .body { - flex-grow: 1; - height: 100%; - overflow: overlay; - scroll-behavior: smooth; -} - -.rtv-container .main .body .room-row { - min-height: 62px; - display: flex; - flex-direction: row; - width: 2700px; -} - -.rtv-container .main .body .room-cell { - height: 100%; - display: flex; - position: relative; - border-right: 1px solid #E6E9F0; - border-bottom: 1px solid #e6e9f0; -} - -.rtv-container .main .body .room-cell .item-content { - width: 100px; - position: absolute; - left: 0px; - flex-wrap: nowrap; - display: flex; - flex-direction: column; - line-height: 20px; - justify-content: center; - z-index: 1; - word-break: normal; - white-space: nowrap; - overflow: hidden; - height: 100%; - padding: 2px 0px; -} - -.rtv-container .main .body .room-cell .item-content:hover { - box-shadow: 2px 2px 7px #bebebe; -} - -.rtv-container .main .body .room-cell .item-content .item-content-wrap { - border-radius: 2px; - /* background: #dae9ff; */ - width: 100%; - height: 100%; -} - -.rtv-container.rtv-container-week .header-cell, .rtv-container.rtv-container-week .room-cell { - flex: 1; -} - -.rtv-container.rtv-container-week .room-row, .rtv-container.rtv-container-week .header-row { - width: auto !important; -} - -.rtv-container.rtv-container-week .header-cell>span { - margin-left: 0px; -} - -.rtv-container.rtv-container-week .time-cell { - line-height: 20px; - width: 150px; -} - -.rtv-container.rtv-container-week .time-cell .rtv-week-day { - text-align: center; - border-radius: 10px; - width: 20px; - margin: 0 5px; - font-size: 13px; -} - -.rtv-container.rtv-container-week .time-cell .rtv-week-day.active { - background-image: linear-gradient(135deg, #0093F5 0%, #00A3F5 100%); - color: white; -} - -.rtv-container.rtv-container-week .time-cell .rtv-week-day-item:before { - content: "●"; - margin-right: 3px; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/approval-logs.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/approval-logs.css deleted file mode 100644 index 471db8a7d75bbdd51c48de8fb9968e9c3daf0ea4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/approval-logs.css +++ /dev/null @@ -1,128 +0,0 @@ -.task-log-body { - background: #fff; - padding: 0 14px; - white-space: nowrap; -} - -.log-node { - position: relative; - padding: 0 0 14px 10px; - margin: 0; - font-size: 14px; - list-style: none; -} - -.log-timeline-item-tail { - position: absolute; - top: 2px; - left: 7.5px; - height: 100%; - border-left: 2px dashed #e8e8e8; -} - -.timeline-item-head { - position: absolute; - width: 16px; - height: 16px; - border-radius: 100px; - left: 0; - top: 2px; -} - -.timeline-item-head-blue { - background-color: #388fff; - border: 4px solid #bdd9ff; -} - -.log-item-content { - position: relative; - margin: 0 0 0 16px; - border-radius: 4px; -} - -.log-node-name { - font-family: PingFangSC-Medium; - font-size: 14px; - color: rgba(0, 0, 0, 0.85); - white-space: pre-line; -} - -.log-node-main-content { - display: flex; - flex-direction: column; - background: #ffffff; - border: 1px solid #e9ecf3; - box-shadow: 0 2px 20px 0 rgb(3 18 51 / 5%); - border-radius: 16px; - margin-top: 12px; -} - -.log-node-main-content-first { - display: flex; - padding: 20px 14px; - flex-grow: 1; - overflow: hidden; -} - -.log-operator-avatar { - padding-right: 10px; -} - -.log-operator-avatar-img { - height: 30px; - width: 30px; - border-radius: 50%; -} - -.log-avatar-right { - display: flex; - flex-direction: column; - padding-top: 4px; - flex-grow: 1; - flex-shrink: 1; - overflow: hidden; -} - -.log-operator-and-action { - display: flex; - align-items: center; - justify-content: space-between; - padding-bottom: 4px; -} - -.log-operator-name { - font-size: 14px; - color: #4297fa; - text-align: left; -} - -.log-action-name-submit { - background-image: linear-gradient(-45deg, #6ac1ff 0%, #3b91ff 100%); -} - -.log-action-name { - font-size: 12px; - color: #ffffff; - border-radius: 10px; - padding: 1px 9px; -} - -.log-message-and-times { - background: #f5f8fc; - border-radius: 3px; - padding: 10px 12px; - margin-top: 10px; - font-size: 12px; - color: rgba(0, 0, 0, 0.45); -} - -.log-log-time { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.timeline-item-head-yellow { - background-color: #f59c24; - border: 4px solid #fbd7a7; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/control.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/control.css deleted file mode 100644 index dc6da5aba5e85e3c188c202d17a590a08bc848db..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/control.css +++ /dev/null @@ -1,535 +0,0 @@ -/*avatar*/ -.f-avatar.f-avatar-circle { - border-radius: 100%; - overflow: hidden; - width: 100px; - height: 100px; - margin: 0 auto; -} - -.f-avatar.f-avatar-circle .f-avatar-image { - display: inline-block; - width: 100%; - height: 100%; -} - -/*image 图像*/ -.ide-image img { - width: inherit; - height: 100px; - max-width: inherit; - max-height: inherit; -} - -/*数值控件*/ -.ide-numeric-box .input-group .btn-group-number { - height: 1.50003rem; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - background-color: #fff; - border-left: 1px solid #d9d9d9; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag { - height: 50%; - display: -webkit-box; - display: flex; - box-shadow: none; - padding: 0 5px; - margin-left: 1px; - - overflow: hidden; - -webkit-transition: 0.1s linear; - transition: 0.1s linear; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag .number-arrow-chevron { - -webkit-box-flex: 1; - flex: 1; - line-height: 1; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag:hover { - height: 60% !important; -} - -.ide-numeric-box .input-group .btn-group-number .btn-number-flag:nth-child(2) { - border-top: 1px solid #d9d9d9; -} - -.ide-numeric-box input::-webkit-inner-spin-button, -.ide-numeric-box input::-webkit-outer-spin-button { - -webkit-appearance: none !important; - margin: 0; -} - -.ide-numeric-box .input-group .btn-group-number .number-arrow-chevron { - height: unset; -} - -/*富文本*/ -.ide-rich-text-box .f-form-control-textarea { - padding: 0; - border: 0; - max-width: 100%; - width: 100%; - height: auto; -} - -/*数值区间*/ -.ide-number-range .number-range { - position: relative; -} - -.ide-number-range .number-range .input-container { - display: flex; - padding: 0; - align-items: center; -} - -.ide-number-range .number-range .input-container .sub-input-group { - -webkit-box-flex: 1; - flex: 1; - position: relative; - display: -webkit-box; - display: flex; - -webkit-transition: 0.3s ease-out; - transition: 0.3s ease-out; -} - -.ide-number-range .number-range .input-container .sub-input-group .sub-input { - width: 100%; - border: none; - outline: 0; - background-color: rgba(0, 0, 0, 0); - min-width: 2px; - padding: 0.125rem 4px 0.125rem 0.5rem; -} - -.ide-number-range .number-range .input-container .spliter { - width: 15px; - text-align: center; -} - -.f-table-has-form .ide-number-range { - height: 100%; -} - -/** 智能输入框 */ -.f-cmp-inputgroup.ide-input-group .f-state-disabled .input-group-append { - display: flex; -} - -/*external-container 引入外部组件的容器*/ -.ide-external-container, -.ide-cmp-route-container { - min-height: 100px; - background: #fafafa; - height: 100%; - width: 100%; - display: inline-block; -} - -.ide-external-container::before, -.ide-cmp-route-container::before { - content: "\e136"; - width: 2em; - height: 2em; - -webkit-font-smoothing: antialiased; - font-size: 2rem; - font-weight: 400; - line-height: 1; - display: inline-block; - color: #ccc; - position: absolute; - left: 50%; - top: 50%; - margin-left: -1rem; - margin-top: -1rem; -} - -.ide-external-container::before { - content: "\e136"; - font-family: FarrisExtend; -} - -.ide-cmp-route-container::before { - content: "\eb79"; - font-family: FarrisIcons; -} - -.farris-component-ModalContainer .ide-external-container { - min-height: 70px; -} - -/* 复写 侧边栏 父级样式 */ -.farris-component-Sidebar { - position: initial !important; - min-height: auto; - margin-bottom: 0; -} - -.farris-component-Sidebar.farris-nested { - padding: 0 !important; - border: none !important; -} - -.f-sidebar-pos-right.f-sidebar-show .f-sidebar-main, .f-sidebar-pos-left.f-sidebar-show .f-sidebar-main { - transform: None !important; -} - -/*viewChange*/ -.f-viewchange-view-none { - display: none !important; -} - -/*Section */ -.ide-cmp-section .f-section-header .f-section-header--btn-placeholder { - position: absolute; - display: -webkit-inline-box; - display: inline-flex; - top: -30px; - left: 0; - opacity: 0; - overflow: hidden; - z-index: -90; -} - -.ide-cmp-section .f-section-content .toolbar-btn-inline-flex, -.ide-cmp-section .f-section-header .toolbar-btn-inline-flex { - display: -webkit-inline-box; - display: inline-flex; - overflow: hidden; -} - -.ide-cmp-section .f-section-header--toolbar { - -webkit-box-flex: 1; - flex: 1; - -webkit-box-align: center; - align-items: center; - width: 30%; - display: -webkit-box; - display: flex; - -webkit-box-pack: end; - justify-content: flex-end; - margin-left: 0.875rem; -} - -.ide-cmp-section .f-section-content--toolbar { - display: -webkit-box; - display: flex; - -webkit-box-align: center; - align-items: center; - overflow: auto; -} - -.ide-cmp-modal-footer .f-toolbar, -.ide-cmp-header .f-toolbar, -.ide-cmp-section .f-section-header .f-toolbar { - justify-content: normal; -} - -.ide-cmp-section.f-section-accordion.f-state-collapse>.f-section-content { - display: none; -} - -/* 小分组 fieldSet */ -.ide-cmp-fieldSet .f-section-formgroup-inputs.drag-container { - display: flex; - flex-wrap: wrap; -} - -.ide-cmp-fieldSet.f-section-formgroup.f-state-collapse .f-section-formgroup-inputs { - display: none; -} - -/* 若小分组没有间距,拖拽时会有控件位置晃动的情况 */ -.farris-component-Form>.drag-container>.farris-component-FieldSet { - margin-top: 10px; - margin-bottom: 10px; -} - -/** 列表 */ -.ide-dataGrid .header-cell { - height: 2.1875rem; - overflow: hidden; - padding: 0.4375rem 0; - white-space: nowrap; - width: 120px; - flex-shrink: 0; - background-color: #F4F5F9; -} - -.ide-dataGrid .header-cell:hover { - border-right: 2px solid #388FFF; - background: #EDF5FF; -} - -.ide-dataGrid .header-cell .caption { - border-right: 1px solid #E6E9F0 !important; - padding: 0 0.75rem; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} - -.farris-component-DataGrid .cardViewPanel .farris-component-Component { - flex-grow: 1 !important; - flex-shrink: 1 !important; - flex-basis: auto !important; -} - -.farris-component-DataGrid .cardViewPanel .farris-component-Component .f-page { - position: absolute !important; -} - -.farris-component-ModalFooter .ide-cmp-modal-footer.showtype-sidebar .fe-modal-footer-base { - display: flex; - align-items: center; - justify-content: flex-end; - flex-shrink: 0; - background: #fff; - padding: 0.875rem 1.5rem; - box-shadow: none; -} - -/** 筛选方案 **/ -.f-section-scheme { - background: #fff; - margin: 0.5625rem 0.5rem 0; -} - -/*Tag*/ -.ide-cmp-tag .k-icon.k-i-close { - font-size: 12px; -} - -.ide-cmp-tag .k-icon.k-i-close:hover { - cursor: pointer; -} - -.ide-cmp-tag .btn { - margin-left: 5px -} - -.ide-cmp-tag .farris-tag-disabled { - cursor: text; -} - -/*穿梭框*/ -.ide-cmp-multi-select { - min-height: 200px; -} - -.f-multi-select-list .search { - position: relative; -} - -.f-multi-select-list .search .form-control { - line-height: 1.875; - height: 1.875; - outline: none; -} - -/* .f-multi-select-list .f-table-norecords-content { - margin: -10.0625rem 0 0 -0.225rem; - } */ - -/*scroll-collapse-area 滚动収折组件,収折实现变动*/ -.ide-cmp-collapsible-area.f-state-expand .fe-collapsible-container { - height: auto; -} - -.ide-cmp-collapsible-area.f-state-collapse .fe-collapsible-container { - height: 0; -} - -.ide-cmp-collapsible-area .fe-collapsible-icon-container { - cursor: pointer; -} - -/* 动态区域相关 */ -.ide-cmp-dynamic-area.f-component-tabs .farris-tabs-title { - align-items: center; -} - -.ide-cmp-dynamic-area.f-component-tabs .addPanel span { - font-size: 18px; - text-align: center; - width: 1.875rem; - height: 1.875rem; - line-height: 1.875rem; - background-color: #fff; - color: #85888e; - border: 1px solid #85888e; -} - -.ide-cmp-dynamic-area .farris-nav-tabs .nav-item .st-drop-close { - opacity: 0; -} - -.ide-cmp-dynamic-area .farris-nav-tabs .nav-item:hover .st-drop-close { - opacity: .6; -} - -.ide-cmp-dynamic-area .ide-external-container.add-dynamic::before { - content: '\e11e'; -} - -/* table表格 */ -.ide-cmp-table.table .widget-panel { - position: absolute; - bottom: 0; - right: 0; - color: #fff; - background: #388FFF !important; - padding: 3px 1px 1px 4px; - z-index: 300; - display: none; -} - -.ide-cmp-table.table td { - position: relative; -} - -.ide-cmp-table.table td.dgComponentSelected .widget-panel { - display: block; -} - -/*查询*/ -.ide-cmp-spreadsheet, .ide-cmp-charts { - display: flex; - align-items: center; - justify-content: center; -} - -.ide-cmp-spreadsheet img { - width: 100%; - height: 100%; - max-width: 178px; - max-height: 132px; -} - -.ide-cmp-charts img { - width: 100%; - height: 100%; - max-width: 780px; - max-height: 271px; -} - -/** toolbar工具栏**/ -.f-toolbar.farris-component-ToolBar { - min-height: 20px; -} - -.toolbar-drag.sortable-toolbar-container .component-btn-group { - display: none !important; -} - -.toolbar-drag .sortable-mirror { - width: 0 !important; -} - -.toolbar-drag .sortable-mirror.sortable-chosen .btn.dropdown-toggle.dropdown-toggle-split { - display: none; -} - -.toolbar-drag .btn-primary.disabled+.dropdown-toggle, .toolbar-drag .btn-secondary.disabled+.dropdown-toggle { - color: #878D99; - background: #EAECF3; - border-color: #DEE1EA; -} - - -.ide-header-toolbar-lg .toolbar-drag .btn:not(.component-settings-button):not(.dropdown-toggle) { - padding: 0.25rem 1.125rem; - font-size: .875rem; - line-height: 1.4286; - border-radius: 3px; -} - -.ide-header-toolbar-lg .toolbar-drag .btn.dropdown-toggle.dropdown-toggle-split { - padding-top: 0.25rem; - padding-bottom: 0.25rem; - font-size: .875rem; -} - -.toolbar-drag .cascadeToolbar .btn:not(.component-settings-button) { - padding-right: 30px; -} - -/** 标签页Tab **/ -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .nav-item { - background-color: white; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .nav-item.gu-mirror { - position: fixed !important; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .farris-nav-tabs.gu-unselectable .component-btn-group { - display: none; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header.farris-tabs-inContent.hasToolbar .farris-tabs-toolbar { - width: 100%; -} - -.farris-component-Tab .farris-tabs .farris-tabs-header.farris-tabs-inContent .farris-tabs-toolbar .farris-tabs-inline-flex { - display: flex; -} - -/** 为了方便拖拽,区块上下增加间距 */ -.f-page.f-page-card .f-struct-like-card>.drag-container, .f-component-splitter-pane.f-page-content-main { - padding-top: 10px; - padding-bottom: 10px; -} - -/** 布局容器 ResponseLayout **/ -.response-layout { - border: dotted 2px #e8e8e8; - -} - -.response-layout .response-layout-item { - border-right: dotted 2px #e8e8e8; - -} - -.response-layout .response-layout-item:not(:last-child) { - padding-right: 8px !important; -} - -/** 子列表填充布局:若没有这个,struct-wrapper内部放任意容器的时候,无法出现滚动条 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child { - overflow: hidden; -} - -/** 子列表填充布局:设计器section的适配样式 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-mainsubcard { - height: 100% -} - -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-main { - height: 100% -} - -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section.f-section-fill>.f-section-content { - flex-basis: 0%; -} - -/** 子列表填充布局:标签页的滚动条要放到tab-body上,所以整个tab上设置overflow:hidden **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill { - overflow: hidden; -} - -/** 子列表填充布局:标签页下直接放组件节点(附件组件、卡片组件)的场景要设置组件填充,否则组件无法显示 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill .farris-tabs-body>.farris-component-Component { - flex: 1; -} - -/** 子列表填充布局:目的是为了让标签页tab-body出现滚动条。因为设计时的section强制添加了f-utils-fill 样式,所以要覆盖掉他的overflow:hidden,否则无法出现滚动条 **/ -.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill .farris-tabs-body .f-section.ide-cmp-section { - overflow: unset; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/discussion.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/discussion.css deleted file mode 100644 index a6126931e5b121b91c5ad1b45a7ebc88c1f733e8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/discussion.css +++ /dev/null @@ -1,224 +0,0 @@ -/*评论编辑框*/ -.f-discussion-group-edit { - border: 1px solid #DCDCDC; - background: #fff; -} - -.f-discussion-group-edit .f-discussion-group-edit-container { - width: 100%; - position: relative; -} - -.f-discussion-group-edit .f-discussion-group-edit-container .textarea-editor { - width: 100%; - height: 100%; - padding: 8px; - margin: 0 auto; - outline: none; - overflow-y: auto; - word-break: break-all; - white-space: normal; - resize: none; -} - -.f-discussion-group-edit .f-discussion-group-edit-container .textarea-editor a { - color: #3487E3; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer { - display: flex; - flex-direction: row; - align-items: center; - flex-wrap: wrap; - justify-content: space-between; - padding: 10px 14px; - background: #F7F7F7; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar { - display: flex; - align-items: center; - flex-wrap: wrap; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar .f-discussion-group-edit-toolbar-about { - position: relative; - margin-right: 32px; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar .f-discussion-group-edit-toolbar-item { - cursor: pointer; - color: rgba(0, 0, 0, 0.65); -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar .f-discussion-group-edit-toolbar-item .toolbar-item-text { - display: flex; - align-items: center; - line-height: 22px; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar .f-discussion-group-edit-toolbar-item .toolbar-icon { - color: #667580; - font-size: 16px; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-toolbar .f-discussion-group-edit-toolbar-item .toolbar-text { - margin-left: 2px; - font-size: 14px; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-btns { - flex-shrink: 0; -} - -.f-discussion-group-edit .f-discussion-group-edit-footer .f-discussion-group-edit-btns .f-discussion-cancel { - margin-right: 12px; - font-size: 14px; - color: rgba(0, 0, 0, 0.75); -} - -/*评论列表*/ -.f-discussion-group-content-item { - display: flex; - flex-direction: row; - margin-bottom: 14px; -} - -.f-discussion-group-content-item .discussion-item-avatar { - width: 32px; - height: 32px; - margin-right: 10px; - overflow: hidden; - cursor: pointer; - flex-shrink: 0; -} - -.f-discussion-group-content-item .discussion-item-avatar-img { - display: block; - width: 32px; - height: 32px; - border-radius: 50%; -} - -.f-discussion-group-content-item .discussion-item-avatar-tip { - width: 32px; - height: 32px; - font-size: 12px; - color: #fff; - text-align: center; - line-height: 32px; - border-radius: 50%; - background-color: #4796FF; -} - -.f-discussion-group-content-item .discussion-item-inner { - flex-shrink: 1; - flex-grow: 1; - flex-basis: 0; - padding-bottom: 14px; - border-bottom: 1px solid #e3e3e3; - overflow: hidden; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-username { - margin-bottom: 4px; - font-size: 16px; - color: rgba(0, 0, 0, 0.85); -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text { - font-size: 14px; - color: rgba(0, 0, 0, 0.75); -} - - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text .discussion-item-text-message { - word-break: break-all; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text .discussion-item-text-message a { - color: #3487E3 !important; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text-reply { - margin-top: 11px; - padding: 6px 8px; - font-size: 0; - background: #F5F5F5; - border-radius: 2px; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text-reply-title, -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text-reply-content { - font-size: 14px; - color: rgba(0, 0, 0, 0.75); - line-height: 20px; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text-reply-title .discussion-item-text-reply-name { - color: #3487E3; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-text-reply-content { - word-break: break-all; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-files { - margin-top: 11px; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-files .ffilepreview--filetype-icon { - width: 40px; - height: 40px; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer { - margin-top: 10px; - padding-right: 20px; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-time { - font-size: 14px; - color: #B1B6C2; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns { - display: flex; - align-items: center; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start { - display: flex; - align-items: center; - position: relative; - cursor: pointer; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start .f-icon { - color: rgba(0, 0, 0, 0.45); - font-size: 16px; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start .f-icon::before { - vertical-align: bottom; -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start .discussion-item-btns-start-text { - margin-left: 14px; - font-size: 14px; - color: rgba(0, 0, 0, 0.45); -} - -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start:hover .f-icon, -.f-discussion-group-content-item .discussion-item-inner .discussion-item-footer .discussion-item-btns .discussion-item-btns-start:hover .discussion-item-btns-start-text { - color: #3487E3; -} - - -.f-discussion-group-content-item:last-child .discussion-item-inner { - border-bottom: none; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/file-upload-preview.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/file-upload-preview.css deleted file mode 100644 index ee828aa275fe641a1c01d05b2a569433a6455791..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/file-upload-preview.css +++ /dev/null @@ -1,466 +0,0 @@ -/*附件预览上传一体化*/ -.ffileUploadAndPreview { - font-size: 13px; -} - -.ffileUploadAndPreview-content-fill { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - display: flex; - flex-direction: column; - overflow: hidden; -} - -:host.ffileUploadAndPreview-content-fill .uploadAndpreview--header { - flex-shrink: 0; -} - -:host.ffileUploadAndPreview-content-fill .uploadAndpreview--content { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - overflow: auto; -} - -.uploadAndpreview--header { - display: flex; - align-items: center; - margin: 0 0 9px; - position: relative; -} - -.uploadAndpreview--header .ffileupload--browser { - position: absolute; - margin: 0; - padding: 0; - left: 1em; - top: 1.75em; - width: calc(100% - 2em); - opacity: 0; - font-size: 0; -} - -.uploadAndpreview--header .header--left-container { - display: flex; - align-items: center; -} - -.uploadAndpreview--header .upload-container { - height: 44px; - background: #FAFCFD; - border: 1px dashed #D8DFED; - border-radius: 6px; - padding: 0 22px; - display: inline-flex; - align-items: center; - cursor: pointer; -} - -.uploadAndpreview--header .upload-container.f-state-disabled { - opacity: 0.6; - cursor: default; -} - -.uploadAndpreview--header .upload-container .upload-icon { - color: #2F8AFF; - font-size: 18px; - margin: 0 10px 0 0; -} - -.uploadAndpreview--header .header--right-container { - margin-left: auto; - min-height: 44px; - display: flex; - align-items: center; -} - -.uploadAndpreview--header .header--countInfo { - min-height: 44px; - display: flex; - align-items: center; - font-size: 14px; -} - -.uploadAndpreview--header .header--countInfo .count { - font-size: 16px; - font-weight: 600; - margin: 0 6px; -} - -.uploadAndpreview--content { - margin-bottom: 10px; -} - -.uploadAndpreview--table td { - border-left: none; - border-right: none; - vertical-align: middle; - padding-top: 12px; - padding-bottom: 12px; -} - -.uploadAndpreview--table .td--hascheckbox { - position: relative; - padding-left: 44px; -} - -.uploadAndpreview--table .td--hascheckbox .preview-checkbox { - position: absolute; - top: 50%; - margin-top: -8px; - left: 14px; -} - -.uploadAndpreview--title-container { - display: flex; - overflow: hidden -} - -.uploadAndpreview--title-container .uploadAndpreview--right { - align-self: center; - flex: 1 1 0; - overflow: hidden; -} - -.uploadAndpreview--right .item-content--title { - word-break: break-all; - white-space: pre-wrap; -} - -.uploadAndpreview--title-container .ffilepreview--filetype-icon { - width: 28px; - height: 28px; -} - - -.uploadAndpreview--state-container p { - margin: 0; - padding: 0; -} - -.uploadAndpreview--state-container .f-icon { - font-size: 18px; -} - -.ffileupload--support-info .support-info--wrapper { - padding: 0 8px; - margin: 0 0 8px; -} - -.ffileupload--support-info .support-info--wrapper li { - color: #B4BCCC; - margin: 0; - padding: 0; - display: inline-block; -} - -.uploadAndpreview--filesize-container, -.uploadAndpreview--date-container { - color: rgba(45, 47, 51, 0.45); - font-size: 12px; -} - -.uploadAndpreview--state-container .f-icon { - margin: 0 8px 0 0; -} - -.uploadAndpreview--nodata { - padding: 0 8px; - margin: 0 0 8px; - color: #B4BCCC; -} - -/*重复*/ - - -.uploadAndpreview--action-container .preview-btn { - text-align: center; - background: #dbe9ff; - height: 22px; - width: 22px; - border-radius: 16px; - display: inline-block; - padding: 0; - color: #2a87ff; - text-align: center; - border: none; - margin: 0 14px 0 0; -} - -.uploadAndpreview--action-container .preview-btn:last-child { - margin: 0; -} - -.uploadAndpreview--action-container .preview-btn .f-icon { - margin: 0 auto; - display: block; -} - -.uploadpreview-btn--primary { - background: #2B87FF !important; -} - -.ffilepreview--filetype-zip { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAxg2G5vzqQAAF3JJREFUeNrtW1mQXFd5/s7tvj3ds2iZ1jBaPSNrZCzZsVYTbOwiITFlazE4PCWpglfrwVU8EaAqUMViqhIKXqiyTSXYBpIUBlwEcEhBjBMcExktI9kSCNuSrW1mpNmnp/e+/5+Hs/3nTndbToU3X1Wr7/S995zv/Odfvv8/5wLvHu8e7x5/wEO90we+9rWvYWLyKvr7BlAcLGLN2jVoJS3EcQ75njziOItMJgOlIijbOtsvBpQynTIAZS9Bsf0PACt/bhth3w6UAhSwOD+PXbt3Y2RkBK1WC61WC41GA5VKBbVaDXEcY3p6GhMTE6hUKtiyZQs+9KEPvaPxZm/0xi9+8QuoVqsoFHpx8P6DePbHP8oXB4vriGio0Wjc1Gg01jUbzVwuFyObzSKKIignBj82OyUKALP5gAOhCRk4ATHrpxQYbIRcbzTQaDRQKpXQaDTQbDZRr9dRq9UaxDyTiTKXmHl6cnJy5pFHHqkdP34c33762xgYGMBDf/HQ/48GPfrlR7Hz9h24fOkKHnnkEfWNb3xj+6r+VR/tX9X/wWwmc2uup2c1Ma0CqziKjNYoPZRQQEqPMtVjnIuRzYTzxMxoNBogIq1xzEbAvkUVAVMTk4hzOTzwwAMoFAogIjCz/W5GUVSq1WoLzWbz3MLC/IuzM7PP3v2BD7z20ksv4b237sBL//kCPvKxj/3fBfSlL30JszOz2Ld/L65fm75p/Yb1R/r7+/8yF+dGstmMmXOhH20HI0cue9TXt20bw6ZNG8Hs700owdkzZ7C4sAioSLTj4UZK4erkVZz73TnsumMXHjjwAPr6+oJ25NFqtVCtVt9aWFj45wsXLjw+Mjp6+Rc//zk2bdqEBx98sKMMos7C+TIq1Sr+9vOfQ2mpdO/IyMj3BgcHP10oFEYy2QyIAYI2D4fJCsfajrnG5hyKhSvRs53NZpDL5ZDr6UEu14Oenh705HqgVARi9s/KD7P2Z6btU6dP4Wc/+3eUy2UopbBCRMzIZrMYGBgY3bBhw2dvu+22783Nzd7z8MMPo1Qq4cc/+ck706BHH/0Cpqfn8ZnPfBo//OGzB9cPDz/W29e/RTpdgvcTgWIY4NrO2Dhc62eEpzGjGBgYQKG3V2iJFsr8wiKazeYKkMy6HRUpTExM4Ny5c86P7dm9BwcOPIDe3t6OmmS8GBYXFy9fvHjxyN69e597/PEnsH79MB566KE297c5nnnm+6hVqyiVlu7dsHHjP/X19m1xXlUp50o41YKTH4vgI86tRum/lZGlFogekBaqvqydvFLmPuHcwQgEJM159+7dOHjwIAqFQkch2WNxcfHy+fPn/7q4bt2Lg2vXYnBwcMU9mfQPn//c59FqNbFYWtqyaeOmb/YP9N/Wzp04TWgn8g73W6GEjTB6CwWMjIxgXbGIwUH9KRaLyGQyKJfLK58xnZZKJczMzGiBG8W9dm0KpVIJo6OjyOVyXQWU78mvzuXiHa+9/tov5ufnFw8cOIBnnnkmuGeFD6rWavjkJz+J9e8Zfrivv+/9egzW5u1sOxejZ0mEa2YGE7tnmFOf1G/EQL5QwNjYGLaNjWHMfLZt24ahoSEwa08HMhIQz1rnxy4w6PPx8XE899xzzid1PBSwZu3a99+89eYj99xzjyqXy9016Ctf+TLWDQ3hvg9/+JahdUN/n8vl1rDzKfDOGEZg5oI7ZyVvCoOPdTwsf9C353pyGFw7iFarhWaziWaziVarhfn5eczOzupmba/C6ZVKJX1d4FJKgZkxNTWF5eUyRkdHumqSJrVqy6FDh/5teHh49r777sMPfvADdz0gIAvXF7B79z5cuXL5o3EuHiEmeET6SwFgpVzE0qdKXExJRQEgMSpmx5/toJcWFvGbl1+WNBFQCknS0j6L/f0Oj9XalJ+Rf4+Pn4RSwIEDBzo6bmZGoVAYKRaLH92xY8ffXb9+vbOJRT0Z/OuPns339/d/MMpkXLhm17E2CRhCpkkZA0z6VvO7e86ZG+nZJ22eZEyLmRFnY+TiHhHDtNDq9Roa9Ybvx6obk8BjTT00YbCnFydPnsBPf/pTVCqVjuaWzWYxODj4J1//+tfzS0tL4TX5R7G4DsVicV0mk7nVW5awfShAkVMSFmmAUiwVDQyCDVaA1iIzTFivyswY3boVWzZvDmaXiHDq1CksLCz48AXvZ+D8Hoe/SwW26AkYHx8HM+PQoUNtyaRSCnEc37p///4hAJc7CmjVwCoQ0VA2m12tzcsyZKff6IAmcD0uz1Le7aj0AM3QenIxCoXCCrWPoghEpHmLiFJW6EopEHF7s2nzw/jJcSilcPDgwRVCYmbk8/nVg4OD67KZTGcBNSlBo14fIaJVTOyTyLYhWwR5FufKy9LzFznLniwCwOTkFKrVmiaAZvREhHK5bITMUEZCnOqamYKBpklrOkacOH4CzIRDhw6vEBIRDZQrlZG+3t7xjgLKxRk061xk5liHV2lmyrM0KRgZoSQqE606i0afT01NYXJycqXaG7asUm14PJHnGuYJ5tQ9hmSSEzJw4sRJMBQ+cvhBFHo9mVRKxQrYMDAwEOAIBZTrQT3XzOnZkazX+BROCcYqj809oMz9oshBvhGbtyl4YTMD+Xwe69evRxTZRvX1paUlzMzOBoJ36Y0i4+hTEwTfriDwXsjMOHniBMDA4cPeJ0VRhDiO127evLmzgKJsFnEcm9kgLwBWYJNoqkBDhKCMSMjZlymHsdKeUrlChSeXSke+/r4+7Nq1C1EU8tY333wT16dnnNCdb3OlFOGD2jH9TqkGM06cOA4G4fChw+jv74dSCplMpjeNIRSQUhokM8hxFwPO+AMZVbREILSJ/WU5i+Y5VuzCsrK5GDNaSYJKpYIok3GcR0UR6vW6nqgVMmBEhhDa5BWCRCqrhJKXOsjKVRVOHD8OQOHBw4eRz+ehlIrTskxVFE2AJkIU+Tqf64NtPEKImG2uLgikF1OgbXpAIYWYn1/Af/3qV2FepxRajSaYOPB9gSFRoidTkNAQVuAHAjxWiMePHYMCcPDgQURp9UkLiCzBAoNZm5mNLOwEATcDcAUMqzHsShvCpgLV1qalXNSyVch6reZnghlJQq4UQNb/GFP1eGQATZkTt/mt3WVmHDt2DK1Wgq1bR1cwyVCDLCsmBinjNyQJcdD83+SJjp8Z42fC4CzzNGNyzNi+fTu2bNmygiiOnzqF+fk5KPaTQHbaTf/9A6uw/ZbtXvhK6qYSeMVkyczJ+wCUSiUcO3YM1Wq1uwZ58mUHxL72hcBagshgnU9QXQwIXjqJ1dM/MDCAYrEYzi4z4mwWRGyilpwkTy16enLI59d5xRMaGKpux/qLu0wJYXJiAltHRzsLyJYpiBhRRMGAQiaihJ235zf+ofAqG+1Rxh/NzEwjjuMVGlStVLxJtzUf27+NEn7KgiWkFG6s+FVzJGICMaOZUHA9FBDLJDRVCbQqKx2ubVx23SaKaVpjBMsAQE54589fwBvnL2gqEAQA4/YVbAa3Eo9VDFHzdnikfJRNbNmlLmk8duwRmt00iNwHkXaOSnZieJ+Z/iBShRrlmXfg3EW89lUURr6Qx/DwcJBtKygsLS1idnbWDYrTg7ZO2no+djoaEHrFb4MHxnpIK0YXDRJlA0Lo0Mzs2A4dYKXhKCij2nCRUNlvJdTb+Tf9LJP2Q3fddRey2axz7lAKvz/3e0xPT0NFkcFjzDONx66WiIjWEY9i77idsJRbQeFuAiL7YYJCBGXrMEpBkZ0Zu7QD17te6WQzU4DNwdJa5bKCIH8iEBFarVbgh6IoQkItEBjKxHllS7a66uL68I91xqOTJS1jgsdjnToRgcBIUv4uvaQJW3wCyAQmJX7zA/NdCpUNGIFPnph8pi4Dv5XY3Nwcnn/+ecGI9ZkLubZIBmve6TSiDR7LjVgFeBwHEwK1/pSZQUkXASUJIUn0jCqzhqxElu45MqeSUmE9CIHLXMnqkHJKTmBWqNcbuHZtCtY4ZGIaRmiPx/fVAY+tFnsXb56TemwoDMFVPlucdBaQLpmSCfMuHQyIoGtcCkPgsqprwzhbHmNs3Vi8FQ+2j23Hpk2b3MqEMhN15syrWFxYcBqjV0zJR6gbwSMCCUwe6DaOKIOHDCpDkpG0ugjIsGhXiHLRxjpGGLApzsMesU1BXK3YJodWg0T9iJkxPDyMsbExhDgYb7zxOuaITE3IR3I27P6d4kGAR8vC4YElyYDLa9oJiMjujCAwR0E9yoZH61O8FdkwITiBoPAKMnTqSELG6RMz5ubnMDU1CXIOVRPFWr2uJylxERppJbkRPOl0px0e7Zf0uBPqYmJk3JwD6wRkkkQ9OgHGS1yZBDcwR5WKeC4Cspvks2fP4rdnz4r7jHciciVXa2LOnYA0Frek1BlPkHVIPGLpCjbFIqCVdKkHsUhWGeQUQVmVVOwrq46TCIdnzAMub5RhzRl/kFIlrRbiOMbaNWvEzgxtQpVqFaVSyWsKi4piGg9kpERHPJ6fCYcPvwCguqUaCFINUZMWtNQmHWEhj3whStapXZ1IhGAhMH1LgvesHcb999+PbNbDiaIIZ86cwa9//Ws/UNGvry6y6M6dwUY8h4ek2LTDl2kNm7pSU3UzMU7cR7HdQqcHLtmnUGKXM7myByyhs7tABO9RviZtTcf6j1wuFwgI0MvCCSVuh0eIR8xrgMfmf53wCJ8k8ZjonS7TpqKY0jZtyqM6FyPhJf30WVW15kbMrnZDAXhZQfTUQZGda4W5+Xk8/8tfIlKOvgFKYX5uzqkwAyEeeYgFAGvZ7fFIJucUzZBE0nZLXZJVAoMUO6LIqYZdVDQYZeWQg1Ycam8eKoIuEYTJBitGuVzG7377Wx91BFFUUQZwaY7AIwt0rpwgtoNyCntgivDRzuKxpZ7Qwtpn87omrcBiIIqsLHwhzQY7ZZEqyX8sxzNOkRNRGWW3bA2p1qI9fZuef5sUr8ATGa13eIQPWoFHOTzueYHHJqtJ12w+ATjx+3ZgwQYO2edCfuOSoKh2A4HTLOGFlFBt89uaNWvR36/XppSLdvprubSM+YUFL1ipXhD8RwjJJ4Q2asoKaRBvLEk34yFdNEM3Jo3EhHf2Xt9GD5d06lb9HkX2s+5687hlMmgXHhk+G991xx3YvXu3i5r2iKII46dO4YUXXnC+yUYb6+Q9HnZ43DS6JSaPyS1btcEDUw/iZrcoRpYwETgyyaobIzsgTgCC4siAzsY09LNK5D6izmS4VRRF7pM+MpHSW22sP3S7SeyegRCPLfBZ7ZDEHiC/kcL8R3amI2sFknV3EhDrCBDZKGMnj4RURLiP7Mwq2Ti7lEhQECMwds/6Mkr7gy0WpLsWha0UHqVsWA9JvfdvCIQKYy021WhRFxMDMxTZZR/LPsW2tzZLK2R8kY8k4lAIBCACizPjLvIxXXoteXs8QotsUJHlkhQe2RGJBYvOGsQE+y9CtKKW42q+bqeHqc2JvC29XVebhrdFWceGSQ8unD+Pi5cu+d0cxNhy003GrxEYUah9BodaodQhhZCU6W3xsOdyHQVky586Etnw6uvHzuaUVXE2bNQWrcTGBKvcNqEMyJxJUEzEO3/hTbx89CiiTKRnkwl/3Ho/isVBY2J2250Xryc1jg24332t3BWkIQtkIF/XdmxfY+Fmq9FFg4iQGEetTF1XrgCEq6ySPBofQGSitHJRg8lHFDE8gHXBTKZubqrZ13iYrH9TptCGFB6nUkLLLRUht/BINlBYPL4hbZoJgxlUKlU6CyhpEZJWYiqKsuxuBZH28XYSRW7kiukcRhEOhWBrwC75YLv3UbnNnlZAFEmzDKS8ApMVoevb4lEpk5S5hqlWgrkxvzTbWUCtZsvsqCDI0k4oDIjFQ8FPLCxnTUJE1kkIFbI7Umu1KgYHB/UCoZVKpDA4OIharaZZPSJXy0nHARJ42Gm99QbKMgrNc1SIR7tS7aiICEnSqiwtLAbtB+Sj3myg0Wo2E1n2YDYs05yTduJ+1u1aGlJ/24U4c7dhqjZS2BB+5sxZbNy4EbftvB3ZTBbZbAY7d+7Axo0bcfbsWZ14gn2uxKl+SZf5NI8xRTZbkLM1dnmvwGO11uJMiOaXSuFu+1CDWg0o0AwTNVlFsTSHIKSSEuHTKriNqxzsCRQ826UENghGDExOTuLoy0dx1913Yc/ePQD0lryXj76MyclJr42C2KTxsA0CbfGgbaHPpR/WozE3wTzVanbJ5qMogorjiwyUiNm9+uLsnHykCjsUeINqGgsAGrRPQr3vOH3qNK5cvoKhoSEAwPT1ab3kHK3crKUEHpd23BAeX7i3wU2xWSXR01DKxvHF9GbzQEBLyxWAeSZf6F2McmoQxr6D+g6nywbhNcdYxaz5SCh8kG3cXJiensb169cBBqJIuX3QCBb6PDv3nF3gCRtvj8elPbINoNloLlSWy9NIHYGAyssllMuV6eLaNec4jrdKhXXTx+JEeWXxSRDcDHL6EWEGlhCK5B2IRAUg0EKJI4iZQeeWDykjfO6AxyLw3I6RJMm56WvXZ3r7+oKWAyc9NTGD9+3fW6vWqi8SJU5L/MwYEsl6C66l5zZks7vF+wwy10ySZ5swJFF3YF/v1GTFkFTowbr2YAOB3w5oXwolg8e9CwL22wkdHnZ4SIM3tSggIUK1Vntxz/79tdluUez2O96Ly1evolqr/7DRbF5kIsBFHtMZrYwkduAWERsmTkwu37LA3IstLkpCN0wi2rjoxIbtslvQtBK2C6G2fuXxUAc8MtoKPERoNpsXq7XasxNXJ3DL9pFAQMH7Ysd+cwzbxm7Gd7/z3bn9+/YNx3F8j3yxXxa+JH33PNaandIOHcZpBizR01e735EDP6b89hprG8KSJMfzKYW/oRse95vAQEyoVquPPf7YY89s2zaGJ596urOAAGD3nl24c//7UK3WXo/j3F3ZbHazKybY3EwM1P+vfL8+BxH3yDTF3ytPA4fnTBDtX2OyNuwK/XLoNrq9DR5m1Gu1owvzC3+zb9++JWbg1Vdf6S6gV185gw/cey9ycXaxUq68lo0zf57JZFb7MYZeOZxE6QmFMOS43D0yDsnrUkDpAnzqEHhk0nGjeOqNxuVSqXSkUCi8Gsc5/OO3/mFFF23fm1+cm8e169N47623vLhcKh2p12uXrbO1zNMyYxB7B2nzHsnCUz7LFqdsiZNEsYrkcwzv2Dn9Ief8fd/k27U+qwueer12ubS0dOTWnWMvTk/PolIptxPFSg0CgFdeeQV33nknLl+5gj1/tOv1SxNXj2dUtCOKos0257LcJKR8Pnn1bwelV8Wkmoj8LCQ3YqLNhgcbkVNY9RK03VbTbs3L41EKSIxZlZeXj9w8dvt/nD55AvmeHjz19FMdlbTj8fFPfBzVag3FYhG1anVLf1//w3Eu91fZTGZU2TdzDN23ewIdk0X4IpNK15PdIhhS4vXXbJrhK0j6fGVVQXAagceZsqEkraR1sdFs/ctyqfRYb6FwaX5hFoWePJ58+tsdZZBBl+P06dP403vvRosigGnpiW8+8cudt+38GSXJFQBNIs4oBUqYY2LOsHk/yfIU+/6q/aZ0uBX3Ba+Xu4Kd5D+2rZAx+9CtTYq8qTZBvNhsNqeardbRaq36ZLVc+ewTTzz+/b379i1mowiIe/DUk9/qJoLuGhRq0yeQJAny+TzWrl6Nt966lB/oH1jX25cfarRaNzHzhozCGqWiAqB6iClrNccu3sn6sSw4WtOJAk3R2qBcbmU2I1j985EaUEAE1QJQJ06qBCxEUFO5bHyxUi3PlCqV6W2jW2uzs7NYXi4jm83iO9/9zg2N+4YFZI9Pf+pT+MV//w92btuKbCaL3r48mkkCBYV8HCPX04Pe/n4U8nkgUogQIUkIGYZ+STAiU2EGyO4UM8X/TBSZ1WlGJtKFMhUBKlH63ogAjhxvihIFjhgJM6rLFVRLy6gnddSbTYCBOJNBpVpGiwjn3noDf3bn3fjKV7/6Tof87vHu8e7xhzv+FwF1R2vESlW2AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE5LTEyLTI4VDA5OjMxOjU2KzAwOjAwuGsTuQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOS0wMS0wOFQxOTo0NDowMCswMDowMKIWgsIAAAAgdEVYdHNvZnR3YXJlAGh0dHBzOi8vaW1hZ2VtYWdpY2sub3JnvM8dnQAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpIZWlnaHQANTEyj41TgQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAA1MTIcfAPcAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE1NDY5NzY2NDAMvRPUAAAAE3RFWHRUaHVtYjo6U2l6ZQAzNDA0MTBCir7RwAAAAFp0RVh0VGh1bWI6OlVSSQBmaWxlOi8vL2RhdGEvd3d3cm9vdC93d3cuZWFzeWljb24ubmV0L2Nkbi1pbWcuZWFzeWljb24uY24vZmlsZXMvMTE4LzExODQyNjIucG5nIYv5CAAAAABJRU5ErkJggg=="); -} - -.ffilepreview--filetype-xls { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAxUqujTRqwAAFHlJREFUeNrtm2uUZFV1x3/73qquqq7u6emeHhxe0zMDMwyi8lRnFqJGFCNvMCpCIijLhDEuTFyJH4zGGGJMvhh1JYiIGlRgDSIadPnEGDNEQGbAxWOYB44Mwzy7Z6af1fW6Z+dD1b33nPuoHlwr+cSpVd33nuf/7LP3PnvvcwpeTi+nl9P/YZKX2uBzP/HYs3WERUtmWLKswNBSj3YL+kpCqV8oFgW/AJ4HoM4QnbcwLy5TNBOIACrSqdr5E5eIMrV/EWctvo0Vy9bRDtq0222azSa1Wo35ep1iscjEoXH27ttLY8bjxDUV3nL+O1/SfAvHWvHTd/dTn1PKJZ9L3x/wvTtMeWQZoxro0mad5c26jrYaXl+xpBQK4PmCCICxCBH+1YhEWCU2kTT1nqgjhsa8T6siTE/P0mo3aLZaNOoN6vV6U9VM+L73gqLj+/cfmLj5w39Vf2zLQ3zjW19mYGCQq6+89pjmvSAHfequMudcUGH39hY3v21WvvjgwOpFi+XKwWF5k1+QtX1lhoxhEUjR88ATUAERl080Z3CTAJFVNzNP4MDzSt/U5bzj9bfQXxrBmACjihqDKi3Pk5l6vTHZarW2HT16dNPE4cP3v2H9hTseevjnvOq0V/HDTT/k2ive//sT6JaNVSb2B5z7B0UO7THLl435GwaGvPeWyoz5BXvtsyaTR5ZjWzXNfIufPYG9vwvYviXgzFPfycXr/oFqeRSjxp2UCKpKu91mfn7++cnJqbt37frdbStXjO356c9+xIknnsTll1yTi8XPJc69A9RmlY9vGGDzs60LTljl3z406l3TV2YxXigoVlK6IgXaZZskiY6FZKLdOhb75XHQzCRM7DPsP7KV2fohxpa9jr7iQCSOdvI8j3K5vLharV4wODi47sCBA9uvuPSaF7Y8/ig3fOA67rnrvmMn0CfuKjF5UPjohgrf/u/6JceP+V8bGPLO6CjeTjKJSS8kq5p4lmOok9dP2HbmqGFifydn/+FnmJ0/xMpl6+krVnN78DyPSqVycn+1/23btj+946ILr9j5n7/8Me/7wLu4b+P30wuW1cl9u4aYnVamj+oFJ6zw7qoukpMXmnReZ2lla7/HvJHFadKjLxHY1xWxsFSBs1e/m0vXf4ZKaRhVQ680NTW157e/3XXd6JLRTaMjxzM0NJyqk+KgT36rTLOhTB0OTj7xFP/26pB3RozU3UtswO405SVoH3X6Su9nOUlgdlKZ2B+q+U6bg0e2Ml07wMpl63pyEkCpVB7q6+s7fcfO7T87cnR86uJL38q9G7/r1PGSjepzykcvqrFszL+pOiTrRJT4E5Mp+SH6i/V+LB+sfjvJHHNbu2U86hM77+UHj3yCufo4IqkpxjQWGB5evG7VqlUb3rD+rTI3N5O1DnH67AMFKgMl2i3WjJ3m/7R/UMYy6a8JEei1j9uMktyQevWZ7CfRTgT2OyKWBnnO6vdw8bq/p1oezRU3EWF6enr31q1PX1Qs9u14/vB/8Z63/102Bx3cW2X1WUUGh+XKYpkxo50dSRXsZ3fd4rzUt9vOaEY9BVXt2C1ZfWb0b7AwaGhuutwXvwtbdm7kh49+ilrjSC4nqSqVSmVsZGT0ytedez7VcdeAdFqVKw0euKNWHhiWN3mF9OBJ4CZnQiSecyfe1R2aW+72Jxl9q6Xvkm1Q4fEdG/nBwx+nVj+cS6RCocDIyPCb/+XfbilPlR50y+yXkWU+w8v8Ub8ga5F45ZK7ij1x2xIO6/1+5mF+ytr+ha69lRjNkUTpcO/jO+/DqHLZ+s9kipuIUCz2rT3v7POXIuzJJdCiUcEEurRQYigUKVv8e9kmvcpt4mVOpFdFK9mLYaTzbjTbLHA5qUMkEZ9LXv9pBipLHSKpKuVyeWhkydCo7xcdAjk812oJ8zUZC4wscuSe+DlPrHqVm4x+kmVRnrp5JqOvWIelFyglZtGzsHn7Rn7wyCeZyxA3Y8xgrVYbC9oudzkc1FeGVkOXIFrsrQDd56yVS4pjnlGZZz1ntU+1kSxm6+XQCJt33oeKcMX6f6TfMiZFpIjI8YPVkXwCFfuVQoM+vI4tkjVkloeeJEpW0gXykm1DceqlqI1meV09BL2ruB7f8W1QuHz9P1AtL0HV4HkexUJx+KQTVuQTyC8KhVLIwh04Mch0uMu1gRfmrOxpxP0miWWLiyT7lVjU0ta8pBYWK1dV2bzjXhTl8nW3MFBZiojg+36/57ui5xDI8yEOYyQn7a7xsexU2aubBC8pbsyzL50dVfPE11UNLreHb4LSIRIIV6y/hXJxGMEvJhE7BFIBPEEldBQkY9gksGzXMrXi0bsdB5DMoFnafoqnGmLycMXPbeeOGhMp5lTplj+2414Qj8te+2k8KaYMJZdAXTBGu2HBzLWPxS1r1fImCYovZUoyDCK0zBRtncvgVJv0nZX2pERJRgClqUcJtImx7LQ0xoW5PRxBUR7bsZEgCFg5eJUk2xZSrTS7U9duyQ5g5CnqTlvDitI7OaP61wjCZPsZHp/5GHNmD2mfOQ7m+1LmzOqnObH0dgCerX2RnfNfRYzHwKiw+jzfUTaa2EVSG0zOJjet/8GvD/+KWV7MJ5BBItvDhpxl5sfvOdyjVoSRzmpPB8/RJ4speSMM+CuZCXbxxOzfxsKcoLDRgBP63sKplRvwpUJbZ5kJdnc2EIFyVagMZHFLtqLOMi3CfBPA/sY+VrEIGI/KnKUzkfOokSO50LvmfXHrg8d489fsqt8TjbeyfA3DhTMx2u7UtdoYE1DyjuP06kfwpQLA7vp3OdD4JYoXjR+YztdY/40BYxR18ty6JitfhVaCfAneDoWhhwVrvZuMMtOjTUDA9tpXmGpvB6DsHcfa/g/hST9hdCfuUxkrXc3S4usBmAte4NnarbRpLIinF+ZsLyCOLkkvAkU7hmoUprDDFaHvE367VZ1vp0yjcjtMgnpMtneyrXZ7tJudXLqc4/suJNAgqhdowKLCGk6vfgjpQtxW+yoTradQ9ePwiYMnzjQL4tFEGEccNyefQIrjC9mRu1BUwmifQQm6X0OYn1wxjf6b6F3YNf8dDjb/B4CCVDi9fwMlWUoQtfA5tXIDg/4pAIy3NvPc/D3WakMQimKEBwKUdjSeOvVj7Ek/LxTtELfkE8iIRIo6j3Vx3qVbJ2wXklMi0HZA1nTb1Mwhnpz7PC2dBWBZ3xtZVXkvihKoYbT4Ok6pvBeAQOd5au7zzAYvQrSJxKpYU3jUwmMtmOASLFpYV1Uk45MJDrK4oMuGoXFmVGJx69pJUZ1IMdtsHXJj3FZVun367G38gl3znbMoQVjTfz0D3hielHhl/01UvOMAeLHxIHvqPwP8TDydPtN4CIkRYejiysCT1H25BAo0ZN1QqRLvVBa10yIlsT5wVinMS3IRtLTB03O3djkDhguns7b/g5xUuoiTy38IwLw5yG9mP0fDzFo6MIknW8TDUK5JLLxRTXN1qLOAdk8OQp3JpeU1/Y1B5u0smtkXeBxub2Vr7auRwj6t/wbWLfonijIAwLbaNznY2gx4Lw2PxuLSay7pvuyTkkwC0WVfS0TynkkE8tXiGE2XZQXvjSrPzv07h5qPAVDyhhn0VwAw0foNT8/djlGT6jcLg4PH4aRsrEmMpiuOSbM3YSgm2DFB/axVcr4ZeSRWiYjtQfGYDQ7w9NxXMBZzK4Zn5r7GTHsPipdvb2kPPLZ5oj3wYC2apnVQwtUId7IEW+VEwuyivDie5rxHHrwIJW8YsQ55BY/BwnKQguP7/z548sZP4+nMu91rm7cpqdYKoNnilqqbI17J+nFdw5C/mjOqH4zCD2E6rXIdS4vnYLoGpMnBoy8Rj8lpG/WdSKn4R2QY4toGvZV0ngmfH/TvcEaRMwf+nOHCGgBeaPyCvY2HAKj6x3PWwEcoSDVSnFl48lyOXpgc0Uy0bfUikG0lp5+NRTxNPdtWtW1p59U3tFnWt47VlXcBUDdHeGT6Fh6d+SxNMw3AyvI7WFG+mCCysV1s6T7T42fiEc2ZCwvsYqHRhXR9otA7t4yq0L5Isalm7hCZu48aSrKYcwf/grLXuXLy3PwD7G9u5sXGr9hV/zHQcUPOHvgwVe8VGDUE1vi9RNjGQ45qSO6GoQ+a9MZSdlC0JRIagKE7EXZkm/C2Bx4fIfdkbzqEP7VyFWPltwIw1d7N47O3EmiLttZ5YvZW5oIDALyi7zzW9l+b4d70FrOseiTrq2Vta1y/h4i5TmaenMbPYukD9ypLnjEWaMDi4mrOGbgZr7uJPjV3J+Otp1F8wGd/czNba524kSCcOXATo8VXYwgWPITM0pc4OCyjVkK/LcYf9NzFFtgV7G+QYvPQwIxvbJiEOBhVwOc11RtZUlwLwHjraZ6p3RWJs1Foa8CTc99gsr0LgEX+cs6sfhChLyXi2XjUGdPFY6sKSYjZAr5Y7P4nuUcdTkhxhbNq4oiju7qGE0vnc0b1us542mLzzL8y2XoB8KOIgOAx3trOlpnbIqW5tv/djJUupK1B5o7lipxYroaQtavZ3r4hXuBkStlBaeKEcqm5YuQCtsMd6hC5KAO8dvBm+r1RAF5sPsz2+QdAvNTCADxbu48DzS0AlLxFnDv4IUre4uhENYVHs8UuqY9sbnGd107dfA4KPfkuC0ZhDEf7p+PPOPFpIlGJWVkxalhTuZKV5bcB0DSzPDr9BeaDI1bEUa1nYTrYx6PTXyDQBgBj5Teztv+P4olZ/Ycevos7GT9P1NdYtZhu23avXcw9as42+JKclqUI7XphXY8SK8pvoaHTzAYHeGrubnbN/xzteurZSt3jufmfsK32PeaCg9SDoywvvRFfSjk7V74RS0Z+0nfL2sVcXyyMRQNeSN2Ms5JwoOw78OkyBNra5udH/4aHpv4ZowFz5iBtbWKHyZMnrCA0dJYfHflLqv4SBI+GmaGtrWj1U3is87A8rPZL+tZaj4PDKOCldE4u6ZyB25N26pN91pQCpB0yTAcH0Pb+zqGzxNfvel1yAKFuJpkPjnbqSnzlN+seNZrdj83pSQJCaBOJJo99UgQKTHqyGcrdIVBEDE0cFloLZsIniU8QQpThc94PWcJ2yfP+JE67jT120rOP8bhzUTAzvQgUBELQ7ohZhhfrHutmEDC+N9itljhZdWaQcUMqFOfw5oZ07xiG110cODaVJNVV3L1aYtYDT/e9OTnXi0ANpV1XjBGLQhpdIohmkMlS8W0QITThxZmDzeIaSbzYmdg6STVuHE5U3CE7+DTrZr87QgqPNR2UzglroLWp/T2u4DXmDc06LWPUmlh85pgUOPf0W7qWTFevhLaK2GBtVrCDGOnJxTfGXc5wy9XpKbziIqqoiDMqEZ5uG+cWfGeDarf16MyhHgRqNwB0QlVbihRD/nH3grhTdebh3idSiW9ouFBcPkjqgpBj8wjmEinRc8htYuOxyCfJVhZepSVwoF3vIWJSgIInu43HjCgj4dDuJSd353F0DrF4uZOUFL8kVVD6tkis8dW6q+QqXVeEowVxxFFArNsjCUzRzijMFCqyO3nX3CHQzGEAJspLmPIGdMQGYgsaUX5aPIxVbt+BTynzqFS7+sDmuC4ZFIesWZc6SeJJQHIJpm6+1bjVYHLuiI4nmdehV+1QwPjW9rhps8126IzVqX3olkyuf6QWcZOOq1o2i0T6IhnfSR0GRniyfr6Qh0eOCY9ps21iazAxf6iHq3F4r3DujcV6fUo3mTapDl0iSKbJngQQOqzxGkrcVmzT375TGBIwPKq2CRI/4xAwJl5WXBp7XEfBC0FbqE3pprNuLNUPT/XlE2jVucrezUp9Ur/TrLM7dvyyTgHi2Ara1RPRM7Ez2M2P2yRjREQvbtjWPb7W7tl7uN+bbng4GfPRbnk+HrrOazcWhNKus7sxyf37tgSsWV3LJ9AdV7aZ+V2br1/V3NmY1ntMkGTF7F8ShlxlsDSV9grBuirb1StJTnJNCyeOY9lTdLkkD0/nDpCrIhQI2lCf1ru/flVjx8wu5dar3bmlr732Czfc36fTe/RLjWl9RFOM6x79m8QkOgQxGLHPE9IaIz5DSX6SN5PC1u7tHsGAZOMxiaUwqIXHqq9KY1ofmd6jX7r+/hKF/vTiZ55R/tlvKjAd0JrUCwaXy119g5yc1dQ20Hole8u1jU7Xt7KtpK6YiLu9x7XtnLSN5P4eIC8JzRndM7NHrysskk0y6PHlc+qpWpm/MJvb0mTiYcMpl/mbZvbphsYMewxxVM5VlNIVvfTOkqwbuxA2tyVFwj1HT9Zz/1vXV3DFNFboksJjFBozumdmr25Yfam/6fCjyvzj2cTM/N38kw8o5/2xx95fGV5zbXHn3s262StwutfHSR3zRKJVT65sljMSv3UAS6TLJFHHttRjH8q2x9w2LgFsQzVG5d6uDwJoTvPI3F42LL+k+OAzt7Yojwjf/EAzh896pOvuLFI/pAyv86nv1ZMHTuSmwiDXFsqywiskzUZxGF1TLC4W+OyfLyTz7FJDNlhXwGLj00vY6qYtBA3d3Zzhntm9+qX+E+SFqUcM5eOEO69vkZcWUh/86R0+rbOLmN2GO69ucv39fWv6hriyb4g3SUHW+iWGVHURSNETOma9ZJMi6dGlOcz259T9WQ+W1pMwkCcW3xLZTd17Pi1PmGk3dErbbGtOs6k1xXe+flVz5/u+26f+SqG0xXDbjfnEOSYChem6rxQJ5qC8Slj8Sti9kfLAaYxWR1jamNflIMf7PovFp6JISVULDoGUOBwqlgvZcYZSalV6clqag0Roi9IIDPMaMOnBgb4Ku2tHmZjboeNjfyL1o09A7XmD1y/cvQBhXjKBwvSx7xf46VMFXrkkwB8Vqkug1QLKUB4WiiPQf7wQ7pgenfMp3/LnvO7AQXeKoZ7wusaEAD7abdeBabp5YWRSu2IUKvR5DPP7oDkFjcOK1KFYhNphCA4rTx6Cy16tfOaK9jHO9OX0cno5/T+k/wVbhhSZrvD0SAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0xMi0yOFQwOTozMTo1NiswMDowMLhrE7kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMDhUMTk6NDM6NTkrMDA6MDCdstIMAAAAIHRFWHRzb2Z0d2FyZQBodHRwczovL2ltYWdlbWFnaWNrLm9yZ7zPHZ0AAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW1iOjpJbWFnZTo6SGVpZ2h0ADUxMo+NU4EAAAAXdEVYdFRodW1iOjpJbWFnZTo6V2lkdGgANTEyHHwD3AAAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxNTQ2OTc2NjM5OiA9twAAABN0RVh0VGh1bWI6OlNpemUAMjc5NTUxQgHjNFMAAABadEVYdFRodW1iOjpVUkkAZmlsZTovLy9kYXRhL3d3d3Jvb3Qvd3d3LmVhc3lpY29uLm5ldC9jZG4taW1nLmVhc3lpY29uLmNuL2ZpbGVzLzExOC8xMTg0MjYwLnBuZ1tLqmgAAAAASUVORK5CYII="); -} - -.ffilepreview--filetype-txt { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAwERJZHv2gAAFYRJREFUeNrtW1uMXFV2XfvWq9+2u238wHbbBgYMBONHEAN2iFAUCYwNGT5IZiLlF38wk0TJTIQ0ISEhX2iIoozkJEyGIWACKJDhGUE0QYFICLttsIFAG4Ibt/vh7ra7u7qrqqvq7p2Pex773HqMjTLRfPhatqvuPfecfdbZj7X3OQVcui5dl65f4EUX+8KjP/gBTo2cwfLlvRjoH8Cy5csRx3Xkcnl0FDqQzWWRyWRAFIFs7wL/IbhJTT4BEAJIQADEthfVDxFAwNz589i5/UYMbhpEvV5HvVZHtVZFqVRCpVJBLpfD1NkpjI2PobxYwoaNG3D77bdf1HyzF9rwoT9/GOVyGYVCF/bt3YufvvyvHQP9AyuFeVW1Wt1YrVZX1qq1fC6fQzabRRRFDeiLWhICIPYGSYJdGjRKQSeUtDGgVatVVKtVzM8XUatVUavWsLS0hEqlUhWR6UyU+RKQqfHx8elvP/BA5b3DR/CTJ59Eb08vvvGN3/q/0aCH/+KvsPX6rRj9chR/8J0H6K//5m+v6u3tu6ent+e2bCZzTa5QWCbCfRDKRZHRGgKooWvSquRBIzNpUdLoZkQWSQjIgUgRMDE+jo58HnfecQc6uzrBzBARMDMgUqMoKlYqldl6rfbJ+fPn356emXlh9623Dr/zzn9h69ateOut/8C999771QH6s4f/EudmZrB95w5MnZ3auHrNmgM9PT2/k8/lBzPZTCB0suJ+Mq0ACYbWTYwWNb6qvhCpj4Sx8TMY/uQTbLthG/buvQPd3d0QlmBWVlPr9TrK5fKp2dnZQ1988T8HBwc3nX7zzTdw+eWXY//+/S2ljFprziMol8t48Pt/iuJ8cc+GjYPP9vf3/0lHZ+dglMmA3XwkwUQAEXH/+7/quwEyacbqHkNYzPsCYeNygn7Cv6YTsAiOvf8+Xnvt37C4sGgWCe5vsl6CbDaLvr7eTevWrX3w2uuue/bcuZnd999/P+aLRbz00ssXB9BDDz+MmelpHPjOt/H8c/+8d82aNU/39vbeTFHUXGD7R8RP3KCW3IN5Dt+e4QERuDZs+mARsH0PGjC2kJoxkmvo2FG8+vrrKJUWjYtSKLmFFGQyWQwMDHx9y5Yth4aOHt37rW9+E6NnzuDFF1+8cBM79OzzKJfLWCjO71mzdt3TXd3dG5IxJYkq0rwH50JEWZAOXFbbrI9SfkfcA29n6jWIllSAKCKMj43h008/Sd4zC7Fj+43Yd9dedHZ2BgA2u+bm5k5//vnn31q5cuXb/StWYEV/f0ObTPrGg99/CLVaDfPz8xvWrb3877t7e64j6wasWYl3B9qvanF0ZHfvgRLAJGwk1vEak9AuSJDqWF3FYhHT09PBvYnJCczPF7Fp8ybk8/m2ABUKHcvy+dzW4eHhN8+fPz9355134rnnngvaNJhYpVzBH//h72P1Zavv7+7uvtnaOSvbFyDxQeaZCABjMkE7kcAcWH13n5X/YuuRWFzfcCbpTdT25zREvBkyC44eO4ZXXnkVC4vGJ7W4iIAVK1bcvGXLlgO7d++mxcXFxjb6y0OPPIK+nj7U4/rXBtdvfKOzq2tQdHRB69iU3G/x1N52FpTEvWbv+G9KbY25ibpNRJgYH8Pwp8NO0zyPSgDbuX0H7rLRrYW5ERHm5+dHPvroo9/M5/PDp06dwn333ddcgxZmZnHllVehr6fnnlw+N8jCzpmGEQRNo0nL6GX7YBjtYK9hwqHGuT7tOAieub5STt9qkY6qQ0eP4tXXXkepVGqpSSKCzs7OwYGBgXtuuukmdHZ2tTaxTC6DV376Qkd3d89tFGWcoDbCQMSYlo9U7CaJYLLhhH37xDwFzB5UsBhz8ubMhvD5cWD6ZQ+a1SoVMVncXQgER4aG8NLLr7QFKZvNor+//9cfe+yxjmJxPnymv6zoX4kV/QMroyhzjRtXeebEHFg5UJ1LeRUWAYQ4RYwJSeBWdmK1xH6FJBFPkrZEpHinhJ8ZwQK6sYPQl4w9dPQYWAR377urqbkREXK53DW7du1aBeB0S4D6evvAzKtyuewyNmaQdKDAgg/fLhylwjABiSkoskwiofAKWj1DAQUaoQFMT4qdeTXijhQtOHr0GIgI++7ai54USCKCjo6OZf39/SszmUxrgGoco1pdGoyZ+yIW70hT8Vso+GBVxgnpsFQE0MtLXikpAc517LQnnYUYnmOHsLgyB6mFjSekqYXiY0eODEGEcfe+fQ2axMy9i6XSYHdX17GWAOVyGVSrMiAiOTF8PwDDfmY/amOpwlUrYKOVUwqlSQQkvkdDYV9UGqEdrwMGAkikHLRqrN6xX9hmjAIcGToKgHDP/v3o6vJkkohyBKzt7e0NNDUAKJ8voFqt5RNE06GXASYXREnL5YDSwCWoWH3QjtVqSdrUCAyRsEbkHXGKpBJD+WPY0G412i1cwNSTZ0eGhgAB7t7vfVIURchmcyvWr1/fGqAok0U2l4OAklDs5kCQcF18ZNOm5xqI0xYGgYSRhttf7BfbOC+bZLC9LyoIECBMIFJRsNklgOVwgUsyC3X4yBEwGPfs24eenh4QEbLZTFcUhdw5BCgiRFFkQrQmcymnqu8F/knnCfqtZNmdLxKv8q5yKHDmok3WdslQIkAQmUWTYMkasXca5N73+d7hI0eQmNs+dHZ0gIhyaZzDiqKLHrYUQS4iNAvoPloEKmC0B8pf2OqgJwkWKO/SRM1R+TPf2JgtvJ/h2KUizTm+ihhaVtXsvfcOgwDsu2svKK0+aYBsXsVipLbr5iKLhOHdCOC1LMWZtAUqmqBN1gORitWAqx96K/LyMHnCHeqrzmxCt5DCxg3+3uHDqNdjXLF5UwOTDABKWK0pXkWe1OkVJRKk4772leSAM8g5gqfumVCn68th7JHU/6FWWK3s7unDFVddpVZARUFDMomUyilzIztfJG1n54t4973DmF0ot9eg2GXZQQwJ+JBX6Ga+yf8TcijxSqAeKLpm5iZWSZz2EGnz8fIUOvLo7FzZxMBSsNq5NMs0TFOOGRPjY9i8ZVMbDeKkrMAsiIiDYo/jhCa0iDZvZqMJZpLBzk6TvY1Q3dAoufcZ0lTTfB08tgAE5DVpTzDgeuqvFdEonpkPJ1XMWp0DSVJO2hQ5WcCR0lbNha12GF+1auUA1ly2Oli/RIDAwwZzaFhhvdjQ7VJXKw0wz7R7JCJMTc9gYnLSYSs2eqYBE3aBiaTWGiBmTui7JKSQzcAu4rj/fNKzbs1q7NqxHb+M14cf/zfOTIyDxKQrLtAqc7Vuw1lP2EeDk7Ylg3ReKel0w7Qfm5zEseMnQsetVz+16q2cLrX3IgGPIWps1xDgiTA5edZpii2n2ERNs3773JVVWgHEYkqpzABFzs7ZbO4lASyc/fj4JMbGJwEAkU0lgv2xFEBBXV4lu2qaDa5LOTWrwCZApoBJOrfLG5lbrtdAcUTJI2BhV4f6uRokpsgsJpmx93zYtQKbKrLob3ZCKrI5ehBOQFh8viR2Lx5BUCCX2ynGys1dWZDRur5SzN/liEaPTPLsrKfeBiCOGXHMYGYTWtVyW9QpAcxOavVll2Hd2tVori/trlR6oGpH1hJSFu0Ra6adigpYLnZ2agpnxsaDrNUtNKkSiq1ughEncbEFQMZBMwuiyDIdmyoYkMTrEDNj7do1uPmmXRcNz//H9f7xD3F69IwJ9RJGeltxMNsqYmrlXK+3BsiGOldNFK+mWv2JfMF8bGwc7w0ddamE9xb6U1AxavrNpic6RUaqBRr69s8bHD0RxicmXCnGsk4B+cU25JFgNMiWcVsBxCxOi0Qiv+duhTTbpKJc/ZnxcYyOjTWsnnemNmnS3tlDoj2aCECR7gDe2ZCHwW8DhVXx9EUEU9f2i0HQodwSWzKWw6hzOxMzYc6FRNeRcdhkk1jTPVluyb4koUmvThcQ+g6XOpEJDGR2VmM72dC5JhVIC4aXR5o4YYI/fKWLZkmAUKvngorfrKzHbepBbp+KBexChZkwh8LauLJ61UqsXbMmuZMm0yl/qkN3UEZRUd5png7h2r5VmqEe+rq0un92ehrj4xNKAX2iawex0Yzt6ZK4XaqhT2YoSqmP3OgCPLNg44YN2HPLzfhlvIbe/wCjZ8YQue0jGzUJIA5chyXItXZRLOYYIjGY4+SMoUHXbxP4JNWu48TkJN4/fgJ6fLdkWnvMP1pzmnLJNH0O8iZxbchMVFq8S0QYHR1ze/m2gul8luESbLRJDFFs66TBBGFyqphUJjhksi7LTjo6NfIlvhgZUYOnpU3lHQGvCtu5WlLqHbJELoWfa9n4iktM7eajZdPB9FVmnOSfDLRNViFgSsK8rebpbsk3dB3bLWEfj8LaoAODjEdP+Qq7gxQk/zpykuUqljDY434KncbVgQCISMsjTeTxzNuecItDGtSEB7Fi0kRImy4AEHv1XL5iOVYN9CseolazmRLpxaNmN3VplzwAanxAZxSp6AhfRZydm8P09IwTxu/xKZnELrTxQ+2yeY6TMOuyeQnLnr7UARcar77yCtx+256Aa4TgaP+RQiQNIIkrSzhS1xxfWOXSiWcQwwh49/AR/Oyt/zTfKchX00MnPohRl3ZMGjHsGUM7uVBBvfNl83x65hw+/nS4ZfZ+wVdzrveVXyciTJ6dcnNJFSGc43ag2UpqvW0uZggTsznhrk87m5xFQqmGT36G4c8+95FFLwtCoQDjhsgC3VgDstxE1Sn8c+XjvXehhm/aR3kHbTe5yfQhEHtKRJmepNh+Q006qQeJk987Tl1w8mWMyMy6pRnYUByYHDwZbFYVSxXpw+qtYpEOEV/eiMwYlvBrsmrFd89UfUtM2bXObUwMIiBTvLaRJaDn7hSHNzsW8UI04zDWSPXRILMYpFbf51xIqIbFQmOqCF5TeYzp24AZ+G9LT5ST1psLzPbQVhsNioURg8FgRBK5dML+41QTdiMxkUK5rHBiDhSrfaSOpohfzgZnC6Uh4syiuTxamUxOx74PaSePMzfLs8QvTjOA2IR4YQFbKq6SwYDIGXtNWT6snyKb96hyCUTtzIo1YfETIhjAfPbvDqQj5T9SCuv8hyKFTi5O3nX+pYk8pmgvtbjaGqCEAyWNEZGPYs5UQp31m5mWVLIrRrhpGarAekKCJAtPnVBzJm0bs3c7xvaSfi1Xco7cmpi0l8eeBYL4dTDrxSwQgBeKpTYmFjPiemw2DsUzVEesQvsMzhYqlU7KF7pkZjQ0fFv5Ar/yLvSKmGN2Ki4oeXzyKY3yiCiO1Fwed5rEFEeS6oVUZ+dmAikDgOq1OurVWvJzosjPqilZM8Uz/zmVTbFAIu87dOriNNAqhyplOPOwEUY5V5cZpC5y2qMklZ8jj1hmbTLOmBFzvVScm2sN0FKtimq9VmNhEKePZTfmDWTZrj1PROwnKQLEnlc0Y7vaDAFRBw00WKqYELypCzBN5IGVB941xP6coxvXhGAWRj3m8/PF8LR9aGL1KgCeFuGaSJTzcASkwwnnHJyL476URkGlr7HY5ZwkktCtI72dbJDaOU26WHmsxqBBHlflJEBYaiQyEdfbZPMURcjmciMiKDJLv11wV8EzfkFEwvVr4JAq7lsBjNDWTSZM1s7VC6sPvgRmaTAhJY9r4/a5nG15D6BLltb5NJUHxWw2N5I+bB4AtLBQAiDThY6uuUKB+m0AY7VYWpi0OxAbUsm6Pg+ApCzUmaFlyuQBs+vOAViKQCt+qPdARA9AFC5eE3kUN0WtWptdXFycSk0pBKi0WERpsTS1fPnyT4Rzm90c1CKQc35+0y1wT0H0UJlA4Db8yqvigPvf7qYGALhVdwSqoWKm5fElE6WAdjgKaUZS5og/OTd5drqruzsAKCjhT56Zxo3bd1QqlfLbMccQoz3Ozbpf+3Hya0D2W9Xu+B77PaaE+htelZztcymd36YWN4bYTTzLd9z2nLiKorCOdGw0zcvDRstjLY/hdnZcZvOukSdmRrlSefv6nbsqZ4tzrQG69sarMTZ+BkuVpX+p1Wojwpwc4bWFJAYktqzT/+Y02Ssy5mcHht1fs9ioSoGIA9f+OAac+tUPszMcN0FmQMkjTeSB2ZWB2QQk+8si2DEb5anXaiNL5coLk2NjuG7zYGuAHv/hD7FQPI+nfvz4yaWlyjMsZmW0llj3aE3A3WfzR0JtSNbM9wF/WCnRAP8b1AQMOOBtWwcawh/nxZZkanmctjWThxvkiTlGZaly6Kkn/mF4bm4WBw8eDABq+Enmr2zbhht33IRKuXIyl8t/PZPNrgdUJHOJqj68GWZGmtZ7/qLppg/L2tH7rN2zG/tuY13e0umvLo9AsFSpvDs/O/u9bdt3zoOBjz863h6gj098iJ237kE+m52rlEvDmWzmNzKZzDI4R2lFCFlranT1OQybvtwgLgQHIAVopWriCl7bdSt5HANqI0+1Wj29uFA8UOjoPJHN53HoicfTcDT/WXh1/jzOTU1h0zVfe3uxWDxQXaqc9r8ThTsJYXdhxXhzYa/i1izgHLnz2t5sWNzWtSv1ih/HnugSW6dxps7elKw8rOXxfft2oTzVpcrpxeL8gS1XX/n27MwMqguLzaBo1CAAOHH8OHbs+FVMjI7iuq3bTo5NnjkSRdHWiKL1eg0byb6OeGY/q0kW5r+S42862U3rnI7s6k0AcBt/SarSmDf6iOd/31FdqrxbWlg4sH7L9f/+6ftDyBcKeOapJy4cIAD48MQHuGHHDoyOjqCzu+fL0sLCGxFRGaANBCx3/II8ybHlisSE0nQyVR5EajbalswzCvyF9Tu+5uQ4Ify43EIeYUG9XhtZWqoenC/Of69QKJwYHxlGoVDAM0892QqG1gABwEfHP8CeW2/BEkcg4fknf/R3P7vm2mtf53o8CqDGLBkiMIvkWCTjzAkI1Fr/ZVhTsfDp5z4Eu+N9DgzzHmzZxEdR+44Y8zVnDWtgmavXaxNxXH93qVL+caVUevAnPzr4/A3bd85RFCGXLeDpJ/+xHQQXvtHy27/7e4jjGIVCB/r6lmF09HRHV1fPyq7ujlW1en2jiKyNCMsjijoFVBDhbKL9ZEom4nYz3YaGKoi5VNasOtl3rQa4063k8z4BJLL7GlSHYIkRl0UwS0QT+WxupFRenC5XSlMb12+unD83g0p5EVEmi2cP/dMFzfuid6L+6LvfxWtvvoPrr70SUZRFV1cHanEMAiGfyyFXKKCzuweFjg6ACBmJkq1sBhABEjEiE7YZdo8tCblRFCFmIGJBJpMcZo8IoDjJpIgYzBEoYwCNyWllpVxCpbiAaryEar0GEiCXyaBcXgQL4+TJz/Bru2/BY48+erFTvnRdui5dv7jrfwE1wPaqp08q4QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0xMi0yOFQwOTozMTo1NiswMDowMLhrE7kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMDhUMTk6NDM6NTkrMDA6MDCdstIMAAAAIHRFWHRzb2Z0d2FyZQBodHRwczovL2ltYWdlbWFnaWNrLm9yZ7zPHZ0AAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW1iOjpJbWFnZTo6SGVpZ2h0ADUxMo+NU4EAAAAXdEVYdFRodW1iOjpJbWFnZTo6V2lkdGgANTEyHHwD3AAAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxNTQ2OTc2NjM5OiA9twAAABN0RVh0VGh1bWI6OlNpemUAMzI4NzI0QhgIra8AAABadEVYdFRodW1iOjpVUkkAZmlsZTovLy9kYXRhL3d3d3Jvb3Qvd3d3LmVhc3lpY29uLm5ldC9jZG4taW1nLmVhc3lpY29uLmNuL2ZpbGVzLzExOC8xMTg0MjU5LnBuZ9DPurcAAAAASUVORK5CYII="); -} - -.ffilepreview--filetype-ppt { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAwAkajkauAAAEtlJREFUeNrtXHuMHdV5/31n7t177673vYtxsL3gGGJC2jRtik1SY1pABYFiV0nDMxCiUoJUKVEU9b8mIalUqZEiVX2kQS1V24BB2CQUiRISAtgLMQSQGhDY3oCf+LW73vfd+5g5X/+YOTPfOXPmrqGt1D840spzz5zHd37f+5sZAx+0D9oH7f+w0Xud8JOvlPHG5CjO657Hmr4yRnoVQg1USkCtHKCrBJQUoJSYxOJaJb/J9CcXDIA4G09JP1HWZ9YhAkHj5HIv+q//O6y+eDOiMEQYhmi1WqjX62g0GiiXyzgzOYkT776LuabCpgtq+PQ1n31P5y2d68CH7+7DUjNCtauCu7cw7h+Pquf3lkc0Y7TR5vWNNo802tRVKQPlgBBQAfppJwNsQBDXElVigJQNTgoaox4GqISE+YVFhK0m2u02Gs0mmo1Gi7WeUkodBfPkyZOnpv7sq19vvPrSOH74Lz9Ab28vtn/u1v8dCdr5J73Y+pEaDpwMcfX3ztIzXxu6eLBb7RjooW3lAJuqZerXjD4AZUUEIgYBIBJLc3KoVEpW2JaTMXJsKj2pEOHwtMbM6hux+fPfQmXVILSOwMzQWoMZbaVoodFozrbb7f0zMzN7p6enH7ti69UHf7HnGXzkso9h70+exPZb73r/AD16Tz9OzEb4g0srODat14+NBvf219Qt1YDGSiUPV40QsGd19mxQuLtRNUqA5dx4BeCd6RCvHI6wcfMObL7526j2DoO1tsYRCMyMMAyxvLx8eHZ27qFDhw7949iFY8d++vRTuOCCtbhhx02FGARFN3bdPYDFBuOeO4axf39z64bR0v0jq9TN1RINWPZFUm5AYGFkmGz7klLPzrW5pETdSKwHrzTN1hknZiOcPfYWGvNnsHrj5ShXejJARVNKoVqtDvT09Gzt7evdcurUqQM3/tHNR1/75T586Y7b8OAju84doJ13VHF6Cbjnzn6MP7N4w9hw8MBATV0Waw05NsGVBsF9S0QoU7Oc+JD4c3XJZUIsrUTAzJLGyTkNgDB97E0sz53B+ZdsjkHyimwMVK27tq6nu/vaA2+9cfDq67dPPP/MU/jS7X+MR3Y/kRvvFfLDf3Ue5usRztb11otGSg/2VWldfhrbQuAKh68RAC2xIP/ggm7ZTwQcmorw6pG2Rc/GT30WW275Dio9g2DW6NTm5uaOvf32O7cNj4zsHRpdg/6BwdyYnATt/GIvGiHj7JJe9+GR0v39RnIYnZsLtW+8K3mWDTOAwQkDnPFCsGbrjJOzNghnj+9HffbUipIEAJVKtb+r0nXpxMEDP52Znpy78bpr8MiuH1ljctZkqaVx7d/M4sKB4Mv9VbWF5EGYs0PKPyCWDF+/C445uIatbprsudqZ61vfY2ugGb9+cTde2vlNNBamQKRQ1IiAwYGBLRs2bLj3iiuvoaXFhdwYS4KevrOE0dFu3L65eskFA6XvVks0YB+ywO1IY+peW4bWGe/OFXhlc/1hQSpBc341Onv0TSzPT64oSUEQgIjWbb/hD59cff6a6Zuu3IB/+/Gz6X0L3rdoBL+1roKBqtpRKWGMOREanfzLQojca8FUazyS3yhai/N9GmAmMCj+172nnf18NIAw8cKjeOmR+9BcmimUJGZGrVYbGxoe2fE7Wz6NI2s/Z923Zg22l/BPz81XB2tqW0mRLeqS0z5x16bfUEr2WO3MMyqlqVh9Is7mud6zk5qn9wkT44/iFz/8CzQWzxaCVCqVMDQ0eNXff/cvq73Hn7fvyR/n9wdY3R+MlBRtIo4DrFzw52WDUAu4cU+HSald4myu6+m9Rh15sHxjgNgmvbAbYI0tt30b1b6ROJgUjYhQLndt+sTlnxol4FghQCM1Bc0YrQboZ04oMG65yKP4iDTcVM79osiZPYtK6aAkPigy/GnI4dsgXu/XLzwGIoXNt3wrBkmEAMyMarXaPzzYPxKUyhZAlsy1Gai3eExr9FkqUeShXPVyx0UoVsfEpuTUT9s2KTmBo57mWhg6M85rmGKpPrh3F/Y99E00FqZz6qa17q3X62NhZEuXJUGVEtBs8zCYyynARZlBUWwk7zHBKmHk7jtLuOuSK1yCAIkNk4ceGTRlC0+M7waIcMXtdjBJRGUCrenpGyoGqLtMaLWpiww3UgoTW6Qpt3dqP8wBSMy1TiGSTu4QeabBIgPKBsRaV9pGFoiC8zTKeIsZE3t3Awxsue2+OMFlDaUUSuXy4IfWjxUD1KWASkCx3rlBGFs7ZcRZhTGZfrAjNWyPc4knzz3NTv5WQIOkz6ogFFhvZkzs3QUwxyD1j4CIEARBd0B2cmEBFAAomXzJuHmyJd/KSc1Yp89TnchztAOjSWBrFpOCmUb30v6YQRp+s+ChY2J8FwDCltvvQ7l7AFBB2RltA0QsmC9jC6fykONeShBZXDOaVezx2GK+WYvNguKwLO2WqYb43H5RaCDBStclHNyzC0QKv3vLN0CqnAuUciVXcj1F0Ya+Yhhzvt8VD6NuQRVUKnskIAJHTSAKk/VUpmaOKJPxfisV5nz3jJQzcPD5RxGFEVb9xnbCxg4qFrvbxM0qaVA9wGhDpRODSONO4jrlcoTy2BbUtn0NqjqQOxFHbfDSFPTSGYQn/gutd8ahZ44kQGX0MAPDNYVPrl2hrC6NuSxRuSb28BOYOrIP+OXxYoBM/GH7X/YuaOmF5UnEACtKNsBqlMauQNfF12DFxoxo8gDq43+L5us/AsKmdcCeMrCqy9EKr4NcuV6jNdCcPgl8aBWART9AVsBXUOBLjbKpFUvu2Oj5OcUAiSKCXjiNaHIiG6BKUH3nIxhYC6gSgvM2YdVnvgfVPYLlF/4hkdxsP29NLBezeTyCQ582cVtk37YBSqSABUA53LVYuSDVkNom62Dx/CTHS1pr4udYfPzrYnIA1TOM8kW/h+5tX0EwuhFUqqB721cRnngdrYlnARV46IGl8ZI8GUHkQGKBn0cTHIAScDS8JeXMc4lgzcM1NkZeJR6JXYkSEyMNbjWSe7EPj5YXEU4eQjT5Nvpu/Weo/jWg2iAqv30LWm+/AOjIn0Q7kbcVn3oDx4zelGan5uUkJIhlzczQnPVFbN+D8zvdwPQn87TO1mEGmzkSMY2k7GHmKpAK0D60D43XHs64ueY3oapDQKQdeuChR0Tf8hyaLXq8ZygCKA3JzMAUMNh9Jnk00pbe5yw8gLjWzj3X3cp9dDaXdYTw3V/FEgNA9Z4HtWp1rKIyFGHOEmMt8OcCegStMmFmN/D0qZibPqWiL8Nj7eQ8ANgosob9sE+KtIdDRQ7Q7KuX58E6BKkApAIgKMehSFHsY0UWSVRp6HHVUozNgLJVzHbzEYMjjgedS4AIA4ZzSuvENnE5QAxowualwzVDdY+AkgxAN+ahl2aQViu99EgmuAuKWNZ3PjZhegFAqQhGyJSPxAaphIiVtbj21avYlrRUldwmCnNpoYDKKI99Mg4SAejpo9Bzp1Njbs2T6/joYafLCl6FGQk71IOMsWKw0GMPIW4KUuQh2DPHBYhjScnmGgehUfnotah8IntdpXngOejlhRgw7fHjvtaJHti/V3TzrAGOkkMo8i6S27SIk5KoDjYoDl4CpMYgUFDVXnR99Fqsuu7PoXriAlZ4/FdovPwwWKcCZTPPpce8UdKJHuvswsMVASSNY1aMEhuTo6OWvuf11ytxDpe6LtmK/i8+kNgFApW7ofpWI1h9MajUBQCIZk9g4YnvIJo8GpdKI2Q2y2WWtD9u/FNED5CEGQSEduRT4MUYrDMJIhLRtYyOnWA6rdkYwZARqqcWBADB0HoEQ+vhaxy10To4jqX//Gu03t4HYxgpkRr20GMfxlMFkAD5hCPqKEEcxwKaLENs2yN28tRsZ7YQcuaZ1EXDdniNRejF6czhtJvQMycQnj6I1oFxtCb2QC+eTdILziJkiwYJjkAirTQAvsKea39iujoYaU4DQcBrZ7xsZlvvJRE+A+kY6eYbT2N+9zeyjqgNbsyDW/XEFqrYRuXsTIF1lvGaazN99Mg+zcLAeQAiaXvgLGYNzPczzu1Zodt0YwnRtHgURZTYI5VTyxQSK4qF1zOx7sxXCyTAeuxUCFAKtNFvFxSfy5cH6PRg0DLScl2ClfEwLDuWSyzPlR4/P/L0uAl21DFQFDmWm827cRB7drWiarJVL7GirJEX9TT+kc+xkD2Tl+ufKz3ko4fz413P3bEeFCG24kW6u5LMpokte7gvXZqTlqTPyiVIYl7KcUc0CukxOZhLj/Bs7juTrJN3EWyEHBXjLPJ2XUWaU3mqaL5AssjIO14sps2XeVK+i537RfS4L0EUBId2vZxiqQzPJRfTUpwdQn1FspzNKJhDJlJ31nADUomD+cEeetxxPgGx5ki6EglLqg+yzFUIUOrmTTYv15UFqByHJCel5fMAybBfMiey8yoDsMUIR+2ssXl3T2maIaNIB1DTb9lACHX3ABRX/MTmkvMAKJEsltGaoUWzOBvn6GaRkkTz04hmT4FIIZo+kRSqHNF0I3IvPeY6Y3v6pEmA7tLjiQcz5jv9nlyMBagkolATQTOscoMRqpSZDHYlKC2ZxIlpffwRNF7/OYgI0fxUSly8bN7/svygJUcPZTZZCpUBYSV6Ut+RnLqTmzfv/9nu1RFJc21Ko1K1XLdq+sx6yRpcX0S0NJ+ocRYHZXbDUSlPIculh+TrOhIIQ6dMJDUJegRzNXFHCdI6/ssCRVdPpMjIRCbZ0Ih1OpVsg28BEGR9EmB5OlO+LQr5XNVzaRPP4G16nPMAJjnXqHewQVEEhFEyWDlS5HoLwONiSXDMcxBzGvL0e+MUCZLTZKBoRdLOWO2Z66EnMROt5aUOcVA7ZDTbDK5wbh9rdWn1fTUZyxAAVgIJYQh9kTp59pBvqrkHTce4+xf8LqCHNRBprp9a6iBBSxFjWXNbm7wkB5IDivm3qBxblAyJgJh8xLuHpQJQrdrH+6BH3GMGQs0zZxodAGpGAANTzGgzo+yNmOVGLiFyY1864CEwV0xziff1u/SYVkSPuZcDONuHGW0wnWqE9m37DTMCagGOEGMBGkOFB/RE1NbjFHjmmHFwxrF/vUKmvB96igAW18RYqCkcUY5IWwCdbWgwMDVS5rlyiYa8nJCHEgTL3NILkJOo5+yXq7ruPkXr/w/pMX3NkGfPNnjS5a9VPjvdiPDmXDgZRbw/y5GEESwi2Px5PynwEOYbD+df73pcvP450cPOXtl6oeb9b86HU2datg2yAJqcreJPL6w2Ztu8N0xKF6wpTeJYEGh9WMKwUjVzL91fEOp+iAIxx1pbjk/2lh+2yAPnPnRhdj6MMTSQQ08cUoQMzLZ5790XVhtz80ExQJetrePl2Qgzbd69HOIIyzJNHGk60bbghqeeLYtjKZHyhQYBkguM5aDMYSTQhnnuW/4mcLWkhwvpYWYsR3xkpsWPvTwTYuNYqxigHT8L8U4jxPbnlifm27wzKhJXOH2+8kVRX6EKJKfu9CWRb62capFTVxaA5ehhRBEw3+aHtj+/fPBQQ2PHk7Yby7322h0oPH5ljY8vR9+fb+t97BILD2GG3b5vO3zAev9IfCIF+7Ub+OZKvXbpkXsbaTIMsM3EfJv3HatH33/8yhq6g3x07I2XX//9VVggxmzIW9fX1IO9Jdgf9TKyHMk1vr5rd24hBc6aK43z0iPrQM5cKxwgLIR87Ggjuq1fqb2rAHz82aXctt4vzF7lNl5cbuH64a697zbDexdCfYwl7IkCs3nZQb7VhexfRswx9z6nFpwTg6rj0cmaLPZh8ZftFY+P1zL9Orsn3hxz1zL0zIfRsePN6N7rh6t79zVbeM2t1ifN+938jw9H+MKGMl5cbOOmwdrEK/XwlTLh0jLR2pXq9oWSUiwO2W9+72txx33sNYhijzUX8r53m/re6/p6fvaDqQUMlRTufL55TpRa7d+3VXA6YlxRDnAi5HVry/Tl3oBurSq6sCT/Fxd5kKLqRFEKsBKG72V8B3pCBpqaj8xr7Dze4u9fEODoi2GI1YrwhT2tjst2bP96bQUfrwc4EjC271nG41fVLhkg7Ogv0bYSaFNFoV8DfQSUzaOoc5YyX5OHLAJJBptOZVM4rLYCFpqa50Jg/1zEe+dC7P7MnuWJ/7iyxh9uK7zcH+GupxrnxKcV2wNX1VBnxkUgfKxL4aHFsHqpopGhKo3WNdZDY01AGAiIamBUmDlOY9z3FTsd0leqKADDk1qEiPPt5ZB5lohOdSscOdviqf2Mybt6So1XmxEOhRrdRLhrvDMw7xkg0574fAlvjNcwurGFkYgwXCG0GahGhBEFDAaEkbICupAVusyTEgVknxRBxCvKAY0ApZPxSF5JUdl9lVxIu9pkTDUjzBBjihkNir9/m24xzgTA9KEKLr18Cdt3hfigfdA+aP9v2n8Djp211mnkC3EAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMTItMjhUMDk6MzE6NTYrMDA6MDC4axO5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTAxLTA4VDE5OjQzOjU5KzAwOjAwnbLSDAAAACB0RVh0c29mdHdhcmUAaHR0cHM6Ly9pbWFnZW1hZ2ljay5vcme8zx2dAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAA1MTKPjVOBAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADUxMhx8A9wAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTU0Njk3NjYzOTogPbcAAAATdEVYdFRodW1iOjpTaXplADI4NjczMULcYaVuAAAAWnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vZGF0YS93d3dyb290L3d3dy5lYXN5aWNvbi5uZXQvY2RuLWltZy5lYXN5aWNvbi5jbi9maWxlcy8xMTgvMTE4NDI1Ny5wbmdv/wTWAAAAAElFTkSuQmCC"); -} - -.ffilepreview--filetype-pdf { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAjsgUCRbrgAAEkxJREFUeNrtnHuUHFWdxz9V1a/peXT3PBJCXpMAMQGJuyuvREPgAMsqGCIEIQSFg7CHgCirrotP4Hh4iq4HQViQ4AsIj2RZ8YhodMEsENmgPJIhQ0LCMJNkMt2Z6Z7p6WfVvftHP6aquqq7OtHj/sHvnJqux+/+fr/7vb/7u79769bA+/Q+vU9/RVKaLbC+E4YUaBUwzQ/dGhSBgAItaulXA1SlVrh0UCxt1/VImvkkxFtjHPndnzDj5KUYuo6u6xQKBTKZDPl8Hp/PRzweZ9/evUxKydz2dk674IKm6uvzyvhAJ0wKCPtgVRh+kiA0zU+3gJ68YE4euguSQFABnwKaGQG32kvbtWJ7ptjKm+4pErKqj7yiMpGepJjPUSwWyefz5HK5gpQy0RoOvychvn94OPG5L3059+pLL/Lz+++nrb2dlWvWeKp3w4Z7MAondsDuHJw/grJxGsdENVZGNJb7FBYGFSISOgC/WhGoHIJrmgySHvkGdZXcWRfy0ZtuJxTrRBgGUkqEEABFRVEmcvl8Ui8Wd4wlk5sPJhIbl5x55tsvbdrEwsWLeeEXv+CTV1556AA91AkHivDRdthbZM5sP2s7NFYHFeb6DhWBvxApwEABXs/CwpUXseymO2jp7kaWwJniUxSklOi6TjabfTeZSj26Z8+e++f29g5u+vWzzJw5i3MuvthVj+b2YF25S31pDrw+wbLeIA90alwcVImqinMP8EJe+RvFJgVIGTCsw8G3tpOJH+DIE5bgb2sDWeuDqqoSCoWira2tyzra208Z3r+//9yLV7/3pz9u4YpL1vDIU095B+iBKMT1Eji/jHPO7ADrIhrHKSZrvXSDvzYlDTigl9CK920jM3KAmSd/BH9rqyNIFaBaWlpmh8Phs/q3bXv7zPPO2/nCc7/milUX8vgzzzg2RA29OhvSBiR1ls0J8Ei7xmwnvkPxokYxW/FY1tzFzLTo/NWcevOdhGKxmu5mp1QqNbh79+41XT3dmztnHEkkFqvhqfGgH8agKGDMYHZvgAc6fBznNLiYEXYCye26HgCNwLYPZqmKB5mUJPq3kxnez5En1fckgGAoFPEHAot29vf/dnRkJHXOGWfw+NNPW3hUe6GMgFVxmB3g6naNUyoGVQ7LtXS57+Ha7QAQHnicqi0VkELy1sbH+MNN/0Y2HkdRVdxIAWLR6Cnz5s9fu/Sss5T0xEQNj8WDHonA9CCsCrNgRoDvhFSirh5RtlCxNbdTcPXaFaUsy7PJrt63Va4SpC33ywNI4q1tZOMjHHnS0rqepGkaiqLMXnH22b+aPmPGwU/OmsUjmzc7A7S0A5aHISf4bMzHKnfs/zZkqaLi0MVsz+N928gm4qXAHQ7XAymaLxSGFp944otb581jw913V59ZMAgV4WcHCUU0lntJsb2MZLIJ3kbUbOolgb6nHuWFb32F7OhB1+7m8/nojMVOu+fb3w75nnvO+sx80eOHHj/dmsLCZgE4LJCaTaYoTTXMMcmRRwEpJX3/uR4pBMtvvtM1mfQHAgv/YenSHhRl0BWgLg0E9JSnD3+VJNAcj5CgaBpquA2EwJicqMaQqvEu8mX1T31dFWVvPf0EaBqnfvNWwj09FpCklIRCoUhnJNKt+f3uABWBnGCugI5D7RpePUpKUFta6f7Ct/AdMQcjcYDMK8+T/s3TFlRkHflmD6rbMGWQ+jY8BlKy/KY7aOnqsoAkhGjPZDJzW9rb/2wuaumUwdIkswvwN4lLw0rUACcgvOR0Yld9kfyubYz/6gmia9aiTZ9ZL3XxrNtuQwXBvo3reeHmG8iNjVlikqIofhRlRltXl0WeNUirEFQJVLpAM4c5dwFnUCxlJPhnzUHx+zDGEmS2vkR+Zx+BeUcjhXe9lRNZPpAgTNfS9LxCfRvX8/yNXyF7cCpwq6qK3++PzZzba7HZZ78IKFOVOdTWs5PTEkapVUuOKosFpA7pTc9gjI/XeoBDHuTWCI1sqQjcvuExpJAsv/E2wj09KIqCpmlhVbOOdBaANGUqMbK7eWlEcEgMzcmdYiqn1IJjlymlUWZSQYXsjjdALyLNNkp3e9xAsa9W2hur8mz7xvWgKpx2420EojHQtJrQUpPuOGXGislAp/ggzf3KXjGcqeT+ZYD8/pI35HOIQramvFtW7uZB9bzHnmxuf+oxUFVO/cYtqP5ATaLkcxPiUFfPq31eSAJGKgWA2hoBDVpOXEZm6x8QmcmqPqcKexniPZNSSiaFbtC94kIFzWgMUD3QvC5H1FTIahMoUNizE5GeILRoMWpHlOAxxzL5yvOWMk4yK89iGvxdS/P21Nol4TdPMLh1M/NH97oD5DRrblTZZp9XeRQoJoYxxpP458wjMH8hWnsUUSjU2OMmI6xCqzoF+uE4lUCQP7CXaT3Avqn7tZMTaT11G67rPbdXznG5QwF97CD5d3YS6D2ayMdWIYwiUjdclzacfoXLUS8NES5lpQPKFoDqeZBZsBMAbms29RI3I5Mht3M7vu4eYpdeRXH/EELUD7xuGb5T3HRbZ3Iqb7bLFSA34XYlTooageR4X0Jm68tIXUcNBinsG2hoQ6MEtZH9rrJckLN6kImpnje4tRBNPKfcWpk3XkEfGUbqRYzJiVIu5VCmkXfaAWvU4G722qmmi1VbxJT3CHNcMqfxpmvhAqpZuTBNAyr8enIMfTSB2tpGy3EfnpJZtkWYeJuyp0HjmG2y2N0oBll+HQzBqYCTsWWN5nlRjR4BwWOOJTBrLgCdn7oMrbOzWtbusl7skTZ++yEcbLKvrXvzoL/ggdt9n0rnhZeh+APoiTgtHzqByFkrm5qsNhVnGtnTCCAnahSLnHhqPMXJKAGhoxfRcca5pH7/LAfuuwtF0+i56noCs2YjhbO+ZuxxqosXu10BMvd/L8Ok12DqyK9A9BMX4eueRvJXG0g8/iPSr7xIy6Lj6fnMteDTqrZwiPbIJu6bdbkD5NYnZX0FXt25Wl5AsPcYui68jFz/Nia2PE8xMcq+u25EHxul54rPEf2nCxCiVp+TNxxOd7TLahikHQublzHMiLsEzqoc6cBbfh79xEUEZs0hsf5hCgeGwQcTL/+e4btvQw21MPOrt9J2whKEUavDoR6u9iAdGstl4HBaqaiJQdKm0Ow99iHVblwN0g5KhYDQUR+g59KryO/ZRfI3T5dSfEAKyYGf3cvIz/6DYO9R9H5vHR1LT0caUyOPueLCgz3SZI+0tz7O5esCZPckt7jkyOfhAOg87xICM+dwcOOj5AbfnUoOFRDZLEN3fJ34Iw8SOnoh8/79YTpXrkbxBxAGpUMvHbL8KwzTuU51unJI9tmQqpnNO51D7cYBM4/iwm/mLXkIhI5aQNeqT5N7521GHl9XalXbbgh9bIz3bvoXCgeGOeLKzzPvew/RfvIy4o+vQw2ECMyagy8SQVF9KL4gis+HLBQQooAxnmTyta3k3t2JNIyalc16+yadvKhmPUiaBLkBUG9YtYNnKadC90VXEJw7j8HbvkZ+aKDkw5LSkAQofg1/dzf+aTPIDw2Q3dFH20lLmHb5Wro+uRo0H6o/gJ4aQxTypUX3au0V1JYwMp/jwI9/yP7770QWC6722BvciequB9mBqkeNeKWA8MIP0r3q00xue434+nVUVlx9sRihuUcTPfUfCR/7IcLHLkaLxEBKjPQ4yU3PInJZOj6yHF8kiiwUmNjyP4ys/xG5Pf1loBRQfQSmzaT95GVEz/g4Y5t+SWb7aw2zPXMYaQyQQ9Q/HGCmNGlMv+xa/NOOYOi7NyMMg9jHVhBZdibtJyzB3zUdPTVGfu97xDf8nNzAO2R3vImeGkUfG0UKQevxH6Zn1WeInXUunSsuoO3EUxh/8b9JPv8ck2++Wirz7gCpV14i+cJv0ccOVgeARlR9heg1BtkrX9c7XK6ri+sGRE5cStd5F1Pct5fwwsX0XPBptI4IuYHdJJ55ksk3/kSm7zWMdAojVyyVr+y4KldyYuvLpP+8heEf30Pn2SuJnv4xYmevoGvlxRipJOk3/kR+3wCKolCMx9l7zy2Wethts9veOAZJkxfZ3o855R2V7b6VVz9uuYmvvY0jr70BXzRKeuAdpK4z9INbyex4k2JiGJEv72HRynj4rC5ffdOigZCSyR3bmdyxnX3r7qZl/gLCHziejqWnEeqdT/gDH8SYTJN45kn0zOTUHiO7xzjY7K2LYe1qVQ91cKGaXMP8TIDW2oqq+Yme8XGip5/N+JbN9F97CcX9Q0hReh2GQvVlnDlzd9OjQCmmKGBMTjDx+qtMvPYqIxt+ihIIlLb9CoHI56vv8tzIXEc3trpdTHF46CTIoqDcMh2nnEr4qIVk+rcz89qvIHI5hu6+lcLeoRIgWq1ee3e2D832nR1VsAApBTKfszYo7jrsLBXHsG/79PRezLUF7NcGBKZNY8bl1xGa3cvg3bdwxKX/TOtxH2L4pw+QfPF3td7iIE+Uja/8eol9ssHzemXMSaK9jGsXc1Ng5rUYL6D1uMXM++ZdoCrs/NJnaV24mOlrriS7q5+h+7+DKBRL3cqj/EY8de1pgup9VuIIkP3cKQu1dAMBbcf/PQu+/xOMTJr+ay4BKZl7wy2owRCDP7id7O5dKFrziZobr5M9Xso7gWI6kYV6w7xlOdJhE5NjBi0gfNQCFnz/x2gtYfqvu5TiaJxj7nyQ1uMWs++hexl5+lHrhgRbDZtp9Ubdyolcd5eYzsuxRyStb56tABmALpswWIIaDDL781+nZf4C+q/7DJldbzHvhtvoOX81yT/8jsF7bkUUCigqtfMuB0WVnSLlmYPr1hdXk6RJjkmN286UCm/5tBC37Zq1bsGTkJclNFXp7P6Wvi6gZd4COs88h/h/PUHylc303nAbM6/+Iuntr7PrxuvJ7d9XBccpHQCruzut/ZhHUDd7as4d7K9Z0zLdFxJ0SWakHkAZAXlBUZS7mJfRQxTzFPbvRU8lWXTvo0SWLCf54vPs+tb1pN/aVgKnjgzzVpZGGx8OZTTz2hsEoEvGDtoAskSGYklaQpb2czYmFTJ7dtK3djX6xDjG5CS7vvEF+q6+iHTfG1VwnEZH8zceTutLFaq3GcorIHYAnfQARQWG6wZpDQiqDAATEjrrrfdMaZSk3+4jfdc3Uf0+REEvTUFcPKdRbuNWqUNZfmkQ7iz2KDARVBmwjyUWgMYMkJCIaqT8Cp2KTWGFalq1LFXo+lRmi3O8cKuwHQy3Mp7scQGmHmAFSTJlELeXtwCWKMKuHHFdsqMy9Dml3/UybdnE4VZG2H4xXVcOL/a4eZY9bRFAUbJjV45E3Rg0CnwqRi4t2GzIxl2hXqWdWtvLx8+Kh/Nm7HFrjIpMCRgSJgSbV3WSS9Xb/rLAB2/mYNxgQ04yIBso92Jso2vZ4Bq879jw0phO13nJwITBxm1ZONomxALQtUnYW4Rrxtg5KXjMkFZhzRhwqJXxMhVxk+E0O29kjyFhUvDoNWO8PVSEtbZv6mpWa0MK3BtD7i9yX1qwRdQR7iWeuCWH1JHjNXZBfS+s3KtOnxz404It+4vcd28MWhz6sWPX3jAdcgakBcuO8PFIq8tHvQ1nmg7PzdMNc9Zb83WhyXs9/6MC0xTFC00aDA7rrGlT2RxS4YKRWh7H9f53MrAtCyuibB7RWTspGLRsUDK3mMSy4uc0StS8MZBWcLDLkVPAVCJpzb4B+68JTKe9SHZdkwaDIzprV0TYvC0Lu21fT1fI8bv53xbgvDBsmYTLutj5xwxbfQqL/AqznKYGXqYDh0tuo2HNCKi4l0MpxZy0YEsZnE0PJqBDg38dd9Zb1xnviJSSxw+GIKEze7qPq8MqlwRVeivLyWajndaAG/XCZgCq96GwY8A2PTCAgmQgbfDYiM59PT7e68tCzAdfTrnr1ahDm/KwMghdAcgJxq8Y5fenBni2KBlCoWhINKX0OtwvQPOSHB7ODjbA9bOraiIpS2AYpallKicYzkm2JA0eTuh87YpRnvxEC6moH7K6u+dYgPZCt3dAVsAMPxwVhOfGCfUG6Y6o9GQlc4AZGkQ1hRYJQWmaxrh5kb2bHo6nKaArkNclWQOSCgy3qAykDBLv5Yl/PEquPwf7CxBU4avjnuU2Rw93wv9mYKYfIj6IalCQpe/Mohq0adDjg5hq7XaVf4hSOa+AUhl5JKURo5JWaPbllnI5c9pR6UFCwqgBCQMmjNLn4kUJfqX0/z1SBrwr4SMqXJ7ifXqf3qf/P/R/ShQShKVd6yQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMTItMjhUMDk6MzE6NTYrMDA6MDC4axO5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTAxLTA4VDE5OjQzOjU5KzAwOjAwnbLSDAAAACB0RVh0c29mdHdhcmUAaHR0cHM6Ly9pbWFnZW1hZ2ljay5vcme8zx2dAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAA1MTKPjVOBAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADUxMhx8A9wAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTU0Njk3NjYzOTogPbcAAAATdEVYdFRodW1iOjpTaXplADE4Mzc0NkJvZ7DBAAAAWnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vZGF0YS93d3dyb290L3d3dy5lYXN5aWNvbi5uZXQvY2RuLWltZy5lYXN5aWNvbi5jbi9maWxlcy8xMTgvMTE4NDI1NS5wbmcVP1e2AAAAAElFTkSuQmCC"); -} - -.ffilepreview--filetype-img { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5AIKAx4vKar87wAAByBJREFUeNrtnEtv29gZhp/vHFIXy5f4OoknbdPAQQsPZtBNgGZQYNCi6GWZxSz7P1r0R/Q3tOtidtOuBy6aFJ0OUBTpLXGSqR3PxJIpWqJEkRR5upCixLEtShZtyYnejSTykDrfo+9yziFFmGqqUSSvfnAch7m5OSqVCr7vY4wZd/8uBoIIhUKB1dVV6vU6S0tLxwE5jsP8/DxbW1tsbm5eD4LgjoisjLvzFyFjTCWfz997+PDh7u3bt2k0Gj1IPUBRFLG1tcXGxsaParXab4IgeA/Q4+78BSnO5/MP5ufnf3X//v0/3L17F9u2jwLa29tDa329XC5/6nneB+Pu8ThUKpUerK2t/SyO49319XUA1IudrVaLIAjudD3nrVQYht8NguBOq9XqbesBMsbQzTlvS1idJC0iK68WJ2uQo+RosXtjZEiv0qmABOFvz7/gUXUbEZV6wsshw4w9ww+/8RElu9QX1EAe9Ki6zWe7Wyh5M6LPmITl4hIfrn+fUq5EP0caLMREoUSj3xAPMsjAP3bmFhsYILIvjzIBZIAEIS8xSypkVtrQ3XbZNVCI9ZMBrqiQH+T2ec+qsqwCmsbicXuOP4Xv8CSeHbeN4wOUIHxLe/yiuM0tq4Z0gQlwU3t8zz7g960b3AvXxm3nmXXmEDPAnER8XHzKd6xaN8zovcbAsgr5uPCUW1bt0obbCICE9+0qm5ZLfEqbpAvpo9zXWCTjtvViAQmGm7qOnVKzDHBdNyhKfCmr20hVbBCvMEBRYnISp59wGF0Q7REACcEA81oBPGMRmOxG4Umc4Ow4tOotzju1jZSk/9W+gm9Uah+32/M0jZWZLfX9OodfHeLuVonDjD0zK0AKw7/bC/w1WjnVcAU8i4t8Fl7NpooJ+K6Pu+cC4NdaVHer57p2PlIOCozik9YN/hyu0kahuyfUHVv4Mi7xO3+D3XgGNWrSEIj8CGfHIYle5j6v4lHfr58boJEGigI4SY7f+ht8Hq2wablc1T6esfhve4G/R0tUknwmoZW0E9xdl7ARHsk7JjG4z1xyxRyFhULmyXvkqYYALaP5PFrhi2gZm4QYoY1CMJnlndrzGp7jnZiU4zDG2XFYy69hFaxMIWUyWRXohVCEIkFQGcJpuk0OvzrEJKdYLtCqt6juVEna2Q5IJ36BJ4kTfNfHLtjkZ3InttGWojCbJwqiTunPUCOH2HlLacXSNxcxBpz/OYR+dLyNrVm5uYqVz96cifcgANEK3/XxKt6J+yM/ol6uI0pQOluTJh9Qt7y7z1xMfHr2re/XaVabmY+sJx6QiTtlPGyGfY1/0S46IQRH0WQDEmg4DRpOI90zBMJGiLvnnl7t3ihAXYOru9XBDRZoHDTwDrzB2g+gY4CMMSfMbS7+WkVn5Fyl3WoPddyRkBzogH52v1LmlVKIyMvbPuSlT2tLo7Q6su285T33aB76oIf/znbYxt1zWd1YPbWqKS1Yto1t2xg6cGzbRkRQ6uUxPUBzc3OICNeuXTtCUolisbpIwS+gL+LKanfG7tUbqJI+U1EyQBCFhFHI4juLx/YnJqE0U+Ldd9dZnVklMZ3Rt4igtaZQKBwH9IKaZR0dbIkIytKIlvP3IIE4iKk8PaAdtjuJ+QzfKaYTMs5OlcJCkZnF4pEMoVCIVli2hW3bPUCv2nwM0KQoCiLyszlypc60onHQIGoNXrpFCbPLs1h5jUkgDtvH06d59W3/3DpZgAwU5goU5gqICN6BR7083FqPSQxWXrN2aw1RMnJtmcwyL9DyWjx/uE8cDL+k6u4d4j5zMym8EwkojmLKjyuEXnimqYNJDJUnBzSqzZHz5sQBMqZjnFf2RppXxWFM+dE+LS8Y6TwTB6j2da0THqNKOov6lcflI2vYw2pyAAk0q03K25W+s/ahTilCvexx8OXBma98TEwVi5oR+4/2OyX9xW0iJ1t9fFuK8c5OldxMjoVrC5cUkAHPaaC0orRU6t/hWoxqmpcQNUTLGqP7lXRD0/UpLZWGXnWcDEACV64tcCXlFzbAwl98Sk+CTnIwEM8qDj6cpV3qf4XXGNMZFw2pyQAEA3VeBBSCNtKJKgPGSHeptf+g8Kz3ek9Okh5CF7nwMpAHGZMQJzGcwUUzlYEkiUmSuEcpSQxJkhAPsWRlTEJikoGapwMysD67zger76PGfZ+0wOxGQMGOeoO/pKi4erVIXBx83mUwLOavkFN26jGpgAyGn3/7p/zkxo/HC+cFo9scM+ostx6JCJayspnNa6XRk/InoAvuxqVM0hepKaAUTQGlaAooRVNAKZoCStEUUIqmgFI0BZSiKaAUTQGl6HVAFeB8//ww2Yq7DHp6HdA94MG4ezlG/afLoKfXAe0Cv6QD6W3ypBj4J/DrLoOeTlru+CPwD+AO8FY8YIlOWN3jNThwwiO6puLII7qmmmo0/R/bJffeYyphcAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0xMi0yOFQwOTozMTo1NiswMDowMLhrE7kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMDhUMTk6NDM6MjIrMDA6MDCVcI/vAAAAIHRFWHRzb2Z0d2FyZQBodHRwczovL2ltYWdlbWFnaWNrLm9yZ7zPHZ0AAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW1iOjpJbWFnZTo6SGVpZ2h0ADUxMo+NU4EAAAAXdEVYdFRodW1iOjpJbWFnZTo6V2lkdGgANTEyHHwD3AAAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxNTQ2OTc2NjAyht+3/AAAABJ0RVh0VGh1bWI6OlNpemUAMjU4MjFCXXziJwAAAFp0RVh0VGh1bWI6OlVSSQBmaWxlOi8vL2RhdGEvd3d3cm9vdC93d3cuZWFzeWljb24ubmV0L2Nkbi1pbWcuZWFzeWljb24uY24vZmlsZXMvMTE4LzExODM3MDcucG5nZ8+z2wAAAABJRU5ErkJggg=="); -} - -.ffilepreview--filetype-doc { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAwAGv1lbXAAAFbdJREFUeNrtW3mMXdV5/33n3vuW2d6sxgvjcTAYjMGBkuAxhOKUOEQlIaY0KSWRIpJGCWr7R6RUQlHVlGxNoipqI0VEURq1aiCKSUKWKhvQpHGJbbANGDBmDDbjsZnxrO/N8pb77j1f/7jbOefe92ZcKf9xpTvvvbN+5/ft55wB3nzefN58/oAPXXSP7/wKQ6+cwOLAIOzB9RD9g4DvAU4eVOgAOQ5g2YAQIABsdGdSJo4qsxpGxRGFrFcwCKW5SXxzWy9Ghy+B5/nwPA+u66JaraLeqMOxHczMTOP8G5MQK/Mobrkad++5+aKWa6+1YfGfHwHXqrDsPLy774P/o38r2IPrB1nKITTqm7lRHxRuI4dcHrAdQFjhQhIusPojG5MUVlobBVAGwapXQW4By0uLaDQ9NN0mGo066vW6KxmzolOcZcbM1OTk7Kf/9q/r/3vkKL71n99FV1c37r3r/Wta96oSlPvy99F50y64r53Cyn17qfM7T1whSn37qKf3VtjOVZTPl8CyByAHJEBEYCKAlMWysvSokAACgRUIKPzLzEpB2IEVcgkAEXD+ddzJZXz+XbvQX8jDlxLMDCklAG4SiaVGvV5ues2TCwsLB+bm5n502027x5586iCuuXobfv74Idz3wTv+/wAV/mU//OkpFHfdCn9qYrPYOHK/6C79JXKFEbLttAQQQNxaOsCrzahI22qcJQH/3Gn4Lx3F3TsuxxfeNYrBjgIks9EuANzzPNRqtdcr5fIjZ86c+ebIyOaJXz7+JDZt2oh73tcaJKslOF/7AXhlCYOf/QTqz7x8izW89Vuib/Ae5Au9IJG5msiuZOJAq4Nj2pnUb3UuAnixDDk9iRPT85heqeHG4fXoyjmZ4AohUCgUejs7O2/p7ukenZqaeuWeO9979vDRY/jQfR/FDx55eO0AdfzTo/DmJzH04CdQefjAHdbGLd+h7tIOCJFeiIGGanyJ9Pq4TnkjiVtVZAwQiQi8WAbPTIIYeOlCANLu4fXobAFSBFSxWBzu6Ojc++LJV8bev/e2U7/87e/wgfs+jp/t/16qfSZPS0+8Cn9pBby4cIu1acvDoqtnOLUGbjOCZpmNNmutU4Y3F0sh+v65M/BfOqrVfeDaK/DFvaPoK+ZT6mY+lUpl4vTp1z40ODBwYMNAH/pKvak2KQkqfuW7kA0XsjI/bA1v/ZboLu0I5HkN3KXkk3kVjbr4AMOYg8CVQIJifBl4eXoeU8s1jK4iSQBQyOdLOSe3/ZWxU4/PzJcrt93xXvx4//e1NsLsxNUVVD/+blgbRj5JXT2jDICZweDgM+NFRh2iPjD6Rt+l8htGH9brYI7LjOBr8Dt6CQzJjEePj+HvHz+EmWodgtpwggi9fX2jl1122f3vunk3LS2vtOej+PpPUezuAjxvm9hy5a+ps2skc+AsK9xO5dbyZMRI7SWQIM+dgTxxNHMoMPDBnVfgc3uzvVsyDGFxcXH8xRMn3p1znLHfvjGHf9x3e7YEDc6eg3PV9aCevn2UL4yYBjV+0aIMLdqv5TX60lraI7ssMvz7j5/CZ584jIVao6UkMTOKxeLIYH//vne8/Qbcyxe0eg2gpVwXavu/XaDuvlth2QmRJnuyPNHFLM58Zft+kfcjA0wyaGOlPuqz//kxfOZXBzFXa61utm2jr79/z+f+9RuFJ+odep2G1uAlEIPrBsmyr1LjmWjiyFZrwaBiv4kNPE0P1bI86MikDEjJ3KmuahnrdRwFq0r/Hxw/BcmML96+u2UwmXOcq25+2/VDAE20BIhKA2Aph+DkSwgHiUGKgFK5FVfoQEVgmZKnJZ4Z8RMneUkCAmtD6NhmBKVqXKVq7g+PvwqLCA/u3YWhzqIGEjOjUCiUSv0Dg45laQBpKsa+B65XRyBljyrirIq7Ksasv1mqEzsZGHUw2skWY0CfNxqPDPo4q68RjH7/uTH8w68PYy7Du0kpu6sr1RHpeVq5rmK5PKTbGADgkMmdVhGzEslpUxoSpAZ8WoAdSZahNpQaMO3VyFAV9acmaXGeTHj0+VMAgC+9Z7cWTBKRQ0Qb+rs7WwPE+Q7AdXNMItYpbmVHoK+KZZhamE9G8prKLjLSDVbQjINOjUkUSk22+9a2Vowmjx4PQPrC7aMYCG2SEAKObfdt2bSxNUBk5wAnj2jLQc2r0nFJImJsFGVxO3uMVSoUNVMlTqs0bVRG6sKs5IUhevufGwMz4/O3j2KoswgigmVZHULoyYW+YSYstHLvLYO2jJQis22WJBpcjj3QWsYDoIu3CaBBX8a4jz4/BgLh8+8ZRV/egUXkmG2MHUVK3rZuucUKWJdqdb8LJhczxiNew1zqnGYMcBFPNM3+58YgCHhw79vhiHTqZQAUyXOGCLUjxKizCBAEeBKQbBj6NkPYFLhVV2qmJrufjIBnCCIQAf5FgZXo3/5nx+D7Pu7a1J0SVh2geFIDZqmP2eqRDFzZZeHv3tKBXltgvObjK2eqmHGl0i09iATwvnU53LOhgBwRDpabeOhsFXVpqBzpk8meQey5+SZ87NIiHEH4xUwD332j3haPVoD/xGUcfHEWZ/VA2gAo8gqcNoBam1Y8YSAH4N0DOfQ5Aj4DT865+K/pBuw2MUCOgL9YX8CdQ3kAwI0lG4/PNnB80YOVpXLhInMdnbjn6g24e2PQ79TrNcBfTutJSzFU6qWP8xN19F0OqNmYPpbkOGhTAzANszYvAThb9fHysg8gULXrugOjr7VVAkhfApsLFm7oSXjVawtc02lDxtsa6f6SgUGHMFoKvI4rGc+UXfg+g/1wOyV+ZfCZKg9fX4J9CeLgBAutAFKj3azINBUNR4lmlGxKYKHJeHLWjce8seSgIFpEuhKQEtjaYWFdLiFFUNDPYmoZHUsGLita2JAPAJpqSLyw2ITIoCvRDLNMeWF8zwKIVDbJDNbJ4I02vLRVKxtnR8ouqqHFvLLLwuaClbTP2OS6seQgJ3S7dEPJRr9DQT+Zpocl463dNrpD3T1cbmKqJiFMDsftDe6bqhGP3wYgU1oicY7HDFWDpOJlDU4IAC8veThfD9RsU8HC20o2pMk5GXx0CMLO7kC95lyJGTfwCFs6LIwUrCSpjOYKacgRcGNvErb8bs5F1ZPZEhHlY62kR20nNUQMFWNKsnYZNlYmMBNGyPRvwcCFusRTc81AKgG8reTAUgENv0sJDOUErg4Beq7i4ffzgXr2OQJ7BnMak0gmjOq3BbZ3JcAeW2hCMOmCYXjlWKgiOysNQUPisLMlCGF6oUAaSEqyh5yIl7JiRZRYMlyf8ft5FzIk7LoeB902YjFmpe2OzsT+PDnTwE8mG3G/P+qxURAUq250CiuZcX2Pja2dgf15bcXHeNUHKdwiZY54/xrJvnZMR0wPMhEytjsY0mfAR+zNmFnnhIzYz6HdUsQ3jFsEgGPlZqwul3dauKzDgm+IOIHxjoEcChah6ge263ilibmw384eB0MOBTRpcwNvjcEDjiy4KLsSIqJHkZCANtbmzTIpMWhtJaiFB2NDaLQ6JSyI7BwxMFH1cXIp8Jm9jsA13Y7u5iXQZQns7AnsyETVx+llH+MrPsaWg34bCwI7ux3NfjEDBQHs6ssBAGo+479nXPiK+pl2N1qbWhcrgtTXwP4aAIpFWvVWiheJxV1RGQ49UiTeS02JZ0J7IgjYO5RHjnQ1uyQnsK0rUJNXlj3M1iWqnsQzC4H9KliEWwdzEIR4DikZ6/MC20L7c67m4/lyM/Bemsok9GheUIl/ojJSVaytF4tdqil+qnol31NeTCZSxpLx5EwDy14w4/ZuGwMOxRz1JWNHt411+YCEw/Mu6p6ELxlH5l14kR3qddBjUSIVknFFp42NxaDfs+Umput+EIyqRlcmv9V1Zx1/x2tfFSAzk1dsS5brNNVRCwWYcHLRw0Q1kNktnRYu77IDOyQBkoQdPTYcQaj5jBcqXkzQ0/MuTq8Evy/vsnFpwVK8JOGWgRzyIvC4h+ZcNPwWDFXpl2l6VTMRcbatiiVeKpQiaShsRrBHMYuS38QMAcZs3cfRhUDNOizC7v5ccCOIGb0O4Z1h7vXqsofnF1xYCOzXhZrES5VAzYZyAtf3OpChF+20gF0Dgf2Zrkv8z7SrB7hZwZkR6KbWAQPQVgDFiwXSHTVLbb7ZdZ7PODTrxkP+8VAOHSKIfzYUBLaG9uflRQ8LDRnHWw1P4mCYrhABu/odOCF/RooWrgj7nVxs4lzVCxbRSnK4zRtrSQKUuVlhSJCx2AyxXI1ZOpGEYwtNLIRue1uXjU15C57PuLbkYCjMo56ec9Hwkn4E4Nh8E4vNgOh3DOWxLicgfcaV3TYGw37PzDex6LJGVztAtG2uDNVTopdsgPQUJrw6YHgAUtSIJMfizan8LRh8bLGJo6E3u6QgsK3HBgG4tmTDImDZY7yw0NTURDDw6pKHc9XADm0qBvZLEHDbJXnYFGTvv59pxF42oAd68Mc6PVEeqYbz0eUIioSjnYrFjwwmSxnnWCQzpMuIVaJEdLnJeDpUl5wgjPbn0O8Q9qwL7M9kzcdry804yIvUbKbm4zcXGgCALptwfV/gzd4a5l+vr/h4qRL2i+lJS3+STiiHEGFbNd3gqO+qcZC5q4jWiV6cPCqoR8lsTJhkHJx1UQ+z++v6HGzvdjDSEcQxh2ddTNeCHceIYADwJOOZWTfeRt01kMPVJQeXhfHP4RkX51f8tP1R6YlMqhIIqu20LIDT604DFG9nJKOTEiwmd3QUjxehIpX2ikILACfLTYyvBKzZ2ZvDn28uoi/Mvw7PNtDwElWIglMB4NkFF9PhrsD2koO96/PocYINjYOzDXhSCWiVXC0yAVA+Yy9rbNMwDE+MdgAhCqQ4MdjqkXCsVqooJ4Oq5dEOIzEwU/fxQuju+3OEO4eLsAVQdiWOzzeDOQ0uCgDnV3y8WA7c/dYuCx+/vAsWAfMNiWfn3HCxxpG1ZC2P1rY7DJ5G5ZGkr7rdASNXgQlsyj22ULvoe1hf9xi/OF+HZMAWhOGOwAudr/oYX/aSXUCVgQwsuxK/mQzskCMIQ4WA3FcqTZxe8iDCoNa0gyzT9Jhbtmpgq85pbnfoR8+KXYm3uZWTjUjzUk9UoR5rGjbs+XkX8w2JwULCk+PzTczWJaIsOrnhERzjMAPH5lzUfEZR2b1/arqBRVeCwmOb4EK6ogLMYDOiUUKImNzwMzq7T3YeWwAU62iYiEYHfdHWcOr+j0IURaoXXfkNV8wIktXXFj08fHoF7xsuwiJgsSnx07NVeJIhzMsLCFRcADi+0MCPx6vYvS4PAjCx4uPR8WpYb7pYZV7lQE4912elHau0q+raDiAog2noRgAqW2pkzErKEBrdFETHn322jK+fWIJFgdrNNWTshbSDGeUIulyX+JtDC+jLBceeS55EpRnESoGckAYsiGINiE0EQuGOpCNEh8K2KmCrShCzhIh235AQyoZsxtdjVLHKOlsPCSMArs94Yzk5Vwn/pUNrqgIbaWytKVFtSr1NPBcbR9ot6FHGTEBgjflgZhjHPsbJKgeJErM+uDmRBkIkZlG3SPwSzqjfM4+h9S56eVilgaBJdfI9kqh43ZwxbFSmShQi0Eii0g4gzwc8P33XJyOAijnMOhiJEiqLNjRX/b+NyGyxSrgCBJugqtf+UvTo6p6aW725JZVpKGCsBFxe0O9K616s6QKNBiAlWFhpKlQCgUwio0WZUhDXQeEcKU00exd+kRnTZEneKvSoIGngRvNHWzu+V/XnJ7XuOkBuFWjWmsnWXMYjk4FNl6lhwcoQRqXmDTmrCafVTiJbDcNyTVg5JYhJTJQmJ4yhJNj3F2RlpjVAaDYA8CwkNyHhqChTyOE4ZyJ9Qm3x1AKcKGiLxpRacVoizEWwTo8qkS0vX3G6jk2aAh1vgnmKXf12iHHDzAZyHeMgsQRGfzxJNI4yaOzSIyLDH2xKiwFm3N+8P6h6RkOAzABVtS8xHQZDYlLVS6YqSEqfoIlYomDtrQGSi/MAeNbqGqigYPersYSxlpShjKIjU6o0YBWumtISf1VVxuxn0BOVxTGMOS+QCu2yxyTArZfl0vwMGXqs7yguXoA8f2IGXvNkkr8kEaZ5/BzPHBHIyu/wjfd4dAEKPhVPkpVImglnVvLJBlrm8baeJ3JcHjvSqNz3TsqJE7OyMt0aoOLkJHJ7Plbn6uKB+KKMeQ9YiTFSyWvGGwMXn3LqIKntTCDNDJxMQMKKmB65Gj2UeEx1Xt8DVysHnHf+VZ2Wy60BWrr2Ovinj4Kr5R9yszEeERxfgJKUXAow6YwuGJjlioibZ2iZ7cKG6vlBzBuG7pEkpY+lAG0TTFNvg6ExPc3GOFfLP5JnjsB/yxWtAcKD+8Bzp+F+ad8pVBe/B+mnFkbq6FGlom+xSsb3cVQQVbYhOaxT9UlxaalNL+KU5KmXLSgGNyGYkdCTGHdlHt8D1xYfcb+0b0zOnoZ88M/aAASAckXkHniMee7sQ7xSOZQsijUAEuQSohKbobRTN/1VUVINhaYGUT8ds1jq1IMBgx42xkwdQCg7n9FmEFcXD8nZsw/lHngMyHUghQcynuJXj0G6K+Bq+RYa3PwwFbqHTXGPo3rDvWqjqnELjPYtZ1f6tqA0M9DLCBv0Ok4CuWiM+tIEz018CIWeA8LpRP2BG1JkZJ5qeFMvwR8/BDH63gNy4fz9XFuaMA8SW55BaVKCNke+nH2HsNVr7hKq4GR4t9g2IWscBteWJnj+jfvtm+44wGefhj/zYiafMv9vXh58DPaeD0OefAr5P7n3lD925AhZznZYuUtjTCPP0lICKFWpJ5CkjZO6ExA3YZj/cpACh1rMoTngkB7pg2uVQyifv1+M/ukT3s8fAnX2ofm1j2RO0U7I4XzqP4DlC6CR3UDljWGULv0kij33kp3fAsvWR+EWamTOZKoYI0NnWrRHRt+slZh1DEB6gbdqLH2PF849JEobzsqJQ6CudXBbgLMqQACQ+/S/A307gaVx4Mt3gT/z2DbK9+5DsXQrCfsqtvMlQPYQ4ABCySHU1asPr21qimIcyt6EYxVZNb+IY4gmQEvwGhVI7yTqSwe4Wvmh++X3n3Ie+AlbXVvgL76A5lc/3J6M1QCKgfrUt0HNKmTpLRDrroH33MMFMbh9kLr7h7hZ3QzGBiKrl4RdZCAPZjueIXL50U48GeplhtmktE+VZ+DMAIg8AhosvRrYL4NoipziuFyen+X5sRnnho/U/Yln4S+8DnKK8L7+0TWte80Axc9XfoaO3x2Du3U9KD8E6ukPrqeLAkSxH9zRB5TWQ3QHai8QhzCBmQljfDXJjExSvKElEXQUYXkUfUeqHHkiP7HDsgLQwhTYXQDX5gG/DrIcyOU5oDELnJ0G79oB74G7LnrJbz5vPm8+f7Dn/wCP1QJfqEXQtgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOS0xMi0yOFQwOTozMTo1NiswMDowMLhrE7kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTktMDEtMDhUMTk6NDM6NTkrMDA6MDCdstIMAAAAIHRFWHRzb2Z0d2FyZQBodHRwczovL2ltYWdlbWFnaWNrLm9yZ7zPHZ0AAAAYdEVYdFRodW1iOjpEb2N1bWVudDo6UGFnZXMAMaf/uy8AAAAYdEVYdFRodW1iOjpJbWFnZTo6SGVpZ2h0ADUxMo+NU4EAAAAXdEVYdFRodW1iOjpJbWFnZTo6V2lkdGgANTEyHHwD3AAAABl0RVh0VGh1bWI6Ok1pbWV0eXBlAGltYWdlL3BuZz+yVk4AAAAXdEVYdFRodW1iOjpNVGltZQAxNTQ2OTc2NjM5OiA9twAAABN0RVh0VGh1bWI6OlNpemUAMjgzMDU1Qum3qxEAAABadEVYdFRodW1iOjpVUkkAZmlsZTovLy9kYXRhL3d3d3Jvb3Qvd3d3LmVhc3lpY29uLm5ldC9jZG4taW1nLmVhc3lpY29uLmNuL2ZpbGVzLzExOC8xMTg0MjQ4LnBuZybzQKIAAAAASUVORK5CYII="); -} - -.ffilepreview--filetype-any { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5AIKAxUxMFEYRwAAEq9JREFUeNrtXNtvXVV6/61z8Tm24+NjxzEkQ2wIZSBANRUTVYDqkKc+JAqJIAydjipVUNRJgJfSqWD+gpmqj0Tp0AYkaBhQC33gMmIYVQKjTMQMLajYZhKG4FxwfIt9fHzss89lfX3Ye631rcs+dqTOWxay47P3unzru/6+b60DcL1db9fbH7CJax3w2muv4fz58yiX+zE8fAOGhobQbDVR6CqgWOxGV1ce2WwOmUwGQgAAxcsQQIIvTPo3AAhSvxB3FPqNHkOUfBIAhMD87Cx2fOtb2L59O9rtNlqtFhqNBtbW1hBFEXK5HObn5/HNN9+gVqthdHQU+/btu6b95jbb8YWfvYC1tRp6enrw/Uf/Ai//2yvF4eEbhqSU26J6NBJF0VAUNboKhS7kcjlks1mIhD2eSGizq6bLVQhgvV5HFEWoVqtoNptoNpuIogj1er1BRAu9vb0XiGh+ZmZm4amnnqp/8skneOWVV9DX14fDhw9vcqUN2smTJ/Hd7+7BV1/9Hg899JB4883/vK3c33+4v9z/QC6Xu6NQKPQTUQlAPtYaAQhxbarJmObzL8RRAZERuHjhAtbX1zE2NoZisQgpJYgIUkoAaAohqvV6fbnVan2xtLQ0vri4+OZ999139vTp07j99ttx+vRpHDx4sCNpHTXo5MmTmJ2dw8rKMqIoGvnoo4+Olkql7xcKhdFcbtPKZxp1EIkI/pn+RAhAAGfPnkVGZDC2dwzd3d0g0szMAxgsFAqDRLSrVCrtHx4e/tuvv/761fPnz/9zpVK5ODMzg3feeQcHDhxIJTmT9uLFF19ErVbDc889i+Wl5bHbbrvt9eHh4Wd7e3tHc7mclmnYWlLeCupgXeT9Q5uwRQJh6ospjI+PY319PWYcf58wLJfLoVQq3bxjx44f33XXXa9fvXr1z5544glUq1W8++6718agF1/8V8zOzuLpp5/G22+/fWDnyMipcrl8byaTARFZP3A+xz9w/jXPw/1ZXxCIZOyRvfFuf8PQyakpfJjCJM6sbDaLwcHB+3bt2vXqp59+euDRRx/F5cuX8dZbbwXHBGf6zW9+i1qthkpleWxkZORUX1/fzvCCgBCdLSdtTJoOdZqHvxdCYHp6Gp999pnVZ/fu3di7dy+KxSI3t2CrVCoXv/rqqx9s3bp1vFwuY2BgwOuTdR+cOHECzWYTS0tLO2+++eYXSqXSXVoiRAmRZhuxKyBnc0kQZxxU73UfoeK+8c5C9xM2p5KNqueUMKhSqWB2dtaif2FhAWtra9ixYwfy+XxHBhUKhf58Pr/73Llz7y8tLVUOHDiA119/3erjmdja2hqOHDmCnTft/GFfX9+9MX3MRBDbvf5Pmw602mvTgzEbEPnjEsYmlqc9jnTNSb+3zRpcQwh6vampKXz44YcdzU1p4cDAwL233HLL0fvvv1+srq76ffiHU6dOoae3F61W69t/dOutv9yyZcuoWZ9MZxIa9FkTMDAo1AMGCcnSPQcIJmMFW0mwld1tCiFwYXoan372mZlDxD2Vad25+85QdPPmWVlZmZ6cnPzzfD5/dn5+Hvv37w9r0DeXLuGP774b5f7S4UKhMGo7Y6Yh7IMtafc50ybPQauu0tYyrS5+IAhplmG2ceqqTU5NYnx8HPV6vaPj7u7uHt26devhPXv24OrVq+kmVuzpwSsvv1zs7y8/4OMcXwJ+GCavXyoc0A9EaBjrwz3btTUCYXJyEh988EFHc8vlchgYGNj3/PPPF7u6uux3/MPw8DCGh7cNZbPZOxR3r51Jfr+NmZQ6vc1I1kEAlq+zW9xXMCYRER544IGguQkhkM/n77jnnnu2AbiYyqCtg4OQbbktSR86h13+UuWjPIS78dzkrJrweCvC68/JF3od8pZM46l6yt9NTU1BCIGxsb3o6bGZREQoFov9g4ODQ9lsNp1BzVYL9Xo0KqUsxeM3wLLk/20Jx9VAGyz726CQhjpdrOkpjKv8QgBAhImJiVRNklL2ra2tjXZ3d/8Pn8ryQYVCF4TAVgB5b/fkrp4qPrMpMu4l1FUoZ83gAsFnSifJCA0W3IV03Ld0T/kk13ELIfIAtm/ZssVaydKgYrEbUdToEkKE/U8HJhGRteDm+Un+ptKYZNk8i2Tk67pVbXLeT05OAoClSZlMBvl8fmDHjh3pDMrl8+jqKugNX2tLxRrYQCE2mtfmi/WciCyXzBcj+EhdjePm1tPTAyEEstlsTzZrJxcWg7KZDLK5bLJZmxoBVehjbtJzzAIk7B2ocVZCQgb6aVgouNb4LPUqQkJon2X5MkoZRf4cE5MTAIB9+/YhCe9ebmKDHSGYmZhlNbluSGXmpXuF/LLFbDUvBfq4E6u8y1CiV9KpPCvpqr/dcm1CX5wW2tnkxMREEt3GkMlkvNTLQYNJFcZBpOTginCzWPn/0jhisJkrtPaa3EZtnBmkzpDNZ8sxw5hbu93G0NCQh2psBlkhxIqROmEUljPgDFFZlAN4OMuSqnucL7ECvNVLicH8K2BrBIEACQwMDOI7f/IdR0ahGB/YEriwY25fvHABu3btSmeQVwwLNAqZgmsuQX9gOhDvlQqvVaYfAFvJ856ebvT29jC2prUNNFsAsi0R1SMMDw+nM8gFLNwL2SEzVlVi6bsQjHv6HVN67YQDhDKtgnD7mDoAz/aVyyfp+JekxhSbknFiBNKonEh49Egpg+7D1iD1H1G8MMccsLVUZeCqyOVAaChfphhglW6IEoYKJoTECSsec8cPR+vcrRCjL7HdmHGc4QRJSRQWjDYNpMJW42iQ6Uh653aTZs8Bwh1N1FL157FgBMGbJTBreB5FS1rGQnbHjvQEnjsaFNqAUWcjUWEYqAtkPBM1CNdk1qymquayQB1gxUsdrTkmZlS4gDCZmzx6CKQeMq3UZV1S84fjs+ekpVY1MnYulMoz5daSIdvGdR2aYJZORjKYYsUsBhylnpwRrK0liZOKHhKMHjtMxfS4aiXYCqSBrSCkBibPB6kcRwhmPJ4JMCax3XKkrJrkwywsSSBmr5o4t55hMUzY9GisYJjEC7TcaXMKQXZQMcnyRgySBCnTuRnCEn6spuCQcEgPDw8tE5p7IxjRkZ6ArEMT+mFeUagGardDieWwsM66xw/5fQ0uN2EjEa4tSVSxT4F4oT/+bNI9w0FNDz8lcswXwqeHHyloelK8tB/m9XGMZHsREBKQQm03ECm4c+YnFUBsrqT3boNnnnByASW8i6eWlssDCQhK6CGymc8IMhHLdtKKyZwe4rAklUHWca9zxs0JR6BR6gePmbZMRWBCthCLTKn0bEhQKgG2P9vYSTtgmpgshHMuBpgEUYEzLq0YRrNIqs66bEkJYWtQbBbcBChxqvyEViaomtHDcjChHblg5RayfWEynxAGoG4Y5nV5kp2F8ToNl3wcRll+73GVhWEebc1SiQ/hZAlIwArPxnpN/VmtJ5l3M1CBHDoNV8gOo0z7KEULQ+UON1lNGciWT3uJACWuPEKDvFmpwxifHZ0S03R6CDEG7MggXoTyz46g/YFQkYY7ScF8iT4C5iUuZzuCO05YfexCS7g5uagZSRIWShcmDmrYFGJvio05Jia0rzLZMcvldcRJVo/tIUa3JOPoogkn5mAleGiNXYLUIdo4IFP9cU/o1Xa0cNhkBtMY4Ehk+mpWUAITnBsCIhm7yWzeAEWjsIy7xAkxm9POnKxl7f5e0CJbqg7Icw3O+suiBw49nDQnvU6hR98r6MigQMFsowhqMbGTcaSFibQ1UvC039dObaxRNjr1J2L5mwzzx2UQuL6aGEGmYGV1VqcVOgtNxilwySKHOblwnaid0jMwrWkxz0L08GBiAKJg4Y5IYXFGj4DR5s0iaUAyDdL40l4/+de41pB5gfkfUjNbsICfudsyTn4H0SFpYZBgod1CxWQ2zWa2qpUivqTFCznBS1khDQr5oKCKwgSMVBMJhGQXyzgjgp+4uxHO3Jan3Cw9bKxFj56vA4P4AblwTUrPbUtXEHk3zozzdc8kEjjBjq+09DU2FRopG6gA8DuK4RzMpifkEYXOAlgeS4pZBKlrpgEGIbl+q+8CekJQXGPMUhFcwsuZKFUnEibxXbAIpsrhEqZIZtC54TTx4pwbxQL0WDS5gTDx0rqWHdQg/aPAIqwNuJrk1Xl4hY/PykKqj01CeuD4QE6DKQoyegQ7o+fv2MJ8E/yxduBKBvbhqvUpvi8oNXd1UCNfGwTZ0uB/8DFOYNT3ElUngjSLBQTBJ7RjgO2Ehf3SnkyPT6EHih5QsxWla5CUBCnNXR0XqnkmY21Ci4Ahb38Oqz+fx66MIm0QpX5ikoEdBfSZGxeiMyyxLLm8XE1nULst0Wq1TE5maadlVHET/qGwMjOCXXXk9UHjkZ2ypAAL2zGW8Y+oGT3shkeQHh6twN2nnfXrQ1CgMb9gX0y3r+BFDUT1BqSUyGQyiULYNmx8JSX2ayQSr00sOtkJqcZFSs9ZIskP/zQPHIfpYWt9eMmxPDEXIeJ6D6eHRRZFD1F8stpqt9bmZufSGbQerSNqRM34e1ecx+mKbUCZ8J9ZYJB86SnL0qcRfuOWkYZvvMhE/B3TOI8eI3gpJVqt9tLi1SVrdstJNxoNALRARE2bIgdhqo0SrE0bIhmkI+MYSZtPLGl+R5HvgaN+He8s9TL0GKqEQ6Zx0D49rIJogkJTgK40onq6BmWzWRSKhWkIUSWiQevwwUOijlapvrzc4aoBkaqQsLchR+vLQ5DlwSx6SNk966/CPoL0mIExPQJCiGqhUJh271BZDFpaWgYBC+X+ciWfyw5y/8zlxV2JtgtFCKtf8Nt4dunWLo7y7Nsklon0VS2a+zYNn2LN4H7HtVPOGOt2oAONGlG0XKmszMNpFrsWFhfx5Ze/n2+1Wl8Qxa6MiNhxMJOQLS79o/IbZTrcbNx6k3YFVp84sXWPwRU9UtFjVR0C9MBew8JlgKVVkgitVuuLL89+ubC4sJjOoKsLc/jeIw/VV1er4+12ixcq4IV4vVGLBq0GvCxrrrSwqdi0tqIlM7GQb54HVHYDejTEJDY7o4cAtGUbK9XV8Ye/d6S+XLW/EmUx6Nu334H//fxzrKxU36hH0TRxzVCLayDJ4SgXizJG0vmNkqY3H7iGyOQH1ntAaRIA/VXNMD2URg91pieKoulqtfrmxOcTuO3WW9IZ9OSTT+Ly5Us4duzYudrq6s/bsu1ZERMXc9Zk/daDdJWTRzKu5n7g9k8tvGq2TQ9zlOJa6QHQbrdRW1199dixo2cvX76Mo0ePpjMIAArFIo4fP05XrsyeWK2unpGaEqmn1qFb+xsmKTI+xvY1jFDtr3hf1YUSRZHOPLC1MPZITnk4TI9k2up+uXh1tXpmZubKiePHj6NYLHoCC2Ez/McbbyCq17FaXR27cfuNp3p7e9mXepMQ4hZbhPtOAZ6UI2zlY8AvrPCpKJDKhHTLB6lik/TUarWLV67M/KC3d8t4oVjAI0ce8VYJfi38wvQ0Jj7/HIcefnB8bn7uaK22epGrpTFvZvtW5GKggLjSG40XWopG6U2ZhZVNmSboRwlTNT1sbTB67DuQNt21Wu3i3Nzc0YOH9o9PTk7h0sVLIVb433oGgPfeew8PHjqEM7/+Nf7q0b8+9/F/f/zbXC63O5/L3SREJkGixO9nG1P3JBdoDj5ydMdRELO5kDZZuWpgDdLnezE9bSmxWq2emZubO/rgoUd+9S8v/AylUj+eeebvgqSmbQEA8I//9FMsLS3hzjvvxuL8ws4bhm/4YU9v718WurpuzuTs/3mJitwuyFZXd72qFwVWD1mNMjVi2XiyaUGsNOvsygKpFDvjRqMxvbpW+/nc3NyJbVu3XpicnMDAwAD+/kf/kMqDLDq093/5Kxx5+DDK5SFE9fWVxx5/7L/G9o79otVqXgLQbLfbWSGEbLXbeSllNg650nGInX5CztiGAKSdNgEkjcNVJVL2E9ezJNrtNtpSNklSpR7Vr9Sj+pnl5aWXFhcXfvzYY4/9+8GDD1b6ywNotRp45pkfdWJBZw3i7Sc//Qnq9TpuvHE7br1lF957//3i6MjIULm/tG09ikZAtD2bzZSzmWw3QRRIypyTDBlxqustKisRMBoSos41SQ8dCAiBFghRm9rr7bZcFkJc6S4UpiuVysKFi5fmD+zfX//d777AzDczKBSLePa5Zze1700zSLWXXnoJZz7+GCM37UR/qYRyuR+NVgtd+S6US33oK5UwtG0bBgbKEBnz1apsklcRJERyAKjq/aRumyKTlIkImQwgk2t/cVVWICMIRBltayIpzLelxNLVq1iYm0e1toLKygqajRbyuSyWlytYqVYxfekC/vSePXj8bx6/1i1fb9fb9faHa/8HCToWdIrtwIAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMTItMjhUMDk6MzE6NTYrMDA6MDC4axO5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTAxLTA4VDE5OjQzOjU5KzAwOjAwnbLSDAAAACB0RVh0c29mdHdhcmUAaHR0cHM6Ly9pbWFnZW1hZ2ljay5vcme8zx2dAAAAGHRFWHRUaHVtYjo6RG9jdW1lbnQ6OlBhZ2VzADGn/7svAAAAGHRFWHRUaHVtYjo6SW1hZ2U6OkhlaWdodAA1MTKPjVOBAAAAF3RFWHRUaHVtYjo6SW1hZ2U6OldpZHRoADUxMhx8A9wAAAAZdEVYdFRodW1iOjpNaW1ldHlwZQBpbWFnZS9wbmc/slZOAAAAF3RFWHRUaHVtYjo6TVRpbWUAMTU0Njk3NjYzOTogPbcAAAATdEVYdFRodW1iOjpTaXplADI5OTk0MUJw/YCsAAAAWnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vZGF0YS93d3dyb290L3d3dy5lYXN5aWNvbi5uZXQvY2RuLWltZy5lYXN5aWNvbi5jbi9maWxlcy8xMTgvMTE4NDI0OS5wbmcbk2kSAAAAAElFTkSuQmCC"); -} - -.ffilepreview--item-icon { - margin: 0 0.625rem 0 0; -} - -.ffilepreview--filetype-icon { - display: inline-block; - width: 38px; - height: 38px; - background-repeat: no-repeat; - background-position: 0 0; - background-size: cover; -} - -/*单个附件上传*/ -.ide-file-upload { - position: relative; - display: block; - padding: 10px; - background: #FAFCFD; - max-width: 100%; - max-height: 100%; - outline: none; - border: 1px dashed #D8DFED; - border-radius: 3px; - font-size: 13px; - -webkit-transition: height 0.2s linear; - transition: height 0.2s linear; -} - -.ide-file-upload .drop-wrapper--drop-area { - text-align: center; - padding: 10px 0 0; -} - -.ide-file-upload .btn-upload-icon { - border: none; - outline: none; - box-shadow: none; - color: #CCD5E1; - background: none; - margin: 0 auto 0.5rem 0; - cursor: pointer; - padding: 0; -} - -.ide-file-upload .ffileupload--support-info { - padding: 0 0.5rem 0.5rem; - line-height: 1.6; - color: #B4BCCC; - text-align: center; -} - -.ide-file-upload .btn-upload-icon .f-icon { - font-size: 36px; - height: 36px; -} - -.ide-file-upload .drop-wrapper--action { - padding: 10px 16px 6px; - display: -webkit-box; - display: flex; - -webkit-box-align: center; - align-items: center; - color: #6A6F79; - -webkit-box-pack: center; - justify-content: center; -} - -.ide-file-upload .drop-wrapper--action .drop-wrapper--action-label { - margin: 0; -} - -.ide-file-upload .drop-wrapper--action-select { - color: #1E5FB3; - margin: 0; - padding: 0 4px; - box-shadow: none; - outline: none; - background: none; - border: none; -} - -.ide-file-upload .action-wrapper--before-upload { - padding: 0.5rem; - text-align: center; -} - -.ide-file-upload.ffileupload-selfdefine { - background: transparent; - border: none; - padding: 0; -} - -/*独立附件预览*/ -.ide-file-preview {} - -.ide-file-preview .ffilepreview--header { - padding: 0 0 4px; - text-align: right; - margin: 0 0 8px; - display: -webkit-box; - display: flex; - -webkit-box-align: center; - align-items: center; -} - -.ffilepreview.ffilepreview--card .ffilepreview--item { - flex: 0 0 50%; - max-width: 50%; - position: relative; - width: 100%; - min-height: 1px; - margin: 0 0 0.75rem; -} - -.ide-file-preview .ffilepreview.ffilepreview--multi .ffilepreview--item { - display: flex; - flex-direction: row; - align-items: center; -} - -.ide-file-preview .ffilepreview.ffilepreview--card { - display: flex; - flex-wrap: wrap; - margin: 0; -} - - - -.ide-file-preview .ffilepreview.ffilepreview--card .ffilepreview--item-detail { - border-radius: 3px; - padding: 14px 10px; - margin: 0 0.5rem; - height: 100%; - background: rgba(249, 252, 255, 0.87); - border: 1px solid #E5E8ED; -} - -.ide-file-preview .ffilepreview.ffilepreview--card .item-content--toolbar { - text-align: right; -} - -.ide-file-preview .ffilepreview--item-detail { - display: flex; - align-items: center; - margin: 0 0 0.5rem 0; -} - -.ide-file-preview .ffilepreview--item-content { - flex: 1 1 0; -} - -.ide-file-preview .item-content--title { - text-overflow: ellipsis; - overflow: hidden; - cursor: pointer; -} - -.ide-file-preview .ffilepreview--item-content a:hover { - color: #388fff; -} - -.ide-file-preview .item-content--toolbar { - margin: 0; -} - -.ide-file-preview .item-content--toolbar .f-icon { - font-size: 0.875rem; - margin-right: 0.125rem; -} - -.ide-file-preview .item-content--toolbar .btn { - font-size: 0.75rem; - margin: 0 1rem 0 0; -} - - -.ide-file-preview .ffilepreview--item-icon { - margin: 0 0.625rem 0 0; -} - -.ide-file-preview .ffilepreview--filetype-icon { - display: inline-block; - width: 38px; - height: 38px; - background-repeat: no-repeat; - background-position: 0 0; - background-size: cover; -} - -.ide-file-preview .item-content--toolbar .preview-btn { - text-align: center; - background: #C7D4EE; - height: 18px; - width: 18px; - border-radius: 9px; - display: inline-block; - padding: 0; - color: #fff; - text-align: center; - border: none; - margin: 0 0 0 12px; -} - -.ide-file-preview .item-content--toolbar .preview-btn .f-icon { - margin: 0 auto; - display: block; -} - -.ide-file-preview .uploadpreview-btn--primary { - background: #2B87FF !important; -} - -.ide-file-preview .uploadpreview-btn--primary:disabled, -.ide-file-preview .uploadpreview-btn--primary[readonly] { - opacity: 0.6; -} - -.ide-file-preview .ffilepreview--list .ffilepreview--item { - border: 1px solid #E5E8ED; - padding: 12px 10px; - margin-top: -1px; -} - -.ide-file-preview .ffilepreview--list .ffilepreview--item .ffilepreview--item-detail { - margin: 0; -} - -.ide-file-preview .ffilepreview--list .ffilepreview--item .item-content--toolbar { - text-align: right; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-filter.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-filter.css deleted file mode 100644 index 21f286ad0021cf1c735f3b1ea04cbbe1b1aad2a1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-filter.css +++ /dev/null @@ -1,550 +0,0 @@ -/** 筛选条ListFilter **/ -::-webkit-scrollbar { - width: 6px; - height: 6px; - background-color: #eee; -} - -::-webkit-scrollbar-track { - border-radius: 0; -} - -::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.15); - transition: all 0.2s; - border-radius: 6px; -} - -::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, 0.45); -} - -.filter-search-btn-col { - flex-basis: 0; - flex-grow: 1; - max-width: 100%; -} - -.filter-search-btn-absoulte { - position: absolute; - right: 0; - top: 0; -} - -.f-list-filter .filter-inputs-main-basis-wrapper { - width: 100%; - overflow: hidden; -} - -.f-list-filter .filter-inputs-main-basis-wrapper.list-filter-wrapper-show-btn { - position: relative; - padding-right: 84px; -} - -.f-list-filter .filter-inputs-main-basis-wrapper.list-filter-wrapper-show-btn.list-filter-wrapper-show-btn-remove { - padding-right: 124px; -} - -.f-list-filter .filter-inputs-main-basis-wrapper.list-filter-wrapper-show-btn .filter-search-btn { - position: absolute; - right: 0; - top: 0; -} - -.f-list-filter .filter-inputs-main-basis-wrapper.list-filter-wrapper-show-btn .filter-search-btn .btn { - margin-left: 6px; -} - -.f-list-filter .filter-inputs-main-basis-wrapper.list-filter-wrapper-show-btn .filter-search-btn .btn:first-child { - margin-left: 0; -} - -.f-list-filter .filter-inputs-main-basis-wrapper .filter-inputs-main-basis-wrapper-inner { - width: 100%; - overflow: auto; -} - -.f-list-filter .filter-inputs-main-basis-wrapper .filter-inputs-main-basis-wrapper-inner .filter-inputs-main-basis.justify-content-end { - margin-left: auto; -} - -.f-list-filter.list-filter-padding { - padding-right: 45px; -} - -.f-list-filter.list-filter-autoWidth { - padding-bottom: 8px; -} - -.f-list-filter.list-filter-autoWidth.list-filter-paddingnone { - padding-bottom: 0; -} - -@media (min-width: 768px) { - .f-list-filter .list-filter-type-1 { - position: static; - padding-right: 0; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-1 { - position: relative; - padding-right: 70px; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-1.list-filter-show-reset { - padding-right: 110px; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-2, .f-list-filter .list-filter-type-3 { - position: relative; - padding-right: 70px; - } -} - -@media (min-width: 768px) { - .f-list-filter .list-filter-type-2, .f-list-filter .list-filter-type-3 { - position: relative; - padding-right: 70px; - } -} - -@media (min-width: 1200px) { - .f-list-filter .list-filter-type-2, .f-list-filter .list-filter-type-3 { - position: static; - padding-right: 0; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-2.list-filter-show-reset, .f-list-filter .list-filter-type-3.list-filter-show-reset { - position: relative; - padding-right: 110px; - } -} - -@media (min-width: 768px) { - .f-list-filter .list-filter-type-2.list-filter-show-reset, .f-list-filter .list-filter-type-3.list-filter-show-reset { - position: relative; - padding-right: 110px; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-4, .f-list-filter .list-filter-type-5 { - position: relative; - padding-right: 70px; - } -} - -@media (min-width: 768px) { - .f-list-filter .list-filter-type-4, .f-list-filter .list-filter-type-5 { - position: relative; - padding-right: 70px; - } -} - -@media (min-width: 1200px) { - .f-list-filter .list-filter-type-4, .f-list-filter .list-filter-type-5 { - position: relative; - padding-right: 70px; - } -} - -@media (min-width: 1690px) { - .f-list-filter .list-filter-type-4, .f-list-filter .list-filter-type-5 { - position: static; - padding-right: 0; - } -} - -@media (max-width: 767px) { - .f-list-filter .list-filter-type-4.list-filter-show-reset, .f-list-filter .list-filter-type-5.list-filter-show-reset { - position: relative; - padding-right: 110px; - } -} - -@media (min-width: 768px) { - .f-list-filter .list-filter-type-4.list-filter-show-reset, .f-list-filter .list-filter-type-5.list-filter-show-reset { - position: relative; - padding-right: 110px; - } -} - -@media (min-width: 1200px) { - .f-list-filter .list-filter-type-4.list-filter-show-reset, .f-list-filter .list-filter-type-5.list-filter-show-reset { - position: relative; - padding-right: 110px; - } -} - -.f-list-filter .list-filter-type-6, .f-list-filter .list-filter-custom-type { - position: relative; - padding-right: 70px; -} - -.f-list-filter .list-filter-type-6.list-filter-show-reset, .f-list-filter .list-filter-custom-type.list-filter-show-reset { - padding-right: 110px; -} - -.f-list-filter .list-filter-padding-none { - padding-right: 0; -} - -.f-list-filter .filter-inputs-main { - width: 100%; - overflow: hidden; - max-height: 145px; - overflow: auto; -} - -.list-filter-autoWidth .filter-inputs-main { - max-height: none; - overflow: auto; -} - -.f-list-filter .filter-inputs-main .col-12 { - padding-left: 0; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-padding { - padding-right: 70px; - position: relative; -} - -.f-list-filter .filter-inputs-main .filter-input-list.filter-input-list-autolabel { - padding-right: 14px; -} - -.f-list-filter .filter-inputs-main .filter-input-list.filter-input-list-autolabel:last-child { - padding-right: 0; -} - -.f-list-filter .filter-inputs-main .filter-input-list.filter-input-list-checkbox { - max-width: none; - flex: inherit; -} - -@media (max-width: 767px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-1 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 768px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-1 { - flex-basis: 0; - flex-grow: 1; - max-width: 100%; - position: static; - } -} - -@media (max-width: 767px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-2, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-3 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 768px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-2, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-3 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 1200px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-2, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-3 { - flex-basis: 0; - flex-grow: 1; - max-width: 100%; - position: static; - } -} - -@media (max-width: 767px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-4, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-5 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 768px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-4, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-5 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 1200px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-4, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-5 { - position: absolute; - right: 0; - top: 0; - } -} - -@media (min-width: 1690px) { - .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-4, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-5 { - flex-basis: 0; - flex-grow: 1; - max-width: 100%; - position: static; - } -} - -.f-list-filter .filter-inputs-main .filter-search-btn.filter-search-btn-type-6, .f-list-filter .filter-inputs-main .filter-search-btn.filter-search-custom-type { - position: absolute; - right: 0; - top: 0; -} - -.f-list-filter .filter-inputs-main .filter-search-btn .btn { - margin-left: 6px; -} - -.f-list-filter .filter-inputs-main .filter-search-btn .btn:first-child { - margin-left: 0; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-basis .filter-input-list { - min-width: 200px; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-basis .filter-input-list .filter-input-item .form-group { - margin-bottom: 0; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-basis .filter-input-list.filter-input-list-left { - flex: 1 1 auto; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-basis .filter-input-list.filter-input-list-expand { - max-width: none; -} - -.f-list-filter .filter-inputs-main.filter-inputs-main-basis.justify-content-end .filter-input-list:not(.filter-input-list-checkbox) { - flex: auto; -} - -.f-list-filter .filter-expand { - right: 0; - top: 0; - width: 24px; - margin-left: 21px; - height: 24px; - line-height: 24px; - cursor: pointer; -} - -.f-list-filter .filter-expand.active { - border-radius: 2px; - border-radius: 2px; -} - -.f-list-filter .filter-expand .f-icon { - display: block; - line-height: 24px; - margin: 0 auto; - font-size: 18px; -} - -.f-list-filter .filter-expand .filter-expand-tag { - position: absolute; - right: 0px; - top: 0px; - display: block; - width: 6px; - height: 6px; - border-radius: 50%; -} - -.f-list-filter .filter-inputs-extend { - width: 429px; - right: 0; - top: 34px; - background-color: #fff; - box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.15); - z-index: 900; - padding: 20px 0; -} - -.f-list-filter .filter-inputs-extend .filter-typelist-arrow { - display: block; - position: absolute; - right: 7px; - top: -4px; - width: 8.48528137px; - height: 8.48528137px; - background: transparent; - border-style: solid; - border-width: 4.24264069px; - border-top-color: #fff; - border-right-color: transparent; - border-bottom-color: transparent; - border-left-color: #fff; - box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.08); - transform: translateX(-50%) rotate(45deg); -} - -.f-list-filter .filter-inputs-extend .filter-form-btns { - margin-top: 6px; - padding: 0 14px; -} - -.f-list-filter .filter-inputs-extend .filter-form-btns .btn { - margin-left: 6px; -} - -.f-list-filter .filter-inputs-extend .filter-form-btns .filter-form-btn-reset { - position: relative; - padding-right: 10px; - margin-right: 4px; -} - -.f-list-filter .filter-inputs-extend .filter-form-btns .filter-form-btn-reset::after { - content: ""; - position: absolute; - right: 0; - top: 50%; - width: 1px; - height: 16px; - margin-top: -8px; - background: #d9d9d9; -} - -.f-list-filter .filter-search-btn-reset { - padding-left: 4px; - padding-right: 4px; - color: rgba(0, 0, 0, 0.65); -} - -.f-list-filter .filter-input-list .form-group { - display: block; -} - -.f-list-filter .farris-form-controls-inline .filter-input-list .form-group { - display: flex; -} - -.f-list-filter .filter-inputs-main-list .filter-input-item .farris-form-group { - display: flex; - align-items: center; - flex-direction: row; -} - -.f-list-filter .filter-inputs-main-list .filter-list-item { - padding-right: 100px; -} - -.f-list-filter .filter-inputs-main-list .filter-list-item .filter-input-list { - position: relative; -} - -.f-list-filter .filter-inputs-main-list .filter-list-item .filter-search-btn { - display: flex; - align-items: center; - position: absolute; - top: 50%; - left: calc(100% + 20px); - transform: translateY(-50%); -} - -.filter-expand-simulate { - opacity: 0; - display: inline-block; - width: 24px; - height: 24px; - padding-left: 21px; -} - -.filter-expand-simulate .f-icon { - font-size: 24px; -} - -/** ListFilter 简单筛选 组件引入的common 样式 **/ -.filter-item-wrap .col-form-label { - width: auto !important; - max-width: 6rem -} - -.filter-item-hiddenlabel { - padding-left: 14px -} - -.f-list-filter .filter-inputs-main .filter-input-list:first-child .filter-item-hiddenlabel { - padding-left: 0 -} - -.filter-item-checbox-wrap .farris-checkradio-hor { - flex-wrap: nowrap !important -} - -.filter-item-checbox-wrap .farris-checkradio-hor .custom-control { - flex-shrink: 0 -} - -.filter-item-checbox-wrap .farris-checkradio-hor .custom-checkbox { - max-width: 177px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap -} - -.filter-item-checbox-wrap .farris-checkradio-hor .custom-checkbox:last-child { - padding-right: 0 -} - -.filter-item-checbox-wrap .farris-input-wrap { - overflow: auto -} - -.filter-item-checbox-wrap .farris-input-wrap::-webkit-scrollbar { - width: 6px; - height: 6px; - background-color: #eee -} - -.filter-item-checbox-wrap .farris-input-wrap::-webkit-scrollbar-track { - border-radius: 0 -} - -.filter-item-checbox-wrap .farris-input-wrap::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, .15); - -webkit-transition: .2s; - transition: .2s; - border-radius: 6px -} - -.filter-item-checbox-wrap .farris-input-wrap::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, .45) -} - -.filter-inputs-main-list.farris-form-controls-inline .farris-group-wrap .col-form-label { - -webkit-box-pack: start !important; - justify-content: flex-start !important; - width: 8rem -} - -.filter-inputs-main-list.farris-form-controls-inline .farris-group-wrap .form-group { - margin-bottom: 1rem -} - -.filter-inputs-main-list.farris-form-controls-inline .filter-list-item .farris-group-wrap .form-group { - margin-bottom: 0 -} - -/** ListFilter 简单筛选 组件引入的common 样式 end**/ \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-nav.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-nav.css deleted file mode 100644 index ac9c78380d933d2957aa79ee6b621bb1740868da..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-nav.css +++ /dev/null @@ -1,121 +0,0 @@ -/*収折导航*/ - -.ide-list-nav { - height: 100%; - min-height: 200px; -} - -.ide-list-nav .f-list-nav-in { - position: relative; - height: 100%; - background-color: #fff; - box-shadow: 1px 1px 8px 0 rgba(0, 28, 64, 0.08); -} - -.ide-list-nav .f-list-nav-main { - display: -webkit-box; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - height: 100%; - overflow-x: hidden; -} - -.ide-list-nav .f-list-nav-main .f-list-nav-footer, -.ide-list-nav .f-list-nav-main .f-list-nav-header { - flex-shrink: 0; -} - -.ide-list-nav .f-list-nav-main .f-list-nav-content { - -webkit-box-flex: 1; - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - overflow-y: auto; -} - -.ide-list-nav .f-list-nav-main .f-list-nav-header .f-list-nav-title { - padding: 1rem 3rem 1rem 2.5rem; - line-height: 1.375rem; - font-size: 1rem; - color: #000; - border-bottom: 1px solid #e9e9e9; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.ide-list-nav .f-list-nav-toggle-sidebar { - position: absolute; - right: -0.375rem; - top: 50%; - z-index: 99; - margin-top: -2.375rem; - width: 0.375rem; - height: 4.75rem; - line-height: 4.75rem; - text-align: center; - border-radius: 0 4px 4px 0; - cursor: pointer; -} - -.ide-list-nav .f-list-nav-toggle-sidebar .triangle { - display: inline-block; - width: 0; - height: 0; -} - -.ide-list-nav .f-list-nav-toggle-sidebar.f-list-nav-toggle-disabled { - cursor: not-allowed; -} - -.ide-list-nav .f-list-nav-toggle-sidebar.f-list-nav-toggle-disabled:hover { - background: rgba(0, 28, 64, 0.1); -} - -.f-list-nav .f-list-nav-toggle-sidebar.f-list-nav-toggle-disabled:hover .triangle { - border-right: 0.25rem solid #818fab; -} - -.f-list-nav.f-list-nav-left { - padding-right: 0.375rem; -} - -.f-list-nav.f-list-nav-left .f-list-nav-toggle-sidebar .triangle { - border-top: 0.3875rem solid transparent; - border-bottom: 0.3875rem solid transparent; - border-right: 0.25rem solid #818fab; -} - -.f-list-nav.f-list-nav-left .f-list-nav-toggle-sidebar:hover .triangle { - border-right: 0.25rem solid #fff; -} - -.f-list-nav.f-list-nav-left .f-list-nav-toggle-sidebar.active .triangle { - border-right: none; - border-left: 0.25rem solid #fff; -} - -.f-list-nav.f-list-nav-right { - padding-left: 0.375rem; -} - -.f-list-nav.f-list-nav-right .f-list-nav-toggle-sidebar { - left: -0.375rem; -} - -.f-list-nav.f-list-nav-right .f-list-nav-toggle-sidebar .triangle { - border-top: 0.3875rem solid transparent; - border-bottom: 0.3875rem solid transparent; - border-left: 0.25rem solid #818fab; -} - -.f-list-nav.f-list-nav-right .f-list-nav-toggle-sidebar:hover .triangle { - border-left: 0.25rem solid #fff; -} - -.f-list-nav.f-list-nav-right .f-list-nav-toggle-sidebar.active .triangle { - border-left: none; - border-right: 0.25rem solid #fff; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-view.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-view.css deleted file mode 100644 index 040a154b60cc658702b5590b0e7769b4baead469..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/list-view.css +++ /dev/null @@ -1,57 +0,0 @@ -/** ListView视图 **/ -.ide-list-view { - overflow: hidden; -} - -.ide-list-view .ide-list-view-group-item { - display: flex; - -webkit-box-align: center; - align-items: center; -} - -.ide-list-view .ide-list-view-group-item .ide-list-content { - -webkit-box-flex: 1; - flex: 1 1 auto; - width: 100%; -} - -.ide-list-view .ide-list-view-group-item .ide-list-content .listview-item-main { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.ide-list-view .ide-list-view-group-item .ide-list-content button { - cursor: auto; -} - -.ide-list-view .ide-list-view-group-item .ide-list-content .item-action-primary { - min-width: 60px; -} - -.f-listview-fill { - -webkit-box-flex: 1; - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - overflow: hidden; -} - -.f-listview-fill .f-list-view { - height: 100%; -} - -.f-list-view { - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; -} - -.f-listview-fill .f-list-view .f-list-view-content { - overflow-y: auto; - -webkit-box-flex: 1; - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/nav-tab.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/nav-tab.css deleted file mode 100644 index 47664d26cb5770740272fd2c26eddac9401fd624..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/nav-tab.css +++ /dev/null @@ -1,46 +0,0 @@ -/** NavTab **/ -.farris-nav { - display: flex; - flex-direction: row; - align-items: center; - border-bottom: 1px solid #e9e9e9; - overflow: hidden; - } - - .farris-nav .farris-nav-item { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - - .farris-nav .farris-nav-item-link { - padding: .75rem 1rem; - cursor: pointer; - } - - .farris-nav .farris-nav-item-link-text { - position: relative; - font-size: 1rem; - font-weight: 400; - } - - .farris-nav .farris-nav-item-tag { - position: absolute; - right: -0.75rem; - top: calc(10px - 100%); - padding: 0 0.375rem; - color: #fff; - font-size: 0.75rem; - line-height: 1.125rem; - border-radius: 1.125rem; - } - - .farris-nav.farris-nav-vertical { - flex-direction: column; - align-items: flex-start; - } - - .farris-nav.farris-nav-vertical .farris-nav-item { - width: 100%; - } - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/portlet.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/portlet.css deleted file mode 100644 index a03c346eb81dce35d06e41684e07a633a4ec8913..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/portlet.css +++ /dev/null @@ -1,30 +0,0 @@ -.ide-portlet-container { - height: 100%; - width: 100%; - text-align: center; - display: flex; - flex-direction: column; -} - -.ide-portlet-container.empty>div { - margin: auto; -} - -.ide-portlet-container .portlet-img-container { - height: inherit; - display: flex; - flex-direction: column; -} - -.ide-portlet-container .portlet-img-container>img { - max-width: 100%; - max-height: 100%; - margin: auto; -} - -.ide-portlet-container.empty { - color: #315585; - background-color: #dfedff; - border-color: #d2e6ff; - min-height: 50px; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/progress-steps.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/progress-steps.css deleted file mode 100644 index 38b63eccbce50a0a17d946ee5895aeedea00e289..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/progress-steps.css +++ /dev/null @@ -1,204 +0,0 @@ -.f-progress-step .f-progress-step-list { - display: flex; - flex-direction: row; - align-items: center; - } - - .f-progress-step .step { - display: inline-block; - } - - .f-progress-step .step .f-progressstep-row { - display: flex; - position: relative; - padding-right: 0.4375rem; - padding-bottom: 0.9375rem; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content { - display: inline-block; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content .step-icon { - display: inline-block; - width: 1.875rem; - height: 1.875rem; - margin-right: 0.5rem; - margin-left: 0.5rem; - line-height: 1.875rem; - border-radius: 100%; - font-size: 0.75rem; - text-align: center; - color: #fff; - vertical-align: middle; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content .f-progress-step-title { - display: inline-block; - vertical-align: middle; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content .f-progress-step-title .step-name, - .f-progress-step .step .f-progressstep-row .f-progress-step-content .f-progress-step-title .step-message { - margin-bottom: 0; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content .f-progress-step-title .step-name { - font-size: 0.875rem; - color: #8C8C8C; - line-height: 1.25rem; - padding-right: 0.625rem; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-content .f-progress-step-title .step-name.step-name-success { - color: #000; - opacity: 0.85; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-line { - flex: 1 1 auto; - position: relative; - display: inline-flex; - min-width: 3.75rem; - vertical-align: middle; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-line::after { - content: ''; - left: 0; - height: 0.125rem; - overflow: hidden; - position: absolute; - right: 0.625rem; - top: 50%; - margin-top: -0.0625rem; - } - - .f-progress-step .step .f-progressstep-row .f-progress-step-line .triangle { - position: absolute; - right: 0; - top: 50%; - display: inline-block; - width: 0.4375rem; - height: 0.4375rem; - margin-top: -0.21875rem; - transform: rotate(45deg); - } - - .f-progress-step .f-progress-step-list-block .step { - display: block; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row { - padding: 0; - flex-direction: column; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row .f-progress-step-line { - flex: 1 1 auto; - width: 0.625rem; - min-width: 0.625rem; - min-height: 2.5rem; - margin: 0.5rem 0 1.25rem 1.375rem; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row .f-progress-step-line::after { - content: ''; - border-top: 0; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row .f-progress-step-line .triangle { - top: auto; - left: -0.3125rem; - bottom: -0.5rem; - border-top: 0; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row .f-progress-step-line .f-progress-step-title .step-name { - padding-right: 0.875rem; - } - - .f-progress-step .f-progress-step-horizontal-fill { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - } - - .f-progress-step .f-progress-step-horizontal-fill .step { - flex: 1 1 auto; - } - - .f-progress-step .f-progress-step-vertical-fill { - display: flex; - flex-direction: column; - align-content: space-between; - } - - .f-progress-step .f-progress-step-vertical-fill .step { - display: flex; - flex: 1 1 auto; - } - - .f-progress-step .f-progress-step-vertical-fill .step .f-progressstep-row { - flex: 1 1 auto; - display: flex; - } - - .f-progress-step li.clickable { - cursor: pointer; - } - - .f-progress-step li.click-disable { - cursor: not-allowed; - } - - .f-progress-step .f-progress-step-empty { - color: #000; - opacity: 0.65; - font-size: 0.875rem; - } - - .f-progress-step .f-progressstep-row-multi { - display: flex; - flex-direction: column; - align-items: left; - } - - .f-progress-step .f-progressstep-row-multi .f-progressstep-multi-item-content { - display: flex; - flex-direction: row; - align-items: center; - cursor: pointer; - } - - .f-progress-step .f-progressstep-row-multi .f-step-multi-item { - position: relative; - padding-right: 0.4375rem; - padding-bottom: 0.9375rem; - } - - .f-progress-step .f-progressstep-row-multi .f-step-multi-item:last-child { - padding-bottom: 0; - } - - .f-progress-step .f-progressstep-row-multi .f-step-multi-item.f-step-multi-item-active .f-progress-step-title .step-name { - color: rgba(0, 0, 0, 0.85) !important; - } - - .f-progress-step .f-progressstep-row-multi .f-step-multi-item.f-step-multi-item-finish .f-progress-step-title .step-name { - color: rgba(0, 0, 0, 0.85) !important; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row.f-progressstep-row-multi { - flex-direction: row; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row.f-progressstep-row-multi .f-step-multi-item { - padding: 0; - flex-direction: column; - } - - .f-progress-step .f-progress-step-list-block .step .f-progressstep-row.f-progressstep-row-multi .f-step-multi-item .f-progress-step-line { - display: block; - } - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/query-framework.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/query-framework.css deleted file mode 100644 index 8f2552c403a55dbd49e17b160dbda05551e78492..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/query-framework.css +++ /dev/null @@ -1,60 +0,0 @@ -.qfw-btn { - box-shadow:none; -} -.qfw-btn .f-icon{ - width:16px; - height:16px; - background-repeat: no-repeat; -} -/*常用条件*/ -.qfw-svgCondition{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNoYWl4dWFuPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSfkuqTkupLmlrnmoYgxLeW4uOinhOaAgeWkh+S7vScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTQwNC4wMDAwMDAsIC0xOTUuMDAwMDAwKScgZmlsbD0nIzhBOThCRSc+PGcgaWQ9J+e8lue7hC0xNScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoNi4wMDAwMDAsIDE4Mi4wMDAwMDApJz48ZyBpZD0neml5dWFuJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgzOTguMDAwMDAwLCAxMi4wMDAwMDApJz48ZyBpZD0n57yW57uELTIwJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNMTUuNTg0MzMyMywyLjAwMDE5MTgzIEMxNS43NDIzMjAzLDEuOTk1MzMxOTYgMTUuODg4NTgyOSwyLjA4MzE1MTk0IDE1Ljk1ODQ1NTUsMi4yMjQ4MjU0NSBDMTYuMDI4MzI4MSwyLjM2NjQ5ODk2IDE2LjAwODkyNiwyLjUzNTkwMDc3IDE1LjkwODgyNywyLjY1ODEzNjIxIEwxNS45MDg4MjcsMi42NTgxMzYyMSBMMTAuOTUzMTk0OSw4LjYwNzk2ODIxIEMxMC44OTM3NDM3LDguNjc5NjIxOTEgMTAuODYxNDAzLDguNzY5ODg0NzcgMTAuODYxODMyMyw4Ljg2Mjk2MTAxIEwxMC44NjE4MzIzLDguODYyOTYxMDEgTDEwLjg2MTgzMjMsMTUuNTkzNTExNyBDMTAuODU3MjAwOSwxNS43NTIxNjk1IDEwLjc2MzE4NDQsMTUuODk0NTY4NyAxMC42MTkwMzc4LDE1Ljk2MTI1MyBDMTAuNDc0ODkxMSwxNi4wMjc5MzcyIDEwLjMwNTQwMjQsMTYuMDA3NDM5MyAxMC4xODEzMzg2LDE1LjkwODMxNzYgTDEwLjE4MTMzODYsMTUuOTA4MzE3NiBMNy4yNzM0ODgzNywxMy42MTAyMzQ0IEM3LjE3NzQ2MTI0LDEzLjUzNDAwNCA3LjEyMTcyNjIsMTMuNDE3OTc2OCA3LjEyMjI2NzU1LDEzLjI5NTQyODQgTDcuMTIyMjY3NTUsMTMuMjk1NDI4NCBMNy4xMjIyNjc1NSw4Ljg2NjEwOTA3IEM3LjEyMTQxMDczLDguNzczMjU3NDggNy4wODkyMTk1OSw4LjY4MzQxMjA1IDcuMDMwOTA0OTcsOC42MTExMTYyNyBMNy4wMzA5MDQ5Nyw4LjYxMTExNjI3IEwyLjA5MTAyNTAyLDIuNjU4MTM2MjEgQzEuOTkyMTIzMDcsMi41MzcyMTk0IDEuOTcyMDQ1NDMsMi4zNzAwODc0NiAyLjAzOTQ5ODY4LDIuMjI5MjE2NDMgQzIuMTA2OTUxOTMsMi4wODgzNDU0IDIuMjQ5Nzg4NjYsMS45OTkxMDQxOCAyLjQwNjA2ODM4LDIuMDAwMTkxODMgTDIuNDA2MDY4MzgsMi4wMDAxOTE4MyBaIE0xMC41NDI4NzU2LDYuNjY2NjY2NjcgTDcuNiw2LjY2NjY2NjY3IEw3LjYsNy42IEwxMC41NDI4NzU2LDcuNiBMMTAuNTQyODc1Niw2LjY2NjY2NjY3IFonIGlkPSflvaLnirbnu5PlkIgnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} -.qfw-btn:hover .qfw-svgCondition{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNoYWl4dWFuPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSfkuqTkupLmlrnmoYgxLeW4uOinhOaAgeWkh+S7vScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTQwNC4wMDAwMDAsIC0xOTUuMDAwMDAwKScgZmlsbD0nIzhBOThCRSc+PGcgaWQ9J+e8lue7hC0xNScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoNi4wMDAwMDAsIDE4Mi4wMDAwMDApJz48ZyBpZD0neml5dWFuJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgzOTguMDAwMDAwLCAxMi4wMDAwMDApJz48ZyBpZD0n57yW57uELTIwJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNMTUuNTg0MzMyMywyLjAwMDE5MTgzIEMxNS43NDIzMjAzLDEuOTk1MzMxOTYgMTUuODg4NTgyOSwyLjA4MzE1MTk0IDE1Ljk1ODQ1NTUsMi4yMjQ4MjU0NSBDMTYuMDI4MzI4MSwyLjM2NjQ5ODk2IDE2LjAwODkyNiwyLjUzNTkwMDc3IDE1LjkwODgyNywyLjY1ODEzNjIxIEwxNS45MDg4MjcsMi42NTgxMzYyMSBMMTAuOTUzMTk0OSw4LjYwNzk2ODIxIEMxMC44OTM3NDM3LDguNjc5NjIxOTEgMTAuODYxNDAzLDguNzY5ODg0NzcgMTAuODYxODMyMyw4Ljg2Mjk2MTAxIEwxMC44NjE4MzIzLDguODYyOTYxMDEgTDEwLjg2MTgzMjMsMTUuNTkzNTExNyBDMTAuODU3MjAwOSwxNS43NTIxNjk1IDEwLjc2MzE4NDQsMTUuODk0NTY4NyAxMC42MTkwMzc4LDE1Ljk2MTI1MyBDMTAuNDc0ODkxMSwxNi4wMjc5MzcyIDEwLjMwNTQwMjQsMTYuMDA3NDM5MyAxMC4xODEzMzg2LDE1LjkwODMxNzYgTDEwLjE4MTMzODYsMTUuOTA4MzE3NiBMNy4yNzM0ODgzNywxMy42MTAyMzQ0IEM3LjE3NzQ2MTI0LDEzLjUzNDAwNCA3LjEyMTcyNjIsMTMuNDE3OTc2OCA3LjEyMjI2NzU1LDEzLjI5NTQyODQgTDcuMTIyMjY3NTUsMTMuMjk1NDI4NCBMNy4xMjIyNjc1NSw4Ljg2NjEwOTA3IEM3LjEyMTQxMDczLDguNzczMjU3NDggNy4wODkyMTk1OSw4LjY4MzQxMjA1IDcuMDMwOTA0OTcsOC42MTExMTYyNyBMNy4wMzA5MDQ5Nyw4LjYxMTExNjI3IEwyLjA5MTAyNTAyLDIuNjU4MTM2MjEgQzEuOTkyMTIzMDcsMi41MzcyMTk0IDEuOTcyMDQ1NDMsMi4zNzAwODc0NiAyLjAzOTQ5ODY4LDIuMjI5MjE2NDMgQzIuMTA2OTUxOTMsMi4wODgzNDU0IDIuMjQ5Nzg4NjYsMS45OTkxMDQxOCAyLjQwNjA2ODM4LDIuMDAwMTkxODMgTDIuNDA2MDY4MzgsMi4wMDAxOTE4MyBaIE0xMC41NDI4NzU2LDYuNjY2NjY2NjcgTDcuNiw2LjY2NjY2NjY3IEw3LjYsNy42IEwxMC41NDI4NzU2LDcuNiBMMTAuNTQyODc1Niw2LjY2NjY2NjY3IFonIGlkPSflvaLnirbnu5PlkIgnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} -/*格式方案管理*/ -.qfw-svgSchema{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmdlc2hpPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSfkuqTkupLmlrnmoYgxLeW4uOinhOaAgeWkh+S7vScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTE5LjAwMDAwMCwgLTE5NS4wMDAwMDApJz48ZyBpZD0n57yW57uELTE1JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSg2LjAwMDAwMCwgMTgyLjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTYnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDEzLjAwMDAwMCwgMTIuMDAwMDAwKSc+PGcgaWQ9J2ZhbmdhbicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoMC4wMDAwMDAsIDEuMDAwMDAwKSc+PHBhdGggZD0nTTIuMzQyODU3MTQsMy4yMTUzODQ2MiBMMTYuMDU3MTQyOSwzLjIxNTM4NDYyIEMxNi4xNDgwNzQyLDMuMjE1Mzg0NjIgMTYuMjM1MjgxMywzLjI1MTA0Mzg1IDE2LjI5OTU3OTUsMy4zMTQ1MTc3IEMxNi4zNjM4Nzc3LDMuMzc3OTkxNTUgMTYuNCwzLjQ2NDA4MDU3IDE2LjQsMy41NTM4NDYxNSBMMTYuNCwxNS4wNjE1Mzg1IEMxNi40LDE1LjI0ODQ2NTYgMTYuMjQ2NDk3NiwxNS40IDE2LjA1NzE0MjksMTUuNCBMMi4zNDI4NTcxNCwxNS40IEMyLjE1MzUwMjM3LDE1LjQgMiwxNS4yNDg0NjU2IDIsMTUuMDYxNTM4NSBMMiwzLjU1Mzg0NjE1IEMyLDMuNDY0MDgwNTcgMi4wMzYxMjIzNCwzLjM3Nzk5MTU1IDIuMTAwNDIwNTMsMy4zMTQ1MTc3IEMyLjE2NDcxODcyLDMuMjUxMDQzODUgMi4yNTE5MjU3NywzLjIxNTM4NDYyIDIuMzQyODU3MTQsMy4yMTUzODQ2MiBaJyBpZD0n6Lev5b6EJyBmaWxsPScjN0E4OUIyJyBvcGFjaXR5PScwLjUnPjwvcGF0aD48cGF0aCBkPSdNMi4zNDI5MDc3MSwxIEw4Ljk4MTYwMSwxIEM5LjEwOTg5ODU2LDEgOS4yMjc0NTAwNywxLjA3MTY1NjYzIDkuMjg2Mjc0NDksMS4xODU2NTcxNCBMMTYuMzYxODMyMiwxNC44OTk5NDI4IEMxNi40MTY2ODUxLDE1LjAwNjI0NjUgMTYuNDEyMTYxLDE1LjEzMzQ0OTEgMTYuMzQ5ODk0NywxNS4yMzU1ODg2IEMxNi4yODc2Mjg0LDE1LjMzNzcyODEgMTYuMTc2NjIyNywxNS40IDE2LjA1Njk4NzMsMTUuNCBMMi4zNDI5MDc3MSwxNS40IEMyLjE1MzUyNTAxLDE1LjQgMiwxNS4yNDY0OTc2IDIsMTUuMDU3MTQyOCBMMiwxLjM0Mjg1NzE0IEMyLDEuMTUzNTAyMzcgMi4xNTM1MjUwMSwxIDIuMzQyOTA3NzEsMSBaJyBpZD0n6Lev5b6EJyBmaWxsPScjOEZBMUNCJz48L3BhdGg+PHBhdGggZD0nTTQuMzY2NDMzNTYsMy4yMTUzODQ2MiBMNy4zODc0MTI2LDMuMjE1Mzg0NjIgQzcuNDg4MTExOSwzLjIxNTM4NDYyIDcuNTM4NDYxNTQsMy4yODkyMzA3NyA3LjUzODQ2MTU0LDMuNDM2OTIzMDYgTDcuNTM4NDYxNTQsNS4yMDkyMzA3OCBDNy41Mzg0NjE1NCw1LjM1NjkyMzA5IDcuNDg4MTExODksNS40MzA3NjkyMyA3LjM4NzQxMjYsNS40MzA3NjkyMyBMNC4zNjY0MzM1Niw1LjQzMDc2OTIzIEM0LjI2NTczNDI1LDUuNDMwNzY5MjMgNC4yMTUzODQ2Miw1LjM1NjkyMzA4IDQuMjE1Mzg0NjIsNS4yMDkyMzA3OCBMNC4yMTUzODQ2MiwzLjQzNjkyMzA2IEM0LjIxNTM4NDYyLDMuMjg5MjMwNzUgNC4yNjU3MzQyNiwzLjIxNTM4NDYyIDQuMzY2NDMzNTYsMy4yMTUzODQ2MiBaJyBpZD0n6Lev5b6EJyBmaWxsPScjRkZGRkZGJyBmaWxsLXJ1bGU9J25vbnplcm8nPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} -.qfw-btn:hover .qfw-svgSchema{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxN3B4JyB2aWV3Qm94PScwIDAgMTggMTcnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmdlc2hpMjwvdGl0bGU+PGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+PGcgaWQ9J+mhtemdoi0xJyBzdHJva2U9J25vbmUnIHN0cm9rZS13aWR0aD0nMScgZmlsbD0nbm9uZScgZmlsbC1ydWxlPSdldmVub2RkJz48ZyBpZD0n5Zu+5qCH6YCJ5Lit6aKc6Imy5YiH5Zu+5aSH5Lu9JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtMTkuMDAwMDAwLCAtMTk1LjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDYuMDAwMDAwLCAxODIuMDAwMDAwKSc+PGcgaWQ9J+e8lue7hC0xNicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoMTMuMDAwMDAwLCAxMi4wMDAwMDApJz48ZyBpZD0nZmFuZ2FuJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNMi4zNDI4NTcxNCwzLjIxNTM4NDYyIEwxNi4wNTcxNDI5LDMuMjE1Mzg0NjIgQzE2LjE0ODA3NDIsMy4yMTUzODQ2MiAxNi4yMzUyODEzLDMuMjUxMDQzODUgMTYuMjk5NTc5NSwzLjMxNDUxNzcgQzE2LjM2Mzg3NzcsMy4zNzc5OTE1NSAxNi40LDMuNDY0MDgwNTcgMTYuNCwzLjU1Mzg0NjE1IEwxNi40LDE1LjA2MTUzODUgQzE2LjQsMTUuMjQ4NDY1NiAxNi4yNDY0OTc2LDE1LjQgMTYuMDU3MTQyOSwxNS40IEwyLjM0Mjg1NzE0LDE1LjQgQzIuMTUzNTAyMzcsMTUuNCAyLDE1LjI0ODQ2NTYgMiwxNS4wNjE1Mzg1IEwyLDMuNTUzODQ2MTUgQzIsMy40NjQwODA1NyAyLjAzNjEyMjM0LDMuMzc3OTkxNTUgMi4xMDA0MjA1MywzLjMxNDUxNzcgQzIuMTY0NzE4NzIsMy4yNTEwNDM4NSAyLjI1MTkyNTc3LDMuMjE1Mzg0NjIgMi4zNDI4NTcxNCwzLjIxNTM4NDYyIFonIGlkPSfot6/lvoQnIGZpbGw9JyM0Qjk5RkYnIG9wYWNpdHk9JzAuNic+PC9wYXRoPjxwYXRoIGQ9J00yLjM0MjkwNzcxLDEgTDguOTgxNjAxLDEgQzkuMTA5ODk4NTYsMSA5LjIyNzQ1MDA3LDEuMDcxNjU2NjMgOS4yODYyNzQ0OSwxLjE4NTY1NzE0IEwxNi4zNjE4MzIyLDE0Ljg5OTk0MjggQzE2LjQxNjY4NTEsMTUuMDA2MjQ2NSAxNi40MTIxNjEsMTUuMTMzNDQ5MSAxNi4zNDk4OTQ3LDE1LjIzNTU4ODYgQzE2LjI4NzYyODQsMTUuMzM3NzI4MSAxNi4xNzY2MjI3LDE1LjQgMTYuMDU2OTg3MywxNS40IEwyLjM0MjkwNzcxLDE1LjQgQzIuMTUzNTI1MDEsMTUuNCAyLDE1LjI0NjQ5NzYgMiwxNS4wNTcxNDI4IEwyLDEuMzQyODU3MTQgQzIsMS4xNTM1MDIzNyAyLjE1MzUyNTAxLDEgMi4zNDI5MDc3MSwxIFonIGlkPSfot6/lvoQnIGZpbGw9JyM0Qjk5RkYnIG9wYWNpdHk9JzAuOCc+PC9wYXRoPjxwYXRoIGQ9J000LjM2NjQzMzU2LDMuMjE1Mzg0NjIgTDcuMzg3NDEyNiwzLjIxNTM4NDYyIEM3LjQ4ODExMTksMy4yMTUzODQ2MiA3LjUzODQ2MTU0LDMuMjg5MjMwNzcgNy41Mzg0NjE1NCwzLjQzNjkyMzA2IEw3LjUzODQ2MTU0LDUuMjA5MjMwNzggQzcuNTM4NDYxNTQsNS4zNTY5MjMwOSA3LjQ4ODExMTg5LDUuNDMwNzY5MjMgNy4zODc0MTI2LDUuNDMwNzY5MjMgTDQuMzY2NDMzNTYsNS40MzA3NjkyMyBDNC4yNjU3MzQyNSw1LjQzMDc2OTIzIDQuMjE1Mzg0NjIsNS4zNTY5MjMwOCA0LjIxNTM4NDYyLDUuMjA5MjMwNzggTDQuMjE1Mzg0NjIsMy40MzY5MjMwNiBDNC4yMTUzODQ2MiwzLjI4OTIzMDc1IDQuMjY1NzM0MjYsMy4yMTUzODQ2MiA0LjM2NjQzMzU2LDMuMjE1Mzg0NjIgWicgaWQ9J+i3r+W+hCcgZmlsbD0nI0ZGRkZGRicgZmlsbC1ydWxlPSdub256ZXJvJz48L3BhdGg+PC9nPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4="); -} -/*导出*/ -.qfw-svgExport{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmRhb2NodTwvdGl0bGU+PGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+PGcgaWQ9J+mhtemdoi0xJyBzdHJva2U9J25vbmUnIHN0cm9rZS13aWR0aD0nMScgZmlsbD0nbm9uZScgZmlsbC1ydWxlPSdldmVub2RkJz48ZyBpZD0n5Lqk5LqS5pa55qGIMS3luLjop4TmgIHlpIfku70nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC0yMzUuMDAwMDAwLCAtMTk1LjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDYuMDAwMDAwLCAxODIuMDAwMDAwKSc+PGcgaWQ9J+e8lue7hC0xNycgdHJhbnNmb3JtPSd0cmFuc2xhdGUoMjI5LjAwMDAwMCwgMTIuMDAwMDAwKSc+PGcgaWQ9J2Rhb2NodS00JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNMTEuNDM3NTM5MSwxIEw0LjE3OCwxIEw0LjE3OCwxNC4wNjggTDE2LjE1NywxNC4wNjggTDE2LjE1Nyw0LjQ4NTI3MzE2IEwxMS40Mzc1MzkxLDQuNDg1MjczMTYgTDExLjQzNzUzOTEsMSBaIE0xNC4xNjAzODAzLDguODM1NTk1MjIgTDE0LjE2MDM4MDMsOS43MDkxNjEwMyBMMTAuNTMwMzY4MywxMi4zMjA4Njg0IEwxMC41MzAzNjgzLDEwLjU4MjcyNjggTDYuODk5OTQzMjgsMTAuNTgyNzI2OCBMNi44OTk5NDMyOCw3Ljk3MTAwMTI5IEwxMC41MzA0MDQyLDcuOTcxMDAxMjkgTDEwLjUzMDQwNDIsNi4yMjM4ODc4NyBMMTQuMTYwMzgwMyw4LjgzNTU5NTIyIFonIGlkPSflvaLnirYnIGZpbGw9JyM4QTk4QkUnIGZpbGwtcnVsZT0nbm9uemVybyc+PC9wYXRoPjxwYXRoIGQ9J00xMi44OSwxIEwxMi44OSwzLjY0MDg4NTIgTDE1LjYyMjYwNiwzLjY0MDg4NTIgTDEyLjg5LDEgWiBNMiwyLjg1NTIzNjk0IEwyLDE2LjI0NiBMMTMuNjE3MTQ5MiwxNi4yNDYgTDEzLjYxNzE0OTIsMTQuOTQ3MjM0OCBMMy4yOTY1MjMyMSwxNC45NDcyMzQ4IEwzLjI5NjUyMzIxLDIuODU1MjM2OTQgTDIsMi44NTUyMzY5NCBaJyBpZD0n5b2i54q2JyBmaWxsPScjN0E4OUIyJyBvcGFjaXR5PScwLjY5NTQ3NTI2Jz48L3BhdGg+PC9nPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4="); -} -.qfw-btn:hover .qfw-svgExport{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxN3B4JyB2aWV3Qm94PScwIDAgMTggMTcnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmRhb2NodTI8L3RpdGxlPjxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPjxnIGlkPSfpobXpnaItMScgc3Ryb2tlPSdub25lJyBzdHJva2Utd2lkdGg9JzEnIGZpbGw9J25vbmUnIGZpbGwtcnVsZT0nZXZlbm9kZCc+PGcgaWQ9J+Wbvuagh+mAieS4reminOiJsuWIh+WbvuWkh+S7vScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTIzNS4wMDAwMDAsIC0xOTUuMDAwMDAwKScgZmlsbD0nIzU4QTFGRSc+PGcgaWQ9J+e8lue7hC0xNScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoNi4wMDAwMDAsIDE4Mi4wMDAwMDApJz48ZyBpZD0n57yW57uELTE3JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgyMjkuMDAwMDAwLCAxMS4wMDAwMDApJz48ZyBpZD0nZGFvY2h1LTQnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDAuMDAwMDAwLCAyLjAwMDAwMCknPjxwYXRoIGQ9J00xMS40Mzc1MzkxLDEgTDQuMTc4LDEgTDQuMTc4LDE0LjA2OCBMMTYuMTU3LDE0LjA2OCBMMTYuMTU3LDQuNDg1MjczMTYgTDExLjQzNzUzOTEsNC40ODUyNzMxNiBMMTEuNDM3NTM5MSwxIFogTTE0LjE2MDM4MDMsOC44MzU1OTUyMiBMMTQuMTYwMzgwMyw5LjcwOTE2MTAzIEwxMC41MzAzNjgzLDEyLjMyMDg2ODQgTDEwLjUzMDM2ODMsMTAuNTgyNzI2OCBMNi44OTk5NDMyOCwxMC41ODI3MjY4IEw2Ljg5OTk0MzI4LDcuOTcxMDAxMjkgTDEwLjUzMDQwNDIsNy45NzEwMDEyOSBMMTAuNTMwNDA0Miw2LjIyMzg4Nzg3IEwxNC4xNjAzODAzLDguODM1NTk1MjIgWicgaWQ9J+W9oueKticgZmlsbC1ydWxlPSdub256ZXJvJz48L3BhdGg+PHBhdGggZD0nTTEyLjg5LDEgTDEyLjg5LDMuNjQwODg1MiBMMTUuNjIyNjA2LDMuNjQwODg1MiBMMTIuODksMSBaIE0yLDIuODU1MjM2OTQgTDIsMTYuMjQ2IEwxMy42MTcxNDkyLDE2LjI0NiBMMTMuNjE3MTQ5MiwxNC45NDcyMzQ4IEwzLjI5NjUyMzIxLDE0Ljk0NzIzNDggTDMuMjk2NTIzMjEsMi44NTUyMzY5NCBMMiwyLjg1NTIzNjk0IFonIGlkPSflvaLnirYnIG9wYWNpdHk9JzAuNjk1NDc1MjYnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} - -/*刷新*/ -.qfw-svgRefresh{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNodWF4aW48L3RpdGxlPjxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPjxnIGlkPSfpobXpnaItMScgc3Ryb2tlPSdub25lJyBzdHJva2Utd2lkdGg9JzEnIGZpbGw9J25vbmUnIGZpbGwtcnVsZT0nZXZlbm9kZCc+PGcgaWQ9J+S6pOS6kuaWueahiDEt5bi46KeE5oCB5aSH5Lu9JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtMzI3LjAwMDAwMCwgLTE5NS4wMDAwMDApJz48ZyBpZD0n57yW57uELTE1JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSg2LjAwMDAwMCwgMTgyLjAwMDAwMCknPjxnIGlkPSdzaHVheGluJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgzMjEuMDAwMDAwLCAxMi4wMDAwMDApJz48ZyBpZD0n57yW57uELTE4JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNNy43OTI1NTAyNSw4LjIzODE3ODQ1IEw2LjQyNjAyMzY4LDguMjM4MTc4NDUgQzYuNDI2MDIzNjgsNS44MzUzMjU0NSA2LjQyNjAyMzY4LDIuNzQ1MjQ0MjcgMTAuNzUzMTU1MSwwLjIyODY2ODQ0OSBDMTAuODY2MzIyNCwwLjExMzcyMjgwMiAxMC43NTMxNTUxLDAgMTAuNjM4NzcwOCwwIEMyLjU1NTIxMjM5LDEuMjU4Mjg3OTEgMS44NzM3NzQzOCw2Ljc0OTk5OTI3IDEuODczNzc0MzgsOC4yMzgxNzg0NSBMMC41MDYwMzA5NDQsOC4yMzgxNzg0NSBDMC4wNTA5Mjc2OTMsOC4yMzgxNzg0NSAtMC4xNzc4NDA3OCw4LjY5NTUxNTM3IDAuMTY1MzExOTM4LDkuMDM5MTI5NDYgTDMuNDY2NjM1NzMsMTMuMTU3NjA3MyBDMy42MjgwMDk4NCwxMy4zNzMxODg5IDMuODgwODQyODYsMTMuNSA0LjE0OTI5MDYsMTMuNSBDNC40MTc3MzgzNCwxMy41IDQuNjcwNTcxMzUsMTMuMzczMTg4OSA0LjgzMTk0NTQ3LDEzLjE1NzYwNzMgTDguMTM0NDg2MTIsOS4wMzkxMjk0NiBDOC4zNjIwMzc3Myw4LjY5NTUxNTM3IDguMTM0NDg2MTIsOC4yMzgxNzg0NyA3Ljc5Mzc2NzExLDguMjM4MTc4NDUgTDcuNzkyNTUwMjUsOC4yMzgxNzg0NSBaJyBpZD0n5b2i54q2JyBmaWxsPScjOEE5OEJFJyBmaWxsLXJ1bGU9J25vbnplcm8nPjwvcGF0aD48cGF0aCBkPSdNMTcuOTExNTc0MSw3LjE2MjA5MzM2IEwxNC42MjA5MjY5LDMuMDQyMzkyNzEgQzE0LjQ2MDEzNCwyLjgyNjgxMTA1IDE0LjIwODIxMTUsMi43IDEzLjk0MDczMDUsMi43IEMxMy42NzMyNDk1LDIuNyAxMy40MjEzMjcsMi44MjY4MTEwNSAxMy4yNjA1MzQxLDMuMDQyMzkyNzEgTDkuOTY5ODg2ODYsNy4xNjIwOTMzNiBDOS43NDMxNTQ3Myw3LjUwNDQ4NDYzIDkuOTY5ODg2ODYsNy45NjE4MjE1NCAxMC4zMDkzNzg4LDcuOTYxODIxNTIgTDExLjU1ODIyNDMsNy45NjE4MjE1MiBDMTEuNTU4MjI0MywxMC4zNjQ2NzQ1IDExLjU1ODIyNDMsMTMuNDU0NzU1NyA3LjI0NjY3NjI0LDE1Ljk3MTMzMTUgQzcuMTMzOTE2NCwxNi4wODYyNzcyIDcuMjQ2Njc2MjQsMTYuMiA3LjM2MDY0ODU1LDE2LjIgQzE1LjQxNTA5NTcsMTQuOTQxNzEyMSAxNi4wOTY1MDQ1LDkuNDUwMDAwNzMgMTYuMDk2NTA0NSw3Ljk2MTgyMTUyIEwxNy40NTgxMDk4LDcuOTYxODIxNTIgQzE3LjkxMTU3NDEsNy45NjE4MjE1MiAxOC4xMzcwOTM4LDcuNTA0NDg0NjEgMTcuOTExNTc0MSw3LjE2MjA5MzM2IEwxNy45MTE1NzQxLDcuMTYyMDkzMzYgWicgaWQ9J+i3r+W+hCcgZmlsbD0nIzdBODlCMicgb3BhY2l0eT0nMC41Jz48L3BhdGg+PC9nPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4="); -} -.qfw-btn:hover .qfw-svgRefresh{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxN3B4JyB2aWV3Qm94PScwIDAgMTggMTcnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNodWF4aW4yPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSflm77moIfpgInkuK3popzoibLliIflm77lpIfku70nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC0zMjcuMDAwMDAwLCAtMTk1LjAwMDAwMCknIGZpbGw9JyM1MEQwODEnPjxnIGlkPSfnvJbnu4QtMTUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDYuMDAwMDAwLCAxODIuMDAwMDAwKSc+PGcgaWQ9J3NodWF4aW4nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDMyMS4wMDAwMDAsIDExLjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTgnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDAuMDAwMDAwLCAyLjAwMDAwMCknPjxwYXRoIGQ9J003Ljc5MjU1MDI1LDguMjM4MTc4NDUgTDYuNDI2MDIzNjgsOC4yMzgxNzg0NSBDNi40MjYwMjM2OCw1LjgzNTMyNTQ1IDYuNDI2MDIzNjgsMi43NDUyNDQyNyAxMC43NTMxNTUxLDAuMjI4NjY4NDQ5IEMxMC44NjYzMjI0LDAuMTEzNzIyODAyIDEwLjc1MzE1NTEsMCAxMC42Mzg3NzA4LDAgQzIuNTU1MjEyMzksMS4yNTgyODc5MSAxLjg3Mzc3NDM4LDYuNzQ5OTk5MjcgMS44NzM3NzQzOCw4LjIzODE3ODQ1IEwwLjUwNjAzMDk0NCw4LjIzODE3ODQ1IEMwLjA1MDkyNzY5Myw4LjIzODE3ODQ1IC0wLjE3Nzg0MDc4LDguNjk1NTE1MzcgMC4xNjUzMTE5MzgsOS4wMzkxMjk0NiBMMy40NjY2MzU3MywxMy4xNTc2MDczIEMzLjYyODAwOTg0LDEzLjM3MzE4ODkgMy44ODA4NDI4NiwxMy41IDQuMTQ5MjkwNiwxMy41IEM0LjQxNzczODM0LDEzLjUgNC42NzA1NzEzNSwxMy4zNzMxODg5IDQuODMxOTQ1NDcsMTMuMTU3NjA3MyBMOC4xMzQ0ODYxMiw5LjAzOTEyOTQ2IEM4LjM2MjAzNzczLDguNjk1NTE1MzcgOC4xMzQ0ODYxMiw4LjIzODE3ODQ3IDcuNzkzNzY3MTEsOC4yMzgxNzg0NSBMNy43OTI1NTAyNSw4LjIzODE3ODQ1IFonIGlkPSflvaLnirYnIGZpbGwtcnVsZT0nbm9uemVybyc+PC9wYXRoPjxwYXRoIGQ9J00xNy45MTE1NzQxLDcuMTYyMDkzMzYgTDE0LjYyMDkyNjksMy4wNDIzOTI3MSBDMTQuNDYwMTM0LDIuODI2ODExMDUgMTQuMjA4MjExNSwyLjcgMTMuOTQwNzMwNSwyLjcgQzEzLjY3MzI0OTUsMi43IDEzLjQyMTMyNywyLjgyNjgxMTA1IDEzLjI2MDUzNDEsMy4wNDIzOTI3MSBMOS45Njk4ODY4Niw3LjE2MjA5MzM2IEM5Ljc0MzE1NDczLDcuNTA0NDg0NjMgOS45Njk4ODY4Niw3Ljk2MTgyMTU0IDEwLjMwOTM3ODgsNy45NjE4MjE1MiBMMTEuNTU4MjI0Myw3Ljk2MTgyMTUyIEMxMS41NTgyMjQzLDEwLjM2NDY3NDUgMTEuNTU4MjI0MywxMy40NTQ3NTU3IDcuMjQ2Njc2MjQsMTUuOTcxMzMxNSBDNy4xMzM5MTY0LDE2LjA4NjI3NzIgNy4yNDY2NzYyNCwxNi4yIDcuMzYwNjQ4NTUsMTYuMiBDMTUuNDE1MDk1NywxNC45NDE3MTIxIDE2LjA5NjUwNDUsOS40NTAwMDA3MyAxNi4wOTY1MDQ1LDcuOTYxODIxNTIgTDE3LjQ1ODEwOTgsNy45NjE4MjE1MiBDMTcuOTExNTc0MSw3Ljk2MTgyMTUyIDE4LjEzNzA5MzgsNy41MDQ0ODQ2MSAxNy45MTE1NzQxLDcuMTYyMDkzMzYgTDE3LjkxMTU3NDEsNy4xNjIwOTMzNiBaJyBpZD0n6Lev5b6EJyBvcGFjaXR5PScwLjYnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} - -/*筛选*/ -.qfw-svgFilter{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNoYWl4dWFuPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSfkuqTkupLmlrnmoYgxLeW4uOinhOaAgeWkh+S7vScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLTQwNC4wMDAwMDAsIC0xOTUuMDAwMDAwKScgZmlsbD0nIzhBOThCRSc+PGcgaWQ9J+e8lue7hC0xNScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoNi4wMDAwMDAsIDE4Mi4wMDAwMDApJz48ZyBpZD0neml5dWFuJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgzOTguMDAwMDAwLCAxMi4wMDAwMDApJz48ZyBpZD0n57yW57uELTIwJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgwLjAwMDAwMCwgMS4wMDAwMDApJz48cGF0aCBkPSdNMTUuNTg0MzMyMywyLjAwMDE5MTgzIEMxNS43NDIzMjAzLDEuOTk1MzMxOTYgMTUuODg4NTgyOSwyLjA4MzE1MTk0IDE1Ljk1ODQ1NTUsMi4yMjQ4MjU0NSBDMTYuMDI4MzI4MSwyLjM2NjQ5ODk2IDE2LjAwODkyNiwyLjUzNTkwMDc3IDE1LjkwODgyNywyLjY1ODEzNjIxIEwxNS45MDg4MjcsMi42NTgxMzYyMSBMMTAuOTUzMTk0OSw4LjYwNzk2ODIxIEMxMC44OTM3NDM3LDguNjc5NjIxOTEgMTAuODYxNDAzLDguNzY5ODg0NzcgMTAuODYxODMyMyw4Ljg2Mjk2MTAxIEwxMC44NjE4MzIzLDguODYyOTYxMDEgTDEwLjg2MTgzMjMsMTUuNTkzNTExNyBDMTAuODU3MjAwOSwxNS43NTIxNjk1IDEwLjc2MzE4NDQsMTUuODk0NTY4NyAxMC42MTkwMzc4LDE1Ljk2MTI1MyBDMTAuNDc0ODkxMSwxNi4wMjc5MzcyIDEwLjMwNTQwMjQsMTYuMDA3NDM5MyAxMC4xODEzMzg2LDE1LjkwODMxNzYgTDEwLjE4MTMzODYsMTUuOTA4MzE3NiBMNy4yNzM0ODgzNywxMy42MTAyMzQ0IEM3LjE3NzQ2MTI0LDEzLjUzNDAwNCA3LjEyMTcyNjIsMTMuNDE3OTc2OCA3LjEyMjI2NzU1LDEzLjI5NTQyODQgTDcuMTIyMjY3NTUsMTMuMjk1NDI4NCBMNy4xMjIyNjc1NSw4Ljg2NjEwOTA3IEM3LjEyMTQxMDczLDguNzczMjU3NDggNy4wODkyMTk1OSw4LjY4MzQxMjA1IDcuMDMwOTA0OTcsOC42MTExMTYyNyBMNy4wMzA5MDQ5Nyw4LjYxMTExNjI3IEwyLjA5MTAyNTAyLDIuNjU4MTM2MjEgQzEuOTkyMTIzMDcsMi41MzcyMTk0IDEuOTcyMDQ1NDMsMi4zNzAwODc0NiAyLjAzOTQ5ODY4LDIuMjI5MjE2NDMgQzIuMTA2OTUxOTMsMi4wODgzNDU0IDIuMjQ5Nzg4NjYsMS45OTkxMDQxOCAyLjQwNjA2ODM4LDIuMDAwMTkxODMgTDIuNDA2MDY4MzgsMi4wMDAxOTE4MyBaIE0xMC41NDI4NzU2LDYuNjY2NjY2NjcgTDcuNiw2LjY2NjY2NjY3IEw3LjYsNy42IEwxMC41NDI4NzU2LDcuNiBMMTAuNTQyODc1Niw2LjY2NjY2NjY3IFonIGlkPSflvaLnirbnu5PlkIgnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} -.qfw-btn:hover .qfw-svgFilter{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxN3B4JyB2aWV3Qm94PScwIDAgMTggMTcnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPnNoYWl4dWFuMjwvdGl0bGU+PGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+PGcgaWQ9J+mhtemdoi0xJyBzdHJva2U9J25vbmUnIHN0cm9rZS13aWR0aD0nMScgZmlsbD0nbm9uZScgZmlsbC1ydWxlPSdldmVub2RkJz48ZyBpZD0n5Zu+5qCH6YCJ5Lit6aKc6Imy5YiH5Zu+5aSH5Lu9JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNDA0LjAwMDAwMCwgLTE5NS4wMDAwMDApJyBmaWxsPScjNThBMUZFJz48ZyBpZD0n57yW57uELTE1JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSg2LjAwMDAwMCwgMTgyLjAwMDAwMCknPjxnIGlkPSd6aXl1YW4nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDM5OC4wMDAwMDAsIDExLjAwMDAwMCknPjxwYXRoIGQ9J00xNS41ODQzMzIzLDQuMDAwMTkxODMgQzE1Ljc0MjMyMDMsMy45OTUzMzE5NiAxNS44ODg1ODI5LDQuMDgzMTUxOTQgMTUuOTU4NDU1NSw0LjIyNDgyNTQ1IEMxNi4wMjgzMjgxLDQuMzY2NDk4OTYgMTYuMDA4OTI2LDQuNTM1OTAwNzcgMTUuOTA4ODI3LDQuNjU4MTM2MjEgTDE1LjkwODgyNyw0LjY1ODEzNjIxIEwxMC45NTMxOTQ5LDEwLjYwNzk2ODIgQzEwLjg5Mzc0MzcsMTAuNjc5NjIxOSAxMC44NjE0MDMsMTAuNzY5ODg0OCAxMC44NjE4MzIzLDEwLjg2Mjk2MSBMMTAuODYxODMyMywxMC44NjI5NjEgTDEwLjg2MTgzMjMsMTcuNTkzNTExNyBDMTAuODU3MjAwOSwxNy43NTIxNjk1IDEwLjc2MzE4NDQsMTcuODk0NTY4NyAxMC42MTkwMzc4LDE3Ljk2MTI1MyBDMTAuNDc0ODkxMSwxOC4wMjc5MzcyIDEwLjMwNTQwMjQsMTguMDA3NDM5MyAxMC4xODEzMzg2LDE3LjkwODMxNzYgTDEwLjE4MTMzODYsMTcuOTA4MzE3NiBMNy4yNzM0ODgzNywxNS42MTAyMzQ0IEM3LjE3NzQ2MTI0LDE1LjUzNDAwNCA3LjEyMTcyNjIsMTUuNDE3OTc2OCA3LjEyMjI2NzU1LDE1LjI5NTQyODQgTDcuMTIyMjY3NTUsMTUuMjk1NDI4NCBMNy4xMjIyNjc1NSwxMC44NjYxMDkxIEM3LjEyMTQxMDczLDEwLjc3MzI1NzUgNy4wODkyMTk1OSwxMC42ODM0MTIxIDcuMDMwOTA0OTcsMTAuNjExMTE2MyBMNy4wMzA5MDQ5NywxMC42MTExMTYzIEwyLjA5MTAyNTAyLDQuNjU4MTM2MjEgQzEuOTkyMTIzMDcsNC41MzcyMTk0IDEuOTcyMDQ1NDMsNC4zNzAwODc0NiAyLjAzOTQ5ODY4LDQuMjI5MjE2NDMgQzIuMTA2OTUxOTMsNC4wODgzNDU0IDIuMjQ5Nzg4NjYsMy45OTkxMDQxOCAyLjQwNjA2ODM4LDQuMDAwMTkxODMgTDIuNDA2MDY4MzgsNC4wMDAxOTE4MyBaIE0xMC41NDI4NzU2LDguNjY2NjY2NjcgTDcuNiw4LjY2NjY2NjY3IEw3LjYsOS42IEwxMC41NDI4NzU2LDkuNiBMMTAuNTQyODc1Niw4LjY2NjY2NjY3IFonIGlkPSflvaLnirbnu5PlkIgnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9zdmc+"); -} -/*打印*/ -.qfw-svgPrint{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTggMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmRheWluPC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48cGF0aCBkPSdNMTQuNjI1LDEzLjgyMTU1IEwxNC42MjUsMTcuMSBMMy4zNzUsMTcuMSBMMy4zNzUsMTMuODIxNTUgTDAsMTMuODIxNTUgTDAsNi43MTgwOTk5OSBDMCw2LjU3MzYgMC4wNTk0LDYuNDM0MTk5OTkgMC4xNjQ3LDYuMzMxMzUgQzAuMjY4OTQyOTk5LDYuMjI5NDQxNTEgMC40MTI0Njc5MzksNi4xNzE3ODYxOSAwLjU2MjUwMDAwNyw2LjE3MTU1MDAxIEwxNy40Mzc1LDYuMTcxNTUwMDEgQzE3LjU4NjksNi4xNzE1NTAwMSAxNy43Myw2LjIyOTM1IDE3LjgzNTMsNi4zMzEzNSBDMTcuOTQwNiw2LjQzMzM1IDE4LDYuNTcyNzQ5OTkgMTgsNi43MTgwOTk5OSBMMTgsMTMuODIxNTUgTDE0LjYyNSwxMy44MjE1NSBaIE01LjYyNSwxMS42MzUzNSBMNS42MjUsMTQuOTE0NjUgTDEyLjM3NSwxNC45MTQ2NSBMMTIuMzc1LDExLjYzNDUgTDUuNjI1LDExLjYzNDUgTDUuNjI1LDExLjYzNTM1IFogTTE1LjE4NzUsMTAuMDA5MyBDMTUuNDg1NCwxMC4wMDkzIDE1Ljc3MjUsOS44OTQ1NTAwMSAxNS45ODMxLDkuNjg5NyBDMTYuMTkzNyw5LjQ4NDg0OTk5IDE2LjMxMjUsOS4yMDY4OTk5OSAxNi4zMTI1LDguOTE2MTk5OTkgQzE2LjMxMjUsOC42MjcxOTk5OSAxNi4xOTM3LDguMzQ5MjQ5OTkgMTUuOTgzMSw4LjE0MzU0OTk5IEMxNS43NzQ1NTQ0LDcuOTM5ODE0ODIgMTUuNDg3NTQzLDcuODI0NTE5NjQgMTUuMTg3NSw3LjgyMzk1MDAxIEMxNC44ODk2LDcuODIzOTUwMDEgMTQuNjAyNSw3LjkzODcwMDAxIDE0LjM5MTksOC4xNDM1NDk5OSBDMTQuMTc5NzgwMSw4LjM1MTEyMDg2IDE0LjA2MTYyNTUsOC42Mjg1NzI0NSAxNC4wNjI0OTUyLDguOTE3MDUgQzE0LjA2MjQ5NTIsOS4yMDYwNTAwMSAxNC4xODEzLDkuNDg0ODQ5OTkgMTQuMzkxOSw5LjY4OTcgQzE0LjYwMzQsOS44OTM3IDE0Ljg4OTYsMTAuMDA5MyAxNS4xODc1LDEwLjAwOTMgTDE1LjE4NzUsMTAuMDA5MyBaJyBpZD0ncGF0aC0xJz48L3BhdGg+PC9kZWZzPjxnIGlkPSfpobXpnaItMScgc3Ryb2tlPSdub25lJyBzdHJva2Utd2lkdGg9JzEnIGZpbGw9J25vbmUnIGZpbGwtcnVsZT0nZXZlbm9kZCc+PGcgaWQ9J+S6pOS6kuaWueahiDEt5bi46KeE5oCB5aSH5Lu9JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtMTYxLjAwMDAwMCwgLTE5NS4wMDAwMDApJz48ZyBpZD0n57yW57uELTE1JyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSg2LjAwMDAwMCwgMTgyLjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTQnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDE1NS4wMDAwMDAsIDEyLjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTblpIfku70nPjxtYXNrIGlkPSdtYXNrLTInIGZpbGw9J3doaXRlJz48dXNlIHhsaW5rOmhyZWY9JyNwYXRoLTEnPjwvdXNlPjwvbWFzaz48dXNlIGlkPSflvaLnirYnIGZpbGw9JyM4QTk4QkUnIHhsaW5rOmhyZWY9JyNwYXRoLTEnPjwvdXNlPjwvZz48cGF0aCBkPSdNMy44MjUsMS44IEwxNC4xNzUsMS44IEMxNC40MjM1MjgxLDEuOCAxNC42MjUsMi4wMDE0NzE4NiAxNC42MjUsMi4yNSBMMTQuNjI1LDUuMDc4NDQ5OTkgTDE0LjYyNSw1LjA3ODQ0OTk5IEwzLjM3NSw1LjA3ODQ0OTk5IEwzLjM3NSwyLjI1IEMzLjM3NSwyLjAwMTQ3MTg2IDMuNTc2NDcxODYsMS44IDMuODI1LDEuOCBaJyBpZD0n55+p5b2iJyBmaWxsPScjN0E4OUIyJyBvcGFjaXR5PScwLjUnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9zdmc+"); -} -.qfw-btn:hover .qfw-svgPrint{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMThweCcgaGVpZ2h0PScxN3B4JyB2aWV3Qm94PScwIDAgMTggMTcnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPmRheWluMjwvdGl0bGU+PGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+PGRlZnM+PHBhdGggZD0nTTE0LjYyNSwxMy44MjE1NSBMMTQuNjI1LDE3LjEgTDMuMzc1LDE3LjEgTDMuMzc1LDEzLjgyMTU1IEwwLDEzLjgyMTU1IEwwLDYuNzE4MDk5OTkgQzAsNi41NzM2IDAuMDU5NCw2LjQzNDE5OTk5IDAuMTY0Nyw2LjMzMTM1IEMwLjI2ODk0Mjk5OSw2LjIyOTQ0MTUxIDAuNDEyNDY3OTM5LDYuMTcxNzg2MTkgMC41NjI1MDAwMDcsNi4xNzE1NTAwMSBMMTcuNDM3NSw2LjE3MTU1MDAxIEMxNy41ODY5LDYuMTcxNTUwMDEgMTcuNzMsNi4yMjkzNSAxNy44MzUzLDYuMzMxMzUgQzE3Ljk0MDYsNi40MzMzNSAxOCw2LjU3Mjc0OTk5IDE4LDYuNzE4MDk5OTkgTDE4LDEzLjgyMTU1IEwxNC42MjUsMTMuODIxNTUgWiBNNS42MjUsMTEuNjM1MzUgTDUuNjI1LDE0LjkxNDY1IEwxMi4zNzUsMTQuOTE0NjUgTDEyLjM3NSwxMS42MzQ1IEw1LjYyNSwxMS42MzQ1IEw1LjYyNSwxMS42MzUzNSBaIE0xNS4xODc1LDEwLjAwOTMgQzE1LjQ4NTQsMTAuMDA5MyAxNS43NzI1LDkuODk0NTUwMDEgMTUuOTgzMSw5LjY4OTcgQzE2LjE5MzcsOS40ODQ4NDk5OSAxNi4zMTI1LDkuMjA2ODk5OTkgMTYuMzEyNSw4LjkxNjE5OTk5IEMxNi4zMTI1LDguNjI3MTk5OTkgMTYuMTkzNyw4LjM0OTI0OTk5IDE1Ljk4MzEsOC4xNDM1NDk5OSBDMTUuNzc0NTU0NCw3LjkzOTgxNDgyIDE1LjQ4NzU0Myw3LjgyNDUxOTY0IDE1LjE4NzUsNy44MjM5NTAwMSBDMTQuODg5Niw3LjgyMzk1MDAxIDE0LjYwMjUsNy45Mzg3MDAwMSAxNC4zOTE5LDguMTQzNTQ5OTkgQzE0LjE3OTc4MDEsOC4zNTExMjA4NiAxNC4wNjE2MjU1LDguNjI4NTcyNDUgMTQuMDYyNDk1Miw4LjkxNzA1IEMxNC4wNjI0OTUyLDkuMjA2MDUwMDEgMTQuMTgxMyw5LjQ4NDg0OTk5IDE0LjM5MTksOS42ODk3IEMxNC42MDM0LDkuODkzNyAxNC44ODk2LDEwLjAwOTMgMTUuMTg3NSwxMC4wMDkzIEwxNS4xODc1LDEwLjAwOTMgWicgaWQ9J3BhdGgtMSc+PC9wYXRoPjwvZGVmcz48ZyBpZD0n6aG16Z2iLTEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSflm77moIfpgInkuK3popzoibLliIflm77lpIfku70nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC0xNjEuMDAwMDAwLCAtMTk1LjAwMDAwMCknPjxnIGlkPSfnvJbnu4QtMTUnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDYuMDAwMDAwLCAxODIuMDAwMDAwKSc+PGcgaWQ9J+e8lue7hC0xNCcgdHJhbnNmb3JtPSd0cmFuc2xhdGUoMTU1LjAwMDAwMCwgMTIuMDAwMDAwKSc+PGcgaWQ9J+e8lue7hC0xNuWkh+S7vSc+PG1hc2sgaWQ9J21hc2stMicgZmlsbD0nd2hpdGUnPjx1c2UgeGxpbms6aHJlZj0nI3BhdGgtMSc+PC91c2U+PC9tYXNrPjx1c2UgaWQ9J+W9oueKticgZmlsbD0nIzU4QTFGRScgeGxpbms6aHJlZj0nI3BhdGgtMSc+PC91c2U+PC9nPjxwYXRoIGQ9J00zLjgyNSwxLjggTDE0LjE3NSwxLjggQzE0LjQyMzUyODEsMS44IDE0LjYyNSwyLjAwMTQ3MTg2IDE0LjYyNSwyLjI1IEwxNC42MjUsNS4wNzg0NDk5OSBMMTQuNjI1LDUuMDc4NDQ5OTkgTDMuMzc1LDUuMDc4NDQ5OTkgTDMuMzc1LDIuMjUgQzMuMzc1LDIuMDAxNDcxODYgMy41NzY0NzE4NiwxLjggMy44MjUsMS44IFonIGlkPSfnn6nlvaInIGZpbGw9JyM1OEExRkUnIG9wYWNpdHk9JzAuNSc+PC9wYXRoPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4="); -} - -/*维度设置*/ -.qfw-svgDimesion{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMTZweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTYgMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPuiHquWumuS5iee7tOW6puagkS3nu7TluqbnrqHnkIY8L3RpdGxlPjxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPjxnIGlkPSfpobXpnaItMScgc3Ryb2tlPSdub25lJyBzdHJva2Utd2lkdGg9JzEnIGZpbGw9J25vbmUnIGZpbGwtcnVsZT0nZXZlbm9kZCc+PGcgaWQ9JzAyLeafpeivolVJ6K6+6K6hJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSgtNDg2LjAwMDAwMCwgLTE5NS4wMDAwMDApJyBmaWxsPScjOEE5OEJFJyBmaWxsLXJ1bGU9J25vbnplcm8nPjxnIGlkPSdzaHVheGluJyB0cmFuc2Zvcm09J3RyYW5zbGF0ZSg0ODUuMDAwMDAwLCAxOTMuMDAwMDAwKSc+PGcgaWQ9J+iHquWumuS5iee7tOW6puagkS3nu7TluqbnrqHnkIYnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDAuMDAwMDAwLCAxLjAwMDAwMCknPjxwYXRoIGQ9J005LjYwMDY1ODI5LDEuMzE4NjA0NjYgTDE0Ljg1OTg4OSw0LjI3MTE1NDg1IEMxNS41Njg1NCw0LjY2OTEwNTQ5IDE2LjAwNDMzNzMsNS4zOTkyMjg4MSAxNi4wMDQ1MDQ0LDYuMTg4ODEzNDMgTDE2LjAwNDUwNDQsMTEuODQyOTYzNyBDMTYuMDA0NzQ3NywxMi42MzI5NDQ4IDE1LjU2ODg5NTksMTMuMzYzNTgyMiAxNC44NTk4ODksMTMuNzYxNzMyNyBMOS42MDA2NTgyOSwxNi43MTQyODI4IEM4Ljg3NTUyNTU2LDE3LjEyMDk1NjcgNy45NzgxMzMwOSwxNy4xMTY3MDQ2IDcuMjU3MTk2NzcsMTYuNzAzMTc4OSBMMi4xMzA2NTgzNCwxMy43NjUwNjM5IEMxLjQzMjI5MzU2LDEzLjM2NDQ3NjIgMS4wMDQ0OTI2NywxMi42Mzk3OTY2IDEuMDA0NTA0NTEsMTEuODU3Mzk4OSBMMS4wMDQ1MDQ1MSw2LjE3NTQ4ODY0IEMxLjAwNDQ5MjY4LDUuMzkzMDkwOTUgMS40MzIyOTM1Nyw0LjY2ODQxMTI4IDIuMTMwNjU4MzQsNC4yNjc4MjM2NSBMNy4yNTgzNTA2MiwxLjMyODU5ODI1IEM3Ljk3OTIwODUyLDAuOTE1ODUyMDQ1IDguODc2MDI1NzgsMC45MTIwMjU3MjQgOS42MDA2NTgyOSwxLjMxODYwNDY2IFogTTEzLjYzNTY1ODMsNi43ODg0Mjg3MyBMOC45OTAyNzM2OSw5LjM2NDU1Mzc2IEw4Ljk5MDI3MzY5LDEzLjU4MDczNzcgTDEwLjkyNDExOTgsMTIuNDQ4MTMxIEwxMC45MjQxMTk4LDEwLjE3NDAzNDQgTDEzLjYzNTY1ODMsOC43NDkzOTI4NiBMMTMuNjM1NjU4Myw2Ljc4ODQyODczIFogTTMuMzEyMTk2OCw2Ljc4ODQyODczIEwzLjMxMjE5NjgsOC43NDA1MDk2NyBMNi4wNTE0Mjc1NiwxMC4xNzI5MjQgTDYuMDUxNDI3NTYsMTIuNDU1OTAzOCBMNy45NTc1ODEzOSwxMy41ODA3Mzc3IEw3Ljk1NzU4MTM5LDkuMzYxMjIyNTYgTDMuMzEyMTk2OCw2Ljc4ODQyODczIFogTTExLjc1NzE5NjcsNS4xMDA2MjI2OSBMOC41MzEwNDI5MSw2Ljg4NjE0MzgyIEw1LjE4ODM1MDYzLDUuMTAwNjIyNjkgTDMuODI3OTY2MDMsNS45NDY3NDY1MSBMOC41MzkxMTk4NCw4LjUyNjIwMjcyIEwxMy4yNDkxMTk4LDUuOTUwMDc3NzEgTDExLjc1NzE5NjcsNS4xMDA2MjI2OSBaJyBpZD0n5b2i54q2Jz48L3BhdGg+PC9nPjwvZz48L2c+PC9nPjwvc3ZnPg=="); -} -.qfw-btn:hover .qfw-svgDimesion{ - background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0nMTZweCcgaGVpZ2h0PScxNnB4JyB2aWV3Qm94PScwIDAgMTYgMTYnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayc+PHRpdGxlPuiHquWumuS5iee7tOW6puagkS3nu7TluqbnrqHnkIY8L3RpdGxlPjxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPjxnIGlkPScx44CB57u05bqm6K6+572uJyBzdHJva2U9J25vbmUnIHN0cm9rZS13aWR0aD0nMScgZmlsbD0nbm9uZScgZmlsbC1ydWxlPSdldmVub2RkJz48ZyBpZD0nMDIt5p+l6K+iVUnorr7orqEnIHRyYW5zZm9ybT0ndHJhbnNsYXRlKC00ODYuMDAwMDAwLCAtMTk1LjAwMDAwMCknIGZpbGw9JyM1OEExRkUnIGZpbGwtcnVsZT0nbm9uemVybyc+PGcgaWQ9J3NodWF4aW4nIHRyYW5zZm9ybT0ndHJhbnNsYXRlKDQ4NS4wMDAwMDAsIDE5My4wMDAwMDApJz48ZyBpZD0n6Ieq5a6a5LmJ57u05bqm5qCRLee7tOW6pueuoeeQhicgdHJhbnNmb3JtPSd0cmFuc2xhdGUoMC4wMDAwMDAsIDEuMDAwMDAwKSc+PHBhdGggZD0nTTkuNjAwNjU4MjksMS4zMTg2MDQ2NiBMMTQuODU5ODg5LDQuMjcxMTU0ODUgQzE1LjU2ODU0LDQuNjY5MTA1NDkgMTYuMDA0MzM3Myw1LjM5OTIyODgxIDE2LjAwNDUwNDQsNi4xODg4MTM0MyBMMTYuMDA0NTA0NCwxMS44NDI5NjM3IEMxNi4wMDQ3NDc3LDEyLjYzMjk0NDggMTUuNTY4ODk1OSwxMy4zNjM1ODIyIDE0Ljg1OTg4OSwxMy43NjE3MzI3IEw5LjYwMDY1ODI5LDE2LjcxNDI4MjggQzguODc1NTI1NTYsMTcuMTIwOTU2NyA3Ljk3ODEzMzA5LDE3LjExNjcwNDYgNy4yNTcxOTY3NywxNi43MDMxNzg5IEwyLjEzMDY1ODM0LDEzLjc2NTA2MzkgQzEuNDMyMjkzNTYsMTMuMzY0NDc2MiAxLjAwNDQ5MjY3LDEyLjYzOTc5NjYgMS4wMDQ1MDQ1MSwxMS44NTczOTg5IEwxLjAwNDUwNDUxLDYuMTc1NDg4NjQgQzEuMDA0NDkyNjgsNS4zOTMwOTA5NSAxLjQzMjI5MzU3LDQuNjY4NDExMjggMi4xMzA2NTgzNCw0LjI2NzgyMzY1IEw3LjI1ODM1MDYyLDEuMzI4NTk4MjUgQzcuOTc5MjA4NTIsMC45MTU4NTIwNDUgOC44NzYwMjU3OCwwLjkxMjAyNTcyNCA5LjYwMDY1ODI5LDEuMzE4NjA0NjYgWiBNMTMuNjM1NjU4Myw2Ljc4ODQyODczIEw4Ljk5MDI3MzY5LDkuMzY0NTUzNzYgTDguOTkwMjczNjksMTMuNTgwNzM3NyBMMTAuOTI0MTE5OCwxMi40NDgxMzEgTDEwLjkyNDExOTgsMTAuMTc0MDM0NCBMMTMuNjM1NjU4Myw4Ljc0OTM5Mjg2IEwxMy42MzU2NTgzLDYuNzg4NDI4NzMgWiBNMy4zMTIxOTY4LDYuNzg4NDI4NzMgTDMuMzEyMTk2OCw4Ljc0MDUwOTY3IEw2LjA1MTQyNzU2LDEwLjE3MjkyNCBMNi4wNTE0Mjc1NiwxMi40NTU5MDM4IEw3Ljk1NzU4MTM5LDEzLjU4MDczNzcgTDcuOTU3NTgxMzksOS4zNjEyMjI1NiBMMy4zMTIxOTY4LDYuNzg4NDI4NzMgWiBNMTEuNzU3MTk2Nyw1LjEwMDYyMjY5IEw4LjUzMTA0MjkxLDYuODg2MTQzODIgTDUuMTg4MzUwNjMsNS4xMDA2MjI2OSBMMy44Mjc5NjYwMyw1Ljk0Njc0NjUxIEw4LjUzOTExOTg0LDguNTI2MjAyNzIgTDEzLjI0OTExOTgsNS45NTAwNzc3MSBMMTEuNzU3MTk2Nyw1LjEwMDYyMjY5IFonIGlkPSflvaLnirYnPjwvcGF0aD48L2c+PC9nPjwvZz48L2c+PC9zdmc+"); -} diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/scrollspy.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/scrollspy.css deleted file mode 100644 index 0eaccce35b8abcc9c82e2c77be7b6585f41f47eb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/scrollspy.css +++ /dev/null @@ -1,197 +0,0 @@ -/*滚动监听样式*/ -.f-scrollspy .f-scrollspy-monitor-btn { - display: inline-block; - } - - .f-scrollspy-sidetabs { - display: flex; - flex-direction: row; - align-items: center; - position: absolute; - top: 0px; - right: 0; - z-index: 799; - overflow: hidden; - width: 1.75rem; - transition: width 0.5s; - } - - .f-scrollspy-sidetabs .f-scrollspy-sidetabs-inner { - transition: all 0.5s; - } - - .f-scrollspy-sidetabs:hover { - width: auto; - z-index: 801; - } - - .f-scrollspy-sidetabs:hover .f-scrollspy-sidetabs-inner { - transform: translateX(0) !important; - } - - .f-scrollspy-sidetabs:hover .f-scrollspy-monitor-tip { - border-radius: 0px; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn { - position: relative; - width: 100%; - height: 1.3125rem; - padding-left: 1.1875rem; - margin-bottom: 0.75rem; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn::before { - content: ""; - position: absolute; - left: 0; - top: 1rem; - height: 2rem; - width: 1px; - border-left: 1px dashed #e9e9e9; - background-color: transparent; - border-radius: 0.5px; - z-index: 8; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn:last-child { - margin-bottom: 0; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn:last-child::before { - display: none; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn::after { - content: ""; - position: absolute; - left: -0.4375rem; - top: 0.1875rem; - width: 0.9375rem; - height: 0.9375rem; - border-radius: 100%; - z-index: 9; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn .f-scrollspy-monitor-title { - display: inline-block; - font-size: 0.875rem; - color: rgba(0, 0, 0, 0.55); - line-height: 1.3125rem; - cursor: pointer; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-btn.active .f-scrollspy-monitor-title { - color: rgba(0, 0, 0, 0.65); - font-weight: 600; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-tip { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 1.75rem; - border-radius: 4px 0 0 4px; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-tip-inner { - position: relative; - width: 100%; - height: 100%; - padding-top: 0.625rem; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-tip-inner .f-scrollspy-monitor-tip-img { - position: absolute; - left: 0; - bottom: 0; - width: 1.75rem; - height: 2.9375rem; - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAABeCAYAAAB2K9dZAAAABGdBTUEAALGPC/xhBQAABC5JREFUeAHtm2tT1DAUhlnviooiIKDAAjri+NH//3tERERQRBTX99lpdnZLgZLTNOlOzsyZtKXJnidvm2uZGQwGs/JbM1Nqd8S1A5sgT5WcyH/Kj3q9HuedNwCdPdABPs8FAZ8pOZZ/xwX8T2nnbBywHPw9XXhR+LmAD3V8ID8W7EBpJ+wqwHGA2zpxsGeC3dP5vkDPx29K8binYD96BsYjuy/fE+hvzzKCZ6urYFUgtLxL8kVV0helnwT6t+rGmNcsgC7ung4AXRDortLPAk2mQWqy/6OsVfkHgc4pTcKaBHRAtL5vBLkpv+suxkpDADoW+lPUfOYuxEhDAsJD97ItyDV56N+qrL+2fpRG6J0g71dGEfBiW4AgPJK/F+STgDwXim4TkB/nkX0rSEZFrVjbgEDRb/YFSZcS3GIAOqgVQa65k1BpTECYlkJDxgZ0kOvTqqDjYsAe5J1MQUEHyTvZeOuaEiCgG4J86oibSFMDpAvZEmRjI57UABGNwQAzEWDNliIgULPy12Y6FZAqIGz0keaJc8qAQG4IkkfW21IHZEXglTedMqYOCBuDgMe+kF0AhG1dkF6talcAHwrSa5TTxLqo79Nz03yrUvGgzpqr7kO45/K5LgHS4LC2w+JypRVgC/rjsny4ZNklQKCWBcFeyMTKeQG2WIBNME2cUELiRp+IQuxuDU1wvJ9bcvY2L1hXGpnxwBnhDFtUpcDuyCvhyISCK3K2q38VqZKkjZnGvOCYVg13o6+KFkDGe27Mx84toPixPNV9+r5iq2XldxDpWaDF6XfY2PwmP5JPvNg674SVActB8zjQ5L6UA/lVzscJnbHrAB0IyrpHmQ8R2LruhKI+rSgv9nYBrCRt8wGEiP6I1rcvj77JqRguNV9AVyD9z6acJYYkzQoIFGWwx3Btn8TNbVsTgC5mBsLMvmmQkrEmAYFic7OR1bCmaqhpQOLifTStozQFRzkhACkXJRkgRLdQgIDx+QjvZVQLCQgYLav3ilgTNRMakBgZEJgWby2gbQC6UY8lTu+8bQASHI+pm3N6B+uTse5swqfsch6mXEyi68xCUJ2P+khdjHxdzPeo+B95LXOZa91svImnhUaHqVaVMa6le6EfvXSNpcgI5I/C+S+BS78hbxOQ2ABkPjmuIqtiLB7dZMBO3HRDOLBU2qH8grUNOK4ixwwGrHvyMFAOlbcrP5GPrK1GZvSDOiAQVOvLrXAqYmS8s+tyVB1ZDEB+c0NOQCEMNUfDxBiAIaDKZaLiELLtd7AcSMhzIE+nVUFXccvTDhhsPuhqMHqaFYwugTGArKCxAqNnzwpGl8AYQFbQWIHRs2cFo0tgDCAraKzA6NmzgtElMAaQFTRWYPTsWcHoEhgDyAoaKzB69qxgdAmMAWQFjRUYPXtWMLoExgCygsYKjJ596hX8D3/gzAAeM1fWAAAAAElFTkSuQmCC"); - background-size: 100%; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-tip-inner .f-icon { - display: block; - margin: 0 auto 0.625rem; - font-size: 0.875rem; - color: #fff; - } - - .f-scrollspy-sidetabs .f-scrollspy-monitor-tip-inner .f-scrollspy-monitor-tip-text { - display: block; - width: 0.75rem; - margin: 0 auto; - font-size: 0.875rem; - line-height: 1.25rem; - color: #fff; - text-align: center; - text-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); - word-wrap: break-word; - } - - .f-scrollspy-sidetabs .f-scrollspy-sidetabs-inner { - min-height: 115px; - background: #fff; - box-shadow: 0 2px 6px 0 rgba(57, 66, 100, 0.14); - border-radius: 4px 0 0 4px; - overflow: hidden; - } - - .f-scrollspy-sidetabs .f-scrollspy-sidetabs-inner .f-scrollspy-monitor-list { - padding: 0.75rem 3rem 0.875rem 1.25rem; - transition: all 0.5s; - } - - .f-scrollspy-tabs { - flex-shrink: 0; - background-color: #fff; - box-shadow: 0 1px 5px 0 rgba(0, 28, 64, 0.06); - border-radius: 2px; - padding: 0 0.125rem; - } - - .f-scrollspy-tabs .f-scrollspy-monitor-btn { - position: relative; - display: inline-flex; - height: 2.75rem; - line-height: 2.75rem; - padding: 0 0.875rem; - cursor: pointer; - min-width: 5.75rem; - white-space: nowrap; - justify-content: center; - } - - .f-scrollspy-tabs .f-scrollspy-monitor-btn .f-scrollspy-monitor-title { - white-space: nowrap; - font-size: 1rem; - color: #000; - opacity: 0.65; - } - - .f-scrollspy-tabs .f-scrollspy-monitor-btn::after { - content: ""; - position: absolute; - left: 50%; - margin-left: -0.625rem; - bottom: 0.3125rem; - width: 1.25rem; - height: 0.1875rem; - border-radius: 7.125rem; - } - - .f-scrollspy-tabs .f-scrollspy-monitor-btn.active .f-scrollspy-monitor-title { - color: #388FFF; - opacity: 1; - } - - .f-scrollspy-tabs .f-scrollspy-monitor-btn.active::after { - background-color: #388FFF; - } - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/table.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/table.css deleted file mode 100644 index 22211f0d7fd8a65c444d56fefd305a24238150a6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/table.css +++ /dev/null @@ -1,58 +0,0 @@ -.farris-component-Table.simpleTable .ide-cmp-table.table td.farris-group-wrap--label { - border-right-width: 0 !important; -} - -.farris-component-Table.simpleTable .ide-cmp-table.table td.farris-group-wrap--label .widget-panel { - display: none; -} - -.farris-component-Table.simpleTable .ide-cmp-table.table td.farris-group-wrap--input { - border-left-width: 0 !important; -} - -.farris-component-Table.simpleTable .f-table-has-form .farris-group-wrap--label.drag-over { - padding-top: 0; - padding-bottom: 0; -} - -/** 解决表格内复选框组、单选框组位置不居中的问题 */ -.f-table-has-form .farris-group-wrap--input .farris-input-wrap.farris-checkradio-hor { - align-items: center; -} - -/** 解决表格内复选框位置不居中的问题 */ -.f-table-has-form .farris-group-wrap--input .farris-component-CheckBox .farris-input-wrap>.custom-control.custom-checkbox { - height: 100%; - display: flex; - align-items: center; - padding: 0.75rem 1rem; -} - -/** 解决表格内标记组不居中的问题 */ -.f-table-has-form .farris-group-wrap--input .farris-component-Tags .farris-tags.ide-tags { - height: 100%; - display: flex; - align-items: center; - padding: 0.75rem 1rem; -} - -/** 解决表格内单元格控件不足时,扩展区域被换行展示的问题 */ -.f-table-has-form .farris-group-wrap--input .farris-input-wrap .f-cmp-inputgroup>.input-group { - flex-wrap: nowrap; -} - -/** 解决单元格内空间不足时,输入控件超出单元格的问题 */ -.ide-cmp-table.f-table-has-form .farris-group-wrap--input { - overflow: hidden; -} - - -/** 解决单元格内空间不足时,右下角操作按钮显示不全的问题 */ -.ide-cmp-table.f-table-has-form .farris-group-wrap--input.dgComponentSelected { - overflow: visible; -} - -/** 解决单元格内空间不足时,右下角操作按钮显示不全的问题 */ -.ide-cmp-table.f-table-has-form .farris-group-wrap--input.dgComponentSelected .farris-component { - overflow: hidden; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tabs.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tabs.css deleted file mode 100644 index daab5d5eedf8771384febd0188711531d146b7ef..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tabs.css +++ /dev/null @@ -1,87 +0,0 @@ -/*Tabs*/ -.ide-cmp-tabs .farris-tabs-header.farris-tabs-inHead .farris-tabs-title { - width: 41.6666667%; -} - -.ide-cmp-tabs .farris-tabs-header.farris-tabs-inHead .farris-tabs-toolbar { - flex: 1; - align-items: center; -} - -.ide-cmp-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .spacer.spacer-sides-dropdown { - margin: 0 60px 0 28px -} - -.ide-cmp-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .sc-nav-btn.dropdown { - right: 6px; -} - -.ide-cmp-tabs .margin-right-14 { - margin-right: 14px; -} - -.ide-cmp-tabs .farris-tabs-header-extend { - height: 44px; -} - -.ide-cmp-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .spacer .farris-nav-tabs .nav-item .nav-link .farris-title-text { - max-width: 112px; -} - -.ide-cmp-tabs .tabs-pt28 { - padding: 0; -} - -.ide-cmp-tabs .tab-dropdown-menu--items { - max-height: 200px; - overflow: auto; -} - -.ide-cmp-tabs .tabs-li-absolute { - padding: 4px; - margin: 0; - position: relative; -} - -.ide-cmp-tabs .tabs-icon-search { - position: absolute; - right: 4px; - top: 50%; - font-size: 14px; - padding: 0 4px; - width: auto; - height: 24px; - line-height: 1; - color: rgba(0, 0, 0, 0.25); - margin-top: -12px; - line-height: 20px; -} - -.ide-cmp-tabs .st-drop-close { - line-height: 1; -} - -.ide-cmp-tabs .dropdown-menu .dropdown-item .dropdown-title { - overflow: hidden; - display: inline-block; - padding: 0 5px; -} - -.ide-cmp-tabs .farris-tabs-header.farris-tabs-inHead .farris-tabs-inline-flex { - overflow: hidden; -} - -.ide-cmp-tabs .farris-tabs-btn-placeholder { - position: absolute; - display: inline-flex; - top: -30px; - left: 0; - opacity: 0; - z-index: -90; -} - -/*出现滚动条*/ -.ide-cmp-tabs .farris-tabs-header .farris-tabs-title.scroll-tabs .spacer .farris-nav-tabs, -.ide-cmp-tabs .farris-tabs-header.farris-tabs-inHead .farris-tabs-inline-flex { - overflow: auto; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tags.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tags.css deleted file mode 100644 index ac42af5c48721fdf03a43eefc0a4a9b5c0d37784..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/tags.css +++ /dev/null @@ -1,83 +0,0 @@ -/*Tags*/ -.ide-tags .farris-tags-item-container .farris-tag-item { - display: inline-block; - padding: 0 8px; - margin: 0 10px 0 0; - line-height: 24px; - font-size: 13px; - border-width: 1px; - border-style: solid; - white-space: nowrap; - border-radius: 3px; - cursor: default; - opacity: 1; - transition: 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); -} - -.ide-tags .farris-tags-item-container .farris-tag-item>a:first-child:last-child { - display: inline-block; - margin: 0 -8px; - padding: 0 8px; -} - -.ide-tags .farris-tags-item-container .farris-tag-item .tag-delete { - display: inline-block; - font-size: 10px; - margin-left: 6px; - cursor: pointer; - transition: 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); -} - -.ide-tags .farris-tags-item-container .farris-tag-item>.f-icon { - font-size: 12px; -} - -.ide-tags .farris-tags-item-container .farris-tag-item>.f-icon+span, -.ide-tags .farris-tags-item-container .farris-tag-item>span+.f-icon { - margin-left: 7px; -} - -.ide-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked) { - background-color: transparent; - border-color: transparent; - cursor: pointer; -} - -.ide-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkdisabled { - background-color: transparent; - border-color: transparent; - cursor: not-allowed; - color: rgba(0, 0, 0, 0.45); -} - -.ide-tags .farris-tags-item-container .farris-tag-item:last-child { - margin-right: 0; - border-width: 1px; - border-style: dashed; -} - -.ide-tags .farris-tags-item-container .farris-tag-add-button { - cursor: pointer; -} - -.ide-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled { - border-style: solid; - cursor: not-allowed; -} - -.ide-tags .farris-tags-item-container .farris-tag-input-box { - display: inline-block; -} - -.ide-tags .farris-tags-item-container .farris-tag-input-box .form-control { - height: 24px; - width: 100px; -} - -.ide-tags .farris-tags-item-container .farris-tag-input-box .form-control:focus { - box-shadow: none; -} - -.farris-tags.farris-tags-checkable .farris-tag-item { - line-height: 22px; -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/wizard.css b/packages/designer/projects/form-designer/src/assets/farris-design-control/style/wizard.css deleted file mode 100644 index 77815468146bcbef42a894bb64811b9ac7a4cb18..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/farris-design-control/style/wizard.css +++ /dev/null @@ -1,111 +0,0 @@ -/*向导组件*/ -.f-component-wizard { - display: flex; - flex-direction: column; - min-height: 100px; - } - - .f-component-wizard.f-component-wizard-fill { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - height: 100%; - } - - .f-component-wizard.f-component-wizard-fill .f-wizard { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - display: flex; - flex-direction: column; - overflow-y: hidden; - } - - .f-component-wizard.f-component-wizard-fill .f-wizard .f-wizard-header { - flex-shrink: 0; - } - - .f-component-wizard.f-component-wizard-fill .f-wizard .f-wizard-content { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - display: flex; - flex-direction: column; - overflow: hidden; - } - - .f-component-wizard.f-component-wizard-fill .f-wizard .f-wizard-content .f-wizard-pages { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - display: flex; - flex-direction: column; - overflow: hidden; - } - - .f-component-wizard .f-wizard { - position: relative; - } - - .f-component-wizard .f-wizard.f-component-wizard-step-pageleft .f-wizard-content { - flex-direction: row; - } - - .f-component-wizard .f-wizard.f-component-wizard-step-pageleft .f-wizard-step { - min-width: 165px; - padding: 18px 24px; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1); - overflow: auto; - } - - .f-component-wizard .f-wizard.f-component-wizard-step-headerright .f-wizard-header { - display: flex; - flex-direction: row; - align-items: center; - } - - .f-component-wizard .f-wizard.f-component-wizard-step-headerright .f-wizard-header .f-wizard-step { - flex: 1 1 auto; - text-align: right; - } - - .f-component-wizard .f-component-wizard-page { - display: none; - flex-direction: column; - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - position: relative; - } - - .f-component-wizard .f-component-wizard-page.active { - display: flex; - } - - .f-component-wizard .f-component-wizard-page-detail-fill { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - display: flex; - flex-direction: column; - } - - .f-component-wizard .f-component-wizard-page-detail-fill .f-component-wizard-page-detail-headeer, - .f-component-wizard .f-component-wizard-page-detail-fill .f-component-wizard-page-detail-footer { - flex-shrink: 0; - } - - .f-component-wizard .f-component-wizard-page-detail-fill .f-component-wizard-page-detail-content { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 0; - overflow: auto; - } - - .f-component-wizard .f-component-wizard-page-detail-fill .f-component-wizard-page-detail-footer { - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-end; - } - \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/component-template/component-templates.json b/packages/designer/projects/form-designer/src/assets/form/component-template/component-templates.json deleted file mode 100644 index 14a7e5a9f37a2fa30fd11ba0e4521895e5809cac..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/component-template/component-templates.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "table-fill-in-component", - "title": "表格类填报模板", - "domJson": "assets/form/component-template/templates/table-fillin-component.json", - "image": "assets/form/component-template/images/table-fillin-form.png" - }, - { - "id": "table-batch-fill-in-component", - "title": "表格类批量填报模板", - "domJson": "assets/form/component-template/templates/table-batch-fillin-component.json", - "image": "assets/form/component-template/images/table-batch-fillin-form.png" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-batch-fillin-form.png b/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-batch-fillin-form.png deleted file mode 100644 index ff48543165ec45cd4da17f815891fdf74d742591..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-batch-fillin-form.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-fillin-form.png b/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-fillin-form.png deleted file mode 100644 index b302bb0fd10e0303bcc6665f1f0423facd450079..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/component-template/images/table-fillin-form.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-batch-fillin-component.json b/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-batch-fillin-component.json deleted file mode 100644 index b551b2aa1065893a349f598d70f1c747e28c423a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-batch-fillin-component.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "id": "table-batch-fill-in-component", - "title": "表格类批量填报模板", - "contents": [ - { - "id": "page-header", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-extend" - }, - "size": null, - "contents": [ - { - "id": "header-title-container", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-header d-block" - }, - "size": null, - "contents": [ - { - "id": "page-header-title", - "type": "HtmlTemplate", - "html": "

    ${title}

    \r\n" - }, - { - "id": "page-header-extend", - "type": "HtmlTemplate", - "html": "

    (默认信息来源于HR系统,如需修改请联系HR管理员)

    " - } - ] - } - ] - }, - { - "id": "main-container", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-overflow" - }, - "size": null, - "contents": [ - { - "id": "like-card-container", - "type": "ContentContainer", - "appearance": { - "class": "f-struct-like-card" - }, - "size": null, - "contents": [ - { - "id": "basic-form-component-ref", - "type": "ComponentRef", - "component": "basic-form-component" - }, - { - "id": "footer-container", - "type": "ContentContainer", - "appearance": { - "class": "f-subgrid-by-table-footer text-center d-block" - }, - "contents": [ - { - "id": "add-btn", - "type": "Button", - "appearance": { - "class": "btn btn-icontext" - }, - "text": "新增", - "disable": "viewModel.stateMachine && !viewModel.stateMachine['canAddDetail']", - "dataSourceType": "static", - "usageMode": "button" - } - ] - } - ], - "visible": true, - "draggable": false, - "isLikeCardContainer": true, - "isScrollspyContainer": false - } - ] - } - ], - "components": [ - { - "id": "basic-form-component", - "type": "Component", - "viewModel": "basic-form-viewmodel", - "componentType": "table", - "appearance": { - "class": "f-struct-wrapper" - }, - "onInit": "", - "contents": [ - { - "id": "loop-container", - "type": "LoopContainer", - "contents": [ - { - "id": "basic-form-section", - "type": "Section", - "appearance": { - "class": "f-section-oa-table f-section-in-mainsubcard d-block" - }, - "visible": true, - "mainTitle": "基本信息", - "subTitle": "", - "headerClass": "", - "titleClass": "", - "extendedHeaderAreaClass": "", - "toolbarClass": "", - "extendedAreaClass": "", - "contentTemplateClass": "", - "fill": false, - "expanded": true, - "enableMaximize": false, - "enableAccordion": false, - "accordionMode": "default", - "showHeader": true, - "headerTemplate": "", - "titleTemplate": "", - "extendedHeaderAreaTemplate": "", - "toolbarTemplate": "", - "extendedAreaTemplate": "", - "contents": [ - { - "id": "table-layout", - "type": "ContentContainer", - "appearance": { - "class": "f-form-layout farris-form f-form-is-table" - }, - "size": null, - "contents": [ - { - "id": "basic-table", - "type": "Table", - "appearance": { - "class": "table table-bordered f-table-has-form" - }, - "size": null, - "border": { - "width": 1, - "enableColor": false, - "color": "#eaecf3" - }, - "font": { - "size": 13, - "enableColor": false, - "color": "#2d2f33", - "family": "sans-serif" - }, - "rows": [] - } - ] - } - ], - "toolbar": { - "type": "SectionToolbar", - "position": "inHead", - "contents": [ - { - "id": "toolBarItem_delete", - "type": "SectionToolbarItem", - "title": "删除", - "disable": "viewModel.stateMachine && !viewModel.stateMachine['canAddDetail']", - "appearance": { - "class": "btn btn-secondary f-btn-ml" - }, - "visible": true, - "click": null - } - ] - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-fillin-component.json b/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-fillin-component.json deleted file mode 100644 index 2cc27623d208bae65be4f1d7deca666c09b93900..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/component-template/templates/table-fillin-component.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "id": "table-fill-in-component", - "title": "表格类填报模板", - "contents": [ - { - "id": "page-header", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-extend" - }, - "size": null, - "contents": [ - { - "id": "header-title-container", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-header d-block" - }, - "size": null, - "contents": [ - { - "id": "page-header-title", - "type": "HtmlTemplate", - "html": "

    ${title}

    \r\n" - }, - { - "id": "page-header-extend", - "type": "HtmlTemplate", - "html": "

    (默认信息来源于HR系统,如需修改请联系HR管理员)

    " - } - ] - } - ] - }, - { - "id": "main-container", - "type": "ContentContainer", - "appearance": { - "class": "f-page-content-main-overflow d-block" - }, - "size": null, - "contents": [ - { - "id": "like-card-container", - "type": "ContentContainer", - "appearance": { - "class": "f-struct-like-card" - }, - "size": null, - "contents": [ - { - "id": "basic-form-component-ref", - "type": "ComponentRef", - "component": "basic-form-component" - } - ], - "visible": true, - "draggable": false, - "isLikeCardContainer": true, - "isScrollspyContainer": false - } - ] - } - ], - "components": [ - { - "id": "basic-form-component", - "type": "Component", - "viewModel": "basic-form-viewmodel", - "componentType": "table", - "appearance": { - "class": "f-struct-wrapper" - }, - "onInit": "", - "contents": [ - { - "id": "basic-form-section", - "type": "Section", - "appearance": { - "class": "f-section-oa-table f-section-in-mainsubcard" - }, - "visible": true, - "mainTitle": "基本信息", - "subTitle": "", - "headerClass": "", - "titleClass": "", - "extendedHeaderAreaClass": "", - "toolbarClass": "", - "extendedAreaClass": "", - "contentTemplateClass": "", - "fill": false, - "expanded": true, - "enableMaximize": false, - "enableAccordion": false, - "accordionMode": "default", - "showHeader": false, - "headerTemplate": "", - "titleTemplate": "", - "extendedHeaderAreaTemplate": "", - "toolbarTemplate": "", - "extendedAreaTemplate": "", - "contents": [ - { - "id": "table-layout", - "type": "Form", - "appearance": { - "class": "f-form-layout farris-form f-form-is-table" - }, - "size": null, - "contents": [ - { - "id": "basic-table", - "type": "Table", - "appearance": { - "class": "table table-bordered f-table-has-form" - }, - "size": null, - "border": { - "width": 1, - "enableColor": false, - "color": "#eaecf3" - }, - "font": { - "size": 13, - "enableColor": false, - "color": "#2d2f33", - "family": "sans-serif" - }, - "rows": [] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/controlList.json b/packages/designer/projects/form-designer/src/assets/form/controlList.json deleted file mode 100644 index 222f2125b9b7699cb94ae2ff574e09f3ac4a3ec6..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/controlList.json +++ /dev/null @@ -1,330 +0,0 @@ -[ - { - "type": "input", - "name": "输入类控件", - "items": [ - { - "id": "TextBox", - "type": "TextBox", - "name": "文本", - "category": "input" - }, - { - "id": "MultiTextBox", - "type": "MultiTextBox", - "name": "多行文本", - "category": "input" - }, - { - "id": "DateBox", - "type": "DateBox", - "name": "日期", - "category": "input" - }, - { - "id": "TimePicker", - "type": "TimePicker", - "name": "时间选择", - "category": "input" - }, - { - "id": "EnumField", - "type": "EnumField", - "name": "下拉列表", - "category": "input" - }, - { - "id": "NumericBox", - "type": "NumericBox", - "name": "数值", - "category": "input" - }, - { - "id": "CheckBox", - "type": "CheckBox", - "name": "复选框", - "category": "input" - }, - { - "id": "CheckGroup", - "type": "CheckGroup", - "name": "复选框组", - "category": "input" - }, - { - "id": "RadioGroup", - "type": "RadioGroup", - "name": "单选组", - "category": "input" - }, - { - "id": "SwitchField", - "type": "SwitchField", - "name": "开关", - "category": "input" - }, - { - "id": "Image", - "type": "Image", - "name": "图像", - "category": "input" - }, - { - "id": "LookupEdit", - "type": "LookupEdit", - "name": "帮助", - "category": "input" - }, - { - "id": "RichTextBox", - "type": "RichTextBox", - "name": "富文本", - "category": "input" - }, - { - "id": "InputGroup", - "type": "InputGroup", - "name": "智能输入框", - "category": "input" - }, - { - "id": "LanguageTextBox", - "type": "LanguageTextBox", - "name": "多语言输入框", - "category": "input" - }, - { - "id": "Tags", - "type": "Tags", - "name": "标记组", - "category": "input" - } - ] - }, - { - "type": "dataCollection", - "name": "数据集合类控件", - "items": [ - { - "id": "Form", - "type": "Form", - "name": "卡片面板", - "category": "dataCollection" - }, - { - "id": "DataGrid", - "type": "DataGrid", - "name": "表格", - "category": "dataCollection" - }, - { - "id": "TreeGrid", - "type": "TreeGrid", - "name": "树表格", - "category": "dataCollection" - }, - { - "id": "ListView", - "type": "ListView", - "name": "列表", - "category": "dataCollection" - } - ] - }, - { - "type": "command", - "name": "命令类控件", - "items": [ - { - "id": "Button", - "type": "Button", - "name": "按钮", - "category": "command" - }, - { - "id": "NavTab", - "type": "NavTab", - "name": "标签类导航", - "category": "command" - } - ] - }, - { - "type": "container", - "name": "容器类控件", - "items": [ - { - "id": "Tab", - "type": "Tab", - "name": "标签页区域", - "category": "container" - }, - { - "id": "HtmlTemplate", - "type": "HtmlTemplate", - "name": "模版容器", - "category": "container" - }, - { - "id": "ContentContainer", - "type": "ContentContainer", - "name": "容器", - "category": "container" - }, - { - "id": "Section", - "type": "Section", - "name": "分组面板", - "category": "container" - }, - { - "id": "FieldSet", - "type": "FieldSet", - "name": "分组", - "category": "container" - }, - { - "id": "ExternalContainer", - "type": "ExternalContainer", - "name": "外部容器", - "category": "container", - "icon": "ContentContainer" - }, - { - "id": "ModalContainer", - "type": "ModalContainer", - "name": "弹窗容器", - "category": "container", - "icon": "ContentContainer" - }, - { - "id": "ListNav", - "type": "ListNav", - "name": "列表导航", - "category": "container" - }, - { - "id": "Header", - "type": "Header", - "name": "页头", - "category": "container" - }, - { - "id": "ModalFooter", - "type": "ModalFooter", - "name": "弹窗页脚", - "category": "container" - } - ] - }, - { - "type": "business", - "name": "业务类控件", - "items": [ - { - "id": "Avatar", - "type": "Avatar", - "name": "头像", - "category": "input" - }, - { - "id": "PersonnelSelector", - "type": "PersonnelSelector", - "name": "人员选择", - "category": "input" - }, - { - "id": "OrganizationSelector", - "type": "OrganizationSelector", - "name": "组织选择", - "category": "input" - }, - { - "id": "FileUploadPreview", - "type": "FileUploadPreview", - "name": "附件上传预览", - "category": "dataCollection", - "icon": "FileUpload" - }, - { - "id": "DiscussionEditor", - "type": "DiscussionEditor", - "name": "评论编辑区", - "category": "discussion", - "icon": "DiscussionEditor" - }, - { - "id": "DiscussionList", - "type": "DiscussionList", - "name": "评论列表", - "category": "discussion", - "icon": "DiscussionList" - }, - { - "id": "Steps", - "type": "Steps", - "name": "步骤条", - "category": "commands", - "icon": "Steps" - }, - { - "id": "Wizard", - "type": "Wizard", - "name": "向导", - "category": "container" - }, - { - "id": "MultiSelect", - "type": "MultiSelect", - "name": "数据分配", - "category": "container" - } - ] - }, - { - "type": "response-layout", - "name": "布局容器", - "items": [ - { - "id": "ResponseLayout2", - "type": "ResponseLayout", - "name": "1列", - "category": "container", - "feature": { - "splitter": "12" - }, - "icon": "ResponseLayout1" - }, - { - "id": "ResponseLayout2", - "type": "ResponseLayout", - "name": "2列", - "category": "container", - "feature": { - "splitter": "6:6" - }, - "icon": "ResponseLayout2" - }, - { - "id": "ResponseLayout3", - "type": "ResponseLayout", - "name": "3列", - "category": "container", - "feature": { - "splitter": "4:4:4" - }, - "icon": "ResponseLayout3" - }, - { - "id": "ResponseLayout4", - "type": "ResponseLayout", - "name": "4列", - "category": "container", - "feature": { - "splitter": "3:3:3:3" - }, - "icon": "ResponseLayout4" - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/icon.json b/packages/designer/projects/form-designer/src/assets/form/icon.json deleted file mode 100644 index 97bebe3b31e6bbf5b9962869d7578d270f4f18fa..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/icon.json +++ /dev/null @@ -1,628 +0,0 @@ -[ - "arrow-45-up-right|collapse-ne|resize-ne", - "arrow-45-down-right|collapse-se|collapse|resize-se", - "arrow-45-down-left|collapse-sw|resize-sw", - "arrow-45-up-left|collapse-nw|resize-new", - "arrow-60-up|arrow-n|kpi-trend-increase", - "arrow-60-right|arrow-e|expand", - "arrow-60-down|arrow-s|kpi-trend-decrease", - "arrow-60-left|arrow-w", - "arrow-end-up|seek-n", - "arrow-end-right|seek-e", - "arrow-end-down|seek-s", - "arrow-end-left|seek-w", - "arrow-double-60-up|arrow-seek-up", - "arrow-double-60-right|arrow-seek-right|forward-sm", - "arrow-double-60-down|arrow-seek-down", - "arrow-double-60-left|arrow-seek-left|rewind-sm", - "arrows-kpi|kpi", - "arrows-no-change", - "arrow-overflow-down", - "arrow-chevron-up", - "arrow-chevron-right", - "arrow-chevron-down", - "arrow-chevron-left", - "arrow-up", - "arrow-right", - "arrow-down", - "arrow-left", - "arrow-drill", - "arrow-parent", - "arrow-root", - "arrows-resizing", - "arrows-dimensions", - "arrows-swap", - "drag-and-drop", - "categorize", - "grid", - "grid-layout", - "group", - "ungroup", - "handler-drag", - "layout", - "layout-1-by-4", - "layout-2-by-2", - "layout-side-by-side", - "layout-stacked", - "columns", - "rows", - "reorder", - "menu", - "more-vertical", - "more-horizontal", - "undo", - "redo", - "reset", - "reload|refresh|recurrence", - "non-recurrence", - "reset-sm", - "reload-sm|refresh-sm|recurrence-sm", - "clock", - "calendar", - "save|floppy", - "print|printer", - "edit|pencil", - "delete|trash", - "attachment|clip", - "attachment-45|clip-45", - "link-horizontal|hyperlink", - "unlink-horizontal|hyperlink-remove", - "link-vertical", - "unlink-vertical", - "lock", - "unlock", - "cancel", - "cancel-outline", - "cancel-circle", - "check|checkmark", - "check-outline|checkmark-outline|success", - "check-circle|checkmark-circle", - "close|x", - "close-outline|x-outline|error", - "close-circle|x-circle", - "plus|add", - "plus-outline", - "plus-circle", - "minus|kpi-trend-equal", - "minus-outline", - "minus-circle", - "sort-asc", - "sort-desc", - "unsort|sort-clear", - "sort-asc-sm", - "sort-desc-sm", - "filter", - "filter-clear", - "filter-sm", - "filter-sort-asc-sm", - "filter-sort-desc-sm", - "filter-add-expression", - "filter-add-group", - "login", - "logout", - "download", - "upload", - "hyperlink-open", - "hyperlink-open-sm", - "launch", - "window|window-maximize", - "windows|window-restore|tiles", - "window-minimize", - "gear|cog|custom", - "gears|cogs", - "wrench|settings", - "preview|eye", - "zoom|search", - "zoom-in", - "zoom-out", - "pan|move", - "calculator", - "cart|shopping-cart", - "connector", - "plus-sm", - "minus-sm", - "kpi-status-deny", - "kpi-status-hold", - "kpi-status-open", - "play", - "pause", - "stop", - "rewind", - "forward", - "volume-down", - "volume-up", - "volume-off", - "hd", - "subtitles", - "playlist", - "audio", - "play-sm", - "pause-sm", - "stop-sm", - "heart-outline|fav-outline|favorite-outline", - "heart|fav|favorite", - "star-outline|bookmark-outline", - "star|bookmark", - "checkbox|shape-rect", - "checkbox-checked", - "tri-state-indeterminate", - "tri-state-null", - "circle", - "radiobutton|shape-circle", - "radiobutton-checked", - "photo-camera", - "image|photo", - "image-export|photo-export", - "zoom-actual-size", - "zoom-best-fit", - "image-resize", - "crop", - "mirror", - "flip-horizontal", - "flip-vertical", - "rotate", - "rotate-right", - "rotate-left", - "brush", - "palette", - "paint|droplet|background", - "line|shape-line", - "brightness-contrast", - "saturation", - "invert-colors", - "transperancy|opacity", - "greyscale", - "blur", - "sharpen", - "shape", - "round-corners", - "front-element", - "back-element", - "forward-element", - "backward-element", - "align-left-element", - "align-center-element", - "align-right-element", - "align-top-element", - "align-middle-element", - "align-bottom-element", - "thumbnails-up", - "thumbnails-right", - "thumbnails-down", - "thumbnails-left", - "full-screen|fullscreen", - "full-screen-exit|fullscreen-exit", - "reset-color|paint-remove|background-remove", - "page-properties", - "bold", - "italic", - "underline", - "font-family", - "foreground-color", - "convert-lowercase", - "convert-uppercase", - "strikethrough", - "sub-script", - "sup-script", - "div", - "all", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "list-ordered|list-numbered", - "list-unordered|list-bulleted", - "indent-increase|indent", - "indent-decrease|outdent", - "insert-up|insert-top", - "insert-middle", - "insert-down|insert-bottom", - "align-top", - "align-middle", - "align-bottom", - "align-left", - "align-center", - "align-right", - "align-justify", - "align-remove", - "text-wrap", - "rule-horizontal", - "table-align-top-left", - "table-align-top-center", - "table-align-top-right", - "table-align-middle-left", - "table-align-middle-center", - "table-align-middle-right", - "table-align-bottom-left", - "table-align-bottom-center", - "table-align-bottom-right", - "table-align-remove", - "borders-all", - "borders-outside", - "borders-inside", - "borders-inside-horizontal", - "borders-inside-vertical", - "border-top", - "border-bottom", - "border-left", - "border-right", - "border-no", - "borders-show-hide", - "form|border", - "form-element", - "code-snippet", - "select-all", - "button", - "select-box", - "calendar-date", - "group-box", - "textarea", - "textbox", - "textbox-hidden", - "password", - "paragraph-add", - "edit-tools", - "template-manager", - "change-manually", - "track-changes", - "track-changes-enable", - "track-changes-accept", - "track-changes-accept-all", - "track-changes-reject", - "track-changes-reject-all", - "document-manager", - "custom-icon", - "dictionary-add", - "image-light-dialog|image-insert", - "image-edit", - "image-map-editor", - "comment", - "comment-remove", - "comments-remove-all", - "silverlight", - "media-manager", - "video-external", - "flash-manager", - "find-and-replace|find", - "copy|files", - "cut", - "paste", - "paste-as-html", - "paste-from-word", - "paste-from-word-strip-file", - "paste-html", - "paste-markdown", - "paste-plain-text", - "apply-format", - "clear-css", - "copy-format", - "strip-all-formating", - "strip-css-format", - "strip-font-elements", - "strip-span-elements", - "strip-word-formatting", - "format-code-block", - "style-builder", - "module-manager", - "hyperlink-light-dialog|hyperlink-insert", - "hyperlink-globe", - "hyperlink-globe-remove", - "hyperlink-email", - "anchor", - "table-light-dialog|table-insert", - "table", - "table-properties|table-wizard", - "table-cell", - "table-cell-properties", - "table-column-insert-left", - "table-column-insert-right", - "table-row-insert-above", - "table-row-insert-below", - "table-column-delete", - "table-row-delete", - "table-cell-delete", - "table-delete", - "cells-merge", - "cells-merge-horizontally", - "cells-merge-vertically", - "cell-split-horizontally", - "cell-split-vertically", - "table-unmerge", - "pane-freeze", - "row-freeze", - "column-freeze", - "toolbar-float", - "spell-checker", - "validation-xhtml", - "validation-data", - "toggle-full-screen-mode", - "formula-fx", - "sum", - "symbol", - "dollar|currency", - "percent", - "custom-format", - "decimal-increase", - "decimal-decrease", - "font-size", - "image-absolute-position", - "globe-outline", - "globe", - "marker-pin", - "marker-pin-target", - "pin", - "unpin", - "share", - "user", - "inbox", - "blogger", - "blogger-box", - "delicious", - "delicious-box", - "digg", - "digg-box", - "email|envelop|letter", - "email-box|envelop-box|letter-box", - "facebook", - "facebook-box", - "google", - "google-box", - "google-plus", - "google-plus-box", - "linkedin", - "linkedin-box", - "myspace", - "myspace-box", - "pinterest", - "pinterest-box", - "reddit", - "reddit-box", - "stumble-upon", - "stumble-upon-box", - "tell-a-friend", - "tell-a-friend-box", - "tumblr", - "tumblr-box", - "twitter", - "twitter-box", - "yammer", - "yammer-box", - "behance", - "behance-box", - "dribbble", - "dribbble-box", - "rss", - "rss-box", - "vimeo", - "vimeo-box", - "youtube", - "youtube-box", - "folder", - "folder-open", - "folder-add", - "folder-up", - "folder-more|fields-more", - "aggregate-fields", - "file|file-vertical|page-portrait", - "file-add", - "file-txt|txt", - "file-csv|csv", - "file-excel|file-xls|excel|xls", - "file-word|file-doc|word|doc", - "file-mdb|mdb", - "file-ppt|ppt", - "file-pdf|pdf", - "file-psd|psd", - "file-flash|flash", - "file-config|config", - "file-ascx|ascx", - "file-bac|bac", - "file-zip|zip", - "film", - "css3", - "html5", - "html|source-code|view-source", - "css", - "js", - "exe", - "csproj", - "vbproj", - "cs", - "vb", - "sln", - "cloud", - "file-horizontal|page-landscape", - "message_help", - "message_routine", - "message_warning", - "steps-transport", - "steps-settlement", - "steps-outofstock", - "steps-invoice", - "steps-receivables", - "steps-delivergoods", - "exhale-discount", - "previouspage", - "nextpage", - "table_urgent", - "top_home", - "top_menu", - "top_agency", - "top_news", - "top_im_default", - "top_developmenttool", - "top_search", - "top_my", - "home-man", - "home-woman", - "home-setup", - "home-add", - "home-ring", - "home-operation", - "home-more", - "home-weather-leaf", - "engineering", - "git", - "panel-retraction", - "edit-button", - "input-language", - "attribute-configuration", - "roofing", - "page-title-define", - "page-title-administer", - "page-title-configuration", - "page-title-dictionary", - "page-title-maintenance", - "page-title-query", - "page-title-number", - "page-title-manage", - "page-title-review", - "page-title-start", - "page-title-type", - "page-title-record", - "page-title-voucher", - "page-title-task", - "new-fullscreen", - "filtrate", - "document-information", - "attachment-list", - "product-list", - "new-function", - "telephone", - "list", - "more", - "record", - "man", - "woman", - "new-form", - "new-edit", - "file-folder-close", - "file-folder-open", - "new-dimension", - "maximization", - "minimize", - "basic", - "language", - "password", - "area", - "skin", - "editor", - "counterclockwise", - "clockwise", - "amplification", - "narrow", - "camera", - "packup", - "remove", - "user_center", - "sign_out", - "yxs_customize", - "yxs_earth", - "yxs_level", - "yxs_delete", - "yxs_copy", - "yxs_move", - "index", - "index-face", - "search", - "maximize", - "message", - "backlog", - "information", - "launchpad", - "launchpad-face", - "occlude", - "occlude-face", - "ide", - "collection", - "shoucangjia", - "list1", - "tiled", - "sudoku", - "tenant", - "radio-2", - "qiehuanzuzhi", - "tiled-new", - "list-new", - "sudoku-new", - "danger", - "default", - "date", - "navigation", - "dropdown", - "launchpad2", - "launchpad-face2", - "col-filteranddescending", - "col-filterandascending", - "col-defaultfilterandsort", - "col-filter", - "col-descending", - "col-ascending", - "col-defaultsort", - "runtime", - "page-first", - "page-last", - "flag_urgent", - "orientation-arrow", - "flowline-scheduled", - "flowline-scheduled", - "flowline-canceled", - "flowline-pending", - "flowline-run", - "flowline-created", - "flowline-running", - "flowline-waiting", - "flowline-skipped", - "flowline-view", - "flowline-warning", - "flowline-more", - "flowline-manual", - "path", - "code", - "department", - "info-circle", - "help-01", - "statement", - "address-location", - "task-record", - "visit", - "relationship", - "truck-delivery", - "concat-list", - "payment-notice", - "application-for-invoicing", - "accomplishment", - "potential", - "aim", - "declaration-form", - "licensed", - "profile-picture", - "forecast-of-completion", - "team", - "remove_face", - "table_view", - "card_view", - "list_view", - "form_view", - "chart_view", - "perspective_view", - "drop-down_line", - "more_line", - "calendars_line1", - "upload_big", - "enclosure_browse", - "enclosure_upload", - "enclosure_download", - "enclosure_delete", - "message_round", - "col-descendingorder", - "col-ascendingorder", - "feedback", - "signature", - "indep-password", - "honor", - "view-cardview", - "edit-cardview" -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/appointment-calendar-template.json b/packages/designer/projects/form-designer/src/assets/form/preset-template/appointment-calendar-template.json deleted file mode 100644 index b60fac58bce4c4ad441644c25a07ca785f88e4a0..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/preset-template/appointment-calendar-template.json +++ /dev/null @@ -1,145 +0,0 @@ -[ - { - "id": "appointment-calendar-place01", - "title": "地点展示模板", - "templatePic": "assets/form/preset-template/preview/appointment-calendar/appointment-calendar-place01.png", - "templateHtml": "
    \r\n\t
    \r\n\t\t\r\n\t\t\r\n\t\t
    ${name:value}
    \r\n\t\t\r\n\t\t\r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t ${accommodate:value}人\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t ${remark:value}\r\n\t\t\t\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n
    ", - "presetsTemplateFragements": [ - { - "id": "name", - "name": "地点名称", - "category": "name", - "content": "\r\n
    ${preset:value}
    \r\n\r\n" - }, - { - "id": "accommodate", - "name": "容纳人数", - "category": "accommodate", - "content": "\r\n ${preset:value}人 " - }, - { - "id": "remark", - "name": "描述", - "category": "remark", - "content": "\r\n ${preset:value}\r\n\r\n" - } - ], - "presetFields": [ - { - "id": "name", - "name": "地点名称", - "presetType": "name", - "category": "name" - }, - { - "id": "accommodate", - "name": "容纳人数", - "presetType": "accommodate", - "category": "accommodate" - }, - { - "id": "remark", - "name": "描述", - "presetType": "remark", - "category": "remark" - } - ], - "customClass": "" - }, - { - "id": "appointment-calendar-content01", - "title": "预定信息模板", - "templatePic": "assets/form/preset-template/preview/appointment-calendar/appointment-calendar-content01.png", - "templateHtml": "
    \r\n\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t${title:value}\r\n\t\t\t\r\n\t\t
    \r\n\t\t
    \r\n\t\t\t\r\n\t\t\t${department:value} \r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t~\r\n\t\t\t\r\n\t\t
    \r\n\t
    \r\n
    ", - "presetsTemplateFragements": [ - { - "id": "badge", - "name": "徽章", - "category": "badge", - "content": "\r\n${preset:items}\r\n", - "contentItem": "${preset:enumText}\r\n" - }, - { - "id": "title", - "name": "主题名称", - "category": "title", - "content": "\r\n ${title:value}\r\n\r\n" - }, - { - "id": "department", - "name": "部门", - "category": "department", - "content": "\r\n ${department:value} " - }, - { - "id": "startDate", - "name": "开始时间", - "category": "startDate", - "content": "\r\n{{${startDate:value}|dateformat: 'HH:mm'}}\r\n\r\n" - }, - { - "id": "endDate", - "name": "结束时间", - "category": "endDate", - "content": "\r\n{{${endDate:value}|dateformat: 'HH:mm'}}\r\n\r\n" - } - ], - "presetFields": [ - { - "id": "badge-status", - "name": "徽章", - "presetType": "badge", - "category": "badge" - }, - { - "id": "title", - "name": "主题名称", - "presetType": "title", - "category": "title" - }, - { - "id": "department", - "name": "部门", - "presetType": "department", - "category": "department" - }, - { - "id": "startDate", - "name": "开始时间", - "presetType": "startDate", - "category": "startDate" - }, - { - "id": "endDate", - "name": "结束时间", - "presetType": "endDate", - "category": "endDate" - } - ], - "customClass": "" - }, - { - "id": "appointment-calendar-badge01", - "title": "预定徽章模板", - "templatePic": "assets/form/preset-template/preview/appointment-calendar/appointment-calendar-badge01.png", - "templateHtml": "\r\n", - "presetsTemplateFragements": [ - { - "id": "badge", - "name": "徽章", - "category": "badge", - "content": "\r\n${preset:items}\r\n", - "contentItem": "${preset:enumText}\r\n" - } - ], - "presetFields": [ - { - "id": "badge-status", - "name": "徽章", - "presetType": "badge", - "category": "badge" - } - ], - "customClass": "" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/listview-template.json b/packages/designer/projects/form-designer/src/assets/form/preset-template/listview-template.json deleted file mode 100644 index cf4ec91e0a9f0e7cfea3a67535614dbb4c2fa51b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/preset-template/listview-template.json +++ /dev/null @@ -1,252 +0,0 @@ -[ - { - "id": "listview-card01", - "title": "卡片模板", - "templatePic": "assets/form/preset-template/preview/listview-card01.png", - "templateHtml": "
    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n\r\n\r\n
    \r\n\r\n\r\n
    \r\n
    \r\n
    ", - "presetsTemplateFragements": [ - { - "id": "title", - "name": "标题", - "category": "title", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "sub-title", - "name": "副标题", - "category": "sub-title", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "text", - "name": "文本字段", - "category": "content", - "content": "\r\n

    ${preset:label}:${preset:value}

    \r\n\r\n" - }, - { - "id": "total", - "name": "合计金额", - "category": "emphasize", - "content": "\r\n${preset:value}\r\n\r\n" - }, - { - "id": "status", - "name": "状态字段", - "category": "content", - "content": "\r\n

    ${preset:label}:${preset:items}

    \r\n", - "contentItem": "${preset:enumText}\r\n" - }, - { - "id": "badge", - "name": "徽标字段", - "category": "badge", - "content": "\r\n
    ${preset:items}
    \r\n", - "contentItem": "${preset:enumText}\r\n" - } - ], - "presetFields": [ - { - "id": "title", - "name": "标题", - "presetType": "title", - "category": "title" - }, - { - "id": "sub-title", - "name": "副标题", - "presetType": "sub-title", - "category": "sub-title" - }, - { - "id": "badge-status", - "name": "徽标状态", - "presetType": "badge", - "category": "badge" - }, - { - "id": "field1", - "name": "字段一", - "presetType": "text", - "category": "content" - }, - { - "id": "field2", - "name": "字段二", - "presetType": "text", - "category": "content" - }, - { - "id": "staus1", - "name": "单据状态一", - "presetType": "status", - "category": "content" - }, - { - "id": "staus2", - "name": "单据状态二", - "presetType": "status", - "category": "content" - }, - { - "id": "total-amount", - "name": "合计金额", - "presetType": "total", - "category": "emphasize" - } - ], - "customClass": "fm-tmpl-title-des-tips-wrapper", - "toolbarFragement": "

    \r\n\r\n\r\n

    ", - "toolbarButtonFragement": "\r\n", - "toolbarButtonClass": "f-icon f-icon-new-edit text-muted", - "toolbarType": "icon-buttons", - "toolbarWrapperFragement": "" - }, - { - "id": "listview-list01", - "title": "列表模板:标题+描述+字段", - "templatePic": "assets/form/preset-template/preview/listview-list01.png", - "templateHtml": "
    \r\n\r\n\r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\r\n\r\n\r\n
    ", - "presetsTemplateFragements": [ - { - "id": "title", - "name": "标题", - "category": "title", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "description", - "name": "描述", - "category": "description", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "text", - "name": "文本字段", - "category": "content", - "content": "\r\n
    \r\n

    ${preset:value}

    \r\n

    ${preset:label}

    \r\n
    \r\n\r\n" - }, - { - "id": "amount", - "name": "金额", - "category": "content", - "content": "\r\n
    ${preset:value}
    \r\n\r\n" - }, - { - "id": "status", - "name": "状态字段", - "category": "content", - "content": "\r\n
    \r\n

    ${preset:items}

    \r\n

    ${preset:label}

    \r\n
    \r\n", - "contentItem": "${preset:enumText}\r\n" - }, - { - "id": "badge", - "name": "徽标字段", - "category": "badge", - "content": "\r\n
    ${preset:items}
    \r\n", - "contentItem": "${preset:enumText}\r\n" - } - ], - "presetFields": [ - { - "id": "title", - "name": "标题", - "presetType": "title", - "category": "title" - }, - { - "id": "description", - "name": "描述", - "presetType": "description", - "category": "description" - }, - { - "id": "badge-status", - "name": "徽标状态", - "presetType": "badge", - "category": "badge" - }, - { - "id": "field1", - "name": "字段一", - "presetType": "text", - "category": "content" - }, - { - "id": "field2", - "name": "字段二", - "presetType": "text", - "category": "content" - }, - { - "id": "staus", - "name": "单据状态", - "presetType": "status", - "category": "content" - }, - { - "id": "amount", - "name": "金额", - "presetType": "amount", - "category": "content" - } - ], - "customClass": "fm-tmpl-title-des-tips-wrapper", - "toolbarFragement": "\r\n\r\n", - "toolbarButtonFragement": "", - "toolbarButtonClass": "", - "toolbarType": "response-toolbar", - "toolbarWrapperFragement": "
    \r\n\r\n\r\n
    " - }, - { - "id": "listview-list02", - "title": "列表模板:图标+标题+描述", - "templatePic": "assets/form/preset-template/preview/listview-list02.png", - "templateHtml": "
    \r\n
    \r\n\r\n\r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\r\n
    \r\n
    ", - "presetsTemplateFragements": [ - { - "id": "title", - "name": "标题", - "category": "title", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "description", - "name": "描述", - "category": "description", - "content": "\r\n

    ${preset:value}

    \r\n\r\n" - }, - { - "id": "icon", - "name": "头像", - "category": "icon", - "content": "\r\n\r\n\r\n" - } - ], - "presetFields": [ - { - "id": "title", - "name": "标题", - "presetType": "title", - "category": "title" - }, - { - "id": "description", - "name": "描述", - "presetType": "description", - "category": "description" - }, - { - "id": "icon", - "name": "头像", - "presetType": "icon", - "category": "icon" - } - ], - "customClass": "fm-tmpl-title-des-tips-wrapper", - "toolbarFragement": "
    \r\n\r\n\r\n
    ", - "toolbarButtonFragement": "\r\n", - "toolbarButtonClass": "btn btn-link", - "toolbarType": "link-buttons", - "toolbarWrapperFragement": "" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-badge01.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-badge01.png deleted file mode 100644 index 39c3dc91765f4a04686f48ad55fbc96f04fb624c..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-badge01.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-content01.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-content01.png deleted file mode 100644 index bba60bf7c980e86f866b8bd79c93c3ca6c6c94f3..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-content01.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-place01.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-place01.png deleted file mode 100644 index f1ed56d665863d3cd48c4aa6f3141934b88cb03c..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/appointment-calendar/appointment-calendar-place01.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-card01.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-card01.png deleted file mode 100644 index 1af803719b025e36f5215e5a87ffcbd0e83f1b50..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-card01.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list01.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list01.png deleted file mode 100644 index e7582887f6f4de21caf15f9bb6aba040c2eb0bc8..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list01.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list02.png b/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list02.png deleted file mode 100644 index 27b9b3b04547fceeeb9e1880ce72530c9ed695f6..0000000000000000000000000000000000000000 Binary files a/packages/designer/projects/form-designer/src/assets/form/preset-template/preview/listview-list02.png and /dev/null differ diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-fill-in-form-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/card-fill-in-form-template.json deleted file mode 100644 index fe865c6d06e72ff7ae4ddd6f1bea415fc8c5f113..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-fill-in-form-template.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-layout.page-container.page-header.header-nav", - "icon": "" - }, - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.page-layout.page-container" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-table-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/card-table-template.json deleted file mode 100644 index eccc4ea0e516d5b62305dbd04d6fb194573ac114..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-table-template.json +++ /dev/null @@ -1,39 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-container", - "type": "MainContainer", - "name": "主区域", - "path": "root-layout.main-container", - "scrollSpy": { - "rootContainerPath": "root-layout", - "rootLayoutClass": "f-page-is-sidescrollspy" - }, - "hasLikeCardContainer": true, - "children": [ - { - "id": "main-form", - "type": "Table", - "name": "主表区域", - "path": "root-layout.main-container", - "likeCardContainer": "root-layout.main-container" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.like-card-container.*.detail-container-*", - "isGridCollection": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/card-template.json deleted file mode 100644 index 0716244dee9efa756ce0134d22a8ca149946f369..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/card-template.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-container", - "type": "MainContainer", - "name": "主区域", - "path": "root-layout.main-container", - "scrollSpy": { - "rootContainerPath": "root-layout", - "rootLayoutClass": "f-page-is-sidescrollspy" - }, - "hasLikeCardContainer": true, - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "主表区域", - "path": "root-layout.main-container", - "likeCardContainer": "root-layout.main-container" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.*.detail-container.detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.main-container.*.detail-detail-container.detail-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-in-tab-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-in-tab-template.json deleted file mode 100644 index c9e897d32b013ddd702c6bf00d59528d2a531484..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-in-tab-template.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-grid", - "type": "DataGrid", - "name": "左侧列表区域", - "path": "root-layout.main-container.content-container.content-section.content-tab.main-tab-page", - "listFilter": { - "canEnable": true - }, - "queryScheme": { - "canEnable": true, - "position": "root-layout", - "relatedClass": [ - { - "path": "root-layout", - "class": "f-page-has-scheme", - "type": "add" - } - ] - } - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "右侧列表区域", - "path": "root-layout.main-container.content-container.content-section.content-tab.sub-tab-page" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-template.json deleted file mode 100644 index f0f1dd97ba66886b54342c945be26aa4fae78849..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-template.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-grid", - "type": "DataGrid", - "name": "左侧列表区域", - "path": "root-layout.main-container.content-splitter.content-list", - "listFilter": { - "canEnable": true - } - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "右侧列表区域", - "path": "root-layout.main-container.content-splitter.content-main" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-with-sidebar-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-with-sidebar-template.json deleted file mode 100644 index 396cc44fe02befa50b9fd2e96181bc14a0443394..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/double-list-with-sidebar-template.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-grid", - "type": "DataGrid", - "name": "左侧列表区域", - "path": "root-layout.main-container.content-splitter.content-list", - "listFilter": { - "canEnable": true - } - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "右侧列表区域", - "path": "root-layout.main-container.content-splitter.content-main" - }, - { - "id": "sidebar-form", - "type": "Form", - "name": "侧边栏卡片", - "path": "root-layout.detail-form-sidebar" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/file-upload-preview-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/file-upload-preview-template.json deleted file mode 100644 index c6cd6097aa94498c29206729e95221b9d1d9e499..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/file-upload-preview-template.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "id": "page-header", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header" - }, - { - "id": "file-component", - "type": "File", - "name": "附件区域", - "path": "root-layout.main-container", - "likeCardContainer": "root-layout.main-container" - }, - { - "id": "page-footer", - "type": "ModalFooter", - "name": "页脚区域", - "path": "root-layout.page-footer" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-card-template.json deleted file mode 100644 index 8d7b75998c8fdc5c8a0b49f4ace08eedff1b6ff4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-card-template.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.main-container.content-splitter.content-list", - "listFilter": { - "canEnable": true - } - }, - { - "id": "right-main-container", - "type": "RightMainContainer", - "name": "右侧主区域", - "path": "root-layout.main-container.content-splitter.content-main", - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container.content-splitter.content-main" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-container.card-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-detail-container.card-detail-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-component.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-component.json deleted file mode 100644 index 50788db6c69995f1637d7c12202492f52e345df5..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-component.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "id": "main-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout", - "queryScheme": { - "canEnable": true, - "position": "root-layout", - "relatedClass": [ - { - "path": "root-layout", - "class": "f-page-has-scheme", - "type": "add" - } - ] - }, - "listFilter": { - "canEnable": true - } - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-dic-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-dic-template.json deleted file mode 100644 index cc1ae67956d5d51158709775824b20b675aa142e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-dic-template.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.main-container.content-splitter.content-list", - "listFilter": { - "canEnable": true - } - }, - { - "id": "right-main-container", - "type": "RightMainContainer", - "name": "右侧主区域", - "path": "root-layout.main-container.content-splitter.content-main", - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container.content-splitter.content-main" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-container.card-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-detail-container.card-detail-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-template.json deleted file mode 100644 index cc3d6d8c70b4ee164e2315ea99284346a82ee95b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-template.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "列表区域", - "path": [ - "root-layout.page-main", - "root-layout.main-container" - ], - "queryScheme": { - "canEnable": true, - "position": "root-layout", - "relatedClass": [ - { - "path": "root-layout", - "class": "f-page-has-scheme", - "type": "add" - } - ] - }, - "listFilter": { - "canEnable": true - }, - "multiView": { - "canEnable": true - } - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-view-component.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-view-component.json deleted file mode 100644 index ef8d5cf92c71b53707087e1016aff9bb6eca789a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-view-component.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": "list-view", - "type": "ListView", - "name": "列表视图区域", - "path": "root-layout.main-container" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-with-sidebar-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/list-with-sidebar-template.json deleted file mode 100644 index c7ce006b5cd75b32e1d9f36d1b08adb01ef58642..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/list-with-sidebar-template.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.page-main", - "queryScheme": { - "canEnable": true, - "position": "root-layout", - "relatedClass": [ - { - "path": "root-layout", - "class": "f-page-has-scheme", - "type": "add" - } - ] - }, - "listFilter": { - "canEnable": true - }, - "multiView": { - "canEnable": true - } - }, - { - "id": "sidebar-form", - "type": "Form", - "name": "侧边栏卡片区域", - "path": "root-layout.detail-form-sidebar" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/modal-card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/modal-card-template.json deleted file mode 100644 index 8db0c09472c76e0ff56795c40a8564a6aceeb596..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/modal-card-template.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "id": "page-header", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header" - }, - { - "id": "main-container", - "type": "MainContainer", - "name": "主区域", - "path": "root-layout.main-container", - "hasLikeCardContainer": true, - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "主表区域", - "path": "root-layout.main-container", - "likeCardContainer": "root-layout.main-container" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.*.detail-container.detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.main-container.*.detail-detail-container.detail-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - } - ] - }, - { - "id": "page-footer", - "type": "ModalFooter", - "name": "页脚区域", - "path": "root-layout.page-footer" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/multi-select-component.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/multi-select-component.json deleted file mode 100644 index 1fdd9c37662547d7acc8294e6c99aadda127cbec..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/multi-select-component.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": "multi-select", - "type": "MultiSelect", - "name": "数据分配", - "path": "root-layout.main-container" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-card-template.json deleted file mode 100644 index 9fe17a95a17154b1394bfe8b5b8afabd2a64558e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-card-template.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "id": "left-nav", - "type": "ListNav", - "name": "左侧导航区域", - "path": "root-layout.root-layout-content.page-content.list-nav" - }, - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-container", - "type": "MainContainer", - "name": "主区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-main", - "hasLikeCardContainer": true, - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "主表区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-main" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-main.*.detail-container.detail-section", - "hasButton": true - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-main.*.detail-detail-container.detail-detail-section", - "hasButton": true - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-list-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-list-template.json deleted file mode 100644 index 02ba122bc48b67a5347e3351096354b174068a96..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-list-template.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "id": "left-nav", - "type": "ListNav", - "name": "左侧导航区域", - "path": "root-layout.root-layout-content.page-content.list-nav" - }, - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout.page-main", - "queryScheme": { - "canEnable": true, - "position": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout", - "relatedClass": [ - { - "path": "root-layout.root-layout-content.page-content.page-content-main.page-content-layout", - "class": "f-page-has-scheme", - "type": "add" - } - ] - }, - "listFilter": { - "canEnable": true - } - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-table-fillin-form-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-table-fillin-form-template.json deleted file mode 100644 index 6174321f0b9cc04c48ddaf7e2c1a4344b20bce74..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/nav-table-fillin-form-template.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-nav", - "type": "ListNav", - "name": "左侧导航区域", - "path": "root-layout.main-container.page-content.list-nav" - }, - { - "id": "dynamicArea", - "type": "DynamicArea", - "name": "动态区域", - "path": "root-layout.main-container.page-content.page-content-main" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/new-card-spy-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/new-card-spy-template.json deleted file mode 100644 index aab2ba3cfa7d38ff9159c863f7f1a258f3cac3e7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/new-card-spy-template.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-container", - "type": "MainContainer", - "name": "主区域", - "path": "root-layout.main-container", - "hasLikeCardContainer": true, - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "主表卡片区域", - "path": "root-layout.main-container.scrollspy-container", - "likeCardContainer": "root-layout.main-container" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.scrollspy-container.*.detail-container-*", - "isGridCollection": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/show-sub-table-by-card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/show-sub-table-by-card-template.json deleted file mode 100644 index be54efbb9e4dbe181f678b08e33b200325397ab9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/show-sub-table-by-card-template.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-card-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-card-template.json deleted file mode 100644 index 7e3966cdb7554ba4ecb4c17c2d915b8ebcdb1428..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-card-template.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-tree", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.main-container.content-splitter.content-tree" - }, - { - "id": "right-main-container", - "type": "RightMainContainer", - "name": "右侧主区域", - "path": "root-layout.main-container.content-splitter.content-main", - "children": [ - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container.content-splitter.content-main" - }, - { - "id": "child-grid", - "type": "DataGrid", - "name": "从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-container.card-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - }, - { - "id": "grandson-grid", - "type": "DataGrid", - "name": "从从表区域", - "path": "root-layout.main-container.content-splitter.content-main.card-detail-detail-container.card-detail-detail-section", - "hasButton": true, - "multiView": { - "canEnable": true - } - } - ] - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-component.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-component.json deleted file mode 100644 index 926deef95ccdb5df7ff0abbdc2a54fd2e1722ff7..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-component.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "id": "tree-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-list-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-list-template.json deleted file mode 100644 index 29c723e5a738bb9ffe30b824da3fa7a43ecf5a53..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-list-template.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "left-tree", - "type": "DataGrid", - "name": "左侧列表区域", - "path": "root-layout.main-container.content-splitter.content-tree" - }, - { - "id": "right-list", - "type": "DataGrid", - "name": "右侧列表区域", - "path": "root-layout.main-container.content-splitter.content-main" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-manage-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-manage-template.json deleted file mode 100644 index b426b863983b92a442610d6d526a3ad0ed4ef340..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/tree-manage-template.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-grid", - "type": "DataGrid", - "name": "列表区域", - "path": "root-layout.page-main" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-template.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-template.json deleted file mode 100644 index ee484e9b3b6e8d4f646fa226b3cb25c1c79f3cce..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-template.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container" - }, - { - "id": "wizard", - "type": "Wizard", - "name": "向导区域", - "path": "root-layout.main-container" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-with-sidebar-form.json b/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-with-sidebar-form.json deleted file mode 100644 index d2854a5b71dca648e5bea5f0b2e888a0568f0014..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/form/template-schema/wizard-with-sidebar-form.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": "header-nav", - "type": "Header", - "name": "头部区域", - "path": "root-layout.page-header.header-nav", - "icon": "" - }, - { - "id": "main-form", - "type": "Form", - "name": "卡片区域", - "path": "root-layout.main-container" - }, - { - "id": "wizard", - "type": "Wizard", - "name": "向导区域", - "path": "root-layout.main-container" - }, - { - "id": "sidebar-form", - "type": "Form", - "name": "侧边栏卡片区域", - "path": "root-layout.detail-form-sidebar" - } -] \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/metadata/7c48ef46-339c-42d4-8365-a21236c63044.json b/packages/designer/projects/form-designer/src/assets/metadata/7c48ef46-339c-42d4-8365-a21236c63044.json deleted file mode 100644 index 149fc3c4d4e31eee736363d5e69fe99af3b09dee..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/metadata/7c48ef46-339c-42d4-8365-a21236c63044.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "7c48ef46-339c-42d4-8365-a21236c63044", - "nameSpace": "Inspur.GS.Gsp.Web.WebCmp", - "code": "ListCardController", - "name": "列卡控制器", - "fileName": "ListCardController.webcmd", - "type": "WebCommand", - "bizobjectID": "Web", - "language": null, - "isTranslating": false, - "relativePath": "Gsp/Web/WebCmp/bo-webcmp/metadata/webcmd", - "extendProperty": "", - "content": "{\r\n \"application\" : null,\r\n \"serviceUnit\" : null,\r\n \"version\" : null,\r\n \"Code\" : \"ListCardController\",\r\n \"Name\" : \"列卡控制器\",\r\n \"Id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"Description\" : null,\r\n \"Commands\" : [ {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadList\",\r\n \"Name\" : \"加载列表数据\",\r\n \"Description\" : null,\r\n \"Id\" : \"e573d6a2-8261-9ad4-c9f1-2e59af53302d\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"39a63da5-e912-d502-fb51-887a2f152c4conClosing\",\r\n \"itemName\" : \"关闭前事件\",\r\n \"Id\" : \"993aeb7d-c6c8-672a-39ce-76fb412b93b0\",\r\n \"Code\" : \"onClosing\",\r\n \"Name\" : \"onClosing\",\r\n \"ComponentId\" : \"d909a196-e816-4219-ac72-bdbc38b75088\",\r\n \"ComponentCode\" : \"NavigationMiddlewareService\",\r\n \"ComponentName\" : \"NavigationMiddlewareService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"39a63da5-e912-d502-fb51-887a2f152c4c\",\r\n \"MethodCode\" : \"onClosing\",\r\n \"MethodName\" : \"关闭前事件\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"39a63da5-e912-d502-fb51-887a2f152c4conClosing\",\r\n \"itemName\" : \"关闭前事件\",\r\n \"Id\" : \"993aeb7d-c6c8-672a-39ce-76fb412b93b0\",\r\n \"Code\" : \"onClosing\",\r\n \"Name\" : \"onClosing\",\r\n \"ComponentId\" : \"d909a196-e816-4219-ac72-bdbc38b75088\",\r\n \"ComponentCode\" : \"NavigationMiddlewareService\",\r\n \"ComponentName\" : \"NavigationMiddlewareService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"39a63da5-e912-d502-fb51-887a2f152c4c\",\r\n \"MethodCode\" : \"onClosing\",\r\n \"MethodName\" : \"关闭前事件\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ea4f7678-5fdc-e2a5-0c0f-a02563a47309load\",\r\n \"itemName\" : \"加载数据\",\r\n \"Id\" : \"3697122f-1132-37ec-e360-6357f6c0391b\",\r\n \"Code\" : \"load\",\r\n \"Name\" : \"load\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"ea4f7678-5fdc-e2a5-0c0f-a02563a47309\",\r\n \"MethodCode\" : \"load\",\r\n \"MethodName\" : \"加载数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"filter\",\r\n \"ParamName\" : \"过滤条件\",\r\n \"ParamExpress\" : \"{COMMAND~/params/filter}\"\r\n }, {\r\n \"ParamCode\" : \"sort\",\r\n \"ParamName\" : \"排序条件\",\r\n \"ParamExpress\" : \"{COMMAND~/params/sort}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ea4f7678-5fdc-e2a5-0c0f-a02563a47309load\",\r\n \"itemName\" : \"加载数据\",\r\n \"Id\" : \"3697122f-1132-37ec-e360-6357f6c0391b\",\r\n \"Code\" : \"load\",\r\n \"Name\" : \"load\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"ea4f7678-5fdc-e2a5-0c0f-a02563a47309\",\r\n \"MethodCode\" : \"load\",\r\n \"MethodName\" : \"加载数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"filter\",\r\n \"ParamName\" : \"过滤条件\",\r\n \"ParamExpress\" : \"{COMMAND~/params/filter}\"\r\n }, {\r\n \"ParamCode\" : \"sort\",\r\n \"ParamName\" : \"排序条件\",\r\n \"ParamExpress\" : \"{COMMAND~/params/sort}\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"filter\",\r\n \"Name\" : \"过滤条件\",\r\n \"Description\" : \"可选,根据“过滤条件编辑器”编辑而得\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"FilterEditor\",\r\n \"context\" : null\r\n },\r\n \"Id\" : \"4e0be8f8-b32e-a3f7-60ab-f94f3ac130e7\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"sort\",\r\n \"Name\" : \"排序条件\",\r\n \"Description\" : \"可选,根据“排序条件编辑器”编辑而得\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"SortEditor\",\r\n \"context\" : null\r\n },\r\n \"Id\" : \"86395dd9-1487-814a-2c37-862921f8190a\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCard\",\r\n \"Name\" : \"加载卡片数据\",\r\n \"Description\" : null,\r\n \"Id\" : \"d1054fa5-d18e-c22c-ed3f-2f13b4692702\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04update\",\r\n \"itemName\" : \"更新数据\",\r\n \"Id\" : \"044da014-8de1-4dc1-d5f7-d6de952e1b98\",\r\n \"Code\" : \"update\",\r\n \"Name\" : \"update\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04\",\r\n \"MethodCode\" : \"update\",\r\n \"MethodName\" : \"更新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04update\",\r\n \"itemName\" : \"更新数据\",\r\n \"Id\" : \"044da014-8de1-4dc1-d5f7-d6de952e1b98\",\r\n \"Code\" : \"update\",\r\n \"Name\" : \"update\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04\",\r\n \"MethodCode\" : \"update\",\r\n \"MethodName\" : \"更新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n } ],\r\n \"Parameters\" : [ ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"add\",\r\n \"Name\" : \"新增一条数据\",\r\n \"Description\" : null,\r\n \"Id\" : \"6b9556d9-f510-2484-07b8-e1e190f03169\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"2872ac48-93b3-b6ac-21c9-38c7857859f1append\",\r\n \"itemName\" : \"追加数据\",\r\n \"Id\" : \"c315e91a-a6df-a2dc-d5b5-60ff752fcf5a\",\r\n \"Code\" : \"append\",\r\n \"Name\" : \"append\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"2872ac48-93b3-b6ac-21c9-38c7857859f1\",\r\n \"MethodCode\" : \"append\",\r\n \"MethodName\" : \"追加数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"2872ac48-93b3-b6ac-21c9-38c7857859f1append\",\r\n \"itemName\" : \"追加数据\",\r\n \"Id\" : \"c315e91a-a6df-a2dc-d5b5-60ff752fcf5a\",\r\n \"Code\" : \"append\",\r\n \"Name\" : \"append\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"2872ac48-93b3-b6ac-21c9-38c7857859f1\",\r\n \"MethodCode\" : \"append\",\r\n \"MethodName\" : \"追加数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"4fab57df-fb9a-0ce5-ad09-d03f04c595d3\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Create\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"4fab57df-fb9a-0ce5-ad09-d03f04c595d3\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Create\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"edit\",\r\n \"Name\" : \"编辑数据\",\r\n \"Description\" : null,\r\n \"Id\" : \"ca451c36-4ab8-5576-545f-0bd13c1cb320\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04update\",\r\n \"itemName\" : \"更新数据\",\r\n \"Id\" : \"0fe55c96-e54b-082a-9192-860cd7537297\",\r\n \"Code\" : \"update\",\r\n \"Name\" : \"update\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04\",\r\n \"MethodCode\" : \"update\",\r\n \"MethodName\" : \"更新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04update\",\r\n \"itemName\" : \"更新数据\",\r\n \"Id\" : \"0fe55c96-e54b-082a-9192-860cd7537297\",\r\n \"Code\" : \"update\",\r\n \"Name\" : \"update\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"b445143d-13c9-0a26-f17e-66d579c3cf04\",\r\n \"MethodCode\" : \"update\",\r\n \"MethodName\" : \"更新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"8cce0738-b98f-26eb-fb84-96b0d9b4216f\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Edit\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"8cce0738-b98f-26eb-fb84-96b0d9b4216f\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Edit\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"id\",\r\n \"Name\" : \"待编辑数据的标识\",\r\n \"Description\" : \"必填,待编辑数据的id\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : null,\r\n \"Id\" : \"9de7a68b-18a9-16f2-7936-031218a2248d\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"transitionAction\",\r\n \"Name\" : \"状态机动作\",\r\n \"Description\" : \"必填,一般为\\\"编辑\\\",表示切换至“编辑”状态的动作。\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Actions\"\r\n },\r\n \"editable\" : {\r\n \"type\" : \"boolean\",\r\n \"value\" : \"false\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"d955227a-a9b8-34d0-918f-612359d804af\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"save\",\r\n \"Name\" : \"保存变更\",\r\n \"Description\" : null,\r\n \"Id\" : \"dbc290b7-8f64-1ce3-862f-d63e4c6db956\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"ac88a35f-8d4f-620d-0e97-55be653b9b23\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"ac88a35f-8d4f-620d-0e97-55be653b9b23\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"d8f35682-8a02-c921-3d2e-b9af87f198afvalidateCurrentRow\",\r\n \"itemName\" : \"校验当前行数据\",\r\n \"Id\" : \"00d0a1c6-4419-b054-aedc-d055b0517af0\",\r\n \"Code\" : \"validateCurrentRow\",\r\n \"Name\" : \"validateCurrentRow\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"d8f35682-8a02-c921-3d2e-b9af87f198af\",\r\n \"MethodCode\" : \"validateCurrentRow\",\r\n \"MethodName\" : \"校验当前行数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"d8f35682-8a02-c921-3d2e-b9af87f198afvalidateCurrentRow\",\r\n \"itemName\" : \"校验当前行数据\",\r\n \"Id\" : \"00d0a1c6-4419-b054-aedc-d055b0517af0\",\r\n \"Code\" : \"validateCurrentRow\",\r\n \"Name\" : \"validateCurrentRow\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"d8f35682-8a02-c921-3d2e-b9af87f198af\",\r\n \"MethodCode\" : \"validateCurrentRow\",\r\n \"MethodName\" : \"校验当前行数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"e620a05a-5e52-32e7-b67e-4adfc739e47esave\",\r\n \"itemName\" : \"保存数据\",\r\n \"Id\" : \"7360d90a-1ff3-4a65-77f1-fbdd47b2fc58\",\r\n \"Code\" : \"save\",\r\n \"Name\" : \"save\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"e620a05a-5e52-32e7-b67e-4adfc739e47e\",\r\n \"MethodCode\" : \"save\",\r\n \"MethodName\" : \"保存数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"successMsg\",\r\n \"ParamName\" : \"提示信息\",\r\n \"ParamExpress\" : \"{COMMAND~/params/successMsg}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"e620a05a-5e52-32e7-b67e-4adfc739e47esave\",\r\n \"itemName\" : \"保存数据\",\r\n \"Id\" : \"7360d90a-1ff3-4a65-77f1-fbdd47b2fc58\",\r\n \"Code\" : \"save\",\r\n \"Name\" : \"save\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"e620a05a-5e52-32e7-b67e-4adfc739e47e\",\r\n \"MethodCode\" : \"save\",\r\n \"MethodName\" : \"保存数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"successMsg\",\r\n \"ParamName\" : \"提示信息\",\r\n \"ParamExpress\" : \"{COMMAND~/params/successMsg}\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931refresh\",\r\n \"itemName\" : \"刷新数据\",\r\n \"Id\" : \"030eb0ac-64a9-16b0-ec9f-c1d2d6ec5b33\",\r\n \"Code\" : \"refresh\",\r\n \"Name\" : \"refresh\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931\",\r\n \"MethodCode\" : \"refresh\",\r\n \"MethodName\" : \"刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"loadCmdName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdName}\"\r\n }, {\r\n \"ParamCode\" : \"loadCmdFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdFrameId}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931refresh\",\r\n \"itemName\" : \"刷新数据\",\r\n \"Id\" : \"030eb0ac-64a9-16b0-ec9f-c1d2d6ec5b33\",\r\n \"Code\" : \"refresh\",\r\n \"Name\" : \"refresh\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931\",\r\n \"MethodCode\" : \"refresh\",\r\n \"MethodName\" : \"刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"loadCmdName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdName}\"\r\n }, {\r\n \"ParamCode\" : \"loadCmdFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdFrameId}\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"afbc2465-06cb-7a4f-a357-ed3a43ae6a41\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Save\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"afbc2465-06cb-7a4f-a357-ed3a43ae6a41\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Save\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46resetValidation\",\r\n \"itemName\" : \"重置验证信息\",\r\n \"Id\" : \"e86f05e6-b704-c655-d89a-a8453ffeb266\",\r\n \"Code\" : \"resetValidation\",\r\n \"Name\" : \"resetValidation\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46\",\r\n \"MethodCode\" : \"resetValidation\",\r\n \"MethodName\" : \"重置验证信息\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46resetValidation\",\r\n \"itemName\" : \"重置验证信息\",\r\n \"Id\" : \"e86f05e6-b704-c655-d89a-a8453ffeb266\",\r\n \"Code\" : \"resetValidation\",\r\n \"Name\" : \"resetValidation\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46\",\r\n \"MethodCode\" : \"resetValidation\",\r\n \"MethodName\" : \"重置验证信息\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCmdName\",\r\n \"Name\" : \"保存后回调方法\",\r\n \"Description\" : \"可选,可以指定保存后的回调方法,通常用来刷新数据,例如:指定LoadList方法\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"ComboLookup\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":CommandsTree\"\r\n },\r\n \"columns\" : {\r\n \"type\" : \"array\",\r\n \"value\" : \"[{\\\"field\\\":\\\"id\\\",\\\"title\\\":\\\"Id\\\"},{\\\"field\\\":\\\"name\\\",\\\"title\\\":\\\"命令名称\\\"}]\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"012f8ff4-5d40-461b-6f39-5c3b79fd8a75\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCmdFrameId\",\r\n \"Name\" : \"目标组件\",\r\n \"Description\" : \"展示数据的组件标识\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Components\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"16c7515b-c422-e943-95db-84810c165cad\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"successMsg\",\r\n \"Name\" : \"保存成功提示信息\",\r\n \"Description\" : \"可选,默认为“保存成功!”,如果不希望提示成功信息,可以传入{\\\"showMessage\\\": false }\",\r\n \"ParameterType\" : null,\r\n \"controlSource\" : null,\r\n \"Id\" : \"f82935e4-7ae9-16e1-e5f5-13f8e5375c64\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"cancel\",\r\n \"Name\" : \"取消变更\",\r\n \"Description\" : null,\r\n \"Id\" : \"5c3f88c9-52b2-bddb-b4ab-a975ec0e48d7\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"9da00c39-4365-d0cd-50a6-2c1e807a936c\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"9da00c39-4365-d0cd-50a6-2c1e807a936c\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ced093f2-1267-6796-1337-0d0752b18e81cancel\",\r\n \"itemName\" : \"取消变更\",\r\n \"Id\" : \"fd8e0ac8-7164-0fd6-43da-2d851dc6040c\",\r\n \"Code\" : \"cancel\",\r\n \"Name\" : \"cancel\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"ced093f2-1267-6796-1337-0d0752b18e81\",\r\n \"MethodCode\" : \"cancel\",\r\n \"MethodName\" : \"取消变更\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ced093f2-1267-6796-1337-0d0752b18e81cancel\",\r\n \"itemName\" : \"取消变更\",\r\n \"Id\" : \"fd8e0ac8-7164-0fd6-43da-2d851dc6040c\",\r\n \"Code\" : \"cancel\",\r\n \"Name\" : \"cancel\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp/data-services\",\r\n \"MethodId\" : \"ced093f2-1267-6796-1337-0d0752b18e81\",\r\n \"MethodCode\" : \"cancel\",\r\n \"MethodName\" : \"取消变更\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931refresh\",\r\n \"itemName\" : \"刷新数据\",\r\n \"Id\" : \"2cfba7fb-422e-c48c-4157-f94e68353611\",\r\n \"Code\" : \"refresh\",\r\n \"Name\" : \"refresh\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931\",\r\n \"MethodCode\" : \"refresh\",\r\n \"MethodName\" : \"刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"loadCmdName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdName}\"\r\n }, {\r\n \"ParamCode\" : \"loadCmdFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdFrameId}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931refresh\",\r\n \"itemName\" : \"刷新数据\",\r\n \"Id\" : \"2cfba7fb-422e-c48c-4157-f94e68353611\",\r\n \"Code\" : \"refresh\",\r\n \"Name\" : \"refresh\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7f9f66ad-3b9d-3df4-6a8f-d5822724e931\",\r\n \"MethodCode\" : \"refresh\",\r\n \"MethodName\" : \"刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"loadCmdName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdName}\"\r\n }, {\r\n \"ParamCode\" : \"loadCmdFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCmdFrameId}\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"c86f6772-ca88-23dc-ed19-4977235a930f\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Cancel\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"c86f6772-ca88-23dc-ed19-4977235a930f\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : \"Cancel\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46resetValidation\",\r\n \"itemName\" : \"重置验证信息\",\r\n \"Id\" : \"31dc3103-da1d-615c-8d18-c44b3b31ee14\",\r\n \"Code\" : \"resetValidation\",\r\n \"Name\" : \"resetValidation\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46\",\r\n \"MethodCode\" : \"resetValidation\",\r\n \"MethodName\" : \"重置验证信息\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46resetValidation\",\r\n \"itemName\" : \"重置验证信息\",\r\n \"Id\" : \"31dc3103-da1d-615c-8d18-c44b3b31ee14\",\r\n \"Code\" : \"resetValidation\",\r\n \"Name\" : \"resetValidation\",\r\n \"ComponentId\" : \"bb531cd6-5b94-4b75-a3da-99d7d0a7a08c\",\r\n \"ComponentCode\" : \"ValidationService\",\r\n \"ComponentName\" : \"ValidationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"9bc3d3ea-75ad-13d1-f0b6-6a8686ca8c46\",\r\n \"MethodCode\" : \"resetValidation\",\r\n \"MethodName\" : \"重置验证信息\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCmdName\",\r\n \"Name\" : \"取消后回调方法\",\r\n \"Description\" : \"可选,可以指定取消变更后的回调方法,通常用来刷新数据,例如:指定LoadList方法\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"ComboLookup\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":CommandsTree\"\r\n },\r\n \"columns\" : {\r\n \"type\" : \"array\",\r\n \"value\" : \"[{\\\"field\\\":\\\"id\\\",\\\"title\\\":\\\"Id\\\"},{\\\"field\\\":\\\"name\\\",\\\"title\\\":\\\"命令名称\\\"}]\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"10273059-b6d0-befa-c1e3-4233057cd355\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCmdFrameId\",\r\n \"Name\" : \"目标组件\",\r\n \"Description\" : \"展示数据的组件标识\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Components\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"1d8cd3a8-f27c-74f5-e253-c40d5805781c\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"close\",\r\n \"Name\" : \"关闭\",\r\n \"Description\" : null,\r\n \"Id\" : \"3e722416-f1e4-d795-0194-0b876adfa253\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"6b209e22-ea69-e3fa-ab93-fe9a27b08b67\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0endEdit\",\r\n \"itemName\" : \"结束编辑\",\r\n \"Id\" : \"6b209e22-ea69-e3fa-ab93-fe9a27b08b67\",\r\n \"Code\" : \"endEdit\",\r\n \"Name\" : \"endEdit\",\r\n \"ComponentId\" : \"c7a3fa1b-5b5b-4409-9b5b-6c4fe2cc3c20\",\r\n \"ComponentCode\" : \"EndEditService\",\r\n \"ComponentName\" : \"EndEditService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"545a2fc0-453a-4790-cfa9-6079d793a6a0\",\r\n \"MethodCode\" : \"endEdit\",\r\n \"MethodName\" : \"结束编辑\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6e2a4176-538c-bc65-2282-2d3bc48a6bdbclose\",\r\n \"itemName\" : \"关闭菜单或应用\",\r\n \"Id\" : \"5555b248-853a-0221-3aa8-c111d12dd922\",\r\n \"Code\" : \"close\",\r\n \"Name\" : \"close\",\r\n \"ComponentId\" : \"23e9883e-1e4d-4c5b-bf89-42f895f45bc4\",\r\n \"ComponentCode\" : \"NavigationService\",\r\n \"ComponentName\" : \"NavigationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6e2a4176-538c-bc65-2282-2d3bc48a6bdb\",\r\n \"MethodCode\" : \"close\",\r\n \"MethodName\" : \"关闭菜单或应用\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6e2a4176-538c-bc65-2282-2d3bc48a6bdbclose\",\r\n \"itemName\" : \"关闭菜单或应用\",\r\n \"Id\" : \"5555b248-853a-0221-3aa8-c111d12dd922\",\r\n \"Code\" : \"close\",\r\n \"Name\" : \"close\",\r\n \"ComponentId\" : \"23e9883e-1e4d-4c5b-bf89-42f895f45bc4\",\r\n \"ComponentCode\" : \"NavigationService\",\r\n \"ComponentName\" : \"NavigationService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"6e2a4176-538c-bc65-2282-2d3bc48a6bdb\",\r\n \"MethodCode\" : \"close\",\r\n \"MethodName\" : \"关闭菜单或应用\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ ]\r\n }\r\n } ],\r\n \"Parameters\" : [ ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"remove\",\r\n \"Name\" : \"删除当前数据\",\r\n \"Description\" : null,\r\n \"Id\" : \"aae5dda3-7941-6d19-dab5-c4126d20e457\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7adbc8ce-5ece-9b9d-86ea-635c3820ad18remove\",\r\n \"itemName\" : \"删除数据\",\r\n \"Id\" : \"d06e04bd-4f08-fed0-1ff7-ebdea327549c\",\r\n \"Code\" : \"remove\",\r\n \"Name\" : \"remove\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7adbc8ce-5ece-9b9d-86ea-635c3820ad18\",\r\n \"MethodCode\" : \"remove\",\r\n \"MethodName\" : \"删除数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"id\",\r\n \"ParamName\" : \"数据id\",\r\n \"ParamExpress\" : \"{COMMAND~/params/id}\"\r\n }, {\r\n \"ParamCode\" : \"ifSave\",\r\n \"ParamName\" : \"可选,删除后是否执行保存\",\r\n \"ParamExpress\" : \"{COMMAND~/params/ifSave}\"\r\n }, {\r\n \"ParamCode\" : \"successMsg\",\r\n \"ParamName\" : \"可选,删除成功后的提示信息,默认为“删除成功”\",\r\n \"ParamExpress\" : \"{COMMAND~/params/successMsg}\"\r\n }, {\r\n \"ParamCode\" : \"confirm\",\r\n \"ParamName\" : \"删除前是否需要进行确认,默认为true\",\r\n \"ParamExpress\" : \"true\"\r\n }, {\r\n \"ParamCode\" : \"breakable\",\r\n \"ParamName\" : \"不保存时是否截断流\",\r\n \"ParamExpress\" : \"true\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"7adbc8ce-5ece-9b9d-86ea-635c3820ad18remove\",\r\n \"itemName\" : \"删除数据\",\r\n \"Id\" : \"d06e04bd-4f08-fed0-1ff7-ebdea327549c\",\r\n \"Code\" : \"remove\",\r\n \"Name\" : \"remove\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"7adbc8ce-5ece-9b9d-86ea-635c3820ad18\",\r\n \"MethodCode\" : \"remove\",\r\n \"MethodName\" : \"删除数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"id\",\r\n \"ParamName\" : \"数据id\",\r\n \"ParamExpress\" : \"{COMMAND~/params/id}\"\r\n }, {\r\n \"ParamCode\" : \"ifSave\",\r\n \"ParamName\" : \"可选,删除后是否执行保存\",\r\n \"ParamExpress\" : \"{COMMAND~/params/ifSave}\"\r\n }, {\r\n \"ParamCode\" : \"successMsg\",\r\n \"ParamName\" : \"可选,删除成功后的提示信息,默认为“删除成功”\",\r\n \"ParamExpress\" : \"{COMMAND~/params/successMsg}\"\r\n }, {\r\n \"ParamCode\" : \"confirm\",\r\n \"ParamName\" : \"删除前是否需要进行确认,默认为true\",\r\n \"ParamExpress\" : \"true\"\r\n }, {\r\n \"ParamCode\" : \"breakable\",\r\n \"ParamName\" : \"不保存时是否截断流\",\r\n \"ParamExpress\" : \"true\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"bf69d890-a5b8-f4f7-fca9-db451f15ccfcuncheckDeletedRows\",\r\n \"itemName\" : \"取消勾选被删除的行\",\r\n \"Id\" : \"dd461c38-950e-1e3c-1008-091fafbe1041\",\r\n \"Code\" : \"uncheckDeletedRows\",\r\n \"Name\" : \"uncheckDeletedRows\",\r\n \"ComponentId\" : \"29fcae1c-7742-4967-a9fa-5ce0f7d94655\",\r\n \"ComponentCode\" : \"DataGridService\",\r\n \"ComponentName\" : \"DataGridService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"bf69d890-a5b8-f4f7-fca9-db451f15ccfc\",\r\n \"MethodCode\" : \"uncheckDeletedRows\",\r\n \"MethodName\" : \"取消勾选被删除的行\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"ids\",\r\n \"ParamName\" : \"被删除数据的主键数组\",\r\n \"ParamExpress\" : \"{COMMAND~/params/id}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"bf69d890-a5b8-f4f7-fca9-db451f15ccfcuncheckDeletedRows\",\r\n \"itemName\" : \"取消勾选被删除的行\",\r\n \"Id\" : \"dd461c38-950e-1e3c-1008-091fafbe1041\",\r\n \"Code\" : \"uncheckDeletedRows\",\r\n \"Name\" : \"uncheckDeletedRows\",\r\n \"ComponentId\" : \"29fcae1c-7742-4967-a9fa-5ce0f7d94655\",\r\n \"ComponentCode\" : \"DataGridService\",\r\n \"ComponentName\" : \"DataGridService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"bf69d890-a5b8-f4f7-fca9-db451f15ccfc\",\r\n \"MethodCode\" : \"uncheckDeletedRows\",\r\n \"MethodName\" : \"取消勾选被删除的行\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"ids\",\r\n \"ParamName\" : \"被删除数据的主键数组\",\r\n \"ParamExpress\" : \"{COMMAND~/params/id}\"\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"978e39b2-cace-cedf-bc17-847602a336b2refreshAfterRemoving\",\r\n \"itemName\" : \"删除后刷新数据\",\r\n \"Id\" : \"3304d8a9-5346-2654-2434-2da06e6fe61f\",\r\n \"Code\" : \"refreshAfterRemoving\",\r\n \"Name\" : \"refreshAfterRemoving\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"978e39b2-cace-cedf-bc17-847602a336b2\",\r\n \"MethodCode\" : \"refreshAfterRemoving\",\r\n \"MethodName\" : \"删除后刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"refreshCommandName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/refreshCommandName}\"\r\n }, {\r\n \"ParamCode\" : \"refreshCommandFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/refreshCommandFrameId}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"978e39b2-cace-cedf-bc17-847602a336b2refreshAfterRemoving\",\r\n \"itemName\" : \"删除后刷新数据\",\r\n \"Id\" : \"3304d8a9-5346-2654-2434-2da06e6fe61f\",\r\n \"Code\" : \"refreshAfterRemoving\",\r\n \"Name\" : \"refreshAfterRemoving\",\r\n \"ComponentId\" : \"6daf2f0e-395b-4064-b128-05020a31aa7b\",\r\n \"ComponentCode\" : \"ListDataService\",\r\n \"ComponentName\" : \"ListDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"978e39b2-cace-cedf-bc17-847602a336b2\",\r\n \"MethodCode\" : \"refreshAfterRemoving\",\r\n \"MethodName\" : \"删除后刷新数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"refreshCommandName\",\r\n \"ParamName\" : \"数据刷新命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/refreshCommandName}\"\r\n }, {\r\n \"ParamCode\" : \"refreshCommandFrameId\",\r\n \"ParamName\" : \"数据刷新命令对应的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/refreshCommandFrameId}\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"id\",\r\n \"Name\" : \"待删除数据的标识\",\r\n \"Description\" : \"必填,一般为指向列表当前行id的数据表达式,例如:{DATA~/data-grid-component/id}\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : null,\r\n \"Id\" : \"613d2bd5-fef9-52e0-2881-614b3390c371\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"refreshCommandName\",\r\n \"Name\" : \"删除后回调方法\",\r\n \"Description\" : \"可选,可以指定删除数据后的回调方法,通常用来刷新数据,例如:指定LoadList方法\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"ComboLookup\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":CommandsTree\"\r\n },\r\n \"columns\" : {\r\n \"type\" : \"array\",\r\n \"value\" : \"[{\\\"field\\\":\\\"id\\\",\\\"title\\\":\\\"Id\\\"},{\\\"field\\\":\\\"name\\\",\\\"title\\\":\\\"命令名称\\\"}]\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"db6b153b-502e-80c1-993b-2769398d73eb\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"refreshCommandFrameId\",\r\n \"Name\" : \"目标组件\",\r\n \"Description\" : \"展示数据的组件标识\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Components\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"94b71233-81a3-523e-1467-1169a5eb3973\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"ifSave\",\r\n \"Name\" : \"是否执行保存\",\r\n \"Description\" : \"可选,是否执行保存\",\r\n \"ParameterType\" : null,\r\n \"controlSource\" : null,\r\n \"Id\" : \"d4a36e7c-56b7-38d0-a0f2-c828a41f4983\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"successMsg\",\r\n \"Name\" : \"删除成功提示信息\",\r\n \"Description\" : \"可选,默认为“删除成功!”\",\r\n \"ParameterType\" : null,\r\n \"controlSource\" : null,\r\n \"Id\" : \"41bb32ed-017a-1812-8275-ed4e98d627b7\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"changePage\",\r\n \"Name\" : \"切换页码\",\r\n \"Description\" : \"一般会关联到列表组件的切换页码事件上\",\r\n \"Id\" : \"40302ced-33be-8d2f-9c4b-023b90351206\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"082a7d2e-9c28-fd81-a30b-7373a4ca1836execute\",\r\n \"itemName\" : \"执行命令\",\r\n \"Id\" : \"e0d8db77-7fda-f3e3-0033-58fb7303278e\",\r\n \"Code\" : \"execute\",\r\n \"Name\" : \"execute\",\r\n \"ComponentId\" : \"23884f6a-6387-4abe-a964-f55d56cb2911\",\r\n \"ComponentCode\" : \"CommandService\",\r\n \"ComponentName\" : \"CommandService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"082a7d2e-9c28-fd81-a30b-7373a4ca1836\",\r\n \"MethodCode\" : \"execute\",\r\n \"MethodName\" : \"执行命令\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"commandName\",\r\n \"ParamName\" : \"命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCommandName}\"\r\n }, {\r\n \"ParamCode\" : \"frameId\",\r\n \"ParamName\" : \"框架id\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCommandFrameId}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"082a7d2e-9c28-fd81-a30b-7373a4ca1836execute\",\r\n \"itemName\" : \"执行命令\",\r\n \"Id\" : \"e0d8db77-7fda-f3e3-0033-58fb7303278e\",\r\n \"Code\" : \"execute\",\r\n \"Name\" : \"execute\",\r\n \"ComponentId\" : \"23884f6a-6387-4abe-a964-f55d56cb2911\",\r\n \"ComponentCode\" : \"CommandService\",\r\n \"ComponentName\" : \"CommandService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/webcmp\",\r\n \"MethodId\" : \"082a7d2e-9c28-fd81-a30b-7373a4ca1836\",\r\n \"MethodCode\" : \"execute\",\r\n \"MethodName\" : \"执行命令\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"commandName\",\r\n \"ParamName\" : \"命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCommandName}\"\r\n }, {\r\n \"ParamCode\" : \"frameId\",\r\n \"ParamName\" : \"框架id\",\r\n \"ParamExpress\" : \"{COMMAND~/params/loadCommandFrameId}\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCommandName\",\r\n \"Name\" : \"切换页面后回调方法\",\r\n \"Description\" : \"必填,通常用来加载下一页数据,例如:指定LoadList方法\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"ComboLookup\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":CommandsTree\"\r\n },\r\n \"columns\" : {\r\n \"type\" : \"array\",\r\n \"value\" : \"[{\\\"field\\\":\\\"id\\\",\\\"title\\\":\\\"Id\\\"},{\\\"field\\\":\\\"name\\\",\\\"title\\\":\\\"命令名称\\\"}]\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"91fdf52b-de14-de9c-b073-a2fdeb4618f9\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"loadCommandFrameId\",\r\n \"Name\" : \"目标组件\",\r\n \"Description\" : \"展示数据的组件标识\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Components\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"30380609-82e7-acc3-a934-ed6d0dd2fc56\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"modify\",\r\n \"Name\" : \"获取最新并修改当前数据\",\r\n \"Description\" : \"拉取当前行最新数据,锁定并标记编辑状态\",\r\n \"Id\" : \"1275267e-953a-96b5-3807-8f531901207f\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ddf9bd80-69e9-589a-0022-da396fea356aedit\",\r\n \"itemName\" : \"编辑数据\",\r\n \"Id\" : \"bf596beb-dcfb-5a8b-4c0e-b7faf990b11e\",\r\n \"Code\" : \"edit\",\r\n \"Name\" : \"edit\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"ddf9bd80-69e9-589a-0022-da396fea356a\",\r\n \"MethodCode\" : \"edit\",\r\n \"MethodName\" : \"编辑数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"id\",\r\n \"ParamName\" : \"要编辑的数据id\",\r\n \"ParamExpress\" : null\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"ddf9bd80-69e9-589a-0022-da396fea356aedit\",\r\n \"itemName\" : \"编辑数据\",\r\n \"Id\" : \"bf596beb-dcfb-5a8b-4c0e-b7faf990b11e\",\r\n \"Code\" : \"edit\",\r\n \"Name\" : \"edit\",\r\n \"ComponentId\" : \"47f87143-231b-4d0f-b675-e3bb87ba3ba6\",\r\n \"ComponentCode\" : \"CardDataService\",\r\n \"ComponentName\" : \"CardDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"ddf9bd80-69e9-589a-0022-da396fea356a\",\r\n \"MethodCode\" : \"edit\",\r\n \"MethodName\" : \"编辑数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"id\",\r\n \"ParamName\" : \"要编辑的数据id\",\r\n \"ParamExpress\" : null\r\n } ]\r\n }\r\n }, {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"299633ea-ccda-5ea6-08be-f6fa6f771da4\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : null\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1transit\",\r\n \"itemName\" : \"迁移状态\",\r\n \"Id\" : \"299633ea-ccda-5ea6-08be-f6fa6f771da4\",\r\n \"Code\" : \"transit\",\r\n \"Name\" : \"transit\",\r\n \"ComponentId\" : \"7c8386ad-c568-46f7-bca0-4095f05c5d64\",\r\n \"ComponentCode\" : \"StateMachineService\",\r\n \"ComponentName\" : \"StateMachineService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp\",\r\n \"MethodId\" : \"6f078217-7f62-c9ac-c880-c681e502d6f1\",\r\n \"MethodCode\" : \"transit\",\r\n \"MethodName\" : \"迁移状态\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"action\",\r\n \"ParamName\" : \"迁移动作\",\r\n \"ParamExpress\" : null\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"id\",\r\n \"Name\" : \"待修改的数据标识\",\r\n \"Description\" : \"要修改的数据id\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : null,\r\n \"Id\" : \"26ee9a9d-1a38-35cf-9d24-6cdb64a948d7\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n }, {\r\n \"dict\" : null,\r\n \"uri\" : null,\r\n \"kind\" : \"DefaultOperation\",\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"Filter\",\r\n \"Name\" : \"过滤列表数据\",\r\n \"Description\" : \"过滤列表数据\",\r\n \"Id\" : \"6868e79b-8ab0-38e2-124e-03d91999eb67\",\r\n \"Items\" : [ {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"f99ddd7d-52bb-b906-767b-cba9866a3006filter\",\r\n \"itemName\" : \"过滤数据\",\r\n \"Id\" : \"355b75ca-a95c-a2cc-33f4-ebb4913ba938\",\r\n \"Code\" : \"filter\",\r\n \"Name\" : \"filter\",\r\n \"ComponentId\" : \"437ac0e1-f5cd-4728-88bf-5122d59dd1f1\",\r\n \"ComponentCode\" : \"FilterConditionDataService\",\r\n \"ComponentName\" : \"FilterConditionDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"f99ddd7d-52bb-b906-767b-cba9866a3006\",\r\n \"MethodCode\" : \"filter\",\r\n \"MethodName\" : \"过滤数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"commandName\",\r\n \"ParamName\" : \"表单数据加载命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/commandName}\"\r\n }, {\r\n \"ParamCode\" : \"frameId\",\r\n \"ParamName\" : \"命令所在的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/frameId}\"\r\n } ],\r\n \"Type\" : 0,\r\n \"Content\" : {\r\n \"itemType\" : 0,\r\n \"itemId\" : \"f99ddd7d-52bb-b906-767b-cba9866a3006filter\",\r\n \"itemName\" : \"过滤数据\",\r\n \"Id\" : \"355b75ca-a95c-a2cc-33f4-ebb4913ba938\",\r\n \"Code\" : \"filter\",\r\n \"Name\" : \"filter\",\r\n \"ComponentId\" : \"437ac0e1-f5cd-4728-88bf-5122d59dd1f1\",\r\n \"ComponentCode\" : \"FilterConditionDataService\",\r\n \"ComponentName\" : \"FilterConditionDataService\",\r\n \"ComponentPath\" : \"Gsp/Web/WebCmp/bo-webcmp/metadata/webcmp/data-services\",\r\n \"MethodId\" : \"f99ddd7d-52bb-b906-767b-cba9866a3006\",\r\n \"MethodCode\" : \"filter\",\r\n \"MethodName\" : \"过滤数据\",\r\n \"IsReplaced\" : false,\r\n \"IsBeforeExpansion\" : false,\r\n \"IsAfterExpansion\" : false,\r\n \"ParamConfigs\" : [ {\r\n \"ParamCode\" : \"commandName\",\r\n \"ParamName\" : \"表单数据加载命令名称\",\r\n \"ParamExpress\" : \"{COMMAND~/params/commandName}\"\r\n }, {\r\n \"ParamCode\" : \"frameId\",\r\n \"ParamName\" : \"命令所在的FrameId\",\r\n \"ParamExpress\" : \"{COMMAND~/params/frameId}\"\r\n } ]\r\n }\r\n } ],\r\n \"Parameters\" : [ {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"commandName\",\r\n \"Name\" : \"过滤回调方法\",\r\n \"Description\" : \"必填,通常用来加载下一页数据,例如:指定LoadList方法\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"ComboLookup\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":CommandsTree\"\r\n },\r\n \"columns\" : {\r\n \"type\" : \"array\",\r\n \"value\" : \"[{\\\"field\\\":\\\"id\\\",\\\"title\\\":\\\"Id\\\"},{\\\"field\\\":\\\"name\\\",\\\"title\\\":\\\"命令名称\\\"}]\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"b22df791-5c6c-e21c-55a2-dc97a52139ff\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n }, {\r\n \"dict\" : null,\r\n \"required\" : null,\r\n \"defaultValue\" : null,\r\n \"constraint\" : null,\r\n \"kind\" : \"DefaultParameter\",\r\n \"controlType\" : null,\r\n \"helpInfo\" : null,\r\n \"paramConstraint\" : null,\r\n \"enumCollection\" : [ ],\r\n \"extensionKeys\" : null,\r\n \"Code\" : \"frameId\",\r\n \"Name\" : \"目标组件\",\r\n \"Description\" : \"展示数据的组件标识\",\r\n \"ParameterType\" : \"string\",\r\n \"controlSource\" : {\r\n \"type\" : \"Select\",\r\n \"context\" : {\r\n \"data\" : {\r\n \"type\" : \"string\",\r\n \"value\" : \":Components\"\r\n }\r\n }\r\n },\r\n \"Id\" : \"fbbc0f4c-c149-335b-a8f9-0901341f72bd\",\r\n \"IsRetVal\" : false,\r\n \"EditorType\" : null\r\n } ]\r\n } ],\r\n \"Extends\" : {\r\n \"FormCode\" : null,\r\n \"IsCommon\" : true\r\n }\r\n}", - "extendable": false, - "refs": null, - "extented": false, - "previousVersion": null, - "version": null, - "properties": null, - "extendRule": null, - "projectName": null, - "processMode": null, - "translating": false -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/metadata/9f7177b9-c79a-4972-9bf3-b4961d77a31c.json b/packages/designer/projects/form-designer/src/assets/metadata/9f7177b9-c79a-4972-9bf3-b4961d77a31c.json deleted file mode 100644 index 0de5236972d7c60c75dc6a5d0915245ff835dca4..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/metadata/9f7177b9-c79a-4972-9bf3-b4961d77a31c.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "9f7177b9-c79a-4972-9bf3-b4961d77a31c", - "nameSpace": "Inspur.GS.igix02.cardForms.BXManage.BXManage.Front", - "code": "BXManageForm", - "name": "报销管理表单", - "fileName": "BXManageForm.frm", - "type": "Form", - "bizobjectID": "fdc16d0d-00bf-7ae8-586c-343bc0e8835f", - "language": null, - "isTranslating": false, - "relativePath": "igix02/cardForms/BXManage/bo-bxmanage-front/metadata/components", - "extendProperty": "", - "content": "{\r\n \"code\" : null,\r\n \"name\" : null,\r\n \"Contents\" : {\r\n \"module\" : {\r\n \"id\" : \"BXManageForm\",\r\n \"code\" : \"BXManageForm\",\r\n \"name\" : \"报销管理表单\",\r\n \"caption\" : \"报销管理表单\",\r\n \"type\" : \"Module\",\r\n \"creator\" : \"wang-xh\",\r\n \"creationDate\" : \"2022-11-28T02:39:04.507Z\",\r\n \"updateVersion\" : \"191104\",\r\n \"showTitle\" : true,\r\n \"bootstrap\" : \"list-card-template\",\r\n \"templateId\" : \"list-card-template\",\r\n \"schemas\" : [ {\r\n \"name\" : \"报销管理表单_frm\",\r\n \"id\" : \"118b1cc4-c09b-4865-ac8b-cf5c6ad091df\",\r\n \"code\" : \"BXManageForm_frm\",\r\n \"sourceType\" : \"vo\",\r\n \"variables\" : [ ],\r\n \"entities\" : [ {\r\n \"name\" : \"费用报销单\",\r\n \"id\" : \"8c7be7b5-7f06-48a5-b1d6-68bcb28d6e58\",\r\n \"type\" : {\r\n \"$type\" : \"EntityType\",\r\n \"fields\" : [ {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : true,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"主键\",\r\n \"id\" : \"24f2c625-d639-4df1-94ec-35cdf45364c4\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ID\",\r\n \"code\" : \"ID\",\r\n \"originalId\" : \"24f2c625-d639-4df1-94ec-35cdf45364c4\",\r\n \"label\" : \"id\",\r\n \"bindingPath\" : \"id\",\r\n \"bindingField\" : \"id\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"版本\",\r\n \"id\" : \"5bdd20cf-8042-4488-8c7b-52d2712f4fe1\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"Version\",\r\n \"code\" : \"Version\",\r\n \"originalId\" : \"5bdd20cf-8042-4488-8c7b-52d2712f4fe1\",\r\n \"label\" : \"version\",\r\n \"bindingPath\" : \"version\",\r\n \"bindingField\" : \"version\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报销人员\",\r\n \"id\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"EmployeeID\",\r\n \"code\" : \"EmployeeID\",\r\n \"originalId\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\",\r\n \"label\" : \"employeeID\",\r\n \"bindingPath\" : \"employeeID\",\r\n \"bindingField\" : \"employeeID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"所属部门\",\r\n \"id\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"DomainID\",\r\n \"code\" : \"DomainID\",\r\n \"originalId\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\",\r\n \"label\" : \"domainID\",\r\n \"bindingPath\" : \"domainID\",\r\n \"bindingField\" : \"domainID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"单据编号\",\r\n \"id\" : \"17e2a5ec-747a-4897-a218-4c741b2adb47\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"BillCode\",\r\n \"code\" : \"BillCode\",\r\n \"originalId\" : \"17e2a5ec-747a-4897-a218-4c741b2adb47\",\r\n \"label\" : \"billCode\",\r\n \"bindingPath\" : \"billCode\",\r\n \"bindingField\" : \"billCode\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"NumericBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报帐金额\",\r\n \"id\" : \"8eb4ed23-9c00-48e0-8d16-2653a5ad7db1\",\r\n \"type\" : {\r\n \"$type\" : \"NumericType\",\r\n \"length\" : 18,\r\n \"name\" : \"Number\",\r\n \"displayName\" : \"数字\",\r\n \"precision\" : 2\r\n },\r\n \"path\" : \"TotalSum\",\r\n \"code\" : \"TotalSum\",\r\n \"originalId\" : \"8eb4ed23-9c00-48e0-8d16-2653a5ad7db1\",\r\n \"label\" : \"totalSum\",\r\n \"bindingPath\" : \"totalSum\",\r\n \"bindingField\" : \"totalSum\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报销类型\",\r\n \"id\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 1,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"BillType\",\r\n \"code\" : \"BillType\",\r\n \"originalId\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\",\r\n \"label\" : \"billType\",\r\n \"bindingPath\" : \"billType\",\r\n \"bindingField\" : \"billType\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"制单日期\",\r\n \"id\" : \"d441b569-59a3-402f-bec2-9ad4906355a2\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"BillDate\",\r\n \"code\" : \"BillDate\",\r\n \"originalId\" : \"d441b569-59a3-402f-bec2-9ad4906355a2\",\r\n \"label\" : \"billDate\",\r\n \"bindingPath\" : \"billDate\",\r\n \"bindingField\" : \"billDate\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"密级ID\",\r\n \"id\" : \"60747b48-1330-4a0d-bc05-19fa74863fc9\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"SecID\",\r\n \"code\" : \"SecID\",\r\n \"originalId\" : \"60747b48-1330-4a0d-bc05-19fa74863fc9\",\r\n \"label\" : \"secID\",\r\n \"bindingPath\" : \"secID\",\r\n \"bindingField\" : \"secID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"NumericBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"密级\",\r\n \"id\" : \"f76619c5-aa37-43e7-bda8-642fb47b243a\",\r\n \"type\" : {\r\n \"$type\" : \"NumericType\",\r\n \"length\" : 0,\r\n \"name\" : \"Number\",\r\n \"displayName\" : \"数字\",\r\n \"precision\" : 0\r\n },\r\n \"path\" : \"SecLevel\",\r\n \"code\" : \"SecLevel\",\r\n \"originalId\" : \"f76619c5-aa37-43e7-bda8-642fb47b243a\",\r\n \"label\" : \"secLevel\",\r\n \"bindingPath\" : \"secLevel\",\r\n \"bindingField\" : \"secLevel\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"所属项目\",\r\n \"id\" : \"ab85b80b-2527-49fc-97cc-2e6e764c1892\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ProjectID\",\r\n \"code\" : \"ProjectID\",\r\n \"originalId\" : \"ab85b80b-2527-49fc-97cc-2e6e764c1892\",\r\n \"label\" : \"projectID\",\r\n \"bindingPath\" : \"projectID\",\r\n \"bindingField\" : \"projectID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"MultiTextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报销说明\",\r\n \"id\" : \"2fa573fb-cda6-4155-8f9a-a196abc1ac1c\",\r\n \"type\" : {\r\n \"$type\" : \"TextType\",\r\n \"length\" : 2000,\r\n \"name\" : \"Text\",\r\n \"displayName\" : \"文本\"\r\n },\r\n \"path\" : \"BillNote\",\r\n \"code\" : \"BillNote\",\r\n \"originalId\" : \"2fa573fb-cda6-4155-8f9a-a196abc1ac1c\",\r\n \"label\" : \"billNote\",\r\n \"bindingPath\" : \"billNote\",\r\n \"bindingField\" : \"billNote\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"项目经理\",\r\n \"id\" : \"69d7b966-b12d-43f6-8e67-cf4c86248203\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ProjectMrg\",\r\n \"code\" : \"ProjectMrg\",\r\n \"originalId\" : \"69d7b966-b12d-43f6-8e67-cf4c86248203\",\r\n \"label\" : \"projectMrg\",\r\n \"bindingPath\" : \"projectMrg\",\r\n \"bindingField\" : \"projectMrg\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"稽核状态\",\r\n \"id\" : \"0016d084-cc12-4693-b298-951df72c7ec0\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 1,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"AuditStatus\",\r\n \"code\" : \"AuditStatus\",\r\n \"originalId\" : \"0016d084-cc12-4693-b298-951df72c7ec0\",\r\n \"label\" : \"auditStatus\",\r\n \"bindingPath\" : \"auditStatus\",\r\n \"bindingField\" : \"auditStatus\"\r\n } ],\r\n \"primary\" : \"id\",\r\n \"entities\" : [ {\r\n \"name\" : \"费用报销单明细\",\r\n \"id\" : \"7d9bcad9-f61d-44c7-8797-90ed2d32a4e5\",\r\n \"type\" : {\r\n \"$type\" : \"EntityType\",\r\n \"fields\" : [ {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : true,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"主键\",\r\n \"id\" : \"cb85a25f-1cfd-40c5-a36f-9346f4bfc10a\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ID\",\r\n \"code\" : \"ID\",\r\n \"originalId\" : \"cb85a25f-1cfd-40c5-a36f-9346f4bfc10a\",\r\n \"label\" : \"id\",\r\n \"bindingPath\" : \"id\",\r\n \"bindingField\" : \"id\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : true,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"上级对象主键\",\r\n \"id\" : \"6a52b125-d898-4cc3-8b50-d070adce7a63\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ParentID\",\r\n \"code\" : \"ParentID\",\r\n \"originalId\" : \"6a52b125-d898-4cc3-8b50-d070adce7a63\",\r\n \"label\" : \"parentID\",\r\n \"bindingPath\" : \"parentID\",\r\n \"bindingField\" : \"parentID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"费用日期\",\r\n \"id\" : \"e1a971e1-73d5-45e0-b77a-5fa88fd7d143\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"BillDetailDate\",\r\n \"code\" : \"BillDetailDate\",\r\n \"originalId\" : \"e1a971e1-73d5-45e0-b77a-5fa88fd7d143\",\r\n \"label\" : \"billDetailDate\",\r\n \"bindingPath\" : \"billDetailDate\",\r\n \"bindingField\" : \"billDetailDate\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"NumericBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报销金额\",\r\n \"id\" : \"f5904943-b1fc-4860-a2b8-2586fbc32074\",\r\n \"type\" : {\r\n \"$type\" : \"NumericType\",\r\n \"length\" : 18,\r\n \"name\" : \"Number\",\r\n \"displayName\" : \"数字\",\r\n \"precision\" : 2\r\n },\r\n \"path\" : \"BillDetailAmount\",\r\n \"code\" : \"BillDetailAmount\",\r\n \"originalId\" : \"f5904943-b1fc-4860-a2b8-2586fbc32074\",\r\n \"label\" : \"billDetailAmount\",\r\n \"bindingPath\" : \"billDetailAmount\",\r\n \"bindingField\" : \"billDetailAmount\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"MultiTextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"费用说明\",\r\n \"id\" : \"23091d80-7169-4827-b9a9-9bf208faef6c\",\r\n \"type\" : {\r\n \"$type\" : \"TextType\",\r\n \"length\" : 0,\r\n \"name\" : \"Text\",\r\n \"displayName\" : \"文本\"\r\n },\r\n \"path\" : \"BillDetailNote\",\r\n \"code\" : \"BillDetailNote\",\r\n \"originalId\" : \"23091d80-7169-4827-b9a9-9bf208faef6c\",\r\n \"label\" : \"billDetailNote\",\r\n \"bindingPath\" : \"billDetailNote\",\r\n \"bindingField\" : \"billDetailNote\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"发票号码\",\r\n \"id\" : \"8e5cb06e-27c7-484b-9e33-320f56102ebb\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"InvoiceNO\",\r\n \"code\" : \"InvoiceNO\",\r\n \"originalId\" : \"8e5cb06e-27c7-484b-9e33-320f56102ebb\",\r\n \"label\" : \"invoiceNO\",\r\n \"bindingPath\" : \"invoiceNO\",\r\n \"bindingField\" : \"invoiceNO\"\r\n } ],\r\n \"primary\" : \"id\",\r\n \"entities\" : [ ],\r\n \"name\" : \"FYBXDMXManage\",\r\n \"displayName\" : \"费用报销单明细\"\r\n },\r\n \"code\" : \"FYBXDMXManage\",\r\n \"label\" : \"fybxdmxManages\"\r\n }, {\r\n \"name\" : \"费用报销借款明细\",\r\n \"id\" : \"0968df8c-9485-40ad-8be3-1982ba08e3da\",\r\n \"type\" : {\r\n \"$type\" : \"EntityType\",\r\n \"fields\" : [ {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : true,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"主键\",\r\n \"id\" : \"d0c04cce-07b6-4fd7-8cbe-d747f016d5fa\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ID\",\r\n \"code\" : \"ID\",\r\n \"originalId\" : \"d0c04cce-07b6-4fd7-8cbe-d747f016d5fa\",\r\n \"label\" : \"id\",\r\n \"bindingPath\" : \"id\",\r\n \"bindingField\" : \"id\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : true,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"上级对象主键\",\r\n \"id\" : \"7ce1f915-0da9-4cc5-bd35-c27c16ff15e7\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"ParentID\",\r\n \"code\" : \"ParentID\",\r\n \"originalId\" : \"7ce1f915-0da9-4cc5-bd35-c27c16ff15e7\",\r\n \"label\" : \"parentID\",\r\n \"bindingPath\" : \"parentID\",\r\n \"bindingField\" : \"parentID\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"内码\",\r\n \"id\" : \"2db3aa34-92af-4065-9877-d76bbe2f8c1c\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"JKD_NM\",\r\n \"code\" : \"JKD_NM\",\r\n \"originalId\" : \"2db3aa34-92af-4065-9877-d76bbe2f8c1c\",\r\n \"label\" : \"jkD_NM\",\r\n \"bindingPath\" : \"jkD_NM\",\r\n \"bindingField\" : \"jkD_NM\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"报销单内码\",\r\n \"id\" : \"7d7fe9ab-1741-4c69-88ce-8fbbcbde703e\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"JKD_BXDNM\",\r\n \"code\" : \"JKD_BXDNM\",\r\n \"originalId\" : \"7d7fe9ab-1741-4c69-88ce-8fbbcbde703e\",\r\n \"label\" : \"jkD_BXDNM\",\r\n \"bindingPath\" : \"jkD_BXDNM\",\r\n \"bindingField\" : \"jkD_BXDNM\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"借款单编号\",\r\n \"id\" : \"f7549bfa-1915-4cdd-b5e8-197dae666d80\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"JKD_BH\",\r\n \"code\" : \"JKD_BH\",\r\n \"originalId\" : \"f7549bfa-1915-4cdd-b5e8-197dae666d80\",\r\n \"label\" : \"jkD_BH\",\r\n \"bindingPath\" : \"jkD_BH\",\r\n \"bindingField\" : \"jkD_BH\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"借款人\",\r\n \"id\" : \"863822f1-d86d-4995-974f-be51745cbcfb\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 36,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"JKD_JKR\",\r\n \"code\" : \"JKD_JKR\",\r\n \"originalId\" : \"863822f1-d86d-4995-974f-be51745cbcfb\",\r\n \"label\" : \"jkD_JKR\",\r\n \"bindingPath\" : \"jkD_JKR\",\r\n \"bindingField\" : \"jkD_JKR\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"NumericBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"借款金额\",\r\n \"id\" : \"6923d7d5-be7f-4e1b-abcf-917399c47bf1\",\r\n \"type\" : {\r\n \"$type\" : \"NumericType\",\r\n \"length\" : 20,\r\n \"name\" : \"Number\",\r\n \"displayName\" : \"数字\",\r\n \"precision\" : 8\r\n },\r\n \"path\" : \"JKD_JKJE\",\r\n \"code\" : \"JKD_JKJE\",\r\n \"originalId\" : \"6923d7d5-be7f-4e1b-abcf-917399c47bf1\",\r\n \"label\" : \"jkD_JKJE\",\r\n \"bindingPath\" : \"jkD_JKJE\",\r\n \"bindingField\" : \"jkD_JKJE\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"借款日期\",\r\n \"id\" : \"4d48add9-842a-470f-8df9-c43c8ee969fe\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"JKD_JKRQ\",\r\n \"code\" : \"JKD_JKRQ\",\r\n \"originalId\" : \"4d48add9-842a-470f-8df9-c43c8ee969fe\",\r\n \"label\" : \"jkD_JKRQ\",\r\n \"bindingPath\" : \"jkD_JKRQ\",\r\n \"bindingField\" : \"jkD_JKRQ\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"还款日期\",\r\n \"id\" : \"ef951dd7-73f8-4bae-beb7-df49e4bbd5c8\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"JKD_HKRQ\",\r\n \"code\" : \"JKD_HKRQ\",\r\n \"originalId\" : \"ef951dd7-73f8-4bae-beb7-df49e4bbd5c8\",\r\n \"label\" : \"jkD_HKRQ\",\r\n \"bindingPath\" : \"jkD_HKRQ\",\r\n \"bindingField\" : \"jkD_HKRQ\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"MultiTextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"备注\",\r\n \"id\" : \"877393cc-d5c1-4293-b3fa-7997869fefe9\",\r\n \"type\" : {\r\n \"$type\" : \"TextType\",\r\n \"length\" : 0,\r\n \"name\" : \"Text\",\r\n \"displayName\" : \"文本\"\r\n },\r\n \"path\" : \"JKD_NOTE\",\r\n \"code\" : \"JKD_NOTE\",\r\n \"originalId\" : \"877393cc-d5c1-4293-b3fa-7997869fefe9\",\r\n \"label\" : \"jkD_NOTE\",\r\n \"bindingPath\" : \"jkD_NOTE\",\r\n \"bindingField\" : \"jkD_NOTE\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"创建人\",\r\n \"id\" : \"1c27f7c8-569a-42eb-a71b-b75510f0ddec\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 128,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"Creator\",\r\n \"code\" : \"Creator\",\r\n \"originalId\" : \"1c27f7c8-569a-42eb-a71b-b75510f0ddec\",\r\n \"label\" : \"creator\",\r\n \"bindingPath\" : \"creator\",\r\n \"bindingField\" : \"creator\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"创建时间\",\r\n \"id\" : \"a7df6ca1-e701-43f0-9a0a-fdcadf7bb492\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"CreatedDate\",\r\n \"code\" : \"CreatedDate\",\r\n \"originalId\" : \"a7df6ca1-e701-43f0-9a0a-fdcadf7bb492\",\r\n \"label\" : \"createdDate\",\r\n \"bindingPath\" : \"createdDate\",\r\n \"bindingField\" : \"createdDate\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"TextBox\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"最后修改人\",\r\n \"id\" : \"cd302327-c4b3-451e-8a05-7f0525f9c2e2\",\r\n \"type\" : {\r\n \"$type\" : \"StringType\",\r\n \"length\" : 128,\r\n \"name\" : \"String\",\r\n \"displayName\" : \"字符串\"\r\n },\r\n \"path\" : \"LastModifier\",\r\n \"code\" : \"LastModifier\",\r\n \"originalId\" : \"cd302327-c4b3-451e-8a05-7f0525f9c2e2\",\r\n \"label\" : \"lastModifier\",\r\n \"bindingPath\" : \"lastModifier\",\r\n \"bindingField\" : \"lastModifier\"\r\n }, {\r\n \"$type\" : \"SimpleField\",\r\n \"defaultValue\" : \"\",\r\n \"require\" : false,\r\n \"multiLanguage\" : false,\r\n \"editor\" : {\r\n \"$type\" : \"DateBox\",\r\n \"format\" : \"'yyyy-MM-dd'\"\r\n },\r\n \"readonly\" : false,\r\n \"name\" : \"最后修改时间\",\r\n \"id\" : \"32877bcc-6a22-4c6b-95a4-cc8a3b22bd0a\",\r\n \"type\" : {\r\n \"$type\" : \"DateTimeType\",\r\n \"name\" : \"DateTime\",\r\n \"displayName\" : \"日期时间\"\r\n },\r\n \"path\" : \"LastModifiedDate\",\r\n \"code\" : \"LastModifiedDate\",\r\n \"originalId\" : \"32877bcc-6a22-4c6b-95a4-cc8a3b22bd0a\",\r\n \"label\" : \"lastModifiedDate\",\r\n \"bindingPath\" : \"lastModifiedDate\",\r\n \"bindingField\" : \"lastModifiedDate\"\r\n } ],\r\n \"primary\" : \"id\",\r\n \"entities\" : [ ],\r\n \"name\" : \"FYBXJKMXManage\",\r\n \"displayName\" : \"费用报销借款明细\"\r\n },\r\n \"code\" : \"FYBXJKMXManage\",\r\n \"label\" : \"fybxjkmxManages\"\r\n } ],\r\n \"name\" : \"FYBXDManage\",\r\n \"displayName\" : \"费用报销单\"\r\n },\r\n \"code\" : \"FYBXDManage\",\r\n \"label\" : \"fybxdManages\"\r\n } ],\r\n \"extendProperties\" : {\r\n \"enableStdTimeFormat\" : true\r\n },\r\n \"sourceUri\" : \"api/igix02/cardforms/v1.0/BXManageForm_frm\",\r\n \"eapiId\" : \"ade04c74-b8c9-4cb4-a3c6-50b298da2a40\",\r\n \"voPath\" : \"igix02/cardForms/BXManage/bo-bxmanage-front/metadata/components\",\r\n \"voNameSpace\" : \"Inspur.GS.igix02.cardForms.BXManage.BXManage.Front\",\r\n \"eapiCode\" : \"BXManageForm_frm\",\r\n \"eapiName\" : \"报销管理表单_frm\",\r\n \"eapiNameSpace\" : \"Inspur.GS.igix02.cardForms.BXManage.BXManage.Front\"\r\n } ],\r\n \"states\" : [ ],\r\n \"contents\" : [ ],\r\n \"stateMachines\" : [ {\r\n \"id\" : \"BXManageForm_state_machine\",\r\n \"name\" : \"报销管理表单状态机\",\r\n \"uri\" : \"ec3bea5c-e15c-4244-a7c6-9b6c8a4f3c82\",\r\n \"nameSpace\" : \"Inspur.GS.igix02.cardForms.BXManage.BXManage.Front\",\r\n \"code\" : \"BXManageForm_frm\"\r\n } ],\r\n \"viewmodels\" : [ {\r\n \"id\" : \"root-viewmodel\",\r\n \"code\" : \"root-viewmodel\",\r\n \"name\" : \"费用报销单\",\r\n \"fields\" : [ ],\r\n \"stateMachine\" : \"BXManageForm_state_machine\",\r\n \"serviceRefs\" : [ ],\r\n \"commands\" : [ ],\r\n \"states\" : [ ],\r\n \"bindTo\" : \"/\",\r\n \"enableUnifiedSession\" : false\r\n }, {\r\n \"id\" : \"data-grid-component-viewmodel\",\r\n \"code\" : \"data-grid-component-viewmodel\",\r\n \"name\" : \"费用报销单\",\r\n \"fields\" : [ {\r\n \"type\" : \"Form\",\r\n \"id\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\",\r\n \"fieldName\" : \"employeeID\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\",\r\n \"fieldName\" : \"domainID\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\",\r\n \"fieldName\" : \"billType\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n } ],\r\n \"commands\" : [ {\r\n \"id\" : \"fda876c8-7230-46e7-af3d-d38233642275\",\r\n \"code\" : \"loadList1\",\r\n \"name\" : \"加载列表数据\",\r\n \"params\" : [ {\r\n \"name\" : \"filter\",\r\n \"shownName\" : \"过滤条件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"sort\",\r\n \"shownName\" : \"排序条件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"loadList\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"22576fc1-08fb-49a9-b132-295c7392b481\",\r\n \"code\" : \"remove1\",\r\n \"name\" : \"删除当前数据\",\r\n \"params\" : [ {\r\n \"name\" : \"id\",\r\n \"shownName\" : \"待删除数据的标识\",\r\n \"value\" : \"{DATA~/data-grid-component/id}\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"refreshCommandName\",\r\n \"shownName\" : \"删除后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"refreshCommandFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"ifSave\",\r\n \"shownName\" : \"是否执行保存\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"successMsg\",\r\n \"shownName\" : \"删除成功提示信息\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"remove\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"8788c27e-722a-4b98-9d57-98eafb526fe5\",\r\n \"code\" : \"loadCard1\",\r\n \"name\" : \"加载卡片数据\",\r\n \"params\" : [ ],\r\n \"handlerName\" : \"loadCard\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"ef281c13-4480-4256-901e-4bef5f92bd9e\",\r\n \"code\" : \"add1\",\r\n \"name\" : \"新增一条数据\",\r\n \"params\" : [ ],\r\n \"handlerName\" : \"add\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"e7cf83c2-e52d-4dce-aded-047a819c8068\",\r\n \"code\" : \"changePage1\",\r\n \"name\" : \"切换页码\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCommandName\",\r\n \"shownName\" : \"切换页面后回调方法\",\r\n \"value\" : \"loadList1\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCommandFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"data-grid-component\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"changePage\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n } ],\r\n \"serviceRefs\" : [ ],\r\n \"states\" : [ ],\r\n \"bindTo\" : \"/\",\r\n \"parent\" : \"root-viewmodel\",\r\n \"pagination\" : {\r\n \"enable\" : true,\r\n \"pageSize\" : 20,\r\n \"pageList\" : \"10,20,30,50,100\"\r\n },\r\n \"enableValidation\" : false\r\n }, {\r\n \"id\" : \"detail-form-component-viewmodel\",\r\n \"code\" : \"detail-form-component-viewmodel\",\r\n \"name\" : \"费用报销单\",\r\n \"fields\" : [ {\r\n \"type\" : \"Form\",\r\n \"id\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\",\r\n \"fieldName\" : \"employeeID\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\",\r\n \"fieldName\" : \"domainID\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"8eb4ed23-9c00-48e0-8d16-2653a5ad7db1\",\r\n \"fieldName\" : \"totalSum\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\",\r\n \"fieldName\" : \"billType\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"ab85b80b-2527-49fc-97cc-2e6e764c1892\",\r\n \"fieldName\" : \"projectID\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"2fa573fb-cda6-4155-8f9a-a196abc1ac1c\",\r\n \"fieldName\" : \"billNote\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"69d7b966-b12d-43f6-8e67-cf4c86248203\",\r\n \"fieldName\" : \"projectMrg\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\"\r\n } ],\r\n \"commands\" : [ {\r\n \"id\" : \"d12acc4e-6274-44dc-95e6-cedeb5e66707\",\r\n \"code\" : \"edit1\",\r\n \"name\" : \"编辑数据\",\r\n \"params\" : [ {\r\n \"name\" : \"id\",\r\n \"shownName\" : \"待编辑数据的标识\",\r\n \"value\" : \"{DATA~/detail-form-component/id}\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"transitionAction\",\r\n \"shownName\" : \"状态机动作\",\r\n \"value\" : \"Edit\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"edit\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"5707d460-c441-45c4-8fe1-f77abd9f75b1\",\r\n \"code\" : \"save1\",\r\n \"name\" : \"保存变更\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCmdName\",\r\n \"shownName\" : \"保存后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCmdFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"successMsg\",\r\n \"shownName\" : \"保存成功提示信息\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"save\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n }, {\r\n \"id\" : \"b3897b4b-a37f-48e3-afb3-8489cec02806\",\r\n \"code\" : \"cancel1\",\r\n \"name\" : \"取消变更\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCmdName\",\r\n \"shownName\" : \"取消后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCmdFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"handlerName\" : \"cancel\",\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"shortcut\" : { },\r\n \"extensions\" : [ ],\r\n \"isInvalid\" : false\r\n } ],\r\n \"serviceRefs\" : [ ],\r\n \"states\" : [ ],\r\n \"bindTo\" : \"/\",\r\n \"parent\" : \"root-viewmodel\",\r\n \"enableValidation\" : true\r\n }, {\r\n \"id\" : \"fybxdmxmanage-em1n-component-viewmodel\",\r\n \"code\" : \"fybxdmxmanage-em1n-component-viewmodel\",\r\n \"name\" : \"费用报销单明细\",\r\n \"bindTo\" : \"/fybxdmxManages\",\r\n \"parent\" : \"root-viewmodel\",\r\n \"fields\" : [ {\r\n \"type\" : \"Form\",\r\n \"id\" : \"e1a971e1-73d5-45e0-b77a-5fa88fd7d143\",\r\n \"fieldName\" : \"billDetailDate\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\",\r\n \"fieldSchema\" : { }\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"f5904943-b1fc-4860-a2b8-2586fbc32074\",\r\n \"fieldName\" : \"billDetailAmount\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\",\r\n \"fieldSchema\" : { }\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"8e5cb06e-27c7-484b-9e33-320f56102ebb\",\r\n \"fieldName\" : \"invoiceNO\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\",\r\n \"fieldSchema\" : { }\r\n }, {\r\n \"type\" : \"Form\",\r\n \"id\" : \"23091d80-7169-4827-b9a9-9bf208faef6c\",\r\n \"fieldName\" : \"billDetailNote\",\r\n \"groupId\" : null,\r\n \"groupName\" : null,\r\n \"updateOn\" : \"blur\",\r\n \"fieldSchema\" : { }\r\n } ],\r\n \"commands\" : [ ],\r\n \"states\" : [ ],\r\n \"enableValidation\" : true,\r\n \"pagination\" : {\r\n \"enable\" : false\r\n }\r\n } ],\r\n \"components\" : [ {\r\n \"id\" : \"root-component\",\r\n \"type\" : \"Component\",\r\n \"componentType\" : \"Frame\",\r\n \"viewModel\" : \"root-viewmodel\",\r\n \"onInit\" : \"\",\r\n \"contents\" : [ {\r\n \"id\" : \"root-layout\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page f-page-navigate f-page-is-grid-card\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"page-header\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page-header\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"header-nav\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page-header-base\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"header-title-container\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-title\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"page-header-title\",\r\n \"type\" : \"HtmlTemplate\",\r\n \"html\" : \"

    报销管理

    \"\r\n } ],\r\n \"visible\" : true,\r\n \"isScrollspyContainer\" : false,\r\n \"draggable\" : false,\r\n \"isLikeCardContainer\" : false\r\n }, {\r\n \"id\" : \"page-header-toolbar\",\r\n \"type\" : \"ToolBar\",\r\n \"appearance\" : {\r\n \"class\" : \"col-7 f-toolbar\"\r\n },\r\n \"size\" : null,\r\n \"items\" : [ {\r\n \"id\" : \"button-add\",\r\n \"type\" : \"ToolBarItem\",\r\n \"appearance\" : {\r\n \"class\" : \"btn-primary\"\r\n },\r\n \"disable\" : \"!viewModel.stateMachine['canAdd']\",\r\n \"text\" : \"新增\",\r\n \"visible\" : true,\r\n \"click\" : \"root-viewmodel.data-grid-component-viewmodel.add1\",\r\n \"items\" : [ ],\r\n \"usageMode\" : \"button\",\r\n \"modalConfig\" : null\r\n }, {\r\n \"id\" : \"button-edit\",\r\n \"type\" : \"ToolBarItem\",\r\n \"appearance\" : null,\r\n \"disable\" : \"!viewModel.stateMachine['canEdit']\",\r\n \"text\" : \"编辑\",\r\n \"visible\" : true,\r\n \"click\" : \"root-viewmodel.detail-form-component-viewmodel.edit1\",\r\n \"items\" : [ ],\r\n \"usageMode\" : \"button\",\r\n \"modalConfig\" : null\r\n }, {\r\n \"id\" : \"button-save\",\r\n \"type\" : \"ToolBarItem\",\r\n \"appearance\" : null,\r\n \"disable\" : \"!viewModel.stateMachine['canSave']\",\r\n \"text\" : \"保存\",\r\n \"visible\" : true,\r\n \"click\" : \"root-viewmodel.detail-form-component-viewmodel.save1\",\r\n \"items\" : [ ],\r\n \"usageMode\" : \"button\",\r\n \"modalConfig\" : null\r\n }, {\r\n \"id\" : \"button-cancel\",\r\n \"type\" : \"ToolBarItem\",\r\n \"appearance\" : null,\r\n \"disable\" : \"!viewModel.stateMachine['canCancel']\",\r\n \"text\" : \"取消\",\r\n \"visible\" : true,\r\n \"click\" : \"root-viewmodel.detail-form-component-viewmodel.cancel1\",\r\n \"items\" : [ ],\r\n \"usageMode\" : \"button\",\r\n \"modalConfig\" : null\r\n }, {\r\n \"id\" : \"button-delete\",\r\n \"type\" : \"ToolBarItem\",\r\n \"appearance\" : null,\r\n \"disable\" : \"!viewModel.stateMachine['canRemove']\",\r\n \"text\" : \"删除\",\r\n \"visible\" : true,\r\n \"click\" : \"root-viewmodel.data-grid-component-viewmodel.remove1\",\r\n \"items\" : [ ],\r\n \"usageMode\" : \"button\",\r\n \"modalConfig\" : null\r\n } ],\r\n \"visible\" : true,\r\n \"buttonSize\" : \"default\",\r\n \"popDirection\" : \"default\"\r\n } ],\r\n \"visible\" : true,\r\n \"isScrollspyContainer\" : false,\r\n \"draggable\" : false,\r\n \"isLikeCardContainer\" : false\r\n } ],\r\n \"visible\" : true,\r\n \"isScrollspyContainer\" : false,\r\n \"draggable\" : false,\r\n \"isLikeCardContainer\" : false\r\n }, {\r\n \"id\" : \"main-container\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page-main\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"content-splitter\",\r\n \"type\" : \"Splitter\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page-content\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"content-list\",\r\n \"type\" : \"SplitterPane\",\r\n \"appearance\" : {\r\n \"class\" : \"f-col-w6 f-page-content-nav\"\r\n },\r\n \"size\" : null,\r\n \"resizable\" : true,\r\n \"resizeHandlers\" : \"e\",\r\n \"contents\" : [ {\r\n \"id\" : \"data-grid-component-ref\",\r\n \"type\" : \"ComponentRef\",\r\n \"component\" : \"data-grid-component\",\r\n \"visible\" : true\r\n } ],\r\n \"visible\" : true\r\n }, {\r\n \"id\" : \"content-main\",\r\n \"type\" : \"SplitterPane\",\r\n \"appearance\" : {\r\n \"class\" : \"f-page-content-main\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"detail-component-ref\",\r\n \"type\" : \"ComponentRef\",\r\n \"component\" : \"detail-form-component\",\r\n \"visible\" : true\r\n }, {\r\n \"id\" : \"container_7810\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-struct-wrapper\"\r\n },\r\n \"visible\" : true,\r\n \"contents\" : [ {\r\n \"id\" : \"section_7810\",\r\n \"type\" : \"Section\",\r\n \"appearance\" : {\r\n \"class\" : \"f-section-tabs f-section-in-main\"\r\n },\r\n \"visible\" : true,\r\n \"mainTitle\" : \"主标题\",\r\n \"subTitle\" : \"\",\r\n \"headerClass\" : \"\",\r\n \"titleClass\" : \"\",\r\n \"extendedHeaderAreaClass\" : \"\",\r\n \"toolbarClass\" : \"\",\r\n \"extendedAreaClass\" : \"\",\r\n \"contentTemplateClass\" : \"\",\r\n \"fill\" : false,\r\n \"expanded\" : true,\r\n \"enableMaximize\" : false,\r\n \"enableAccordion\" : true,\r\n \"accordionMode\" : \"default\",\r\n \"showHeader\" : false,\r\n \"headerTemplate\" : \"\",\r\n \"titleTemplate\" : \"\",\r\n \"extendedHeaderAreaTemplate\" : \"\",\r\n \"toolbarTemplate\" : \"\",\r\n \"extendedAreaTemplate\" : \"\",\r\n \"contents\" : [ {\r\n \"id\" : \"tab_7810\",\r\n \"type\" : \"Tab\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"f-component-tabs\"\r\n },\r\n \"selected\" : \"tabpage_7810\",\r\n \"size\" : null,\r\n \"position\" : \"top\",\r\n \"contentFill\" : false,\r\n \"autoTitleWidth\" : true,\r\n \"titleLength\" : 7,\r\n \"contents\" : [ {\r\n \"id\" : \"tabpage_7810\",\r\n \"type\" : \"TabPage\",\r\n \"controlSource\" : \"Farris\",\r\n \"title\" : \"费用报销明细\",\r\n \"appearance\" : null,\r\n \"size\" : null,\r\n \"removeable\" : false,\r\n \"headerTemplate\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"fybxdmxmanage-em1n-component-ref\",\r\n \"type\" : \"ComponentRef\",\r\n \"component\" : \"fybxdmxmanage-em1n-component\",\r\n \"visible\" : true\r\n } ],\r\n \"toolbar\" : {\r\n \"id\" : \"tab_toolbar_7810\",\r\n \"type\" : \"TabToolbar\",\r\n \"position\" : \"inHead\",\r\n \"contents\" : [ ]\r\n },\r\n \"enableExtend\" : false,\r\n \"extendTemplate\" : \"\",\r\n \"visible\" : true\r\n } ],\r\n \"tabChange\" : null,\r\n \"tabRemove\" : null,\r\n \"visible\" : true,\r\n \"beforeSelect\" : null,\r\n \"currentTabPageInDesignerView\" : \"tabpage_7810\"\r\n } ],\r\n \"isScrollSpyItem\" : false,\r\n \"toolbar\" : {\r\n \"type\" : \"SectionToolbar\",\r\n \"position\" : \"inHead\",\r\n \"contents\" : [ ]\r\n }\r\n } ],\r\n \"isScrollspyContainer\" : false,\r\n \"isLikeCardContainer\" : false\r\n } ],\r\n \"visible\" : true,\r\n \"resizable\" : false,\r\n \"resizeHandlers\" : \"\"\r\n } ],\r\n \"visible\" : true,\r\n \"orientation\" : \"horizontal\"\r\n } ],\r\n \"visible\" : true,\r\n \"isScrollspyContainer\" : false,\r\n \"draggable\" : false,\r\n \"isLikeCardContainer\" : false\r\n } ],\r\n \"visible\" : true,\r\n \"isScrollspyContainer\" : false,\r\n \"draggable\" : false,\r\n \"isLikeCardContainer\" : false\r\n } ],\r\n \"appearance\" : null,\r\n \"visible\" : true,\r\n \"afterViewInit\" : null\r\n }, {\r\n \"id\" : \"data-grid-component\",\r\n \"type\" : \"Component\",\r\n \"componentType\" : \"dataGrid\",\r\n \"viewModel\" : \"data-grid-component-viewmodel\",\r\n \"appearance\" : {\r\n \"class\" : \"f-struct-wrapper f-utils-fill-flex-column\"\r\n },\r\n \"onInit\" : \"loadList1\",\r\n \"contents\" : [ {\r\n \"id\" : \"data-grid-section\",\r\n \"type\" : \"Section\",\r\n \"appearance\" : {\r\n \"class\" : \"f-section-grid f-section-in-nav\"\r\n },\r\n \"size\" : null,\r\n \"visible\" : true,\r\n \"mainTitle\" : \"\",\r\n \"subTitle\" : \"\",\r\n \"headerClass\" : \"\",\r\n \"titleClass\" : \"\",\r\n \"extendedHeaderAreaClass\" : \"\",\r\n \"toolbarClass\" : \"\",\r\n \"extendedAreaClass\" : \"\",\r\n \"contentTemplateClass\" : \"\",\r\n \"fill\" : false,\r\n \"expanded\" : true,\r\n \"enableMaximize\" : true,\r\n \"enableAccordion\" : true,\r\n \"accordionMode\" : \"default\",\r\n \"showHeader\" : false,\r\n \"headerTemplate\" : \"\",\r\n \"titleTemplate\" : \"\",\r\n \"extendedHeaderAreaTemplate\" : \"\",\r\n \"toolbarTemplate\" : \"\",\r\n \"extendedAreaTemplate\" : \"\",\r\n \"contents\" : [ {\r\n \"id\" : \"dataGrid\",\r\n \"type\" : \"DataGrid\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"f-component-grid\"\r\n },\r\n \"size\" : null,\r\n \"dataSource\" : \"fybxdManages\",\r\n \"fields\" : [ {\r\n \"id\" : \"employeeID_910bc7b9_vzhb\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"报销人员\",\r\n \"captionTemplate\" : null,\r\n \"dataField\" : \"employeeID\",\r\n \"dataType\" : \"string\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"employeeID\",\r\n \"field\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\"\r\n },\r\n \"enumData\" : null,\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"displayTemplate\" : null,\r\n \"editor\" : null,\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"sortOrder\" : null,\r\n \"resizeable\" : true,\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"styler\" : \"\",\r\n \"colTemplate\" : \"\",\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"localization\" : false,\r\n \"path\" : \"employeeID\",\r\n \"readonly\" : false,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"visible\" : true,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"localizationType\" : \"Date\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\"\r\n }, {\r\n \"id\" : \"domainID_8ab989da_up6m\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"所属部门\",\r\n \"captionTemplate\" : null,\r\n \"dataField\" : \"domainID\",\r\n \"dataType\" : \"string\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"domainID\",\r\n \"field\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\"\r\n },\r\n \"enumData\" : null,\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"displayTemplate\" : null,\r\n \"editor\" : null,\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"sortOrder\" : null,\r\n \"resizeable\" : true,\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"styler\" : \"\",\r\n \"colTemplate\" : \"\",\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"localization\" : false,\r\n \"path\" : \"domainID\",\r\n \"readonly\" : false,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"visible\" : true,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"localizationType\" : \"Date\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\"\r\n }, {\r\n \"id\" : \"billType_0e8e7eb7_21yn\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"报销类型\",\r\n \"captionTemplate\" : null,\r\n \"dataField\" : \"billType\",\r\n \"dataType\" : \"string\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billType\",\r\n \"field\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\"\r\n },\r\n \"enumData\" : null,\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"displayTemplate\" : null,\r\n \"editor\" : null,\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"sortOrder\" : null,\r\n \"resizeable\" : true,\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"styler\" : \"\",\r\n \"colTemplate\" : \"\",\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"localization\" : false,\r\n \"path\" : \"billType\",\r\n \"readonly\" : false,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"visible\" : true,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"localizationType\" : \"Date\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\"\r\n } ],\r\n \"focusedItem\" : null,\r\n \"focusedIndex\" : null,\r\n \"identifyField\" : null,\r\n \"multiSelect\" : false,\r\n \"selectable\" : null,\r\n \"showCheckbox\" : false,\r\n \"showAllCheckbox\" : false,\r\n \"checkOnSelect\" : false,\r\n \"selectOnCheck\" : false,\r\n \"itemTemplate\" : null,\r\n \"toolBar\" : null,\r\n \"summary\" : null,\r\n \"groupable\" : true,\r\n \"group\" : null,\r\n \"showGroupColumn\" : true,\r\n \"groupFormatter\" : null,\r\n \"groupStyler\" : null,\r\n \"groupFooter\" : false,\r\n \"onSelectionChange\" : \"loadCard1\",\r\n \"fieldEditable\" : false,\r\n \"appendRow\" : null,\r\n \"disable\" : \"viewModel.stateMachine['editable']\",\r\n \"pageChange\" : \"changePage1\",\r\n \"pageSizeChanged\" : \"changePage1\",\r\n \"fitColumns\" : false,\r\n \"autoFitColumns\" : false,\r\n \"styler\" : \"\",\r\n \"multiSort\" : false,\r\n \"showBorder\" : false,\r\n \"striped\" : true,\r\n \"showLineNumber\" : false,\r\n \"disableRow\" : null,\r\n \"beforeSelect\" : null,\r\n \"beforeUnSelect\" : null,\r\n \"beforeCheck\" : null,\r\n \"beforeUnCheck\" : null,\r\n \"dblClickRow\" : null,\r\n \"showFooter\" : false,\r\n \"footerTemplate\" : \"\",\r\n \"footerDataFrom\" : \"client\",\r\n \"footerDataCommand\" : null,\r\n \"enableFilterRow\" : false,\r\n \"remoteFilter\" : false,\r\n \"showFilterBar\" : false,\r\n \"useControlPanel\" : false,\r\n \"autoHeight\" : false,\r\n \"showSelectedList\" : false,\r\n \"selectedItemFormatter\" : null,\r\n \"lineNumberWidth\" : 36,\r\n \"enableMorePageSelect\" : false,\r\n \"pagination\" : true,\r\n \"lockPagination\" : \"viewModel.stateMachine&&viewModel.stateMachine['editable']\",\r\n \"showPageSize\" : false,\r\n \"editable\" : null,\r\n \"fixedColumns\" : [ ],\r\n \"enableCommandColumn\" : false,\r\n \"onEditClicked\" : \"\",\r\n \"onDeleteClicked\" : \"\",\r\n \"commandColumnWidth\" : 120,\r\n \"showCommandColumn\" : true,\r\n \"checkedChange\" : null,\r\n \"footerHeight\" : 29,\r\n \"filterType\" : \"none\",\r\n \"enableSmartFilter\" : false,\r\n \"lineNumberTitle\" : \"\",\r\n \"rowClick\" : null,\r\n \"headerWrap\" : false,\r\n \"emptyTemplate\" : null,\r\n \"emptyDataHeight\" : 240,\r\n \"rowHeight\" : 30,\r\n \"enableHighlightCell\" : false,\r\n \"enableEditCellStyle\" : false,\r\n \"showRowGroupPanel\" : false,\r\n \"enableDragColumn\" : false,\r\n \"groupSummaryPosition\" : \"groupFooterRow\",\r\n \"clearSelectionsWhenDataIsEmpty\" : true,\r\n \"keepSelect\" : true,\r\n \"enableEditByCard\" : \"none\",\r\n \"visible\" : true,\r\n \"showGotoInput\" : false,\r\n \"scrollBarShowMode\" : \"auto\",\r\n \"showScrollArrow\" : false,\r\n \"footerPosition\" : \"bottom\",\r\n \"footerStyler\" : null,\r\n \"selectOnEditing\" : false,\r\n \"selectionMode\" : \"default\",\r\n \"enableContextMenu\" : false,\r\n \"disableGroupOnEditing\" : true,\r\n \"enableSimpleMode\" : false,\r\n \"enableScheme\" : false,\r\n \"beforeEdit\" : null,\r\n \"nowrap\" : true,\r\n \"mergeCell\" : false,\r\n \"remoteSort\" : false,\r\n \"columnSorted\" : null,\r\n \"enableHeaderGroup\" : false,\r\n \"headerGroup\" : null,\r\n \"AutoColumnWidthUseDblclick\" : true,\r\n \"virtualized\" : false,\r\n \"virtualizedAsyncLoad\" : false,\r\n \"scrollYLoad\" : null,\r\n \"pagerContentTemplate\" : null,\r\n \"expandGroupRows\" : true,\r\n \"draggable\" : false,\r\n \"maxHeight\" : 300,\r\n \"useBlankWhenDataIsEmpty\" : false,\r\n \"checked\" : null,\r\n \"unChecked\" : null,\r\n \"checkAll\" : null,\r\n \"unCheckAll\" : null,\r\n \"filterChanged\" : null\r\n } ],\r\n \"isScrollSpyItem\" : false,\r\n \"toolbar\" : {\r\n \"type\" : \"SectionToolbar\",\r\n \"position\" : \"inHead\",\r\n \"contents\" : [ ]\r\n }\r\n } ],\r\n \"visible\" : true,\r\n \"afterViewInit\" : null\r\n }, {\r\n \"id\" : \"detail-form-component\",\r\n \"type\" : \"Component\",\r\n \"componentType\" : \"form-col-1\",\r\n \"viewModel\" : \"detail-form-component-viewmodel\",\r\n \"onInit\" : \"\",\r\n \"appearance\" : {\r\n \"class\" : \"f-struct-wrapper\"\r\n },\r\n \"contents\" : [ {\r\n \"id\" : \"detail-form-section\",\r\n \"type\" : \"Section\",\r\n \"appearance\" : {\r\n \"class\" : \"f-section-form f-section-in-main\"\r\n },\r\n \"visible\" : true,\r\n \"mainTitle\" : \"基本信息\",\r\n \"subTitle\" : \"\",\r\n \"headerClass\" : \"\",\r\n \"titleClass\" : \"\",\r\n \"extendedHeaderAreaClass\" : \"\",\r\n \"toolbarClass\" : \"\",\r\n \"extendedAreaClass\" : \"\",\r\n \"contentTemplateClass\" : \"\",\r\n \"fill\" : false,\r\n \"expanded\" : true,\r\n \"enableMaximize\" : false,\r\n \"enableAccordion\" : false,\r\n \"accordionMode\" : \"default\",\r\n \"showHeader\" : true,\r\n \"headerTemplate\" : \"\",\r\n \"titleTemplate\" : \"\",\r\n \"extendedHeaderAreaTemplate\" : \"\",\r\n \"toolbarTemplate\" : \"\",\r\n \"extendedAreaTemplate\" : \"\",\r\n \"contents\" : [ {\r\n \"id\" : \"detail-form-layout\",\r\n \"type\" : \"Form\",\r\n \"appearance\" : {\r\n \"class\" : \"f-form-layout farris-form farris-form-controls-inline\"\r\n },\r\n \"size\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"employeeID_910bc7b9_m57i\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"报销人员\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"employeeID\",\r\n \"field\" : \"910bc7b9-7138-4c9b-9eea-aa304cc71b31\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 36,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"employeeID\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500\r\n }, {\r\n \"id\" : \"domainID_8ab989da_ikw3\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"所属部门\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"domainID\",\r\n \"field\" : \"8ab989da-ecb1-44da-a287-e55d4ac1178d\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 36,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"domainID\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500\r\n }, {\r\n \"id\" : \"projectMrg_69d7b966_bjjg\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"项目经理\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"projectMrg\",\r\n \"field\" : \"69d7b966-b12d-43f6-8e67-cf4c86248203\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 36,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"projectMrg\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500,\r\n \"labelAutoOverflow\" : false,\r\n \"updateOn\" : \"blur\"\r\n }, {\r\n \"id\" : \"totalSum_8eb4ed23_4gms\",\r\n \"type\" : \"NumericBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"报帐金额\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"totalSum\",\r\n \"field\" : \"8eb4ed23-9c00-48e0-8d16-2653a5ad7db1\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"textAlign\" : \"left\",\r\n \"precisionSourceType\" : \"static\",\r\n \"precision\" : 2,\r\n \"validation\" : null,\r\n \"maxValue\" : null,\r\n \"minValue\" : null,\r\n \"step\" : 1,\r\n \"useThousands\" : true,\r\n \"formatter\" : null,\r\n \"parser\" : null,\r\n \"canNull\" : true,\r\n \"bigNumber\" : false,\r\n \"maxLength\" : 18,\r\n \"holdPlace\" : false,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"isTextArea\" : true,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"showZero\" : true,\r\n \"showButton\" : true,\r\n \"path\" : \"totalSum\",\r\n \"localization\" : false,\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500\r\n }, {\r\n \"id\" : \"billType_0e8e7eb7_u64m\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"报销类型\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billType\",\r\n \"field\" : \"0e8e7eb7-b975-4fcc-8c3c-2c4612c84bca\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 1,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"billType\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500\r\n }, {\r\n \"id\" : \"projectID_ab85b80b_uzez\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"所属项目\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"projectID\",\r\n \"field\" : \"ab85b80b-2527-49fc-97cc-2e6e764c1892\"\r\n },\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 36,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"projectID\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500\r\n }, {\r\n \"id\" : \"billNote_2fa573fb_krxb\",\r\n \"type\" : \"MultiTextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"报销说明\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billNote\",\r\n \"field\" : \"2fa573fb-cda6-4155-8f9a-a196abc1ac1c\"\r\n },\r\n \"placeHolder\" : \"\",\r\n \"appearance\" : {\r\n \"class\" : \"col-12\"\r\n },\r\n \"size\" : null,\r\n \"readonly\" : \"!viewModel.stateMachine['editable']\",\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 2000,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : null,\r\n \"path\" : \"billNote\",\r\n \"editType\" : \"default\",\r\n \"dialogWidth\" : 500,\r\n \"dialogHeight\" : 400,\r\n \"enableWordCount\" : false,\r\n \"countType\" : \"surplus\",\r\n \"onlyShowInDialog\" : false,\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"useComments\" : false\r\n } ],\r\n \"controlsInline\" : true,\r\n \"formAutoIntl\" : true,\r\n \"visible\" : true,\r\n \"draggable\" : false,\r\n \"labelAutoOverflow\" : false\r\n } ],\r\n \"isScrollSpyItem\" : false,\r\n \"toolbar\" : {\r\n \"type\" : \"SectionToolbar\",\r\n \"position\" : \"inHead\",\r\n \"contents\" : [ ]\r\n }\r\n } ],\r\n \"visible\" : true,\r\n \"afterViewInit\" : null\r\n }, {\r\n \"id\" : \"fybxdmxmanage-em1n-component\",\r\n \"type\" : \"Component\",\r\n \"viewModel\" : \"fybxdmxmanage-em1n-component-viewmodel\",\r\n \"componentType\" : \"dataGrid\",\r\n \"appearance\" : {\r\n \"class\" : \"f-struct-is-subgrid\"\r\n },\r\n \"visible\" : true,\r\n \"onInit\" : null,\r\n \"afterViewInit\" : null,\r\n \"contents\" : [ {\r\n \"id\" : \"fybxdmxmanage-em1n-component-layout\",\r\n \"type\" : \"ContentContainer\",\r\n \"appearance\" : {\r\n \"class\" : \"f-grid-is-sub f-utils-flex-column\"\r\n },\r\n \"visible\" : true,\r\n \"contents\" : [ {\r\n \"id\" : \"fybxdmxmanage-em1n-dataGrid\",\r\n \"type\" : \"DataGrid\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"f-component-grid f-utils-fill\"\r\n },\r\n \"disable\" : false,\r\n \"dataSource\" : \"fybxdmxManages\",\r\n \"fields\" : [ {\r\n \"id\" : \"billDetailDate_e1a971e1_68wn\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"费用日期\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailDate\",\r\n \"field\" : \"e1a971e1-73d5-45e0-b77a-5fa88fd7d143\",\r\n \"fullPath\" : \"BillDetailDate\"\r\n },\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"readonly\" : false,\r\n \"dataField\" : \"billDetailDate\",\r\n \"dataType\" : \"datetime\",\r\n \"displayTemplate\" : null,\r\n \"captionTemplate\" : null,\r\n \"editor\" : {\r\n \"id\" : \"billDetailDate_e1a971e1_we6k\",\r\n \"type\" : \"DateBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"费用日期\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailDate\",\r\n \"field\" : \"e1a971e1-73d5-45e0-b77a-5fa88fd7d143\",\r\n \"fullPath\" : \"BillDetailDate\"\r\n },\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"editable\" : true,\r\n \"dateRange\" : false,\r\n \"showTime\" : true,\r\n \"showType\" : 1,\r\n \"dateFormat\" : \"yyyy-MM-dd HH:mm:ss\",\r\n \"returnFormat\" : \"yyyy-MM-dd HH:mm:ss\",\r\n \"maxValue\" : null,\r\n \"minValue\" : null,\r\n \"disableDates\" : [ ],\r\n \"showWeekNumbers\" : false,\r\n \"dateRangeDatesDelimiter\" : \"~\",\r\n \"shortcuts\" : [ ],\r\n \"fieldType\" : \"DateTime\",\r\n \"useDefault\" : false,\r\n \"holdPlace\" : false,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"isTextArea\" : true,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"localization\" : false,\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500,\r\n \"hourStep\" : 1,\r\n \"minuteStep\" : 1,\r\n \"secondStep\" : 1,\r\n \"firstDayOfWeek\" : \"mo\",\r\n \"path\" : \"billDetailDate\",\r\n \"localizationType\" : \"DateTime\",\r\n \"format\" : \"'yyyy-MM-dd'\",\r\n \"readonly\" : false\r\n },\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"enumData\" : null,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"date\",\r\n \"dateFormat\" : \"yyyy-MM-dd HH:mm:ss\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"visible\" : true,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"styler\" : \"\",\r\n \"localization\" : false,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\",\r\n \"localizationType\" : \"DateTime\"\r\n }, {\r\n \"id\" : \"billDetailAmount_f5904943_k4iw\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"报销金额\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailAmount\",\r\n \"field\" : \"f5904943-b1fc-4860-a2b8-2586fbc32074\",\r\n \"fullPath\" : \"BillDetailAmount\"\r\n },\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"readonly\" : false,\r\n \"dataField\" : \"billDetailAmount\",\r\n \"dataType\" : \"number\",\r\n \"displayTemplate\" : null,\r\n \"captionTemplate\" : null,\r\n \"editor\" : {\r\n \"id\" : \"billDetailAmount_f5904943_bqjy\",\r\n \"type\" : \"NumericBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"报销金额\",\r\n \"controlSource\" : \"Farris\",\r\n \"appearance\" : {\r\n \"class\" : \"\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailAmount\",\r\n \"field\" : \"f5904943-b1fc-4860-a2b8-2586fbc32074\",\r\n \"fullPath\" : \"BillDetailAmount\"\r\n },\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"textAlign\" : \"left\",\r\n \"precisionSourceType\" : \"static\",\r\n \"precision\" : 2,\r\n \"validation\" : null,\r\n \"maxValue\" : null,\r\n \"minValue\" : null,\r\n \"step\" : 1,\r\n \"useThousands\" : true,\r\n \"formatter\" : null,\r\n \"parser\" : null,\r\n \"canNull\" : true,\r\n \"bigNumber\" : false,\r\n \"maxLength\" : 18,\r\n \"holdPlace\" : false,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"isTextArea\" : true,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"localization\" : false,\r\n \"showZero\" : true,\r\n \"showButton\" : true,\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500,\r\n \"path\" : \"billDetailAmount\",\r\n \"readonly\" : false\r\n },\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"enumData\" : null,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"number\",\r\n \"precision\" : 2,\r\n \"thousand\" : \",\",\r\n \"decimal\" : \".\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"visible\" : true,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"styler\" : \"\",\r\n \"localization\" : false,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\"\r\n }, {\r\n \"id\" : \"invoiceNO_8e5cb06e_e643\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"发票号码\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"invoiceNO\",\r\n \"field\" : \"8e5cb06e-27c7-484b-9e33-320f56102ebb\",\r\n \"fullPath\" : \"InvoiceNO\"\r\n },\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"readonly\" : false,\r\n \"dataField\" : \"invoiceNO\",\r\n \"dataType\" : \"string\",\r\n \"displayTemplate\" : null,\r\n \"captionTemplate\" : null,\r\n \"editor\" : {\r\n \"id\" : \"invoiceNO_8e5cb06e_5t1a\",\r\n \"type\" : \"TextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"发票号码\",\r\n \"appearance\" : {\r\n \"class\" : \"\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"invoiceNO\",\r\n \"field\" : \"8e5cb06e-27c7-484b-9e33-320f56102ebb\",\r\n \"fullPath\" : \"InvoiceNO\"\r\n },\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"format\" : null,\r\n \"validation\" : null,\r\n \"value\" : null,\r\n \"maxLength\" : 36,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"holdPlace\" : false,\r\n \"isTextArea\" : true,\r\n \"isPassword\" : false,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"enableTips\" : true,\r\n \"path\" : \"invoiceNO\",\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"formatValidation\" : {\r\n \"type\" : \"none\",\r\n \"expression\" : \"\",\r\n \"message\" : \"\"\r\n },\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500,\r\n \"readonly\" : false\r\n },\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"enumData\" : null,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"visible\" : true,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"styler\" : \"\",\r\n \"localization\" : false,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\",\r\n \"localizationType\" : \"Date\"\r\n }, {\r\n \"id\" : \"billDetailNote_23091d80_5a4x\",\r\n \"type\" : \"GridField\",\r\n \"controlSource\" : \"Farris\",\r\n \"caption\" : \"费用说明\",\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailNote\",\r\n \"field\" : \"23091d80-7169-4827-b9a9-9bf208faef6c\",\r\n \"fullPath\" : \"BillDetailNote\"\r\n },\r\n \"appearance\" : null,\r\n \"size\" : {\r\n \"width\" : 120\r\n },\r\n \"readonly\" : false,\r\n \"dataField\" : \"billDetailNote\",\r\n \"dataType\" : \"string\",\r\n \"displayTemplate\" : null,\r\n \"captionTemplate\" : null,\r\n \"editor\" : {\r\n \"id\" : \"billDetailNote_23091d80_mlkt\",\r\n \"type\" : \"MultiTextBox\",\r\n \"titleSourceType\" : \"static\",\r\n \"title\" : \"费用说明\",\r\n \"appearance\" : {\r\n \"class\" : \"\"\r\n },\r\n \"size\" : null,\r\n \"binding\" : {\r\n \"type\" : \"Form\",\r\n \"path\" : \"billDetailNote\",\r\n \"field\" : \"23091d80-7169-4827-b9a9-9bf208faef6c\",\r\n \"fullPath\" : \"BillDetailNote\"\r\n },\r\n \"require\" : false,\r\n \"disable\" : false,\r\n \"placeHolder\" : \"\",\r\n \"maxLength\" : 0,\r\n \"holdPlace\" : false,\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"visible\" : true,\r\n \"isTextArea\" : true,\r\n \"tabindex\" : -1,\r\n \"hasDefaultFocus\" : false,\r\n \"focusState\" : null,\r\n \"titleWidth\" : null,\r\n \"editType\" : \"default\",\r\n \"dialogWidth\" : 500,\r\n \"dialogHeight\" : 400,\r\n \"autoHeight\" : false,\r\n \"maxHeight\" : 500,\r\n \"enableWordCount\" : false,\r\n \"countType\" : \"surplus\",\r\n \"onlyShowInDialog\" : false,\r\n \"enableAppend\" : false,\r\n \"inputAppendType\" : \"button\",\r\n \"inputAppendDisabled\" : false,\r\n \"useComments\" : false,\r\n \"path\" : \"billDetailNote\",\r\n \"readonly\" : false\r\n },\r\n \"draggable\" : false,\r\n \"frozen\" : \"none\",\r\n \"sortable\" : true,\r\n \"enumData\" : null,\r\n \"idField\" : \"value\",\r\n \"textField\" : \"name\",\r\n \"aggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"groupAggregate\" : {\r\n \"type\" : \"none\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n }\r\n },\r\n \"linkedLabelEnabled\" : false,\r\n \"linkedLabelClick\" : null,\r\n \"textAlign\" : \"left\",\r\n \"hAlign\" : \"left\",\r\n \"vAlign\" : \"middle\",\r\n \"formatter\" : {\r\n \"type\" : \"none\"\r\n },\r\n \"showTips\" : false,\r\n \"tipContent\" : null,\r\n \"multiLanguage\" : false,\r\n \"visible\" : true,\r\n \"enableFilter\" : false,\r\n \"headerStyler\" : \"\",\r\n \"styler\" : \"\",\r\n \"localization\" : false,\r\n \"allowGrouping\" : true,\r\n \"tipMode\" : \"auto\",\r\n \"captionTipContent\" : \"\",\r\n \"captionTipStyler\" : \"\",\r\n \"localizationType\" : \"Date\"\r\n } ],\r\n \"focusedItem\" : null,\r\n \"focusedIndex\" : null,\r\n \"pagination\" : true,\r\n \"lockPagination\" : \"viewModel.stateMachine&&viewModel.stateMachine['editable']\",\r\n \"showPageSize\" : false,\r\n \"identifyField\" : null,\r\n \"multiSelect\" : false,\r\n \"showCheckbox\" : false,\r\n \"selectable\" : null,\r\n \"itemTemplate\" : null,\r\n \"toolBar\" : null,\r\n \"summary\" : null,\r\n \"showAllCheckbox\" : false,\r\n \"fieldEditable\" : true,\r\n \"editable\" : null,\r\n \"groupable\" : false,\r\n \"group\" : null,\r\n \"showGroupColumn\" : true,\r\n \"groupFormatter\" : null,\r\n \"groupStyler\" : null,\r\n \"groupFooter\" : false,\r\n \"fitColumns\" : false,\r\n \"onSelectionChange\" : \"\",\r\n \"styler\" : \"\",\r\n \"fixedColumns\" : [ ],\r\n \"enableCommandColumn\" : false,\r\n \"onEditClicked\" : \"\",\r\n \"onDeleteClicked\" : \"\",\r\n \"commandColumnWidth\" : 120,\r\n \"showCommandColumn\" : true,\r\n \"checkedChange\" : null,\r\n \"disableRow\" : null,\r\n \"beforeSelect\" : null,\r\n \"beforeUnSelect\" : null,\r\n \"beforeCheck\" : null,\r\n \"beforeUnCheck\" : null,\r\n \"multiSort\" : false,\r\n \"autoFitColumns\" : false,\r\n \"showFooter\" : false,\r\n \"footerTemplate\" : \"\",\r\n \"footerDataFrom\" : \"client\",\r\n \"footerDataCommand\" : null,\r\n \"footerHeight\" : 29,\r\n \"filterType\" : \"none\",\r\n \"enableFilterRow\" : false,\r\n \"enableSmartFilter\" : false,\r\n \"remoteFilter\" : false,\r\n \"showFilterBar\" : false,\r\n \"showBorder\" : false,\r\n \"striped\" : true,\r\n \"showLineNumber\" : false,\r\n \"lineNumberTitle\" : \"\",\r\n \"appendRow\" : null,\r\n \"pageChange\" : null,\r\n \"dblClickRow\" : null,\r\n \"useControlPanel\" : false,\r\n \"autoHeight\" : false,\r\n \"rowClick\" : null,\r\n \"showSelectedList\" : false,\r\n \"selectedItemFormatter\" : null,\r\n \"lineNumberWidth\" : 36,\r\n \"enableMorePageSelect\" : false,\r\n \"headerWrap\" : false,\r\n \"emptyTemplate\" : null,\r\n \"emptyDataHeight\" : 36,\r\n \"maxHeight\" : 300,\r\n \"rowHeight\" : 30,\r\n \"enableHighlightCell\" : false,\r\n \"enableEditCellStyle\" : false,\r\n \"showRowGroupPanel\" : false,\r\n \"enableDragColumn\" : false,\r\n \"groupSummaryPosition\" : \"groupFooterRow\",\r\n \"clearSelectionsWhenDataIsEmpty\" : true,\r\n \"keepSelect\" : true,\r\n \"enableEditByCard\" : \"none\",\r\n \"pageSizeChanged\" : null,\r\n \"visible\" : true,\r\n \"showGotoInput\" : false,\r\n \"scrollBarShowMode\" : \"auto\",\r\n \"showScrollArrow\" : false,\r\n \"footerPosition\" : \"bottom\",\r\n \"footerStyler\" : null,\r\n \"selectOnEditing\" : false,\r\n \"selectionMode\" : \"default\",\r\n \"enableContextMenu\" : false,\r\n \"disableGroupOnEditing\" : true,\r\n \"enableSimpleMode\" : false,\r\n \"enableScheme\" : false,\r\n \"beforeEdit\" : null,\r\n \"nowrap\" : true,\r\n \"mergeCell\" : false,\r\n \"remoteSort\" : false,\r\n \"columnSorted\" : null,\r\n \"checkOnSelect\" : false,\r\n \"selectOnCheck\" : false,\r\n \"enableHeaderGroup\" : false,\r\n \"headerGroup\" : null,\r\n \"AutoColumnWidthUseDblclick\" : true,\r\n \"virtualized\" : false,\r\n \"virtualizedAsyncLoad\" : false,\r\n \"scrollYLoad\" : null,\r\n \"pagerContentTemplate\" : null,\r\n \"expandGroupRows\" : true,\r\n \"useBlankWhenDataIsEmpty\" : false,\r\n \"checked\" : null,\r\n \"unChecked\" : null,\r\n \"checkAll\" : null,\r\n \"unCheckAll\" : null,\r\n \"filterChanged\" : null\r\n } ],\r\n \"isScrollspyContainer\" : false,\r\n \"isLikeCardContainer\" : false\r\n } ]\r\n } ],\r\n \"webcmds\" : [ {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"path\" : \"/projects/packages/Inspur.GS.Gsp.Web.WebCmp/webcmd\",\r\n \"name\" : \"ListCardController.webcmd\",\r\n \"refedHandlers\" : [ {\r\n \"host\" : \"fda876c8-7230-46e7-af3d-d38233642275\",\r\n \"handler\" : \"loadList\"\r\n }, {\r\n \"host\" : \"8788c27e-722a-4b98-9d57-98eafb526fe5\",\r\n \"handler\" : \"loadCard\"\r\n }, {\r\n \"host\" : \"ef281c13-4480-4256-901e-4bef5f92bd9e\",\r\n \"handler\" : \"add\"\r\n }, {\r\n \"host\" : \"d12acc4e-6274-44dc-95e6-cedeb5e66707\",\r\n \"handler\" : \"edit\"\r\n }, {\r\n \"host\" : \"5707d460-c441-45c4-8fe1-f77abd9f75b1\",\r\n \"handler\" : \"save\"\r\n }, {\r\n \"host\" : \"b3897b4b-a37f-48e3-afb3-8489cec02806\",\r\n \"handler\" : \"cancel\"\r\n }, {\r\n \"host\" : \"22576fc1-08fb-49a9-b132-295c7392b481\",\r\n \"handler\" : \"remove\"\r\n }, {\r\n \"host\" : \"e7cf83c2-e52d-4dce-aded-047a819c8068\",\r\n \"handler\" : \"changePage\"\r\n } ],\r\n \"code\" : \"ListCardController\",\r\n \"nameSpace\" : \"Inspur.GS.Gsp.Web.WebCmp\"\r\n } ],\r\n \"serviceRefs\" : [ ],\r\n \"projectName\" : \"bo-bxmanage-front\",\r\n \"showType\" : \"page\",\r\n \"toolbar\" : {\r\n \"items\" : { },\r\n \"configs\" : { }\r\n },\r\n \"expressions\" : [ ],\r\n \"metadataId\" : \"9f7177b9-c79a-4972-9bf3-b4961d77a31c\",\r\n \"actions\" : [ {\r\n \"sourceComponent\" : {\r\n \"id\" : \"button-add\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"click\",\r\n \"name\" : \"点击事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"ef281c13-4480-4256-901e-4bef5f92bd9e\",\r\n \"label\" : \"add1\",\r\n \"name\" : \"新增一条数据\",\r\n \"handlerName\" : \"add\",\r\n \"params\" : [ ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"button-edit\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"click\",\r\n \"name\" : \"点击事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"detail-form-component\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"d12acc4e-6274-44dc-95e6-cedeb5e66707\",\r\n \"label\" : \"edit1\",\r\n \"name\" : \"编辑数据\",\r\n \"handlerName\" : \"edit\",\r\n \"params\" : [ {\r\n \"name\" : \"id\",\r\n \"shownName\" : \"待编辑数据的标识\",\r\n \"value\" : \"{DATA~/detail-form-component/id}\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"transitionAction\",\r\n \"shownName\" : \"状态机动作\",\r\n \"value\" : \"Edit\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"button-save\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"click\",\r\n \"name\" : \"点击事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"detail-form-component\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"5707d460-c441-45c4-8fe1-f77abd9f75b1\",\r\n \"label\" : \"save1\",\r\n \"name\" : \"保存变更\",\r\n \"handlerName\" : \"save\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCmdName\",\r\n \"shownName\" : \"保存后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCmdFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"successMsg\",\r\n \"shownName\" : \"保存成功提示信息\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"button-cancel\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"click\",\r\n \"name\" : \"点击事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"detail-form-component\",\r\n \"viewModelId\" : \"detail-form-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"b3897b4b-a37f-48e3-afb3-8489cec02806\",\r\n \"label\" : \"cancel1\",\r\n \"name\" : \"取消变更\",\r\n \"handlerName\" : \"cancel\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCmdName\",\r\n \"shownName\" : \"取消后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCmdFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"button-delete\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"click\",\r\n \"name\" : \"点击事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"22576fc1-08fb-49a9-b132-295c7392b481\",\r\n \"label\" : \"remove1\",\r\n \"name\" : \"删除当前数据\",\r\n \"handlerName\" : \"remove\",\r\n \"params\" : [ {\r\n \"name\" : \"id\",\r\n \"shownName\" : \"待删除数据的标识\",\r\n \"value\" : \"{DATA~/data-grid-component/id}\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"refreshCommandName\",\r\n \"shownName\" : \"删除后回调方法\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"refreshCommandFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"ifSave\",\r\n \"shownName\" : \"是否执行保存\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"successMsg\",\r\n \"shownName\" : \"删除成功提示信息\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"dataGrid\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"onSelectionChange\",\r\n \"name\" : \"行切换事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"8788c27e-722a-4b98-9d57-98eafb526fe5\",\r\n \"label\" : \"loadCard1\",\r\n \"name\" : \"加载卡片数据\",\r\n \"handlerName\" : \"loadCard\",\r\n \"params\" : [ ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n }, {\r\n \"event\" : {\r\n \"label\" : \"pageChange\",\r\n \"name\" : \"切换页码事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"e7cf83c2-e52d-4dce-aded-047a819c8068\",\r\n \"label\" : \"changePage1\",\r\n \"name\" : \"切换页码\",\r\n \"handlerName\" : \"changePage\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCommandName\",\r\n \"shownName\" : \"切换页面后回调方法\",\r\n \"value\" : \"loadList1\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCommandFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"data-grid-component\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n }, {\r\n \"event\" : {\r\n \"label\" : \"pageSizeChanged\",\r\n \"name\" : \"分页条数变化事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"e7cf83c2-e52d-4dce-aded-047a819c8068\",\r\n \"label\" : \"changePage1\",\r\n \"name\" : \"切换页码\",\r\n \"handlerName\" : \"changePage\",\r\n \"params\" : [ {\r\n \"name\" : \"loadCommandName\",\r\n \"shownName\" : \"切换页面后回调方法\",\r\n \"value\" : \"loadList1\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"loadCommandFrameId\",\r\n \"shownName\" : \"目标组件\",\r\n \"value\" : \"data-grid-component\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n }, {\r\n \"sourceComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\",\r\n \"map\" : [ {\r\n \"event\" : {\r\n \"label\" : \"onInit\",\r\n \"name\" : \"初始化事件\"\r\n },\r\n \"targetComponent\" : {\r\n \"id\" : \"data-grid-component\",\r\n \"viewModelId\" : \"data-grid-component-viewmodel\"\r\n },\r\n \"command\" : {\r\n \"id\" : \"fda876c8-7230-46e7-af3d-d38233642275\",\r\n \"label\" : \"loadList1\",\r\n \"name\" : \"加载列表数据\",\r\n \"handlerName\" : \"loadList\",\r\n \"params\" : [ {\r\n \"name\" : \"filter\",\r\n \"shownName\" : \"过滤条件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n }, {\r\n \"name\" : \"sort\",\r\n \"shownName\" : \"排序条件\",\r\n \"value\" : \"\",\r\n \"defaultValue\" : null\r\n } ],\r\n \"cmpId\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"isNewGenerated\" : false,\r\n \"isInvalid\" : false\r\n },\r\n \"controller\" : {\r\n \"id\" : \"7c48ef46-339c-42d4-8365-a21236c63044\",\r\n \"label\" : \"ListCardController\",\r\n \"name\" : \"列卡控制器\"\r\n }\r\n } ]\r\n }\r\n } ],\r\n \"declarations\" : {\r\n \"events\" : [ ],\r\n \"commands\" : [ ],\r\n \"states\" : [ ]\r\n },\r\n \"subscriptions\" : [ ],\r\n \"extraImports\" : [ ]\r\n },\r\n \"options\" : {\r\n \"enableTextArea\" : true,\r\n \"renderMode\" : \"compile\",\r\n \"changeSetPolicy\" : \"valid\",\r\n \"enableServerSideChangeDetection\" : false\r\n }\r\n },\r\n \"Id\" : \"9f7177b9-c79a-4972-9bf3-b4961d77a31c\",\r\n \"CreationDate\" : null\r\n}", - "extendable": false, - "refs": "[ {\r\n \"DependentMetadata\" : {\r\n \"ID\" : \"3f4cedcf-50d1-4d9e-83d0-711c7347a781\",\r\n \"CertId\" : null,\r\n \"NameSpace\" : \"Inspur.GS.igix02.cardForms.BXManage.BXManage.Front\",\r\n \"Code\" : \"BXManageForm.frm\",\r\n \"Name\" : \"BXManageForm.frm\",\r\n \"Type\" : \"ResourceMetadata\",\r\n \"BizobjectID\" : \"fdc16d0d-00bf-7ae8-586c-343bc0e8835f\"\r\n }\r\n} ]", - "extented": false, - "previousVersion": null, - "version": null, - "properties": null, - "extendRule": null, - "projectName": null, - "processMode": null, - "translating": false -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/metadata/ec3bea5c-e15c-4244-a7c6-9b6c8a4f3c82.json b/packages/designer/projects/form-designer/src/assets/metadata/ec3bea5c-e15c-4244-a7c6-9b6c8a4f3c82.json deleted file mode 100644 index fba713d5878d90024cbcca3a44cd069e086a0947..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/metadata/ec3bea5c-e15c-4244-a7c6-9b6c8a4f3c82.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "ec3bea5c-e15c-4244-a7c6-9b6c8a4f3c82", - "nameSpace": "Inspur.GS.igix02.cardForms.BXManage.BXManage.Front", - "code": "BXManageForm_frm", - "name": "报销管理表单_frm", - "fileName": "BXManageForm_frm.sm", - "type": "StateMachine", - "bizobjectID": "fdc16d0d-00bf-7ae8-586c-343bc0e8835f", - "language": null, - "isTranslating": false, - "relativePath": "igix02/cardForms/BXManage/bo-bxmanage-front/metadata/components", - "extendProperty": "", - "content": "{\r\n \"code\" : null,\r\n \"name\" : null,\r\n \"renderState\" : {\r\n \"canRemove\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'init'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"删除\",\r\n \"description\" : \"\"\r\n },\r\n \"editable\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'add'\",\r\n \"relation\" : \"or\",\r\n \"rBracket\" : \"\"\r\n }, {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'edit'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"编辑\",\r\n \"description\" : \"\"\r\n },\r\n \"canEdit\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'init'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"编辑\",\r\n \"description\" : \"\"\r\n },\r\n \"canAdd\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'init'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"新增\",\r\n \"description\" : \"\"\r\n },\r\n \"canSave\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'add'\",\r\n \"relation\" : \"or\",\r\n \"rBracket\" : \"\"\r\n }, {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'edit'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"保存\",\r\n \"description\" : \"\"\r\n },\r\n \"canCancel\" : {\r\n \"condition\" : [ {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'add'\",\r\n \"relation\" : \"or\",\r\n \"rBracket\" : \"\"\r\n }, {\r\n \"lBracket\" : \"\",\r\n \"source\" : \"state\",\r\n \"compare\" : \"===\",\r\n \"target\" : \"'edit'\",\r\n \"relation\" : \"\",\r\n \"rBracket\" : \"\"\r\n } ],\r\n \"name\" : \"取消\",\r\n \"description\" : \"\"\r\n }\r\n },\r\n \"state\" : [ {\r\n \"state\" : \"add\",\r\n \"name\" : \"新增\",\r\n \"description\" : \"处于新增状态\"\r\n }, {\r\n \"state\" : \"init\",\r\n \"name\" : \"初始\",\r\n \"description\" : \"处于初始状态\"\r\n }, {\r\n \"state\" : \"edit\",\r\n \"name\" : \"编辑\",\r\n \"description\" : \"处于编辑状态\"\r\n } ],\r\n \"initialState\" : \"init\",\r\n \"action\" : {\r\n \"Cancel\" : {\r\n \"name\" : \"取消\",\r\n \"transitTo\" : \"init\",\r\n \"description\" : \"取消并切换至初始状态\"\r\n },\r\n \"Create\" : {\r\n \"name\" : \"创建\",\r\n \"transitTo\" : \"add\",\r\n \"description\" : \"新建并切换至新增状态\"\r\n },\r\n \"Edit\" : {\r\n \"name\" : \"编辑\",\r\n \"transitTo\" : \"edit\",\r\n \"description\" : \"编辑并切换至编辑状态\"\r\n },\r\n \"Save\" : {\r\n \"name\" : \"保存\",\r\n \"transitTo\" : \"init\",\r\n \"description\" : \"保存并切换至初始状态\"\r\n }\r\n }\r\n}", - "extendable": false, - "refs": null, - "extented": false, - "previousVersion": null, - "version": null, - "properties": null, - "extendRule": null, - "projectName": null, - "processMode": null, - "translating": false -} \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/base/worker/workerMain.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/base/worker/workerMain.js deleted file mode 100644 index 09b04aa2c8948f6c13b55bf419e8c0484aef139e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/base/worker/workerMain.js +++ /dev/null @@ -1,8 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.10.1(ebbf400719be21761361804bf63fb3916e64a845) - * Released under the MIT license - * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt - *-----------------------------------------------------------*/ -(function(){var e=["exports","require","vs/base/common/winjs.base","vs/editor/common/core/position","vs/base/common/platform","vs/editor/common/core/range","vs/base/common/uri","vs/editor/common/core/uint","vs/base/common/errors","vs/base/common/event","vs/base/common/lifecycle","vs/base/common/functional","vs/base/common/diff/diff","vs/base/common/cancellation","vs/base/common/types","vs/base/common/callbackList","vs/base/common/diff/diffChange","vs/base/common/map","vs/base/common/async","vs/editor/common/viewModel/prefixSumComputer","vs/base/common/strings","vs/base/common/keyCodes","vs/editor/common/core/selection","vs/editor/common/core/token","vs/editor/common/model/mirrorModel","vs/editor/common/core/characterClassifier","vs/editor/common/diff/diffComputer","vs/editor/common/model/wordHelper","vs/editor/common/modes/linkComputer","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/standalone/standaloneBase","vs/base/common/worker/simpleWorker","vs/base/common/winjs.base.raw","vs/editor/common/services/editorSimpleWorker"],t=function(t){for(var n=[],r=0,i=t.length;r=0)||"undefined"!=typeof process&&"win32"===process.platform},t}();e.Environment=t}(i||(i={}));!function(e){var t;!function(e){e[e.LoaderAvailable=1]="LoaderAvailable",e[e.BeginLoadingScript=10]="BeginLoadingScript",e[e.EndLoadingScriptOK=11]="EndLoadingScriptOK",e[e.EndLoadingScriptError=12]="EndLoadingScriptError",e[e.BeginInvokeFactory=21]="BeginInvokeFactory",e[e.EndInvokeFactory=22]="EndInvokeFactory",e[e.NodeBeginEvaluatingScript=31]="NodeBeginEvaluatingScript",e[e.NodeEndEvaluatingScript=32]="NodeEndEvaluatingScript",e[e.NodeBeginNativeRequire=33]="NodeBeginNativeRequire",e[e.NodeEndNativeRequire=34]="NodeEndNativeRequire"}(t=e.LoaderEventType||(e.LoaderEventType={}));var n=function(){return function(e,t,n){this.type=e,this.detail=t,this.timestamp=n}}();e.LoaderEvent=n;var r=function(){function r(e){this._events=[new n(t.LoaderAvailable,"",e)]}return r.prototype.record=function(t,r){this._events.push(new n(t,r,e.Utilities.getHighPerformanceTimestamp()))},r.prototype.getEvents=function(){return this._events},r}();e.LoaderEventRecorder=r;var i=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e}();i.INSTANCE=new i,e.NullLoaderEventRecorder=i}(i||(i={}));!function(e){var t=function(){function t(){}return t.fileUriToFilePath=function(e,t){if(t=decodeURI(t),e){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var n=void 0;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},t.isEmpty=function(e){var n=!0;return t.forEachProperty(e,function(){n=!1}),n},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var n=Array.isArray(e)?[]:{};return t.forEachProperty(e,function(e,r){n[e]=r&&"object"==typeof r?t.recursiveClone(r):r}),n},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID+++"==="},t.isAnonymousModule=function(e){return/^===anonymous/.test(e)},t.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=e.global.performance&&"function"==typeof e.global.performance.now),this.HAS_PERFORMANCE_NOW?e.global.performance.now():Date.now()},t}();t.NEXT_ANONYMOUS_ID=1,t.PERFORMANCE_NOW_PROBED=!1,t.HAS_PERFORMANCE_NOW=!1,e.Utilities=t}(i||(i={}));!function(e){var t=function(){function t(){}return t.validateConfigurationOptions=function(t,n){return"string"!=typeof(n=n||{}).baseUrl&&(n.baseUrl=""),"boolean"!=typeof n.isBuild&&(n.isBuild=!1),"object"!=typeof n.paths&&(n.paths={}),"object"!=typeof n.config&&(n.config={}),void 0===n.catchError&&(n.catchError=t),"string"!=typeof n.urlArgs&&(n.urlArgs=""),"function"!=typeof n.onError&&(n.onError=function(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0}),"object"==typeof n.ignoreDuplicateModules&&Array.isArray(n.ignoreDuplicateModules)||(n.ignoreDuplicateModules=[]),n.baseUrl.length>0&&(e.Utilities.endsWith(n.baseUrl,"/")||(n.baseUrl+="/")),Array.isArray(n.nodeModules)||(n.nodeModules=[]),("number"!=typeof n.nodeCachedDataWriteDelay||n.nodeCachedDataWriteDelay<0)&&(n.nodeCachedDataWriteDelay=7e3),"function"!=typeof n.onNodeCachedData&&(n.onNodeCachedData=function(e,t){e&&("cachedDataRejected"===e.errorCode?console.warn("Rejected cached data from file: "+e.path):"unlink"===e.errorCode||"writeFile"===e.errorCode?(console.error("Problems writing cached data file: "+e.path),console.error(e.detail)):console.error(e))}),n},t.mergeConfigurationOptions=function(n,r,i){void 0===r&&(r=null),void 0===i&&(i=null);var o=e.Utilities.recursiveClone(i||{});return e.Utilities.forEachProperty(r,function(t,n){"ignoreDuplicateModules"===t&&void 0!==o.ignoreDuplicateModules?o.ignoreDuplicateModules=o.ignoreDuplicateModules.concat(n):"paths"===t&&void 0!==o.paths?e.Utilities.forEachProperty(n,function(e,t){return o.paths[e]=t}):"config"===t&&void 0!==o.config?e.Utilities.forEachProperty(n,function(e,t){return o.config[e]=t}):o[t]=e.Utilities.recursiveClone(n)}),t.validateConfigurationOptions(n,o)},t}();e.ConfigurationOptionsUtil=t;var n=function(){function n(e,n){if(this._env=e,this.options=t.mergeConfigurationOptions(this._env.isWebWorker,n),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),""===this.options.baseUrl){if(this._env.isNode&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename){var r=this.options.nodeRequire.main.filename,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}if(this._env.isNode&&this.options.nodeMain){var r=this.options.nodeMain,i=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));this.options.baseUrl=r.substring(0,i+1)}}}return n.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e=0){var r=t.resolveModule(e.substr(0,n)),s=t.resolveModule(e.substr(n+1)),u=this._moduleIdProvider.getModuleId(r+"!"+s),a=this._moduleIdProvider.getModuleId(r);return new o(u,a,s)}return new i(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},s.prototype._normalizeDependencies=function(e,t){for(var n=[],r=0,i=0,o=e.length;i0;){var a=u.shift(),l=this._modules2[a];l&&(s=l.onDependencyError(n)||s);var c=this._inverseDependencies2[a];if(c)for(var i=0,o=c.length;i0;){var u=s.shift().dependencies;if(u)for(var i=0,o=u.length;i=i.length)n._onLoadError(t,r);else{var u=i[o],a=n.getRecorder();if(n._config.isBuild()&&"empty:"===u)return n._buildInfoPath[t]=u,n.defineModule(n._moduleIdProvider.getStrModuleId(t),[],null,null,null),void n._onLoad(t);a.record(e.LoaderEventType.BeginLoadingScript,u),n._scriptLoader.load(n,u,function(){n._config.isBuild()&&(n._buildInfoPath[t]=u),a.record(e.LoaderEventType.EndLoadingScriptOK,u),n._onLoad(t)},function(t){a.record(e.LoaderEventType.EndLoadingScriptError,u),s(t)})}};s(null)}},s.prototype._loadPluginDependency=function(e,n){var r=this;if(!this._modules2[n.id]&&!this._knownModules2[n.id]){this._knownModules2[n.id]=!0;var i=function(e){r.defineModule(r._moduleIdProvider.getStrModuleId(n.id),[],e,null,null)};i.error=function(e){r._config.onError(r._createLoadError(n.id,e))},e.load(n.pluginParam,this._createRequire(t.ROOT),i,this._config.getOptionsLiteral())}},s.prototype._resolve=function(e){for(var t=this,n=e.dependencies,r=0,s=n.length;r \n")),e.unresolvedDependenciesCount--}else if(this._inverseDependencies2[u.id]=this._inverseDependencies2[u.id]||[],this._inverseDependencies2[u.id].push(e.id),u instanceof o){var c=this._modules2[u.pluginId];if(c&&c.isComplete()){this._loadPluginDependency(c.exports,u);continue}var f=this._inversePluginDependencies2.get(u.pluginId);f||(f=[],this._inversePluginDependencies2.set(u.pluginId,f)),f.push(u),this._loadModule(u.pluginId)}else this._loadModule(u.id)}else e.unresolvedDependenciesCount--;else e.unresolvedDependenciesCount--;else e.exportsPassedIn=!0,e.unresolvedDependenciesCount--}0===e.unresolvedDependenciesCount&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,n=this.getRecorder();if(!e.isComplete()){for(var r=e.dependencies,o=[],s=0,u=r.length;s0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=Object.prototype.hasOwnProperty,a=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_originalIds=[],this.m_modifiedIds=[],this.m_forwardHistory=[],this.m_reverseHistory=[],this.ComputeUniqueIdentifiers()}return e.prototype.ComputeUniqueIdentifiers=function(){var e=this.OriginalSequence.getLength(),t=this.ModifiedSequence.getLength();this.m_originalIds=new Array(e),this.m_modifiedIds=new Array(t);var n,r={},i=1;for(n=0;n=e&&o>=r&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||r>o){var u=void 0;return r<=o?(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new n.DiffChange(e,0,r,o-r+1)]):e<=t?(i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[new n.DiffChange(e,t-e+1,r,0)]):(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}var a=[0],l=[0],c=this.ComputeRecursionPoint(e,t,r,o,a,l,s),f=a[0],h=l[0];if(null!==c)return c;if(!s[0]){var d=this.ComputeDiffRecursive(e,f,r,h,s),p=[];return p=s[0]?[new n.DiffChange(f+1,t-(f+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(f+1,t,h+1,o,s),this.ConcatenateChanges(d,p)}return[new n.DiffChange(e,t-e+1,r,o-r+1)]},e.prototype.WALKTRACE=function(e,t,r,i,o,u,a,l,c,f,h,d,p,m,_,g,v,y){var b,C=null,E=null,S=new s,L=t,N=r,A=p[0]-g[0]-i,P=Number.MIN_VALUE,M=this.m_forwardHistory.length-1;do{(b=A+e)===L||b=0&&(e=(c=this.m_forwardHistory[M])[0],L=1,N=c.length-1)}while(--M>=-1);if(C=S.getReverseChanges(),y[0]){var w=p[0]+1,D=g[0]+1;if(null!==C&&C.length>0){var I=C[C.length-1];w=Math.max(w,I.getOriginalEnd()),D=Math.max(D,I.getModifiedEnd())}E=[new n.DiffChange(w,d-w+1,D,_-D+1)]}else{S=new s,L=u,N=a,A=p[0]-g[0]-l,P=Number.MAX_VALUE,M=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(b=A+o)===L||b=f[b+1]?(m=(h=f[b+1]-1)-A-l,h>P&&S.MarkNextChange(),P=h+1,S.AddOriginalElement(h+1,m+1),A=b+1-o):(m=(h=f[b-1])-A-l,h>P&&S.MarkNextChange(),P=h,S.AddModifiedElement(h+1,m+1),A=b-1-o),M>=0&&(o=(f=this.m_reverseHistory[M])[0],L=1,N=f.length-1)}while(--M>=-1);E=S.getChanges()}return this.ConcatenateChanges(C,E)},e.prototype.ComputeRecursionPoint=function(e,t,r,i,s,u,a){var l,c,f,h=0,d=0,p=0,m=0;e--,r--,s[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var _=t-e+(i-r),g=_+1,v=new Array(g),y=new Array(g),b=i-r,C=t-e,E=e-r,S=t-i,L=(C-b)%2==0;v[b]=e,y[C]=t,a[0]=!1;var N,A;for(f=1;f<=_/2+1;f++){var P=0,M=0;for(h=this.ClipDiagonalBound(b-f,f,b,g),d=this.ClipDiagonalBound(b+f,f,b,g),N=h;N<=d;N+=2){for(c=(l=N===h||NP+M&&(P=l,M=c),!L&&Math.abs(N-C)<=f-1&&l>=y[N])return s[0]=l,u[0]=c,A<=y[N]&&f<=1448?this.WALKTRACE(b,h,d,E,C,p,m,S,v,y,l,t,s,c,i,u,L,a):null}var w=(P-e+(M-r)-f)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(P,this.OriginalSequence,w))return a[0]=!0,s[0]=P,u[0]=M,w>0&&f<=1448?this.WALKTRACE(b,h,d,E,C,p,m,S,v,y,l,t,s,c,i,u,L,a):(e++,r++,[new n.DiffChange(e,t-e+1,r,i-r+1)]);for(p=this.ClipDiagonalBound(C-f,f,C,g),m=this.ClipDiagonalBound(C+f,f,C,g),N=p;N<=m;N+=2){for(c=(l=N===p||N=y[N+1]?y[N+1]-1:y[N-1])-(N-C)-S,A=l;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(y[N]=l,L&&Math.abs(N-b)<=f&&l<=v[N])return s[0]=l,u[0]=c,A>=v[N]&&f<=1448?this.WALKTRACE(b,h,d,E,C,p,m,S,v,y,l,t,s,c,i,u,L,a):null}if(f<=1447){var D=new Array(d-h+2);D[0]=b-h+1,o.Copy(v,h,D,1,d-h+1),this.m_forwardHistory.push(D),(D=new Array(m-p+2))[0]=C-p+1,o.Copy(y,p,D,1,m-p+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(b,h,d,E,C,p,m,S,v,y,l,t,s,c,i,u,L,a)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(l=0;l0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;l--){var n=e[l],r=0,i=0;if(l>0){var c=e[l-1];c.originalLength>0&&(r=c.originalStart+c.originalLength),c.modifiedLength>0&&(i=c.modifiedStart+c.modifiedLength)}for(var o=n.originalLength>0,s=n.modifiedLength>0,f=0,h=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var p=n.originalStart-d,m=n.modifiedStart-d;if(ph&&(h=_,f=d)}n.originalStart-=f,n.modifiedStart-=f}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this.OriginalSequence.getLength()-1||/^\s*$/.test(this.OriginalSequence.getElementHash(e))},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){return e<=0||e>=this.ModifiedSequence.getLength()-1||/^\s*$/.test(this.ModifiedSequence.getElementHash(e))},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],r=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(r=new Array(e.length+t.length-1),o.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],o.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),o.Copy(e,0,r,0,e.length),o.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,r){if(i.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),i.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,s=e.originalLength,u=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),r[0]=new n.DiffChange(o,s,u,a),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e>>0)>>>0},t.createKeybinding=function(e,t){if(0===e)return null;var r=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new l(n(r,t),n(i,t)):n(r,t)},t.createSimpleKeybinding=n;!function(e){e[e.Simple=1]="Simple",e[e.Chord=2]="Chord"}(t.KeybindingType||(t.KeybindingType={}));var a=function(){function e(e,t,n,r,i){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=a;var l=function(){return function(e,t){this.type=2,this.firstPart=e,this.chordPart=t}}();t.ChordKeybinding=l;var c=function(){return function(e,t,n,r,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=i,this.keyAriaLabel=o}}();t.ResolvedKeybindingPart=c;var f=function(){return function(){}}();t.ResolvedKeybinding=f}),r(e[10],t([1,0,11]),function(e,t,n){"use strict";function r(e){for(var t=[],n=1;n=0,r=d.indexOf("Macintosh")>=0,i=d.indexOf("Linux")>=0,u=!0,l=a=navigator.language}var p;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(p=t.Platform||(t.Platform={}));var m=p.Web;s&&(r?m=p.Mac:n?m=p.Windows:i&&(m=p.Linux)),t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isRootUser=o,t.isNative=s,t.isWeb=u,t.platform=m,t.language=l,t.locale=a;var _="object"==typeof self?self:global;t.globals=_,t.hasWebWorkerSupport=function(){return void 0!==_.Worker},t.setTimeout=_.setTimeout.bind(_),t.clearTimeout=_.clearTimeout.bind(_),t.setInterval=_.setInterval.bind(_),t.clearInterval=_.clearInterval.bind(_);!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=r?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),r(e[14],t([1,0]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==a.number||e.constructor!==Array)}function r(e){return typeof e===a.string||e instanceof String}function i(e){return!(typeof e!==a.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===a.undefined}function s(e){return typeof e===a.function}function u(e,t){if(r(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(s(t)){if(e instanceof t)return;if(e&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var a={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=r,t.isStringArray=function(e){return n(e)&&e.every(function(e){return r(e)})},t.isObject=i,t.isNumber=function(e){return(typeof e===a.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=function(e){return o(e)||null===e};var l=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(l.call(e,t))return!1;return!0},t.isFunction=s,t.areFunctions=function(){for(var e=[],t=0;t0&&e.every(s)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),r=0;rthis.limit;)this.trim()},e.prototype.serialize=function(){var e={entries:[]};return this.map.forEach(function(t){e.entries.push({key:t.key,value:t.value})}),e},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(this.map.has(e))return!1;var n={key:e,value:t};return this.push(n),this.size>this.limit&&this.trim(),!0},e.prototype.get=function(e){var t=this.map.get(e);return t?t.value:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n||(this.set(e,t),t)},e.prototype.delete=function(e){var t=this.map.get(e);return t?(this.map.delete(e),t.next?t.next.prev=t.prev:this.head=t.prev,t.prev?t.prev.next=t.next:this.tail=t.next,t.value):null},e.prototype.has=function(e){return this.map.has(e)},e.prototype.clear=function(){this.map.clear(),this.head=null,this.tail=null},e.prototype.push=function(e){this.head&&(e.prev=this.head,this.head.next=e),this.tail||(this.tail=e),this.head=e,this.map.set(e.key,e)},e.prototype.trim=function(){if(this.tail)if(this.ratiot?1:0}function u(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function l(e){return u(e)||a(e)}function c(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=r,t.trim=function(e,t){return void 0===t&&(t=" "),o(i(e,t),t)},t.ltrim=i,t.rtrim=o,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.indexOfIgnoreCase=function(e,t,n){void 0===n&&(n=0);var i=e.indexOf(t,n);return i<0&&(n>0&&(e=e.substr(n)),t=r(t),i=e.search(new RegExp(t,"i"))),i},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=r(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&e.exec("")&&0===e.lastIndex},t.canNormalize="function"==typeof"".normalize;var p=/[^\u0000-\u0080]/,m=new n.BoundedMap(1e4);t.normalizeNFC=function(e){if(!t.canNormalize||!e)return e;var n=m.get(e);if(n)return n;var r;return r=p.test(e)?e.normalize("NFC"):e,m.set(e,r),r},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;rt.length?1:0},t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&c(e,t)},t.beginsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&c(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(f(e,i,n,t,0,r))return r;r-=1,i+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};var _=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return _.test(e)};var g=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return g.test(e)};var v=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return v.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;tn)return 0;var i,o,s=[],u=[];for(i=0;i=0;o--)if((i+=r[o].length)>n){r.splice(0,o);break}return r.join(t.empty).replace(/^\s/,t.empty)};var y=/\x1B\x5B[12]?K/g,b=/\x1b\[\d+m/g,C=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(y,"")).replace(b,"")).replace(C,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=function(e){return e&&e.length>0&&65279===e.charCodeAt(0)},t.appendWithLimit=function(e,t,n){var r=e.length+t.length;return r>n&&(e="..."+e.substr(r-n)),t.length>n?e+=t.substr(t.length-n):e+=t,e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r"),o}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var u={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=u.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case u.initialized:return n;case u.uninitialized:i=u.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=u.uninitialized}return e=null,i=u.initialized,n;case u.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case u.working:throw"Illegal: reentrancy on initialization";default:i=u.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,o){var s=[e],u=null;return r&&(u=n(t,r),s.push(u)),i(s,o,r||""),u},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t),r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,s){if(e){r=r||function(){};var u=e.prototype;return r.prototype=Object.create(u),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),s&&i(r,s),r}return t(r,o,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t1)&&a.fire(e),s=null,u=0},n)})},onLastListenerRemove:function(){i.dispose()}});return a.event};var h=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=h,t.mapEvent=u,t.filterEvent=a;var d=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(u(this._event,t))},e.prototype.filter=function(t){return new e(a(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new d(e)},t.stopwatch=function(e){var t=(new Date).getTime();return u(s(e),function(e){return(new Date).getTime()-t})},t.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var r=e(function(e){n?n.push(e):o.fire(e)}),i=function(){n.forEach(function(e){return o.fire(e)}),n=null},o=new c({onFirstListenerAdd:function(){r||(r=e(function(e){return o.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(i):i())},onLastListenerRemove:function(){r.dispose(),r=null}});return o.event},t.echo=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),i.fire(e)});var r=function(e,t){return n.forEach(function(n){return e.call(t,n)})},i=new c({onListenerDidAdd:function(e,n,i){t?setTimeout(function(){return r(n,i)}):r(n,i)}});return i.event}}),r(e[13],t([1,0,9]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.default.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=s}),r(e[18],t([1,0,8,4,2,13,10,9]),function(e,t,n,r,i,s,u,a){"use strict";function l(e){return e&&"function"==typeof e.then}function c(e,t){return new i.TPromise(function(r,i,o){e.done(function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}r(e)},function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}i(e)},function(e){o(e)})},function(){e.cancel()})}Object.defineProperty(t,"__esModule",{value:!0}),t.toThenable=function(e){return l(e)?e:i.TPromise.as(e)},t.asWinJsPromise=function(e){var t=new s.CancellationTokenSource;return new i.TPromise(function(n,r,o){var s=e(t.token);s instanceof i.TPromise?s.then(n,r,o):l(s)?s.then(n,r):n(s)},function(){t.cancel()})},t.wireCancellationToken=function(e,t,r){var o=e.onCancellationRequested(function(){return t.cancel()});return r&&(t=t.then(void 0,function(e){if(!n.isPromiseCanceledError(e))return i.TPromise.wrapError(e)})),c(t,function(){return o.dispose()})};var f=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new i.TPromise(function(e,r,i){t.activePromise.then(n,n,i).done(e)},function(){t.activePromise.cancel()})}return new i.TPromise(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new i.TPromise(function(e,n,r){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},r)},function(){t.activePromise.cancel()})},e}();t.Throttler=f;var h=function(){function e(){this.current=i.TPromise.as(null)}return e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=h;var d=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new i.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=d;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new f,n}return o(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)},t}(d);t.ThrottledDelayer=p;var m=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;return r.minimumPeriod=n,r.periodThrottler=new f,r}return o(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.periodThrottler.queue(function(){return i.Promise.join([i.TPromise.timeout(r.minimumPeriod),t()]).then(function(e){return e[1]})})},n)},t}(p);t.PeriodThrottledDelayer=m;var _=function(){function e(){var e=this;this._value=new i.TPromise(function(t,n){e._completeCallback=t,e._errorCallback=n})}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.complete=function(e){this._completeCallback(e)},e.prototype.error=function(e){this._errorCallback(e)},e}();t.PromiseSource=_;var g=function(e){function t(t){var r,i,o,s=this;return s=e.call(this,function(e,t,n){r=e,i=t,o=n},function(){i(n.canceled())})||this,t.then(r,i,o),s}return o(t,e),t}(i.TPromise);t.ShallowCancelThenPromise=g,t.always=c,t.sequence=function(e){function t(){return e.length?e.pop()():null}function n(e){void 0!==e&&null!==e&&r.push(e);var o=t();return o?o.then(n):i.TPromise.as(r)}var r=[];return e=e.reverse(),i.TPromise.as(null).then(n)},t.first=function(e,t){void 0===t&&(t=function(e){return!!e}),e=e.reverse().slice();var n=function(){return 0===e.length?i.TPromise.as(null):e.pop()().then(function(e){return t(e)?i.TPromise.as(e):n()})};return n()};var v=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new a.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new i.TPromise(function(n,r,i){t.outstandingPromises.push({factory:e,c:n,e:r,p:i}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=v;var y=function(e){function t(){return e.call(this,1)||this}return o(t,e),t}(v);t.Queue=y,t.setDisposableTimeout=function(e,t){for(var n=[],r=2;rn||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(r,i,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,s=t.endColumn,u=n.startLineNumber,a=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(o=l,s=c):o===l&&(s=Math.min(s,c)),r>o?null:r===o&&i>s?null:new e(r,i,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.cloneRange=function(){return new e(this.startLineNumber,this.startColumn,this.endLineNumber,this.endColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}();t.Range=r}),r(e[22],t([1,0,5,3]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(i=t.SelectionDirection||(t.SelectionDirection={}));var s=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=r,o.positionColumn=i,o}return o(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new r.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===i.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){for(var r=new Uint8Array(e*t),i=0,o=e*t;i255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,r=new Uint32Array(t),i=0;i=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=r;var i;!function(e){e[e.False=0]="False",e[e.True=1]="True"}(i||(i={}));var o=function(){function e(){this._actual=new r(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=o}),r(e[26],t([1,0,12,20]),function(e,t,n,r){"use strict";function i(e,t,r,i){return new n.LcsDiff(e,t,r).ComputeDiff(i)}function s(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r1&&g>1&&(E=p.charCodeAt(_-2))===(S=m.charCodeAt(g-2));)_--,g--;(_>1||g>1)&&this._pushTrimWhitespaceCharChange(o,s+1,1,_,u+1,1,g);for(var v=c._getLastNonBlankColumn(p,1),y=c._getLastNonBlankColumn(m,1),b=p.length+1,C=m.length+1;v=i)return{word:u[0],startColumn:r+1+u.index,endColumn:r+1+t.lastIndex};return null}function r(e,t,n,r){var i=e-1-r;t.lastIndex=0;for(var o;o=t.exec(n);){if(o.index>i)return null;if(t.lastIndex>=i)return{word:o[0],startColumn:r+1+o.index,endColumn:r+1+t.lastIndex}}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n=t.USUAL_WORD_SEPARATORS,r="(-?\\d*\\.\\d\\w*)|([^",i=0;i=0||(r+="\\"+n[i]);return r+="\\s]+)",new RegExp(r,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),n=new RegExp(e.source,r)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,i,o){t.lastIndex=0;var s=t.exec(i);if(!s)return null;var u=s[0].indexOf(" ")>=0?r(e,t,i,o):n(e,t,i,o);return t.lastIndex=0,u}}),r(e[28],t([1,0,25,7]),function(e,t,n,r){"use strict";function i(){return null===l&&(l=new a([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}function o(){if(null===c){c=new n.CharacterClassifier(0);for(e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)c.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)c.set(".,;".charCodeAt(e),2)}return c}Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e[e.Invalid=0]="Invalid",e[e.Start=1]="Start",e[e.H=2]="H",e[e.HT=3]="HT",e[e.HTT=4]="HTT",e[e.HTTP=5]="HTTP",e[e.F=6]="F",e[e.FI=7]="FI",e[e.FIL=8]="FIL",e[e.BeforeColon=9]="BeforeColon",e[e.AfterColon=10]="AfterColon",e[e.AlmostThere=11]="AlmostThere",e[e.End=12]="End",e[e.Accept=13]="Accept"}(s||(s={}));var u,a=function(){function e(e){for(var t=0,n=0,i=0,o=e.length;it&&(t=a),u>n&&(n=u),l>n&&(n=l)}t++,n++;for(var c=new r.Uint8Matrix(n,t,0),i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}(),l=null;!function(e){e[e.None=0]="None",e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(u||(u={}));var c=null,f=function(){function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>r);return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t){for(var n=i(),r=o(),s=[],u=1,a=t.getLineCount();u<=a;u++){for(var l=t.getLineContent(u),c=l.length,f=0,h=0,d=0,p=1,m=!1,_=!1,g=!1;f=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),r(e[30],t([1,0,9,21,3,5,22,2,13,23,6]),function(e,t,n,r,i,o,s,u,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(f=t.Severity||(t.Severity={}));var h=function(){function e(){}return e.chord=function(e,t){return r.KeyChord(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();t.KeyMod=h;var d;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(d=t.KeyCode||(t.KeyCode={})),t.createMonacoBaseAPI=function(){return{editor:void 0,languages:void 0,CancellationTokenSource:a.CancellationTokenSource,Emitter:n.Emitter,KeyCode:d,KeyMod:h,Position:i.Position,Range:o.Range,Selection:s.Selection,SelectionDirection:s.SelectionDirection,Severity:f,Promise:u.TPromise,Uri:c.default,Token:l.Token}}}),r(e[19],t([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=r;var i=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var r=this.values,i=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(r.length+o),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=r.length)return!1;var o=r.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(r.length-t),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,i,o=0,s=this.values.length-1;o<=s;)if(t=o+(s-o)/2|0,n=this.prefixSum[t],i=n-this.values[t],e=n))break;o=t+1}return new r(t,e-i)},e}();t.PrefixSumComputer=i;var o=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new i(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.getCount=function(){return this._actual.getCount()},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&tthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e},t}(l.MirrorModel),m=function(){function e(){this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var u=i.getLinesContent(),a=o.getLinesContent(),l=new s.DiffComputer(u,a,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!0,shouldMakePrettyDiff:!0});return r.TPromise.as(l.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return null;var u=i.getLinesContent(),a=o.getLinesContent(),l=new s.DiffComputer(u,a,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!1,shouldMakePrettyDiff:!0});return r.TPromise.as(l.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n,o){var s=this._getModel(t);if(!s)return r.TPromise.as(n);for(var a,l=[],c=0,f=n;ce._diffLimit)l.push({range:d,text:p});else for(var g=u.stringDiff(_,p,!1),v=s.offsetAt(i.Range.lift(d).getStartPosition()),y=0,b=g;y0;)self.onmessage(i.shift())},0)})},r=!0,i=[];self.onmessage=function(e){r?(r=!1,n(e.data)):i.push(e)}}()}).call(this); -//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/bat.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/bat.js deleted file mode 100644 index 0352c96139a2617b8d7b5bdcc2d149c1ed8e0493..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/bat.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/bat",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/csharp.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/csharp.js deleted file mode 100644 index 66e42fda60a06b4c9813fc25dcfeff415f271e58..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/csharp.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/csharp",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/css.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/css.js deleted file mode 100644 index aed4eee067d6ead803d28e21ebe4e1d60c461aaf..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/css.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/css",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/dockerfile.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/dockerfile.js deleted file mode 100644 index 24c70d4c9d28a6f1f96b2276aee52bf920cf65b1..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/dockerfile.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/dockerfile",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s.language={defaultToken:"",tokenPostfix:".dockerfile",instructions:/FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|ENTRYPOINT/,instructionAfter:/ONBUILD/,variableAfter:/ENV/,variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(@instructionAfter)(\s+)/,["keyword",{token:"",next:"@instructions"}]],["","keyword","@instructions"]],instructions:[[/(@variableAfter)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(@instructions)/,"keyword","@arguments"]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/fsharp.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/fsharp.js deleted file mode 100644 index 15edde8902add8d915a29088b6b1a51040ee8773..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/fsharp.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/fsharp",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/go.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/go.js deleted file mode 100644 index 75522dcdb7633357f9943df187c91e8d489d354c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/go.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/go",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/handlebars.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/handlebars.js deleted file mode 100644 index 9ebfa2ce3171ecdbb7891f6c2c91f4c072197ec9..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/handlebars.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/handlebars",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}]},t.language={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/html.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/html.js deleted file mode 100644 index 290975fd3c257c2f63592766050479e1531366ce..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/html.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/html",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+i.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}]},t.language={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ini.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ini.js deleted file mode 100644 index 89f8a9e5d747eb90e0c9f04f63fed297bfad722c..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ini.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/ini",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/java.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/java.js deleted file mode 100644 index fab745f94456acc3cc71db207f253983aa05d864..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/java.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/java",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},t.language={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/less.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/less.js deleted file mode 100644 index fcb8ead9de9d06442d3dafcdbb820ce3e2cd0f82..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/less.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/less",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/lua.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/lua.js deleted file mode 100644 index 4ff93276161de55fafa134758e862b346147b1e8..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/lua.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/lua",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}]},t.language={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+)\s*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"variable.source",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{[^}]+\}/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/#/,"comment.php","@phpLineComment"],[/\/\//,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/postiats.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/postiats.js deleted file mode 100644 index 09b20fb74dc45ac9c69e64ffda39697c67b2fe6a..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/postiats.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/postiats",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},t.language={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/powershell.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/powershell.js deleted file mode 100644 index b74678f9c0dd0bd489e7ee5618010e86cb015e9b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/powershell.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/powershell",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},s.language={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/pug.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/pug.js deleted file mode 100644 index 63e7de2d929aad811e40e0bd8a6e7ac7373e521f..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/pug.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/pug",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},t.language={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)(\w+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ruby.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ruby.js deleted file mode 100644 index c5291b7de820703a77276e1af8989efb5d2c0f3e..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/ruby.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/ruby",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sb.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sb.js deleted file mode 100644 index 5c3ed4b24c0b790066c45ae40c171773aea9cdbb..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sb.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/sb",["require","exports"],function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},o.language={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/scss.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/scss.js deleted file mode 100644 index 2bb59ee528341891d125d881a97c13264413d753..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/scss.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/scss",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.language={defaultToken:"",tokenPostfix:".scss",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/solidity.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/solidity.js deleted file mode 100644 index 09377b5d6dd65c15a50905b9bbcfad865feb0994..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/solidity.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/solidity",["require","exports"],function(x,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},e.language={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sql.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sql.js deleted file mode 100644 index e70da60eb6981872e16fda0ab475f3eb53b78e61..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/sql.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/sql",["require","exports"],function(E,T){"use strict";Object.defineProperty(T,"__esModule",{value:!0}),T.conf={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},T.language={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/swift.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/swift.js deleted file mode 100644 index 26fac7df9a40da3349674911bcc1ddd282768f77..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/swift.js +++ /dev/null @@ -1,10 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -/*!--------------------------------------------------------------------------------------------- - * Copyright (C) David Owens II, owensd.io. All rights reserved. - *--------------------------------------------------------------------------------------------*/ -define("vs/basic-languages/src/swift",["require","exports"],function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.conf={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},o.language={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@autoclosure","@noescape","@noreturn","@NSApplicationMain","@NSCopying","@NSManaged","@objc","@UIApplicationMain","@noreturn","@availability","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet"],accessmodifiers:["public","private","internal"],keywords:["__COLUMN__","__FILE__","__FUNCTION__","__LINE__","as","as!","as?","associativity","break","case","catch","class","continue","convenience","default","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","final","for","func","get","guard","if","import","in","infix","init","inout","internal","is","lazy","left","let","mutating","nil","none","nonmutating","operator","optional","override","postfix","precedence","prefix","private","protocol","Protocol","public","repeat","required","return","right","self","Self","set","static","struct","subscript","super","switch","throw","throws","try","try!","Type","typealias","unowned","var","weak","where","while","willSet","FALSE","TRUE"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/\@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}}); \ No newline at end of file diff --git a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/vb.js b/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/vb.js deleted file mode 100644 index 8929c0f5a889f1e0658cd5cc0b2dd97d3551e12b..0000000000000000000000000000000000000000 --- a/packages/designer/projects/form-designer/src/assets/monaco/vs/basic-languages/src/vb.js +++ /dev/null @@ -1,7 +0,0 @@ -/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) - * Released under the MIT license - * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/src/vb",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}]},n.language={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,g._tag)(),g.paragraph=s(g.paragraph)("hr",g.hr)("heading",g.heading)("lheading",g.lheading)("blockquote",g.blockquote)("tag","<"+g._tag)("def",g.def)(),g.normal=u({},g),g.gfm=u({},g.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),g.gfm.paragraph=s(g.paragraph)("(?!","(?!"+g.gfm.fences.source.replace("\\1","\\2")+"|"+g.list.source.replace("\\1","\\3")+"|")(),g.tables=u({},g.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=g,e.lex=function(t,n){return new e(n).lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,o,r,s,a,u,l,c,d,e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:r.replace(/\n+$/,"")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(r,t,!0),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),s=r[2],this.tokens.push({type:"list_start",ordered:s.length>1}),i=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),o=i||/\n\n(?!\s*$)/.test(u),c!==d-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(!n&&t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};else if(t&&(r=this.rules.table.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:a,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:a,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,m.link=s(m.link)("inside",m._inside)("href",m._href)(),m.reflink=s(m.reflink)("inside",m._inside)(),m.normal=u({},m),m.pedantic=u({},m.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),m.gfm=u({},m.normal,{escape:s(m.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(m.text)("]|","~]|")("|","|https?://|")()}),m.breaks=u({},m.gfm,{br:s(m.br)("{2,}","*")(),text:s(m.gfm.text)("{2,}","*")()}),t.rules=m,t.output=function(e,n,i){return new t(n,i).output(e)},t.prototype.output=function(e){for(var t,n,i,r,s="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),s+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):i=n=o(r[1]),s+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):o(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,s+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){s+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),s+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),s+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),s+=this.renderer.codespan(o(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),s+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),s+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),s+=this.renderer.text(o(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),i=n=o(r[1]),s+=this.renderer.link(i,null,n);return s},t.prototype.outputLink=function(e,t){var n=o(t.href),i=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,o(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:o(e,!0))+"\n
    \n":"
    "+(n?e:o(e,!0))+"\n
    "},n.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(r(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return""}var o='
    "},n.prototype.image=function(e,t,n){var i=''+n+'":">"},n.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o="",r="";for(n="",e=0;e=0,i=p.indexOf("Macintosh")>=0,o=p.indexOf("Linux")>=0,a=!0,l=u=navigator.language}var f;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(f=t.Platform||(t.Platform={}));var g=f.Web;s&&(i?g=f.Mac:n?g=f.Windows:o&&(g=f.Linux)),t.isWindows=n,t.isMacintosh=i,t.isLinux=o,t.isRootUser=r,t.isNative=s,t.isWeb=a,t.platform=g,t.language=l,t.locale=u;var m="object"==typeof self?self:global;t.globals=m,t.hasWebWorkerSupport=function(){return void 0!==m.Worker},t.setTimeout=m.setTimeout.bind(m),t.clearTimeout=m.clearTimeout.bind(m),t.setInterval=m.setInterval.bind(m),t.clearInterval=m.clearInterval.bind(m);!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=i?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),define(d[423],h([1,0]),function(e,t){"use strict";function n(e){return 65<=e&&e<=90}Object.defineProperty(t,"__esModule",{value:!0});/*! - BEGIN THIRD PARTY - */ -/*! - * string_score.js: String Scoring Algorithm 0.1.22 - * - * http://joshaven.com/string_score - * https://github.com/joshaven/string_score - * - * Copyright (C) 2009-2014 Joshaven Potter - * Special thanks to all of the contributors listed here https://github.com/joshaven/string_score - * MIT License: http://opensource.org/licenses/MIT - * - * Date: Tue Mar 1 2011 - * Updated: Tue Mar 10 2015 - */ -var i=["-","_"," ","/","\\","."];t.score=function(e,t,o){if(!e||!t)return 0;var r=e+t,s=o&&o[r];if("number"==typeof s)return s;for(var a=t.length,u=e.toLowerCase(),l=t.toLowerCase(),c=0,d=0,h=0;c0&&e.every(s)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i=0)throw new Error("Cannot clone recursive data-structure");i.push(e);var u={};for(var l in e)c.call(e,l)&&(u[l]=r(e[l],t,i));return i.pop(),u}return e}function s(e,t,i){return void 0===i&&(i=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(o){o in e?i&&(n.isObject(e[o])&&n.isObject(t[o])?s(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]}),e):t}function a(e){for(var t=[],n=1;nthis.limit;)this.trim()},e.prototype.serialize=function(){var e={entries:[]};return this.map.forEach(function(t){e.entries.push({key:t.key,value:t.value})}),e},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(this.map.has(e))return!1;var n={key:e,value:t};return this.push(n),this.size>this.limit&&this.trim(),!0},e.prototype.get=function(e){var t=this.map.get(e);return t?t.value:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n||(this.set(e,t),t)},e.prototype.delete=function(e){var t=this.map.get(e);return t?(this.map.delete(e),t.next?t.next.prev=t.prev:this.head=t.prev,t.prev?t.prev.next=t.next:this.tail=t.next,t.value):null},e.prototype.has=function(e){return this.map.has(e)},e.prototype.clear=function(){this.map.clear(),this.head=null,this.tail=null},e.prototype.push=function(e){this.head&&(e.prev=this.head,this.head.next=e),this.tail||(this.tail=e),this.head=e,this.map.set(e.key,e)},e.prototype.trim=function(){if(this.tail)if(this.ratiot?1:0}function a(e){return e>=97&&e<=122}function u(e){return e>=65&&e<=90}function l(e){return a(e)||u(e)}function c(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;i=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r=t.length?e:t[i]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=i,t.trim=function(e,t){return void 0===t&&(t=" "),r(o(e,t),t)},t.ltrim=o,t.rtrim=r,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.indexOfIgnoreCase=function(e,t,n){void 0===n&&(n=0);var o=e.indexOf(t,n);return o<0&&(n>0&&(e=e.substr(n)),t=i(t),o=e.search(new RegExp(t,"i"))),o},t.createRegExp=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=i(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var o="";return n.global&&(o+="g"),n.matchCase||(o+="i"),n.multiline&&(o+="m"),new RegExp(e,o)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&e.exec("")&&0===e.lastIndex},t.canNormalize="function"==typeof"".normalize;var f=/[^\u0000-\u0080]/,g=new n.BoundedMap(1e4);t.normalizeNFC=function(e){if(!t.canNormalize||!e)return e;var n=g.get(e);if(n)return n;var i;return i=f.test(e)?e.normalize("NFC"):e,g.set(e,i),i},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:0},t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&c(e,t)},t.beginsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&c(e,t,n)},t.commonPrefixLength=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n0;){if(d(e,o,n,t,0,i))return i;i-=1,o+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};var m=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return m.test(e)};var v=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return v.test(e)};var _=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return _.test(e)},t.containsFullWidthCharacter=function(e){for(var t=0,n=e.length;tn)return 0;var o,r,s=[],a=[];for(o=0;o=0;r--)if((o+=i[r].length)>n){i.splice(0,r);break}return i.join(t.empty).replace(/^\s/,t.empty)};var y=/\x1B\x5B[12]?K/g,C=/\x1b\[\d+m/g,b=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(y,"")).replace(C,"")).replace(b,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=function(e){return e&&e.length>0&&65279===e.charCodeAt(0)},t.appendWithLimit=function(e,t,n){var i=e.length+t.length;return i>n&&(e="..."+e.substr(i-n)),t.length>n?e+=t.substr(t.length-n):e+=t,e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",i=0;i0?[{start:0,end:t.length}]:[]:null}function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function a(e,t){return u(e.toLowerCase(),t.toLowerCase(),0,0)}function u(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){var o=null;if(o=u(e,t,n+1,i+1))return f({start:i,end:i+1},o)}return u(e,t,n,i+1)}function l(e){return 97<=e&&e<=122}function c(e){return 65<=e&&e<=90}function d(e){return 48<=e&&e<=57}function h(e){return 32===e||9===e||10===e||13===e}function p(e){return l(e)||c(e)||d(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var n=t;n0&&!p(e.charCodeAt(n-1)))return n}return e.length}function m(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;for(o=m(e,t,n+1,i+1);!o&&(r=g(t,r)).6}function y(e){var t=e.upperPercent,n=e.lowerPercent,i=e.alphaPercent,o=e.numericPercent;return n>.2&&t<.8&&i>.6&&o<.2}function C(e){for(var t=0,n=0,i=0,o=0,r=0;r60)return null;var n=v(t);if(!y(n)){if(!_(n))return null;t=t.toLowerCase()}for(var i=null,o=0;o0&&h(e.charCodeAt(n-1)))return n;return e.length}function E(){for(var e=[],t=[0],n=1;n<=100;n++)t.push(-n);for(n=0;n<=100;n++){var i=t.slice(0);i[0]=-n,e.push(i)}return e}function L(e,t,n,i,o){function r(e,t,n){for(void 0===n&&(n=" ");e.length100?100:e.length,o=t.length>100?100:t.length,r=0;for(void 0===n&&(n=i);ro)){for(var s=e.toLowerCase(),a=t.toLowerCase(),u=r,l=0;u1?1:d),f=I[u-1][l]+-1,g=I[u][l-1]+-1;g>=f?g>p?(I[u][l]=g,O[u][l]=4):g===p?(I[u][l]=g,O[u][l]=6):(I[u][l]=p,O[u][l]=2):f>p?(I[u][l]=f,O[u][l]=1):f===p?(I[u][l]=f,O[u][l]=3):(I[u][l]=p,O[u][l]=2),c=h}}if(R&&(console.log(L(I,e,i,t,o)),console.log(L(O,e,i,t,o)),console.log(L(D,e,i,t,o))),W.length=0,B=-100,V=r,N(i,o,0,new H,!1),0!==W.length)return[B,W[0].toArray()]}}}function N(e,t,n,i,o){if(!(W.length>=10||n<-25)){for(var r=0;e>V&&t>0;){var s=D[e][t],a=O[e][t];if(4===a)t-=1,o?n-=5:i.isEmpty()||(n-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&N(e,t-1,i.isEmpty()?n:n-1,i.slice(),o),n+=s,e-=1,t-=1,i.unshift(t),o=!0,1===s){if(r+=1,e===V)return}else n+=1+r*(s-1),r=0}}(n-=t>=3?9:3*t)>B?(B=n,W.unshift(i)):W.push(i)}}function M(e,t){if(!(t+1>=e.length))return e.slice(0,t)+e[t+1]+e[t]+e.slice(t+2)}Object.defineProperty(t,"__esModule",{value:!0}),t.or=o,t.and=function(){for(var e=[],t=0;t0)&&".."!==g&&(h=-1===f?"":h.slice(0,f),d=!0)}else u(e,c,p,".")&&(a||h||p=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}function d(e){return e&&47===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.relative=function(e,r){for(var s=o.rtrim(a(e),t.sep),u=o.rtrim(a(r),t.sep),l=n.isLinux?s:s.toLowerCase(),c=n.isLinux?u:u.toLowerCase(),d=l.split(t.sep),h=c.split(t.sep),p=0,f=Math.min(d.length,h.length);p0){var o=e.charCodeAt(e.length-1);if(47!==o&&92!==o){var r=i.charCodeAt(0);47!==r&&92!==r&&(e+=t.sep)}}e+=i}return a(e)},t.isUNC=function(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1;if(92!==(t=e.charCodeAt(1)))return!1;for(var i=2,o=i;i\|]/g:/[\\/]/g,g=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(f.lastIndex=0,f.test(e)||n.isWindows&&g.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length))},t.isEqual=function(e,t,n){var i=e===t;return!n||i?i:!(!e||!t)&&o.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,n,i){if(e===n)return!0;if(!e||!n)return!1;if(n.length>e.length)return!1;if(i){if(!o.beginsWithIgnoreCase(e,n))return!1;if(n.length===e.length)return!0;var r=n.length;return n.charAt(n.length-1)===t.nativeSep&&r--,e.charAt(r)===t.nativeSep}return n.charAt(n.length-1)!==t.nativeSep&&(n+=t.nativeSep),0===e.indexOf(n)},t.isAbsolute=function(e){return n.isWindows?c(e):d(e)},t.isAbsolute_win32=c,t.isAbsolute_posix=d}),define(d[229],h([1,0,423,9,45]),function(e,t,n,i,o){"use strict";function r(e,t){if(c){var n=e||"",i=t||"",o=c.compare(n,i);return d&&0===o&&n!==i?nr.length)return 1}return 0}Object.defineProperty(t,"__esModule",{value:!0});var c,d;t.setFileNameComparer=function(e){c=e,d=e.resolvedOptions().numeric},t.compareFileNames=r;var h=/^(.*?)(\.([^.]*))?$/;t.noIntlCompareFileNames=s,t.compareFileExtensions=function(e,t){if(c){var n=e?h.exec(e):[],i=t?h.exec(t):[],o=n[1]||"",r=n[3]||"",s=i[1]||"",u=i[3]||"",l=c.compare(r,u);if(0===l){if(d&&r!==u)return rp?-1:1;var f=i.getResourcePath(e),g=i.getResourcePath(t);if(f&&g){var m=n.score(f,o,s),v=n.score(g,o,s);if(m!==v)return m>v?-1:1}return a.length!==c.length?a.length1,c=void 0;if(c=o.isEqual(u.fsPath,e.fsPath,!i.isLinux)?"":o.normalize(r.ltrim(e.fsPath.substr(u.fsPath.length),o.nativeSep),!0),l){var d=o.basename(u.fsPath);c=c?o.join(d,c):d}return c}if(i.isWindows&&e.fsPath&&":"===e.fsPath[1])return o.normalize(e.fsPath.charAt(0).toUpperCase()+e.fsPath.slice(1),!0);var h=o.normalize(e.fsPath,!0);return!i.isWindows&&a&&(h=s(h,a.userHome)),h},t.tildify=s;var a="…",u="\\\\";t.shorten=function(e){for(var t=new Array(e.length),n=!1,i=0;i=0;h--){n=!1;for(var p=c.slice(h,h+d).join(o.nativeSep),f=0;!n&&f-1){var g=h+d===c.length,m=h>0&&e[f].indexOf(o.nativeSep)>-1?o.nativeSep+p:p,v=r.endsWith(e[f],m);n=!g||v}if(!n){var _="";(r.endsWith(c[0],":")||""!==l)&&(1===h&&(h=0,d++,p=c[0]+o.nativeSep+p),h>0&&(_=c[0]+o.nativeSep),_=l+_),h>0&&(_=_+a+o.nativeSep),_+=p,h+d0})}).map(function(e){return e.value}).join("")},t.mnemonicButtonLabel=function(e){return i.isWindows?e.replace(/&&/g,"&"):e.replace(/\(&&\w\)|&&/g,"")}}),function(){var e={};e["WinJS/Core/_WinJS"]={};var t=function(t,n,i){var o={},r=!1,s=n.map(function(t){return"exports"===t?(r=!0,o):e[t]}),a=i.apply({},s);e[t]=r?o:a};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:e.setImmediate?e.setImmediate.bind(e):function(t){e.setTimeout(t,0)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,i){"use strict";function o(e,t,n){var i,o,r,s=Object.keys(t),a=Array.isArray(e);for(o=0,r=s.length;o"),r}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return r(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,o=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(o){case a.initialized:return n;case a.uninitialized:o=a.working;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),o=a.uninitialized}return e=null,o=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case a.working:throw"Illegal: reentrancy on initialization";default:o=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,i,r){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),o(s,r,i||""),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t1)&&u.fire(e),s=null,a=0},n)})},onLastListenerRemove:function(){o.dispose()}});return u.event};var h=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){return n.call(i,e)}):n.call(i,e)},void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=h,t.mapEvent=a,t.filterEvent=u;var p=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(a(this._event,t))},e.prototype.filter=function(t){return new e(u(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new p(e)},t.stopwatch=function(e){var t=(new Date).getTime();return a(s(e),function(e){return(new Date).getTime()-t})},t.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var i=e(function(e){n?n.push(e):r.fire(e)}),o=function(){n.forEach(function(e){return r.fire(e)}),n=null},r=new c({onFirstListenerAdd:function(){i||(i=e(function(e){return r.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i.dispose(),i=null}});return r.event},t.echo=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),o.fire(e)});var i=function(e,t){return n.forEach(function(n){return e.call(t,n)})},o=new c({onListenerDidAdd:function(e,n,o){t?setTimeout(function(){return i(n,o)}):i(n,o)}});return o.event}}),define(d[28],h([1,0,15,11]),function(e,t,n,i){"use strict";function o(){return s.INSTANCE.getZoomLevel()}function r(){return s.INSTANCE.getPixelRatio()}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new i.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=0,this._onDidChangeFullscreen=new i.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new i.Emitter,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.setZoomLevel=function(e,t){this._zoomLevel!==e&&(this._zoomLevel=e,this._lastZoomLevelChangeTime=t?0:Date.now(),this._onDidChangeZoomLevel.fire(this._zoomLevel))},e.prototype.getZoomFactor=function(){return this._zoomFactor},e.prototype.setZoomFactor=function(e){this._zoomFactor=e},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.setFullscreen=function(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())},e.prototype.isFullscreen=function(){return this._fullscreen},e.prototype.setAccessibilitySupport=function(e){this._accessibilitySupport!==e&&(this._accessibilitySupport=e,this._onDidChangeAccessibilitySupport.fire())},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}();t.setZoomLevel=function(e,t){s.INSTANCE.setZoomLevel(e,t)},t.getZoomLevel=o,t.getTimeSinceLastZoomLevelChanged=function(){return s.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return s.INSTANCE.onDidChangeZoomLevel(e)},t.getZoomFactor=function(){return s.INSTANCE.getZoomFactor()},t.setZoomFactor=function(e){s.INSTANCE.setZoomFactor(e)},t.getPixelRatio=r,t.setFullscreen=function(e){s.INSTANCE.setFullscreen(e)},t.isFullscreen=function(){return s.INSTANCE.isFullscreen()},t.onDidChangeFullscreen=function(e){return s.INSTANCE.onDidChangeFullscreen(e)},t.setAccessibilitySupport=function(e){s.INSTANCE.setAccessibilitySupport(e)},t.getAccessibilitySupport=function(){return s.INSTANCE.getAccessibilitySupport()},t.onDidChangeAccessibilitySupport=function(e){return s.INSTANCE.onDidChangeAccessibilitySupport(e)};var a=navigator.userAgent;t.isIE=a.indexOf("Trident")>=0,t.isEdge=a.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=a.indexOf("Opera")>=0,t.isFirefox=a.indexOf("Firefox")>=0,t.isWebKit=a.indexOf("AppleWebKit")>=0,t.isChrome=a.indexOf("Chrome")>=0,t.isSafari=-1===a.indexOf("Chrome")&&a.indexOf("Safari")>=0,t.isIPad=a.indexOf("iPad")>=0,t.isChromev56=a.indexOf("Chrome/56.")>=0&&-1===a.indexOf("Edge/"),t.supportsTranslate3d=!t.isFirefox,t.canUseTranslate3d=function(){if(!t.supportsTranslate3d)return!1;if(0!==o())return!1;if(t.isChromev56){var e=r();if(Math.floor(e)!==e)return!1}return!0}}),define(d[124],h([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.domEvent=function(e,t,i){var o=function(e){return r.fire(e)},r=new n.Emitter({onFirstListenerAdd:function(){e.addEventListener(t,o,i)},onLastListenerRemove:function(){e.removeEventListener(t,o,i)}});return r.event},t.stop=function(e){return n.mapEvent(e,function(e){return e.preventDefault(),e.stopPropagation(),e})}}),define(d[65],h([1,0,40,15,28]),function(e,t,n,i,o){"use strict";function r(e){if(e.charCode){var t=String.fromCharCode(e.charCode).toUpperCase();return n.KeyCodeUtils.fromString(t)}return s[e.keyCode]||0}Object.defineProperty(t,"__esModule",{value:!0});var s={};s[3]=7,s[8]=1,s[9]=2,s[13]=3,s[16]=4,s[17]=5,s[18]=6,s[19]=7,s[20]=8,s[27]=9,s[32]=10,s[33]=11,s[34]=12,s[35]=13,s[36]=14,s[37]=15,s[38]=16,s[39]=17,s[40]=18,s[45]=19,s[46]=20,s[48]=21,s[49]=22,s[50]=23,s[51]=24,s[52]=25,s[53]=26,s[54]=27,s[55]=28,s[56]=29,s[57]=30,s[65]=31,s[66]=32,s[67]=33,s[68]=34,s[69]=35,s[70]=36,s[71]=37,s[72]=38,s[73]=39,s[74]=40,s[75]=41,s[76]=42,s[77]=43,s[78]=44,s[79]=45,s[80]=46,s[81]=47,s[82]=48,s[83]=49,s[84]=50,s[85]=51,s[86]=52,s[87]=53,s[88]=54,s[89]=55,s[90]=56,s[93]=58,s[96]=93,s[97]=94,s[98]=95,s[99]=96,s[100]=97,s[101]=98,s[102]=99,s[103]=100,s[104]=101,s[105]=102,s[106]=103,s[107]=104,s[108]=105,s[109]=106,s[110]=107,s[111]=108,s[112]=59,s[113]=60,s[114]=61,s[115]=62,s[116]=63,s[117]=64,s[118]=65,s[119]=66,s[120]=67,s[121]=68,s[122]=69,s[123]=70,s[124]=71,s[125]=72,s[126]=73,s[127]=74,s[128]=75,s[129]=76,s[130]=77,s[144]=78,s[145]=79,s[186]=80,s[187]=81,s[188]=82,s[189]=83,s[190]=84,s[191]=85,s[192]=86,s[193]=110,s[194]=111,s[219]=87,s[220]=88,s[221]=89,s[222]=90,s[223]=91,s[226]=92,s[229]=109,o.isIE?s[91]=57:o.isFirefox?(s[59]=80,s[107]=81,s[109]=83,i.isMacintosh&&(s[224]=57)):o.isWebKit&&(s[91]=57,i.isMacintosh?s[93]=57:s[92]=57);var a=i.isMacintosh?256:2048,u=i.isMacintosh?2048:256,l=function(){function e(e){var t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=r(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e.prototype.toKeybinding=function(){return this._asRuntimeKeybinding},e.prototype.equals=function(e){return this._asKeybinding===e},e.prototype._computeKeybinding=function(){var e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);var t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=u),t|=e},e.prototype._computeRuntimeKeybinding=function(){var e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new n.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)},e}();t.StandardKeyboardEvent=l}),define(d[47],h([1,0,15,28,148]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=o.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseEvent=r;var s=function(e){function t(t){var n=e.call(this,t)||this;return n.dataTransfer=t.dataTransfer,n}return f(t,e),t}(r);t.DragMouseEvent=s;var a=function(e){function t(t){return e.call(this,t)||this}return f(t,e),t}(s);t.DropMouseEvent=a;var u=function(){function e(e,t,o){if(void 0===t&&(t=0),void 0===o&&(o=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=o,this.deltaX=t,e){var r=e,s=e;void 0!==r.wheelDeltaY?this.deltaY=r.wheelDeltaY/120:void 0!==s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),void 0!==r.wheelDeltaX?i.isSafari&&n.isWindows?this.deltaX=-r.wheelDeltaX/120:this.deltaX=r.wheelDeltaX/120:void 0!==s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseWheelEvent=u}),define(d[123],h([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.default.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(i=t.CancellationToken||(t.CancellationToken={}));var r=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new r),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=s}),define(d[18],h([1,0,10,15,7,123,3,11]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){return e&&"function"==typeof e.then}function l(e,t){return new o.TPromise(function(i,o,r){e.done(function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}i(e)},function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}o(e)},function(e){r(e)})},function(){e.cancel()})}Object.defineProperty(t,"__esModule",{value:!0}),t.toThenable=function(e){return u(e)?e:o.TPromise.as(e)},t.asWinJsPromise=function(e){var t=new r.CancellationTokenSource;return new o.TPromise(function(n,i,r){var s=e(t.token);s instanceof o.TPromise?s.then(n,i,r):u(s)?s.then(n,i):n(s)},function(){t.cancel()})},t.wireCancellationToken=function(e,t,i){var r=e.onCancellationRequested(function(){return t.cancel()});return i&&(t=t.then(void 0,function(e){if(!n.isPromiseCanceledError(e))return o.TPromise.wrapError(e)})),l(t,function(){return r.dispose()})};var c=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new o.TPromise(function(e,i,o){t.activePromise.then(n,n,o).done(e)},function(){t.activePromise.cancel()})}return new o.TPromise(function(e,n,i){t.queuedPromise.then(e,n,i)},function(){})}return this.activePromise=e(),new o.TPromise(function(e,n,i){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},i)},function(){t.activePromise.cancel()})},e}();t.Throttler=c;var d=function(){function e(){this.current=o.TPromise.as(null)}return e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=d;var h=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new o.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=h;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new c,n}return f(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.throttler.queue(t)},n)},t}(h);t.ThrottledDelayer=p;var g=function(e){function t(t,n){void 0===n&&(n=0);var i=e.call(this,t)||this;return i.minimumPeriod=n,i.periodThrottler=new c,i}return f(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.periodThrottler.queue(function(){return o.Promise.join([o.TPromise.timeout(i.minimumPeriod),t()]).then(function(e){return e[1]})})},n)},t}(p);t.PeriodThrottledDelayer=g;var m=function(){function e(){var e=this;this._value=new o.TPromise(function(t,n){e._completeCallback=t,e._errorCallback=n})}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.complete=function(e){this._completeCallback(e)},e.prototype.error=function(e){this._errorCallback(e)},e}();t.PromiseSource=m;var v=function(e){function t(t){var i,o,r,s=this;return s=e.call(this,function(e,t,n){i=e,o=t,r=n},function(){o(n.canceled())})||this,t.then(i,o,r),s}return f(t,e),t}(o.TPromise);t.ShallowCancelThenPromise=v,t.always=l,t.sequence=function(e){function t(){return e.length?e.pop()():null}function n(e){void 0!==e&&null!==e&&i.push(e);var r=t();return r?r.then(n):o.TPromise.as(i)}var i=[];return e=e.reverse(),o.TPromise.as(null).then(n)},t.first=function(e,t){void 0===t&&(t=function(e){return!!e}),e=e.reverse().slice();var n=function(){return 0===e.length?o.TPromise.as(null):e.pop()().then(function(e){return t(e)?o.TPromise.as(e):n()})};return n()};var _=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new a.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new o.TPromise(function(n,i,o){t.outstandingPromises.push({factory:e,c:n,e:i,p:o}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=_;var y=function(e){function t(){return e.call(this,1)||this}return f(t,e),t}(_);t.Queue=y,t.setDisposableTimeout=function(e,t){for(var n=[],i=2;i0&&this._emitToBulkListeners(e);for(var t=0,n=e.length;t0;){var n=this._emitQueue.shift();o(n.target,n.arg)}},t}(s);t.OrderGuaranteeEventEmitter=u}),define(d[4],h([1,0,7,18,10,38,3,29,28,65,47]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,n,i){return new N(e,t,n,i)}function h(e){return function(t){return e(new c.StandardMouseEvent(t))}}function p(e){return function(t){return e(new l.StandardKeyboardEvent(t))}}function g(e){return document.defaultView.getComputedStyle(e,null)}function m(e,t,n){var i=g(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),O(e,o)}function v(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=g(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=R.getBorderLeftWidth(e),n+=R.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function _(e){var t=R.getMarginLeft(e)+R.getMarginRight(e);return e.offsetWidth+t}function y(e){var t=R.getMarginLeft(e)+R.getMarginRight(e);return e.scrollWidth+t}function C(e,t){if(null===e)return 0;var n=v(e),i=v(t);return n.left-i.left}function b(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}function w(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function S(e,t){for(;e;){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.clearNode=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.safeStringifyDOMAware=function(e){var t=[];return JSON.stringify(e,function(e,n){if(n instanceof Element)return"[Element]";if(a.isObject(n)||Array.isArray(n)){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return n})},t.isInDOM=function(e){for(;e;){if(e===document.body)return!0;e=e.parentNode}return!1};var E=new(function(){function e(){}return e.prototype._findClassName=function(e,t){var n=e.className;if(n){t=t.trim();var i=n.length,o=t.length;if(0!==o)if(i=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClass=function(e,t){e.className?(this._findClassName(e,t),-1===this._lastStart&&(e.className=e.className+" "+t)):e.className=t},e.prototype.removeClass=function(e,t){this._findClassName(e,t),-1!==this._lastStart&&(e.className=e.className.substring(0,this._lastStart)+e.className.substring(this._lastEnd))},e.prototype.toggleClass=function(e,t,n){this._findClassName(e,t),-1===this._lastStart||void 0!==n&&n||this.removeClass(e,t),-1!==this._lastStart||void 0!==n&&!n||this.addClass(e,t)},e}()),L=new(function(){function e(){}return e.prototype.hasClass=function(e,t){return t&&e.classList&&e.classList.contains(t)},e.prototype.addClass=function(e,t){t&&e.classList&&e.classList.add(t)},e.prototype.removeClass=function(e,t){t&&e.classList&&e.classList.remove(t)},e.prototype.toggleClass=function(e,t,n){e.classList&&e.classList.toggle(t,n)},e}()),x=u.isIE?E:L;t.hasClass=x.hasClass.bind(x),t.addClass=x.addClass.bind(x),t.removeClass=x.removeClass.bind(x),t.toggleClass=x.toggleClass.bind(x);var N=function(){function e(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._useCapture=i||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}return e.prototype.dispose=function(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)},e}();t.addDisposableListener=d,t.addStandardDisposableListener=function(e,t,n,i){var o=n;return"click"===t||"mousedown"===t?o=h(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=p(n)),d(e,t,o,i)},t.addDisposableNonBubblingMouseOutListener=function(e,t){return d(e,"mouseout",function(n){for(var i=n.relatedTarget||n.toElement;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})};var M=function(){var e=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame,t=self.cancelAnimationFrame||self.cancelRequestAnimationFrame||self.msCancelAnimationFrame||self.msCancelRequestAnimationFrame||self.webkitCancelAnimationFrame||self.webkitCancelRequestAnimationFrame||self.mozCancelAnimationFrame||self.mozCancelRequestAnimationFrame||self.oCancelAnimationFrame||self.oCancelRequestAnimationFrame,n=!!e,i=e||function(e){return setTimeout(function(){return e((new Date).getTime())},0)},o=t||function(e){};return{isNative:n,request:function(e){return i(e)},cancel:function(e){return o(e)}}}(),T=function(){function e(e,t){this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){o.onUnexpectedError(e)}},e.sort=function(e,t){return t.priority-e.priority},e}();!function(){var e=[],n=null,i=!1,o=!1,r=function(){for(i=!1,n=e,e=[],o=!0;n.length>0;)n.sort(T.sort),n.shift().execute();o=!1};t.scheduleAtNextAnimationFrame=function(t,n){void 0===n&&(n=0);var o=new T(t,n);return e.push(o),i||(i=!0,M.request(r)),o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,i){if(o){var r=new T(e,i);return n.push(r),r}return t.scheduleAtNextAnimationFrame(e,i)}}();var k=16,I=function(e,t){return t},D=function(e){function t(t,n,o,r,s){void 0===r&&(r=I),void 0===s&&(s=k);var a=e.call(this)||this,u=null,l=0,c=a._register(new i.TimeoutTimer),h=function(){l=(new Date).getTime(),o(u),u=null};return a._register(d(t,n,function(e){u=r(u,e);var t=(new Date).getTime()-l;t>=s?(c.cancel(),h()):c.setIfNotSet(h,s-t)})),a}return f(t,e),t}(s.Disposable);t.addDisposableThrottledListener=function(e,t,n,i,o){return new D(e,t,n,i,o)},t.getComputedStyle=g;var O=function(e,t){return parseFloat(t)||0},R={getBorderLeftWidth:function(e){return m(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return m(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return m(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return m(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return m(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return m(e,"padding-top","paddingTop")},getPaddingRight:function(e){return m(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return m(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return m(e,"margin-left","marginLeft")},getMarginTop:function(e){return m(e,"margin-top","marginTop")},getMarginRight:function(e){return m(e,"margin-right","marginRight")},getMarginBottom:function(e){return m(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=v,t.getDomNodePagePosition=function(e){var n=e.getBoundingClientRect();return{left:n.left+t.StandardWindow.scrollX,top:n.top+t.StandardWindow.scrollY,width:n.width,height:n.height}},t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getContentWidth=function(e){var t=R.getBorderLeftWidth(e)+R.getBorderRightWidth(e),n=R.getPaddingLeft(e)+R.getPaddingRight(e);return e.offsetWidth-t-n},t.getTotalWidth=_,t.getTotalScrollWidth=y,t.getContentHeight=function(e){var t=R.getBorderTopWidth(e)+R.getBorderBottomWidth(e),n=R.getPaddingTop(e)+R.getPaddingBottom(e);return e.offsetHeight-t-n},t.getTotalHeight=function(e){var t=R.getMarginTop(e)+R.getMarginBottom(e);return e.offsetHeight+t},t.getLargestChildWidth=function(e,t){var n=t.map(function(t){return Math.max(y(t),_(t))+C(t,e)||0});return Math.max.apply(Math,n)},t.isAncestor=function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1},t.findParentWithClass=function(e,n,i){for(;e;){if(t.hasClass(e,n))return e;if(i&&t.hasClass(e,i))return null;e=e.parentNode}return null},t.createStyleSheet=b;var P=b();t.createCSSRule=function(e,t,n){void 0===n&&(n=P),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)},t.getCSSRule=function(e,t){if(void 0===t&&(t=P),!t)return null;for(var n=w(t),i=0;i=0;o--)t.sheet.deleteRule(i[o])}},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:u.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:u.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:u.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode};var A=function(e){function n(n){var i=e.call(this)||this,o=!1,s=!1;i._eventEmitter=i._register(new r.EventEmitter);return i._register(d(n,t.EventType.FOCUS,function(e){s=!1,o||(o=!0,i._eventEmitter.emit("focus",{}))},!0)),i._register(d(n,t.EventType.BLUR,function(e){o&&(s=!0,window.setTimeout(function(){s&&(s=!1,o=!1,i._eventEmitter.emit("blur",{}))},0))},!0)),i}return f(n,e),n.prototype.addFocusListener=function(e){return this._eventEmitter.addListener("focus",e)},n.prototype.addBlurListener=function(e){return this._eventEmitter.addListener("blur",e)},n}(s.Disposable);t.trackFocus=function(e){return new A(e)},t.append=function(e){for(var t=[],n=1;n0&&(t instanceof Node?n.push(t.cloneNode()):n.push(document.createTextNode(t))),n.push(e)}),n},t.show=function(){for(var e=[],t=0;t0},t.prototype.startMonitoring=function(e,t,n){var s=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=o.IframeUtils.getSameOriginWindowChain(),u=0;u"},h.link=function(e,t,n){return e===n&&(n=s.removeMarkdownEscapes(n)),t=s.removeMarkdownEscapes(t),!(e=s.removeMarkdownEscapes(e))||e.match(/^data:|javascript:/i)?n:''+n+""},h.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(h.code=function(e,n){var s=t.codeBlockRenderer(n,e);if("string"==typeof s)return s;if(r.TPromise.is(s)){var a=i.defaultGenerator.nextId();return r.TPromise.join([s,d]).done(function(e){var t=e[0],n=c.querySelector('div[data-code="'+a+'"]');n&&(n.innerHTML=t)},function(e){}),'
    '+o.escape(e)+"
    "}return e}),t.actionCallback&&n.addStandardDisposableListener(c,"click",function(e){if("A"===e.target.tagName){var n=e.target.dataset.href;n&&t.actionCallback(n,e)}}),c.innerHTML=a.marked(e,{sanitize:!0,renderer:h}),l(),c}function c(e,t,i){var o;if(2===t.type)o=document.createTextNode(t.content);else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(5===t.type){var r=document.createElement("a");r.href="#",n.addStandardDisposableListener(r,"click",function(e){i(String(t.index),e)}),o=r}else 7===t.type?o=document.createElement("br"):1===t.type&&(o=e);e!==o&&e.appendChild(o),Array.isArray(t.children)&&t.children.forEach(function(e){c(o,e,i)})}function d(e){for(var t={type:1,children:[]},n=0,i=t,o=[],r=new g(e);!r.eos();){var s=r.next(),a="\\"===s&&0!==p(r.peek());if(a&&(s=r.next()),!a&&h(s)&&s===r.peek()){r.advance(),2===i.type&&(i=o.pop());var u=p(s);if(i.type===u||5===i.type&&6===u)i=o.pop();else{var l={type:u,children:[]};5===u&&(l.index=n,n++),i.children.push(l),o.push(i),i=l}}else if("\n"===s)2===i.type&&(i=o.pop()),i.children.push({type:7});else if(2!==i.type){var c={type:2,content:s};i.children.push(c),o.push(i),i=c}else i.content+=s}return 2===i.type&&(i=o.pop()),o.length,t}function h(e){return 0!==p(e)}function p(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.renderMarkedString=function(e,t){void 0===t&&(t={});var n;return n="string"==typeof e?e:"```"+e.language+"\n"+e.value+"\n```",l(n,t)},t.renderText=function(e,t){void 0===t&&(t={});var n=u(t);return n.textContent=e,n},t.renderFormattedText=function(e,t){void 0===t&&(t={});var n=u(t);return c(n,d(e),t.actionCallback),n},t.renderMarkdown=l;var f,g=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();!function(e){e[e.Invalid=0]="Invalid",e[e.Root=1]="Root",e[e.Text=2]="Text",e[e.Bold=3]="Bold",e[e.Italics=4]="Italics",e[e.Action=5]="Action",e[e.ActionClose=6]="ActionClose",e[e.NewLine=7]="NewLine"}(f||(f={}))}),define(d[74],h([1,0,33,3,4]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(r=t.EventType||(t.EventType={}));var s=function(){function e(e){this.callOnTarget=[],this.activeTouches={},this.target=e,this.handle=null}return e.prototype.dispose=function(){this.target=null,this.handle&&(this.handle.dispose(),this.handle=null)},Object.defineProperty(e.prototype,"target",{set:function(e){var t=this;this.callOnTarget=i.dispose(this.callOnTarget),this.activeTouches={},this.targetElement=e,this.targetElement&&(this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchstart",function(e){return t.onTouchStart(e)})),this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchend",function(e){return t.onTouchEnd(e)})),this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchmove",function(e){return t.onTouchMove(e)})))},enumerable:!0,configurable:!0}),e.newGestureEvent=function(e){var t=document.createEvent("CustomEvent");return t.initEvent(e,!1,!0),t},e.prototype.onTouchStart=function(t){var n=Date.now();t.preventDefault(),this.handle&&(this.handle.dispose(),this.handle=null);for(var i=0,o=t.targetTouches.length;i=e.HOLD_DELAY&&Math.abs(l.initialPageX-n.tail(l.rollingPageX))<30&&Math.abs(l.initialPageY-n.tail(l.rollingPageY))<30){var d=e.newGestureEvent(r.Contextmenu);d.initialTarget=l.initialTarget,d.pageX=n.tail(l.rollingPageX),d.pageY=n.tail(l.rollingPageY),this.targetElement.dispatchEvent(d)}else if(1===o){var h=n.tail(l.rollingPageX),p=n.tail(l.rollingPageY),f=n.tail(l.rollingTimestamps)-l.rollingTimestamps[0],g=h-l.rollingPageX[0],m=p-l.rollingPageY[0];this.inertia(i,Math.abs(g)/f,g>0?1:-1,h,Math.abs(m)/f,m>0?1:-1,p)}delete this.activeTouches[u.identifier]}else console.warn("move of an UNKNOWN touch",u)}},e.prototype.inertia=function(t,n,i,s,a,u,l){var c=this;this.handle=o.scheduleAtNextAnimationFrame(function(){var o=Date.now(),d=o-t,h=0,p=0,f=!0;n+=e.SCROLL_FRICTION*d,a+=e.SCROLL_FRICTION*d,n>0&&(f=!1,h=i*n*d),a>0&&(f=!1,p=u*a*d);var g=e.newGestureEvent(r.Change);g.translationX=h,g.translationY=p,c.targetElement.dispatchEvent(g),f||c.inertia(o,n,i,s+h,a,u,l+p)})},e.prototype.onTouchMove=function(t){var i=Date.now();t.preventDefault(),t.stopPropagation();for(var o=0,s=t.changedTouches.length;o3&&(u.rollingPageX.shift(),u.rollingPageY.shift(),u.rollingTimestamps.shift()),u.rollingPageX.push(a.pageX),u.rollingPageY.push(a.pageY),u.rollingTimestamps.push(i)}else console.warn("end of an UNKNOWN touch",a)}},e.HOLD_DELAY=700,e.SCROLL_FRICTION=-.005,e}();t.Gesture=s}),define(d[110],h([1,0,9,4,26,512]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){void 0===t&&(t=[]),e||(e=""),this.didEverRender&&this.text===e&&o.equals(this.highlights,t)||(Array.isArray(t)||(t=[]),this.text=e,this.highlights=t,this.render())},e.prototype.render=function(){i.clearNode(this.domNode);for(var e,t=[],o=0,s=0;s"),t.push(r.expand(n.escape(this.text.substring(o,e.start)))),t.push(""),o=e.end),t.push(''),t.push(r.expand(n.escape(this.text.substring(e.start,e.end)))),t.push(""),o=e.end);o"),t.push(r.expand(n.escape(this.text.substring(o)))),t.push("")),this.domNode.innerHTML=t.join(""),this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e}();t.HighlightedLabel=s}),define(d[416],h([1,0,4]),function(e,t,n){"use strict";function i(e){try{e.parentElement.removeChild(e)}catch(e){}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.renderers=e,this.cache=Object.create(null)}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var i=n.$(".monaco-list-row");t={domNode:i,templateId:e,templateData:this.renderers[e].renderTemplate(i)}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,o=e.templateId;n.removeClass(t,"scrolling"),i(t),this.getTemplateCache(o).push(e)},e.prototype.getTemplateCache=function(e){return this.cache[e]||(this.cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this.cache&&Object.keys(this.cache).forEach(function(t){e.cache[t].forEach(function(n){e.renderers[t].disposeTemplate(n.templateData),n.domNode=null,n.templateData=null}),delete e.cache[t]})},e.prototype.dispose=function(){this.garbageCollect(),this.cache=null,this.renderers=null},e}();t.RowCache=o}),define(d[41],h([1,0,3,47,65,4]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.onclick=function(e,t){this._register(r.addDisposableListener(e,r.EventType.CLICK,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onmousedown=function(e,t){this._register(r.addDisposableListener(e,r.EventType.MOUSE_DOWN,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onmouseover=function(e,t){this._register(r.addDisposableListener(e,r.EventType.MOUSE_OVER,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(r.addDisposableNonBubblingMouseOutListener(e,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onkeydown=function(e,t){this._register(r.addDisposableListener(e,r.EventType.KEY_DOWN,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.onkeyup=function(e,t){this._register(r.addDisposableListener(e,r.EventType.KEY_UP,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.oninput=function(e,t){this._register(r.addDisposableListener(e,r.EventType.INPUT,t))},t.prototype.onblur=function(e,t){this._register(r.addDisposableListener(e,r.EventType.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(r.addDisposableListener(e,r.EventType.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(r.addDisposableListener(e,r.EventType.CHANGE,t))},t}(n.Disposable);t.Widget=s}),define(d[117],h([1,0,83,41,18]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ARROW_IMG_SIZE=11;var r=function(e){function i(i){var r=e.call(this)||this;return r._onActivate=i.onActivate,r.bgDomNode=document.createElement("div"),r.bgDomNode.className="arrow-background",r.bgDomNode.style.position="absolute",r.bgDomNode.style.width=i.bgWidth+"px",r.bgDomNode.style.height=i.bgHeight+"px",void 0!==i.top&&(r.bgDomNode.style.top="0px"),void 0!==i.left&&(r.bgDomNode.style.left="0px"),void 0!==i.bottom&&(r.bgDomNode.style.bottom="0px"),void 0!==i.right&&(r.bgDomNode.style.right="0px"),r.domNode=document.createElement("div"),r.domNode.className=i.className,r.domNode.style.position="absolute",r.domNode.style.width=t.ARROW_IMG_SIZE+"px",r.domNode.style.height=t.ARROW_IMG_SIZE+"px",void 0!==i.top&&(r.domNode.style.top=i.top+"px"),void 0!==i.left&&(r.domNode.style.left=i.left+"px"),void 0!==i.bottom&&(r.domNode.style.bottom=i.bottom+"px"),void 0!==i.right&&(r.domNode.style.right=i.right+"px"),r._mouseMoveMonitor=r._register(new n.GlobalMouseMoveMonitor),r.onmousedown(r.bgDomNode,function(e){return r._arrowMouseDown(e)}),r.onmousedown(r.domNode,function(e){return r._arrowMouseDown(e)}),r._mousedownRepeatTimer=r._register(new o.IntervalTimer),r._mousedownScheduleRepeatTimer=r._register(new o.TimeoutTimer),r}return f(i,e),i.prototype._arrowMouseDown=function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(function(){t._mousedownRepeatTimer.cancelAndSet(function(){return t._onActivate()},1e3/24)},200),this._mouseMoveMonitor.startMonitoring(n.standardMouseMoveMerger,function(e){},function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()},i}(i.Widget);t.ScrollbarArrow=r}),define(d[53],h([1,0,7,38,79,11]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAction=function(e){return!!e&&(e instanceof s||"string"==typeof e.id&&"string"==typeof e.label&&"string"==typeof e.class&&"boolean"==typeof e.enabled&&"boolean"==typeof e.checked&&"function"==typeof e.run)};var s=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=""),void 0===i&&(i=!0),this._onDidChange=new r.Emitter,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){return void 0!==this._actionCallback?this._actionCallback(e):n.TPromise.as(!0)},e}();t.Action=s;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.run=function(e,t){var i=this;return e.enabled?(this.emit(o.EventType.BEFORE_RUN,{action:e}),this.runAction(e,t).then(function(t){i.emit(o.EventType.RUN,{action:e,result:t})},function(t){i.emit(o.EventType.RUN,{action:e,error:t})})):n.TPromise.as(null)},t.prototype.runAction=function(e,t){return n.TPromise.as(t?e.run(t):e.run())},t}(i.EventEmitter);t.ActionRunner=a}),define(d[165],h([1,0,33,26,9,45,80,7]),function(e,t,n,i,o,r,s,a){"use strict";function u(){return Object.create(null)}function l(e){switch(e){case 0:return"";case 1:return S+"*?";default:return"(?:"+w+"|"+S+"+"+w+"|"+w+S+"+)*?"}}function c(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;a0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter(function(e){return!e.basenames});return u.push(a),u}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=u,t.mergeExpressions=function(){for(var e=[],t=0;t=0}}function a(e,t,n){for(var i,s,a,u=n.length-1;u>=0;u--){var l=n[u];if(t===l.filenameLowercase){i=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){var c=l.filepatternOnPath?e:t;r.match(l.filepatternLowercase,c)&&(s=l)}l.extension&&(!a||l.extension.length>a.extension.length)&&o.endsWith(t,l.extensionLowercase)&&(a=l)}return i?i.mime:s?s.mime:a?a.mime:null}function u(e){if(o.startsWithUTF8BOM(e)&&(e=e.substr(1)),e.length>0)for(var t=0;t0)return n.mime}}return null}function l(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&l(e[0]))}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var c=[],d=[],h=[];t.registerTextMime=function(e){var t=s(e);c.push(t),t.userConfigured?h.push(t):d.push(t),t.userConfigured||c.forEach(function(e){e.mime===t.mime||e.userConfigured||(t.extension&&e.extension===t.extension&&console.warn("Overwriting extension <<"+t.extension+">> to now point to mime <<"+t.mime+">>"),t.filename&&e.filename===t.filename&&console.warn("Overwriting filename <<"+t.filename+">> to now point to mime <<"+t.mime+">>"),t.filepattern&&e.filepattern===t.filepattern&&console.warn("Overwriting filepattern <<"+t.filepattern+">> to now point to mime <<"+t.mime+">>"),t.firstline&&e.firstline===t.firstline&&console.warn("Overwriting firstline <<"+t.firstline+">> to now point to mime <<"+t.mime+">>"))})},t.clearTextMimes=function(e){e?(c=c.filter(function(e){return!e.userConfigured}),h=[]):(c=[],d=[],h=[])},t.guessMimeTypes=function(e,i){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),r=a(e,o,h);if(r)return[r,t.MIME_TEXT];var s=a(e,o,d);if(s)return[s,t.MIME_TEXT];if(i){var l=u(i);if(l)return[l,t.MIME_TEXT]}return[t.MIME_UNKNOWN]},t.isBinaryMime=function(e){if(!e)return!1;return(i.isArray(e)?e:e.split(",").map(function(e){return e.trim()})).indexOf(t.MIME_BINARY)>=0},t.isUnspecific=l,t.suggestFilename=function(e,t){for(var n=0;nt&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}();t.ScrollState=o;var r=function(e){function t(){var t=e.call(this)||this;return t._onScroll=t._register(new i.Emitter),t.onScroll=t._onScroll.event,t._state=new o(0,0,0,0,0,0),t}return f(t,e),t.prototype.getState=function(){return this._state},t.prototype.validateScrollTop=function(e){return e=Math.round(e),e=Math.max(e,0),e=Math.min(e,this._state.scrollHeight-this._state.height)},t.prototype.validateScrollLeft=function(e){return e=Math.round(e),e=Math.max(e,0),e=Math.min(e,this._state.scrollWidth-this._state.width)},t.prototype.updateState=function(e){var t=this._state,n=new o(void 0!==e.width?e.width:t.width,void 0!==e.scrollWidth?e.scrollWidth:t.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:t.scrollLeft,void 0!==e.height?e.height:t.height,void 0!==e.scrollHeight?e.scrollHeight:t.scrollHeight,void 0!==e.scrollTop?e.scrollTop:t.scrollTop);t.equals(n)||(this._state=n,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(n.Disposable);t.Scrollable=r}),define(d[429],h([1,0,3,18,48]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n,o){var r=e.call(this)||this;return r._visibility=t,r._visibleClassName=n,r._invisibleClassName=o,r._domNode=null,r._isVisible=!1,r._isNeeded=!1,r._shouldBeVisible=!1,r._revealTimer=r._register(new i.TimeoutTimer),r}return f(t,e),t.prototype.applyVisibilitySetting=function(e){return this._visibility!==o.ScrollbarVisibility.Hidden&&(this._visibility===o.ScrollbarVisibility.Visible||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(function(){e._domNode.setClassName(e._visibleClassName)},0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(n.Disposable);t.ScrollbarVisibilityController=r}),define(d[184],h([1,0,15,4,83,41,27,117,429]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new u.ScrollbarVisibilityController(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._mouseMoveMonitor=n._register(new o.GlobalMouseMoveMonitor),n._shouldRender=!0,n.domNode=s.createFastDomNode(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,function(e){return n._domNodeMouseDown(e)}),n}return f(t,e),t.prototype._createArrow=function(e){var t=this._register(new a.ScrollbarArrow(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=s.createFastDomNode(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),this.slider.setWidth(n),this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,function(e){e.leftButton&&(e.preventDefault(),o._sliderMouseDown(e,function(){}))})},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){})):this._onMouseDown(e)},t.prototype.delegateSliderMouseDown=function(e,t){this._sliderMouseDown(e,t)},t.prototype._onMouseDown=function(e){var t=i.getDomNodePagePosition(this.domNode.domNode);this.setDesiredScrollPosition(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(e,t))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){}))},t.prototype._sliderMouseDown=function(e,t){var i=this,r=this._sliderMousePosition(e),s=this._sliderOrthogonalMousePosition(e),a=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(o.standardMouseMoveMerger,function(e){var t=i._sliderOrthogonalMousePosition(e),o=Math.abs(t-s);if(n.isWindows&&o>140)i.setDesiredScrollPosition(a.getScrollPosition());else{var u=i._sliderMousePosition(e)-r;i.setDesiredScrollPosition(a.getDesiredScrollPositionFromDelta(u))}},function(){i.slider.toggleClassName("active",!1),i._host.onDragEnd(),t()}),this._host.onDragStart()},t.prototype.setDesiredScrollPosition=function(e){e=this.validateScrollPosition(e);var t=this._getScrollPosition();return this._setScrollPosition(e),t!==this._getScrollPosition()&&(this._onElementScrollPosition(this._getScrollPosition()),!0)},t}(r.Widget);t.AbstractScrollbar=l}),define(d[439],h([1,0,184,47,48,150,117]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,a){var u=e.call(this,{lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===o.ScrollbarVisibility.Hidden?0:n.horizontalScrollbarSize,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.horizontalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"left-arrow",top:c,left:l,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,1,0))}}),u._createArrow({className:"right-arrow",top:c,left:void 0,bottom:void 0,right:l,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,-1,0))}})}return u._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),u}return f(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e.posx-t.left},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype._getScrollPosition=function(){return this._scrollable.getState().scrollLeft},t.prototype._setScrollPosition=function(e){this._scrollable.updateState({scrollLeft:e})},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollLeft(e)},t}(n.AbstractScrollbar);t.HorizontalScrollbar=a}),define(d[440],h([1,0,184,47,48,150,117]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n,a){var u=e.call(this,{lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.verticalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"up-arrow",top:l,left:c,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,1))}}),u._createArrow({className:"down-arrow",top:void 0,left:c,bottom:l,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,-1))}})}return u._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),u}return f(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e.posy-t.top},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype._getScrollPosition=function(){return this._scrollable.getState().scrollTop},t.prototype._setScrollPosition=function(e){this._scrollable.updateState({scrollTop:e})},t.prototype.validateScrollPosition=function(e){return this._scrollable.validateScrollTop(e)},t}(n.AbstractScrollbar);t.VerticalScrollbar=a}),define(d[197],h([1,0,10,3,7,18,15]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="$initialize",u=!1;t.logOnceWebWorkerWarning=function(e){s.isWeb&&(u||(u=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))};var l=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=String(++this._lastSentReq),i={c:null,e:null},r=new o.TPromise(function(e,t,n){i.c=e,i.e=t},function(){});return this._pendingReplies[n]=i,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),r},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var i=e;if(!this._pendingReplies[i.seq])return void console.warn("Got reply to unknown seq");var o=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){var r=i.err;return i.err.$isError&&((r=new Error).name=i.err.name,r.message=i.err.message,r.stack=i.err.stack),void o.e(r)}o.c(i.res)}else{var s=e,a=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){t._send({vsWorker:t._workerId,seq:a,res:void 0,err:n.transformErrorForSerialization(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),c=function(e){function t(t,n){var i=e.call(this)||this;i._lastRequestTimestamp=-1;var r=null,s=null;i._worker=i._register(t.create("vs/base/common/worker/simpleWorker",function(e){i._protocol.handleMessage(e)},function(e){s(e)})),i._protocol=new l({sendMessage:function(e){i._worker.postMessage(e)},handleMessage:function(e,t){return o.TPromise.as(null)}}),i._protocol.setWorkerId(i._worker.getId());var u=null,c=self.require;"function"==typeof c.getConfig?u=c.getConfig():void 0!==self.requirejs&&(u=self.requirejs.s.contexts._.config),i._lazyProxy=new o.TPromise(function(e,t,n){r=e,s=t},function(){}),i._onModuleLoaded=i._protocol.sendMessage(a,[i._worker.getId(),n,u]),i._onModuleLoaded.then(function(e){for(var t={},n=0;n0},e.prototype.getChildren=function(e,t){var i=this.modelProvider.getModel();return n.TPromise.as(i===t?i.entries:[])},e.prototype.getParent=function(e,t){return n.TPromise.as(null)},e}();t.DataSource=o;var r=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider&&n.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel();return String(n.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}();t.AccessibilityProvider=r;var s=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var n=this.modelProvider.getModel();return!n.filter||n.filter.isVisible(t)},e}();t.Filter=s;var a=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){return this.modelProvider.getModel().renderer.renderTemplate(t,n,this.styles)},e.prototype.renderElement=function(e,t,n,i){this.modelProvider.getModel().renderer.renderElement(t,n,i,this.styles)},e.prototype.disposeTemplate=function(e,t,n){this.modelProvider.getModel().renderer.disposeTemplate(t,n)},e}();t.Renderer=a}),define(d[100],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(t.Mode||(t.Mode={}))}),define(d[448],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"posx",{get:function(){return this._posx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posy",{get:function(){return this._posy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}();t.ContextMenuEvent=n;var i=function(e){function t(t){var n=e.call(this,t.posx,t.posy,t.target)||this;return n.originalEvent=t,n}return f(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.MouseContextMenuEvent=i;var o=function(e){function t(t,n,i){var o=e.call(this,t,n,i.target)||this;return o.originalEvent=i,o}return f(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.KeyboardContextMenuEvent=o;var r;!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(r=t.DragOverEffect||(t.DragOverEffect={}));var s;!function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(s=t.DragOverBubble||(t.DragOverBubble={})),t.DRAG_OVER_REJECT={accept:!1},t.DRAG_OVER_ACCEPT={accept:!0},t.DRAG_OVER_ACCEPT_BUBBLE_UP={accept:!0,bubble:s.BUBBLE_UP},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:s.BUBBLE_DOWN,autoExpand:e}},t.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY={accept:!0,bubble:s.BUBBLE_UP,effect:r.COPY},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:s.BUBBLE_DOWN,effect:r.COPY,autoExpand:e}}}),define(d[461],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=n;var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=i;var o=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.dataTransfer.types&&(this.types=[],Array.prototype.push.apply(this.types,e.dataTransfer.types)),e.dataTransfer.files&&(this.files=[],Array.prototype.push.apply(this.files,e.dataTransfer.files),this.files=this.files.filter(function(e){return e.size||e.type}))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=o}),define(d[466],h([1,0,72,10,3,33,38,7]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){for(var n=e.getHierarchy(),i=t.getHierarchy(),o=n[r.commonPrefixLength(n,i)-1],s=o.getNavigator(),a=null,u=null,l=0,c=[];o&&(null===a||null===u);)c.push(o),o===e&&(a=l),o===t&&(u=l),l++,o=s.next();if(null===a||null===u)return[];var d=Math.min(a,u),h=Math.max(a,u);return c.slice(d,h+1)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this)||this;return n._item=t,n}return f(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.emit("unlock"),e.prototype.dispose.call(this)},t}(s.EventEmitter);t.LockData=l;var c=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n=this,i=this.getLock(e);if(i){var o;return new a.TPromise(function(r,s){o=i.addOneTimeListener("unlock",function(){return n.run(e,t).then(r,s)})},function(){o.dispose()})}var r;return new a.TPromise(function(i,o){if(e.isDisposed())return o(new Error("Item is disposed."));var s=n.locks[e.id]=new l(e);return r=t().then(function(t){return delete n.locks[e.id],s.dispose(),t}).then(i,o)},function(){return r.cancel()})},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}();t.Lock=c;var d=function(e){function t(){var t=e.call(this)||this;return t._isDisposed=!1,t.items={},t}return f(t,e),t.prototype.register=function(e){n.ok(!this.isRegistered(e.id),"item already registered: "+e.id),this.items[e.id]={item:e,disposable:this.addEmitter(e)}},t.prototype.deregister=function(e){n.ok(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},t.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},t.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.items=null,this._isDisposed=!0},t.prototype.isDisposed=function(){return this._isDisposed},t}(s.EventEmitter);t.ItemRegistry=d;var h=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s.registry=n,s.context=i,s.lock=o,s.element=r,s.id=t,s.registry.register(s),s.doesHaveChildren=s.context.dataSource.hasChildren(s.context.tree,s.element),s.needsChildrenRefresh=!0,s.parent=null,s.previous=null,s.next=null,s.firstChild=null,s.lastChild=null,s.userContent=null,s.traits={},s.depth=0,s.expanded=s.context.dataSource.shouldAutoexpand&&s.context.dataSource.shouldAutoexpand(s.context.tree,r),s.emit("item:create",{item:s}),s.visible=s._isVisible(),s.height=s._getHeight(),s._isDisposed=!1,s}return f(t,e),t.prototype.getElement=function(){return this.element},t.prototype.hasChildren=function(){return this.doesHaveChildren},t.prototype.getDepth=function(){return this.depth},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e){this.visible=e},t.prototype.isExpanded=function(){return this.expanded},t.prototype._setExpanded=function(e){this.expanded=e},t.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this.emit("item:reveal",t)},t.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?a.TPromise.as(!1):this.lock.run(this,function(){var t={item:e};return e.emit("item:expanding",t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):a.TPromise.as(null)).then(function(){return e._setExpanded(!0),e.emit("item:expanded",t),!0})}).then(function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then(function(){return!0}):t)})},t.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=a.TPromise.as(null);return this.forEachChild(function(e){n=n.then(function(){return e.collapse(!0)})}),n.then(function(){return t.collapse(!1)})}return!this.isExpanded()||this.lock.isLocked(this)?a.TPromise.as(!1):this.lock.run(this,function(){var e={item:t};return t.emit("item:collapsing",e),t._setExpanded(!1),t.emit("item:collapsed",e),a.TPromise.as(!0)})},t.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this.emit("item:addTrait",t)},t.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this.emit("item:removeTrait",t)},t.prototype.hasTrait=function(e){return this.traits[e]||!1},t.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},t.prototype.getHeight=function(){return this.height},t.prototype.refreshChildren=function(e,n,o){var r=this;if(void 0===n&&(n=!1),void 0===o&&(o=!1),!o&&!this.isExpanded())return this.needsChildrenRefresh=!0,a.TPromise.as(this);this.needsChildrenRefresh=!1;var s=function(){var o={item:r,isNested:n};r.emit("item:childrenRefreshing",o);return(r.doesHaveChildren?r.context.dataSource.getChildren(r.context.tree,r.element):a.TPromise.as([])).then(function(n){if(r.isDisposed()||r.registry.isDisposed())return a.TPromise.as(null);if(!Array.isArray(n))return a.TPromise.wrapError(new Error("Please return an array of children."));n=n?n.slice(0):[],n=r.sort(n);for(var i={};null!==r.firstChild;)i[r.firstChild.id]=r.firstChild,r.removeChild(r.firstChild);for(var o=0,s=n.length;o0?o[0]:this.input,s=this.getNavigator(r,!1),a=0;a0?n[0]:this.input,o=this.getNavigator(i,!1).parent();o&&(t?this.setSelection([o],e):this.select(o,e))},t.prototype.setFocus=function(e,t){this.setTraits("focused",e?[e]:[]);var n={focus:this.getFocus(),payload:t};this.emit("focus",n)},t.prototype.isFocused=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("focused")},t.prototype.getFocus=function(e){var t=this.getElementsWithTrait("focused",e);return 0===t.length?null:t[0]},t.prototype.focusNext=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,o=this.getNavigator(i,!1),r=0;r=0;r--)this.onInsertItem(l[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},t.prototype.onInsertItem=function(e){},t.prototype.onRemoveItems=function(e){for(var t,n,i,o=null,r=0;t=e.next();){if(i=this.indexes[t],!(n=this.heightMap[i]))return void console.error("view item doesnt exist");r-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==r)for(this.heightMap.splice(o,i-o+1),i=o;i=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},t.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},t.prototype.itemAtIndex=function(e){return this.heightMap[e]},t.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},t.prototype.createViewItem=function(e){throw new Error("not implemented")},t.prototype.dispose=function(){this.heightMap=null,this.indexes=null},t}(n.EventEmitter);t.HeightMap=o}),define(d[473],h([1,0,15,197]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t){return void 0===t&&(t=!1),n.globals.MonacoEnvironment&&n.globals.MonacoEnvironment.hasOwnProperty(e)?n.globals.MonacoEnvironment[e]:t}("getWorkerUrl",null)||function(t,n){return e.toUrl("./"+t)+"#"+n},r=function(){function e(e,t,n,i,r){this.id=t,this.worker=new Worker(o("workerMain.js",n)),this.postMessage(e),this.worker.onmessage=function(e){i(e.data)},"function"==typeof this.worker.addEventListener&&this.worker.addEventListener("error",r)}return e.prototype.getId=function(){return this.id},e.prototype.postMessage=function(e){this.worker&&this.worker.postMessage(e)},e.prototype.dispose=function(){this.worker.terminate(),this.worker=null},e}(),s=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,o){var s=this,a=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new r(t,a,this._label||"anonymous"+a,n,function(e){i.logOnceWebWorkerWarning(e),s._webWorkerFailedBeforeError=e,o(e)})},e.LAST_WORKER_ID=0,e}();t.DefaultWorkerFactory=s}),define(d[484],h([5]),{}),define(d[52],h([1,0,7,29,3,9,72,4,484]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){s.ok(i.isString(e),"Expected String as parameter");var n=document.getElementById(e);return n?new x(n,t):null}function l(e){return e[b]||(e[b]={}),e[b]}function c(e){return!!e[b]}function d(e,t){return e instanceof N?new N(e):new x(e.getHTMLElement(),t)}function h(e,t){return new x(e,t)}function p(){return new x(null,!0)}function g(e,t,n){l(e)[t]=n}function m(e,t,n){if(c(e)){var o=l(e)[t];if(!i.isUndefined(o))return o}return n}function v(e,t){c(e)&&delete l(e)[t]}function _(e,t){g(e,w,t)}function y(e){v(e,w)}function C(e){return m(e,w)}Object.defineProperty(t,"__esModule",{value:!0}),t.withElementById=u,t.Build={withElementById:u};var b="_msDataKey",w="__$binding",S=function(){return function(e,t){this.x=e,this.y=t}}();t.Position=S;var E=function(){return function(e,t,n,i){this.top=e,this.right=t,this.bottom=n,this.left=i}}();t.Box=E;var L=function(){function e(e,t){this.width=e,this.height=t}return e.prototype.substract=function(t){return new e(this.width-t.left-t.right,this.height-t.top-t.bottom)},e}();t.Dimension=L;var x=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toUnbind={},this.captureToUnbind={}}return e.prototype.asContainer=function(){return d(this,this.offdom)},e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToUnbind=this.captureToUnbind,t.toUnbind=this.toUnbind,t},e.prototype.and=function(t){t instanceof e||t instanceof N||(t=new e(t,this.offdom));var n=[this];if(t instanceof N)for(var i=0;i=0){var n=e.split("-");e=n[0];for(var i=1;i=0){var t=e.split("-");e=t[0];for(var n=1;n=0?this.padding.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.paddingTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.paddingRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.paddingBottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.paddingLeft=this.toPixel(o)),this)},e.prototype.margin=function(e,t,n,o){return i.isString(e)&&e.indexOf(" ")>=0?this.margin.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.marginTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.marginRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.marginBottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.marginLeft=this.toPixel(o)),this)},e.prototype.position=function(e,t,n,o,r){return i.isString(e)&&e.indexOf(" ")>=0?this.position.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.top=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.right=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.bottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.left=this.toPixel(o)),r||(r="absolute"),this.currentElement.style.position=r,this)},e.prototype.size=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.size.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.width=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.height=this.toPixel(t)),this)},e.prototype.minSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.minSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.minWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.minHeight=this.toPixel(t)),this)},e.prototype.maxSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.maxSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.maxWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.maxHeight=this.toPixel(t)),this)},e.prototype.float=function(e){return this.currentElement.style.cssFloat=e,this},e.prototype.clear=function(e){return this.currentElement.style.clear=e,this},e.prototype.normal=function(){return this.currentElement.style.fontStyle="normal",this.currentElement.style.fontWeight="normal",this.currentElement.style.textDecoration="none",this},e.prototype.italic=function(){return this.currentElement.style.fontStyle="italic",this},e.prototype.bold=function(){return this.currentElement.style.fontWeight="bold",this},e.prototype.underline=function(){return this.currentElement.style.textDecoration="underline",this},e.prototype.overflow=function(e){return this.currentElement.style.overflow=e,this},e.prototype.display=function(e){return this.currentElement.style.display=e,this},e.prototype.disable=function(){return this.currentElement.setAttribute("disabled","disabled"),this},e.prototype.enable=function(){return this.currentElement.removeAttribute("disabled"),this},e.prototype.show=function(){return this.hasClass("builder-hidden")&&this.removeClass("builder-hidden"),this.attr("aria-hidden","false"),this.cancelVisibilityPromise(),this},e.prototype.showDelayed=function(e){var t=this;this.cancelVisibilityPromise();var i=n.TPromise.timeout(e);return this.setProperty("__$visibility",i),i.done(function(){t.removeProperty("__$visibility"),t.show()}),this},e.prototype.hide=function(){return this.hasClass("builder-hidden")||this.addClass("builder-hidden"),this.attr("aria-hidden","true"),this.cancelVisibilityPromise(),this},e.prototype.isHidden=function(){return this.hasClass("builder-hidden")||"none"===this.currentElement.style.display},e.prototype.toggleVisibility=function(){return this.cancelVisibilityPromise(),this.swapClass("builder-visible","builder-hidden"),this.isHidden()?this.attr("aria-hidden","true"):this.attr("aria-hidden","false"),this},e.prototype.cancelVisibilityPromise=function(){var e=this.getProperty("__$visibility");e&&(e.cancel(),this.removeProperty("__$visibility"))},e.prototype.border=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.border.apply(this,e.split(" ")):(this.currentElement.style.borderWidth=this.toPixel(e),n&&(this.currentElement.style.borderColor=n),t&&(this.currentElement.style.borderStyle=t),this)},e.prototype.borderTop=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderTop.apply(this,e.split(" ")):(this.currentElement.style.borderTopWidth=this.toPixel(e),n&&(this.currentElement.style.borderTopColor=n),t&&(this.currentElement.style.borderTopStyle=t),this)},e.prototype.borderBottom=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderBottom.apply(this,e.split(" ")):(this.currentElement.style.borderBottomWidth=this.toPixel(e),n&&(this.currentElement.style.borderBottomColor=n),t&&(this.currentElement.style.borderBottomStyle=t),this)},e.prototype.borderLeft=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderLeft.apply(this,e.split(" ")):(this.currentElement.style.borderLeftWidth=this.toPixel(e),n&&(this.currentElement.style.borderLeftColor=n),t&&(this.currentElement.style.borderLeftStyle=t),this)},e.prototype.borderRight=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderRight.apply(this,e.split(" ")):(this.currentElement.style.borderRightWidth=this.toPixel(e),n&&(this.currentElement.style.borderRightColor=n),t&&(this.currentElement.style.borderRightStyle=t),this)},e.prototype.textAlign=function(e){return this.currentElement.style.textAlign=e,this},e.prototype.verticalAlign=function(e){return this.currentElement.style.verticalAlign=e,this},e.prototype.toPixel=function(e){return-1===e.toString().indexOf("px")?e.toString()+"px":e},e.prototype.innerHtml=function(e,t){return t?this.currentElement.innerHTML+=e:this.currentElement.innerHTML=e,this},e.prototype.text=function(e,t){return t?0===this.currentElement.children.length?this.currentElement.textContent+=e:this.currentElement.appendChild(document.createTextNode(e)):this.currentElement.textContent=e,this},e.prototype.safeInnerHtml=function(e,t){return this.innerHtml(r.escape(e),t)},e.prototype.bind=function(e){return _(this.currentElement,e),this},e.prototype.unbind=function(){return y(this.currentElement),this},e.prototype.getBinding=function(){return C(this.currentElement)},e.prototype.setProperty=function(e,t){return g(this.currentElement,e,t),this},e.prototype.getProperty=function(e,t){return m(this.currentElement,e,t)},e.prototype.removeProperty=function(e){return c(this.currentElement)&&delete l(this.currentElement)[e],this},e.prototype.parent=function(e){return s.ok(!this.offdom,"Builder was created with offdom = true and thus has no parent set"),h(this.currentElement.parentNode,e)},e.prototype.children=function(e){for(var t=this.currentElement.children,n=[],i=0;i=n.top&&o+e.height<=n.top+n.height,l=r>=n.top&&r+e.height<=n.top+n.height;return s(o,a,r,l,i===u.ABOVE)}(),left:function(){var i=t.left,r=t.left+t.width-e.width,u=i>=n.left&&i+e.width<=n.left+n.width,l=r>=n.left&&r+e.width<=n.left+n.width;return s(i,u,r,l,o===a.LEFT)}()}}Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(a=t.AnchorAlignment||(t.AnchorAlignment={}));var u;!function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(u=t.AnchorPosition||(t.AnchorPosition={}));var l=function(e){function t(t){var i=e.call(this)||this;return i.$view=n.$(".context-view").hide(),i.setContainer(t),i.toDispose=[{dispose:function(){i.setContainer(null)}}],i.toDisposeOnClean=null,i}return f(t,e),t.prototype.setContainer=function(e){var i=this;this.$container&&(this.$container.off(t.BUBBLE_UP_EVENTS),this.$container.off(t.BUBBLE_DOWN_EVENTS,!0),this.$container=null),e&&(this.$container=n.$(e),this.$view.appendTo(this.$container),this.$container.on(t.BUBBLE_UP_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!1)}),this.$container.on(t.BUBBLE_DOWN_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!0)},null,!0))},t.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},t.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},t.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var o=t;e={top:o.y,left:o.x,width:o.width||0,height:o.height||0}}var r={top:i.StandardWindow.scrollY,left:i.StandardWindow.scrollX,height:window.innerHeight,width:window.innerWidth},l=this.$view.getTotalSize(),c={width:l.width,height:l.height},d=this.delegate.anchorPosition||u.BELOW,h=this.delegate.anchorAlignment||a.LEFT,p=s(c,e,r,d,h),f=i.getDomNodePagePosition(this.$container.getHTMLElement());p.top-=f.top,p.left-=f.left,this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(d===u.BELOW?"bottom":"top"),this.$view.addClass(h===a.LEFT?"left":"right"),this.$view.style({top:p.top+"px",left:p.left+"px",width:"initial"})},t.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.$container.getHTMLElement())&&this.hide())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hide(),this.toDispose=o.dispose(this.toDispose)},t.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],t.BUBBLE_DOWN_EVENTS=["click"],t}(r.EventEmitter);t.ContextView=l}),define(d[201],h([5]),{}),define(d[204],h([1,0,4,9,32,26,201]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={badgeBackground:o.Color.fromHex("#4D4D4D"),badgeForeground:o.Color.fromHex("#FFFFFF")},a=function(){function e(e,t){this.options=t||Object.create(null),r.mixin(this.options,s,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=n.append(e,n.$(".monaco-count-badge")),this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=""+this.count,this.element.title=i.format(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,n=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=n?"1px":null,this.element.style.borderStyle=n?"solid":null,this.element.style.borderColor=n}},e}();t.CountBadge=a}),define(d[205],h([5]),{}),define(d[206],h([5]),{}),define(d[208],h([5]),{}),define(d[162],h([1,0,4,110,45,174,208]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this.domNode=n.append(e,n.$(".monaco-icon-label")),t&&t.supportHighlights?this.labelNode=new i.HighlightedLabel(n.append(this.domNode,n.$("a.label-name"))):this.labelNode=n.append(this.domNode,n.$("a.label-name")),this.descriptionNode=n.append(this.domNode,n.$("span.label-description"))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelElement",{get:function(){var e=this.labelNode;return e instanceof i.HighlightedLabel?e.element:e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptionElement",{get:function(){return this.descriptionNode},enumerable:!0,configurable:!0}),e.prototype.setValue=function(e,t,o){var r=this.labelNode;r instanceof i.HighlightedLabel?r.set(e||"",o?o.matches:void 0):r.textContent=e||"",this.descriptionNode.textContent=t||"",t?n.removeClass(this.descriptionNode,"empty"):n.addClass(this.descriptionNode,"empty"),this.domNode.title=o&&o.title?o.title:"";var s=["monaco-icon-label"];o&&(o.extraClasses&&s.push.apply(s,o.extraClasses),o.italic&&s.push("italic")),this.domNode.className=s.join(" ")},e.prototype.dispose=function(){var e=this.labelNode;e instanceof i.HighlightedLabel&&e.dispose()},e}();t.IconLabel=s;var a=function(e){function t(t,n,i,o){var r=e.call(this,t)||this;return r.setFile(n,i,o),r}return f(t,e),t.prototype.setFile=function(e,t,n){var i=o.dirname(e.fsPath);this.setValue(o.basename(e.fsPath),i&&"."!==i?r.getPathLabel(i,t,n):"",{title:e.fsPath})},t}(s);t.FileLabel=a}),define(d[211],h([5]),{}),define(d[212],h([5]),{}),define(d[213],h([5]),{}),define(d[218],h([5]),{}),define(d[219],h([5]),{}),define(d[220],h([1,0,7,72,52,4,3,32,26,219]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={progressBarBackground:a.Color.fromHex("#0E70C0")},c=function(){function e(e,t){this.options=t||Object.create(null),u.mixin(this.options,l,!1),this.toUnbind=[],this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.create(e)}return e.prototype.create=function(e){var t=this;e.div({class:"progress-container"},function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([r.EventType.ANIMATION_START,r.EventType.ANIMATION_END,r.EventType.ANIMATION_ITERATION],function(e){switch(e.type){case r.EventType.ANIMATION_START:case r.EventType.ANIMATION_END:t.animationRunning=e.type===r.EventType.ANIMATION_START;break;case r.EventType.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}},t.toUnbind),t.bit=e.getHTMLElement()}),this.applyStyles()},e.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass("infinite"),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},e.prototype.done=function(){return this.doDone(!0)},e.prototype.stop=function(){return this.doDone(!1)},e.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass("infinite")?(this.bit.style.opacity="0",e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()):(this.bit.style.width="inherit",e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()),this},e.prototype.infinite=function(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.removeClass("discrete"),this.element.removeClass("done"),this.element.addClass("active"),this.element.addClass("infinite"),this},e.prototype.total=function(e){return this.workedVal=0,this.totalWork=e,this},e.prototype.hasTotal=function(){return!isNaN(this.totalWork)},e.prototype.worked=function(e){return i.ok(!isNaN(this.totalWork),"Total work not set"),e=Number(e),i.ok(!isNaN(e),"Value is not a number"),e=Math.max(1,e),this.workedVal+=e,this.workedVal=Math.min(this.totalWork,this.workedVal),this.element.hasClass("infinite")&&this.element.removeClass("infinite"),this.element.hasClass("done")&&this.element.removeClass("done"),this.element.hasClass("active")||this.element.addClass("active"),this.element.hasClass("discrete")||this.element.addClass("discrete"),this.bit.style.width=this.workedVal/this.totalWork*100+"%",this},e.prototype.getContainer=function(){return o.$(this.element)},e.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},e.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},e.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind)},e}();t.ProgressBar=c}),define(d[224],h([5]),{}),define(d[99],h([1,0,3,52,28,15,29,4,74,38,47,11,224]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h;!function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(h=t.Orientation||(t.Orientation={}));var p=function(e){function t(t,n,s){void 0===s&&(s={});var l=e.call(this)||this;return l.$e=i.$(".monaco-sash").appendTo(t),r.isMacintosh&&l.$e.addClass("mac"),l.gesture=new u.Gesture(l.$e.getHTMLElement()),l.$e.on(a.EventType.MOUSE_DOWN,function(e){l.onMouseDown(e)}),l.$e.on(a.EventType.DBLCLICK,function(e){l.emit("reset",e)}),l.$e.on(u.EventType.Start,function(e){l.onTouchStart(e)}),l.size=s.baseSize||5,o.isIPad&&(l.size*=4,l.$e.addClass("touch")),l.setOrientation(s.orientation||h.VERTICAL),l.isDisabled=!1,l.hidden=!1,l.layoutProvider=n,l}return f(t,e),t.prototype.getHTMLElement=function(){return this.$e.getHTMLElement()},t.prototype.setOrientation=function(e){this.orientation=e,this.$e.removeClass("horizontal","vertical"),this.$e.addClass(this.getOrientation()),this.orientation===h.HORIZONTAL?this.$e.size(null,this.size):this.$e.size(this.size),this.layoutProvider&&this.layout()},t.prototype.getOrientation=function(){return this.orientation===h.HORIZONTAL?"horizontal":"vertical"},t.prototype.onMouseDown=function(e){var t=this;if(a.EventHelper.stop(e,!1),!this.isDisabled){var n=i.$(a.getElementsByTagName("iframe"));n&&n.style("pointer-events","none");var o=new c.StandardMouseEvent(e),s=o.posx,u=o.posy,l={startX:s,currentX:s,startY:u,currentY:u};this.$e.addClass("active"),this.emit("start",l);var d=i.$(window),h=this.getOrientation()+"-cursor-container"+(r.isMacintosh?"-mac":""),p=s,f=u;d.on("mousemove",function(e){a.EventHelper.stop(e,!1);var n=new c.StandardMouseEvent(e),i={startX:s,currentX:n.posx,startY:u,currentY:n.posy};p=n.posx,f=n.posy,t.emit("change",i)}).once("mouseup",function(e){a.EventHelper.stop(e,!1),t.$e.removeClass("active"),t.emit("end"),d.off("mousemove"),document.body.classList.remove(h);var n=i.$(a.getElementsByTagName("iframe"));n&&n.style("pointer-events","auto")}),document.body.classList.add(h)}},t.prototype.onTouchStart=function(e){var t=this;a.EventHelper.stop(e);var i=[],o=e.pageX,r=e.pageY;this.emit("start",{startX:o,currentX:o,startY:r,currentY:r});var l=o,c=r;i.push(a.addDisposableListener(this.$e.getHTMLElement(),u.EventType.Change,function(e){s.isNumber(e.pageX)&&s.isNumber(e.pageY)&&(t.emit("change",{startX:o,currentX:e.pageX,startY:r,currentY:e.pageY}),l=e.pageX,c=e.pageY)})),i.push(a.addDisposableListener(this.$e.getHTMLElement(),u.EventType.End,function(e){t.emit("end"),n.dispose(i)}))},t.prototype.layout=function(){var e;if(this.orientation===h.VERTICAL){var t=this.layoutProvider;e={left:t.getVerticalSashLeft(this)-this.size/2+"px"},t.getVerticalSashTop&&(e.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(e.height=t.getVerticalSashHeight(this)+"px")}else{var n=this.layoutProvider;e={top:n.getHorizontalSashTop(this)-this.size/2+"px"},n.getHorizontalSashLeft&&(e.left=n.getHorizontalSashLeft(this)+"px"),n.getHorizontalSashWidth&&(e.width=n.getHorizontalSashWidth(this)+"px")}this.$e.style(e)},t.prototype.show=function(){this.hidden=!1,this.$e.show()},t.prototype.hide=function(){this.hidden=!0,this.$e.hide()},t.prototype.isHidden=function(){return this.hidden},t.prototype.enable=function(){this.$e.removeClass("disabled"),this.isDisabled=!1},t.prototype.disable=function(){this.$e.addClass("disabled"),this.isDisabled=!0},t.prototype.dispose=function(){this.$e&&(this.$e.destroy(),this.$e=null),e.prototype.dispose.call(this)},t}(l.EventEmitter);t.Sash=p;var g=function(e){function t(t,n){var i=e.call(this)||this;return i.minWidth=n,i._onPositionChange=new d.Emitter,i.ratio=.5,i.sash=new p(t,i),i._register(i.sash.addListener("start",function(){return i.onSashDragStart()})),i._register(i.sash.addListener("change",function(e){return i.onSashDrag(e)})),i._register(i.sash.addListener("end",function(){return i.onSashDragEnd()})),i._register(i.sash.addListener("reset",function(){return i.onSashReset()})),i}return f(t,e),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._onPositionChange.event},enumerable:!0,configurable:!0}),t.prototype.getVerticalSashTop=function(){return 0},t.prototype.getVerticalSashLeft=function(){return this.position},t.prototype.getVerticalSashHeight=function(){return this.dimension.height},t.prototype.setDimenesion=function(e){this.dimension=e,this.compute(this.ratio)},t.prototype.onSashDragStart=function(){this.startPosition=this.position},t.prototype.onSashDrag=function(e){this.compute((this.startPosition+(e.currentX-e.startX))/this.dimension.width)},t.prototype.compute=function(e){this.computeSashPosition(e),this.ratio=this.position/this.dimension.width,this._onPositionChange.fire(this.position)},t.prototype.onSashDragEnd=function(){this.sash.layout()},t.prototype.onSashReset=function(){this.ratio=.5,this._onPositionChange.fire(this.position),this.sash.layout()},t.prototype.computeSashPosition=function(e){void 0===e&&(e=this.ratio);var t=this.dimension.width,n=Math.floor((e||.5)*t),i=Math.floor(.5*t);t>2*this.minWidth?(nt-this.minWidth&&(n=t-this.minWidth)):n=i,this.position!==n&&(this.position=n,this.sash.layout())},t}(n.Disposable);t.VSash=g}),define(d[228],h([5]),{}),define(d[63],h([1,0,4,15,47,439,440,3,48,41,18,27,11,228]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";function p(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:u.ScrollbarVisibility.Auto,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:u.ScrollbarVisibility.Auto,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,i.isMacintosh&&(t.className+=" mac"),t}Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new h.Emitter),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=p(n),o._scrollable=void 0===i?o._register(new u.Scrollable):i,o._register(o._scrollable.onScroll(function(e){o._onDidScroll(e),o._onScroll.fire(e)}));var a={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new s.VerticalScrollbar(o._scrollable,o._options,a)),o._horizontalScrollbar=o._register(new r.HorizontalScrollbar(o._scrollable,o._options,a)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows&&(o._leftShadowDomNode=d.createFastDomNode(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=d.createFastDomNode(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=d.createFastDomNode(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,function(e){return o._onMouseOver(e)}),o.onnonbubblingmouseout(o._listenOnDomNode,function(e){return o._onMouseOut(e)}),o._hideTimeout=o._register(new c.TimeoutTimer),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o}return f(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=a.dispose(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.delegateSliderMouseDown=function(e,t){this._verticalScrollbar.delegateSliderMouseDown(e,t)},t.prototype.updateState=function(e){this._scrollable.updateState(e)},t.prototype.getScrollState=function(){return this._scrollable.getState()},t.prototype.updateClassName=function(e){this._options.className=e,i.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=p(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=a.dispose(this._mouseWheelToDispose),e)){var i=function(e){var n=new o.StandardMouseWheelEvent(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(n.addDisposableListener(this._listenOnDomNode,"mousewheel",i)),this._mouseWheelToDispose.push(n.addDisposableListener(this._listenOnDomNode,"DOMMouseScroll",i))}},t.prototype._onMouseWheel=function(e){var t=-1,n=-1;if(e.deltaY||e.deltaX){var o=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(o=(c=[r,o])[0],r=c[1]);var s=!i.isMacintosh&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||r||(r=o,o=0),i.isMacintosh&&(o&&Math.abs(r)<.2&&(r=0),Math.abs(o)>.5*Math.abs(r)&&(r=0));var a=this._scrollable.getState();if(o){var u=a.scrollTop;(t=this._verticalScrollbar.validateScrollPosition((-1!==t?t:u)-50*o))===u&&(t=-1)}if(r){var l=a.scrollLeft;(n=this._horizontalScrollbar.validateScrollPosition((-1!==n?n:l)-50*r))===l&&(n=-1)}-1===t&&-1===n||(-1!==t&&(this._shouldRender=this._verticalScrollbar.setDesiredScrollPosition(t)||this._shouldRender,t=-1),-1!==n&&(this._shouldRender=this._horizontalScrollbar.setDesiredScrollPosition(n)||this._shouldRender,n=-1))}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation());var c},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getState(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide()},500)},t}(l.Widget);t.ScrollableElement=g;var m=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll(function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)}),i.scanDomNode(),i}return f(t,e),t.prototype.scanDomNode=function(){this.updateState({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,scrollLeft:this._element.scrollLeft,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight,scrollTop:this._element.scrollTop})},t}(g);t.DomScrollableElement=m}),define(d[232],h([1,0,26,3,74,4,124,63,48,415,416,15,28]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=["click","dblclick","mouseup","mousedown","mouseover","mousemove","mouseout","contextmenu","touchstart"],f={useShadows:!0},g=function(){function e(e,t,i,r){void 0===r&&(r=f),this.delegate=t,this.items=[],this.itemId=0,this.rangeMap=new l.RangeMap,this.renderers=n.toObject(i,function(e){return e.templateId}),this.cache=new c.RowCache(this.renderers),this.lastRenderTop=0,this.lastRenderHeight=0,this._domNode=document.createElement("div"),this._domNode.className="monaco-list",this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",this.gesture=new o.Gesture(this.rowsContainer),this.scrollableElement=new a.ScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:u.ScrollbarVisibility.Hidden,vertical:u.ScrollbarVisibility.Auto,useShadows:n.getOrDefault(r,function(e){return e.useShadows},f.useShadows)}),this._domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this._domNode),this.disposables=[this.rangeMap,this.gesture,this.scrollableElement],this.scrollableElement.onScroll(this.onScroll,this,this.disposables),s.domEvent(this.rowsContainer,o.EventType.Change)(this.onTouchChange,this,this.disposables),this.layout()}return Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]);var o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);l.each(o,function(e){return i.removeItemFromDOM(i.items[e])});var r=n.map(function(e){return{id:String(i.itemId++),element:e,size:i.delegate.getHeight(e),templateId:i.delegate.getTemplateId(e),row:null}});(c=this.rangeMap).splice.apply(c,[e,t].concat(r));var s=(d=this.items).splice.apply(d,[e,t].concat(r)),a=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);l.each(a,function(e){return i.insertItemInDOM(i.items[e],e)});var u=this.getContentHeight();return this.rowsContainer.style.height=u+"px",this.scrollableElement.updateState({scrollHeight:u}),s.map(function(e){return e.element});var c,d},Object.defineProperty(e.prototype,"length",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderHeight",{get:function(){return this.scrollableElement.getScrollState().height},enumerable:!0,configurable:!0}),e.prototype.element=function(e){return this.items[e].element},e.prototype.domElement=function(e){var t=this.items[e].row;return t&&t.domNode},e.prototype.elementHeight=function(e){return this.items[e].size},e.prototype.elementTop=function(e){return this.rangeMap.positionAt(e)},e.prototype.indexAt=function(e){return this.rangeMap.indexAt(e)},e.prototype.indexAfter=function(e){return this.rangeMap.indexAfter(e)},e.prototype.layout=function(e){this.scrollableElement.updateState({height:e||r.getContentHeight(this._domNode)})},e.prototype.render=function(e,t){var n=this,i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=this.getRenderRange(e,t),r=l.relativeComplement(o,i),s=l.relativeComplement(i,o);if(r.forEach(function(e){return l.each(e,function(e){return n.insertItemInDOM(n.items[e],e)})}),s.forEach(function(e){return l.each(e,function(e){return n.removeItemFromDOM(n.items[e])})}),h.canUseTranslate3d()&&!d.isWindows){var a="translate3d(0px, -"+e+"px, 0px)";this.rowsContainer.style.transform=a,this.rowsContainer.style.webkitTransform=a}else this.rowsContainer.style.top="-"+e+"px";this.lastRenderTop=e,this.lastRenderHeight=t},e.prototype.insertItemInDOM=function(e,t){e.row||(e.row=this.cache.alloc(e.templateId)),e.row.domNode.parentElement||this.rowsContainer.appendChild(e.row.domNode);var n=this.renderers[e.templateId];e.row.domNode.style.top=this.elementTop(t)+"px",e.row.domNode.style.height=e.size+"px",e.row.domNode.setAttribute("data-index",""+t),n.renderElement(e.element,t,e.row.templateData)},e.prototype.removeItemFromDOM=function(e){this.cache.release(e.row),e.row=null},e.prototype.getContentHeight=function(){return this.rangeMap.size},e.prototype.getScrollTop=function(){return this.scrollableElement.getScrollState().scrollTop},e.prototype.setScrollTop=function(e){this.scrollableElement.updateState({scrollTop:e})},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.getScrollTop()},set:function(e){this.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.addListener=function(e,t,n){var i=this,s=t,a=this.domNode;return p.indexOf(e)>-1?t=function(e){return i.fireScopedEvent(e,s,i.getItemIndexFromMouseEvent(e))}:e===o.EventType.Tap&&(a=this.rowsContainer,t=function(e){return i.fireScopedEvent(e,s,i.getItemIndexFromGestureEvent(e))}),r.addDisposableListener(a,e,t,n)},e.prototype.fireScopedEvent=function(e,t,i){if(!(i<0)){var o=this.items[i].element;t(n.assign(e,{element:o,index:i}))}},e.prototype.onScroll=function(e){this.render(e.scrollTop,e.height)},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.getItemIndexFromMouseEvent=function(e){return this.getItemIndexFromEventTarget(e.target)},e.prototype.getItemIndexFromGestureEvent=function(e){return this.getItemIndexFromEventTarget(e.initialTarget)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.dispose=function(){this.items=null,this._domNode&&this._domNode.parentElement&&(this._domNode.parentNode.removeChild(this._domNode),this._domNode=null),this.disposables=i.dispose(this.disposables)},e}();t.ListView=g});var v=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};define(d[234],h([1,0,3,29,33,136,446,4,15,74,65,11,124,232,32,26,213]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m){"use strict";function _(e){return u.isMacintosh?e.metaKey:e.ctrlKey}function y(e){return e.shiftKey}function C(e){return _(e)||y(e)}function b(e,t){var n=e.indexOf(t);if(-1===n)return[];for(var i=[],o=n-1;o>=0&&e[o]===t-(n-o);)i.push(e[o--]);for(i.reverse(),o=n;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]-1}).forEach(function(e){var n=e.index,i=e.templateData;return t.trait.renderIndex(n,i.container)})},e.prototype.splice=function(e,t){for(var n=0;n=o}).map(function(e){return e+i}));this.renderer.splice(e,t),this.set(r)},e.prototype.renderIndex=function(e,t){a.toggleClass(t,this._trait,this.contains(e))},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var n=w(t,e);return this.renderer.renderIndexes(n),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some(function(t){return t===e})},e.prototype.dispose=function(){this.indexes=null,this._onChange=n.dispose(this._onChange)},v([s.memoize],e.prototype,"renderer",null),e}(),N=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getDomId=t,n}return f(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),n.setAttribute("role","treeitem"),n.setAttribute("id",this.getDomId(t))},t}(x),M=function(){function e(){this.length=0}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"aria"},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){this.length+=n.length-t},e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,n){n.setAttribute("aria-setsize",""+this.length),n.setAttribute("aria-posinset",""+(t+1))},e.prototype.disposeTemplate=function(e){},e}(),T=function(){function e(e,t,n){this.trait=e,this.view=t,this.getId=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.getId)return this.trait.splice(e,t,n.map(function(e){return!1}));var o=this.trait.get().map(function(e){return i.getId(i.view.element(e))}),r=n.map(function(e){return o.indexOf(i.getId(e))>-1});this.trait.splice(e,t,r)},e}(),k=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[];var n=d.chain(h.domEvent(t.domNode,"keydown")).map(function(e){return new c.StandardKeyboardEvent(e)});n.filter(function(e){return 3===e.keyCode}).on(this.onEnter,this,this.disposables),n.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.disposables),n.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.disposables),n.filter(function(e){return 11===e.keyCode}).on(this.onPageUpArrow,this,this.disposables),n.filter(function(e){return 12===e.keyCode}).on(this.onPageDownArrow,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.list.open(this.list.getFocus())},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e}(),I=function(){function e(e,t,n){void 0===n&&(n={});var i=this;this.list=e,this.view=t,this.options=n,this.disposables=[],this.disposables.push(t.addListener("mousedown",function(e){return i.onMouseDown(e)})),this.disposables.push(t.addListener("click",function(e){return i.onPointer(e)})),this.disposables.push(t.addListener("dblclick",function(e){return i.onDoubleClick(e)})),this.disposables.push(t.addListener("touchstart",function(e){return i.onMouseDown(e)})),this.disposables.push(t.addListener(l.EventType.Tap,function(e){return i.onPointer(e)}))}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=d.chain(h.domEvent(this.view.domNode,"keydown")).map(function(e){return new c.StandardKeyboardEvent(e)}).filter(function(t){return e.list.getFocus().length>0}).filter(function(e){return 58===e.keyCode||e.shiftKey&&68===e.keyCode}).map(function(t){var n=e.list.getFocus()[0];return{index:n,element:e.view.element(n),anchor:e.view.domElement(n)}}).filter(function(e){return!!e.anchor}).event,n=d.chain(d.fromCallback(function(t){return e.view.addListener("contextmenu",t)})).map(function(e){return{element:e.element,index:e.index,anchor:{x:e.clientX+1,y:e.clientY}}}).event;return d.any(t,n)},enumerable:!0,configurable:!0}),e.prototype.onMouseDown=function(e){e.preventDefault(),e.stopPropagation(),this.view.domNode.focus();var t=this.list.getFocus()[0];if(t=void 0===t?this.list.getSelection()[0]:t,y(e))return this.changeSelection(e,t);var n=e.index;if(this.list.setFocus([n]),C(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&(this.list.setSelection([n]),this.list.open([n]))},e.prototype.onPointer=function(e){if(e.preventDefault(),e.stopPropagation(),!C(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.open(t)}},e.prototype.onDoubleClick=function(e){if(e.preventDefault(),e.stopPropagation(),!C(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(y(e)&&void 0!==t){var i=Math.min(t,n),r=Math.max(t,n),s=o.range(r+1,i),a=b(w(u=this.list.getSelection(),[t]),t);if(0===a.length)return;l=w(s,S(u,a));this.list.setSelection(l)}else if(_(e)){var u=this.list.getSelection(),l=u.filter(function(e){return e!==n});u.length===l.length?this.list.setSelection(l.concat([n])):this.list.setSelection(l)}},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},v([s.memoize],e.prototype,"onContextMenu",null),e}(),D={listFocusBackground:g.Color.fromHex("#073655"),listActiveSelectionBackground:g.Color.fromHex("#0E639C"),listActiveSelectionForeground:g.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:g.Color.fromHex("#094771"),listFocusAndSelectionForeground:g.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:g.Color.fromHex("#3F3F46"),listHoverBackground:g.Color.fromHex("#2A2D2E"),listDropBackground:g.Color.fromHex("#383B3D")},O={keyboardSupport:!0,mouseSupport:!0},R=function(e,t){return e-t},P=function(){function e(e,t){this._templateId=e,this.renderers=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return this.renderers.map(function(t){return t.renderTemplate(e)})},e.prototype.renderElement=function(e,t,n){this.renderers.forEach(function(i,o){return i.renderElement(e,t,n[o])})},e.prototype.disposeTemplate=function(e){this.renderers.forEach(function(t,n){return t.disposeTemplate(e[n])})},e}(),A=function(){function e(t,n,i,o){void 0===o&&(o=O);var r=this;this.idPrefix="list_id_"+ ++e.InstanceCount,this._onContextMenu=d.default.None,this._onOpen=new d.Emitter,this._onPin=new d.Emitter,this._onDispose=new d.Emitter;var s=new M;if(this.focus=new N(function(e){return r.getElementDomId(e)}),this.selection=new x("selected"),this.eventBufferer=new d.EventBufferer,m.mixin(o,D,!1),i=i.map(function(e){return new P(e.templateId,[s,r.focus.renderer,r.selection.renderer,e])}),this.view=new p.ListView(t,n,i,o),this.view.domNode.setAttribute("role","tree"),a.addClass(this.view.domNode,this.idPrefix),this.view.domNode.tabIndex=0,this.styleElement=a.createStyleSheet(this.view.domNode),this.spliceable=new E([s,new T(this.focus,this.view,o.identityProvider),new T(this.selection,this.view,o.identityProvider),this.view]),this.disposables=[this.focus,this.selection,this.view,this._onDispose],this.onDOMFocus=d.mapEvent(h.domEvent(this.view.domNode,"focus",!0),function(){return null}),this.onDOMBlur=d.mapEvent(h.domEvent(this.view.domNode,"blur",!0),function(){return null}),"boolean"!=typeof o.keyboardSupport||o.keyboardSupport){u=new k(this,this.view);this.disposables.push(u)}if("boolean"!=typeof o.mouseSupport||o.mouseSupport){var u=new I(this,this.view,o);this.disposables.push(u),this._onContextMenu=u.onContextMenu}this.onFocusChange(this._onFocusChange,this,this.disposables),this.onSelectionChange(this._onSelectionChange,this,this.disposables),o.ariaLabel&&this.view.domNode.setAttribute("aria-label",o.ariaLabel),this.style(o)}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return d.mapEvent(this.eventBufferer.wrapEvent(this.focus.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return d.mapEvent(this.eventBufferer.wrapEvent(this.selection.onChange),function(t){return e.toListEvent(t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){return this._onContextMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onOpen",{get:function(){var e=this;return d.mapEvent(this._onOpen.event,function(t){return e.toListEvent({indexes:t})})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onPin",{get:function(){var e=this;return d.mapEvent(this._onPin.event,function(t){return e.toListEvent({indexes:t})})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]),this.eventBufferer.bufferEvents(function(){return i.spliceable.splice(e,t,n)})},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){e=e.sort(R),this.selection.set(e)},e.prototype.selectNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]+e:0;this.setSelection(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.selectPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=this.length+i%this.length),this.setSelection([Math.max(i,0)])}},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.getSelectedElements=function(){var e=this;return this.getSelection().map(function(t){return e.view.element(t)})},e.prototype.setFocus=function(e){e=e.sort(R),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var n=this.view.element(t);if(this.getFocusedElements()[0]!==n)this.setFocus([t]);else{var i=this.view.getScrollTop();this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==i&&setTimeout(function(){return e.focusNextPage()},0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e);if(this.getFocusedElements()[0]!==i)this.setFocus([e]);else{var o=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==o&&setTimeout(function(){return t.focusPreviousPage()},0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map(function(t){return e.view.element(t)})},e.prototype.reveal=function(e,t){var n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(i.isNumber(t)){t=(t=t<0?0:t)>1?1:t;var s=r-this.view.renderHeight;this.view.setScrollTop(s*t+o)}else{var a=o+r,u=n+this.view.renderHeight;o=u&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e){this._onOpen.fire(e)},e.prototype.pin=function(e){this._onPin.fire(e)},e.prototype.style=function(e){var t=[];e.listFocusBackground&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.focused { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.focused { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&(t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.selected { background-color: "+e.listActiveSelectionBackground+"; }"),t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.selected:hover { background-color: "+e.listActiveSelectionBackground+"; }")),e.listActiveSelectionForeground&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.selected { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.selected.focused { background-color: "+e.listFocusAndSelectionBackground+"; }"),e.listFocusAndSelectionForeground&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.selected.focused { color: "+e.listFocusAndSelectionForeground+"; }"),e.listInactiveFocusBackground&&(t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.focused { background-color: "+e.listInactiveFocusBackground+"; }"),t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.focused:hover { background-color: "+e.listInactiveFocusBackground+"; }")),e.listInactiveSelectionBackground&&(t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.selected { background-color: "+e.listInactiveSelectionBackground+"; }"),t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.selected:hover { background-color: "+e.listInactiveSelectionBackground+"; }")),e.listInactiveSelectionForeground&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.selected { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row:hover { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row:hover { color: "+e.listHoverForeground+"; }"),e.listSelectionOutline&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.selected { outline: 1px dotted "+e.listSelectionOutline+"; outline-offset: -1px; }"),e.listFocusOutline&&t.push(".monaco-list."+this.idPrefix+":focus .monaco-list-row.focused { outline: 1px solid "+e.listFocusOutline+"; outline-offset: -1px; }"),e.listInactiveFocusOutline&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row.focused { outline: 1px dotted "+e.listInactiveFocusOutline+"; outline-offset: -1px; }"),e.listHoverOutline&&t.push(".monaco-list."+this.idPrefix+" .monaco-list-row:hover { outline: 1px dashed "+e.listHoverOutline+"; outline-offset: -1px; }"),this.styleElement.innerHTML=t.join("\n")},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map(function(e){return t.view.element(e)})}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),a.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();a.toggleClass(this.view.domNode,"selection-none",0===e.length),a.toggleClass(this.view.domNode,"selection-single",1===e.length),a.toggleClass(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDispose.fire(),this.disposables=n.dispose(this.disposables)},e.InstanceCount=0,v([s.memoize],e.prototype,"onFocusChange",null),v([s.memoize],e.prototype,"onSelectionChange",null),v([s.memoize],e.prototype,"onOpen",null),v([s.memoize],e.prototype,"onPin",null),e}();t.List=A}),define(d[238],h([1,0,15,28,7,3,4,139,74,9,47,65,461,107,63,48,472,448,11]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y){"use strict";function C(e){try{e.parentElement.removeChild(e)}catch(e){}}function b(e,t){return!e&&!t||!(!e||!t)&&(e.accept===t.accept&&(e.bubble===t.bubble&&e.effect===t.effect))}Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var n=document.createElement("div");n.className="content";var i=document.createElement("div");i.appendChild(n),t={element:i,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,n)}}return t},e.prototype.release=function(e,t){C(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach(function(t){e._cache[t].forEach(function(n){e.context.renderer.disposeTemplate(e.context.tree,t,n.templateData),n.element=null,n.templateData=null}),delete e._cache[t]})},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}();t.RowCache=w;var S=function(){function e(e,t){var n=this;this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach(function(e){return n._styles[e]=!0}),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var n=["monaco-tree-row"];n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.element.className=n.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var i=this.context.accessibilityProvider,o=i.getAriaLabel(this.context.tree,this.model.getElement());if(o&&this.element.setAttribute("aria-label",o),i.getPosInSet&&i.getSetSize&&(this.element.setAttribute("aria-setsize",i.getSetSize()),this.element.setAttribute("aria-posinset",i.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=l.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this.model.isExpanded())):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var a=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());a!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),a?(this.uri=a,this.draggable=!0,this.unbindDragStart=s.addDisposableListener(this.element,"dragstart",function(e){t.onDragStart(e)})):this.uri=null),e||this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData)}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[L.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[L.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}();t.ViewItem=S;var E=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.row={element:i,templateData:null,templateId:null},o}return f(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(S),L=function(e){function t(n,o){var r=e.call(this)||this;r.lastClickTimeStamp=0,r.isRefreshing=!1,r.refreshingPreviousChildrenIds={},r._onDOMFocus=new y.Emitter,r._onDOMBlur=new y.Emitter,t.counter++,r.instance=t.counter,r.context={dataSource:n.dataSource,renderer:n.renderer,controller:n.controller,dnd:n.dnd,filter:n.filter,sorter:n.sorter,tree:n.tree,accessibilityProvider:n.accessibilityProvider,options:n.options,cache:new w(n)},r.modelListeners=[],r.viewListeners=[],r.dragAndDropListeners=[],r.model=null,r.items={},r.domNode=document.createElement("div"),r.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+r.instance,r.domNode.tabIndex=0,r.styleElement=s.createStyleSheet(r.domNode),r.domNode.setAttribute("role","tree"),r.context.options.ariaLabel&&r.domNode.setAttribute("aria-label",r.context.options.ariaLabel),r.context.options.alwaysFocused&&s.addClass(r.domNode,"focused"),r.context.options.paddingOnRow||s.addClass(r.domNode,"no-row-padding"),r.wrapper=document.createElement("div"),r.wrapper.className="monaco-tree-wrapper",r.scrollableElement=new g.ScrollableElement(r.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:m.ScrollbarVisibility.Hidden,vertical:void 0!==n.options.verticalScrollMode?n.options.verticalScrollMode:m.ScrollbarVisibility.Auto,useShadows:n.options.useShadows}),r.scrollableElement.onScroll(function(e){r.render(e.scrollTop,e.height),r.emit("scroll",e)}),i.isIE?(r.wrapper.style.msTouchAction="none",r.wrapper.style.msContentZooming="none"):r.wrapperGesture=new u.Gesture(r.wrapper),r.rowsContainer=document.createElement("div"),r.rowsContainer.className="monaco-tree-rows",n.options.showTwistie&&(r.rowsContainer.className+=" show-twisties");var a=s.trackFocus(r.domNode);return a.addFocusListener(function(){return r.onFocus()}),a.addBlurListener(function(){return r.onBlur()}),r.viewListeners.push(a),r.viewListeners.push(s.addDisposableListener(r.domNode,"keydown",function(e){return r.onKeyDown(e)})),r.viewListeners.push(s.addDisposableListener(r.domNode,"keyup",function(e){return r.onKeyUp(e)})),r.viewListeners.push(s.addDisposableListener(r.domNode,"mousedown",function(e){return r.onMouseDown(e)})),r.viewListeners.push(s.addDisposableListener(r.domNode,"mouseup",function(e){return r.onMouseUp(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,"click",function(e){return r.onClick(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,"auxclick",function(e){return r.onClick(e)})),r.viewListeners.push(s.addDisposableListener(r.domNode,"contextmenu",function(e){return r.onContextMenu(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,u.EventType.Tap,function(e){return r.onTap(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,u.EventType.Change,function(e){return r.onTouchChange(e)})),i.isIE&&(r.viewListeners.push(s.addDisposableListener(r.wrapper,"MSPointerDown",function(e){return r.onMsPointerDown(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,"MSGestureTap",function(e){return r.onMsGestureTap(e)})),r.viewListeners.push(s.addDisposableThrottledListener(r.wrapper,"MSGestureChange",function(e){return r.onThrottledMsGestureChange(e)},function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}))),r.viewListeners.push(s.addDisposableListener(window,"dragover",function(e){return r.onDragOver(e)})),r.viewListeners.push(s.addDisposableListener(r.wrapper,"drop",function(e){return r.onDrop(e)})),r.viewListeners.push(s.addDisposableListener(window,"dragend",function(e){return r.onDragEnd(e)})),r.viewListeners.push(s.addDisposableListener(window,"dragleave",function(e){return r.onDragOver(e)})),r.wrapper.appendChild(r.rowsContainer),r.domNode.appendChild(r.scrollableElement.getDomNode()),o.appendChild(r.domNode),r.lastRenderTop=0,r.lastRenderHeight=0,r.didJustPressContextMenuKey=!1,r.currentDropTarget=null,r.currentDropTargets=[],r.shouldInvalidateDropReaction=!1,r.dragAndDropScrollInterval=null,r.dragAndDropScrollTimeout=null,r.onHiddenScrollTop=null,r.onRowsChanged(),r.layout(),r.setupMSGesture(),r.applyStyles(n.options),r}return f(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDOMBlur",{get:function(){return this._onDOMBlur.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){var t=[];e.listFocusBackground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&t.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&t.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&t.push(".monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&t.push("\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&t.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree.monaco-tree-instance-"+this.instance+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t"),this.styleElement.innerHTML=t.join("\n")},t.prototype.createViewItem=function(e){return new S(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.onVisible=function(){this.scrollTop=this.onHiddenScrollTop,this.onHiddenScrollTop=null,this.setupMSGesture()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout(function(){return e.msGesture.target=e.wrapper},100))},t.prototype.onHidden=function(){this.onHiddenScrollTop=this.scrollTop},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e){this.isTreeVisible()&&(this.viewHeight=e||s.getContentHeight(this.wrapper))},t.prototype.render=function(e,t){var n,i,o=e,r=e+t,s=this.lastRenderTop+this.lastRenderHeight;for(n=this.indexAfter(r)-1,i=this.indexAt(Math.max(s,o));n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(r))-1,i=this.indexAt(o);n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=this.indexAt(this.lastRenderTop),i=Math.min(this.indexAt(o),this.indexAfter(s));n0&&this.onItemsRefresh(t)},t.prototype.onRefreshing=function(){this.isRefreshing=!0},t.prototype.onRefreshed=function(){this.isRefreshing=!1,this.onRowsChanged()},t.prototype.onRowsChanged=function(e){void 0===e&&(e=this.scrollTop),this.isRefreshing||(this.scrollTop=e)},t.prototype.focusNextPage=function(e){var t=this,n=this.indexAt(this.scrollTop+this.viewHeight);n=0===n?0:n-1;var i=this.itemAtIndex(n).model.getElement();if(this.model.getFocus()!==i)this.model.setFocus(i,e);else{var o=this.scrollTop;this.scrollTop+=this.viewHeight,this.scrollTop!==o&&setTimeout(function(){t.focusNextPage(e)},0)}},t.prototype.focusPreviousPage=function(e){var t,n=this;t=0===this.scrollTop?this.indexAt(this.scrollTop):this.indexAfter(this.scrollTop-1);var i=this.itemAtIndex(t).model.getElement();if(this.model.getFocus()!==i)this.model.setFocus(i,e);else{var o=this.scrollTop;this.scrollTop-=this.viewHeight,this.scrollTop!==o&&setTimeout(function(){n.focusPreviousPage(e)},0)}},Object.defineProperty(t.prototype,"viewHeight",{get:function(){return this.scrollableElement.getScrollState().height},set:function(e){this.scrollableElement.updateState({height:e,scrollHeight:this.getTotalHeight()})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollTop",{get:function(){return this.scrollableElement.getScrollState().scrollTop},set:function(e){this.scrollableElement.updateState({scrollTop:e,scrollHeight:this.getTotalHeight()})},enumerable:!0,configurable:!0}),t.prototype.getScrollPosition=function(){var e=this.getTotalHeight()-this.viewHeight;return e<=0?0:this.scrollTop/e},t.prototype.setScrollPosition=function(e){var t=this.getTotalHeight()-this.viewHeight;this.scrollTop=t*e},t.prototype.onClearingInput=function(e){var t=e.item;t&&(this.onRemoveItems(new p.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.onSetInput=function(e){this.context.cache.garbageCollect(),this.inputItem=new E(this.context,e.item,this.wrapper),this.emit("viewItem:create",{item:this.inputItem.model})},t.prototype.onItemChildrenRefreshing=function(e){var n=e.item,i=this.items[n.id];if(i&&(i.loadingTimer=setTimeout(function(){i.loadingTimer=0,i.loading=!0},t.LOADING_DECORATION_DELAY)),!e.isNested){for(var o,r=[],s=n.getNavigator();o=s.next();)r.push(o.id);this.refreshingPreviousChildrenIds[n.id]=r}},t.prototype.onItemChildrenRefreshed=function(e){var t=this,n=e.item,i=this.items[n.id];if(i&&(i.loadingTimer&&(clearTimeout(i.loadingTimer),i.loadingTimer=0),i.loading=!1),!e.isNested){for(var o,r=this.refreshingPreviousChildrenIds[n.id],s=[],u=n.getNavigator();o=u.next();)s.push(o);var l=Math.abs(r.length-s.length)>1e3,c=void 0,d=void 0;if(l||(d=(c=new a.LcsDiff({getLength:function(){return r.length},getElementHash:function(e){return r[e]}},{getLength:function(){return s.length},getElementHash:function(e){return s[e].id}},null).ComputeDiff(!1)).some(function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n0&&this.onRemoveItems(new p.ArrayIterator(r,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var m=s[g.modifiedStart-1]||n;m=m.getDepth()>0?m:null,this.onInsertItems(new p.ArrayIterator(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),m?m.id:null)}}else(l||c.length)&&(this.onRemoveItems(new p.ArrayIterator(r)),this.onInsertItems(new p.ArrayIterator(s),n.getDepth()>0?n.id:null));(l||c.length)&&this.onRowsChanged()}},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter(function(e){return t.items.hasOwnProperty(e.id)})),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),o=this.scrollTop;n.top+n.height<=this.scrollTop&&(o+=i),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(new p.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.getRelativeTop=function(e){if(e&&e.isVisible()){var t=this.items[e.id];if(t)return(t.top-this.scrollTop)/(this.viewHeight-t.height)}return-1},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0:n)>1?1:n;var o=i.height-this.viewHeight;this.scrollTop=o*n+i.top}else{var r=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(s.addClass(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(s.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();s.toggleClass(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",l.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),this.emit("viewItem:dispose",{item:this.inputItem.model}),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new c.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&(i.isIE&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new c.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseDown(this.context.tree,i.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new c.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseUp(this.context.tree,i.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i=new d.StandardKeyboardEvent(e);if(!(n=this.model.getFocus()))return;var o=this.context.dataSource.getId(this.context.tree,n),r=this.items[o],a=s.getDomNodePagePosition(r.element);t=new _.KeyboardContextMenuEvent(a.left+a.width,a.top,i)}else{var u=new c.StandardMouseEvent(e),l=this.getItemAround(u.target);if(!l)return;n=l.model.getElement(),t=new _.MouseContextMenuEvent(u)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new d.StandardKeyboardEvent(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new d.StandardKeyboardEvent(e))},t.prototype.onDragStart=function(e,n){if(!this.model.getHighlight()){var i,o=e.model.getElement(),r=this.model.getSelection();if(i=r.indexOf(o)>-1?r:[o],n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData("URL",e.uri),n.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),n.dataTransfer.setDragImage(a,-10,-10),setTimeout(function(){return document.body.removeChild(a)},0)}this.currentDragAndDropData=new h.ElementsDragAndDropData(i),t.currentExternalDragAndDropData=new h.ExternalElementsDragAndDropData(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new c.DragMouseEvent(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=s.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var n=this,i=new c.DragMouseEvent(e),r=this.getItemAround(i.target);if(!r||0===i.posx&&0===i.posy&&i.browserEvent.type===s.EventType.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!i.dataTransfer.types)return!1;this.currentDragAndDropData=new h.DesktopDragAndDropData}this.currentDragAndDropData.update(i);var a,u,l=r.model;do{if(a=l?l.getElement():this.model.getInput(),!(u=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,a,i))||u.bubble!==_.DragOverBubble.BUBBLE_UP)break;l=l&&l.parent}while(l);if(!l)return this.currentDropElement=null,!1;var d=u&&u.accept;d?(this.currentDropElement=l.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=u.effect===_.DragOverEffect.COPY?"copy":"move"):this.currentDropElement=null;var p=l.id===this.inputItem.id?this.inputItem:this.items[l.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==p||!b(this.currentDropElementReaction,u))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=p,this.currentDropElementReaction=u,d)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),u.bubble===_.DragOverBubble.BUBBLE_DOWN)for(var f,g=l.getNavigator();f=g.next();)(r=this.items[f.id])&&(r.dropTarget=!0,this.currentDropTargets.push(r));u.autoExpand&&(this.currentDropPromise=o.TPromise.timeout(500).then(function(){return n.context.tree.expand(n.currentDropElement)}).then(function(){return n.shouldInvalidateDropReaction=!0}))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new c.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||s.addClass(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||s.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=r.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=r.dispose(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.wrapperGesture&&(this.wrapperGesture.dispose(),this.wrapperGesture=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(v.HeightMap);t.TreeView=L}),define(d[249],h([5]),{}),define(d[259],h([1,0,3,11,41,4,33,32,26,249]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStyles={selectBackground:a.Color.fromHex("#3C3C3C"),selectForeground:a.Color.fromHex("#F0F0F0"),selectBorder:a.Color.fromHex("#3C3C3C")};var l=function(e){function o(n,o,s){void 0===s&&(s=u.clone(t.defaultStyles));var a=e.call(this)||this;return a.selectElement=document.createElement("select"),a.selectElement.className="select-box",a.setOptions(n,o),a.toDispose=[],a._onDidSelect=new i.Emitter,a.selectBackground=s.selectBackground,a.selectForeground=s.selectForeground,a.selectBorder=s.selectBorder,a.toDispose.push(r.addStandardDisposableListener(a.selectElement,"change",function(e){a.selectElement.title=e.target.value,a._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),a.toDispose.push(r.addStandardDisposableListener(a.selectElement,"keydown",function(e){(e.equals(10)||e.equals(3))&&e.stopPropagation()})),a}return f(o,e),Object.defineProperty(o.prototype,"onDidSelect",{get:function(){return this._onDidSelect.event},enumerable:!0,configurable:!0}),o.prototype.setOptions=function(e,t,n){var i=this;if(!this.options||!s.equals(this.options,e)){this.options=e,this.selectElement.options.length=0;var o=0;this.options.forEach(function(e){i.selectElement.add(i.createOption(e,n===o++))})}this.select(t)},o.prototype.select=function(e){e>=0&&e=this._lines.length)throw new Error("Illegal value for lineNumber: "+e);return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}();t.RenderedLinesCollection=i;var o=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new i(function(){return t._host.createVisibleLine()})}return e.prototype._createDomNode=function(){var e=n.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt?(s=t)<=(a=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,s,a,i,t),o.linesLength+=a-s+1):o.rendLineNumberStart0&&(this._removeLinesBefore(o,u),o.linesLength-=u),o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s=Math.max(0,n-o.rendLineNumberStart+1),a=o.linesLength-1,u=a-s+1;u>0&&(this._removeLinesAfter(o,u),o.linesLength-=u)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t.join("");for(var o=0;on||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return il?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r?null:i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.cloneRange=function(){return new e(this.startLineNumber,this.startColumn,this.endLineNumber,this.endColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}();t.Range=i}),define(d[164],h([1,0,72,38,26,2,3]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,[t.Events.UPDATED])||this;return r.editor=n,r.options=o.mixin(i,a,!1),r.disposed=!1,r.toUnbind=[],r.nextIdx=-1,r.ranges=[],r.ignoreSelectionChange=!1,r.revealFirst=r.options.alwaysRevealFirst,r.toUnbind.push(r.editor.onDidDispose(function(){return r.dispose()})),r.toUnbind.push(r.editor.onDidUpdateDiff(function(){return r.onDiffUpdated()})),r.options.followsCaret&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeCursorPosition(function(e){r.ignoreSelectionChange||(r.nextIdx=-1)})),r.options.alwaysRevealFirst&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeModel(function(e){r.revealFirst=!0})),r.init(),r}return f(t,e),t.prototype.init=function(){this.editor.getLineChanges()},t.prototype.onDiffUpdated=function(){this.init(),this.compute(this.editor.getLineChanges()),this.revealFirst&&null!==this.editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next())},t.prototype.compute=function(e){var n=this;this.ranges=[],e&&e.forEach(function(e){!n.options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this.emit(t.Events.UPDATED,{})},t.prototype.initIdx=function(e){for(var t=!1,n=this.editor.getPosition(),i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var t=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=t.range.getStartPosition();this.editor.setPosition(i),this.editor.revealPositionInCenter(i)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(){this.move(!0)},t.prototype.previous=function(){this.move(!1)},t.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind),this.ranges=null,this.disposed=!0,e.prototype.dispose.call(this)},t.Events={UPDATED:"navigation.updated"},t}(i.EventEmitter);t.DiffNavigator=u}),define(d[59],h([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.insert=function(e,t){return{identifier:null,range:new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{identifier:null,range:e,text:null,forceMoveMarkers:!0}},e.replace=function(e,t){return{identifier:null,range:e,text:t,forceMoveMarkers:!1}},e.replaceMove=function(e,t){return{identifier:null,range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=i}),define(d[435],h([1,0,9,59,2]),function(e,t,n,i,o){"use strict";function r(e,t){t.sort(function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber});for(var r=t.length-2;r>=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);for(var s=[],a=0,u=0,l=t.length,c=1,d=e.getLineCount();c<=d;c++){var h=e.getLineContent(c),p=h.length+1,f=0;if(!(u "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?o.LTR:o.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===o.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new i.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===o.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,i=new Uint32Array(t),o=0;o=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=i;var o;!function(e){e[e.False=0]="False",e[e.True=1]="True"}(o||(o={}));var r=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=r}),define(d[94],h([1,0,89]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Regular=0]="Regular",e[e.Whitespace=1]="Whitespace",e[e.WordSeparator=2]="WordSeparator"}(t.WordCharacterClass||(t.WordCharacterClass={}));var i=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i1&&v>1&&(w=f.charCodeAt(m-2))===(S=g.charCodeAt(v-2));)m--,v--;(m>1||v>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,m,a+1,1,v);for(var _=l._getLastNonBlankColumn(f,1),y=l._getLastNonBlankColumn(g,1),C=f.length+1,b=g.length+1;_, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.prototype.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd())},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.selectedText=function(t){return new e(t,0,t.length)},e.deduceInput=function(e,t,n){if(!e)return{text:"",replaceCharCnt:0};var i=e.value,r=e.selectionStart,s=e.selectionEnd,a=t.value,u=t.selectionStart,l=t.selectionEnd,c=i.substring(s),d=a.substring(l),h=o.commonSuffixLength(c,d);a=a.substring(0,a.length-h);var p=(i=i.substring(0,i.length-h)).substring(0,r),f=a.substring(0,u),g=o.commonPrefixLength(p,f);if(a=a.substring(g),i=i.substring(g),u-=g,r-=g,l-=g,s-=g,n&&u===l&&i.length>0){var m=null;if(u===a.length?o.startsWith(a,i)&&(m=a.substring(i.length)):o.endsWith(a,i)&&(m=a.substring(0,a.length-i.length)),null!==m&&m.length>0&&(/\uFE0F/.test(m)||o.containsEmoji(m)))return{text:m,replaceCharCnt:0}}return u===l?i===a&&0===r&&s===i.length&&u===a.length&&-1===a.indexOf("\n")&&o.containsFullWidthCharacter(a)?{text:"",replaceCharCnt:0}:{text:a,replaceCharCnt:p.length-g}:{text:a,replaceCharCnt:s-r}},e.EMPTY=new e("",0,0),e}();t.TextAreaState=r;var s=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var i=t*e._LINES_PER_PAGE,o=i+1,r=i+e._LINES_PER_PAGE;return new n.Range(o,1,r+1,1)},e.fromEditorSelection=function(t,o,s){var a=e._getPageOfLine(s.startLineNumber),u=e._getRangeForPage(a),l=e._getPageOfLine(s.endLineNumber),c=e._getRangeForPage(l),d=u.intersectRanges(new n.Range(1,1,s.startLineNumber,s.startColumn)),h=o.getValueInRange(d,i.EndOfLinePreference.LF),p=o.getLineCount(),f=o.getLineMaxColumn(p),g=c.intersectRanges(new n.Range(s.endLineNumber,s.endColumn,p,f)),m=o.getValueInRange(g,i.EndOfLinePreference.LF),v=null;if(a===l||a+1===l)v=o.getValueInRange(s,i.EndOfLinePreference.LF);else{var _=u.intersectRanges(s),y=c.intersectRanges(s);v=o.getValueInRange(_,i.EndOfLinePreference.LF)+String.fromCharCode(8230)+o.getValueInRange(y,i.EndOfLinePreference.LF)}return h.length>500&&(h=h.substring(h.length-500,h.length)),m.length>500&&(m=m.substring(0,500)),v.length>1e3&&(v=v.substring(0,500)+String.fromCharCode(8230)+v.substring(v.length-500,v.length)),new r(h+v+m,h.length,h.length+v.length)},e._LINES_PER_PAGE=10,e}();t.PagedScreenReaderStrategy=s}),define(d[154],h([1,0,18,9,11,3,151,28,15,4]),function(e,t,n,i,o,r,s,a,u,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyOptions={forceCopyWithSyntaxHighlighting:!1};var c;!function(e){e[e.Type=0]="Type",e[e.Paste=1]="Paste"}(c||(c={}));var d=function(e){function r(t,r){var c=e.call(this)||this;c._onFocus=c._register(new o.Emitter),c.onFocus=c._onFocus.event,c._onBlur=c._register(new o.Emitter),c.onBlur=c._onBlur.event,c._onKeyDown=c._register(new o.Emitter),c.onKeyDown=c._onKeyDown.event,c._onKeyUp=c._register(new o.Emitter),c.onKeyUp=c._onKeyUp.event,c._onCut=c._register(new o.Emitter),c.onCut=c._onCut.event,c._onPaste=c._register(new o.Emitter),c.onPaste=c._onPaste.event,c._onType=c._register(new o.Emitter),c.onType=c._onType.event,c._onCompositionStart=c._register(new o.Emitter),c.onCompositionStart=c._onCompositionStart.event,c._onCompositionUpdate=c._register(new o.Emitter),c.onCompositionUpdate=c._onCompositionUpdate.event,c._onCompositionEnd=c._register(new o.Emitter),c.onCompositionEnd=c._onCompositionEnd.event,c._host=t,c._textArea=c._register(new p(r)),c._asyncTriggerCut=c._register(new n.RunOnceScheduler(function(){return c._onCut.fire()},0)),c._textAreaState=s.TextAreaState.EMPTY,c.writeScreenReaderContent("ctor"),c._hasFocus=!1,c._isDoingComposition=!1,c._nextCommand=0,c._register(l.addStandardDisposableListener(r.domNode,"keydown",function(e){c._isDoingComposition&&e.equals(109)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),c._onKeyDown.fire(e)})),c._register(l.addStandardDisposableListener(r.domNode,"keyup",function(e){c._onKeyUp.fire(e)})),c._register(l.addDisposableListener(r.domNode,"compositionstart",function(e){c._isDoingComposition||(c._isDoingComposition=!0,a.isEdgeOrIE||c._setAndWriteTextAreaState("compositionstart",s.TextAreaState.EMPTY),c._onCompositionStart.fire())}));var d=function(e){var t=c._textAreaState,n=c._textAreaState.readFromTextArea(c._textArea);return[n,s.TextAreaState.deduceInput(t,n,e)]},f=function(e){var t=c._textAreaState,n=s.TextAreaState.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]};return c._register(l.addDisposableListener(r.domNode,"compositionupdate",function(e){if(!a.isChromev56){if(a.isEdgeOrIE&&"ja"===e.locale){var t=d(!1),n=t[0],i=t[1];return c._textAreaState=n,c._onType.fire(i),void c._onCompositionUpdate.fire(e)}var o=f(e.data),r=o[0],s=o[1];c._textAreaState=r,c._onType.fire(s),c._onCompositionUpdate.fire(e)}})),c._register(l.addDisposableListener(r.domNode,"compositionend",function(e){if(a.isEdgeOrIE&&"ja"===e.locale){var t=d(!1),n=t[0],i=t[1];c._textAreaState=n,c._onType.fire(i)}else{var o=f(e.data),n=o[0],i=o[1];c._textAreaState=n,c._onType.fire(i)}(a.isEdgeOrIE||a.isChrome)&&(c._textAreaState=c._textAreaState.readFromTextArea(c._textArea)),c._isDoingComposition&&(c._isDoingComposition=!1,c._onCompositionEnd.fire())})),c._register(l.addDisposableListener(r.domNode,"input",function(){if(c._isDoingComposition){if(a.isChromev56){var e=f(c._textArea.getValue()),t=e[0],n=e[1];c._textAreaState=t,c._onType.fire(n);var o={data:n.text};c._onCompositionUpdate.fire(o)}}else{var r=d(u.isMacintosh),s=r[0],l=r[1];0===l.replaceCharCnt&&1===l.text.length&&i.isHighSurrogate(l.text.charCodeAt(0))||(c._textAreaState=s,0===c._nextCommand?""!==l.text&&c._onType.fire(l):(""!==l.text&&c._onPaste.fire({text:l.text}),c._nextCommand=0))}})),c._register(l.addDisposableListener(r.domNode,"cut",function(e){c._ensureClipboardGetsEditorSelection(e),c._asyncTriggerCut.schedule()})),c._register(l.addDisposableListener(r.domNode,"copy",function(e){c._ensureClipboardGetsEditorSelection(e)})),c._register(l.addDisposableListener(r.domNode,"paste",function(e){if(h.canUseTextData(e)){var t=h.getTextData(e);""!==t&&c._onPaste.fire({text:t})}else c._textArea.getSelectionStart()!==c._textArea.getSelectionEnd()&&c._setAndWriteTextAreaState("paste",s.TextAreaState.EMPTY),c._nextCommand=1})),c._register(l.addDisposableListener(r.domNode,"focus",function(){return c._setHasFocus(!0)})),c._register(l.addDisposableListener(r.domNode,"blur",function(){return c._setHasFocus(!1)})),c}return f(r,e),r.prototype.dispose=function(){e.prototype.dispose.call(this)},r.prototype.focusTextArea=function(){this._setHasFocus(!0)},r.prototype.isFocused=function(){return this._hasFocus},r.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(a.isEdge?this._setAndWriteTextAreaState("focusgain",s.TextAreaState.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},r.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},r.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},r.prototype._ensureClipboardGetsEditorSelection=function(e){var n=this._host.getPlainTextToCopy();if(h.canUseTextData(e)){var i=null;!a.isEdgeOrIE&&(n.length<65536||t.CopyOptions.forceCopyWithSyntaxHighlighting)&&(i=this._host.getHTMLToCopy()),h.setTextData(e,n,i)}else this._setAndWriteTextAreaState("copy or cut",s.TextAreaState.selectedText(n))},r}(r.Disposable);t.TextAreaInput=d;var h=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),p=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n}return f(t,e),t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=document.activeElement===i,r=i.selectionStart,s=i.selectionEnd;if(!o||r!==t||s!==n)if(o)i.setSelectionRange(t,n);else try{var a=l.saveParentsScrollTop(i);i.focus(),i.setSelectionRange(t,n),l.restoreParentsScrollTop(i,a)}catch(e){}},t}(r.Disposable)}),define(d[475],h([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.model=e,this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEditOperation=function(e,t,i){this.future=[],this.currentOpenStackElement||(this.currentOpenStackElement={beforeVersionId:this.model.getAlternativeVersionId(),beforeCursorState:e,editOperations:[],afterCursorState:null,afterVersionId:-1});var o={operations:this.model.applyEdits(t)};this.currentOpenStackElement.editOperations.push(o);try{this.currentOpenStackElement.afterCursorState=i?i(o.operations):null}catch(e){n.onUnexpectedError(e),this.currentOpenStackElement.afterCursorState=null}return this.currentOpenStackElement.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement.afterCursorState},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.past.pop();try{for(var t=e.editOperations.length-1;t>=0;t--)e.editOperations[t]={operations:this.model.applyEdits(e.editOperations[t].operations)}}catch(e){return this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.redo=function(){if(this.future.length>0){if(this.currentOpenStackElement)throw new Error("How is this possible?");var e=this.future.pop();try{for(var t=0;t0;r--){var s=e.getIndentLevel(r);if(-1!==s){var a=o[o.length-1];if(a.indent>s){do{o.pop(),a=o[o.length-1]}while(a.indent>s);var u=a.line-1;u-r>=t&&i.push(new n(r,u,s))}a.indent===s?a.line=r:o.push({indent:s,line:r})}}return i.reverse()}}),define(d[482],h([1,0]),function(e,t){"use strict";function n(e,t,n,i){var o;for(o=0;o0&&s>0)return 0;if(l>0&&c>0)return 0;var h=Math.abs(s-c),p=Math.abs(r-l);return 0===h?p:p%h==0?p/h:0}Object.defineProperty(t,"__esModule",{value:!0}),t.guessIndentation=function(e,t,i){for(var o=Math.min(e.length,1e4),r=0,s=0,a="",u=0,l=[2,4,6,8],c=[0,0,0,0,0,0,0,0,0],d=0;d0?r++:g>1&&s++;var C=n(a,u,h,f);C<=8&&c[C]++,a=h,u=f}}var b=n(a,u,"",0);b<=8&&c[b]++;var w=i;r!==s&&(w=rE&&(E=t,S=e)}),{insertSpaces:w,tabSize:S}}}),define(d[55],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextModelEventType={ModelDispose:"modelDispose",ModelTokensChanged:"modelTokensChanged",ModelLanguageChanged:"modelLanguageChanged",ModelOptionsChanged:"modelOptionsChanged",ModelContentChanged:"contentChanged",ModelRawContentChanged2:"rawContentChanged2",ModelDecorationsChanged:"decorationsChanged"};!function(e){e[e.Flush=1]="Flush",e[e.LineChanged=2]="LineChanged",e[e.LinesDeleted=3]="LinesDeleted",e[e.LinesInserted=4]="LinesInserted",e[e.EOLChanged=5]="EOLChanged"}(t.RawContentChangedType||(t.RawContentChangedType={}));var n=function(){return function(){this.changeType=1}}();t.ModelRawFlush=n;var i=function(){return function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}();t.ModelRawLineChanged=i;var o=function(){return function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}();t.ModelRawLinesDeleted=o;var r=function(){return function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}}();t.ModelRawLinesInserted=r;var s=function(){return function(){this.changeType=5}}();t.ModelRawEOLChanged=s;var a=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}function l(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}function c(e,t,n,i,o){return u(e,t,n,i,o)&&l(e,t,n,i,o)}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var i=e.charCodeAt(t);if(110===i||114===i)return!0}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var i=null;try{i=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!i)return null;var o=!this.isRegex&&!t;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new h(i,this.wordSeparators?s.getMapForWordSeparators(this.wordSeparators):null,o?this.searchString:null)},e}();t.SearchParams=d;var h=function(){return function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}();t.SearchData=h;var p=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new f(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,r){var s;if("\r\n"===e.getEOL()){for(var a=0,u=0;u=o)return c;return c},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l=d))return s;return s}var _,y=new f(e.wordSeparators,e.regex);y.reset(0);do{if((_=y.next(t))&&(u[s++]=a(new o.Range(n,_.index+1+i,n,_.index+1+_[0].length+i),_,l),s>=d))return s}while(_);return s},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,s){var u=new i.Position(t.lineNumber,1),l=e.getOffsetAt(u),c=e.getLineCount(),d=e.getValueInRange(new o.Range(u.lineNumber,u.column,c,e.getLineMaxColumn(c)),r.EndOfLinePreference.LF);n.reset(t.column-1);var h=n.next(d);return h?a(this._getMultilineMatchRange(e,l,d,h.index,h[0]),h,s):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.Position(1,1),n,s):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,c,l+1,1,i);if(d)return d}return null},e._findFirstMatchInLine=function(e,t,n,i,r){e.reset(i-1);var s=e.next(t);return s?a(new o.Range(n,s.index+1,n,s.index+1+s[0].length),s,r):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,r){var s=this._doFindMatchesMultiline(e,new o.Range(1,1,t.lineNumber,t.column),n,r,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new i.Position(a,e.getLineMaxColumn(a)),n,r):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),d=this._findLastMatchInLine(n,c,l+1,i);if(d)return d}return null},e._findLastMatchInLine=function(e,t,n,i){var r,s=null;for(e.reset(0);r=e.next(t);)s=a(new o.Range(n,r.index+1,n,r.index+1+r[0].length),r,i);return s},e}();t.TextModelSearch=p;var f=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||c(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}()}),define(d[101],h([1,0,9,20]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.fromString=function(e){for(var t=0,i=-1;-1!==(i=e.indexOf("\r",i+1));)t++;var o=n.containsRTL(e),r=!o&&n.isBasicASCII(e),s=e.split(/\r\n|\r|\n/),a="";return n.startsWithUTF8BOM(s[0])&&(a=n.UTF8_BOM_CHARACTER,s[0]=s[0].substr(1)),{BOM:a,lines:s,length:e.length,containsRTL:o,isBasicASCII:r,totalCRCount:t}},e}();t.RawTextSource=o;var r=function(){function e(){}return e._getEOL=function(e,t){var n=e.lines.length-1;return 0===n?t===i.DefaultEndOfLine.LF?"\n":"\r\n":e.totalCRCount>n/2?"\r\n":"\n"},e.fromRawTextSource=function(e,t){return{length:e.length,lines:e.lines,BOM:e.BOM,EOL:this._getEOL(e,t),containsRTL:e.containsRTL,isBasicASCII:e.isBasicASCII}},e.fromString=function(e,t){return this.fromRawTextSource(o.fromString(e),t)},e.create=function(e,t){return"string"==typeof e?this.fromString(e,t):this.fromRawTextSource(e,t)},e}();t.TextSource=r}),define(d[116],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();t.TokenMetadata=n}),define(d[90],h([1,0,116]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.endIndex=e,this._metadata=t}return e.prototype.getForeground=function(){return n.TokenMetadata.getForeground(this._metadata)},e.prototype.getType=function(){return n.TokenMetadata.getClassNameFromMetadata(this._metadata)},e.prototype.getInlineStyle=function(e){return n.TokenMetadata.getInlineStyleFromMetadata(this._metadata,e)},e._equals=function(e,t){return e.endIndex===t.endIndex&&e._metadata===t._metadata},e.equalsArr=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i>>1;o>>1;l=n);l++){var d=l+1>>1)-1;nt?i=o-1:n=o}return n},e}();t.ViewLineTokenFactory=o}),define(d[130],h([1,0,116,90]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n,i,o,r){this._source=e,this._tokenIndex=t,this._metadata=r,this.startOffset=i,this.endOffset=o,this.hasPrev=this._tokenIndex>0,this.hasNext=this._tokenIndex+1>>1,this._text=t,this._textLength=this._text.length}return e.prototype.getTokenCount=function(){return this._tokensCount},e.prototype.getLineContent=function(){return this._text},e.prototype.getLineLength=function(){return this._textLength},e.prototype.getTokenStartOffset=function(e){return this._tokens[e<<1]},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getTokenType(t)},e.prototype.getTokenEndOffset=function(e){return e+1>>0}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i){this.id=e,this.internalDecorationId=t,this.position=n,this.stickToPreviousCharacter=i}return e.prototype.toString=function(){return"{'"+this.id+"';"+this.position.toString()+","+this.stickToPreviousCharacter+"}"},e.prototype.updateLineNumber=function(e,t){this.position.lineNumber!==t&&(e.addChangedMarker(this),this.position=new i.Position(t,this.position.column))},e.prototype.updateColumn=function(e,t){this.position.column!==t&&(e.addChangedMarker(this),this.position=new i.Position(this.position.lineNumber,t))},e.prototype.updatePosition=function(e,t){this.position.lineNumber===t.lineNumber&&this.position.column===t.column||(e.addChangedMarker(this),this.position=t)},e.prototype.setPosition=function(e){this.position=e},e.compareMarkers=function(e,t){return e.position.column===t.position.column?(e.stickToPreviousCharacter?0:1)-(t.stickToPreviousCharacter?0:1):e.position.column-t.position.column},e}();t.LineMarker=s;var a=function(){function e(){this._changedDecorations=[],this._changedDecorationsLen=0}return e.prototype.addChangedMarker=function(e){var t=e.internalDecorationId;0!==t&&(this._changedDecorations[this._changedDecorationsLen++]=t)},e.prototype.getDecorationIds=function(){return this._changedDecorations},e}();t.MarkersTracker=a;var u,l={adjust:function(){},finish:function(){}},c={adjustDelta:function(){},adjustSet:function(){},finish:function(){}};!function(e){e[e.MarkerDefined=0]="MarkerDefined",e[e.ForceMove=1]="ForceMove",e[e.ForceStay=2]="ForceStay"}(u||(u={}));var d=function(){function e(e){e&&(this._markers=null)}return e.prototype._createMarkersAdjuster=function(e){if(!this._markers)return c;if(0===this._markers.length)return c;this._markers.sort(s.compareMarkers);var t=this._markers,n=t.length,i=0,o=t[i],r=function(e,t){return o.position.columne)&&(1!==t&&(2===t||o.stickToPreviousCharacter))},a=function(s,a,u,l){for(;i0?2:0);var f=Math.min(h,p);f>0&&(r.adjust(l.startColumn-1+f,i,c),l.forceMoveMarkers||s.adjustDelta(l.startColumn+f,i,c,l.forceMoveMarkers?1:h>p?2:0)),o=o.substring(0,c-1)+l.text+o.substring(d-1),i+=p-h,r.adjust(l.endColumn,i,c),s.adjustSet(l.endColumn,c+p,l.forceMoveMarkers?1:0)}return r.finish(i,o.length),s.finish(i,o.length),this._setText(o,n),i},e.prototype.split=function(e,t,n,i){var o=this.text.substring(0,t-1),r=this.text.substring(t-1),a=null;if(this._markers){this._markers.sort(s.compareMarkers);for(var u=0,l=this._markers.length;ut||d.position.column===t&&(n||!d.stickToPreviousCharacter)){var c=this._markers.slice(0,u);a=this._markers.slice(u),this._markers=c;break}if(a)for(var u=0,l=a.length;u>1)-1},t.prototype._setPlusOneIndentLevel=function(e){this._metadata=1&this._metadata|(4026531839&e)<<1},t.prototype.updateTabSize=function(e){0===e?this._metadata=1&this._metadata:this._setPlusOneIndentLevel(o(this._text,e))},t.prototype._createModelLine=function(e,n){return new t(e,n)},t.prototype.split=function(t,n,i,o){var r=e.prototype.split.call(this,t,n,i,o);return this._deleteMarkedTokens(this._markOverflowingTokensForDeletion(0,this.text.length)),r},t.prototype.append=function(n,i,o,r){var s=this.text.length;if(e.prototype.append.call(this,n,i,o,r),o instanceof t){var a=o._lineTokens;if(a){var u=new Uint32Array(a);if(s>0)for(var l=0,c=u.length>>>1;l>>1,i=0,o=0,r=0,s=function(e,s,a){for(var u=a-1;o0&&0!==s){var l=Math.max(u,o+s);if(t[i<<1]=l,s<0)for(var c=i;c>0;){var d=t[c-1<<1];if(!(d>=l))break;4294967295!==d&&(t[c-1<<1]=4294967295,r++),c--}}++i>>1;if(e+1===i)return e;for(var o=i-1;o>0;o--){var r=n[o<<1];if(r>>1,i=new Uint32Array(n-e<<1),o=0,r=0;r=o)return{word:a[0],startColumn:i+1+a.index,endColumn:i+1+t.lastIndex};return null}function i(e,t,n,i){var o=e-1-i;t.lastIndex=0;for(var r;r=t.exec(n);){if(r.index>o)return null;if(t.lastIndex>=o)return{word:r[0],startColumn:i+1+r.index,endColumn:i+1+t.lastIndex}}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n=t.USUAL_WORD_SEPARATORS,i="(-?\\d*\\.\\d\\w*)|([^",o=0;o=0||(i+="\\"+n[o]);return i+="\\s]+)",new RegExp(i,"g")}(),t.ensureValidWordDefinition=function(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),n=new RegExp(e.source,i)}return n.lastIndex=0,n},t.getWordAtText=function(e,t,o,r){t.lastIndex=0;var s=t.exec(o);if(!s)return null;var a=s[0].indexOf(" ")>=0?i(e,t,o,r):n(e,t,o,r);return t.lastIndex=0,a}}),define(d[511],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},e}();t.FrankensteinMode=n}),define(d[60],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={}));var n=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;tr&&(r=u)}return r}if("string"==typeof e)return"*"===e?5:e===o?10:0;if(e){var l=e.language,c=e.pattern,d=e.scheme,r=0;if(d)if(d===t.scheme)r=10;else{if("*"!==d)return 0;r=5}if(l)if(l===o)r=10;else{if("*"!==l)return 0;r=Math.max(r,5)}if(c){if(c!==t.fsPath&&!n.match(c,t.fsPath))return 0;r=10}return r}return 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return i(e,t,n)>0},t.score=i}),define(d[533],h([1,0,11,513]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new n.Emitter}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),{dispose:function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}}},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e||e.isTooLargeForHavingARichMode())return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,function(e){return t.push(e.provider)}),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))}),i},e.prototype._orderedForEach=function(e,t){if(e&&!e.isTooLargeForHavingARichMode()){this._updateScores(e);for(var n=0;n0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var o=0,r=this._entries;ot._score?-1:e._timet._time?-1:0},e}();t.default=o}),define(d[536],h([1,0,89,96]),function(e,t,n,i){"use strict";function o(){return null===l&&(l=new u([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}function r(){if(null===c){c=new n.CharacterClassifier(0);for(e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)c.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)c.set(".,;".charCodeAt(e),2)}return c}Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e[e.Invalid=0]="Invalid",e[e.Start=1]="Start",e[e.H=2]="H",e[e.HT=3]="HT",e[e.HTT=4]="HTT",e[e.HTTP=5]="HTTP",e[e.F=6]="F",e[e.FI=7]="FI",e[e.FIL=8]="FIL",e[e.BeforeColon=9]="BeforeColon",e[e.AfterColon=10]="AfterColon",e[e.AlmostThere=11]="AlmostThere",e[e.End=12]="End",e[e.Accept=13]="Accept"}(s||(s={}));var a,u=function(){function e(e){for(var t=0,n=0,o=0,r=e.length;ot&&(t=u),a>n&&(n=a),l>n&&(n=l)}t++,n++;for(var c=new i.Uint8Matrix(n,t,0),o=0,r=e.length;o=this._maxCharCode?0:this._states.get(e,t)},e}(),l=null;!function(e){e[e.None=0]="None",e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(a||(a={}));var c=null,d=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=o(),i=r(),s=[],a=1,u=t.getLineCount();a<=u;a++){for(var l=t.getLineContent(a),c=l.length,d=0,h=0,p=0,f=1,g=!1,m=!1,v=!1;d=0},e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t},e}();t.IndentRulesSupport=o}),define(d[546],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,i,o){if(e&&t&&(r=this.doNavigateValueSet(t,o)))return{range:e,value:r};if(n&&i){var r=this.doNavigateValueSet(i,o);if(r)return{range:n,value:r}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),o=parseFloat(e);return isNaN(i)||isNaN(o)||i!==o?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var i=null,o=0,r=e.length;null===i&&o=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),define(d[550],h([1,0,10,9,60]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map(function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}}),this._regExpRules=t.regExpRules||[],this._indentationRules=t.indentationRules}return e.prototype.onEnter=function(e,t,n){for(var i=0,r=this._regExpRules.length;i0&&n.length>0)for(var i=0,r=this._brackets.length;i0)for(var i=0,r=this._brackets.length;i=0;n--)t+=e.charAt(n);return t}var t=null,n=null;return function(i){return t!==i&&(n=e(t=i)),n}}(),p=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=n.length-r.index,a=r[0].length,u=o+s;return new i.Range(t,u-a+1,t,u+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=h(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i)},e.findNextBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=r.index,a=r[0].length,u=o+s;return new i.Range(t,u+1,t,u+1+a)},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}();t.BracketsUtils=p}),define(d[202],h([1,0,32]),function(e,t,n){"use strict";function i(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,i=0,o=e.length;i=1&&""===e[0].token;){var o=e.shift();-1!==o.fontStyle&&(t=o.fontStyle),null!==o.foreground&&(n=o.foreground),null!==o.background&&(i=o.background)}for(var r=new u,a=new d(t,r.getId(n),r.getId(i)),c=new p(a),h=0,f=e.length;ht?1:0}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}}();t.ParsedTokenThemeRule=a,t.parseTokenTheme=i;var u=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;if(e=e.toUpperCase(),!/^[0-9A-F]{6}$/.test(e))throw new Error("Illegal color name: "+e);var t=this._color2id.get(e);return t||(t=++this._lastColorId,this._color2id.set(e,t),this._id2color[t]=n.Color.fromHex("#"+e),t)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=u;var l=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTokenTheme=function(e){return this.createFromParsedTokenTheme(i(e))},e.createFromParsedTokenTheme=function(e){return o(e)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype.getThemeTrieElement=function(){return this._root.toExternalThemeTrieElement()},e.prototype._match=function(e){return this._root.match(e)},e.prototype.match=function(e,t){var n=this._cache.get(t);if(void 0===n){var i=this._match(t),o=r(t);n=(i.metadata|o<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0},e}();t.TokenTheme=l;var c=/\b(comment|string|regex)\b/;t.toStandardTokenType=r,t.strcmp=s;var d=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.cloneArr=function(e){for(var t=[],n=0,i=e.length;n>>0},e}();t.ThemeTrieElementRule=d;var h=function(){return function(e,t){this.mainRule=e,this.children=t||Object.create(null)}}();t.ExternalThemeTrieElement=h;var p=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.toExternalThemeTrieElement=function(){var e=Object.create(null);return this._children.forEach(function(t,n){e[n]=t.toExternalThemeTrieElement()}),new h(this._mainRule,e)},e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);void 0===u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}();t.ThemeTrieElement=p,t.generateTokensCSSForColorMap=function(e){for(var t=[],n=1,i=e.length;n>>0,new i.TokenizationResult2(r,n)}}),define(d[91],h([1,0,17]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScopedLineTokens=function(e,t){for(var n=e.getTokenCount(),o=e.findTokenIndexAtOffset(t),r=e.getLanguageId(o),s=o;s+10&&e.getLanguageId(a-1)===r;)a--;return new i(e,r,a,s+1,e.getTokenStartOffset(a),e.getTokenEndOffset(s))};var i=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getTokenStartOffset=function(e){return this._actual.getTokenStartOffset(e+this._firstTokenIndex)-this.firstCharOffset},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=i;var o;!function(e){e[e.value=7]="value"}(o||(o={})),t.ignoreBracketsInToken=function(e){return 0!=(7&e)}}),define(d[207],h([1,0,91,98,60]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){n=n||{},this._richEditBrackets=e,this._complexAutoClosePairs=t.filter(function(e){return e.open.length>1&&!!e.close}).map(function(e){return new o.StandardAutoClosingPairConditional(e)}),n.docComment&&this._complexAutoClosePairs.push(new o.StandardAutoClosingPairConditional({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}return null},e}();t.BracketElectricCharacterSupport=r}),define(d[43],h([1,0,543,207,550,545,98,11,10,9,95,91,2,60]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(t,o,a){var u=null;o&&(u=o._conf),this._conf=e._mergeConf(u,a),this._conf.brackets&&(this.brackets=new s.RichEditBrackets(t,this._conf.brackets)),this.onEnter=e._handleOnEnter(this._conf),this.comments=e._handleComments(this._conf),this.characterPair=new n.CharacterPairSupport(this._conf),this.electricCharacter=new i.BracketElectricCharacterSupport(this.brackets,this.characterPair.getAutoClosingPairs(),this._conf.__electricCharacterSupport),this.wordDefinition=this._conf.wordPattern||c.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules&&(this.indentRulesSupport=new r.IndentRulesSupport(this._conf.indentationRules))}return e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},n=!0;return e.brackets&&(n=!1,t.brackets=e.brackets),e.indentationRules&&(n=!1,t.indentationRules=e.indentationRules),e.onEnterRules&&(n=!1,t.regExpRules=e.onEnterRules),n?null:new o.OnEnterSupport(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,o=i[0],r=i[1];n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n},e}();t.RichEditSupport=f;var g=function(){function e(){this._onDidChange=new a.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[]}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),o=new f(e,i,t);return this._entries[e.id]=o,this._onDidChange.fire(void 0),{dispose:function(){n._entries[e.id]===o&&(n._entries[e.id]=i,n._onDidChange.fire(void 0))}}},e.prototype._getRichEditSupport=function(e){return this._entries[e]||null},e.prototype.getIndentationRules=function(e){var t=this._entries[e];return t?t.indentationRules||null:null},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=d.createScopedLineTokens(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=d.createScopedLineTokens(t,n-1),o=this._getCharacterPairSupport(i.languageId);return!!o&&o.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?c.ensureValidWordDefinition(t.wordDefinition||null):c.ensureValidWordDefinition(null)},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e);return t?t.indentRulesSupport||null:null},e.prototype.getPrecedingValidLine=function(e,t,n){var i=e.getLanguageIdAtPosition(t,0);if(t>1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(e,t,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var r=e.getLineContent(o);if(i.shouldIncrease(r)||i.shouldIndentNextLine(r))return{indentation:l.getLeadingWhitespace(r),action:p.IndentAction.Indent,line:o};if(i.shouldDecrease(r))return{indentation:l.getLeadingWhitespace(r),action:null,line:o};if(1===o)return{indentation:l.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};var s=o-1,a=i.getIndentMetadata(e.getLineContent(s));if(!(3&a)&&4&a){for(var u=0,c=s-1;c>0;c--)if(!i.shouldIndentNextLine(e.getLineContent(c))){u=c;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(u+1)),action:null,line:u+1}}if(n)return{indentation:l.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};for(c=o;c>0;c--){var d=e.getLineContent(c);if(i.shouldIncrease(d))return{indentation:l.getLeadingWhitespace(d),action:p.IndentAction.Indent,line:c};if(i.shouldIndentNextLine(d)){for(var u=0,h=c-1;h>0;h--)if(!i.shouldIndentNextLine(e.getLineContent(c))){u=h;break}return{indentation:l.getLeadingWhitespace(e.getLineContent(u+1)),action:null,line:u+1}}if(i.shouldDecrease(d))return{indentation:l.getLeadingWhitespace(d),action:null,line:c}}return{indentation:l.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i){var o=this.getIndentRulesSupport(t);if(!o)return null;var r=this.getInheritIndentForLine(e,n),s=e.getLineContent(n);if(r){var a=r.line;if(void 0!==a){var c=this._getOnEnterSupport(t),d=null;try{d=c.onEnter("",e.getLineContent(a),"")}catch(e){u.onUnexpectedError(e)}if(d){var h=l.getLeadingWhitespace(e.getLineContent(a));return d.removeText&&(h=h.substring(0,h.length-d.removeText)),d.indentAction===p.IndentAction.Indent||d.indentAction===p.IndentAction.IndentOutdent?h=i.shiftIndent(h):d.indentAction===p.IndentAction.Outdent&&(h=i.unshiftIndent(h)),o.shouldDecrease(s)&&(h=i.unshiftIndent(h)),d.appendText&&(h+=d.appendText),l.getLeadingWhitespace(h)}}return o.shouldDecrease(s)?r.action===p.IndentAction.Indent?r.indentation:i.unshiftIndent(r.indentation):r.action===p.IndentAction.Indent?i.shiftIndent(r.indentation):r.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){e.forceTokenization(t.startLineNumber);var o,r,s=e.getLineTokens(t.startLineNumber),a=d.createScopedLineTokens(s,t.startColumn-1),u=a.getLineContent(),c=!1;a.firstCharOffset>0&&s.getLanguageId(0)!==a.languageId?(c=!0,o=u.substr(0,t.startColumn-1-a.firstCharOffset)):o=s.getLineContent().substring(0,t.startColumn-1),r=t.isEmpty()?u.substr(t.startColumn-1-a.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset);var h=this.getIndentRulesSupport(a.languageId);if(!h)return null;var f=o,g=l.getLeadingWhitespace(o);if(!i&&!c){var m=this.getInheritIndentForLine(e,t.startLineNumber);h.shouldDecrease(o)&&m&&(g=m.indentation,m.action!==p.IndentAction.Indent&&(g=n.unshiftIndent(g))),f=g+l.ltrim(l.ltrim(o," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?f:e.getLineContent(n)}},_=l.getLeadingWhitespace(s.getLineContent()),y=this.getInheritIndentForLine(v,t.startLineNumber+1);if(!y){var C=c?_:g;return{beforeEnter:C,afterEnter:C}}var b=c?_:y.indentation;return y.action===p.IndentAction.Indent&&(b=n.shiftIndent(b)),h.shouldDecrease(r)&&(b=n.unshiftIndent(b)),{beforeEnter:c?_:g,afterEnter:b}},e.prototype.getIndentActionForType=function(e,t,n,i){var o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this.getIndentRulesSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);if(s=t.isEmpty()?a.substr(t.startColumn-1-o.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset),!r.shouldDecrease(u+s)&&r.shouldDecrease(u+n+s)){var l=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!l)return null;var c=l.indentation;return l.action!==p.IndentAction.Indent&&(c=i.unshiftIndent(c)),c}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new h.Range(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),o=this._getOnEnterSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),a=s.substr(0,t.startColumn-1-i.firstCharOffset);r=t.isEmpty()?s.substr(t.startColumn-1-i.firstCharOffset):this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset);var l=t.startLineNumber,c="";if(l>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(e,l-1);d.languageId===i.languageId&&(c=d.getLineContent())}var h=null;try{h=o.onEnter(c,a,r)}catch(e){u.onUnexpectedError(e)}return h?(h.appendText||(h.indentAction===p.IndentAction.Indent||h.indentAction===p.IndentAction.IndentOutdent?h.appendText="\t":h.appendText=""),h.removeText&&(n=n.substring(0,n.length-h.removeText)),{enterAction:h,indentation:n}):null},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=l.getLeadingWhitespace(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=isNaN(n)?e.getLineMaxColumn(t)-1:n-1;return d.createScopedLineTokens(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}();t.LanguageConfigurationRegistryImpl=g,t.LanguageConfigurationRegistry=new g}),define(d[122],h([1,0,9,17,68,130]),function(e,t,n,i,o,r){"use strict";function s(e){var t=i.TokenizationRegistry.get(e);return t||{getInitialState:function(){return o.NULL_STATE},tokenize:void 0,tokenize2:function(e,t,n){return o.nullTokenize2(0,e,t,n)}}}function a(e,t){for(var i='
    ',o=e.split(/\r\n|\r|\n/),s=t.getInitialState(),a=0,u=o.length;a0&&(i+="
    ");for(var c=t.tokenize2(l,s,0),d=new r.LineTokens(c.tokens,l).inflate(),h=0,p=0,f=d.length;p'+n.escape(l.substring(h,g.endIndex))+"",h=g.endIndex}s=c.endState}return i+="
    "}Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizeToString=function(e,t){return a(e,s(t))},t.tokenizeLineToHTML=function(e,t,n,i,o,r){for(var s="
    ",a=i,u=0,l=0,c=t.length;l0;)p+=" ",g--;break;case 60:p+="<";break;case 62:p+=">";break;case 38:p+="&";break;case 0:p+="�";break;case 65279:case 8232:p+="�";break;case 13:p+="​";break;default:p+=String.fromCharCode(f)}}if(s+=''+p+"",d.endIndex>o||a>=o)break}}return s+="
    "}}),define(d[210],h([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._transientWatchers={},this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._onCodeEditorAdd=new n.Emitter,this._onCodeEditorRemove=new n.Emitter,this._onDiffEditorAdd=new n.Emitter,this._onDiffEditorRemove=new n.Emitter}return e.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorAdd",{get:function(){return this._onCodeEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorRemove",{get:function(){return this._onCodeEditorRemove.event},enumerable:!0,configurable:!0}),e.prototype.getCodeEditor=function(e){return this._codeEditors[e]||null},e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map(function(t){return e._codeEditors[t]})},e.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onDiffEditorAdd",{get:function(){return this._onDiffEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},Object.defineProperty(e.prototype,"onDiffEditorRemove",{get:function(){return this._onDiffEditorRemove.event},enumerable:!0,configurable:!0}),e.prototype.getDiffEditor=function(e){return this._diffEditors[e]||null},e.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map(function(t){return e._diffEditors[t]})},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;n=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}();t.MinimapTokensColorTracker=o;!function(e){e[e.START_CH_CODE=32]="START_CH_CODE",e[e.END_CH_CODE=126]="END_CH_CODE",e[e.CHAR_COUNT=95]="CHAR_COUNT",e[e.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",e[e.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",e[e.SAMPLED_HALF_CHAR_WIDTH=5]="SAMPLED_HALF_CHAR_WIDTH",e[e.x2_CHAR_HEIGHT=4]="x2_CHAR_HEIGHT",e[e.x2_CHAR_WIDTH=2]="x2_CHAR_WIDTH",e[e.x1_CHAR_HEIGHT=2]="x1_CHAR_HEIGHT",e[e.x1_CHAR_WIDTH=1]="x1_CHAR_WIDTH",e[e.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT"}(t.Constants||(t.Constants={}));var r=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)console.warn("bad render request outside image data");else{var u=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,p=s.b,f=r.r-d,g=r.g-h,m=r.b-p,v=t.data,_=4*l*2,y=i*c+4*n,C=u[_]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=u[_+1]/255;v[y+4]=d+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=c;C=u[_+2]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=u[_+3]/255;v[y+4]=d+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=c;C=u[_+4]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=u[_+5]/255;v[y+4]=d+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=c;C=u[_+6]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=u[_+7]/255;v[y+4]=d+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C}},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{var u=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,p=s.b,f=r.r-d,g=r.g-h,m=r.b-p,v=t.data,_=2*l*1,y=i*c+4*n,C=u[_]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C,y+=c;C=u[_+1]/255;v[y+0]=d+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C}},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),d=u+.5*(i.g-u),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h}},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),d=u+.5*(i.g-u),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=c,p[f+1]=d,p[f+2]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h}},e}();t.MinimapCharRenderer=r}),define(d[78],h([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.lineIsVisible=function(e){return this.visibleRange.startLineNumber<=e&&e<=this.visibleRange.endLineNumber},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}();t.RestrictedRenderingContext=i;var o=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._viewLines=i,o}return f(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new n.Range(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(i);t.RenderingContext=o;var r=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}();t.LineVisibleRanges=r;var s=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}();t.HorizontalRange=s}),define(d[214],h([1,0,78]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),o=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new n.HorizontalRange(e[0].left,e[0].width)];e.sort(i.compare);for(var t=[],o=0,r=e[0].left,s=e[0].width,a=1,u=e.length;a=c?s=Math.max(s,c+d-r):(t[o++]=new n.HorizontalRange(r,s),r=c,s=d)}return t[o++]=new n.HorizontalRange(r,s),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],o=0,r=e.length;oa)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}();t.RangeUtil=o}),define(d[215],h([1,0,111]),function(e,t,n){"use strict";function i(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;nn)&&!c.isEmpty()){var d=c.startLineNumber===n?c.startColumn:i,h=c.endLineNumber===n?c.endColumn:o;h<=1||(r[s++]=new e(d,h,l.inlineClassName,l.insertsBeforeOrAfter))}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.LineDecoration=n;var i=function(){return function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}}();t.DecorationSegment=i;var o=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),r=function(){function e(){}return e.normalize=function(e){if(0===e.length)return[];for(var t=[],n=new o,i=0,r=0,s=e.length;r0){for(var h=0,p=e.lineDecorations.length;h0&&(i[o++]=new d(t,""));for(var r=0,s=e.length;r=n){i[o++]=new d(n,l);break}i[o++]=new d(u,l)}}return i}function a(e,t){for(var n=0,i=[],r=0,s=0,a=t.length;s50){for(var h=u.type,p=Math.ceil(c/50),f=1;fu)C=!0;else if(9===y)C=!0;else if(32===y)if(a)if(_)C=!0;else{var b=v+1=r)&&(l[c++]=new d(v,"vs-whitespace"),m%=r):(v===f||C&&v>i)&&(l[c++]=new d(v,p),m%=r),9===y?m=r:m++,_=C,v===f&&(p=n[++h].type,f=n[h].endIndex)}return l[c++]=_?new d(t,"vs-whitespace"):new d(t,p),l}function l(e,t,n,o){o.sort(i.LineDecoration.compare);for(var r=i.LineDecorationsNormalizer.normalize(o),s=r.length,a=0,u=[],l=0,c=0,h=0,p=n.length;hc&&(c=v.startOffset,u[l++]=new d(c,m)),!(v.endOffset+1<=g)){c=g,u[l++]=new d(c,m+" "+v.className);break}c=v.endOffset+1,u[l++]=new d(c,m+" "+v.className),a++}g>c&&(c=g,u[l++]=new d(c,m))}return u}function c(e){for(var t=e.fontIsMonospace,n=e.containsForeignElements,i=e.lineContent,o=e.len,r=e.isOverflowing,s=e.parts,a=e.tabSize,u=e.containsRTL,l=e.spaceWidth,c=e.renderWhitespace,d=e.renderControlCharacters,h=new p(o+1,s.length),g=0,m=0,v=0,_="",y=0,C=s.length;y=0){for(var E=0,L="";g0&&(L+="→",E++,N--);N>0;)L+=" ",E++,N--;else L+="·",E++;v++}h.setPartLength(y,E),_+=t||n?''+L+"":''+L+""}else{for(var E=0,L="";g0;)L+=" ",E++,N--;break;case 32:L+=" ",E++;break;case 60:L+="<",E++;break;case 62:L+=">",E++;break;case 38:L+="&",E++;break;case 0:L+="�",E++;break;case 65279:case 8232:L+="�",E++;break;case 13:L+="​",E++;break;default:d&&x<32?(L+=String.fromCharCode(9216+x),E++):(L+=String.fromCharCode(x),E++)}v++}h.setPartLength(y,E),_+=u?''+L+"":''+L+""}}return h.setPartData(o,s.length-1,v),r&&(_+=""),_+="",new f(h,_,u,n)}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Boundary=1]="Boundary",e[e.All=2]="All"}(t.RenderWhitespace||(t.RenderWhitespace={}));var d=function(){return function(e,t){this.endIndex=e,this.type=t}}(),h=function(){function e(e,t,n,i,o,r,s,a,u,l,c,d){this.useMonospaceOptimizations=e,this.lineContent=t,this.mightContainRTL=n,this.fauxIndentLength=i,this.lineTokens=o,this.lineDecorations=r,this.tabSize=s,this.spaceWidth=a,this.stopRenderingLineAfter=u,this.renderWhitespace="all"===l?2:"boundary"===l?1:0,this.renderControlCharacters=c,this.fontLigatures=d}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineContent===e.lineContent&&this.mightContainRTL===e.mightContainRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&i.LineDecoration.equalsArr(this.lineDecorations,e.lineDecorations)&&n.ViewLineToken.equalsArr(this.lineTokens,e.lineTokens)},e}();t.RenderLineInput=h;!function(e){e[e.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",e[e.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",e[e.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",e[e.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"}(t.CharacterMappingConstants||(t.CharacterMappingConstants={}));var p=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._partLengths=new Uint16Array(t)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n){var i=(t<<16|n<<0)>>>0;this._data[e]=i},e.prototype.setPartLength=function(e,t){this._partLengths[e]=t},e.prototype.getPartLengths=function(){return this._partLengths},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var d=e.getPartIndex(l);return i-e.getCharIndex(l)<=(d!==e.getPartIndex(c)?n:e.getCharIndex(c))-i?r:s},e}();t.CharacterMapping=p;var f=function(){return function(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}();t.RenderLineOutput=f,t.renderViewLine=function(e){if(0===e.lineContent.length){var t=!1,n=" ";if(e.lineDecorations.length>0){for(var i=[],o=0,s=e.lineDecorations.length;o ')}return new f(new p(0,0),n,!1,t)}return c(r(e))};var g,m=function(){return function(e,t,n,i,o,r,s,a,u,l,c){this.fontIsMonospace=e,this.lineContent=t,this.len=n,this.isOverflowing=i,this.parts=o,this.containsForeignElements=r,this.tabSize=s,this.containsRTL=a,this.spaceWidth=u,this.renderWhitespace=l,this.renderControlCharacters=c}}();!function(e){e[e.LongToken=50]="LongToken"}(g||(g={}))}),define(d[221],h([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,o){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=o,this.visibleRange=new n.Range(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}return e.prototype.getViewLineRenderingData=function(e){return this._model.getViewLineRenderingData(this.visibleRange,e)},e.prototype.getDecorationsInViewport=function(){return this._model.getDecorationsInViewport(this.visibleRange)},e}();t.ViewportData=i}),define(d[222],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._heights=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,this._whitespaceId2Index={},this._lastWhitespaceId=0}return e.findInsertionIndex=function(e,t,n,i){for(var o=0,r=e.length;o>>1;t===e[s]?i=t&&(this._whitespaceId2Index[u]=l+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var n=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){n|=0;var i=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var o=this._whitespaceId2Index[i];if(this._afterLineNumbers[o]!==n){var r=this._ordinals[o],s=this._heights[o];this.removeWhitespace(t);var a=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,a,n,r,s),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n=e&&(this._whitespaceId2Index[o]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[o+1]>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this._whitespaces.getCount()>0},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this._whitespaces.getCount();-1===u?(u=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));var c=s,d=c,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),d-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){var v=c,_=c+o;(v<=f&&f<_||v>f)&&(g=m)}for(c+=o,p[m-r]=d,d+=o;i===m;)d+=n,c+=n,++u>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){a=m;break}}-1===g&&(g=a);var y=0|this.getVerticalOffsetForLineNumber(a),C=r,b=a;return Ct&&b--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:b}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t,n=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);t=n>=1?this._lineHeight*n:0;var i;return i=e>0?this._whitespaces.getAccumulatedHeight(e-1):0,t+i},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i,o=0,r=this._whitespaces.getCount()-1;if(r<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(r)+this._whitespaces.getHeightForWhitespaceIndex(r))return-1;for(;o=n+i)o=t+1;else{if(e>=n)return t;r=t}return o},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}();t.LinesLayout=i}),define(d[104],h([1,0,96]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=i;var o=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var i=this.values,o=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;var r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t,n,o,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,n=this.prefixSum[t],o=n-this.values[t],e=n))break;r=t+1}return new i(t,e-o)},e}();t.PrefixSumComputer=o;var r=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new o(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.getCount=function(){return this._actual.getCount()},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&tthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(u.MirrorModel),g=function(){function e(){this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!0,shouldMakePrettyDiff:!0});return i.TPromise.as(l.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!1,shouldMakePrettyDiff:!0});return i.TPromise.as(l.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n,r){var a=this._getModel(t);if(!a)return i.TPromise.as(n);for(var u,l=[],c=0,d=n;ce._diffLimit)l.push({range:p,text:f});else for(var v=s.stringDiff(m,f,!1),_=a.offsetAt(o.Range.lift(p).getStartPosition()),y=0,C=v;y=n,l=s,c=i.viewportHeight-s>=n,d=e.left;return d+t>i.scrollLeft+i.viewportWidth&&(d=i.scrollLeft+i.viewportWidth-t),dthis._contentWidth)return null;var s=e.top-i,a=e.top+this._lineHeight,u=r+this._contentLeft,l=n.getDomNodePagePosition(this._viewDomNode.domNode),c=l.top+s-n.StandardWindow.scrollY,d=l.top+a-n.StandardWindow.scrollY,h=l.left+u-n.StandardWindow.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=c>=22,g=d+i<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;if(h+t+20>p&&(h-=m=h-(p-t-20),u-=m),h<0){var m=h;h-=m,u-=m}return this._fixedOverflowWidgets&&(s=c,a=d,u=h),{aboveTop:s,fitsAbove:f,belowTop:a,fitsBelow:g,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new s(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e,t){var n=e.visibleRangeForPosition(t);if(!n)return null;var i=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new s(i,n.left)},e.prototype._prepareRenderWidget=function(e){var t=this;if(!this._position||!this._preference)return null;var n=this._context.model.validateModelPosition(this._position);if(!this._context.model.coordinatesConverter.modelPositionIsVisible(n))return null;for(var i=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n),r=null,a=function(){if(!r){var n=t._getTopLeft(e,i);if(n){var o=t.domNode.domNode,s=o.clientWidth,a=o.clientHeight;r=t.allowEditorOverflow?t._layoutBoxInPage(n,s,a,e):t._layoutBoxInViewport(n,s,a,e)}}},u=1;u<=2;u++)for(var l=0;lo?1:i.Range.compareRangesUsingStarts(e.range,t.range)});for(var u=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],d=u;d<=l;d++)c[d-u]="";this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s
    ',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++)n[h-o]+=l}},t.prototype._renderNormalDecorations=function(e,t,n){for(var r=String(this._lineHeight),s=e.visibleRange.startLineNumber,a=0,u=t.length;a';n[v]+=w}}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(n.DynamicViewOverlay);t.DecorationsOverlay=r}),define(d[113],h([1,0,67,279]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}();t.DecorationToRender=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++)i[o-e]=[];if(0===n.length)return i;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
    =this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(o);t.GlyphMarginOverlay=r}),define(d[233],h([1,0,113,288]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=t.length;o
    ',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,d=u.length;c';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(n.DedupOverlay);t.MarginViewLineDecorationsOverlay=i}),define(d[236],h([1,0,27,25,35,296]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var i=e.call(this,t)||this;return i._widgets={},i._verticalScrollbarWidth=i._context.configuration.editor.layoutInfo.verticalScrollbarWidth,i._minimapWidth=i._context.configuration.editor.layoutInfo.minimapWidth,i._horizontalScrollbarHeight=i._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,i._editorHeight=i._context.configuration.editor.layoutInfo.height,i._editorWidth=i._context.configuration.editor.layoutInfo.width,i._domNode=n.createFastDomNode(document.createElement("div")),o.PartFingerprints.write(i._domNode,4),i._domNode.setClassName("overlayWidgets"),i}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=n.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===i.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===i.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===i.OverlayWidgetPositionPreference.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getState(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.updateState({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getState();return new r.Viewport(e.scrollTop,e.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,n){return this._configuration.editor.wrappingInfo.isViewportWrapping?Math.max(e,n):Math.max(e+t.LINES_HORIZONTAL_EXTRA_PX,n)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.updateState({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getState(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.restoreState=function(e){var t=e.scrollTop;"number"!=typeof e.scrollTopWithoutViewZones||this._linesLayout.hasWhitespace()||(t=e.scrollTopWithoutViewZones),this.scrollable.updateState({scrollLeft:e.scrollLeft,scrollTop:t})},t.prototype.addWhitespace=function(e,t,n){return this._linesLayout.insertWhitespace(e,t,n)},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getState();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getState().scrollWidth},t.prototype.getScrollLeft=function(){return this.scrollable.getState().scrollLeft},t.prototype.getScrollHeight=function(){return this.scrollable.getState().scrollHeight},t.prototype.getScrollTop=function(){return this.scrollable.getState().scrollTop},t.prototype.setScrollPosition=function(e){this.scrollable.updateState(e)},t.LINES_HORIZONTAL_EXTRA_PX=30,t}(n.Disposable);t.ViewLayout=s}),define(d[240],h([1,0,2,12,86]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i){this.editorId=e,this.model=t,this.configuration=n,this._coordinatesConverter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(e){for(var t=e.changedDecorations,n=0,i=t.length;n1){v=new o.InlineDecoration(new n.Range(m.endLineNumber,m.endColumn-1,m.endLineNumber,m.endColumn),f.afterContentClassName,!0);l[m.endLineNumber-i].push(v)}}return{decorations:a,inlineDecorations:l}},e}();t.ViewModelDecorations=r}),define(d[241],h([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._selection=e,this._isMovingLeft=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;if(this._selectionId=t.trackSelection(i),i.startLineNumber===i.endLineNumber&&(!this._isMovingLeft||0!==i.startColumn)&&(this._isMovingLeft||i.endColumn!==e.getLineMaxColumn(i.startLineNumber))){var o,r,s,a=i.selectionStartLineNumber,u=e.getLineContent(a);this._isMovingLeft?(o=u.substring(0,i.startColumn-2),r=u.substring(i.startColumn-1,i.endColumn-1),s=u.substring(i.startColumn-2,i.startColumn-1)+u.substring(i.endColumn-1)):(o=u.substring(0,i.startColumn-1)+u.substring(i.endColumn-1,i.endColumn),r=u.substring(i.startColumn-1,i.endColumn-1),s=u.substring(i.endColumn));var l=o+r+s;t.addEditOperation(new n.Range(a,1,a,e.getLineMaxColumn(a)),null),t.addEditOperation(new n.Range(a,1,a,1),l),this._cutStartIndex=i.startColumn+(this._isMovingLeft?-1:1),this._cutEndIndex=this._cutStartIndex+i.endColumn-i.startColumn,this._moved=!0}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moved&&(n=(n=n.setStartPosition(n.startLineNumber,this._cutStartIndex)).setEndPosition(n.startLineNumber,this._cutEndIndex)),n},e}();t.MoveCaretCommand=i}),define(d[242],h([1,0,32,2]),function(e,t,n,i){"use strict";function o(e){return!!e.transparentFormatter}Object.defineProperty(t,"__esModule",{value:!0}),t.isAdvancedFormatter=o;var r=function(){function e(e,t,n,o,r,s,a){this.editorModel=s,this.colorFormatters=[],this._colorModelIndex=0,this.originalColor=e,this._opaqueFormatter=n,this.colorFormatters=r,this.color=t,this.hue=t.getHue(),this.saturation=t.getSaturation(),this.value=t.getValue(),this._colorRange=new i.Range(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn)}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=e.toRGBA().a;this._opacity||(this._opacity=t/255),this.saturation=e.getSaturation(),this.value=e.getValue(),1===this._opacity?this.selectedColorString=this._opaqueFormatter.toString(this._color):this._transparentFormatter?this.selectedColorString=this._transparentFormatter.toString(this._color):this.nextColorMode()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedColorString",{get:function(){return this._selectedColor},set:function(e){this._selectedColor!==e&&(this._selectedColor=e,this.widget&&this.widget.header&&this.widget.body&&(this.widget.header.updatePickedColor(),this.widget.body.fillOpacityOverlay(this._color),this.editorModel.pushEditOperations([],[{identifier:null,range:this._colorRange,text:e,forceMoveMarkers:!1}],function(){return[]}),this._colorRange=this._colorRange.setEndPosition(this._colorRange.endLineNumber,this._colorRange.startColumn+e.length)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hue",{get:function(){return this._hue},set:function(e){this._hue=e,this.widget&&this.widget.body&&this.widget.body.saturationBox.fillSaturationBox()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e;var t=this._color.toRGBA();this.color=n.Color.fromRGBA(new n.RGBA(t.r,t.g,t.b,255*e)),this.widget.header&&this.widget.header.updatePickedColor()},enumerable:!0,configurable:!0}),e.prototype.nextColorMode=function(){this._colorModelIndex++,this._colorModelIndex===this.colorFormatters.length&&(this._colorModelIndex=0);var e=this.colorFormatters[this._colorModelIndex];o(e)?(this._transparentFormatter=e.transparentFormatter,this._opaqueFormatter=e.opaqueFormatter,this.selectedColorString=1===this._opacity?this._opaqueFormatter.toString(this._color):this._transparentFormatter.toString(this._color)):this._transparentFormatter&&1!==this._opacity?this.nextColorMode():(this._transparentFormatter=null,this._opaqueFormatter=e,this.selectedColorString=this._opaqueFormatter.toString(this._color))},e.prototype.getHueColor=function(e){var t=e/60,i=1-Math.abs(t%2-1),o=0,r=0,s=0;return t>=0&&t<1?(o=1,r=i):t>=1&&t<2?(o=i,r=1):t>=2&&t<3?(r=1,s=i):t>=3&&t<4?(r=i,s=1):t>=4&&t<5?(o=i,s=1):(o=1,s=i),o=Math.round(255*o),r=Math.round(255*r),s=Math.round(255*s),n.Color.fromRGBA(new n.RGBA(o,r,s))},e}();t.ColorPickerModel=r;var s=function(){return function(){}}();t.ISaturationState=s}),define(d[243],h([1,0,4,3,83,15,32]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n.$,u=function(e){function t(t,i){var o=e.call(this)||this;return o.widget=t,o.model=i,o.pixelRatio=o.widget.editor.getConfiguration().pixelRatio,o.domNode=a(".colorpicker-body"),n.append(t.getDomNode(),o.domNode),o.drawSaturationBox(),o.drawOpacityStrip(),o.drawHueStrip(),o.registerListeners(),o}return f(t,e),t.prototype.fillOpacityOverlay=function(e){var t=e.toRGBA(),n=t.r,i=t.g,o=t.b;this.opacityOverlay.style.background="linear-gradient(to bottom, rgba("+n+", "+i+", "+o+", 1) 0%, rgba("+n+", "+i+", "+o+", 0) 100%)"},t.prototype.registerListeners=function(){var e=this,t=this._register(new o.GlobalMouseMoveMonitor);this._register(n.addDisposableListener(this.saturationBox.domNode,n.EventType.MOUSE_DOWN,function(n){e.saturationListener(n,t)})),this._register(n.addDisposableListener(this.hueStrip,n.EventType.MOUSE_DOWN,function(n){e.stripListener(e.hueStrip,n,t)})),this._register(n.addDisposableListener(this.opacityStrip,n.EventType.MOUSE_DOWN,function(n){e.stripListener(e.opacityStrip,n,t)}))},t.prototype.saturationListener=function(e,t){var n=this;if(0===e.button){var i,r,a=function(e,t){var i=n.saturationBox.extractColor(e,t).toRGBA();n.widget.model.color=s.Color.fromRGBA(new s.RGBA(i.r,i.g,i.b,255*n.widget.model.opacity)),n.saturationBox.focusSaturationSelection({x:e,y:t})};e.target!==this.saturationBox.saturationSelection?(i=e.offsetX,r=e.offsetY,a(i,r)):(i=this.widget.model.saturationSelection.x,r=this.widget.model.saturationSelection.y);var u=e.clientY,l=e.clientX;t.startMonitoring(o.standardMouseMoveMerger,function(e){var t=e.posx-l,n=e.posy-u;a(i+t,r+n)},function(){return null})}},t.prototype.stripListener=function(e,t,n){var i=this;if(0===t.button){var s=e===this.hueStrip?this.hueSlider:this.opacitySlider,a=e===this.hueStrip?this.hueStrip:this.opacityStrip;t.target!==this.hueStrip&&t.target!==this.opacityStrip||(s.top=t.offsetY);var u=function(){s===i.hueSlider?i.widget.model.hue=i.calculateSliderHue(s):s===i.opacitySlider&&(i.widget.model.opacity=i.calculateOpacity(s))};u();var l=t.clientY,c=t.clientX,d=s.top;n.startMonitoring(o.standardMouseMoveMerger,function(e){a.style.cursor="-webkit-grabbing";var t=Math.abs(e.posx-c);if(r.isWindows&&t>140)return s.top=0,void(s===i.hueSlider?i.widget.model.hue=0:s===i.opacitySlider&&(i.widget.model.opacity=1));var n=e.posy-l;s.top=d+n,u()},function(){a.style.cursor="-webkit-grab"})}},t.prototype.drawSaturationBox=function(){this.saturationBox=new l(this.model,this.domNode,this.pixelRatio)},t.prototype.drawOpacityStrip=function(){this.opacityStrip=a(".strip.opacity-strip"),n.append(this.domNode,this.opacityStrip),this.opacityOverlay=a(".opacity-overlay"),this.fillOpacityOverlay(this.model.color),n.append(this.opacityStrip,this.opacityOverlay),this.opacitySlider=new c(this.opacityStrip),this.opacitySlider.top=1===this.model.opacity?0:this.opacityStrip.offsetHeight*(1-this.model.opacity),n.append(this.opacityStrip,this.opacitySlider.domNode)},t.prototype.drawHueStrip=function(){this.hueStrip=a(".strip.hue-strip"),n.append(this.domNode,this.hueStrip),this.hueSlider=new c(this.hueStrip),n.append(this.hueStrip,this.hueSlider.domNode),this.hueSlider.top=(this.hueStrip.offsetHeight-this.hueSlider.domNode.offsetHeight)*(this.model.color.getHue()/359)},t.prototype.calculateSliderHue=function(e){var t=this.hueStrip.offsetHeight-e.domNode.offsetHeight;return 359*(1-(t-e.top)/t)},t.prototype.calculateOpacity=function(e){var t=this.opacityStrip.offsetHeight-e.domNode.offsetHeight;return(t-e.top)/t},t}(i.Disposable);t.ColorPickerBody=u;var l=function(){function e(e,t,i){this.model=e,this.pixelRatio=i,this.domNode=a(".saturation-wrap"),n.append(t,this.domNode),this.saturationCanvas=document.createElement("canvas"),this.saturationCanvas.className="saturation-box",n.append(this.domNode,this.saturationCanvas),this.saturationSelection=a(".saturation-selection"),n.append(this.domNode,this.saturationSelection)}return e.prototype.layout=function(){var e=this.domNode.offsetWidth*this.pixelRatio,t=this.domNode.offsetHeight*this.pixelRatio;this.saturationCanvas.width=e,this.saturationCanvas.height=t,this.saturationCtx=this.saturationCanvas.getContext("2d"),this.saturationCtx.rect(0,0,e,t);var n=document.createElement("canvas").getContext("2d");this.whiteGradient=n.createLinearGradient(0,0,e,0),this.whiteGradient.addColorStop(0,"rgba(255, 255, 255, 1)"),this.whiteGradient.addColorStop(1,"rgba(255, 255, 255, 0)"),this.blackGradient=n.createLinearGradient(0,0,0,t),this.blackGradient.addColorStop(0,"rgba(0, 0, 0, 0)"),this.blackGradient.addColorStop(1,"rgba(0, 0, 0, 1)"),this.fillSaturationBox();var i=this.model.saturation*this.saturationCanvas.clientWidth,o=this.model.value*this.saturationCanvas.clientHeight,r=0===o?this.saturationCanvas.clientHeight:this.saturationCanvas.clientHeight-o;this.focusSaturationSelection({x:i,y:r})},e.prototype.fillSaturationBox=function(){if(this.saturationCtx.fillStyle=this.calculateHueColor(this.model.hue).toString(),this.saturationCtx.fill(),this.saturationCtx.fillStyle=this.whiteGradient,this.saturationCtx.fill(),this.saturationCtx.fillStyle=this.blackGradient,this.saturationCtx.fill(),this.model.saturationSelection){var e=s.Color.fromHSV(this.model.hue,this.model.saturation,this.model.value,255*this.model.opacity);this.model.color=e}},e.prototype.focusSaturationSelection=function(e){var t=e.x,n=e.y;t<0?t=0:t>this.domNode.offsetWidth&&(t=this.domNode.offsetWidth),n<0?n=0:n>this.domNode.offsetHeight&&(n=this.domNode.offsetHeight),this.saturationSelection.style.left=t+"px",this.saturationSelection.style.top=n+"px",this.model.saturationSelection={x:t,y:n}},e.prototype.extractColor=function(e,t){var n=1-e/this.domNode.offsetWidth,i=t/this.domNode.offsetHeight,o=s.Color.fromRGBA(new s.RGBA(255,255,255,255*n));return s.Color.fromRGBA(new s.RGBA(0,0,0,255*i)).blend(o).blend(this.calculateHueColor(this.model.hue))},e.prototype.calculateHueColor=function(e){var t=e/60,n=1-Math.abs(t%2-1),i=0,o=0,r=0;return t>=0&&t<1?(i=1,o=n):t>=1&&t<2?(i=n,o=1):t>=2&&t<3?(o=1,r=n):t>=3&&t<4?(o=n,r=1):t>=4&&t<5?(i=n,r=1):(i=1,r=n),i=Math.round(255*i),o=Math.round(255*o),r=Math.round(255*r),s.Color.fromRGBA(new s.RGBA(i,o,r))},e}();t.SaturationBox=l;var c=function(){function e(e){this.strip=e,this.domNode=a(".slider"),this._top=0}return Object.defineProperty(e.prototype,"top",{get:function(){return this._top},set:function(e){e<0?e=0:e>this.strip.offsetHeight-this.domNode.offsetHeight&&(e=this.strip.offsetHeight-this.domNode.offsetHeight),this.domNode.style.top=e+"px",this._top=e},enumerable:!0,configurable:!0}),e}()}),define(d[244],h([1,0,4,3]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n.$,r=function(e){function t(t,i){var r=e.call(this)||this;return r.widget=t,r.model=i,r.domNode=o(".colorpicker-header"),n.append(t.getDomNode(),r.domNode),r.drawPickedColorBox(),r.drawOriginalColorBox(),n.addDisposableListener(r.pickedColorNode,n.EventType.CLICK,function(){0!==r.model.colorFormatters.length&&r.model.nextColorMode()}),r}return f(t,e),t.prototype.updatePickedColor=function(){this.pickedColorNode.textContent=this.model.selectedColorString,this.pickedColorNode.style.backgroundColor=this.model.color.toString()},t.prototype.drawPickedColorBox=function(){this.pickedColorNode=o(".picked-color"),this.pickedColorNode.style.backgroundColor=this.model.color.toString(),this.pickedColorNode.textContent=this.model.selectedColorString,n.append(this.domNode,this.pickedColorNode)},t.prototype.drawOriginalColorBox=function(){var e=o(".original-color");e.style.backgroundColor=this.model.originalColor,n.append(this.domNode,e)},t}(i.Disposable);t.ColorPickerHeader=r}),define(d[245],h([1,0,41,4,28,244,243,316]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i.$,u=function(e){function t(t,n){var i=e.call(this)||this;return i.model=t,i.editor=n,i.visible=!1,i._register(o.onDidChangeZoomLevel(function(){return i.layout()})),i.domNode=a(".editor-widget.colorpicker-widget"),i}return f(t,e),t.prototype.layout=function(){this.visible||(this.header=new r.ColorPickerHeader(this,this.model),this.body=new s.ColorPickerBody(this,this.model),this.visible=!0)},t.prototype.layoutSaturationBox=function(){this.body.saturationBox.layout()},t.prototype.dispose=function(){this.visible=!1,this.domNode=null,e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this.domNode},t.ID="editor.contrib.colorPickerWidget",t}(n.Widget);t.ColorPickerWidget=u}),define(d[246],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isColorDecorationOptions=function(e){return!(!e||!e.color)}}),define(d[247],h([1,0]),function(e,t){"use strict";function n(e){return function(){return e}}function i(e,t,n,i){var o=e;if(t||n){if(t>n)throw new Error("Color format range defined is not correct. Range start is bigger than end.");if(t===n)throw new Error("Color format range defined is not correct. Range start is the same as end.");o=o/i*(n-t)+t}return o}function o(e,t,n,o,u){return function(l){var c;switch(e){case"red":c=i(l.toRGBA().r,o,u,r);break;case"green":c=i(l.toRGBA().g,o,u,r);break;case"blue":c=i(l.toRGBA().b,o,u,r);break;case"alpha":c=i(l.toRGBA().a,o,u,r);break;case"hue":c=i(l.toHSLA().h,o,u,s);break;case"saturation":c=i(l.toHSLA().s,o,u,a);break;case"luminosity":c=i(l.toHSLA().l,o,u,a)}if(void 0===c)throw new Error(e+" is not supported as a color format.");var d;return"f"===n?(t=t||2,d=c.toFixed(t)):"x"===n||"X"===n?(2!==(d=i(c,o,u,r).toString(16)).length&&(d="0"+d),"X"===n&&(d=d.toUpperCase())):d=c.toFixed(0),d.toString()}}Object.defineProperty(t,"__esModule",{value:!0});var r=255,s=360,a=1,u=function(){function e(e){this.tree=[],this.parse(e)}return e.prototype.parse=function(t){for(var i=e.PATTERN.exec(t),r=0;null!==i;){var s=i.index;re.length)return!1;for(var o=0;od?u-1:u}},e}();t.LineCommentCommand=l}),define(d[251],h([1,0,22,2]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n}return e.prototype.getEditOperations=function(e,t){var o=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new i.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),o),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new n.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new n.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumbern&&(t=n),this._matchesPosition!==t&&(this._matchesPosition=t,r.matchesPosition=!0,s=!0),this._matchesCount!==n&&(this._matchesCount=n,r.matchesCount=!0,s=!0),void 0!==o&&(i.Range.equalsRange(this._currentMatch,o)||(this._currentMatch=o,r.currentMatch=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e.prototype.change=function(t,n,o){void 0===o&&(o=!0);var r={moveCursor:n,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},s=!1;void 0!==t.searchString&&this._searchString!==t.searchString&&(this._searchString=t.searchString,r.searchString=!0,s=!0),void 0!==t.replaceString&&this._replaceString!==t.replaceString&&(this._replaceString=t.replaceString,r.replaceString=!0,s=!0),void 0!==t.isRevealed&&this._isRevealed!==t.isRevealed&&(this._isRevealed=t.isRevealed,r.isRevealed=!0,s=!0),void 0!==t.isReplaceRevealed&&this._isReplaceRevealed!==t.isReplaceRevealed&&(this._isReplaceRevealed=t.isReplaceRevealed,r.isReplaceRevealed=!0,s=!0),void 0!==t.isRegex&&this._isRegex!==t.isRegex&&(this._isRegex=t.isRegex,r.isRegex=!0,s=!0),void 0!==t.wholeWord&&this._wholeWord!==t.wholeWord&&(this._wholeWord=t.wholeWord,r.wholeWord=!0,s=!0),void 0!==t.matchCase&&this._matchCase!==t.matchCase&&(this._matchCase=t.matchCase,r.matchCase=!0,s=!0),void 0!==t.searchScope&&(i.Range.equalsRange(this._searchScope,t.searchScope)||(this._searchScope=t.searchScope,r.searchScope=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e._CHANGED_EVENT="changed",e}();t.FindReplaceState=o}),define(d[254],h([1,0,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n}return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var i=[],o=0;o0;){if(e=r)break;var a=e.charCodeAt(i);if(36===a){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(48===a||38===a){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1);continue}if(49<=a&&a<=57){var u=a-48;if(i+1=r)break;switch(a=e.charCodeAt(i)){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic("\n",i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic("\t",i+1)}}}return t.finalize()}}),define(d[256],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="editor.contrib.folding"}),define(d[257],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeRanges=function(e){return e.getIndentRanges()},t.limitByIndent=function(e,t){if(e.length<=t)return e;var n=[];e.forEach(function(e){e.indent<1e3&&(n[e.indent]=(n[e.indent]||0)+1)});for(var i=n.length,o=0;o0){var u=r.modifyPosition(e.getStartPosition(),a);e=new i.Range(u.lineNumber,u.column,e.endLineNumber,e.endColumn),t=t.substring(a),s=s.substr(a)}var l=n.commonSuffixLength(t,s);if(l>0){var c=r.modifyPosition(e.getEndPosition(),-l);e=new i.Range(e.startLineNumber,e.startColumn,c.lineNumber,c.column),t=t.substring(0,t.length-l),s=s.substring(0,s.length-l)}return{text:t,range:e,forceMoveMarkers:o}},e}();t.EditOperationsCommand=o}),define(d[192],h([1,0,28,3,11,15,171]),function(e,t,n,i,o,r){"use strict";function s(e,t){return!!e[t]}function a(e){return"altKey"===e?r.isMacintosh?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):r.isMacintosh?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){return function(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=n.isIE||e.event.detail<=1}}();t.ClickLinkMouseEvent=u;var l=function(){return function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}();t.ClickLinkKeyboardEvent=l;var c=function(){function e(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();t.ClickLinkOptions=c;var d=function(e){function t(t){var n=e.call(this)||this;return n._onMouseMoveOrRelevantKeyDown=n._register(new o.Emitter),n.onMouseMoveOrRelevantKeyDown=n._onMouseMoveOrRelevantKeyDown.event,n._onExecute=n._register(new o.Emitter),n.onExecute=n._onExecute.event,n._onCancel=n._register(new o.Emitter),n.onCancel=n._onCancel.event,n._editor=t,n._opts=a(n._editor.getConfiguration().multiCursorModifier),n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._register(n._editor.onDidChangeConfiguration(function(e){if(e.multiCursorModifier){var t=a(n._editor.getConfiguration().multiCursorModifier);if(n._opts.equals(t))return;n._opts=t,n.lastMouseMoveEvent=null,n.hasTriggerKeyOnMouseDown=!1,n._onCancel.fire()}})),n._register(n._editor.onMouseMove(function(e){return n.onEditorMouseMove(new u(e,n._opts))})),n._register(n._editor.onMouseDown(function(e){return n.onEditorMouseDown(new u(e,n._opts))})),n._register(n._editor.onMouseUp(function(e){return n.onEditorMouseUp(new u(e,n._opts))})),n._register(n._editor.onKeyDown(function(e){return n.onEditorKeyDown(new l(e,n._opts))})),n._register(n._editor.onKeyUp(function(e){return n.onEditorKeyUp(new l(e,n._opts))})),n._register(n._editor.onMouseDrag(function(){return n.resetHandler()})),n._register(n._editor.onDidChangeCursorSelection(function(e){return n.onDidChangeCursorSelection(e)})),n._register(n._editor.onDidChangeModel(function(e){return n.resetHandler()})),n._register(n._editor.onDidChangeModelContent(function(){return n.resetHandler()})),n._register(n._editor.onDidScrollChange(function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&n.resetHandler()})),n}return f(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(i.Disposable);t.ClickLinkGesture=d}),define(d[195],h([1,0,18,10]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.IDLE=0]="IDLE",e[e.FIRST_WAIT=1]="FIRST_WAIT",e[e.SECOND_WAIT=2]="SECOND_WAIT",e[e.WAITING_FOR_ASYNC_COMPUTATION=3]="WAITING_FOR_ASYNC_COMPUTATION"}(o||(o={}));var r=function(){function e(e,t,i,o){var r=this;this._computer=e,this._state=0,this._firstWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerAsyncComputation()},this._getHoverTimeMillis()/2),this._secondWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerSyncComputation()},this._getHoverTimeMillis()/2),this._loadingMessageScheduler=new n.RunOnceScheduler(function(){return r._showLoadingMessage()},3*this._getHoverTimeMillis()),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=o}return e.prototype.getComputer=function(){return this._computer},e.prototype._getHoverTimeMillis=function(){return this._computer.getHoverTimeMillis?this._computer.getHoverTimeMillis():e.HOVER_TIME},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=this._computer.computeAsync().then(function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)},function(){return e._onError})):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):i.onUnexpectedError(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(){0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(),this._loadingMessageScheduler.schedule())},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}();t.HoverOperation=r}),define(d[196],h([1,0,4,12,25,41,63,3]),function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new s.DomScrollableElement(i._domNode,{}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,function(e){e.equals(9)&&i.hide()}),i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.onDidLayoutChange(function(e){return i.updateMaxHeight()}),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return f(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new i.Position(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[o.ContentWidgetPositionPreference.ABOVE,o.ContentWidgetPositionPreference.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=a.dispose(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(r.Widget);t.ContentHoverWidget=u;var l=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.addOverlayWidget(i),i}return f(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getConfiguration().lineHeight,r=n-i-(this._domNode.clientHeight-o)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(r.Widget);t.GlyphHoverWidget=l}),define(d[262],h([1,0,22]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new n.Selection(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new n.Selection(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)},e}();t.InPlaceReplaceCommand=i}),define(d[263],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSpaceCnt=function(e,t){for(var n=0,i=0;i1&&(i-=1,r=e.getLineMaxColumn(i)),t.addTrackedEditOperation(new n.Range(i,r,o,s),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new i.Selection(n.endLineNumber,this.restoreCursorToColumn,n.endLineNumber,this.restoreCursorToColumn)},e}();t.DeleteLinesCommand=o}),define(d[266],h([1,0,59,2]),function(e,t,n,i){"use strict";function o(e,t,n){var i=t.startLineNumber,o=t.endLineNumber;if(1===t.endColumn&&o--,i>=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}function r(e,t,r){var s=o(e,t,r);return s?n.EditOperation.replace(new i.Range(s.startLineNumber,1,s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var n=r(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=o(e,t,n);if(!i)return!1;for(var r=0,s=i.before.length;r0?t.show(e):t.hide()},function(e){t.hide()})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._options.glyphMarginHoverMessage},set:function(e){},enumerable:!0,configurable:!0}),e.prototype.show=function(e){this._currentLine=e.range.startLineNumber,this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[{options:this._options,range:_({},e.range,{endLineNumber:e.range.startLineNumber})}])},e.prototype.hide=function(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._futureFixes.cancel(),this._currentLine=void 0},e}();t.LightBulbWidget=a}),define(d[268],h([1,0,18,4,12,53,11]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t,n){this._onDidExecuteCodeAction=new s.Emitter,this.onDidExecuteCodeAction=this._onDidExecuteCodeAction.event,this._editor=e,this._contextMenuService=t,this._commandService=n}return e.prototype.show=function(e,t){var i=this,s=e.then(function(e){return e.map(function(e){return new r.Action(e.id,e.title,void 0,!0,function(){return n.always((t=i._commandService).executeCommand.apply(t,[e.id].concat(e.arguments)),function(){return i._onDidExecuteCodeAction.fire(void 0)});var t})})});this._contextMenuService.showContextMenu({getAnchor:function(){return o.Position.isIPosition(t)&&(t=i._toCoords(t)),t},getActions:function(){return s},onHide:function(){i._visible=!1}})},Object.defineProperty(e.prototype,"isVisible",{get:function(){return this._visible},enumerable:!0,configurable:!0}),e.prototype._toCoords=function(e){this._editor.revealPosition(e),this._editor.render();var t=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),n=i.getDomNodePagePosition(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}},e}();t.QuickFixContextMenu=a}),define(d[269],h([1,0,2,91,98,43]),function(e,t,n,i,o,r){"use strict";function s(e){var t=new u;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}function a(e,t){if(e instanceof l&&e.isEmpty)return null;if(!n.Range.containsPosition(e.range,t))return null;var i;if(e instanceof l){if(e.hasChildren)for(var o=0,r=e.children.length;o0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(u);t.NodeList=l;var c=function(e){function t(){var t=e.call(this)||this;return t.elements=new l,t.elements.parent=t,t}return f(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.open.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.close.end},enumerable:!0,configurable:!0}),t}(u);t.Block=c;var d=function(){return function(e,t,n){this.range=e,this.bracket=t,this.bracketType=n}}(),h=function(){return function(e,t,n){this.lineNumber=t,this.lineText=n,this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.type=e.tokenType,this.languageId=e.languageId}}(),p=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._lineText=null,this._advance()}return e.prototype._advance=function(){for(this._next=this._next?this._next.next():null;!this._next&&this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,s=e.lineText,a=e.type,u=e.startOffset,l=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=r.LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId));var c=this._cachedLanguageBrackets;if(!c||i.ignoreBracketsInToken(a))return new d(new n.Range(t,u+1,t,l+1),0,null);var h;do{if(h=o.BracketsUtils.findNextBracketInToken(c.forwardRegex,t,s,u,l)){var p=h.startColumn-1,f=h.endColumn-1;u0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.Dollar=0]="Dollar",e[e.Colon=1]="Colon",e[e.Comma=2]="Comma",e[e.CurlyOpen=3]="CurlyOpen",e[e.CurlyClose=4]="CurlyClose",e[e.Backslash=5]="Backslash",e[e.Forwardslash=6]="Forwardslash",e[e.Pipe=7]="Pipe",e[e.Int=8]="Int",e[e.VariableName=9]="VariableName",e[e.Format=10]="Format",e[e.EOF=11]="EOF"}(i=t.TokenType||(t.TokenType={}));var o=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:i.EOF,pos:this.pos,len:0};var t,n=this.pos,o=0,r=this.value.charCodeAt(n);if("number"==typeof(t=e._table[r]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(r)){t=i.Int;do{o+=1,r=this.value.charCodeAt(n+o)}while(e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:n,len:o}}if(e.isVariableCharacter(r)){t=i.VariableName;do{r=this.value.charCodeAt(n+ ++o)}while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:n,len:o}}t=i.Format;do{o+=1,r=this.value.charCodeAt(n+o)}while(!isNaN(r)&&void 0===e._table[r]&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=o,{type:t,pos:n,len:o}},e._table=(h={},h[36]=i.Dollar,h[58]=i.Colon,h[44]=i.Comma,h[123]=i.CurlyOpen,h[125]=i.CurlyClose,h[92]=i.Backslash,h[47]=i.Forwardslash,h[124]=i.Pipe,h),e}();t.Scanner=o;var r=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof s&&this._children[this._children.length-1]instanceof s?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),o=n.children.slice(0);o.splice.apply(o,[i,1].concat(t)),n._children=o,t.forEach(function(e){return e.parent=n})},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof c)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce(function(e,t){return e+t.toString()},"")},e.prototype.len=function(){return 0},e}();t.Marker=r;var s=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return f(t,e),t.prototype.toString=function(){return this.value},t.prototype.toTextmateString=function(){return this.value.replace(/\$|}|\\/g,"\\$&")},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(r);t.Text=s;var a=function(e){function t(t){var n=e.call(this)||this;return n.index=t,n}return f(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof u?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.toTextmateString=function(){return 0===this.children.length?"$"+this.index:this.choice?"${"+this.index+"|"+this.choice.toTextmateString()+"|}":"${"+this.index+":"+this.children.map(function(e){return e.toTextmateString()}).join("")+"}"},t.prototype.clone=function(){var e=new t(this.index);return e._children=this.children.map(function(e){return e.clone()}),e},t}(r);t.Placeholder=a;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return f(t,e),t.prototype.appendChild=function(e){return e instanceof s&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.toTextmateString=function(){return this.options.map(function(e){return e.value.replace(/\||,/g,"\\$&")}).join(",")},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(r);t.Choice=u;var l=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return f(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return void 0!==t&&(this._children=[new s(t)],!0)},t.prototype.toTextmateString=function(){return 0===this.children.length?"${"+this.name+"}":"${"+this.name+":"+this.children.map(function(e){return e.toTextmateString()}).join("")+"}"},t.prototype.clone=function(){var e=new t(this.name);return e._children=this.children.map(function(e){return e.clone()}),e},t}(r);t.Variable=l;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),Object.defineProperty(t.prototype,"placeholders",{get:function(){var e=this;return this._placeholders||(this._placeholders=[],this.walk(function(t){return t instanceof a&&e.placeholders.push(t),!0})),this._placeholders},enumerable:!0,configurable:!0}),t.prototype.offset=function(e){var t=0,n=!1;return this.walk(function(i){return i===e?(n=!0,!1):(t+=i.len(),!0)}),n?t:-1},t.prototype.fullLen=function(e){var t=0;return n([e],function(e){return t+=e.len(),!0}),t},t.prototype.enclosingPlaceholders=function(e){for(var t=[],n=e.parent;n;)n instanceof a&&t.push(n),n=n.parent;return t},t.prototype.resolveVariables=function(e){var t=this;return this.walk(function(n){return n instanceof l&&n.resolve(e)&&(t._placeholders=void 0),!0}),this},t.prototype.appendChild=function(t){return this._placeholders=void 0,e.prototype.appendChild.call(this,t)},t.prototype.replace=function(t,n){return this._placeholders=void 0,e.prototype.replace.call(this,t,n)},t.prototype.toTextmateString=function(){return this.children.reduce(function(e,t){return e+t.toTextmateString()},"")},t.prototype.clone=function(){var e=new t;return this._children=this.children.map(function(e){return e.clone()}),e},t.prototype.walk=function(e){n(this.children,e)},t}(r);t.TextmateSnippet=c;var d=function(){function e(){this._scanner=new o}return e.escape=function(e){return e.replace(/\$|}|\\/g,"\\$&")},e.prototype.text=function(e){return this.parse(e).toString()},e.prototype.parse=function(e,t,n){this._scanner.text(e),this._token=this._scanner.next();for(var i=new c;this._parse(i););var o=new Map,r=[];i.walk(function(e){return e instanceof a&&(e.isFinalTabstop?o.set(0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):r.push(e)),!0});for(var s=0,u=r;s0||n)&&i.appendChild(new a(0)),i},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(i.Backslash,!0))&&(t=this._accept(i.Dollar,!0)||this._accept(i.CurlyClose,!0)||this._accept(i.Backslash,!0)||t,e.appendChild(new s(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token;return this._accept(i.Dollar)&&(t=this._accept(i.VariableName,!0)||this._accept(i.Int,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new l(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token;if(!(this._accept(i.Dollar)&&this._accept(i.CurlyOpen)&&(t=this._accept(i.Int,!0))))return this._backTo(n);var o=new a(Number(t));if(this._accept(i.Colon))for(;;){if(this._accept(i.CurlyClose))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else{if(!this._accept(i.Pipe))return this._accept(i.CurlyClose)?(e.appendChild(o),!0):this._backTo(n);for(var r=new u;;){if(this._parseChoiceElement(r)){if(this._accept(i.Comma))continue;if(this._accept(i.Pipe)&&this._accept(i.CurlyClose))return o.appendChild(r),e.appendChild(o),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];;){if(this._token.type===i.Comma||this._token.type===i.Pipe)break;var o=void 0;if(!(o=(o=this._accept(i.Backslash,!0))?this._accept(i.Comma,!0)||this._accept(i.Pipe,!0)||o:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(o)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new s(n.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(i.Dollar)&&this._accept(i.CurlyOpen)&&(t=this._accept(i.VariableName,!0))))return this._backTo(n);var o=new l(t);if(!this._accept(i.Colon))return this._accept(i.CurlyClose)?(e.appendChild(o),!0):this._backTo(n);for(;;){if(this._accept(i.CurlyClose))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new s("${"+t+":")),o.children.forEach(e.appendChild,e),!0}},e.prototype._parseAnything=function(e){return this._token.type!==i.EOF&&(e.appendChild(new s(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}();t.SnippetParser=d;var h}),define(d[271],h([1,0,45,142,9]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this._model=e,this._selection=t}return e.prototype.resolve=function(e){var t=e.name;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){var r=this._model.getValueInRange(this._selection)||void 0;if(r&&this._selection.startLineNumber!==this._selection.endLineNumber){var s=this._model.getLineContent(this._selection.startLineNumber),a=o.getLeadingWhitespace(s,0,this._selection.startColumn-1),u=a;e.snippet.walk(function(t){return t!==e&&(t instanceof i.Text&&(u=o.getLeadingWhitespace(t.value.split(/\r\n|\r|\n/).pop())),!0)});var l=o.commonPrefixLength(u,a);r=r.replace(/(\r\n|\r|\n)(.*)/g,function(e,t,n){return""+t+u.substr(l)+n})}return r}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){var c=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return c&&c.word||void 0}if("TM_LINE_INDEX"===t)return String(this._selection.positionLineNumber-1);if("TM_LINE_NUMBER"===t)return String(this._selection.positionLineNumber);if("TM_FILENAME"===t)return n.basename(this._model.uri.fsPath);if("TM_DIRECTORY"===t){var d=n.dirname(this._model.uri.fsPath);return"."!==d?d:""}return"TM_FILEPATH"===t?this._model.uri.fsPath:void 0},e.VariableNames=Object.freeze({SELECTION:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0}),e}();t.EditorSnippetVariableResolver=r}),define(d[272],h([1,0,81]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(){}}();t.LineContext=i;var o=function(){function e(t,n,i,o){this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._lineContext=i,"top"===o?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return Object.defineProperty(e.prototype,"lineContext",{get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._lineContext=e,this._filteredItems=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._ensureCachedState(),this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incomplete",{get:function(){return this._ensureCachedState(),this._isIncomplete},enumerable:!0,configurable:!0}),e.prototype.resolveIncompleteInfo=function(){for(var e=[],t=[],n=0,i=this._items;nt.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===n.suggestion.type)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===n.suggestion.type)return 1}return e._compareCompletionItems(t,n)},e}();t.CompletionModel=o}),define(d[273],h([1,0,7,17,106,90,130,9]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,n){return c(e,t,n)}function l(e,t){for(var n=[],i=0,s=e.length;i")}return n.join("")}function c(e,t,n){for(var i=[],r=n.getInitialState(),a=0,u=e.length;a"),r=c.endState}return i.join("")}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(){}return e.colorizeElement=function(e,t,n,i){var o=(i=i||{}).theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(r){e.setTheme(o);var s=n.firstChild.nodeValue;n.className+="monaco-editor "+o;var a=function(e){n.innerHTML=e};return this.colorize(t,s,r,i).then(a,function(e){return console.error(e)},a)}console.error("Mode not detected")},e._tokenizationSupportChangedPromise=function(e){var t=null,o=function(){t&&(t.dispose(),t=null)};return new n.TPromise(function(n,r,s){t=i.TokenizationRegistry.onDidChange(function(t){t.changedLanguages.indexOf(e)>=0&&(o(),n(void 0))})},o)},e.colorize=function(e,t,o,r){a.startsWithUTF8BOM(t)&&(t=t.substr(1));var s=t.split(/\r\n|\r|\n/),c=e.getModeId(o);void 0===(r=r||{}).tabSize&&(r.tabSize=4),e.getOrCreateMode(c);var d=i.TokenizationRegistry.get(c);return d?n.TPromise.as(u(s,r.tabSize,d)):n.TPromise.any([this._tokenizationSupportChangedPromise(c),n.TPromise.timeout(500)]).then(function(e){var t=i.TokenizationRegistry.get(c);return t?u(s,r.tabSize,t):l(s,r.tabSize)})},e.colorizeLine=function(e,t,n,i){return void 0===i&&(i=4),o.renderViewLine(new o.RenderLineInput(!1,e,t,0,n,[],i,0,-1,"none",!1,!1)).html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainRTL(),o,n)},e}();t.Colorizer=d}),define(d[145],h([1,0]),function(e,t){"use strict";function n(e){return Array.isArray(e)}function i(e){return"string"==typeof e}function o(e){return!e}function r(e,t){return e.ignoreCase&&t?t.toLowerCase():t}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(t.MonarchBracket||(t.MonarchBracket={})),t.isFuzzyActionArr=n,t.isFuzzyAction=function(e){return!n(e)},t.isString=i,t.isIAction=function(e){return!i(e)},t.empty=o,t.fixCase=r,t.sanitize=function(e){return e.replace(/[&<>'"_]/g,"-")},t.log=function(e,t){console.log(e.languageId+": "+t)},t.throwError=function(e,t){throw new Error(e.languageId+": "+t)},t.substituteMatches=function(e,t,n,i,s){var a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,u=null;return t.replace(a,function(t,a,l,c,d,h,p,f,g){return o(l)?o(c)?!o(d)&&d0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null},t.stateExists=function(e,t){for(;t&&t.length>0;){if(e.stateNames[t])return!0;var n=t.lastIndexOf(".");t=n<0?null:t.substr(0,n)}return!1}}),define(d[275],h([1,0,26,145]),function(e,t,n,i){"use strict";function o(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;var n;for(n in t)if(t.hasOwnProperty(n)&&!e(t[n]))return!1;return!0}function r(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function s(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function a(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,function(n,o){var r="";return"string"==typeof e[o]?r=e[o]:e[o]&&e[o]instanceof RegExp?r=e[o].source:void 0===e[o]?i.throwError(e,"language definition does not contain attribute '"+o+"', used at: "+t):i.throwError(e,"attribute reference '"+o+"' must be a string, used at: "+t),i.empty(r)?"":"(?:"+r+")"});return new RegExp(t,e.ignoreCase?"i":"")}function u(e,t,n,i){if(i<0)return e;if(i=100){i-=100;var o=n.split(".");if(o.unshift(n),i=0&&(o.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?o.bracket=1:"@close"===n.bracket?o.bracket=-1:i.throwError(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)i.throwError(e,"the next state must be a string value in rule: "+t);else{var r=n.next;/^(@pop|@push|@popall)$/.test(r)||("@"===r[0]&&(r=r.substr(1)),r.indexOf("$")<0&&(i.stateExists(e,i.substituteMatches(e,r,"",[],""))||i.throwError(e,"the next state '"+n.next+"' is not defined in rule: "+t))),o.next=r}return"number"==typeof n.goBack&&(o.goBack=n.goBack),"string"==typeof n.switchTo&&(o.switchTo=n.switchTo),"string"==typeof n.log&&(o.log=n.log),"string"==typeof n.nextEmbedded&&(o.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),o}if(Array.isArray(n)){var s,a=[];for(s in n)n.hasOwnProperty(s)&&(a[s]=c(e,t,n[s]));return{group:a}}if(n.cases){var u,d=[];for(u in n.cases)if(n.cases.hasOwnProperty(u)){var h=c(e,t,n.cases[u]);"@default"===u||"@"===u||""===u?d.push({test:null,value:h,name:u}):"@eos"===u?d.push({test:function(e,t,n,i){return i},value:h,name:u}):d.push(l(e,t,u,h))}var p=e.defaultToken;return{test:function(e,t,n,i){var o;for(o in d)if(d.hasOwnProperty(o)&&(!d[o].test||d[o].test(e,t,n,i)))return d[o].value;return p}}}return i.throwError(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t),""}return{token:""}}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;"string"==typeof t?n=t:t instanceof RegExp?n=t.source:i.throwError(e,"rules must start with a match string or regular expression: "+this.name),this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=a(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=c(e,this.name,t)},e}();t.compile=function(e,t){function n(e,u,l){var c;for(c in l)if(l.hasOwnProperty(c)){var h=l[c],p=h.include;if(p)"string"!=typeof p&&i.throwError(o,"an 'include' attribute must be a string at: "+e),"@"===p[0]&&(p=p.substr(1)),t.tokenizer[p]||i.throwError(o,"include target '"+p+"' is not defined at: "+e),n(e+"."+p,u,t.tokenizer[p]);else{var f=new d(e);if(Array.isArray(h)&&h.length>=1&&h.length<=3)if(f.setRegex(a,h[0]),h.length>=3)if("string"==typeof h[1])f.setAction(a,{token:h[1],next:h[2]});else if("object"==typeof h[1]){var g=h[1];g.next=h[2],f.setAction(a,g)}else i.throwError(o,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);else f.setAction(a,h[1]);else h.regex||i.throwError(o,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e),h.name&&(f.name=s(h.name)),h.matchOnlyAtStart&&(f.matchOnlyAtLineStart=r(h.matchOnlyAtLineStart)),f.setRegex(a,h.regex),f.setAction(a,h.action);u.push(f)}}}if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");var o={};o.languageId=e,o.noThrow=!1,o.maxStack=100,o.start=s(t.start),o.ignoreCase=r(t.ignoreCase,!1),o.tokenPostfix=s(t.tokenPostfix,"."+o.languageId),o.defaultToken=s(t.defaultToken,"source",function(){i.throwError(o,"the 'defaultToken' must be a string")}),o.usesEmbedded=!1;var a=t;a.languageId=e,a.ignoreCase=o.ignoreCase,a.noThrow=o.noThrow,a.usesEmbedded=o.usesEmbedded,a.stateNames=t.tokenizer,a.defaultToken=o.defaultToken,t.tokenizer&&"object"==typeof t.tokenizer||i.throwError(o,"a language definition must define the 'tokenizer' attribute as an object"),o.tokenizer=[];var u;for(u in t.tokenizer)if(t.tokenizer.hasOwnProperty(u)){o.start||(o.start=u);var l=t.tokenizer[u];o.tokenizer[u]=new Array,n("tokenizer."+u,o.tokenizer[u],l)}o.usesEmbedded=a.usesEmbedded,t.brackets?Array.isArray(t.brackets)||i.throwError(o,"the 'brackets' attribute must be defined as an array"):t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var c=[];for(var h in t.brackets)if(t.brackets.hasOwnProperty(h)){var p=t.brackets[h];p&&Array.isArray(p)&&3===p.length&&(p={token:p[2],open:p[0],close:p[1]}),p.open===p.close&&i.throwError(o,"open and close brackets in a 'brackets' attribute must be different: "+p.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof p.open&&"string"==typeof p.token?c.push({token:s(p.token)+o.tokenPostfix,open:i.fixCase(o,s(p.open)),close:i.fixCase(o,s(p.close))}):i.throwError(o,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return o.brackets=c,o.noThrow=!0,o}}),define(d[276],h([1,0,17,145,97,68]),function(e,t,n,i,o,r){"use strict";function s(e,t){if(!t)return null;t=i.fixCase(e,t);for(var n=e.brackets,o=0;o=this._maxCacheDepth)return new u(e,t);var n=u.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i||(i=new u(e,t),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),u=function(){function e(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}return e.getStackElementId=function(e){for(var t="";null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t},e._equals=function(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t},e.prototype.equals=function(t){return e._equals(this,t)},e.prototype.push=function(e){return a.create(this,e)},e.prototype.pop=function(){return this.parent},e.prototype.popall=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.switchTo=function(e){return a.create(this.parent,e)},e}(),l=function(){function e(e,t){this.modeId=e,this.state=t}return e.prototype.equals=function(e){return this.modeId===e.modeId&&this.state.equals(e.state)},e.prototype.clone=function(){return this.state.clone()===this.state?this:new e(this.modeId,this.state)},e}(),c=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==t)return new d(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new d(e,t);var n=u.getStackElementId(e),i=this._entries[n];return i||(i=new d(e,null),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),d=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:c.create(this.stack,this.embeddedModeData)},e.prototype.equals=function(t){return t instanceof e&&(!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData)))},e}(),h=Object.hasOwnProperty,p=function(){function e(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return e.prototype.enterMode=function(e,t){this._language=t},e.prototype.emit=function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new o.Token(e,t,this._language)))},e.prototype.nestedModeTokenize=function(e,t,i){var o=t.modeId,r=t.state,s=n.TokenizationRegistry.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;var a=s.tokenize(e,r,i);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState},e.prototype.finalize=function(e){return new o.TokenizationResult(this._tokens,e)},e}(),f=function(){function e(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return e.prototype.enterMode=function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id},e.prototype.emit=function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))},e._merge=function(e,t,n){var i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;var s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(var a=0;a0&&i.nestedModeTokenize(s,t.embeddedModeData,n);var a=e.substring(o);return this._myTokenize(a,t,n+o,i)},e.prototype._myTokenize=function(e,t,n,o){o.enterMode(n,this._modeId);for(var r=e.length,a=t.embeddedModeData,u=t.stack,l=0,d=null,p=null,f=null,g=null;l=r)break;var L=this._lexer.tokenizer[y];L||(L=i.findRules(this._lexer,y))||i.throwError(this._lexer,"tokenizer state is not defined: "+y);W=e.substr(l);for(var x in L)if(h.call(L,x)){var N=L[x];if((0===l||!N.matchOnlyAtLineStart)&&(C=W.match(N.regex))){b=C[0],w=N.action;break}}}for(C||(C=[""],b=""),w||(l=this._lexer.maxStack?i.throwError(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]"):u=u.push(y);else if("@pop"===w.next)u.depth<=1?i.throwError(this._lexer,"trying to pop an empty stack in rule: "+S.name):u=u.pop();else if("@popall"===w.next)u=u.popall();else{var T=i.substituteMatches(this._lexer,w.next,b,C,y);"@"===T[0]&&(T=T.substr(1)),i.findRules(this._lexer,T)?u=u.push(T):i.throwError(this._lexer,"trying to set a next state '"+T+"' that is undefined in rule: "+S.name)}w.log&&"string"==typeof w.log&&i.log(this._lexer,this._lexer.languageId+": "+i.substituteMatches(this._lexer,w.log,b,C,y))}if(null===M&&i.throwError(this._lexer,"lexer rule has no well-defined action in rule: "+S.name),Array.isArray(M)){d&&d.length>0&&i.throwError(this._lexer,"groups cannot be nested: "+S.name),C.length!==M.length+1&&i.throwError(this._lexer,"matched number of groups does not match the number of actions in rule: "+S.name);for(var k=0,I=1;I=n.actionsList.children.length?n.actionsList.appendChild(i):n.actionsList.insertBefore(i,n.actionsList.children[r++]),n.items.push(s)})},t.prototype.pull=function(e){e>=0&&e=0){var n=void 0;e.equals(17)?n=(t+1)%s.length:e.equals(15)&&(n=0===t?s.length-1:t-1),e.equals(9)?s[t].blur():n>=0&&s[n].focus(),i.EventHelper.stop(e,!0)}}}),this.setInputWidth();var u=document.createElement("div");u.className="controls",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.showMessage=function(e){this.inputBox.showMessage(e)},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t.prototype.clearValidation=function(){this.inputBox.hideMessage()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.OPTION_CHANGE="optionChange",t}(r.Widget);t.FindInput=l}),define(d[290],h([6,8]),function(e,t){return e.create("vs/base/common/keybindingLabels",t)}),define(d[155],h([1,0,290]),function(e,t,n){"use strict";function i(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator)}function o(e,t,n,o,r){var s=i(e,t,r);return null!==o&&(s+=" ",s+=i(n,o,r)),s}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n,i,r){return null===t&&null===i?null:o(e,t,n,i,this.modifierLabels[r])},e}();t.ModifierLabelProvider=r,t.UILabelProvider=new r({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.localize(0,null),shiftKey:n.localize(1,null),altKey:n.localize(2,null),metaKey:n.localize(3,null),separator:"+"}),t.AriaLabelProvider=new r({ctrlKey:n.localize(4,null),shiftKey:n.localize(5,null),altKey:n.localize(6,null),metaKey:n.localize(7,null),separator:"+"},{ctrlKey:n.localize(8,null),shiftKey:n.localize(9,null),altKey:n.localize(10,null),metaKey:n.localize(11,null),separator:"+"}),t.ElectronAcceleratorLabelProvider=new r({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),t.UserSettingsLabelProvider=new r({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"})}),define(d[292],h([1,0,26,155,4,212]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o.$,s=function(){function e(e,t){this.os=t,this.domNode=o.append(e,r(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,n){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,n)||(this.keybinding=t,this.matches=n,this.render())},e.prototype.render=function(){if(o.clearNode(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],n=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),n&&(o.append(this.domNode,r("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,n,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,n){var o=i.UILabelProvider.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,o.ctrlKey,n&&n.ctrlKey,o.separator),t.shiftKey&&this.renderKey(e,o.shiftKey,n&&n.shiftKey,o.separator),t.altKey&&this.renderKey(e,o.altKey,n&&n.altKey,o.separator),t.metaKey&&this.renderKey(e,o.metaKey,n&&n.metaKey,o.separator);var r=t.keyLabel;r&&this.renderKey(e,r,n&&n.keyCode,"")},e.prototype.renderKey=function(e,t,n,i){o.append(e,r("span.monaco-keybinding-key"+(n?".highlight":""),null,t)),i&&o.append(e,r("span.monaco-keybinding-key-separator",null,i))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&n.equals(e.firstPart,t.firstPart)&&n.equals(e.chordPart,t.chordPart)},e}();t.KeybindingLabel=s}),define(d[293],h([6,8]),function(e,t){return e.create("vs/base/common/severity",t)}),define(d[36],h([1,0,293,9]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(o||(o={})),function(e){var t="error",o="warning",r="warn",s="info",a=Object.create(null);a[e.Error]=n.localize(0,null),a[e.Warning]=n.localize(1,null),a[e.Info]=n.localize(2,null),e.fromValue=function(n){return n?i.equalsIgnoreCase(t,n)?e.Error:i.equalsIgnoreCase(o,n)||i.equalsIgnoreCase(r,n)?e.Warning:i.equalsIgnoreCase(s,n)?e.Info:e.Ignore:e.Ignore},e.toString=function(e){return a[e]||i.empty},e.compare=function(e,t){return t-e}}(o||(o={})),t.default=o}),define(d[295],h([6,8]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenModel",t)}),define(d[120],h([1,0,295,7,29,81,9,45,162,229,75,110,4,292,15]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=0,v=function(){function e(){}return e.getLabel=function(e){return e.getLabel()},e.getResourcePath=function(e){var t=e.getResource();return t&&t.fsPath},e}(),_=function(){function e(e){void 0===e&&(e=[]),this.id=(m++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return this.getLabel()},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.getResource=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHidden=function(e){this.hidden=e},e.prototype.setHighlights=function(e,t,n){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=n},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e.compare=function(e,t,n){var i=e.getHighlights()[0]||[],o=t.getHighlights()[0]||[];if(i.length&&!o.length)return-1;if(!i.length&&o.length)return 1;var r=e.getLabel(),s=t.getLabel();if(r===s){var a=e.getResource(),u=t.getResource();a&&u&&(r=a.fsPath,s=u.fsPath)}return l.compareAnything(r,s,n)},e.compareByScore=function(e,t,n,i,o){return l.compareByScore(e,t,v,n,i,o)},e.highlight=function(e,t,n){void 0===n&&(n=!1);var i=[],o=[],u=s.stripWildcards(t),l=e.getLabel(),c=e.getDescription();if(e.getResource()){var d=e.getResource().fsPath;if(t.length===d.length&&t.toLowerCase()===d.toLowerCase())i.push({start:0,end:l.length}),o.push({start:0,end:c.length});else if(n||t.indexOf(a.nativeSep)>=0){var h=r.matchesFuzzy(t,l,n);if(h)i=h;else{var p=c?c+a.nativeSep:"",f=p.length,g=r.matchesFuzzy(t,p+l,n);g||t===u||(g=r.matchesFuzzy(u,p+l,n)),g&&g.forEach(function(e){e.startf?(i.push({start:0,end:e.end-f}),o.push({start:e.start,end:f})):e.start>=f?i.push({start:e.start-f,end:e.end-f}):o.push(e)})}}else i=r.matchesFuzzy(t,l)}else i=r.matchesFuzzy(t,l);return{labelHighlights:i,descriptionHighlights:o}},e.prototype.isFile=function(){return!1},e}();t.QuickOpenEntry=_;var y=function(e){function t(t,n,i){var o=e.call(this)||this;return o.entry=t,o.groupLabel=n,o.withBorder=i,o}return f(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getResource=function(){return this.entry?this.entry.getResource():e.prototype.getResource.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getEntry=function(){return this.entry},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,n,i){this.entry?this.entry.setHighlights(t,n,i):e.prototype.setHighlights.call(this,t,n,i)},t.prototype.setHidden=function(t){this.entry?this.entry.setHidden(t):e.prototype.setHidden.call(this,t)},t.prototype.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},t}(_);t.QuickOpenEntryGroup=y;var C=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.TPromise.as(null)},e.prototype.hasSecondaryActions=function(e,t){return!1},e.prototype.getSecondaryActions=function(e,t){return i.TPromise.as(null)},e.prototype.getActionItem=function(e,t,n){return null},e}(),b=function(){function e(e,t){void 0===e&&(e=new C),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof y?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,n){var i=document.createElement("div");h.addClass(i,"sub-content"),t.appendChild(i);var o=h.$(".quick-open-row"),r=h.$(".quick-open-row"),s=h.$(".quick-open-entry",null,o,r);i.appendChild(s);var a=document.createElement("span");o.appendChild(a);var l=new u.IconLabel(o,{supportHighlights:!0}),f=document.createElement("span");o.appendChild(f),h.addClass(f,"quick-open-entry-description");var m=new d.HighlightedLabel(f),v=document.createElement("span");o.appendChild(v),h.addClass(v,"quick-open-entry-keybinding");var _=new p.KeybindingLabel(v,g.OS),y=document.createElement("div");r.appendChild(y),h.addClass(y,"quick-open-entry-meta");var C,b=new d.HighlightedLabel(y);"quickOpenEntryGroup"===e&&(C=document.createElement("div"),h.addClass(C,"results-group"),t.appendChild(C)),h.addClass(t,"actions");var w=document.createElement("div");return h.addClass(w,"primary-action-bar"),t.appendChild(w),{container:t,entry:s,icon:a,label:l,detail:b,description:m,keybinding:_,group:C,actionBar:new c.ActionBar(w,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,n,i){var o=n;if(this.actionProvider.hasActions(null,e)?h.addClass(o.container,"has-actions"):h.removeClass(o.container,"has-actions"),o.actionBar.context=e,this.actionProvider.getActions(null,e).then(function(e){o.actionBar.isEmpty()&&e&&e.length>0?o.actionBar.push(e,{icon:!0,label:!1}):o.actionBar.isEmpty()||e&&0!==e.length||o.actionBar.clear()}),e instanceof y&&e.getGroupLabel()?h.addClass(o.container,"has-group-label"):h.removeClass(o.container,"has-group-label"),e instanceof y){var r=e,s=n;r.showBorder()?(h.addClass(s.container,"results-group-separator"),s.container.style.borderTopColor=i.pickerGroupBorder.toString()):(h.removeClass(s.container,"results-group-separator"),s.container.style.borderTopColor=null);var a=r.getGroupLabel()||"";s.group.textContent=a,s.group.style.color=i.pickerGroupForeground.toString()}if(e instanceof _){var u=e.getHighlights(),l=u[0],c=u[1],d=u[2],p=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";o.icon.className=p;var f=e.getLabelOptions()||Object.create(null);f.matches=l||[],o.label.setValue(e.getLabel(),null,f),o.detail.set(e.getDetail(),d),o.description.set(e.getDescription(),c||[]),o.description.element.title=e.getDescription(),o.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,n.entry=null,n.description.dispose(),n.description=null,n.keybinding.dispose(),n.keybinding=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null},e}(),w=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new C),this._entries=e,this._dataSource=this,this._renderer=new b(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.addEntries=function(e){o.isArray(e)&&(this._entries=this._entries.concat(e))},e.prototype.setEntries=function(e){o.isArray(e)&&(this._entries=e)},e.prototype.getEntries=function(e){return e?this._entries.filter(function(e){return!e.isHidden()}):this._entries},e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?n.localize(0,null,e.getAriaLabel()):n.localize(1,null)},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();t.QuickOpenModel=w}),define(d[297],h([6,8]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenWidget",t)}),define(d[298],h([6,8]),function(e,t){return e.create("vs/base/parts/tree/browser/treeDefaults",t)}),define(d[128],h([1,0,298,7,53,15,10,4,40]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l;!function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(l=t.ClickBehavior||(t.ClickBehavior={}));var c=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:u.createKeybinding(e,r.OS),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.equals(n.keybinding))return n.callback}return null},e}();t.KeybindingDispatcher=c;var d=function(){function e(e){void 0===e&&(e={clickBehavior:l.ON_MOUSE_UP,keyboardSupport:!0});var t=this;this.options=e,this.downKeyBindingDispatcher=new c,this.upKeyBindingDispatcher=new c,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(15,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(17,function(e,n){return t.onRight(e,n)}),r.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(300,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(302,function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(e,n)}),this.downKeyBindingDispatcher.set(14,function(e,n){return t.onHome(e,n)}),this.downKeyBindingDispatcher.set(13,function(e,n){return t.onEnd(e,n)}),this.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===l.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(a.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){return r.isMacintosh&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&((this.options.clickBehavior!==l.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n))},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var o={origin:i,originalEvent:n};return e.getInput()===t?(e.clearFocus(o),e.clearSelection(o)):(n&&n.browserEvent&&"mousedown"===n.browserEvent.type||n.preventDefault(),n.stopPropagation(),e.DOMFocus(),e.setSelection([t],o),e.setFocus(t,o),e.isExpanded(t)?e.collapse(t).done(null,s.onUnexpectedError):e.expand(t).done(null,s.onUnexpectedError)),!0},e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then(function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then(function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}();t.DefaultController=d;var h=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}();t.DefaultDragAndDrop=h;var p=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=p;var g=function(){function e(){}return e.prototype.compare=function(e,t,n){return 0},e}();t.DefaultSorter=g;var m=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=m;var v=function(e){function t(t,i){var o=e.call(this,"vs.tree.collapse",n.localize(0,null),"monaco-tree-action collapse-all",i)||this;return o.viewer=t,o}return f(t,e),t.prototype.run=function(e){return this.viewer.getHighlight()?i.TPromise.as(null):(this.viewer.collapseAll(),this.viewer.clearSelection(),this.viewer.clearFocus(),this.viewer.DOMFocus(),this.viewer.focusFirst(),i.TPromise.as(null))},t}(o.Action);t.CollapseAllAction=v}),define(d[161],h([1,0,128,38,466,238,107,11,3,32,26,261]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){return function(e,t,i){if(void 0===i&&(i={}),this.tree=e,this.configuration=t,this.options=i,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new n.DefaultController({clickBehavior:n.ClickBehavior.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof i.keyboardSupport||i.keyboardSupport}),this.dnd=t.dnd||new n.DefaultDragAndDrop,this.filter=t.filter||new n.DefaultFilter,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new n.DefaultAccessibilityProvider}}();t.TreeContext=d;var h={listFocusBackground:l.Color.fromHex("#073655"),listActiveSelectionBackground:l.Color.fromHex("#0E639C"),listActiveSelectionForeground:l.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:l.Color.fromHex("#094771"),listFocusAndSelectionForeground:l.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:l.Color.fromHex("#3F3F46"),listHoverBackground:l.Color.fromHex("#2A2D2E"),listDropBackground:l.Color.fromHex("#383B3D")},p=function(e){function t(t,n,i){void 0===i&&(i={});var s=e.call(this)||this;return s.toDispose=[],s._onDispose=new a.Emitter,s._onHighlightChange=new a.Emitter,s.toDispose.push(s._onDispose,s._onHighlightChange),s.container=t,s.configuration=n,s.options=i,c.mixin(s.options,h,!1),s.options.twistiePixels="number"==typeof s.options.twistiePixels?s.options.twistiePixels:32,s.options.showTwistie=!1!==s.options.showTwistie,s.options.indentPixels="number"==typeof s.options.indentPixels?s.options.indentPixels:12,s.options.alwaysFocused=!0===s.options.alwaysFocused,s.options.useShadows=!1!==s.options.useShadows,s.options.paddingOnRow=!1!==s.options.paddingOnRow,s.context=new d(s,n,i),s.model=new o.TreeModel(s.context),s.view=new r.TreeView(s.context,s.container),s.view.setModel(s.model),s.addEmitter(s.model),s.addEmitter(s.view),s.toDispose.push(s.model.addListener("highlight",function(){return s._onHighlightChange.fire()})),s}return f(t,e),t.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDOMBlur",{get:function(){return this.view&&this.view.onDOMBlur},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onHighlightChange",{get:function(){return this._onHighlightChange&&this._onHighlightChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose&&this._onDispose.event},enumerable:!0,configurable:!0}),t.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},t.prototype.layout=function(e){this.view.layout(e)},t.prototype.DOMFocus=function(){this.view.focus()},t.prototype.isDOMFocused=function(){return this.view.isFocused()},t.prototype.DOMBlur=function(){this.view.blur()},t.prototype.onVisible=function(){this.view.onVisible()},t.prototype.onHidden=function(){this.view.onHidden()},t.prototype.setInput=function(e){return this.model.setInput(e)},t.prototype.getInput=function(){return this.model.getInput()},t.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},t.prototype.expand=function(e){return this.model.expand(e)},t.prototype.expandAll=function(e){return this.model.expandAll(e)},t.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},t.prototype.collapseAll=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.model.collapseAll(e,t)},t.prototype.toggleExpansion=function(e){return this.model.toggleExpansion(e)},t.prototype.toggleExpansionAll=function(e){return this.model.toggleExpansionAll(e)},t.prototype.isExpanded=function(e){return this.model.isExpanded(e)},t.prototype.getExpandedElements=function(){return this.model.getExpandedElements()},t.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},t.prototype.getRelativeTop=function(e){var t=this.model.getItem(e);return this.view.getRelativeTop(t)},t.prototype.getScrollPosition=function(){return this.view.getScrollPosition()},t.prototype.setScrollPosition=function(e){this.view.setScrollPosition(e)},t.prototype.getContentHeight=function(){return this.view.getTotalHeight()},t.prototype.setHighlight=function(e,t){this.model.setHighlight(e,t)},t.prototype.getHighlight=function(){return this.model.getHighlight()},t.prototype.isHighlighted=function(e){return this.model.isFocused(e)},t.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},t.prototype.select=function(e,t){this.model.select(e,t)},t.prototype.selectRange=function(e,t,n){this.model.selectRange(e,t,n)},t.prototype.deselectRange=function(e,t,n){this.model.deselectRange(e,t,n)},t.prototype.selectAll=function(e,t){this.model.selectAll(e,t)},t.prototype.deselect=function(e,t){this.model.deselect(e,t)},t.prototype.deselectAll=function(e,t){this.model.deselectAll(e,t)},t.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},t.prototype.toggleSelection=function(e,t){this.model.toggleSelection(e,t)},t.prototype.isSelected=function(e){return this.model.isSelected(e)},t.prototype.getSelection=function(){return this.model.getSelection()},t.prototype.clearSelection=function(e){this.model.setSelection([],e)},t.prototype.selectNext=function(e,t,n){this.model.selectNext(e,t,n)},t.prototype.selectPrevious=function(e,t,n){this.model.selectPrevious(e,t,n)},t.prototype.selectParent=function(e,t){this.model.selectParent(e,t)},t.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},t.prototype.isFocused=function(e){return this.model.isFocused(e)},t.prototype.getFocus=function(){return this.model.getFocus()},t.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},t.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},t.prototype.focusParent=function(e){this.model.focusParent(e)},t.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},t.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},t.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},t.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},t.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},t.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},t.prototype.clearFocus=function(e){this.model.setFocus(null,e)},t.prototype.addTraits=function(e,t){this.model.addTraits(e,t)},t.prototype.removeTraits=function(e,t){this.model.removeTraits(e,t)},t.prototype.toggleTrait=function(e,t){this.model.hasTrait(e,t)?this.model.removeTraits(e,[t]):this.model.addTraits(e,[t])},t.prototype.hasTrait=function(e,t){return this.model.hasTrait(e,t)},t.prototype.getNavigator=function(e,t){return new s.MappedNavigator(this.model.getNavigator(e,t),function(e){return e&&e.getElement()})},t.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this.toDispose=u.dispose(this.toDispose),e.prototype.dispose.call(this)},t}(i.EventEmitter);t.Tree=p}),define(d[301],h([1,0,297,7,15,79,29,10,100,445,52,115,36,161,220,65,128,4,3,48,32,26,260]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C,b,w){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.onContextMenu=function(t,n,i){return o.isMacintosh?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(v.DefaultController);t.QuickOpenController=S;var E;!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(E=t.HideReason||(t.HideReason={}));var L={background:b.Color.fromHex("#1E1E1E"),foreground:b.Color.fromHex("#CCCCCC"),pickerGroupForeground:b.Color.fromHex("#0097FB"),pickerGroupBorder:b.Color.fromHex("#3F3F46"),widgetShadow:b.Color.fromHex("#000000"),progressBarBackground:b.Color.fromHex("#0E70C0")},x=n.localize(0,null),N=function(){function e(e,t,n,i){this.isDisposed=!1,this.toUnbind=[],this.container=e,this.callbacks=t,this.options=n,this.styles=n||Object.create(null),w.mixin(this.styles,L,!1),this.usageLogger=i,this.model=null}return e.prototype.getElement=function(){return c.$(this.builder)},e.prototype.getModel=function(){return this.model},e.prototype.setCallbacks=function(e){this.callbacks=e},e.prototype.create=function(){var e=this;return this.builder=c.$().div(function(t){t.on(_.EventType.KEY_DOWN,function(t){9===new m.StandardKeyboardEvent(t).keyCode&&(_.EventHelper.stop(t,!0),e.hide(E.CANCELED))}).on(_.EventType.CONTEXT_MENU,function(e){return _.EventHelper.stop(e,!0)}).on(_.EventType.FOCUS,function(t){return e.gainingFocus()},null,!0).on(_.EventType.BLUR,function(t){return e.loosingFocus(t)},null,!0),e.progressBar=new g.ProgressBar(t.clone(),{progressBarBackground:e.styles.progressBarBackground}),e.progressBar.getContainer().hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=new d.InputBox(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:x,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder}),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),_.addDisposableListener(e.inputBox.inputElement,_.EventType.KEY_DOWN,function(t){var n=new m.StandardKeyboardEvent(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===n.keyCode||i){_.EventHelper.stop(t,!0);var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?u.Mode.OPEN_IN_BACKGROUND:u.Mode.OPEN)}}),_.addDisposableListener(e.inputBox.inputElement,_.EventType.INPUT,function(t){e.onType()})}),e.treeContainer=t.div({class:"quick-open-tree"},function(t){e.tree=new p.Tree(t.getHTMLElement(),{dataSource:new l.DataSource(e),controller:new S({clickBehavior:v.ClickBehavior.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new l.Renderer(e,e.styles),filter:new l.Filter(e),accessibilityProvider:new l.AccessibilityProvider(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:C.ScrollbarVisibility.Visible,ariaLabel:n.localize(1,null),keyboardSupport:e.options.keyboardSupport}),e.treeElement=e.tree.getHTMLElement(),e.toUnbind.push(e.tree.addListener(r.EventType.FOCUS,function(t){e.elementFocused(t.focus,t)})),e.toUnbind.push(e.tree.addListener(r.EventType.SELECTION,function(t){t.selection&&t.selection.length>0&&e.elementSelected(t.selection[0],t)}))}).on(_.EventType.KEY_DOWN,function(t){var n=new m.StandardKeyboardEvent(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode)))}).on(_.EventType.KEY_UP,function(t){var n=new m.StandardKeyboardEvent(t),i=n.keyCode;if(e.quickNavigateConfiguration){var o=e.quickNavigateConfiguration.keybindings;if(3===i||o.some(function(e){var t=e.getParts(),o=t[0];return!t[1]&&(o.shiftKey&&4===i?!(n.ctrlKey||n.altKey||n.metaKey):!(!o.altKey||6!==i)||(!(!o.ctrlKey||5!==i)||!(!o.metaKey||57!==i)))})){var r=e.tree.getFocus();r&&e.elementSelected(r,t)}}}).clone()}).addClass("quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),this.builder.getHTMLElement()},e.prototype.style=function(e){this.styles=e,this.applyStyles()},e.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,n=this.styles.borderColor?this.styles.borderColor.toString():null,i=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",n),this.builder.style("border-width",n?"1px":null),this.builder.style("border-style",n?"solid":null),this.builder.style("box-shadow",i?"0 5px 8px "+i:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},e.prototype.shouldOpenInBackground=function(e){return 17===e.keyCode&&(!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&this.inputBox.inputElement.selectionEnd===this.inputBox.value.length)},e.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},e.prototype.navigate=function(e,t){this.isVisible()&&(!this.quickNavigateConfiguration&&t&&(this.quickNavigateConfiguration=t,this.tree.DOMFocus()),this.navigateInTree(e?18:16))},e.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],o=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();i.length>1&&o===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,a.onUnexpectedError)},e.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,u.Mode.PREVIEW,n)}},e.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||u.Mode.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}if(this.usageLogger){var s=this.model.entries.indexOf(e),a=this.model.entries.length;this.usageLogger.publicLog("quickOpenWidgetItemAccepted",{index:s,count:a,isQuickNavigate:!!this.quickNavigateConfiguration})}i&&this.hide(E.ELEMENT_SELECTED)},e.prototype.extractKeyMods=function(e){return e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey))?[2048]:[]},e.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.DOMFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||s.isString(e)?this.helpText.hide():this.helpText.show()),s.isString(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},e.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},e.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},e.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then(function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)}).done(function(){n.tree.layout(),e&&e.entries.some(function(t){return n.isElementVisible(e,t)})&&n.autoFocus(e,t)},a.onUnexpectedError)},e.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},e.prototype.autoFocus=function(e,t){var n=this;void 0===t&&(t={});var i=e.entries.filter(function(t){return n.isElementVisible(e,t)});if(t.autoFocusPrefixMatch){for(var o=void 0,r=void 0,s=t.autoFocusPrefixMatch,u=s.toLowerCase(),l=0;lt.autoFocusIndex&&(this.tree.focusNth(t.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):t.autoFocusSecondEntry?i.length>1&&this.tree.focusNth(1):t.autoFocusLastEntry&&i.length>1&&this.tree.focusLast()},e.prototype.refresh=function(e,t){var n=this;this.isVisible()&&(e||(e=this.tree.getInput()),e&&(this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.refresh().done(function(){n.tree.layout(),t&&t&&e&&e.entries.some(function(t){return n.isElementVisible(e,t)})&&n.autoFocus(e,t)},a.onUnexpectedError)))},e.prototype.getHeight=function(t){var n=this,i=t.renderer;if(!t){var o=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*o:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>e.MAX_ITEMS_HEIGHT)&&(r=e.MAX_ITEMS_HEIGHT);for(var a=t.entries.filter(function(e){return n.isElementVisible(t,e)}),u=this.options.maxItemsToShow||a.length,l=0;l=2?(S=v?g.Large:g.LargeBlocks,k=2/y):(S=v?g.Small:g.SmallBlocks,k=1/y),(E=Math.max(0,Math.floor((T-d)*k/(l+k))))/k>_&&(E=Math.floor(_*k)),L=T-E}else E=0,S=g.None,L=T;var I=Math.max(1,Math.floor((L-d)/l)),D=h?p:0;return{width:t,height:n,glyphMarginLeft:0,glyphMarginWidth:w,glyphMarginHeight:n,lineNumbersLeft:x,lineNumbersWidth:C,lineNumbersHeight:n,decorationsLeft:N,decorationsWidth:u,decorationsHeight:n,contentLeft:M,contentWidth:L,contentHeight:n,renderMinimap:S,minimapWidth:E,viewportColumn:I,verticalScrollbarWidth:d,horizontalScrollbarHeight:f,overviewRuler:{top:D,width:d,height:n-2*D,right:0}}},e}();t.EditorLayoutProvider=S;t.EDITOR_FONT_DEFAULTS={fontFamily:i.isMacintosh?"Menlo, Monaco, 'Courier New', monospace":i.isLinux?"'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:i.isMacintosh?12:14,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:r.USUAL_WORD_SEPARATORS,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:m.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",accessibilitySupport:"auto",viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:n.localize(1,null),renderLineNumbers:!0,renderCustomLineNumbers:null,renderRelativeLineNumbers:!1,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:v.Blink,mouseWheelZoom:!1,cursorStyle:y.Line,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,renderLineHighlight:"line",scrollbar:{vertical:o.ScrollbarVisibility.Auto,horizontal:o.ScrollbarVisibility.Auto,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:!0,links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,snippetSuggestions:"inline",wordBasedSuggestions:!0,suggestFontSize:0,suggestLineHeight:0,selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1}}}}),define(d[132],h([1,0,15,135,49]),function(e,t,n,i,o){"use strict";function r(e,t){if("number"==typeof e)return e;var n=parseFloat(e);return isNaN(n)?t:n}function s(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?t:n}function a(e,t,n){return en?n:e}function u(e,t){return"string"!=typeof e?t:e}Object.defineProperty(t,"__esModule",{value:!0});var l=n.isMacintosh?1.5:1.35,c=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){var c=u(t.fontFamily,o.EDITOR_FONT_DEFAULTS.fontFamily),d=u(t.fontWeight,o.EDITOR_FONT_DEFAULTS.fontWeight),h=r(t.fontSize,o.EDITOR_FONT_DEFAULTS.fontSize);0===(h=a(h,0,100))?h=o.EDITOR_FONT_DEFAULTS.fontSize:h<8&&(h=8);var p=s(t.lineHeight,0);0===(p=a(p,0,150))?p=Math.round(l*h):p<8&&(p=8);var f=r(t.letterSpacing,0);f=a(f,-20,20);var g=1+.1*i.EditorZoom.getZoomLevel();return h*=g,p*=g,new e({zoomLevel:n,fontFamily:c,fontWeight:d,fontSize:h,lineHeight:p,letterSpacing:f})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}();t.BareFontInfo=c;var d=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i}return f(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(c);t.FontInfo=d}),define(d[93],h([1,0,38,9,12,2,20,118,482,49,104,481,158,101,55]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LONG_LINE_BOUNDARY=1e4;var g=function(){function e(t,i){this._eventEmitter=new n.OrderGuaranteeEventEmitter;var o=e.resolveCreationData(t,i);this._isTooLargeForTokenization=o.text.length>e.MODEL_TOKENIZATION_LIMIT||o.text.lines.length>e.MANY_MANY_LINES,this._shouldSimplifyMode=this._isTooLargeForTokenization||o.text.length>e.MODEL_SYNC_LIMIT,this._options=new s.TextModelResolvedOptions(o.options),this._constructLines(o.text),this._setVersionId(1),this._isDisposed=!1,this._isDisposing=!1}return e.createFromString=function(t,n){return void 0===n&&(n=e.DEFAULT_CREATION_OPTIONS),new e(p.RawTextSource.fromString(t),n)},e.resolveCreationData=function(e,t){var n,i=p.TextSource.fromRawTextSource(e,t.defaultEOL);if(t.detectIndentation){var o=u.guessIndentation(i.lines,t.tabSize,t.insertSpaces);n=new s.TextModelResolvedOptions({tabSize:o.tabSize,insertSpaces:o.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}else n=new s.TextModelResolvedOptions({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL});return{text:i,options:n}},e.prototype.addBulkListener=function(e){return this._eventEmitter.addBulkListener(e)},e.prototype._createModelLine=function(e,t){return this._isTooLargeForTokenization?new a.MinimalModelLine(e,t):new a.ModelLine(e,t)},e.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},e.prototype.isTooLargeForHavingARichMode=function(){return this._shouldSimplifyMode},e.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},e.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},e.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new s.TextModelResolvedOptions({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var r=this._options.createChangeEvent(o);if(this._options=o,r.tabSize)for(var a=this._options.tabSize,u=0,l=this._lines.length;u=t.LONG_LINE_BOUNDARY?r+=i:o+=i;return r>o},e.prototype.getLineCount=function(){return this._assertNotDisposed(),this._lines.length},e.prototype.getLineContent=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text},e.prototype.getIndentLevel=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].getIndentLevel()},e.prototype._resetIndentRanges=function(){this._indentRanges=null},e.prototype._getIndentRanges=function(){return this._indentRanges||(this._indentRanges=d.computeRanges(this)),this._indentRanges},e.prototype.getIndentRanges=function(){this._assertNotDisposed();var e=this._getIndentRanges();return d.IndentRange.deepCloneArr(e)},e.prototype._toValidLineIndentGuide=function(e,t){var n=this._lines[e-1].getIndentLevel();if(-1===n)return t;var i=Math.ceil(n/this._options.tabSize);return Math.min(i,t)},e.prototype.getLineIndentGuide=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");for(var t=this._getIndentRanges(),n=t.length-1;n>=0;n--){var i=t[n];if(i.startLineNumber===e)return this._toValidLineIndentGuide(e,Math.ceil(i.indent/this._options.tabSize));if(i.startLineNumber0;)(i=t[--n]).endLineNumber+1===e&&(o=i.indent);return this._toValidLineIndentGuide(e,Math.ceil(o/this._options.tabSize))}}return 0},e.prototype.getLinesContent=function(){this._assertNotDisposed();for(var e=[],t=0,n=this._lines.length;tthis.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text.length+1},e.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.firstNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+1},e.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.lastNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+2},e.prototype.validateLineNumber=function(e){return this._assertNotDisposed(),e<1&&(e=1),e>this._lines.length&&(e=this._lines.length),e},e.prototype._validatePosition=function(e,t,n){var r=Math.floor("number"==typeof e?e:1),s=Math.floor("number"==typeof t?t:1);if(r<1)return new o.Position(1,1);if(r>this._lines.length)return new o.Position(this._lines.length,this.getLineMaxColumn(this._lines.length));if(s<=1)return new o.Position(r,1);var a=this.getLineMaxColumn(r);if(s>=a)return new o.Position(r,a);if(n){var u=this._lines[r-1].text.charCodeAt(s-2);if(i.isHighSurrogate(u))return new o.Position(r,s-1)}return new o.Position(r,s)},e.prototype.validatePosition=function(e){return this._assertNotDisposed(),this._validatePosition(e.lineNumber,e.column,!0)},e.prototype.validateRange=function(e){this._assertNotDisposed();var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),o=t.lineNumber,s=t.column,a=n.lineNumber,u=n.column,l=this._lines[o-1].text,c=this._lines[a-1].text,d=s>1?l.charCodeAt(s-2):0,h=u>1&&u<=c.length?c.charCodeAt(u-2):0,p=i.isHighSurrogate(d),f=i.isHighSurrogate(h);return p||f?o===a&&s===u?new r.Range(o,s-1,a,u-1):p&&f?new r.Range(o,s-1,a,u+1):p?new r.Range(o,s-1,a,u):new r.Range(o,s,a,u+1):new r.Range(o,s,a,u)},e.prototype.modifyPosition=function(e,t){return this._assertNotDisposed(),this.getPositionAt(this.getOffsetAt(e)+t)},e.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new r.Range(1,1,e,this.getLineMaxColumn(e))},e.prototype._emitModelRawContentChangedEvent=function(e){this._isDisposing||this._eventEmitter.emit(f.TextModelEventType.ModelRawContentChanged2,e)},e.prototype._constructLines=function(e){for(var t=this._options.tabSize,n=e.lines,i=new Array(n.length),o=0,r=n.length;ot.endLineNumber||i.lineNumber===t.endLineNumber&&i.column>t.endColumn?new c(e.selectionStart,e.selectionStartLeftoverVisibleColumns,new n.Position(t.endLineNumber,t.endColumn),0):null},e.prototype.equals=function(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.viewState)},e}();t.CursorState=h;var p=function(){return function(e,t){this.commands=e,this.shouldPushStackElementBefore=t.shouldPushStackElementBefore,this.shouldPushStackElementAfter=t.shouldPushStackElementAfter}}();t.EditOperationResult=p;var f=function(){function e(){}return e.isLowSurrogate=function(e,t,n){var o=e.getLineContent(t);return!(n<0||n>=o.length)&&i.isLowSurrogate(o.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var o=e.getLineContent(t);return!(n<0||n>=o.length)&&i.isHighSurrogate(o.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var o=0,r=0;r=t)return s-ts?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}();t.CursorColumns=f}),define(d[167],h([1,0,9,39,2,22,43]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.prevTabStop(o,n)/n},e.shiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.nextTabStop(o,n)/n},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,r){var a=this._selection.startLineNumber,u=this._selection.endLineNumber;1===this._selection.endColumn&&a!==u&&(u-=1);var l=this._opts.tabSize,c=this._opts.oneIndent,d=a===u;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var h=["",c],p=0,f=0,g=a;g<=u;g++,p=f){f=0;var m=t.getLineContent(g),v=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(d||this._opts.isUnshift||0!==m.length)){if(-1===v&&(v=m.length),g>1&&i.CursorColumns.visibleColumnFromColumn(m,v+1,l)%l!=0){var _=s.LanguageConfigurationRegistry.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(_){if(f=p,_.appendText)for(var y=0,C=_.appendText.length;ya,d=s>u,h=su)continue;if(ys)continue;if(_1&&o--,this.columnSelect(e,t,n.selection,i,o)},e.columnSelectRight=function(e,t,i,r,s){for(var a=0,u=Math.min(i.position.lineNumber,r),l=Math.max(i.position.lineNumber,r),c=u;c<=l;c++){var d=t.getLineMaxColumn(c),h=o.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(c,d));a=Math.max(a,h)}return st.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r)},e}();t.ColumnSelection=r}),define(d[169],h([1,0,39,12,2]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}();t.CursorPosition=r;var s=function(){function e(){}return e.left=function(e,t,i,o){return o>t.getLineMinColumn(i)?n.CursorColumns.isLowSurrogate(t,i,o-2)?o-=2:o-=1:i>1&&(i-=1,o=t.getLineMaxColumn(i)),new r(i,o,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.right=function(e,t,i,o){return oc?(i=c,u?o=t.getLineMaxColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),s=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new r(i,o,s)},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateDown=function(t,r,s){var a=s.selection,u=e.down(t,r,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.down(t,r,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new o.Range(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new i.Position(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.up=function(e,t,i,o,s,a,u){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+s;return(i-=a)<1?(i=1,u?o=t.getLineMinColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),s=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new r(i,o,s)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateUp=function(t,r,s){var a=s.selection,u=e.up(t,r,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.up(t,r,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new o.Range(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new i.Position(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0)},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}();t.MoveOperations=s}),define(d[170],h([1,0,73,39,2,169,9]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.deleteRight=function(e,t,i){for(var s=[],a=!1,u=0,l=i.length;u1){var g=t.getLineContent(f.lineNumber),m=s.firstNonWhitespaceIndex(g),v=-1===m?g.length+1:m+1;if(f.column<=v){var _=i.CursorColumns.visibleColumnFromColumn2(e,t,f),y=i.CursorColumns.prevTabStop(_,e.tabSize),C=i.CursorColumns.columnFromVisibleColumn2(e,t,f.lineNumber,y);p=new o.Range(f.lineNumber,C,f.lineNumber,f.column)}else p=new o.Range(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var b=r.MoveOperations.left(e,t,f.lineNumber,f.column);p=new o.Range(b.lineNumber,b.column,f.lineNumber,f.column)}}p.isEmpty()?u[c]=null:(p.startLineNumber!==p.endLineNumber&&(l=!0),u[c]=new n.ReplaceCommand(p,""))}return[l,u]},e.cut=function(e,t,r){for(var s=[],a=0,u=r.length;a1?(d=c.lineNumber-1,h=t.getLineMaxColumn(c.lineNumber-1),p=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,h=1,p=c.lineNumber,f=t.getLineMaxColumn(c.lineNumber));var g=new o.Range(d,h,p,f);g.isEmpty()?s[a]=null:s[a]=new n.ReplaceCommand(g,"")}else s[a]=null;else s[a]=new n.ReplaceCommand(l,"")}return new i.EditOperationResult(s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}();t.DeleteOperations=a}),define(d[119],h([1,0,10,73,39,2,9,167,43,60,441,94]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],o=0,r=n.length;o1){var d=i-1;for(d=i-1;d>=1;d--){var h=n.getLineContent(d);if(s.lastNonWhitespaceIndex(h)>=0)break}if(d<1)return null;var p=n.getLineMaxColumn(d),f=u.LanguageConfigurationRegistry.getEnterAction(n,new r.Range(d,p,d,p));f&&(a=f.indentation,(o=f.enterAction)&&(a+=o.appendText))}return o&&(o===l.IndentAction.Indent&&(a=e.shiftIndent(t,a)),o===l.IndentAction.Outdent&&(a=e.unshiftIndent(t,a)),a=t.normalizeIndentation(a)),a||null},e._replaceJumpToNextIndent=function(e,t,n,r){var s="",a=n.getStartPosition();if(e.insertSpaces)for(var u=o.CursorColumns.visibleColumnFromColumn2(e,t,a),l=e.tabSize,c=l-u%l,d=0;d=0?c.setEndPosition(c.endLineNumber,Math.max(c.endColumn,L+1)):c.setEndPosition(c.endLineNumber,n.getLineMaxColumn(c.endLineNumber)),a)return new i.ReplaceCommandWithoutChangingPosition(c,S+t.normalizeIndentation(_.afterEnter),!0);var x=0;return w<=L+1&&(t.insertSpaces||(b=Math.ceil(b/t.tabSize)),x=Math.min(b+1-t.normalizeIndentation(_.afterEnter).length-1,0)),new i.ReplaceCommandWithOffsetCursorState(c,S+t.normalizeIndentation(_.afterEnter),0,x,!0)}return e._typeCommand(c,"\n"+t.normalizeIndentation(C),a)},e._runAutoIndentType=function(t,n,i,o){var s=u.LanguageConfigurationRegistry.getIndentationAtPosition(n,i.startLineNumber,i.startColumn),a=u.LanguageConfigurationRegistry.getIndentActionForType(n,i,o,{shiftIndent:function(n){return e.shiftIndent(t,n)},unshiftIndent:function(n){return e.unshiftIndent(t,n)}});if(null===a)return null;if(a!==t.normalizeIndentation(s)){var l=n.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===l?e._typeCommand(new r.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(a)+o,!1):e._typeCommand(new r.Range(i.startLineNumber,0,i.endLineNumber,i.endColumn),t.normalizeIndentation(a)+n.getLineContent(i.startLineNumber).substring(l-1,i.startColumn-1)+o,!1)}return null},e._isAutoClosingCloseCharType=function(e,t,n,i){if(!e.autoClosingBrackets||!e.autoClosingPairsClose.hasOwnProperty(i))return!1;for(var o=0,r=n.length;o1){var h=d.getMapForWordSeparators(e.wordSeparators),p=c.charCodeAt(l.column-2);if(0===h.get(p))return!1}var f=c.charAt(l.column-1);if(f){var g=e.autoClosingPairsOpen[o]===o,m=!1;for(var v in e.autoClosingPairsClose){var _=e.autoClosingPairsOpen[v]===v;if((g||!_)&&f===v){m=!0;break}}if(!m&&!/\s/.test(f))return!1}t.forceTokenization(l.lineNumber);var y=t.getLineTokens(l.lineNumber),C=!1;try{C=u.LanguageConfigurationRegistry.shouldAutoClosePair(o,y,l.column)}catch(e){n.onUnexpectedError(e)}if(!C)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,r){for(var s=[],a=0,u=n.length;a=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,o,r){var s=o.lineNumber,a=o.column;1===a&&s>1&&(s-=1,a=n.getLineMaxColumn(s));var u=e._findPreviousWordOnLine(t,n,new i.Position(s,a));return 0===r?a=u?u.start+1:1:(u&&a<=u.end+1&&(u=e._findPreviousWordOnLine(t,n,new i.Position(s,u.start+1))),a=u?u.end+1:1),new i.Position(s,a)},e.moveWordRight=function(t,n,o,r){var s=o.lineNumber,a=o.column;a===n.getLineMaxColumn(s)&&s=u.start+1&&(u=e._findNextWordOnLine(t,n,new i.Position(s,u.end+1))),a=u?u.start+1:n.getLineMaxColumn(s)),new i.Position(s,a)},e._deleteWordLeftWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-2,o=r.lastNonWhitespaceIndex(n,i);return o+11?c=1:(l--,c=n.getLineMaxColumn(l)):(h&&c<=h.end+1&&(h=e._findPreviousWordOnLine(t,n,new i.Position(l,h.start+1))),h?c=h.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new s.Range(l,c,u.lineNumber,u.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=f.start+1&&(f=e._findNextWordOnLine(t,n,new i.Position(l,f.end+1))),f?c=f.start+1:cc&&(d=c,h=e.model.getLineMaxColumn(d)),n.CursorState.fromModelState(new n.SingleCursorState(new o.Range(u.lineNumber,1,d,h),0,new i.Position(d,h),0))}var p=t.modelState.selectionStart.getStartPosition().lineNumber;if(u.lineNumberp){var c=e.viewModel.getLineCount(),f=l.lineNumber+1,g=1;return f>c&&(f=c,g=e.viewModel.getLineMaxColumn(f)),n.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(),f,g,0))}var m=t.modelState.selectionStart.getEndPosition();return n.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,i,o){var r=e.model.validatePosition(o);return n.CursorState.fromModelState(s.WordOperations.word(e.config,e.model,t.modelState,i,r))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new n.CursorState(t.modelState,t.viewState);var r=t.viewState.position.lineNumber,s=t.viewState.position.column;return n.CursorState.fromViewState(new n.SingleCursorState(new o.Range(r,s,r,s),0,new i.Position(r,s),0))},e.moveTo=function(e,t,o,r,s){var a=e.model.validatePosition(r),u=s?e.validateViewPosition(new i.Position(s.lineNumber,s.column),a):e.convertModelPositionToViewPosition(a);return n.CursorState.fromViewState(t.viewState.move(o,u.lineNumber,u.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 10:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],d=0,h=t.length;di.endLineNumber-1&&(r=i.endLineNumber-1),rn)for(var r=t-n,o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;tp&&t[S].index--;e.splice(p,1),t.splice(h,1),this._removeSecondaryCursor(p-1),s--}}}},e}();t.CursorCollection=r}),define(d[319],h([1,0,9,2,22,43,167,263,60]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n){this._selection=e,this._isMovingDown=t,this._autoIndent=n,this._moveEndLineSelectionShrink=!1}return e.prototype.getEditOperations=function(e,t){var s=e.getLineCount();if((!this._isMovingDown||this._selection.endLineNumber!==s)&&(this._isMovingDown||1!==this._selection.startLineNumber)){this._moveEndPositionDown=!1;var u=this._selection;u.startLineNumber=u.startLineNumber+1&&t<=u.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var S=r.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(g,1),u.startLineNumber+1,d);if(null!==S){y=n.getLeadingWhitespace(e.getLineContent(u.startLineNumber));if((C=a.getSpaceCnt(S,l))!==(N=a.getSpaceCnt(y,l))){M=C-N;this.getIndentEditsOfMovingBlock(e,t,u,l,c,M)}}}}else t.addEditOperation(new i.Range(u.startLineNumber,1,u.startLineNumber,1),v+"\n")}else if(g=u.startLineNumber-1,m=e.getLineContent(g),t.addEditOperation(new i.Range(g,1,g+1,1),null),t.addEditOperation(new i.Range(u.endLineNumber,e.getLineMaxColumn(u.endLineNumber),u.endLineNumber,e.getLineMaxColumn(u.endLineNumber)),"\n"+m),this.isAutoIndent(e,u)){h.getLineContent=function(t){return t===g?e.getLineContent(u.startLineNumber):e.getLineContent(t)};var E=this.matchEnterRule(e,d,l,u.startLineNumber,u.startLineNumber-2);if(null!==E)0!==E&&this.getIndentEditsOfMovingBlock(e,t,u,l,c,E);else{var L=r.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(u.startLineNumber,1),g,d);if(null!==L){var x=n.getLeadingWhitespace(e.getLineContent(u.startLineNumber)),C=a.getSpaceCnt(L,l),N=a.getSpaceCnt(x,l);if(C!==N){var M=C-N;this.getIndentEditsOfMovingBlock(e,t,u,l,c,M)}}}}}this._selectionId=t.trackSelection(u)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var n=s.ShiftCommand.shiftIndentCount(t,t.length+1,e),i="",o=0;o=1;){var h=void 0;if(h=d===l&&void 0!==c?c:e.getLineContent(d),n.lastNonWhitespaceIndex(h)>=0)break;d--}if(d<1||s>e.getLineCount())return null;var p=e.getLineMaxColumn(d),f=r.LanguageConfigurationRegistry.getEnterAction(e,new i.Range(d,p,d,p));if(f){var g=f.indentation,m=f.enterAction;m.indentAction===u.IndentAction.None?g=f.indentation+m.appendText:m.indentAction===u.IndentAction.Indent?g=f.indentation+m.appendText:m.indentAction===u.IndentAction.IndentOutdent?g=f.indentation:m.indentAction===u.IndentAction.Outdent&&(g=t.unshiftIndent(f.indentation)+m.appendText);var v=e.getLineContent(s);if(this.trimLeft(v).indexOf(this.trimLeft(g))>=0){var _=n.getLeadingWhitespace(e.getLineContent(s)),y=n.getLeadingWhitespace(g);return 2&r.LanguageConfigurationRegistry.getIndentMetadata(e,s)&&(y=t.unshiftIndent(y)),a.getSpaceCnt(y,o)-a.getSpaceCnt(_,o)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.isAutoIndent=function(e,t){if(!this._autoIndent)return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==r.LanguageConfigurationRegistry.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,o,r,s,u){for(var l=o.startLineNumber;l<=o.endLineNumber;l++){var c=e.getLineContent(l),d=n.getLeadingWhitespace(c),h=a.getSpaceCnt(d,r)+u,p=a.generateIndent(h,r,s);p!==d&&(t.addEditOperation(new i.Range(l,1,l,d.length+1),p),l===o.endLineNumber&&o.endColumn<=d.length+1&&""===p&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber1)return;var a=new s.Range(o.lineNumber,o.column,o.lineNumber,o.column);this.emitCursorRevealRange(a,t,n)},t.prototype.emitCursorRevealRange=function(e,t,n){this._emit([new m.ViewRevealRangeRequestEvent(e,t,n)])},t.prototype.trigger=function(e,t,n){var i=u.Handler;if(t!==i.CompositionStart)if(t!==i.CompositionEnd){var r=new C(this._model,this),s=g.CursorChangeReason.NotSet;this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:s=g.CursorChangeReason.Paste,this._paste(n.text,n.pasteOnNewLine);break;case i.Cut:this._cut();break;case i.Undo:s=g.CursorChangeReason.Undo,this._interpretCommandResult(this._model.undo());break;case i.Redo:s=g.CursorChangeReason.Redo,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n)}}catch(e){o.onUnexpectedError(e)}this._isHandling=!1,this._emitStateChangedIfNecessary(e,s,r)&&this._revealRange(0,0,!0)}else this._isDoingComposition=!1;else this._isDoingComposition=!0},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(h.TypeOperations.typeWithoutInterceptors(this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,o=t.length;n0&&(h[0]._isTracked=!0);var p=e.model.pushEditOperations(e.selectionsBefore,h,function(n){for(var i=[],o=0;o0?(i[n].sort(s),u[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getMarker(e.selectionStartMarkers[n]),o=e.model._getMarker(e.positionMarkers[n]);return new a.Selection(i.lineNumber,i.column,o.lineNumber,o.column)}})):u[n]=e.selectionsBefore[n]}(o);return u}),f=[];for(var g in d)d.hasOwnProperty(g)&&f.push(parseInt(g,10));f.sort(function(e,t){return t-e});for(u=0;uo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var a=0;a0&&n--}}return t},e}()}),define(d[322],h([6,8]),function(e,t){return e.create("vs/editor/common/model/textModelWithTokens",t)}),define(d[323],h([1,0,322,10,426,93,17,68,91,98,43,95,55]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(){this._ranges=[]}return e.prototype.registerChangedTokens=function(e){var t=this._ranges,n=t.length,i=n>0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}(),g=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._languageIdentifier=i||a.NULL_LANGUAGE_IDENTIFIER,o._tokenizationListener=s.TokenizationRegistry.onDidChange(function(e){-1!==e.changedLanguages.indexOf(o._languageIdentifier.language)&&(o._resetTokenizationState(),o.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:o.getLineCount()}]}))}),o._revalidateTokensTimeout=-1,o._resetTokenizationState(),o}return f(t,e),t.prototype.dispose=function(){this._tokenizationListener.dispose(),this._clearTimers(),this._lastState=null,e.prototype.dispose.call(this)},t.prototype._shouldAutoTokenize=function(){return!1},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._resetTokenizationState()},t.prototype._resetTokenizationState=function(){this._clearTimers();for(var e=0;ethis.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");this._withModelTokensChangedEventBuilder(function(n){t._updateTokensUntilLine(n,e)})},t.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){return this._lines[e-1].getTokens(this._languageIdentifier.id)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._emitModelModeChangedEvent(t)}},t.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column;return this._getLineTokens(i).findTokenAtOffset(o-1).languageId},t.prototype._invalidateLine=function(e){this._lines[e].setIsInvalid(!0),e=200){t=n-1;break}this._revalidateTokensNow(t),this._invalidLineStartIndex20){e=c-1;break}if(a=t._lines[c-1].text.length,s>0&&(u=i/s*a,i+u>20)){e=c-1;break}t._updateTokensUntilLine(n,c),s+=a,c=Math.max(c,t._invalidLineStartIndex+1)}i=l.elapsed(),t._invalidLineStartIndex=1;r--){var s=this._getLineTokens(r),a=this._lines[r-1].text,c=void 0,d=void 0;for(r===t.lineNumber?(c=s.findTokenAtOffset(t.column-1),d=t.column-1):(c=s.lastToken())&&(d=c.endOffset);c;){if(c.languageId===n&&!u.ignoreBracketsInToken(c.tokenType))for(;;){var h=l.BracketsUtils.findPrevBracketInToken(i,r,a,c.startOffset,d);if(!h)break;var p=a.substring(h.startColumn-1,h.endColumn-1);if((p=p.toLowerCase())===e.open?o++:p===e.close&&o--,0===o)return h;d=h.startColumn-1}(c=c.prev())&&(d=c.endOffset)}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),c=this._lines[r-1].text,d=void 0,h=void 0;for(r===t.lineNumber?(d=a.findTokenAtOffset(t.column-1),h=t.column-1):(d=a.firstToken())&&(h=d.startOffset);d;){if(d.languageId===n&&!u.ignoreBracketsInToken(d.tokenType))for(;;){var p=l.BracketsUtils.findNextBracketInToken(i,r,c,h,d.endOffset);if(!p)break;var f=c.substring(p.startColumn-1,p.endColumn-1);if((f=f.toLowerCase())===e.open?o++:f===e.close&&o--,0===o)return p;h=p.endColumn-1}(d=d.next())&&(h=d.startOffset)}}return null},t.prototype.findPrevBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,o=t.lineNumber;o>=1;o--){var r=this._getLineTokens(o),s=this._lines[o-1].text,a=void 0,d=void 0;for(o===t.lineNumber?(a=r.findTokenAtOffset(t.column-1),d=t.column-1):(a=r.lastToken())&&(d=a.endOffset);a;){if(n!==a.languageId&&(n=a.languageId,i=c.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!u.ignoreBracketsInToken(a.tokenType)){var h=l.BracketsUtils.findPrevBracketInToken(i.reversedRegex,o,s,a.startOffset,d);if(h)return this._toFoundBracket(i,h)}(a=a.prev())&&(d=a.endOffset)}}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,o=t.lineNumber,r=this.getLineCount();o<=r;o++){var s=this._getLineTokens(o),a=this._lines[o-1].text,d=void 0,h=void 0;for(o===t.lineNumber?(d=s.findTokenAtOffset(t.column-1),h=t.column-1):(d=s.firstToken())&&(h=d.startOffset);d;){if(n!==d.languageId&&(n=d.languageId,i=c.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!u.ignoreBracketsInToken(d.tokenType)){var p=l.BracketsUtils.findNextBracketInToken(i.forwardRegex,o,a,h,d.endOffset);if(p)return this._toFoundBracket(i,p)}(d=d.next())&&(h=d.startOffset)}}return null},t.prototype._toFoundBracket=function(e,t){if(!t)return null;var n=this.getValueInRange(t);n=n.toLowerCase();var i=e.textIsBracket[n];return i?{range:t,open:i.open,close:i.close,isOpen:e.textIsOpenBracket[n]}:null},t.MODE_TOKENIZATION_FAILED_MSG=n.localize(0,null),t}(r.TextModel);t.TextModelWithTokens=g}),define(d[324],h([1,0,108,12,118,323]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=0,a=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r._markerIdGenerator=new n.IdGenerator(++s+";"),r._markerIdToMarker=Object.create(null),r}return f(t,e),t.prototype.dispose=function(){this._markerIdToMarker=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._markerIdToMarker=Object.create(null)},t.prototype._addMarker=function(e,t,n,r){var s=this.validatePosition(new i.Position(t,n)),a=new o.LineMarker(this._markerIdGenerator.nextId(),e,s,r);return this._markerIdToMarker[a.id]=a,this._lines[s.lineNumber-1].addMarker(a),a.id},t.prototype._addMarkers=function(e){if(0===e.length)return[];for(var t=[],n=0,i=e.length;nthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype._getMultiLineDecorations=function(e,t,n){var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=[];for(var u in this._multiLineDecorationsMap){var l=this._multiLineDecorationsMap[u];if((!t||!l.ownerId||l.ownerId===t)&&(!n||!l.isForValidation)){var c=l.range;c.startLineNumber>r||c.startLineNumber===r&&c.startColumn>s||c.endLineNumberr||g.startLineNumber===r&&g.startColumn>s||g.endLineNumber0){var p={addedDecorations:[],changedDecorations:i,removedDecorations:[]};this.emitModelDecorationsChangedEvent(p)}}},t._createRangeFromMarkers=function(e,t){return t.isBefore(e)?new r.Range(e.lineNumber,e.column,e.lineNumber,e.column):new r.Range(e.lineNumber,e.column,t.lineNumber,t.column)},t.prototype._acquireDecorationsTracker=function(){return 0===this._currentDecorationsTrackerCnt&&(this._currentDecorationsTracker=new g),this._currentDecorationsTrackerCnt++,this._currentDecorationsTracker},t.prototype._releaseDecorationsTracker=function(){if(this._currentDecorationsTrackerCnt--,0===this._currentDecorationsTrackerCnt){var e=this._currentDecorationsTracker;this._currentDecorationsTracker=null,this._handleTrackedDecorations(e)}},t.prototype._handleTrackedDecorations=function(e){if(0!==e.addedDecorationsLen||0!==e.changedDecorationsLen||0!==e.removedDecorationsLen){var t={addedDecorations:e.addedDecorations,changedDecorations:e.changedDecorations,removedDecorations:e.removedDecorations};this.emitModelDecorationsChangedEvent(t)}},t.prototype.emitModelDecorationsChangedEvent=function(e){this._isDisposing||this._eventEmitter.emit(c.TextModelEventType.ModelDecorationsChanged,e)},t.prototype._normalizeDeltaDecorations=function(e){for(var t=[],n=0,i=e.length;n0&&this._removeMarkers(n)},t.prototype._resolveOldDecorations=function(e){for(var t=[],n=0,i=e.length;n0?(d.push(f),l++):p.options.equals(f.options)?(s[f.index]=p.id,a++,l++):(h.push(p.id),a++)}for(;a0&&this._removeDecorationsImpl(e,h),d.length>0)for(var m=this._addDecorationsImpl(e,t,d),v=0,_=d.length;v<_;v++)s[d[v].index]=m[v];return s},t}(l.TextModelWithMarkers);t.TextModelWithDecorations=_;var y=function(){function e(e){this.color=o.empty,this.darkColor=o.empty,this.hcColor=o.empty,this.position=s.OverviewRulerLane.Center,e&&e.color&&(this.color=e.color),e&&e.darkColor&&(this.darkColor=e.darkColor,this.hcColor=e.darkColor),e&&e.hcColor&&(this.hcColor=e.hcColor),e&&e.hasOwnProperty("position")&&(this.position=e.position)}return e.prototype.equals=function(e){return this.color===e.color&&this.darkColor===e.darkColor&&this.hcColor===e.hcColor&&this.position===e.position},e}();t.ModelDecorationOverviewRulerOptions=y;var C=0,b=function(){function e(e,t){this.staticId=e,this.stickiness=t.stickiness||s.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,this.className=t.className?h(t.className):o.empty,this.hoverMessage=t.hoverMessage||[],this.glyphMarginHoverMessage=t.glyphMarginHoverMessage||o.empty,this.isWholeLine=t.isWholeLine||!1,this.showIfCollapsed=t.showIfCollapsed||!1,this.overviewRuler=new y(t.overviewRuler),this.glyphMarginClassName=t.glyphMarginClassName?h(t.glyphMarginClassName):o.empty,this.linesDecorationsClassName=t.linesDecorationsClassName?h(t.linesDecorationsClassName):o.empty,this.marginClassName=t.marginClassName?h(t.marginClassName):o.empty,this.inlineClassName=t.inlineClassName?h(t.inlineClassName):o.empty,this.beforeContentClassName=t.beforeContentClassName?h(t.beforeContentClassName):o.empty,this.afterContentClassName=t.afterContentClassName?h(t.afterContentClassName):o.empty,t.__extraOptions&&(this.extraOptions=t.__extraOptions)}return e.register=function(t){return new e(++C,t)},e.createDynamic=function(t){return new e(0,t)},e.prototype.equals=function(e){return this.staticId>0||e.staticId>0?this.staticId===e.staticId:this.stickiness===e.stickiness&&this.className===e.className&&this.isWholeLine===e.isWholeLine&&this.showIfCollapsed===e.showIfCollapsed&&this.glyphMarginClassName===e.glyphMarginClassName&&this.linesDecorationsClassName===e.linesDecorationsClassName&&this.marginClassName===e.marginClassName&&this.inlineClassName===e.inlineClassName&&this.beforeContentClassName===e.beforeContentClassName&&this.afterContentClassName===e.afterContentClassName&&i.markedStringsEquals(this.hoverMessage,e.hoverMessage)&&i.markedStringsEquals(this.glyphMarginHoverMessage,e.glyphMarginHoverMessage)&&this.overviewRuler.equals(e.overviewRuler)&&this.extraOptions===e.extraOptions},e}();t.ModelDecorationOptions=b,b.EMPTY=b.register({});var w=function(){return function(e,t,n){this.index=e,this.range=t,this.options=n}}()}),define(d[326],h([1,0,2,20,475,34,9,33,12,101,93,55]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r._commandManager=new o.EditStack(r),r._isUndoing=!1,r._isRedoing=!1,r._hasEditableRange=!1,r._editableRangeId=null,r._trimAutoWhitespaceLines=null,r}return f(t,e),t.createFromString=function(e,n,i){return void 0===n&&(n=c.TextModel.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),new t(l.RawTextSource.fromString(e),n,i)},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.addListener(d.TextModelEventType.ModelRawContentChanged2,e)},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.addListener(d.TextModelEventType.ModelContentChanged,e)},t.prototype.dispose=function(){this._commandManager=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._commandManager=new o.EditStack(this),this._hasEditableRange=!1,this._editableRangeId=null,this._trimAutoWhitespaceLines=null},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEditOperations=function(e,t,n){try{return this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,i){var o=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var r=t.map(function(e){return{range:o.validateRange(e.range),text:e.text}}),s=!0,a=0,u=e.length;al.endLineNumber,f=l.startLineNumber>_.endLineNumber;if(!p&&!f){c=!0;break}}if(!c){s=!1;break}}if(s)for(var a=0,u=this._trimAutoWhitespaceLines.length;a_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(0))){v=!1;break}}v&&t.push({identifier:null,range:new n.Range(g,1,g,m),text:null,forceMoveMarkers:!1,isAutoWhitespaceEdit:!1})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,i)},t.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},t.prototype._toSingleEditOperation=function(e){for(var t=!1,i=e[0].range,o=e[e.length-1].range,r=new n.Range(i.startLineNumber,i.startColumn,o.endLineNumber,o.endColumn),s=i.startLineNumber,a=i.startColumn,u=[],l=0,c=e.length;l0){_.sort(function(e,t){return t.lineNumber-e.lineNumber}),this._trimAutoWhitespaceLines=[];for(var u=0,w=_.length;u0&&_[u-1].lineNumber===S)){var E=_[u].oldContent,L=this.getLineContent(S);0!==L.length&&L!==E&&-1===s.firstNonWhitespaceIndex(L)&&this._trimAutoWhitespaceLines.push(S)}}}return v},t._getInverseEditRanges=function(e){for(var t,i,o=[],r=null,s=0,a=e.length;s0){var h=u.lines.length,p=u.lines[0],f=u.lines[h-1];d=1===h?new n.Range(l,c,l,c+p.length):new n.Range(l,c,l+h-1,f.length+1)}else d=new n.Range(l,c,l,c);t=d.endLineNumber,i=d.endColumn,o.push(d),r=u}return o},t.prototype._doApplyEdits=function(e,i){var o=this,r=this._options.tabSize;i.sort(t._sortOpsDescending);for(var s=[],l=[],c=[],h=function(){if(0!==c.length){c.reverse();for(var t=c[0].lineNumber,n=0,i=1,a=c.length;i=0;D--){var x=y+D;!function(e){e.startColumn===e.endColumn&&0===e.text.length||c.push(e)}({lineNumber:x,startColumn:x===y?C:1,endColumn:x===b?w:this.getLineMaxColumn(x),text:_.lines?_.lines[D]:"",forceMoveMarkers:_.forceMoveMarkers})}if(L0},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t}(i.EditableTextModel);t.Model=u}),define(d[179],h([1,0,12,22,2,104,86,57,34]),function(e,t,n,i,o,r,s,a,u){"use strict";function l(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?p.INSTANCE:f.INSTANCE:new g(a,s)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){return function(e,t){this.outputLineIndex=e,this.outputOffset=t}}();t.OutputPosition=c;var d=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){var t=this._lines.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this._lines.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new o.Range(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.convertViewSelectionToModelSelection=function(e){var t=this._lines.convertViewPositionToModelPosition(e.selectionStartLineNumber,e.selectionStartColumn),n=this._lines.convertViewPositionToModelPosition(e.positionLineNumber,e.positionColumn);return new i.Selection(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){var n=this._lines.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this._lines.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new o.Range(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){var t=this._lines.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this._lines.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return new o.Range(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.convertModelSelectionToViewSelection=function(e){var t=this._lines.convertModelPositionToViewPosition(e.selectionStartLineNumber,e.selectionStartColumn),n=this._lines.convertModelPositionToViewPosition(e.positionLineNumber,e.positionColumn);return new i.Selection(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}();t.CoordinatesConverter=d;var h=function(){function e(e,t,n,i,o,r){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.columnsForFullWidthChar=o,this.wrappingIndent=r,this.linePositionMapperFactory=t,this._constructLines(!0)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new d(this)},e.prototype._ensureValidState=function(){if(this.model.getVersionId()!==this._validModelVersionId)throw new Error("SplitLinesCollection: attempt to access a 'newer' model")},e.prototype._constructLines=function(e){var t=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var n=this.model.getLinesContent(),i=n.length,s=new Uint32Array(i),a=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(o.Range.compareRangesUsingStarts),u=1,c=0,d=-1,h=d+1=u&&f<=c,m=l(this.linePositionMapperFactory,n[p],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!g);s[p]=m.getViewLineCount(),this.lines[p]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new r.PrefixSumComputerWithCache(s)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t)}).sort(o.Range.compareRangesUsingStarts)},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map(function(e){return t.model.validateRange(e)}).sort(o.Range.compareRangesUsingStarts),i=[],r=n[0].startLineNumber,s=n[0].endLineNumber,a=1,u=n.length;as+1?(i.push(new o.Range(r,1,s,1)),r=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return i.push(new o.Range(r,1,s,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(o.Range.compareRangesUsingStarts);if(n.length===i.length){for(var r=!1,s=0;s=c&&f<=d?this.lines[s].isVisible()&&(this.lines[s]=this.lines[s].setVisible(!1),g=!0):this.lines[s].isVisible()||(this.lines[s]=this.lines[s].setVisible(!0),g=!0),g){var m=this.lines[s].getViewLineCount();this.prefixSumComputer.changeValue(s,m)}}return!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new a.ViewLinesDeletedEvent(i,o)},e.prototype.onModelLinesInserted=function(e,t,i,o){if(e<=this._validModelVersionId)return null;for(var r=this.getHiddenAreas(),s=!1,u=new n.Position(t,1),c=0;cu?(m=(g=(h=(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+u-1)+1)+(o-u)-1,c=!0):ot?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getViewLineIndentGuide=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1);return this.model.getLineIndentGuide(t.index+1)},e.prototype.getViewLineContent=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineContent(this.model,n+1,i)},e.prototype.getViewLineMinColumn=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMinColumn(this.model,n+1,i)},e.prototype.getViewLineMaxColumn=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineMaxColumn(this.model,n+1,i)},e.prototype.getViewLineData=function(e){this._ensureValidState(),e=this._toValidViewLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getViewLineData(this.model,n+1,i)},e.prototype.getViewLinesData=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var i=this.prefixSumComputer.getIndexOf(e-1),o=e,r=i.index,s=i.remainder,a=[],u=r,l=this.model.getLineCount();ut&&(p=!0,h=t-o+1);var f=d+h;if(c.getViewLinesData(this.model,u+1,d,f,o-e,n,a),o+=h,p)break}}return a},e.prototype.validateViewPosition=function(e,t,i){this._ensureValidState(),e=this._toValidViewLineNumber(e);var o=this.prefixSumComputer.getIndexOf(e-1),r=o.index,s=o.remainder,a=this.lines[r],u=a.getViewLineMinColumn(this.model,r+1,s),l=a.getViewLineMaxColumn(this.model,r+1,s);tl&&(t=l);var c=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new n.Position(r+1,c)).equals(i)?new n.Position(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o].getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new n.Position(o+1,s))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var i=this.model.validatePosition(new n.Position(e,t)),o=i.lineNumber,r=i.column,s=o-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new n.Position(1,1);var u=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(s+1)):this.lines[o-1].getViewPositionOfModelPosition(u,r)},e}();t.SplitLinesCollection=h;var p=function(){function e(){}return e.prototype.isVisible=function(){return!0},e.prototype.setVisible=function(e){return e?this:f.INSTANCE},e.prototype.getViewLineCount=function(){return 1},e.prototype.getViewLineContent=function(e,t,n){return e.getLineContent(t)},e.prototype.getViewLineMinColumn=function(e,t,n){return e.getLineMinColumn(t)},e.prototype.getViewLineMaxColumn=function(e,t,n){return e.getLineMaxColumn(t)},e.prototype.getViewLineData=function(e,t,n){var i=e.getLineTokens(t),o=i.getLineContent();return new s.ViewLineData(o,1,o.length+1,i.inflate())},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null},e.prototype.getModelColumnOfViewPosition=function(e,t){return t},e.prototype.getViewPositionOfModelPosition=function(e,t){return new n.Position(e,t)},e.INSTANCE=new e,e}(),f=function(){function e(){}return e.prototype.isVisible=function(){return!1},e.prototype.setVisible=function(e){return e?p.INSTANCE:this},e.prototype.getViewLineCount=function(){return 0},e.prototype.getViewLineContent=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMinColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineMaxColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLineData=function(e,t,n){throw new Error("Not supported")},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){throw new Error("Not supported")},e.prototype.getModelColumnOfViewPosition=function(e,t){throw new Error("Not supported")},e.prototype.getViewPositionOfModelPosition=function(e,t){throw new Error("Not supported")},e.INSTANCE=new e,e}(),g=function(){function e(e,t){this.positionMapper=e,this.wrappedIndent=this.positionMapper.getWrappedLinesIndent(),this.wrappedIndentLength=this.wrappedIndent.length,this.outputLineCount=this.positionMapper.getOutputLineCount(),this._isVisible=t}return e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){return this._isVisible=e,this},e.prototype.getViewLineCount=function(){return this._isVisible?this.outputLineCount:0},e.prototype.getInputStartOffsetOfOutputLineIndex=function(e){return this.positionMapper.getInputOffsetOfOutputPosition(e,0)},e.prototype.getInputEndOffsetOfOutputLineIndex=function(e,t,n){return n+1===this.outputLineCount?e.getLineMaxColumn(t)-1:this.positionMapper.getInputOffsetOfOutputPosition(n+1,0)},e.prototype.getViewLineContent=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getLineContent(t).substring(i,o);return n>0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getLineContent(t).substring(i,o);n>0&&(r=this.wrappedIndent+r);var a=n>0?this.wrappedIndentLength+1:1,u=r.length+1,l=0;n>0&&(l=this.wrappedIndentLength);var c=e.getLineTokens(t);return new s.ViewLineData(r,a,u,c.sliceAndInflate(i,o,l))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(r+=this.wrappedIndentLength),new n.Position(e+o,r)},e}();t.SplitLine=g;var m=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype._validSelection=function(e){var t=this._validPosition(new n.Position(e.selectionStartLineNumber,e.selectionStartColumn)),o=this._validPosition(new n.Position(e.positionLineNumber,e.positionColumn));return new i.Selection(t.lineNumber,t.column,o.lineNumber,o.column)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.convertViewSelectionToModelSelection=function(e){return this._validSelection(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.convertModelSelectionToViewSelection=function(e){return this._validSelection(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}();t.IdentityCoordinatesConverter=m;var v=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new m(this)},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new a.ViewLinesDeletedEvent(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new a.ViewLinesInsertedEvent(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new a.ViewLinesChangedEvent(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getViewLineIndentGuide=function(e){return 0},e.prototype.getViewLineContent=function(e){return this.model.getLineContent(e)},e.prototype.getViewLineMinColumn=function(e){return this.model.getLineMinColumn(e)},e.prototype.getViewLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},e.prototype.getViewLineData=function(e){var t=this.model.getLineTokens(e),n=t.getLineContent();return new s.ViewLineData(n,1,n.length+1,t.inflate())},e.prototype.getViewLinesData=function(e,t,n){var i=this.model.getLineCount();e=Math.min(Math.max(1,e),i),t=Math.min(Math.max(1,t),i);for(var o=[],r=e;r<=t;r++){var s=r-e;n[s]||(o[s]=null),o[s]=this.getViewLineData(r)}return o},e}();t.IdentityLinesCollection=v}),define(d[329],h([1,0,9,104,179,89,96,49]),function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.NONE=0]="NONE",e[e.BREAK_BEFORE=1]="BREAK_BEFORE",e[e.BREAK_AFTER=2]="BREAK_AFTER",e[e.BREAK_OBTRUSIVE=3]="BREAK_OBTRUSIVE",e[e.BREAK_IDEOGRAPHIC=4]="BREAK_IDEOGRAPHIC"}(u||(u={}));var l=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(r.CharacterClassifier),c=function(){function e(e,t,n){this.classifier=new l(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,o,r,u,l){if(-1===r)return null;o=+o,r=+r,u=+u;var c=0,h="",p=-1;if((l=+l)!==a.WrappingIndent.None&&-1!==(p=n.firstNonWhitespaceIndex(t))){h=t.substring(0,p);for(E=0;E.5*r&&(h="",c=0)}for(var f=this.classifier,g=0,m=[],v=0,_=0,y=-1,C=0,b=-1,w=0,S=t.length,E=0;E0){var M=t.charCodeAt(E-1);1!==f.get(M)&&(y=E,C=c)}var T=1;if(n.isFullWidthCharacter(L)&&(T=u),(_=e.nextVisibleColumn(_,o,x,T))>r&&0!==E){var k=void 0,I=void 0;-1!==y&&C<=r?(k=y,I=C):-1!==b&&w<=r?(k=b,I=w):(k=E,I=c),m[v++]=k-g,g=k,_=e.nextVisibleColumn(I,o,x,T),y=-1,C=0,b=-1,w=0}if(-1!==y&&(C=e.nextVisibleColumn(C,o,x,T)),-1!==b&&(w=e.nextVisibleColumn(w,o,x,T)),2===N&&(l===a.WrappingIndent.None||E>=p)&&(y=E+1,C=c),4===N&&E'+this._getHTMLToCopy(n,s)+""},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),u="",l=n;l<=o;l++){var c=this.model.getLineTokens(l),d=c.getLineContent(),h=l===n?i-1:0,p=l===o?r-1:d.length;u+=""===d?"
    ":a.tokenizeLineToHTML(d,c.inflate(),t,h,p,s)}return u},t.prototype._getColorMap=function(){for(var e=s.TokenizationRegistry.getColorMap(),t=[null],n=1,i=e.length;n0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),!this._cannotFind()){var i=this._decorations.getFindScope(),o=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,i);o.getEndPosition().isBefore(t)&&(t=o.getEndPosition()),t.isBefore(o.getStartPosition())&&(t=o.getEndPosition());var r=t.lineNumber,a=t.column,u=this._editor.getModel(),l=new s.Position(r,a),c=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0)||1===a?(1===r?r=u.getLineCount():r--,a=u.getLineMaxColumn(r)):a--,l=new s.Position(r,a),c=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1)),c?n||o.containsRange(c.range)?void this._setCurrentFindMatch(c.range):this._moveToPrevMatch(c.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._moveToNextMatch=function(e){var t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)},e.prototype._getNextMatch=function(t,n,i,o){if(void 0===o&&(o=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),a=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,r);a.getEndPosition().isBefore(t)&&(t=a.getStartPosition()),t.isBefore(a.getStartPosition())&&(t=a.getStartPosition());var u=t.lineNumber,l=t.column,c=this._editor.getModel(),d=new s.Position(u,l),h=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n);return i&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0)||l===c.getLineMaxColumn(u)?(u===c.getLineCount()?u=1:u++,l=1):l++,d=new s.Position(u,l),h=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n)),h?o||a.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),n,i,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?o.parseReplaceString(this._state.replaceString):o.ReplacePattern.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches),o=new r.ReplaceCommand(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new s.Position(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=t.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new h.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t,n=this._editor.getModel(),i=n.getValue(u.EndOfLinePreference.LF),o=n.getFullModelRange(),s=this._getReplacePattern();t=s.hasReplacementPatterns?i.replace(e.regex,function(){return s.buildReplaceString(arguments)}):i.replace(e.regex,s.buildReplaceString(null));var a=new r.ReplaceCommandThatPreservesSelection(o,t,this._editor.getSelection());this._executeEditorCommand("replaceAll",a)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,1073741824),i=[],o=0,r=n.length;o=e.startLineNumber&&t<=e.endLineNumber}function u(e,t){return te.endLineNumber}function c(e,t){return e instanceof i.Range&&t instanceof i.Range?e.containsRange(t):e.startLineNumber<=t.startLineNumber&&e.endLineNumber>=t.endLineNumber}function d(e,t,n,i,o){return(o?new f(e,t,n):new p(e,t,n)).getRegionsTill(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.toString=function(e){return(e?e.startLineNumber+"/"+e.endLineNumber:"null")+(e.isCollapsed?" (collapsed)":"")+" - "+e.indent};var h=function(){function e(e,t,n){this.decorationIds=[],this.update(e,t,n)}return Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return!this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indent",{get:function(){return this._indent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foldingRange",{get:function(){return this._lastRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLineNumber",{get:function(){return this._lastRange?this._lastRange.startLineNumber:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLineNumber",{get:function(){return this._lastRange?this._lastRange.endLineNumber:void 0},enumerable:!0,configurable:!0}),e.prototype.setCollapsed=function(e,t){this._isCollapsed=e,this.decorationIds.length>0&&t.changeDecorationOptions(this.decorationIds[0],this.getVisualDecorationOptions())},e.prototype.getDecorationRange=function(e){return this.decorationIds.length>0?e.getDecorationRange(this.decorationIds[1]):null},e.prototype.getVisualDecorationOptions=function(){return this._isCollapsed?e._COLLAPSED_VISUAL_DECORATION:e._EXPANDED_VISUAL_DECORATION},e.prototype.getRangeDecorationOptions=function(){return e._RANGE_DECORATION},e.prototype.update=function(e,t,n){this._lastRange=e,this._isCollapsed=!!e.isCollapsed,this._indent=e.indent;var i=[],o=t.getLineMaxColumn(e.startLineNumber),r={startLineNumber:e.startLineNumber,startColumn:o-1,endLineNumber:e.startLineNumber,endColumn:o};i.push({range:r,options:this.getVisualDecorationOptions()});var s={startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.endLineNumber,endColumn:t.getLineMaxColumn(e.endLineNumber)};i.push({range:s,options:this.getRangeDecorationOptions()}),this.decorationIds=n.deltaDecorations(this.decorationIds,i)},e.prototype.dispose=function(e){this._lastRange=null,this.decorationIds=e.deltaDecorations(this.decorationIds,[])},e.prototype.toString=function(){var e=this.isCollapsed?"collapsed ":"expanded ";return this._lastRange?e+=this._lastRange.startLineNumber+"/"+this._lastRange.endLineNumber:e+="no range",e},e._COLLAPSED_VISUAL_DECORATION=o.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e._EXPANDED_VISUAL_DECORATION=o.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e._RANGE_DECORATION=o.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore}),e}();t.CollapsibleRegion=h,t.getCollapsibleRegionsToFoldAtLine=function(e,t,n,i,o){var s=r(e,t,n);return s?1===i?[s]:d(s,e,t,i,o).filter(function(e){return!e.isCollapsed}):[]},t.getCollapsibleRegionsToUnfoldAtLine=function(e,t,n,i){var o=r(e,t,n);if(!o)return[];if(1===i){var a=o.isCollapsed?o:s(e,t,o,n);return a?[a]:[]}return d(o,e,t,i,!1).filter(function(e){return e.isCollapsed})},t.doesLineBelongsToCollapsibleRegion=a;var p=function(){function e(e,t,n){this.region=e,this.children=[];for(var i=t.indexOf(e)+1;i0?r.lastChildIndex:o},e.prototype.getRegionsTill=function(e){var t=[this.region];return e>1&&this.children.forEach(function(n){return t=t.concat(n.getRegionsTill(e-1))}),t},e}(),f=function(){function e(t,n,i){this.region=t;for(var o=n.indexOf(t)-1;o>=0;o--){var r=n[o],s=r.getDecorationRange(i);if(s){if(c(s,t.foldingRange)){this.parent=new e(r,n,i);break}if(l(s,t.foldingRange.endLineNumber))break}}}return e.prototype.getRegionsTill=function(e){var t=[this.region];return this.parent&&e>1&&(t=t.concat(this.parent.getRegionsTill(e-1))),t},e}()}),define(d[334],h([1,0,9,20,59,142,22,2,33,3,271,34,394]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n){this._nestingLevel=1,this._editor=e,this._snippet=t,this._offset=n,this._placeholderGroups=u.groupBy(t.placeholders,r.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}return e.prototype.dispose=function(){var e=this;this._placeholderDecorations&&this._editor.changeDecorations(function(t){return e._placeholderDecorations.forEach(function(e){return t.removeDecoration(e)})}),this._placeholderGroups.length=0},e.prototype._initDecorations=function(){var t=this;if(!this._placeholderDecorations){this._placeholderDecorations=new Map;var n=this._editor.getModel();this._editor.changeDecorations(function(i){for(var o=0,r=t._snippet.placeholders;o0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations(function(t){for(var i=new Set,o=[],r=0,a=n._placeholderGroups[n._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"placeholderRanges",{get:function(){var e=this,t=[];return this._placeholderDecorations.forEach(function(n,i){if(!i.isFinalTabstop){var o=e._editor.getModel().getDecorationRange(n);o&&t.push(o)}}),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"choice",{get:function(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice},enumerable:!0,configurable:!0}),e.prototype.merge=function(t){var n=this,i=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(function(o){for(var s=0,l=n._placeholderGroups[n._placeholderGroupsIdx];st.length)return!1;e.sort(a.Range.compareRangesUsingStarts),t.sort(a.Range.compareRangesUsingStarts);e:for(var r=0,s=e;r=a&&(t=a);var u=0,l=0;if(this.options.showArrow&&(u=Math.round(s/3),this._arrow.height=u,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(s/9)),this.editor.changeViewZones(function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new p(r,i.lineNumber,i.column,t,function(e){return n._onViewZoneTop(e)},function(e){return n._onViewZoneHeight(e)}),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new g("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)}),this.options.showFrame){var c=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=c+"px",this.container.style.borderBottomWidth=c+"px"}var d=t*s-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,o),this.editor.setSelection(e);var h=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.editor.revealLine(h)},t.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),r.addClass(this.container,e)},t.prototype._onWidth=function(e){},t.prototype._doLayout=function(e,t){},t.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones(function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)})},t.prototype._initSash=function(){var e=this;this._resizeSash=new s.Sash(this.domNode,this,{orientation:s.Orientation.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.disable());var t;this._disposables.push(this._resizeSash.addListener("start",function(n){e._viewZone&&(t={startY:n.startY,heightInLines:e._viewZone.heightInLines})})),this._disposables.push(this._resizeSash.addListener("end",function(){t=void 0})),this._disposables.push(this._resizeSash.addListener("change",function(n){if(t){var i=(n.currentY-t.startY)/e.editor.getConfiguration().lineHeight,o=i<0?Math.ceil(i):Math.floor(i),r=t.heightInLines+o;r>5&&r<35&&e._relayout(r)}}))},t.prototype.getHorizontalSashLeft=function(){return 0},t.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},t.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},t}(i.Widget);t.ZoneWidget=v}),define(d[336],h([6,8]),function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)}),define(d[337],h([6,8]),function(e,t){return e.create("vs/editor/common/services/bulkEdit",t)}),define(d[338],h([1,0,337,33,157,3,24,7,59,2,22]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,i){function r(){for(var e,t=0,i=u;t1&&t>1?n.localize(2,null,e,t):n.localize(3,null,e,t)}}}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e){this._fileService=e}return e.prototype.start=function(){var e,t=Object.create(null);return this._fileService&&(e=this._fileService.onFileChanges(function(e){e.changes.forEach(function(e){var n=String(e.resource),i=t[n];i||(t[n]=i=[]),i.push(e)})})),{stop:function(){return e&&e.dispose()},hasChanged:function(e){return!!t[e.toString()]},allChanges:function(){return i.flatten(o.values(t))}}},e}(),p=function(){function e(e){this._endCursorSelection=null,this._modelReference=e,this._edits=[]}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.addEdit=function(e){if("number"==typeof e.newEol&&(this._newEol=e.newEol),e.range||e.newText){var t=void 0;t=e.range?l.Range.lift(e.range):this._model.getFullModelRange(),this._edits.push(u.EditOperation.replaceMove(t,e.newText))}},e.prototype.apply=function(){var e=this;this._edits.length>0&&(this._edits=this._edits.map(function(e,t){return{value:e,index:t}}).sort(function(e,t){var n=l.Range.compareRangesUsingStarts(e.value.range,t.value.range);return 0===n&&(n=e.index-t.index),n}).map(function(e){return e.value}),this._initialSelections=this._getInitialSelections(),this._model.pushEditOperations(this._initialSelections,this._edits,function(t){return e._getEndCursorSelections(t)})),void 0!==this._newEol&&this._model.setEOL(this._newEol)},e.prototype._getInitialSelections=function(){var e=this._edits[0].range;return[new c.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)]},e.prototype._getEndCursorSelections=function(e){for(var t=0,n=0;nt.prefixLen?-1:e.prefixLent.offsetDist?1:0})[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=s.dispose(this._groups)},e._compareReferences=function(e,t){var n=e.uri.toString(),i=t.uri.toString();return ni?1:c.Range.compareRangesUsingStarts(e.range,t.range)},e}();t.ReferencesModel=f}),define(d[367],h([6,8]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/browser/referencesWidget",t)}),define(d[368],h([6,8]),function(e,t){return e.create("vs/editor/contrib/rename/browser/rename",t)}),define(d[369],h([6,8]),function(e,t){return e.create("vs/editor/contrib/rename/browser/renameInputField",t)}),define(d[370],h([6,8]),function(e,t){return e.create("vs/editor/contrib/smartSelect/common/smartSelect",t)}),define(d[371],h([6,8]),function(e,t){return e.create("vs/editor/contrib/suggest/browser/suggestController",t)}),define(d[372],h([6,8]),function(e,t){return e.create("vs/editor/contrib/suggest/browser/suggestWidget",t)}),define(d[373],h([6,8]),function(e,t){return e.create("vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode",t)}),define(d[374],h([6,8]),function(e,t){return e.create("vs/editor/contrib/wordHighlighter/common/wordHighlighter",t)}),define(d[375],h([6,8]),function(e,t){return e.create("vs/editor/contrib/zoneWidget/browser/peekViewWidget",t)}),define(d[376],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/inspectTokens/inspectTokens",t)}),define(d[377],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/quickOpen/gotoLine",t)}),define(d[378],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/quickOpen/quickCommand",t)}),define(d[379],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/quickOpen/quickOutline",t)}),define(d[380],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/standaloneCodeEditor",t)}),define(d[381],h([6,8]),function(e,t){return e.create("vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast",t)}),define(d[382],h([6,8]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(d[383],h([6,8]),function(e,t){return e.create("vs/platform/keybinding/common/abstractKeybindingService",t)}),define(d[384],h([6,8]),function(e,t){return e.create("vs/platform/message/common/message",t)}),define(d[385],h([6,8]),function(e,t){return e.create("vs/platform/theme/common/colorRegistry",t)}),define(d[386],h([1,0,52,3,47,53,281,79,36,409]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n,i){var o=this;this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.messageService=i,this.actionRunner=new r.ActionRunner,this.menuContainerElement=null,this.toDispose=[];var s=!1;this.toDispose.push(this.actionRunner.addListener(a.EventType.BEFORE_RUN,function(e){o.telemetryService&&o.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),(s=!!e.retainActionItem)||o.contextViewService.hideContextView(!1)})),this.toDispose.push(this.actionRunner.addListener(a.EventType.RUN,function(e){s&&o.contextViewService.hideContextView(!1),s=!1,e.error&&o.messageService&&o.messageService.show(u.default.Error,e.error)}))}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=n.$(e),this.$el.on("mousedown",function(e){return t.onMouseDown(e)}))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done(function(n){t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(o){t.menuContainerElement=o;var r=e.getMenuClassName?e.getMenuClassName():"";r&&(o.className+=" "+r);var u=new s.Menu(o,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:t.actionRunner}),l=u.addListener(a.EventType.CANCEL,function(e){t.contextViewService.hideContextView(!0)}),c=u.addListener(a.EventType.BLUR,function(e){t.contextViewService.hideContextView(!0)});return u.focus(),i.combinedDisposable([l,c,u])},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})})},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new o.StandardMouseEvent(e).target;t;){if(t===this.menuContainerElement)return;t=t.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}();t.ContextMenuHandler=l}),define(d[387],h([1,0,386]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,o){this.contextMenuHandler=new n.ContextMenuHandler(e,o,t,i)}return e.prototype.dispose=function(){this.contextMenuHandler.dispose()},e.prototype.setContainer=function(e){this.contextMenuHandler.setContainer(e)},e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e)},e}();t.ContextMenuService=i}),define(d[187],h([1,0,10]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._staticArguments=e}return e.prototype.appendStaticArguments=function(e){this._staticArguments.push.apply(this._staticArguments,e)},e.prototype.staticArguments=function(e){return isNaN(e)?this._staticArguments.slice(0):this._staticArguments[e]},e.prototype._validate=function(e){if(!e)throw n.illegalArgument("can not be falsy")},e}();t.AbstractDescriptor=i;var o=function(e){function t(t){for(var n=[],i=1;im&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new E(this._modelService,"editorWorkerService")),o.TPromise.as(this._editorWorkerClient)},t}(i.Disposable),w=function(e){function t(t,i,o){var r=e.call(this)||this;if(r._syncedModels=Object.create(null),r._syncedModelsLastUsedTime=Object.create(null),r._proxy=t,r._modelService=i,!o){var s=new n.IntervalTimer;s.cancelAndSet(function(){return r._checkStopModelSync()},Math.round(g/2)),r._register(s)}return r}return f(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)i.dispose(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;tg&&t.push(n);for(var i=0;i=0&&(t.splice(i,1),0===t.length&&n._commands.delete(e))}else r(t)&&n._commands.delete(e)}}},e.prototype.getCommand=function(e){var t=this._commands.get(e);return Array.isArray(t)?t[0]:t},e.prototype.getCommands=function(){var e=this,t=Object.create(null);return this._commands.forEach(function(n,i){t[i]=e.getCommand(i)}),t},e}()),t.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:function(){return{dispose:function(){}}},executeCommand:function(){return n.TPromise.as(void 0)}}}),define(d[401],h([1,0,10,24,7,2,17,18,31,56]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=[],i=s.LinkProviderRegistry.ordered(e).reverse().map(function(i){return a.asWinJsPromise(function(t){return i.provideLinks(e,t)}).then(function(e){if(Array.isArray(e)){var n=e.map(function(e){return new h(e,i)});t=d(t,n)}},n.onUnexpectedExternalError)});return o.TPromise.join(i).then(function(){return t})}function d(e,t){var n,i,o,s,a,u,l=[];for(n=0,o=0,i=e.length,s=t.length;n=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===s.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){for(var t=new Set,n=0,i=e;n=0){t=e.split("!=");return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){var t=e.split("==");return new a(t[0].trim(),this._deserializeValue(t[1]))}return/^\!\s*/.test(e)?new l(e.substr(1).trim()):new s(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e}();t.ContextKeyExpr=r;var s=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Defined},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=s;var a=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.Equals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new s(this.key):new l(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" == '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=a;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.NotEquals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new l(this.key):new s(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" != '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=u;var l=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Not},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return"!"+this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotExpr=l;var c=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return o.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n0&&t.push([s,a])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,u="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(u)},e=v([y(2,s.ICommandService),y(3,o.IContextKeyService)],e)}();t.Menu=a}),define(d[69],h([1,0,53,16]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IContextViewService=i.createDecorator("contextViewService"),t.IContextMenuService=i.createDecorator("contextMenuService");var o=function(e){function t(t,n){var i=e.call(this,"contextsubmenu",t,"",!0)||this;return i.entries=n,i}return f(t,e),t}(n.Action);t.ContextSubMenu=o}),define(d[64],h([1,0,16]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorService=n.createDecorator("editorService");var i;!function(e){e[e.ONE=0]="ONE",e[e.TWO=1]="TWO",e[e.THREE=2]="THREE"}(i=t.Position||(t.Position={})),t.POSITIONS=[i.ONE,i.TWO,i.THREE];!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.Direction||(t.Direction={}));!function(e){e[e.SHORT=0]="SHORT",e[e.MEDIUM=1]="MEDIUM",e[e.LONG=2]="LONG"}(t.Verbosity||(t.Verbosity={}))}),define(d[156],h([1,0,16]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(d[411],h([1,0,45,79,15,16,9]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileService=r.createDecorator("fileService");!function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",e[e.COPY=3]="COPY",e[e.IMPORT=4]="IMPORT"}(t.FileOperation||(t.FileOperation={}));var a=function(){function e(e,t,n){this._resource=e,this._operation=t,this._target=n}return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operation",{get:function(){return this._operation},enumerable:!0,configurable:!0}),e}();t.FileOperationEvent=a;var u;!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(u=t.FileChangeType||(t.FileChangeType={}));var l=function(e){function t(t){var n=e.call(this)||this;return n._changes=t,n}return f(t,e),Object.defineProperty(t.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return!!e&&this._changes.some(function(i){return i.type===t&&(t===u.DELETED?n.isEqualOrParent(e.fsPath,i.resource.fsPath,!o.isLinux):n.isEqual(e.fsPath,i.resource.fsPath,!o.isLinux))})},t.prototype.getAdded=function(){return this.getOfType(u.ADDED)},t.prototype.gotAdded=function(){return this.hasType(u.ADDED)},t.prototype.getDeleted=function(){return this.getOfType(u.DELETED)},t.prototype.gotDeleted=function(){return this.hasType(u.DELETED)},t.prototype.getUpdated=function(){return this.getOfType(u.UPDATED)},t.prototype.gotUpdated=function(){return this.hasType(u.UPDATED)},t.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},t.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},t}(i.Event);t.FileChangesEvent=l,t.isParent=function(e,t,i){return!(!e||!t||e===t)&&!(t.length>e.length)&&(t.charAt(t.length-1)!==n.nativeSep&&(t+=n.nativeSep),i?s.beginsWithIgnoreCase(e,t):0===e.indexOf(t))},t.indexOf=function(e,t,n){return t.length>e.length?-1:e===t?0:(n&&(e=e.toLowerCase(),t=t.toLowerCase()),e.indexOf(t))};var c=function(e){function t(t,n){var i=e.call(this,t)||this;return i.fileOperationResult=n,i}return f(t,e),t}(Error);t.FileOperationError=c;!function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_IS_DIRECTORY=1]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=2]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=3]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=4]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=5]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=6]="FILE_READ_ONLY",e[e.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",e[e.FILE_INVALID_PATH=8]="FILE_INVALID_PATH"}(t.FileOperationResult||(t.FileOperationResult={}));t.MAX_FILE_SIZE="object"==typeof process?"ia32"===process.arch?314572800:17179869184:314572800,t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.CONTENT_CHANGE_EVENT_BUFFER_DELAY=1e3,t.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},koi8ru:{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},koi8t:{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},gb2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45}};!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(t.FileKind||(t.FileKind={}))}),define(d[84],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){for(var e=[],t=0;t0?i[0].index:n.length;if(n.length!==d){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(d+1)+" conflicts with "+n.length+" static arguments");var h=d-n.length;n=h>0?n.concat(new Array(h)):n.slice(0,d)}var p=[e.ctor];p.push.apply(p,n),p.push.apply(p,r);var f=o.create.apply(null,p);return e._validate(f),f},t.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof a.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},t.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=i.toString(),e}r.ok(this._services.get(e)instanceof a.SyncDescriptor);for(var i=new s.Graph(function(e){return e.id.toString()}),o=0,l=[{id:e,desc:t}];l.length;){var c=l.pop();i.lookupOrInsertNode(c),o++>100&&n();for(var d=0,h=u._util.getServiceDependencies(c.desc.ctor);d=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(!0,r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=0;o--)n[i++]=t[o];return n},e.prototype.lookupPrimaryKeybinding=function(e){var t=this._lookupMap.get(e);return void 0===t||0===t.length?null:t[t.length-1]},e.prototype.resolve=function(e,t,n){var i=null;if(null!==t){if(void 0===(a=this._map.get(t)))return null;i=[];for(var o=0,r=a.length;o=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e.getAllUnboundCommands=function(e){var t=i.CommandsRegistry.getCommands(),o=[];for(var r in t)"_"!==r[0]&&0!==r.indexOf("vscode.")&&("object"!=typeof t[r].description||n.isFalsyOrEmpty(t[r].description.args))&&!0!==e.get(r)&&o.push(r);return o},e}();t.KeybindingResolver=o}),define(d[417],h([1,0,3,31,159,19,62,11]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){for(;e;){if(e.hasAttribute(l))return parseInt(e.getAttribute(l),10);e=e.parentElement}return 0}Object.defineProperty(t,"__esModule",{value:!0});var l="data-keybinding-context",c=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}return e.prototype.setValue=function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)},e.prototype.removeValue=function(e){return delete this._value[e]},e.prototype.getValue=function(e){var t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t},e}();t.Context=c;var d=function(e){function t(t,n,i){var o=e.call(this,t,null)||this;return o._emitter=i,o._subscription=n.onDidUpdateConfiguration(function(e){return o._updateConfigurationContext(n.getConfiguration())}),o._updateConfigurationContext(n.getConfiguration()),o}return f(t,e),t.prototype.dispose=function(){this._subscription.dispose()},t.prototype._updateConfigurationContext=function(e){var t=this;for(var n in this._value)0===n.indexOf("config.")&&delete this._value[n];var i=function(e,n){for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){n.push(o);var r=e[o];if("boolean"==typeof r){var s=n.join(".");t._value[s]=r,t._emitter.fire(s)}else"object"==typeof r&&i(r,n);n.pop()}};i(e,["config"])},t}(c),h=function(){function e(e,t,n){this._parent=e,this._key=t,this._defaultValue=n,this.reset()}return e.prototype.set=function(e){this._parent.setContext(this._key,e)},e.prototype.reset=function(){void 0===this._defaultValue?this._parent.removeContext(this._key):this._parent.setContext(this._key,this._defaultValue)},e.prototype.get=function(){return this._parent.getContextKeyValue(this._key)},e}(),p=function(){function e(e){this._myContextId=e,this._onDidChangeContextKey=new a.Emitter}return e.prototype.createKey=function(e,t){return new h(this,e,t)},Object.defineProperty(e.prototype,"onDidChangeContext",{get:function(){return this._onDidChangeContext||(this._onDidChangeContext=a.debounceEvent(this._onDidChangeContextKey.event,function(e,t){return e?e.indexOf(t)<0&&e.push(t):e=[t],e},25)),this._onDidChangeContext},enumerable:!0,configurable:!0}),e.prototype.createScoped=function(e){return new m(this,this._onDidChangeContextKey,e)},e.prototype.contextMatchesRules=function(e){var t=this.getContextValuesContainer(this._myContextId);return o.KeybindingResolver.contextMatchesRules(t,e)},e.prototype.getContextKeyValue=function(e){return this.getContextValuesContainer(this._myContextId).getValue(e)},e.prototype.setContext=function(e,t){this.getContextValuesContainer(this._myContextId).setValue(e,t)&&this._onDidChangeContextKey.fire(e)},e.prototype.removeContext=function(e){this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContextKey.fire(e)},e.prototype.getContext=function(e){return this.getContextValuesContainer(u(e))},e}();t.AbstractContextKeyService=p;var g=function(e){function t(t){var n=e.call(this,0)||this;n._toDispose=[],n._lastContextId=0,n._contexts=Object.create(null);var i=new d(n._myContextId,t,n._onDidChangeContextKey);return n._contexts[String(n._myContextId)]=i,n._toDispose.push(i),n}return f(t,e),t.prototype.dispose=function(){this._toDispose=n.dispose(this._toDispose)},t.prototype.getContextValuesContainer=function(e){return this._contexts[String(e)]},t.prototype.createChildContext=function(e){void 0===e&&(e=this._myContextId);var t=++this._lastContextId;return this._contexts[String(t)]=new c(t,this.getContextValuesContainer(e)),t},t.prototype.disposeContext=function(e){delete this._contexts[String(e)]},t=v([y(0,s.IConfigurationService)],t)}(p);t.ContextKeyService=g;var m=function(e){function t(t,n,i){var o=e.call(this,t.createChildContext())||this;return o._parent=t,o._onDidChangeContextKey=n,i&&(o._domNode=i,o._domNode.setAttribute(l,String(o._myContextId))),o}return f(t,e),t.prototype.dispose=function(){this._parent.disposeContext(this._myContextId),this._domNode&&this._domNode.removeAttribute(l)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return this._parent.onDidChangeContext},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){return void 0===e&&(e=this._myContextId),this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._parent.disposeContext(e)},t}(p);i.CommandsRegistry.registerCommand(r.SET_CONTEXT_COMMAND_ID,function(e,t,n){e.get(r.IContextKeyService).createKey(String(t),n)})}),define(d[418],h([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o}}();t.ResolvedKeybindingItem=n}),define(d[419],h([1,0,40,155]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var i=e.call(this)||this;return i._os=n,null===t?(i._firstPart=null,i._chordPart=null):2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return f(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return n.KeyCodeUtils.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return i.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":n.KeyCodeUtils.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return i.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._keyCodeToElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return n.KeyCodeUtils.toString(e)},t.prototype._getElectronAcceleratorLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode):null},t.prototype.getElectronAccelerator=function(){if(null!==this._chordPart)return null;var e=this._getElectronAcceleratorLabelForKeybinding(this._firstPart);return i.ElectronAcceleratorLabelProvider.toLabel(this._firstPart,e,null,null,this._os)},t.prototype._getUserSettingsLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":n.KeyCodeUtils.toUserSettingsUS(e.keyCode):null},t.prototype.getUserSettingsLabel=function(){var e=this._getUserSettingsLabelForKeybinding(this._firstPart),t=this._getUserSettingsLabelForKeybinding(this._chordPart),n=i.UserSettingsLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os);return n?n.toLowerCase():n},t.prototype.isWYSIWYG=function(){return!0},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]},t.prototype._toResolvedKeybindingPart=function(e){return e?new n.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=n.KeyCodeUtils.toString(e.keyCode)},t}(n.ResolvedKeybinding);t.USLayoutResolvedKeybinding=o}),define(d[420],h([1,0,7,11,16]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILifecycleService=o.createDecorator("lifecycleService");!function(e){e[e.CLOSE=1]="CLOSE",e[e.QUIT=2]="QUIT",e[e.RELOAD=3]="RELOAD",e[e.LOAD=4]="LOAD"}(t.ShutdownReason||(t.ShutdownReason={}));var r;!function(e){e[e.NewWindow=1]="NewWindow",e[e.ReloadedWindow=3]="ReloadedWindow",e[e.ReopenedWindow=4]="ReopenedWindow"}(r=t.StartupKind||(t.StartupKind={}));var s;!function(e){e[e.Starting=1]="Starting",e[e.Running=2]="Running",e[e.ShuttingDown=3]="ShuttingDown"}(s=t.LifecyclePhase||(t.LifecyclePhase={})),t.NullLifecycleService={_serviceBrand:null,phase:s.Running,startupKind:r.NewWindow,onDidChangePhase:i.default.None,onWillShutdown:i.default.None,onShutdown:i.default.None},t.handleVetos=function(e,t){if(0===e.length)return n.TPromise.as(!1);for(var i=[],o=!1,r=0,s=e;r0?a:1,u=u>0?u:1,l=l>=a?l:a,c=c>0?c:u,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:u,endLineNumber:l,endColumn:c}},e.prototype.changeAll=function(t,i){var o=[],r=this._byOwner[t];if(r){delete this._byOwner[t];for(var s in r){var u=a.get(this._byResource,s,t)[0];u&&o.push(u.resource),a.remove(this._byResource,s,t)}}if(!n.isFalsyOrEmpty(i)){for(var l=Object.create(null),c=0,d=i;c0&&this._onMarkerChanged.fire(o)},e.prototype.read=function(e){void 0===e&&(e=Object.create(null));var t=e.owner,n=e.resource,i=e.take;if((!i||i<0)&&(i=-1),t&&n)return(d=a.get(this._byResource,n.toString(),t))?d.slice(0,i>0?i:void 0):[];if(t||n){var o=t?this._byOwner[t]:this._byResource[n.toString()];if(!o)return[];d=[];for(var r in o)for(var s=0,u=o[r];s0&&c===i)return d}return d}var d=[];for(var h in this._byResource)for(var p in this._byResource[h])for(var f=0,g=this._byResource[h][p];f0&&c===i)return d}return d},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i0)})(s)&&(Array.isArray(s)?n=n.concat(s.map(e)):n.push(e(s)))}}return n},e.prototype.onResult=function(e,t){this._result=this._result.concat(e)},e.prototype.getResult=function(){return this._result},e.prototype.getResultWithLoadingMessage=function(){return this.getResult()},e}(),d=function(e){function t(i,o,r){var a=e.call(this,t.ID,i)||this;return a.openerService=o,a.modeService=r,a.openerService=o||s.NullOpenerService,a._lastLineNumber=-1,a._computer=new c(a._editor),a._hoverOperation=new n.HoverOperation(a._computer,function(e){return a._withResult(e)},null,function(e){return a._withResult(e)}),a}return f(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start())},t.prototype.startShowingAt=function(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start())},t.prototype.hide=function(){this._lastLineNumber=-1,this._hoverOperation.cancel(),e.prototype.hide.call(this)},t.prototype._withResult=function(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this,i=document.createDocumentFragment();t.forEach(function(e){var t=r.renderMarkedString(e.value,{actionCallback:function(e){return n.openerService.open(a.default.parse(e)).then(void 0,u.onUnexpectedError)},codeBlockRenderer:function(e,t){var i=n.modeService.getModeIdForLanguageName(e);return n.modeService.getOrCreateMode(i).then(function(e){return l.tokenizeToString(t,i)})}});i.appendChild(o.$("div.hover-row",null,t))}),this.updateContents(i),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(i.GlyphHoverWidget);t.ModesGlyphHoverWidget=d}),define(d[163],h([1,0,16]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProgressService=n.createDecorator("progressService"),t.emptyProgress=Object.freeze({report:function(){}});var i=function(){function e(e){this._callback=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.report=function(e){this._value=e,this._callback()},e}();t.Progress=i;!function(e){e[e.Scm=1]="Scm",e[e.Window=10]="Window"}(t.ProgressLocation||(t.ProgressLocation={})),t.IProgressService2=n.createDecorator("progressService2")}),define(d[44],h([1,0,29,72]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new o;var r=function(){function e(){this.toBeInstantiated=[],this.instances=[]}return e.prototype.setInstantiationService=function(e){for(this.instantiationService=e;this.toBeInstantiated.length>0;){var t=this.toBeInstantiated.shift();this.instantiate(t)}},e.prototype.instantiate=function(e){var t=this.instantiationService.createInstance(e);this.instances.push(t)},e.prototype._register=function(e){this.instantiationService?this.instantiate(e):this.toBeInstantiated.push(e)},e.prototype._getInstances=function(){return this.instances.slice(0)},e.prototype._setInstances=function(e){this.instances=e},e}();t.BaseRegistry=r}),define(d[30],h([1,0,44]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorContribution=function(e){o.INSTANCE.registerEditorBrowserContribution(e)};!function(e){e.getEditorContributions=function(){return o.INSTANCE.getEditorBrowserContributions()}}(t.EditorBrowserRegistry||(t.EditorBrowserRegistry={}));var i={EditorContributions:"editor.contributions"},o=function(){function e(){this.editorContributions=[]}return e.prototype.registerEditorBrowserContribution=function(e){this.editorContributions.push(e)},e.prototype.getEditorBrowserContributions=function(){return this.editorContributions.slice(0)},e.INSTANCE=new e,e}();n.Registry.add(i.EditorContributions,o.INSTANCE)}),define(d[126],h([1,0,336,11,44,43,17]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={ModesRegistry:"editor.modesRegistry"};var a=function(){function e(){this._onDidAddLanguages=new i.Emitter,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.registerLanguages=function(e){this._languages=this._languages.concat(e),this._onDidAddLanguages.fire(e)},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}();t.EditorModesRegistry=a,t.ModesRegistry=new a,o.Registry.add(t.Extensions.ModesRegistry,t.ModesRegistry),t.PLAINTEXT_MODE_ID="plaintext",t.PLAINTEXT_LANGUAGE_IDENTIFIER=new s.LanguageIdentifier(t.PLAINTEXT_MODE_ID,1),t.ModesRegistry.registerLanguage({id:t.PLAINTEXT_MODE_ID,extensions:[".txt",".gitignore"],aliases:[n.localize(0,null),"text"],mimetypes:["text/plain"]}),r.LanguageConfigurationRegistry.register(t.PLAINTEXT_LANGUAGE_IDENTIFIER,{brackets:[["(",")"],["[","]"],["{","}"]]})}),define(d[430],h([1,0,339,70,11,36,7,103,2,20,175,15,62,49,126,101,55,34]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,_){"use strict";function C(e){return e.toString()}Object.defineProperty(t,"__esModule",{value:!0});var b=function(){function e(e,t){var n=this;this.model=e,this._markerDecorations=[],this._modelEventsListener=e.addBulkListener(function(e){return t(n,e)})}return e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventsListener.dispose(),this._modelEventsListener=null,this.model=null},e.prototype.getModelId=function(){return C(this.model.uri)},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e}(),w=function(){function e(){}return e.setMarkers=function(e,t){var n=this,i=t.read({resource:e.model.uri,take:500}).map(function(t){return{range:n._createDecorationRange(e.model,t),options:n._createDecorationOption(t)}});e.acceptMarkerDecorations(i)},e._createDecorationRange=function(e,t){var n=e.validateRange(new u.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn)),i=new u.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn);if(i.isEmpty()){var o=e.getWordAtPosition(i.getStartPosition());if(o)i=new u.Range(i.startLineNumber,o.startColumn,i.endLineNumber,o.endColumn);else{var r=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===r||(i=i.endColumn>=r?new u.Range(i.startLineNumber,r-1,i.endLineNumber,r):new u.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){var s=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);s0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};var r=new(function(){function e(){this.schemasById={},this.eventEmitter=new i.EventEmitter}return e.prototype.addRegistryChangedListener=function(e){return this.eventEmitter.addListener("registryChanged",e)},e.prototype.registerSchema=function(e,t){this.schemasById[o(e)]=t,this.eventEmitter.emit("registryChanged",{})},e.prototype.getSchemaContributions=function(){return{schemas:this.schemasById}},e}());n.Registry.add(t.Extensions.JSONContribution,r)}),define(d[127],h([1,0,382,11,44,29,9,433]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function l(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==m.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};var c;!function(e){e[e.WINDOW=1]="WINDOW",e[e.RESOURCE=2]="RESOURCE"}(c=t.ConfigurationScope||(t.ConfigurationScope={})),t.schemaId="vscode://schemas/settings",t.editorConfigurationSchemaId="vscode://schemas/settings/editor",t.resourceConfigurationSchemaId="vscode://schemas/settings/resource";var d=o.Registry.as(a.Extensions.JSONContribution),h=function(){function e(){this.overrideIdentifiers=[],this.configurationContributors=[],this.configurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown configuration setting"},this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.resourceConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Not a resource configuration setting"},this._onDidRegisterConfiguration=new i.Emitter,this.configurationProperties={},this.computeOverridePropertyPattern(),d.registerSchema(t.schemaId,this.configurationSchema),d.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema),d.registerSchema(t.resourceConfigurationSchemaId,this.resourceConfigurationSchema)}return Object.defineProperty(e.prototype,"onDidRegisterConfiguration",{get:function(){return this._onDidRegisterConfiguration.event},enumerable:!0,configurable:!0}),e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],t)},e.prototype.registerConfigurations=function(e,t){var n=this;void 0===t&&(t=!0),e.forEach(function(e){n.validateAndRegisterProperties(e,t),n.configurationContributors.push(e),n.registerJSONConfiguration(e),n.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(this)},e.prototype.registerOverrideIdentifiers=function(e){(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey();var t},e.prototype.registerDefaultConfigurations=function(e){for(var i={id:"defaultOverrides",title:n.localize(0,null),properties:{}},o=0,r=e;o0){var m=t.firstLine;"^"!==m.charAt(0)&&(m="^"+m);try{var v=new RegExp(m);o.regExpLeadsToEndlessLoop(v)||i.registerTextMime({id:r,mime:s,firstline:v})}catch(e){n.onUnexpectedError(e)}}e.aliases.push(r);var _=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(_=0===t.aliases.length?[null]:t.aliases),null!==_)for(var y=0;y<_.length;y++)_[y]&&0!==_[y].length&&e.aliases.push(_[y]);var C=null!==_&&_.length>0;if(C&&null===_[0]);else{var b=(C?_[0]:null)||r;!C&&e.name||(e.name=b)}"string"==typeof t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!c.call(this._mimeTypesMap,e)||c.call(this._languages,e)},e.prototype.getRegisteredModes=function(){return Object.keys(this._languages)},e.prototype.getRegisteredLanguageNames=function(){return Object.keys(this._nameMap)},e.prototype.getLanguageName=function(e){return c.call(this._languages,e)?this._languages[e].name:null},e.prototype.getModeIdForLanguageNameLowercase=function(e){return c.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},e.prototype.getConfigurationFiles=function(e){return c.call(this._languages,e)?this._languages[e].configurationFiles||[]:[]},e.prototype.getMimeForMode=function(e){return c.call(this._languages,e)?this._languages[e].mimetypes[0]||null:null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return c.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e}).filter(function(e){return c.call(t._languages,e)}):[]},e.prototype.getLanguageIdentifier=function(e){if(e===u.NULL_MODE_ID||0===e)return u.NULL_LANGUAGE_IDENTIFIER;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return c.call(this._languages,t)?this._languages[t].identifier:null},e.prototype.getModeIdsFromLanguageName=function(e){return e&&c.call(this._nameMap,e)?[this._nameMap[e].language]:[]},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=i.guessMimeTypes(e,t);return this.extractModeIds(n.join(","))},e.prototype.getExtensions=function(e){if(!c.call(this._nameMap,e))return[];var t=this._nameMap[e];return this._languages[t.language].extensions},e.prototype.getFilenames=function(e){if(!c.call(this._nameMap,e))return[];var t=this._nameMap[e];return this._languages[t.language].filenames},e}();t.LanguagesRegistry=d}),define(d[437],h([1,0,10,11,7,511,436]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._onDidCreateMode=new i.Emitter,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new s.LanguagesRegistry}return e.prototype._onReady=function(){return o.TPromise.as(!0)},e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getRegisteredModes=function(){return this._registry.getRegisteredModes()},e.prototype.getRegisteredLanguageNames=function(){return this._registry.getRegisteredLanguageNames()},e.prototype.getExtensions=function(e){return this._registry.getExtensions(e)},e.prototype.getFilenames=function(e){return this._registry.getFilenames(e)},e.prototype.getMimeForMode=function(e){return this._registry.getMimeForMode(e)},e.prototype.getLanguageName=function(e){return this._registry.getLanguageName(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilenameOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilenameOrFirstLine(e,t);return n.length>0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.getConfigurationFiles=function(e){return this._registry.getConfigurationFiles(e)},e.prototype.lookup=function(e){for(var t=[],n=this._registry.extractModeIds(e),i=0;i0?t[0]:null},e.prototype.getOrCreateModeByFilenameOrFirstLine=function(e,t){var n=this;return this._onReady().then(function(){var i=n.getModeIdByFilenameOrFirstLine(e,t);return n._getOrCreateMode(i||"plaintext")})},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e);this._instantiatedModes[e]=new r.FrankensteinMode(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]},e}();t.ModeServiceImpl=a}),define(d[438],h([1,0,44,442,127,62]),function(e,t,n,i,o,r){"use strict";function s(){var e=Object.create(null),t=n.Registry.as(o.Extensions.Configuration).getConfigurationProperties();for(var i in t)u(e,i,t[i].default,function(e){return console.error("Conflict in default settings: "+e)});return e}function a(e,t){var n=Object.create(null);for(var i in e)u(n,i,e[i],t);return n}function u(e,t,n,i){for(var o=t.split("."),r=o.pop(),s=e,a=0;at.command?1:e.weight2-t.weight2}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.WEIGHT={editorCore:function(e){return void 0===e&&(e=0),0+e},editorContrib:function(e){return void 0===e&&(e=0),100+e},workbenchContrib:function(e){return void 0===e&&(e=0),200+e},builtinExtension:function(e){return void 0===e&&(e=0),300+e},externalExtension:function(e){return void 0===e&&(e=0),400+e}},this._keybindings=[]}return e.bindToCurrentPlatform=function(e){if(1===i.OS){if(e&&e.win)return e.win}else if(2===i.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.bindToCurrentPlatform2=function(e){if(1===i.OS){if(e&&e.win)return e.win}else if(2===i.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t){var o=this,r=e.bindToCurrentPlatform(t);r&&r.primary&&this.registerDefaultKeybinding(n.createKeybinding(r.primary,i.OS),t.id,t.weight,0,t.when),r&&Array.isArray(r.secondary)&&r.secondary.forEach(function(e,r){return o.registerDefaultKeybinding(n.createKeybinding(e,i.OS),t.id,t.weight,-r-1,t.when)})},e.prototype.registerKeybindingRule2=function(t){var n=e.bindToCurrentPlatform2(t);n&&n.primary&&this.registerDefaultKeybinding(n.primary,t.id,t.weight,0,t.when)},e.prototype.registerCommandAndKeybindingRule=function(e){this.registerKeybindingRule(e),o.CommandsRegistry.registerCommand(e.id,e)},e._mightProduceChar=function(e){return e>=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype.registerDefaultKeybinding=function(e,t,n,o,r){1===i.OS&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:null,when:r,weight1:n,weight2:o})},e.prototype.getDefaultKeybindings=function(){var e=this._keybindings.slice(0);return e.sort(s),e},e}();t.KeybindingsRegistry=new a,t.Extensions={EditorModes:"platform.keybindingsRegistry"},r.Registry.add(t.Extensions.EditorModes,t.KeybindingsRegistry)}),define(d[129],h([1,0,70,36,24,7,62,31,414,419,159,46,20,11,438,3,4,65,105,407,40,418,15]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C,b,w,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e){this._widget=e}return e.prototype.getId=function(){return"editor"},e.prototype.getControl=function(){return this._widget},e.prototype.getSelection=function(){return this._widget.getSelection()},e.prototype.focus=function(){this._widget.focus()},e.prototype.isVisible=function(){return!0},e.prototype.withTypedEditor=function(e,t){return h.isCommonCodeEditor(this._widget)?e(this._widget):t(this._widget)},e}();t.SimpleEditor=E;var L=function(){function e(e){this.model=e,this._onDispose=new p.Emitter}return Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!0,configurable:!0}),e.prototype.load=function(){return r.TPromise.as(this)},Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}();t.SimpleModel=L;var x=function(){function e(){this.openEditorDelegate=null}return e.prototype.setEditor=function(e){this.editor=new E(e)},e.prototype.setOpenEditorDelegate=function(e){this.openEditorDelegate=e},e.prototype.openEditor=function(e,t){var n=this;return r.TPromise.as(this.editor.withTypedEditor(function(t){return n.doOpenEditor(t,e)},function(t){return n.doOpenEditor(t.getOriginalEditor(),e)||n.doOpenEditor(t.getModifiedEditor(),e)}))},e.prototype.doOpenEditor=function(e,t){if(!this.findModel(e,t)){if(t.resource){if(this.openEditorDelegate)return this.openEditorDelegate(t.resource.toString()),null;var i=t.resource.scheme;if(i===n.Schemas.http||i===n.Schemas.https)return v.windowOpenNoOpener(t.resource.toString()),this.editor}return null}var o=t.options.selection;if(o)if("number"==typeof o.endLineNumber&&"number"==typeof o.endColumn)e.setSelection(o),e.revealRangeInCenter(o);else{var r={lineNumber:o.startLineNumber,column:o.startColumn};e.setPosition(r),e.revealPositionInCenter(r)}return this.editor},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.resource.toString()?null:n},e}();t.SimpleEditorService=x;var N=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=new E(e)},e.prototype.createModelReference=function(e){var t,n=this;return(t=this.editor.withTypedEditor(function(t){return n.findModel(t,e)},function(t){return n.findModel(t.getOriginalEditor(),e)||n.findModel(t.getModifiedEditor(),e)}))?r.TPromise.as(new m.ImmortalReference(new L(t))):r.TPromise.as(new m.ImmortalReference(null))},e.prototype.registerTextModelContentProvider=function(e,t){return{dispose:function(){}}},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},e}();t.SimpleEditorModelResolverService=N;var M=function(){function e(){}return e.prototype.show=function(){return e.NULL_PROGRESS_RUNNER},e.prototype.showWhile=function(e,t){return null},e.NULL_PROGRESS_RUNNER={done:function(){},total:function(){},worked:function(){}},e}();t.SimpleProgressService=M;var T=function(){function e(){}return e.prototype.show=function(t,n){switch(t){case i.default.Error:console.error(n);break;case i.default.Warning:console.warn(n);break;default:console.log(n)}return e.Empty},e.prototype.hideAll=function(){},e.prototype.confirm=function(e){var t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),window.confirm(t)},e.Empty=function(){},e}();t.SimpleMessageService=T;var k=function(){function e(e){this._onWillExecuteCommand=new p.Emitter,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e,t){var n=this;return this._dynamicCommands[e]=t,{dispose:function(){delete n._dynamicCommands[e]}}},e.prototype.executeCommand=function(e){for(var t=[],n=1;n.001){C=!1;break}}var L=r.getTimeSinceLastZoomLevelChanged()>2e3;return new a.FontInfo({zoomLevel:r.getZoomLevel(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:C,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,spaceWidth:s.width,maxDigitWidth:y},L)},t.INSTANCE=new t,t}(i.Disposable),p=function(e){function t(t,n){void 0===n&&(n=null);var i=e.call(this,t)||this;return i._elementSizeObserver=i._register(new u.ElementSizeObserver(n,function(){return i._onReferenceDomElementSizeChanged()})),i._register(h.INSTANCE.onDidChange(function(){return i._onCSSBasedConfigurationChanged()})),i._validatedOptions.automaticLayout&&i._elementSizeObserver.startObserving(),i._register(r.onDidChangeZoomLevel(function(e){return i._recomputeOptions()})),i._register(r.onDidChangeAccessibilitySupport(function(){return i._recomputeOptions()})),i._recomputeOptions(),i}return f(t,e),t.applyFontInfoSlow=function(e,t){e.style.fontFamily=t.fontFamily,e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"},t.applyFontInfo=function(e,t){e.setFontFamily(t.fontFamily),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return r.isIE?e+="ie ":r.isFirefox?e+="ff ":r.isEdge&&(e+="edge "),o.isMacintosh&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:r.isWebKit,pixelRatio:r.getPixelRatio(),zoomLevel:r.getZoomLevel(),accessibilitySupport:r.getAccessibilitySupport()}},t.prototype.readConfiguration=function(e){return h.INSTANCE.readConfiguration(e)},t}(s.CommonEditorConfiguration);t.Configuration=p}),define(d[443],h([1,0,27,112,66,35]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n._visibleLines=new i.VisibleLinesCollection(n),n.domNode=n._visibleLines.domNode,n._dynamicOverlays=[],n._isFocused=!1,n.domNode.setClassName("view-overlays"),n}return f(t,e),t.prototype.shouldRender=function(){if(e.prototype.shouldRender.call(this))return!0;for(var t=0,n=this._dynamicOverlays.length;t'+i+"")},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}();t.ViewOverlayLine=a;var u=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return f(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(s);t.ContentViewOverlays=u;var l=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),o.Configuration.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return f(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(o.Configuration.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(s);t.MarginViewOverlays=l}),define(d[444],h([1,0,27,12,2,49,66,4]),function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){return function(e,t,n,i){this.top=e,this.left=t,this.width=n,this.textContent=i}}(),l=function(){function e(e,t){this._context=e,this._isSecondary=t,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._isVisible=!0,this._domNode=n.createFastDomNode(document.createElement("div")),this._isSecondary?this._domNode.setClassName("cursor secondary"):this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new i.Position(1,1)),this._isInEditableRange=!0,this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getIsInEditableRange=function(){return this._isInEditableRange},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),e.fontInfo&&(s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},e.prototype.onCursorPositionChanged=function(e,t){return this.updatePosition(e),this._isInEditableRange=t,!0},e.prototype._prepareRender=function(e){if(this._cursorStyle===r.TextEditorCursorStyle.Line||this._cursorStyle===r.TextEditorCursorStyle.LineThin){var t=e.visibleRangeForPosition(this._position);if(!t)return null;var n;n=this._cursorStyle===r.TextEditorCursorStyle.Line?a.computeScreenAwareSize(2):a.computeScreenAwareSize(1);var i=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new u(i,t.left,n,"")}var s=e.linesVisibleRangesForRange(new o.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!s||0===s.length||0===s[0].ranges.length)return null;var l=s[0].ranges[0],c=l.width<1?this._typicalHalfwidthCharacterWidth:l.width,d="";this._cursorStyle===r.TextEditorCursorStyle.Block&&(d=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1));var h=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new u(h,l.left,c,d)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._lineHeight),this._domNode.setHeight(this._lineHeight),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._lineHeight,width:2}):(this._domNode.setDisplay("none"),null)},e.prototype.updatePosition=function(e){this._position=e},e}();t.ViewCursor=l}),define(d[58],h([1,0,16]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(d[13],h([1,0,10,24,31,105,44,58,12,56,85,64,19,42]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function g(e){return e.get(p.ICodeEditorService).getFocusedCodeEditor()}function m(e){var t=e.get(d.IEditorService),n=t.getActiveEditor&&t.getActiveEditor();return p.getCodeEditor(n)}function v(e){return w.registerEditorCommand(e),e}Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._description=e.description}return e.prototype.toCommandAndKeybindingRule=function(e){var t=this,n=this._kbOpts||{primary:0},i=n.kbExpr;this.precondition&&(i=i?h.ContextKeyExpr.and(i,this.precondition):this.precondition);var o="number"==typeof n.weight?n.weight:e;return{id:this.id,handler:function(e,n){return t.runCommand(e,n)},weight:o,when:i,primary:n.primary,secondary:n.secondary,win:n.win,linux:n.linux,mac:n.mac,description:this._description}},e}();t.Command=y;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.bindToContribution=function(e){return function(t){function n(e){var n=t.call(this,e)||this;return n._callback=e.handler,n}return f(n,t),n.prototype.runEditorCommand=function(t,n,i){e(n)&&this._callback(e(n))},n}(t)},t.prototype.runCommand=function(e,t){var n=this,i=g(e);if(i||(i=m(e)),i)return i.invokeWithinContext(function(e){if(e.get(h.IContextKeyService).contextMatchesRules(n.precondition))return n.runEditorCommand(e,i,t)})},t}(y);t.EditorCommand=C;var b=function(e){function t(t){var n=e.call(this,t)||this;return n.label=t.label,n.alias=t.alias,n.menuOpts=t.menuOpts,n}return f(t,e),t.prototype.toMenuItem=function(){return this.menuOpts?{command:{id:this.id,title:this.label},when:this.precondition,group:this.menuOpts.group,order:this.menuOpts.order}:null},t.prototype.runEditorCommand=function(e,t,n){return this.reportTelemetry(e,t),this.run(e,t,n||{})},t.prototype.reportTelemetry=function(e,t){e.get(a.ITelemetryService).publicLog("editorActionInvoked",_({name:this.label,id:this.id},t.getTelemetryData()))},t}(C);t.EditorAction=b,t.editorAction=function(e){w.registerEditorAction(new e)},t.editorCommand=function(e){v(new e)},t.registerEditorCommand=v,t.commonEditorContribution=function(e){E.INSTANCE.registerEditorContribution(e)};var w;!function(e){function t(e,t){o.CommandsRegistry.registerCommand(e,function(e,n){return t(e,n||{})})}e.registerEditorAction=function(e){E.INSTANCE.registerEditorAction(e)},e.getEditorActions=function(){return E.INSTANCE.getEditorActions()},e.getEditorCommand=function(e){return E.INSTANCE.getEditorCommand(e)},e.getEditorContributions=function(){return E.INSTANCE.getEditorContributions()},e.commandWeight=function(e){return void 0===e&&(e=0),r.KeybindingsRegistry.WEIGHT.editorContrib(e)},e.registerEditorCommand=function(e){E.INSTANCE.registerEditorCommand(e)},e.registerLanguageCommand=t,e.registerDefaultLanguageCommand=function(e,o){t(e,function(e,t){var r=t.resource,s=t.position;if(!(r instanceof i.default))throw n.illegalArgument("resource");if(!u.Position.isIPosition(s))throw n.illegalArgument("position");var a=e.get(l.IModelService).getModel(r);if(!a)throw n.illegalArgument("Can not find open model for "+r);var c=u.Position.lift(s);return o(a,c,t)})}}(w=t.CommonEditorRegistry||(t.CommonEditorRegistry={}));var S={EditorCommonContributions:"editor.commonContributions"},E=function(){function e(){this.editorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}return e.prototype.registerEditorContribution=function(e){this.editorContributions.push(e)},e.prototype.registerEditorAction=function(e){var t=e.toMenuItem();t&&c.MenuRegistry.appendMenuItem(c.MenuId.EditorContext,t),r.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(r.KeybindingsRegistry.WEIGHT.editorContrib())),this.editorActions.push(e)},e.prototype.getEditorContributions=function(){return this.editorContributions.slice(0)},e.prototype.getEditorActions=function(){return this.editorActions.slice(0)},e.prototype.registerEditorCommand=function(e){r.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(r.KeybindingsRegistry.WEIGHT.editorContrib())),this.editorCommands[e.id]=e},e.prototype.getEditorCommand=function(e){return this.editorCommands[e]||null},e.INSTANCE=new e,e}();s.Registry.add(S.EditorCommonContributions,E.INSTANCE)}),define(d[447],h([1,0,10,11,3,7,84,19,321,39,12,2,22,20,330,488,406,55,21,13]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=0,w=function(e){function t(t,n,o,r){var u=e.call(this)||this;return u._onDidDispose=u._register(new i.Emitter),u.onDidDispose=u._onDidDispose.event,u._onDidChangeModelContent=u._register(new i.Emitter),u.onDidChangeModelContent=u._onDidChangeModelContent.event,u._onDidChangeModelLanguage=u._register(new i.Emitter),u.onDidChangeModelLanguage=u._onDidChangeModelLanguage.event,u._onDidChangeModelOptions=u._register(new i.Emitter),u.onDidChangeModelOptions=u._onDidChangeModelOptions.event,u._onDidChangeModelDecorations=u._register(new i.Emitter),u.onDidChangeModelDecorations=u._onDidChangeModelDecorations.event,u._onDidChangeConfiguration=u._register(new i.Emitter),u.onDidChangeConfiguration=u._onDidChangeConfiguration.event,u._onDidChangeModel=u._register(new i.Emitter),u.onDidChangeModel=u._onDidChangeModel.event,u._onDidChangeCursorPosition=u._register(new i.Emitter),u.onDidChangeCursorPosition=u._onDidChangeCursorPosition.event,u._onDidChangeCursorSelection=u._register(new i.Emitter),u.onDidChangeCursorSelection=u._onDidChangeCursorSelection.event,u._onDidLayoutChange=u._register(new i.Emitter),u.onDidLayoutChange=u._onDidLayoutChange.event,u._onDidFocusEditorText=u._register(new i.Emitter),u.onDidFocusEditorText=u._onDidFocusEditorText.event,u._onDidBlurEditorText=u._register(new i.Emitter),u.onDidBlurEditorText=u._onDidBlurEditorText.event,u._onDidFocusEditor=u._register(new i.Emitter),u.onDidFocusEditor=u._onDidFocusEditor.event,u._onDidBlurEditor=u._register(new i.Emitter),u.onDidBlurEditor=u._onDidBlurEditor.event,u._onWillType=u._register(new i.Emitter),u.onWillType=u._onWillType.event,u._onDidType=u._register(new i.Emitter),u.onDidType=u._onDidType.event,u._onDidPaste=u._register(new i.Emitter),u.onDidPaste=u._onDidPaste.event,u.domElement=t,u.id=++b,u._decorationTypeKeysToIds={},u._decorationTypeSubtypes={},n=n||{},u._configuration=u._register(u._createConfiguration(n)),u._register(u._configuration.onDidChange(function(e){u._onDidChangeConfiguration.fire(e),e.layoutInfo&&u._onDidLayoutChange.fire(u._configuration.editor.layoutInfo)})),u._contextKeyService=u._register(r.createScoped(u.domElement)),u._register(new S(u,u._contextKeyService)),u._register(new v.EditorModeContext(u,u._contextKeyService)),u._instantiationService=o.createChild(new s.ServiceCollection([a.IContextKeyService,u._contextKeyService])),u._attachModel(null),u._contributions={},u._actions={},u}return f(t,e),t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return p.EditorType.ICodeEditor},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){for(var t=Object.keys(this._contributions),n=0,i=t.length;n1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty()}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()),this._editorTextFocus.set(this._editor.isFocused())},t}(o.Disposable)}),define(d[134],h([1,0,12,2,20,39,54,173,13,311,21,105,42,19,29,64,119,170]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=o.Handler,C=d.KeybindingsRegistry.WEIGHT.editorCore(),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){this.runCoreEditorCommand(t._getCursors(),n||{})},t}(u.EditorCommand);t.CoreEditorCommand=b;var w;!function(e){e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!g.isObject(e))return!1;var t=e;return!(!g.isString(t.to)||!g.isUndefined(t.by)&&!g.isString(t.by)||!g.isUndefined(t.value)&&!g.isNumber(t.value)||!g.isUndefined(t.revealCursor)&&!g.isBoolean(t.revealCursor))}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=function(t){var n;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}var i;switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}return{direction:n,unit:i,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}};!function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(e.Direction||(e.Direction={}));!function(e){e[e.Line=1]="Line",e[e.WrappedLine=2]="WrappedLine",e[e.Page=3]="Page",e[e.HalfPage=4]="HalfPage"}(e.Unit||(e.Unit={}))}(w=t.EditorScroll_||(t.EditorScroll_={}));var S;!function(e){e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!g.isObject(e))return!1;var t=e;return!(!g.isNumber(t.lineNumber)||!g.isUndefined(t.at)&&!g.isString(t.at))}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(S=t.RevealLine_||(t.RevealLine_={}));var E;!function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return f(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,s.CursorChangeReason.Explicit,[a.CursorMoveCommands.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0)},t}(b);e.MoveTo=u.registerEditorCommand(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=u.registerEditorCommand(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,s.CursorChangeReason.Explicit,n.viewStates.map(function(e){return r.CursorState.fromViewState(e)})),e.setColumnSelectData({toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(!0,n.reversed?1:2)},t}(b);e.ColumnSelect=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return f(t,e),t.prototype._getColumnSelectResult=function(e,t,i,o){var r,s=e.model.validatePosition(o.position);return r=o.viewPosition?e.validateViewPosition(new n.Position(o.viewPosition.lineNumber,o.viewPosition.column),s):e.convertModelPositionToViewPosition(s),l.ColumnSelection.columnSelect(e.config,e.viewModel,t.viewState.selection,r.lineNumber,o.mouseColumn-1)},t}(o))),e.CursorColumnSelectLeft=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3599,linux:{primary:0}}})||this}return f(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return l.ColumnSelection.columnSelectLeft(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(o))),e.CursorColumnSelectRight=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3601,linux:{primary:0}}})||this}return f(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return l.ColumnSelection.columnSelectRight(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(o)));var d=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return f(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return l.ColumnSelection.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(o);e.CursorColumnSelectUp=u.registerEditorCommand(new d({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=u.registerEditorCommand(new d({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3595,linux:{primary:0}}}));var h=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return f(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return l.ColumnSelection.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(o);e.CursorColumnSelectDown=u.registerEditorCommand(new h({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=u.registerEditorCommand(new h({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:3596,linux:{primary:0}}}));var p=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:a.CursorMove.description})||this}return f(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=a.CursorMove.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,s.CursorChangeReason.Explicit,r.CursorState.ensureInEditableRange(e.context,a.CursorMoveCommands.move(e.context,e.getAll(),n))),e.reveal(!0,0)},t}(b);e.CursorMoveImpl=p,e.CursorMove=u.registerEditorCommand(new p);var g;!function(e){e[e.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"}(g||(g={}));var m=function(t){function n(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return f(n,t),n.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},n}(b);e.CursorLeft=u.registerEditorCommand(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=u.registerEditorCommand(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1039}})),e.CursorRight=u.registerEditorCommand(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=u.registerEditorCommand(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1041}})),e.CursorUp=u.registerEditorCommand(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=u.registerEditorCommand(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=u.registerEditorCommand(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:11}})),e.CursorPageUpSelect=u.registerEditorCommand(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1035}})),e.CursorDown=u.registerEditorCommand(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=u.registerEditorCommand(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=u.registerEditorCommand(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:12}})),e.CursorPageDownSelect=u.registerEditorCommand(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1036}})),e.CreateCursor=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return f(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=e.context;if(!n.config.readOnly&&!n.model.hasEditableRange()){var i;i=t.wholeLine?a.CursorMoveCommands.line(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition):a.CursorMoveCommands.moveTo(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var o=e.getAll();if(o.length>1)for(var r=i.modelState?i.modelState.position:null,u=i.viewState?i.viewState.position:null,l=0,c=o.length;lr&&(o=r);var s=new i.Range(o,1,o,e.context.model.getLineMaxColumn(o)),a=0;if(n.at)switch(n.at){case S.RawAtArgument.Top:a=3;break;case S.RawAtArgument.Center:a=1;break;case S.RawAtArgument.Bottom:a=4}var u=e.context.convertModelRangeToViewRange(s);e.revealRange(!1,u,a)},t}(b))),e.SelectAll=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return f(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,s.CursorChangeReason.Explicit,[a.CursorMoveCommands.selectAll(e.context,e.getPrimaryCursor())])},t}(b)))}(E=t.CoreNavigationCommands||(t.CoreNavigationCommands={}));!function(e){e.LineBreakInsert=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:null,mac:{primary:301}}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(u.EditorCommand))),e.Outdent=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:p.ContextKeyExpr.and(c.EditorContextKeys.textFocus,c.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(u.EditorCommand))),e.Tab=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"tab",precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:p.ContextKeyExpr.and(c.EditorContextKeys.textFocus,c.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,v.TypeOperations.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(u.EditorCommand))),e.DeleteLeft=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=_.DeleteOperations.deleteLeft(t._getCursorConfiguration(),t.getModel(),t.getSelections()),o=i[0],r=i[1];o&&t.pushUndoStop(),t.executeCommands(this.id,r)},t}(u.EditorCommand))),e.DeleteRight=u.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=_.DeleteOperations.deleteRight(t._getCursorConfiguration(),t.getModel(),t.getSelections()),o=i[0],r=i[1];o&&t.pushUndoStop(),t.executeCommands(this.id,r)},t}(u.EditorCommand)))}(t.CoreEditingCommands||(t.CoreEditingCommands={}));var L;!function(e){function t(e){return e.get(h.ICodeEditorService).getFocusedCodeEditor()}function n(e){var t=e.get(m.IEditorService),n=t.getActiveEditor&&t.getActiveEditor();return h.getCodeEditor(n)}function i(e){d.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(C))}function o(e){i(new s("default:"+e,e)),i(new s(e,e))}var r=function(e){function i(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return f(i,e),i.prototype.runCommand=function(e,i){var o=t(e);if(o&&o.isFocused())return this._runEditorHandler(o,i);var r=document.activeElement;if(!(r&&["input","textarea"].indexOf(r.tagName.toLowerCase())>=0)){var s=n(e);return s?(s.focus(),this._runEditorHandler(s,i)):void 0}document.execCommand(this._inputHandler)},i.prototype._runEditorHandler=function(e,t){var n=this._editorHandler;"string"==typeof n?e.trigger("keyboard",n,t):((t=t||{}).source="keyboard",n.runEditorCommand(null,e,t))},i}(u.Command);i(new r({editorHandler:E.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:null,kbOpts:{weight:C,kbExpr:null,primary:2079}})),i(new r({editorHandler:y.Undo,inputHandler:"undo",id:y.Undo,precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:2104}})),i(new r({editorHandler:y.Redo,inputHandler:"redo",id:y.Redo,precondition:c.EditorContextKeys.writable,kbOpts:{weight:C,kbExpr:c.EditorContextKeys.textFocus,primary:2103,secondary:[3128],mac:{primary:3128}}}));var s=function(e){function n(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return f(n,e),n.prototype.runCommand=function(e,n){var i=t(e);i&&i.trigger("keyboard",this._handlerId,n)},n}(u.Command);o(y.Type),o(y.ReplacePreviousChar),o(y.CompositionStart),o(y.CompositionEnd),o(y.Paste),o(y.Cut)}(L||(L={}))}),define(d[449],h([1,0,12,20,134]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,o){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=n,this.outgoingEvents=i,this.commandService=o}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,n){this.commandService.executeCommand(i.Handler.Paste,{text:t,pasteOnNewLine:n})},e.prototype.type=function(e,t){this.commandService.executeCommand(i.Handler.Type,{text:t})},e.prototype.replacePreviousChar=function(e,t,n){this.commandService.executeCommand(i.Handler.ReplacePreviousChar,{text:t,replaceCharCnt:n})},e.prototype.compositionStart=function(e){this.commandService.executeCommand(i.Handler.CompositionStart,{})},e.prototype.compositionEnd=function(e){this.commandService.executeCommand(i.Handler.CompositionEnd,{})},e.prototype.cut=function(e){this.commandService.executeCommand(i.Handler.Cut,{})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(o.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(o.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(o.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(o.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(o.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(o.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(o.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(o.CoreNavigationCommands.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}();t.ViewController=r}),define(d[450],h([1,0,342,21,13,241]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n){var i=e.call(this,n)||this;return i.left=t,i}return f(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o0&&(t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop())},t=v([r.editorAction],t)}(r.EditorAction)}),define(d[452],h([1,0,344,28,15,42,13,154,21,314]),function(e,t,n,i,o,r,s,a,u){"use strict";function l(e){return e?s.editorAction:function(){}}Object.defineProperty(t,"__esModule",{value:!0});var c="9_cutcopypaste",d=o.isNative||document.queryCommandSupported("cut"),h=o.isNative||document.queryCommandSupported("copy"),p=h&&!i.isEdgeOrIE,g=o.isNative||!i.isChrome&&document.queryCommandSupported("paste"),m=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return f(t,e),t.prototype.runCommand=function(e,t){var n=e.get(r.ICodeEditorService).getFocusedCodeEditor();n&&n.isFocused()?n.trigger("keyboard",this.id,t):document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(s.EditorAction);(function(e){function t(){var t={kbExpr:u.EditorContextKeys.textFocus,primary:2102,win:{primary:2102,secondary:[1044]}};return o.isNative||(t=null),e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:n.localize(0,null),alias:"Cut",precondition:u.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:c,order:1}})||this}f(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t=v([l(d)],t)})(m),function(e){function t(){var t={kbExpr:u.EditorContextKeys.textFocus,primary:2081,win:{primary:2081,secondary:[2067]}};return o.isNative||(t=null),e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:n.localize(1,null),alias:"Copy",precondition:null,kbOpts:t,menuOpts:{group:c,order:2}})||this}f(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t=v([l(h)],t)}(m),function(e){function t(){var t={kbExpr:u.EditorContextKeys.textFocus,primary:2100,win:{primary:2100,secondary:[1043]}};return o.isNative||(t=null),e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:n.localize(2,null),alias:"Paste",precondition:u.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:c,order:3}})||this}f(t,e),t=v([l(g)],t)}(m),function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:n.localize(3,null),alias:"Copy With Syntax Highlighting",precondition:null,kbOpts:{kbExpr:u.EditorContextKeys.textFocus,primary:null}})||this}f(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||(a.CopyOptions.forceCopyWithSyntaxHighlighting=!0,e.prototype.run.call(this,t,n),a.CopyOptions.forceCopyWithSyntaxHighlighting=!1)},t=v([l(p)],t)}(m)}),define(d[453],h([1,0,10,33,24,7,13,17,56,18]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=[],o=a.CodeLensProviderRegistry.ordered(e),s=o.map(function(i){return l.asWinJsPromise(function(t){return i.provideCodeLenses(e,t)}).then(function(e){if(Array.isArray(e))for(var n=0,o=e;nt.symbol.range.startLineNumber?1:o.indexOf(e.provider)o.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getCodeLensData=c,s.CommonEditorRegistry.registerLanguageCommand("_executeCodeLensProvider",function(e,t){var i=t.resource;if(!(i instanceof o.default))throw n.illegalArgument();var r=e.get(u.IModelService).getModel(i);if(!r)throw n.illegalArgument();return c(r).then(function(e){return e.map(function(e){return e.symbol})})})}),define(d[454],h([1,0,345,40,21,13,189,250]),function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return f(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],o=t.getSelections(),r=n.getOptions(),s=0;s0&&s._contextViewService.hideContextView()})),this._toDispose.push(this._editor.onKeyDown(function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())}))}return t=e,e.get=function(e){return e.getContribution(t.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(e.target.type!==p.MouseTargetType.OVERLAY_WIDGET&&(e.event.preventDefault(),e.target.type===p.MouseTargetType.CONTENT_TEXT||e.target.type===p.MouseTargetType.CONTENT_EMPTY||e.target.type===p.MouseTargetType.TEXTAREA)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);var t;e.target.type!==p.MouseTargetType.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)}},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(c.MenuId.EditorContext,this._contextKeyService),n=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var i=0,o=n;i0&&this._contextViewService.hideContextView(),this._toDispose=i.dispose(this._toDispose)},e.ID="editor.contrib.contextmenu",e=t=v([g.editorContribution,y(1,a.IContextMenuService),y(2,a.IContextViewService),y(3,l.IContextKeyService),y(4,u.IKeybindingService),y(5,c.IMenuService)],e);var t}();t.ContextMenuController=m;!function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:n.localize(0,null),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:d.EditorContextKeys.textFocus,primary:1092}})||this}f(t,e),t.prototype.run=function(e,t){m.get(t).showContextMenu()},t=v([h.editorAction],t)}(h.EditorAction)}),define(d[456],h([1,0,13,3,21,30]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n50&&(n._undoStack=n._undoStack.splice(0,n._undoStack.length-50))),n._prevState=n._readState()})),n}return f(t,e),n=t,t.get=function(e){return e.getContribution(n.ID)},t.prototype._readState=function(){return this._editor.getModel()?new s(this._editor.getSelections()):null},t.prototype.getId=function(){return n.ID},t.prototype.cursorUndo=function(){for(var e=new s(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t=n=v([r.editorContribution],t);var n}(i.Disposable);t.CursorUndoController=a;var u=function(e){function t(){return e.call(this,{id:"cursorUndo",precondition:null,kbOpts:{kbExpr:o.EditorContextKeys.textFocus,primary:2099}})||this}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){a.get(t).cursorUndo()},t=v([n.editorCommand],t)}(n.EditorCommand);t.CursorUndo=u}),define(d[176],h([1,0,348,434,40,3,19,2,22,9,20,13,121,253,252,17,18,54,21,76,34]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S){"use strict";function E(e,t){var n=L.get(e);if(!n)return null;var i,o,r=n.getState(),s=r.wholeWord,a=r.matchCase;if(!e.isFocused()&&r.isRevealed&&r.searchString.length>0)i=r.searchString;else{var l=e.getSelection();if(l.startLineNumber!==l.endLineNumber&&!t.allowMultiline)return null;if(l.isEmpty()){var c=e.getModel().getWordAtPosition(l.getStartPosition());if(!c)return null;i=c.word,o=new u.Selection(l.startLineNumber,c.startColumn,l.startLineNumber,c.endColumn)}else i=e.getModel().getValueInRange(l).replace(/\r\n/g,"\n");t.changeFindSearchString&&n.setSearchString(i)}return t.highlightFindOptions&&n.highlightFindOptions(),{searchText:i,matchCase:a,wholeWord:s,currentMatch:o}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.NoFocusChange=0]="NoFocusChange",e[e.FocusFindInput=1]="FocusFindInput",e[e.FocusReplaceInput=2]="FocusReplaceInput"}(t.FindStartFocusAction||(t.FindStartFocusAction={})),t.CONTEXT_FIND_WIDGET_VISIBLE=new s.RawContextKey("findWidgetVisible",!1),t.CONTEXT_FIND_WIDGET_NOT_VISIBLE=t.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),t.CONTEXT_FIND_INPUT_FOCUSSED=new s.RawContextKey("findInputFocussed",!1);var L=function(e){function n(n,o,r){var s=e.call(this)||this;return s._editor=n,s._findWidgetVisible=t.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(o),s._storageService=r,s._updateHistoryDelayer=new _.Delayer(500),s._currentHistoryNavigator=new i.HistoryNavigator,s._state=s._register(new p.FindReplaceState),s.loadQueryState(),s._register(s._state.addChangeListener(function(e){return s._onStateChanged(e)})),s._model=null,s._register(s._editor.onDidChangeModel(function(){var e=s._editor.getModel()&&s._state.isRevealed;s.disposeModel(),s._state.change({searchScope:null,matchCase:s._storageService.getBoolean("editor.matchCase",w.StorageScope.WORKSPACE,!1),wholeWord:s._storageService.getBoolean("editor.wholeWord",w.StorageScope.WORKSPACE,!1),isRegex:s._storageService.getBoolean("editor.isRegex",w.StorageScope.WORKSPACE,!1)},!1),e&&s._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,shouldFocus:0,shouldAnimate:!1})})),s}return f(n,e),n.get=function(e){return e.getContribution(n.ID)},n.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},n.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},n.prototype.getId=function(){return n.ID},n.prototype._onStateChanged=function(e){this.saveQueryState(e),e.updateHistory&&e.searchString&&this._delayedUpdateHistory(),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel()))},n.prototype.saveQueryState=function(e){e.isRegex&&void 0!==this._state.isRegex&&this._storageService.store("editor.isRegex",this._state.isRegex,w.StorageScope.WORKSPACE),e.wholeWord&&void 0!==this._state.wholeWord&&this._storageService.store("editor.wholeWord",this._state.wholeWord,w.StorageScope.WORKSPACE),e.matchCase&&void 0!==this._state.matchCase&&this._storageService.store("editor.matchCase",this._state.matchCase,w.StorageScope.WORKSPACE)},n.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",w.StorageScope.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",w.StorageScope.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",w.StorageScope.WORKSPACE,this._state.isRegex)},!1)},n.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},n.prototype._updateHistory=function(){this._state.searchString&&this._currentHistoryNavigator.add(this._state.searchString)},n.prototype.getState=function(){return this._state},n.prototype.getHistory=function(){return this._currentHistoryNavigator},n.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},n.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},n.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},n.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},n.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},n.prototype.setSearchString=function(e){this._state.change({searchString:e},!1)},n.prototype.highlightFindOptions=function(){},n.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t={isRevealed:!0};if(e.seedSearchStringFromSelection&&this._editor.getConfiguration().contribInfo.find.seedSearchStringFromSelection){var n=g.getSelectionSearchString(this._editor);n&&(this._state.isRegex?t.searchString=l.escapeRegExpCharacters(n):t.searchString=n)}e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),this._state.change(t,!1),this._model||(this._model=new h.FindModelBoundToEditorModel(this._editor,this._state))}},n.prototype.start=function(e){this._start(e)},n.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},n.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},n.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},n.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},n.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},n.prototype.showPreviousFindTerm=function(){var e=this._currentHistoryNavigator.previous();return e&&this._state.change({searchString:e},!1,!1),!0},n.prototype.showNextFindTerm=function(){var e=this._currentHistoryNavigator.next();return e&&this._state.change({searchString:e},!1,!1),!0},n.ID="editor.contrib.findController",n=v([y(1,s.IContextKeyService),y(2,w.IStorageService)],n)}(r.Disposable);t.CommonFindController=L;var x=function(e){function t(){return e.call(this,{id:h.FIND_IDS.StartFindAction,label:n.localize(0,null),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,mac:{primary:2084,secondary:[2083]}}})||this}return f(t,e),t.prototype.run=function(e,t){var n=L.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,shouldFocus:1,shouldAnimate:!0})},t=v([d.editorAction],t)}(d.EditorAction);t.StartFindAction=x;var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.run=function(e,t){var n=L.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(d.EditorAction);t.MatchFindAction=N;var M=function(e){function t(){return e.call(this,{id:h.FIND_IDS.NextMatchFindAction,label:n.localize(1,null),alias:"Find Next",precondition:null,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]}}})||this}return f(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t=v([d.editorAction],t)}(N);t.NextMatchFindAction=M;var T=function(e){function t(){return e.call(this,{id:h.FIND_IDS.PreviousMatchFindAction,label:n.localize(2,null),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]}}})||this}return f(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t=v([d.editorAction],t)}(N);t.PreviousMatchFindAction=T;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.run=function(e,t){var n=L.get(t);if(n){var i=g.getSelectionSearchString(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(d.EditorAction);t.SelectionMatchFindAction=k;var I=function(e){function t(){return e.call(this,{id:h.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(3,null),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:2109}})||this}return f(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t=v([d.editorAction],t)}(k);t.NextSelectionMatchFindAction=I;var D=function(e){function t(){return e.call(this,{id:h.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(4,null),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:3133}})||this}return f(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t=v([d.editorAction],t)}(k);t.PreviousSelectionMatchFindAction=D;var O=function(e){function t(){return e.call(this,{id:h.FIND_IDS.StartFindReplaceAction,label:n.localize(5,null),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596}}})||this}return f(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var n=L.get(t),i=t.getSelection(),o=!i.isEmpty()&&i.startLineNumber===i.endLineNumber,r=n.getState().searchString||o?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o,shouldFocus:r,shouldAnimate:!0})}},t=v([d.editorAction],t)}(d.EditorAction);t.StartFindReplaceAction=O;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._getNextMatch=function(e){var t=E(e,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(!t)return null;if(t.currentMatch)return t.currentMatch;var n=e.getSelections(),i=n[n.length-1],o=e.getModel().findNextMatch(t.searchText,i.getEndPosition(),!1,t.matchCase,t.wholeWord?e.getConfiguration().wordSeparators:null,!1);return o?new u.Selection(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn):null},t}(d.EditorAction);t.SelectNextFindMatchAction=R;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._getPreviousMatch=function(e){var t=E(e,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(!t)return null;if(t.currentMatch)return t.currentMatch;var n=e.getSelections(),i=n[n.length-1],o=e.getModel().findPreviousMatch(t.searchText,i.getStartPosition(),!1,t.matchCase,t.wholeWord?e.getConfiguration().wordSeparators:null,!1);return o?new u.Selection(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn):null},t}(d.EditorAction);t.SelectPreviousFindMatchAction=P;var A=function(e){function t(){return e.call(this,{id:h.FIND_IDS.AddSelectionToNextFindMatchAction,label:n.localize(6,null),alias:"Add Selection To Next Find Match",precondition:null,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:2082}})||this}return f(t,e),t.prototype.run=function(e,t){var n=t.getSelections();if(n.length>1){var i=t.getModel(),o=L.get(t);if(!o)return;var r=o.getState().matchCase,s=!0,a=i.getValueInRange(n[0]);r||(a=a.toLowerCase());for(var l=1,c=n.length;l0)i=t.getModel().findMatches(o.searchString,!0,o.isRegex,o.matchCase,o.wholeWord?t.getConfiguration().wordSeparators:null,!1).map(function(e){return e.range});else{var r=E(t,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(!r)return;i=t.getModel().findMatches(r.searchText,!0,!1,r.matchCase,r.wholeWord?t.getConfiguration().wordSeparators:null,!1).map(function(e){return e.range})}if(i.length>0){for(var s=t.getSelection(),a=0,l=i.length;a200)return null;var a=L.get(t);if(!a)return null;var u=a.getState().matchCase,l=t.getSelections(),c=n.getValueInRange(l[0]);u||(c=c.toLowerCase());for(var d=1;d=d)s.push(h),u++;else{var p=a.Range.compareRangesUsingStarts(h,r[l]);p<0?(s.push(h),u++):p>0?l++:(u++,l++)}}var f=s.map(function(e){return{range:e,options:i?n._SELECTION_HIGHLIGHT:n._SELECTION_HIGHLIGHT_OVERVIEW}});this.decorations=this.editor.deltaDecorations(this.decorations,f)}else this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=S.ModelDecorationOptions.register({stickiness:c.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:"#A0A0A0",darkColor:"#A0A0A0",position:c.OverviewRulerLane.Center}}),t._SELECTION_HIGHLIGHT=S.ModelDecorationOptions.register({stickiness:c.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t=n=v([d.commonEditorContribution],t);var n}(r.Disposable);t.SelectionHighlighter=U;var j=function(e){function i(){return e.call(this,{id:h.FIND_IDS.ShowNextFindTermAction,label:n.localize(12,null),alias:"Show Next Find Term",precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:s.ContextKeyExpr.and(t.CONTEXT_FIND_INPUT_FOCUSSED,b.EditorContextKeys.focus),primary:h.ShowNextFindTermKeybinding.primary,mac:h.ShowNextFindTermKeybinding.mac,win:h.ShowNextFindTermKeybinding.win,linux:h.ShowNextFindTermKeybinding.linux}})||this}return f(i,e),i.prototype._run=function(e){return e.showNextFindTerm()},i=v([d.editorAction],i)}(N);t.ShowNextFindTermAction=j;var q=function(e){function i(){return e.call(this,{id:h.FIND_IDS.ShowPreviousFindTermAction,label:n.localize(13,null),alias:"Find Show Previous Find Term",precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:s.ContextKeyExpr.and(t.CONTEXT_FIND_INPUT_FOCUSSED,b.EditorContextKeys.focus),primary:h.ShowPreviousFindTermKeybinding.primary,mac:h.ShowPreviousFindTermKeybinding.mac,win:h.ShowPreviousFindTermKeybinding.win,linux:h.ShowPreviousFindTermKeybinding.linux}})||this}return f(i,e),i.prototype._run=function(e){return e.showPreviousFindTerm()},i=v([d.editorAction],i)}(N);t.ShpwPreviousFindTermAction=q;var G=d.EditorCommand.bindToContribution(L.get);d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.CloseFindWidgetCommand,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:9,secondary:[1033]}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:h.ToggleCaseSensitiveKeybinding.primary,mac:h.ToggleCaseSensitiveKeybinding.mac,win:h.ToggleCaseSensitiveKeybinding.win,linux:h.ToggleCaseSensitiveKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:h.ToggleWholeWordKeybinding.primary,mac:h.ToggleWholeWordKeybinding.mac,win:h.ToggleWholeWordKeybinding.win,linux:h.ToggleWholeWordKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:h.ToggleRegexKeybinding.primary,mac:h.ToggleRegexKeybinding.mac,win:h.ToggleRegexKeybinding.win,linux:h.ToggleRegexKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:h.ToggleSearchScopeKeybinding.primary,mac:h.ToggleSearchScopeKeybinding.mac,win:h.ToggleSearchScopeKeybinding.win,linux:h.ToggleSearchScopeKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ReplaceOneAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replace()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:3094}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.ReplaceAllAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replaceAll()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:2563}})),d.CommonEditorRegistry.registerEditorCommand(new G({id:h.FIND_IDS.SelectAllMatchesAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.EditorContextKeys.focus,primary:515}}))}),define(d[458],h([1,0,349,29,4,18,40,3,2,13,25,30,333,257,256,21,328]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m){"use strict";function _(e){if(!i.isUndefined(e)){if(!i.isObject(e))return!1;var t=e;if(!i.isUndefined(t.levels)&&!i.isNumber(t.levels))return!1;if(!i.isUndefined(t.direction)&&!i.isString(t.direction))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e){var t=this;this.editor=e,this._isEnabled=this.editor.getConfiguration().contribInfo.folding,this._showFoldingControls=this.editor.getConfiguration().contribInfo.showFoldingControls,this.globalToDispose=[],this.localToDispose=[],this.decorations=[],this.computeToken=0,this.globalToDispose.push(this.editor.onDidChangeModel(function(){return t.onModelChanged()})),this.globalToDispose.push(this.editor.onDidChangeConfiguration(function(e){var n=t._isEnabled;t._isEnabled=t.editor.getConfiguration().contribInfo.folding,n!==t._isEnabled&&t.onModelChanged();var i=t._showFoldingControls;t._showFoldingControls=t.editor.getConfiguration().contribInfo.showFoldingControls,i!==t._showFoldingControls&&t.updateHideFoldIconClass()})),this.onModelChanged()}return t=e,e.get=function(e){return e.getContribution(g.ID)},e.prototype.getId=function(){return g.ID},e.prototype.dispose=function(){this.cleanState(),this.globalToDispose=a.dispose(this.globalToDispose)},e.prototype.updateHideFoldIconClass=function(){var e=this.editor.getDomNode();e&&o.toggleClass(e,"alwaysShowFoldIcons","always"===this._showFoldingControls)},e.prototype.saveViewState=function(){var e=this.editor.getModel();if(!e)return{};var t=[];return this.decorations.forEach(function(n){if(n.isCollapsed){var i=n.getDecorationRange(e);i&&t.push({startLineNumber:i.startLineNumber,endLineNumber:i.endLineNumber,indent:n.indent,isCollapsed:!0})}}),{collapsedRegions:t,lineCount:e.getLineCount()}},e.prototype.restoreViewState=function(e){var t=this.editor.getModel();t&&this._isEnabled&&e&&Array.isArray(e.collapsedRegions)&&0!==e.collapsedRegions.length&&e.lineCount===t.getLineCount()&&(this.cleanState(),this.applyRegions(e.collapsedRegions),this.onModelChanged())},e.prototype.cleanState=function(){this.localToDispose=a.dispose(this.localToDispose)},e.prototype.applyRegions=function(e){var n=this,i=this.editor.getModel();if(i){var o=!1;e=p.limitByIndent(e,t.MAX_FOLDING_REGIONS).sort(function(e,t){return e.startLineNumber-t.startLineNumber}),this.editor.changeDecorations(function(t){for(var r=[],s=0,a=0;ae[s].startLineNumber;){d=e[s];o=o||d.isCollapsed,r.push(new h.CollapsibleRegion(d,i,t)),s++}if(s0&&(u.forEach(function(e,n){t.editor.changeDecorations(function(t){e.setCollapsed(!1,t),i=!0})}),!h.doesLineBelongsToCollapsibleRegion(u[0].foldingRange,s.startLineNumber))){var l=u[0].startLineNumber,c=n.getLineMaxColumn(u[0].startLineNumber);o[a]=s.setEndPosition(l,c).setStartPosition(l,c),r=!0}}),r&&this.editor.setSelections(o),i&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.fold=function(e,t){var n=this,i=!1,o=this.editor.getSelections();o.forEach(function(o){var r=o.startLineNumber;h.getCollapsibleRegionsToFoldAtLine(n.decorations,n.editor.getModel(),r,e,t).forEach(function(e){return n.editor.changeDecorations(function(t){e.setCollapsed(!0,t),i=!0})})}),i&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.foldUnfoldRecursively=function(e){var t=this,n=!1,i=this.editor.getModel(),o=this.editor.getSelections();o.forEach(function(o){for(var r,s=o.startLineNumber,a=[],u=0,l=t.decorations.length;u=s&&(d.endLineNumber<=r||void 0===r))){if(d.startLineNumber!==s&&void 0===r)return;r=r||d.endLineNumber,a.push(c)}}a.length>0&&a.forEach(function(i){t.editor.changeDecorations(function(t){i.setCollapsed(e,t),n=!0})})}),n&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.foldAll=function(){this.changeAll(!0)},e.prototype.unfoldAll=function(){this.changeAll(!1)},e.prototype.changeAll=function(e){var t=this;if(this.decorations.length>0){var n=!0;this.editor.changeDecorations(function(i){t.decorations.forEach(function(t){e!==t.isCollapsed&&(t.setCollapsed(e,i),n=!0)})}),n&&this.updateHiddenAreas(this.editor.getPosition().lineNumber)}},e.prototype.foldLevel=function(e,t){var n=this,i=this.editor.getModel(),o=[i.getFullModelRange()],r=!1;this.editor.changeDecorations(function(s){n.decorations.forEach(function(n){var a=n.getDecorationRange(i);if(a){for(;!u.Range.containsRange(o[o.length-1],a);)o.pop();o.push(a),o.length!==e+1||n.isCollapsed||t.some(function(e){return a.startLineNumber1)){var n=this.editor.getModel(),o=this.editor.getPosition(),r=!1,s=this.editor.onDidChangeModelContent(function(e){if(e.isFlush)return r=!0,void s.dispose();for(var t=0,n=e.changes.length;t1)){var n=this.editor.getModel(),o=n.getOptions(),r=o.tabSize,s=o.insertSpaces,a=new b.EditorState(this.editor,5);c.getDocumentRangeFormattingEdits(n,e,{tabSize:r,insertSpaces:s}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e,[])}).then(function(e){a.validate(t.editor)&&!i.isFalsyOrEmpty(e)&&(d.EditOperationsCommand.execute(t.editor,e),S(e))})}},e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){this.callOnDispose=r.dispose(this.callOnDispose),this.callOnModel=r.dispose(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=t=v([u.commonEditorContribution,y(1,g.IEditorWorkerService)],e);var t}();var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.run=function(e,t){var n=e.get(g.IEditorWorkerService),o=this._getFormattingEdits(t);if(!o)return s.TPromise.as(void 0);var r=new b.EditorState(t,5);return o.then(function(e){return n.computeMoreMinimalEdits(t.getModel().uri,e,t.getSelections())}).then(function(e){r.validate(t)&&!i.isFalsyOrEmpty(e)&&(d.EditOperationsCommand.execute(t,e),S(e),t.focus())})},t}(u.EditorAction);t.AbstractFormatAction=E;var L=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:n.localize(4,null),alias:"Format Document",precondition:a.ContextKeyExpr.and(w.EditorContextKeys.writable,w.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:w.EditorContextKeys.textFocus,primary:1572,linux:{primary:3111}},menuOpts:{group:"1_modification",order:1.3}})||this}return f(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return c.getDocumentFormattingEdits(t,{tabSize:i,insertSpaces:o})},t=v([u.editorAction],t)}(E);t.FormatDocumentAction=L;var x=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:n.localize(5,null),alias:"Format Code",precondition:a.ContextKeyExpr.and(w.EditorContextKeys.writable,w.EditorContextKeys.hasDocumentSelectionFormattingProvider,w.EditorContextKeys.hasNonEmptySelection),kbOpts:{kbExpr:w.EditorContextKeys.textFocus,primary:o.KeyChord(2089,2084)},menuOpts:{group:"1_modification",order:1.31}})||this}return f(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return c.getDocumentRangeFormattingEdits(t,e.getSelection(),{tabSize:i,insertSpaces:o})},t=v([u.editorAction],t)}(E);t.FormatSelectionAction=x,h.CommandsRegistry.registerCommand("editor.action.format",function(e){var t=e.get(p.ICodeEditorService).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return f(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=e.getSelection(),i=t.getOptions(),o=i.tabSize,r=i.insertSpaces;return n.isEmpty()?c.getDocumentFormattingEdits(t,{tabSize:o,insertSpaces:r}):c.getDocumentRangeFormattingEdits(t,n,{tabSize:o,insertSpaces:r})},t}(E))).run(e,t)})}),define(d[177],h([1,0,10,7,13,17,18]),function(e,t,n,i,o,r,s){"use strict";function a(e){return i.TPromise.join(e).then(function(e){for(var t=[],n=0,i=e;n0;t&&n&&(r[o]=e)}},function(e){i.onUnexpectedExternalError(e)})});return o.TPromise.join(u).then(function(){return n.coalesce(r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getHover=u,r.CommonEditorRegistry.registerDefaultLanguageCommand("_executeHoverProvider",u)}),define(d[463],h([1,0,355,24,10,4,7,102,71,2,12,17,122,462,195,196,133,34,242,245,246,247,32,3]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C,b,w,S,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var L=r.$,x=function(){return function(e,t,n,i){this.range=e,this.color=t,this.format=n,this.availableFormats=i}}(),N=function(){function e(e){this._editor=e,this._range=null}return e.prototype.setRange=function(e){this._range=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeAsync=function(){var e=this._editor.getModel();return d.HoverProviderRegistry.has(e)?p.getHover(e,new c.Position(this._range.startLineNumber,this._range.startColumn)):s.TPromise.as(null)},e.prototype.computeSync=function(){var e=this,t=this._range.startLineNumber;if(t>this._editor.getModel().getLineCount())return[];var n=function(e){return e&&(!Array.isArray(e)||e.length>0)},i=this._editor.getModel().getLineMaxColumn(t);return this._editor.getLineDecorations(t).map(function(o){var r=o.range.startLineNumber===t?o.range.startColumn:1,s=o.range.endLineNumber===t?o.range.endColumn:i;if(r>e._range.startColumn||e._range.endColumn>s)return null;var a=new l.Range(e._range.startLineNumber,r,e._range.startLineNumber,s),u=o.options,c=u&&u.extraOptions;if(b.isColorDecorationOptions(c)){var d=c.color,h=c.format,p=c.availableFormats;return new x(a,d,h,p)}if(!n(o.options.hoverMessage))return null;var f=void 0;return o.options.hoverMessage&&(f=Array.isArray(o.options.hoverMessage)?o.options.hoverMessage.slice():[o.options.hoverMessage]),{contents:f,range:a}}).filter(function(e){return!!e})},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort(function(e,t){return e instanceof x?-1:t instanceof x?1:0})):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[v.textToMarkedString(n.localize(0,null))]}},e}(),M=function(e){function t(n,i,o){var s=e.call(this,t.ID,n)||this;return s._computer=new N(s._editor),s._highlightDecorations=[],s._isChangingDecorations=!1,s._openerService=i||u.NullOpenerService,s._modeService=o,s._hoverOperation=new g.HoverOperation(s._computer,function(e){return s._withResult(e,!0)},null,function(e){return s._withResult(e,!1)}),s.toDispose=[],s.toDispose.push(r.addStandardDisposableListener(s.getDomNode(),r.EventType.FOCUS,function(){s._colorPicker&&r.addClass(s.getDomNode(),"colorpicker-hover")})),s.toDispose.push(r.addStandardDisposableListener(s.getDomNode(),r.EventType.BLUR,function(){r.removeClass(s.getDomNode(),"colorpicker-hover")})),s}return f(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),this._colorPicker&&this._colorPicker.dispose(),this.toDispose=E.dispose(this.toDispose),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start())},t.prototype.startShowingAt=function(e,t){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,o=this._messages.length;i=e.endColumn&&n.push(r)}n.length>0?this._renderMessages(e,n):this.hide()}this._lastRange=e,this._computer.setRange(e),this._shouldFocus=t,this._hoverOperation.start()}},t.prototype.hide=function(){this._lastRange=null,this._hoverOperation.cancel(),e.prototype.hide.call(this),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._colorPicker=null,this._colorPicker&&this._colorPicker.dispose()},t.prototype.isColorPickerVisible=function(){return!!this._colorPicker},t.prototype._withResult=function(e,t){this._messages=e,this._lastRange&&this._messages.length>0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var r=this,s=Number.MAX_VALUE,u=n[0].range,d=document.createDocumentFragment();n.forEach(function(e){if(e.range)if(s=Math.min(s,e.range.startColumn),u=l.Range.plusRange(u,e.range),e instanceof x){var t=void 0,n=void 0;"string"==typeof e.format?t=new w.ColorFormatter(e.format):(t=new w.ColorFormatter(e.format.opaque),n=new w.ColorFormatter(e.format.transparent));var c=[];e.availableFormats&&e.availableFormats.forEach(function(e){var t;t="string"==typeof e?new w.ColorFormatter(e):{opaqueFormatter:new w.ColorFormatter(e.opaque),transparentFormatter:new w.ColorFormatter(e.transparent)},c.push(t)});var p=e.color,f=p.red,g=p.green,m=p.blue,v=p.alpha,_=new S.RGBA(255*f,255*g,255*m,255*v),b=S.Color.fromRGBA(_),E=new y.ColorPickerModel(_.toString(),b,t,n,c,r._editor.getModel(),e.range),N=r._register(new C.ColorPickerWidget(E,r._editor));E.widget=N,r._colorPicker=N,d.appendChild(N.getDomNode())}else e.contents.filter(function(e){return!!e}).forEach(function(e){var t=a.renderMarkedString(e,{actionCallback:function(e){r._openerService.open(i.default.parse(e)).then(void 0,o.onUnexpectedError)},codeBlockRenderer:function(e,t){var n=e?r._modeService.getModeIdForLanguageName(e):r._editor.getModel().getLanguageIdentifier().language;return r._modeService.getOrCreateMode(n).then(function(e){return h.tokenizeToString(t,n)})}});d.appendChild(L("div.hover-row",null,t))})}),this.showAt(new c.Position(e.startLineNumber,s),this._shouldFocus),this.updateContents(d),this._colorPicker&&(this._colorPicker.layout(),this._colorPicker.layoutSaturationBox()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:u,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=_.ModelDecorationOptions.register({className:"hoverHighlight"}),t}(m.ContentHoverWidget);t.ModesContentHoverWidget=M}),define(d[464],h([1,0,357,40,266,59,435,21,73,2,22,13,264,265,319,119,134]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return f(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;oe.endLineNumber+1?(o.push(e),t):new c.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new c.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)});o.push(s);for(var a=t.getModel(),u=[],d=[],h=i,p=0,f=0,g=o.length;f=1){var N=!0;""===S&&(N=!1),!N||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(N=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var M=L.substr(x-1);S+=(N?" ":"")+M,C=N?M.length+1:M.length}else C=0}var T=new l.Range(v,1,_,y);if(!T.isEmpty()){var k=void 0;m.isEmpty()?(u.push(r.EditOperation.replace(T,S)),k=new c.Selection(T.startLineNumber-p,S.length-C+1,v-p,S.length-C+1)):m.startLineNumber===m.endLineNumber?(u.push(r.EditOperation.replace(T,S)),k=new c.Selection(m.startLineNumber-p,m.startColumn,m.endLineNumber-p,m.endColumn)):(u.push(r.EditOperation.replace(T,S)),k=new c.Selection(m.startLineNumber-p,m.startColumn,m.startLineNumber-p,S.length-b)),null!==l.Range.intersectRanges(T,i)?h=k:d.push(k)}p+=T.endLineNumber-T.startLineNumber}d.unshift(h),t.executeEdits(this.id,u,d)},t=v([d.editorAction],t)}(d.EditorAction);t.JoinLinesAction=T;var k=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.localize(15,null),alias:"Transpose characters around the cursor",precondition:a.EditorContextKeys.writable})||this}return f(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r=h){if(d.lineNumber===i.getLineCount())continue;var p=new l.Range(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommand(new c.Selection(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),f))}else{var p=new l.Range(d.lineNumber,Math.max(1,d.column-1),d.lineNumber,d.column+1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommandThatPreservesSelection(p,f,new c.Selection(d.lineNumber,d.column+1,d.lineNumber,d.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()},t=v([d.editorAction],t)}(d.EditorAction);t.TransposeAction=k;var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r1&&i.push(new r.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)),i},t.prototype.run=function(e,t){var n=this,i=t.getSelections().map(function(e){return n.getCursorsForSelection(e,t)}).reduce(function(e,t){return e.concat(t)});i.length>0&&t.setSelections(i)},t=v([o.editorAction],t)}(o.EditorAction)}),define(d[178],h([1,0,10,13,17,18,19]),function(e,t,n,i,o,r,s){"use strict";function a(e,t){var i,s=o.SignatureHelpProviderRegistry.ordered(e);return r.sequence(s.map(function(o){return function(){if(!i)return r.asWinJsPromise(function(n){return o.provideSignatureHelp(e,t,n)}).then(function(e){i=e},n.onUnexpectedExternalError)}})).then(function(){return i})}Object.defineProperty(t,"__esModule",{value:!0}),t.Context={Visible:new s.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new s.RawContextKey("parameterHintsMultipleSignatures",!1)},t.provideSignatureHelp=a,i.CommonEditorRegistry.registerDefaultLanguageCommand("_executeSignatureHelpProvider",a)}),define(d[467],h([1,0,24,2,17,18,7,10,56,13]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e,t){var n=[],i=o.CodeActionProviderRegistry.all(e).map(function(i){return r.asWinJsPromise(function(n){return i.provideCodeActions(e,t,n)}).then(function(e){if(Array.isArray(e))for(var t=0,i=e;tthis.context.column&&this.completionModel.incomplete&&0!==e.leadingWord.word.length){var t=this.completionModel.resolveIncompleteInfo(),n=t.complete,i=t.incomplete;this.trigger(2===this._state,!0,i,n)}else{var o=this.completionModel.lineContext,r=!1;if(this.completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this.context.column},0===this.completionModel.items.length){if(p.shouldAutoTrigger(this.editor)&&this.context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this.completionModel,auto:this.context.auto,isFrozen:r})}}else this.cancel()},e}();t.SuggestModel=f}),define(d[181],h([1,0,373,13,168]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return e.call(this,{id:r.ID,label:n.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323}}})||this}return f(t,e),r=t,t.prototype.run=function(e,t){var n=o.TabFocus.getTabFocusMode();o.TabFocus.setTabFocusMode(!n)},t.ID="editor.action.toggleTabFocusMode",t=r=v([i.editorAction],t);var r}(i.EditorAction);t.ToggleTabFocusModeAction=r}),define(d[476],h([1,0,21,22,13,12,2,172,73,94,39,54]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n._wordNavigationType=t.wordNavigationType,n}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),s=l.getMapForWordSeparators(o.wordSeparators),a=t.getModel(),u=t.getSelections().map(function(e){var t=new r.Position(e.positionLineNumber,e.positionColumn),n=i._move(s,a,t,i._wordNavigationType);return i._moveTo(e,n,i._inSelectionMode)});if(t._getCursors().setStates("moveWordCommand",d.CursorChangeReason.NotSet,u.map(function(e){return c.CursorState.fromModelSelection(e)})),1===u.length){var h=new r.Position(u[0].positionLineNumber,u[0].positionColumn);t.revealPosition(h,!1,!0)}},t.prototype._moveTo=function(e,t,n){return n?new i.Selection(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new i.Selection(t.lineNumber,t.column,t.lineNumber,t.column)},t}(o.EditorCommand);t.MoveWordCommand=h;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._move=function(e,t,n,i){return a.WordOperations.moveWordLeft(e,t,n,i)},t}(h);t.WordLeftCommand=p;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._move=function(e,t,n,i){return a.WordOperations.moveWordRight(e,t,n,i)},t}(h);t.WordRightCommand=g;var m=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:2063,mac:{primary:527}}})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordStartLeft=m;var _=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndLeft",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordEndLeft=_;var y=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordLeft",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordLeft=y;var C=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:3087,mac:{primary:1551}}})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordStartLeftSelect=C;var b=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndLeftSelect",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordEndLeftSelect=b;var w=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordLeftSelect",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(p);t.CursorWordLeftSelect=w;var S=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordStartRight=S;var E=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndRight",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:2065,mac:{primary:529}}})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordEndRight=E;var L=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordRight",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordRight=L;var x=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordStartRightSelect=x;var N=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndRightSelect",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:3089,mac:{primary:1553}}})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordEndRightSelect=N;var M=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordRightSelect",precondition:null})||this}return f(t,e),t=v([o.editorCommand],t)}(g);t.CursorWordRightSelect=M;var T=function(e){function t(t){var n=e.call(this,t)||this;return n._whitespaceHeuristics=t.whitespaceHeuristics,n._wordNavigationType=t.wordNavigationType,n}return f(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),r=l.getMapForWordSeparators(o.wordSeparators),s=t.getModel(),a=t.getSelections().map(function(e){var t=i._delete(r,s,e,i._whitespaceHeuristics,i._wordNavigationType);return new u.ReplaceCommand(t,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(o.EditorCommand);t.DeleteWordCommand=T;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._delete=function(e,t,n,i,o){var r=a.WordOperations.deleteWordLeft(e,t,n,i,o);return r||new s.Range(1,1,1,1)},t}(T);t.DeleteWordLeftCommand=k;var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._delete=function(e,t,n,i,o){var r=a.WordOperations.deleteWordRight(e,t,n,i,o);if(r)return r;var u=t.getLineCount(),l=t.getLineMaxColumn(u);return new s.Range(u,l,u,l)},t}(T);t.DeleteWordRightCommand=I;var D=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:n.EditorContextKeys.writable})||this}return f(t,e),t=v([o.editorCommand],t)}(k);t.DeleteWordStartLeft=D;var O=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndLeft",precondition:n.EditorContextKeys.writable})||this}return f(t,e),t=v([o.editorCommand],t)}(k);t.DeleteWordEndLeft=O;var R=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:2049,mac:{primary:513}}})||this}return f(t,e),t=v([o.editorCommand],t)}(k);t.DeleteWordLeft=R;var P=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:n.EditorContextKeys.writable})||this}return f(t,e),t=v([o.editorCommand],t)}(I);t.DeleteWordStartRight=P;var A=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndRight",precondition:n.EditorContextKeys.writable})||this}return f(t,e),t=v([o.editorCommand],t)}(I);t.DeleteWordEndRight=A;var F=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordRight",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textFocus,primary:2068,mac:{primary:532}}})||this}return f(t,e),t=v([o.editorCommand],t)}(I);t.DeleteWordRight=F}),define(d[477],h([1,0,381,13,77]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){function t(){var t=e.call(this,{id:"editor.action.toggleHighContrast",label:n.localize(0,null),alias:"Toggle High Contrast Theme",precondition:null})||this;return t._originalThemeName=null,t}f(t,e),t.prototype.run=function(e,t){var n=e.get(o.IStandaloneThemeService);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getTheme().themeName,n.setTheme("hc-black"))},t=v([i.editorAction],t)}(i.EditorAction)}),define(d[478],h([1,0,160,58,50]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i){this.contextView=new n.ContextView(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.contextView.hide(e)},e=v([y(1,i.ITelemetryService),y(2,o.IMessageService)],e)}();t.ContextViewService=r}),define(d[479],h([1,0,7,166,45,62,46,420]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){if(!e)return e;for(var t="",n=0;n="0"&&i<="9"?t+="0":t+=i>="a"&&i<="z"?"a":i>="A"&&i<="Z"?"A":i}return t}function l(e){if(!e)return[];var t=[];return c(t,"",e),t}function c(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(i){return c(e,t?t+"."+i:i,n[i])}):e.push(t)}function d(e,t){return e?t.reduce(function(t,n){var i=n.split(".").reduce(function(e,t){return e&&"object"==typeof e?e[t]:void 0},e);return void 0!==i&&t.push((o={},o[n]=i,o)),t;var o},[]):[]}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService={_serviceBrand:void 0,publicLog:function(e,t){return n.TPromise.as(null)},isOptedIn:!0,getTelemetryInfo:function(){return n.TPromise.as({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})}},t.combinedAppender=function(){for(var e=[],t=0;t0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){o.removeCSSRulesContainingSelector(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["textDecoration","cursor","color","letterSpacing"],t),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),"string"==typeof e.contentIconPath?t.push(n.format(p.contentIconPath,i.default.file(e.contentIconPath).toString().replace(/'/g,"%27"))):e.contentIconPath instanceof i.default&&t.push(n.format(p.contentIconPath,e.contentIconPath.toString(!0).replace(/'/g,"%27"))),"string"==typeof e.contentText){var o=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(n.format(p.contentText,o))}this.collectCSSText(e,["textDecoration","color","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(n.format(p.gutterIconPath,i.default.file(e.gutterIconPath).toString())):t.push(n.format(p.gutterIconPath,e.gutterIconPath.toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(n.format(p.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(n.format("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,i){for(var o=i.length,r=0,s=t;rt)){var v=m.startLineNumber===t?m.startColumn:r.minColumn,_=m.endLineNumber===t?m.endColumn:r.maxColumn;v<_&&l.push(new s.LineDecoration(v,_,"inline-selected-text",!1))}}var C=new a.RenderLineInput(u.useMonospaceOptimizations,r.content,r.mightContainRTL,r.minColumn-1,r.tokens,l,r.tabSize,u.spaceWidth,u.stopRenderingLineAfter,u.renderWhitespace,u.renderControlCharacters,u.fontLigatures);if(this._renderedViewLine&&this._renderedViewLine.input.equals(C))return null;var b=a.renderViewLine(C),S=null;if(p&&u.useMonospaceOptimizations&&!b.containsForeignElements){var E=!0;r.mightContainNonBasicASCII&&(E=o.isBasicASCII(r.content)),E&&r.content.length<1e3&&(S=new y(this._renderedViewLine?this._renderedViewLine.domNode:null,C,b.characterMapping))}return S||(S=w(this._renderedViewLine?this._renderedViewLine.domNode:null,C,b.characterMapping,b.containsRTL,b.containsForeignElements)),this._renderedViewLine=S,'
    '+b.html+"
    "},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getVisibleRangesForRange=function(e,t,n){return e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),this._renderedViewLine.getVisibleRangesForRange(e,t,n)},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e.CLASS_NAME="view-line",e}();t.ViewLine=_;var y=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth,this._charOffset=null}return e._createCharOffset=function(e){for(var t=e.getPartLengths(),n=e.length,i=new Uint32Array(n),o=0,r=0,s=0;si&&t>i)return null;-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i);var o=this._getCharPosition(e),r=this._getCharPosition(t);return[new l.HorizontalRange(o,r-o)]},e.prototype._getCharPosition=function(e){var t=this._getOrCreateCharOffset();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),C=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(this._characterMapping.length+1);for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0;var i=0|this.input.stopRenderingLineAfter;if(-1!==i&&e>i&&t>i)return null;if(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),null!==this._pixelOffsetCache){var o=this._readPixelOffset(e,n);if(-1===o)return null;var r=this._readPixelOffset(t,n);return-1===r?null:[new l.HorizontalRange(o,r-o)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new l.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length&&!this._containsForeignElements)return 0;if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=u.RangeUtil.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&!this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=a.CharacterMapping.getPartIndex(i),r=a.CharacterMapping.getCharIndex(i),s=u.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new l.HorizontalRange(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=a.CharacterMapping.getPartIndex(i),r=a.CharacterMapping.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),c=a.CharacterMapping.getPartIndex(s),d=a.CharacterMapping.getCharIndex(s);return u.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,c,d,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;var r=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(-1!==r&&-1!==s){var a=r<=s,u=o[o.length-1];a&&u.left=4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),d=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(e){var t=this._context.viewLayout.getWhitespaceAtVerticalOffset(e);if(t){var i=t.verticalOffset+t.height/2,o=this._context.model.getLineCount(),r=null,s=void 0,a=null;return t.afterLineNumber!==o&&(a=new n.Position(t.afterLineNumber+1,1)),t.afterLineNumber>0&&(r=new n.Position(t.afterLineNumber,this._context.model.getLineMaxColumn(t.afterLineNumber))),s=null===a?r:null===r?a:er.contentLeft+r.width)){var l=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(l<=u&&u<=l+r.height)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,r.position)}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?o.MouseTargetType.CONTENT_VIEW_ZONE:o.MouseTargetType.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return c.isTextArea(t.targetPath)?t.fulfill(o.MouseTargetType.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),r=Math.abs(t.pos.x-t.editorPos.x);return r<=e.layoutInfo.glyphMarginWidth?t.fulfill(o.MouseTargetType.GUTTER_GLYPH_MARGIN,i,n.range,n.isAfterLines):(r-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(o.MouseTargetType.GUTTER_LINE_NUMBERS,i,n.range,n.isAfterLines):(r-=e.layoutInfo.lineNumbersWidth,t.fulfill(o.MouseTargetType.GUTTER_LINE_DECORATIONS,i,n.range,n.isAfterLines))}return null},e._hitTestViewLines=function(t,i,r){if(!c.isChildOfViewLines(i.targetPath))return null;if(t.isAfterLines(i.mouseVerticalOffset)){var s=t.model.getLineCount(),a=t.model.getLineMaxColumn(s);return i.fulfill(o.MouseTargetType.CONTENT_EMPTY,new n.Position(s,a))}if(r)return i.fulfill(o.MouseTargetType.UNKNOWN);var u=e._doHitTest(t,i);return u.position?e.createMouseTargetFromHitTestPosition(t,i,u.position.lineNumber,u.position.column):this._createMouseTarget(t,i.withTarget(u.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(c.isChildOfMinimap(t.targetPath)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(i);return t.fulfill(o.MouseTargetType.SCROLLBAR,new n.Position(i,r))}return null},e._hitTestScrollbarSlider=function(e,t){if(c.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){var r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.model.getLineMaxColumn(r);return t.fulfill(o.MouseTargetType.SCROLLBAR,new n.Position(r,s))}}return null},e._hitTestScrollbar=function(e,t){if(c.isChildOfScrollableElement(t.targetPath)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(i);return t.fulfill(o.MouseTargetType.SCROLLBAR,new n.Position(i,r))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,r,a){var u=new n.Position(r,a),l=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>l)return s.isEdge&&1===u.column?t.fulfill(o.MouseTargetType.CONTENT_EMPTY,new n.Position(r,e.model.getLineMaxColumn(r))):t.fulfill(o.MouseTargetType.CONTENT_EMPTY,u);var c=e.visibleRangeForPosition2(r,a);if(!c)return t.fulfill(o.MouseTargetType.UNKNOWN,u);var d=c.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,u);var h;if(a>1){var p=c.left;if(h=!1,h=h||p=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var s=new r.PageCoordinates(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i,o=n.startContainer;if(o.nodeType===o.TEXT_NODE){var r=(a=(s=o.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===u.ViewLine.CLASS_NAME)return{position:l=e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null};i=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){var s=o.parentNode,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===u.ViewLine.CLASS_NAME){var l=e.getPositionFromDOMInfo(o,o.textContent.length);return{position:l,hitTarget:null}}i=o}return{position:null,hitTarget:i}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===u.ViewLine.CLASS_NAME?{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}:{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===u.ViewLine.CLASS_NAME){var l=o.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}();t.MouseTargetFactory=p}),define(d[489],h([1,0,3,15,28,4,12,22,82,186,25,18,114,47,135]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g){"use strict";function m(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(n,i,o){var s=e.call(this)||this;s._isFocused=!1,s._context=n,s.viewController=i,s.viewHelper=o,s.mouseTargetFactory=new l.MouseTargetFactory(s._context,o),s._mouseDownOperation=s._register(new _(s._context,s.viewController,s.viewHelper,function(e,t){return s._createMouseTarget(e,t)},function(e){return s._getMouseColumn(e)})),s._asyncFocus=s._register(new d.RunOnceScheduler(function(){return s.viewHelper.focusTextArea()},0)),s.lastMouseLeaveTime=-1;var a=new h.EditorMouseEventFactory(s.viewHelper.viewDomNode);s._register(a.onContextMenu(s.viewHelper.viewDomNode,function(e){return s._onContextMenu(e,!0)})),s._register(a.onMouseMoveThrottled(s.viewHelper.viewDomNode,function(e){return s._onMouseMove(e)},m(s.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),s._register(a.onMouseUp(s.viewHelper.viewDomNode,function(e){return s._onMouseUp(e)})),s._register(a.onMouseLeave(s.viewHelper.viewDomNode,function(e){return s._onMouseLeave(e)})),s._register(a.onMouseDown(s.viewHelper.viewDomNode,function(e){return s._onMouseDown(e)}));var u=function(e){if(s._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new p.StandardMouseWheelEvent(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=g.EditorZoom.getZoomLevel(),i=t.deltaY>0?1:-1;g.EditorZoom.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return s._register(r.addDisposableListener(s.viewHelper.viewDomNode,"mousewheel",u,!0)),s._register(r.addDisposableListener(s.viewHelper.viewDomNode,"DOMMouseScroll",u,!0)),s._context.addEventHandler(s),s}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new h.ClientCoordinates(e,t).toPageCoordinates(),i=h.createEditorPagePosition(this.viewHelper.viewDomNode);if(n.yi.y+i.height||n.xi.x+i.width)return null;var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,i,n,null)},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||e.timestampt.y+t.height){var a=i.getLineNumberAtVerticalOffset(i.getScrollTop()+(e.posy-t.y));return new l.MouseTarget(null,c.MouseTargetType.OUTSIDE_EDITOR,o,new s.Position(a,n.getLineMaxColumn(a)))}var u=i.getLineNumberAtVerticalOffset(i.getScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new l.MouseTarget(null,c.MouseTargetType.OUTSIDE_EDITOR,o,new s.Position(u,n.getLineMaxColumn(u))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(i.type===c.MouseTargetType.CONTENT_VIEW_ZONE||i.type===c.MouseTargetType.GUTTER_VIEW_ZONE){var o=new s.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),r=i.detail,a=r.positionBefore,u=r.positionAfter;if(a&&u)return a.isBefore(o)?new l.MouseTarget(i.element,i.type,i.mouseColumn,a,null,i.detail):new l.MouseTarget(i.element,i.type,i.mouseColumn,u,null,i.detail)}return i},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey})},t}(n.Disposable),y=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}()}),define(d[490],h([1,0,4,74,489,114]),function(e,t,n,i,o,r){"use strict";function s(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r.viewHelper.linesContentDomNode.style.msTouchAction="none",r.viewHelper.linesContentDomNode.style.msContentZooming="none",r._installGestureHandlerTimeout=window.setTimeout(function(){if(r._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=r.viewHelper.linesContentDomNode,t.target=r.viewHelper.linesContentDomNode,r.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen",t.addPointer(n.pointerId)):r._lastPointerType="mouse"}),r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},s)),r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return f(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){var t=this._context.viewLayout;t.setScrollPosition({scrollLeft:t.getScrollLeft()-e.translationX,scrollTop:t.getScrollTop()-e.translationY})},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),u=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r.viewHelper.linesContentDomNode.style.touchAction="none",r._installGestureHandlerTimeout=window.setTimeout(function(){if(r._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=r.viewHelper.linesContentDomNode,t.target=r.viewHelper.linesContentDomNode,r.viewHelper.linesContentDomNode.addEventListener("pointerdown",function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen",t.addPointer(n.pointerId)):r._lastPointerType="mouse"}),r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},s)),r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return f(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){var t=this._context.viewLayout;t.setScrollPosition({scrollLeft:t.getScrollLeft()-e.translationX,scrollTop:t.getScrollTop()-e.translationY})},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),l=function(e){function t(t,o,s){var a=e.call(this,t,o,s)||this;return a.gesture=new i.Gesture(a.viewHelper.linesContentDomNode),a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Tap,function(e){return a.onTap(e)})),a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Change,function(e){return a.onChange(e)})),a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Contextmenu,function(e){return a._onContextMenu(new r.EditorMouseEvent(e,a.viewHelper.viewDomNode),!1)})),a}return f(t,e),t.prototype.dispose=function(){this.gesture.dispose(),e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){var t=this._context.viewLayout;t.setScrollPosition({scrollLeft:t.getScrollLeft()-e.translationX,scrollTop:t.getScrollTop()-e.translationY})},t}(o.MouseHandler),c=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new a(e,t,n):window.TouchEvent?this.handler=new l(e,t,n):window.navigator.pointerEnabled?this.handler=new u(e,t,n):this.handler=new o.MouseHandler(e,t,n)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}();t.PointerHandler=c}),define(d[491],h([1,0,3,186,11]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n._onDidScroll=n._register(new o.Emitter),n.onDidScroll=n._onDidScroll.event,n._onDidGainFocus=n._register(new o.Emitter),n.onDidGainFocus=n._onDidGainFocus.event,n._onDidLoseFocus=n._register(new o.Emitter),n.onDidLoseFocus=n._onDidLoseFocus.event,n._onKeyDown=n._register(new o.Emitter),n.onKeyDown=n._onKeyDown.event,n._onKeyUp=n._register(new o.Emitter),n.onKeyUp=n._onKeyUp.event,n._onContextMenu=n._register(new o.Emitter),n.onContextMenu=n._onContextMenu.event,n._onMouseMove=n._register(new o.Emitter),n.onMouseMove=n._onMouseMove.event,n._onMouseLeave=n._register(new o.Emitter),n.onMouseLeave=n._onMouseLeave.event,n._onMouseUp=n._register(new o.Emitter),n.onMouseUp=n._onMouseUp.event,n._onMouseDown=n._register(new o.Emitter),n.onMouseDown=n._onMouseDown.event,n._onMouseDrag=n._register(new o.Emitter),n.onMouseDrag=n._onMouseDrag.event,n._onMouseDrop=n._register(new o.Emitter),n.onMouseDrop=n._onMouseDrop.event,n._viewModel=t,n}return f(t,e),t.prototype.emitScrollChanged=function(e){this._onDidScroll.fire(e)},t.prototype.emitViewFocusGained=function(){this._onDidGainFocus.fire()},t.prototype.emitViewFocusLost=function(){this._onDidLoseFocus.fire()},t.prototype.emitKeyDown=function(e){this._onKeyDown.fire(e)},t.prototype.emitKeyUp=function(e){this._onKeyUp.fire(e)},t.prototype.emitContextMenu=function(e){this._onContextMenu.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this._onMouseMove.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this._onMouseLeave.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this._onMouseUp.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this._onMouseDown.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this._onMouseDrag.fire(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this._onMouseDrop.fire(this._convertViewToModelMouseEvent(e))},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return new s(e.element,e.type,e.mouseColumn,e.position?this._convertViewToModelPosition(e.position):null,e.range?this._convertViewToModelRange(e.range):null,e.detail)},t.prototype._convertViewToModelPosition=function(e){return this._viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},t.prototype._convertViewToModelRange=function(e){return this._viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},t}(n.Disposable);t.ViewOutgoingEvents=r;var s=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return i.MouseTarget.toString(this)},e}()}),define(d[492],h([1,0,18,2,12,112,185,66,78,35,57,286]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(){this._currentVisibleRange=new i.Range(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),h=function(e){function t(t,i){var o=e.call(this,t)||this;o._linesContent=i,o._textRangeRestingSpot=document.createElement("div"),o._visibleLines=new r.VisibleLinesCollection(o),o.domNode=o._visibleLines.domNode;var u=o._context.configuration;return o._lineHeight=u.editor.lineHeight,o._typicalHalfwidthCharacterWidth=u.editor.fontInfo.typicalHalfwidthCharacterWidth,o._isViewportWrapping=u.editor.wrappingInfo.isViewportWrapping,o._revealHorizontalRightPadding=u.editor.viewInfo.revealHorizontalRightPadding,o._canUseLayerHinting=u.editor.canUseLayerHinting,o._viewLineOptions=new s.ViewLineOptions(u,o._context.theme.type),l.PartFingerprints.write(o.domNode,7),o.domNode.setClassName("view-lines"),a.Configuration.applyFontInfo(o.domNode,u.editor.fontInfo),o._maxLineWidth=0,o._asyncUpdateLineWidths=new n.RunOnceScheduler(function(){o._updateLineWidths()},200),o._lastRenderedData=new d,o._lastCursorRevealRangeHorizontallyEvent=null,o}return f(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new s.ViewLine(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&a.Configuration.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new s.ViewLineOptions(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getCurrentViewport(),e.range,e.verticalType);return e.revealHorizontal&&(this._lastCursorRevealRangeHorizontallyEvent=e),this._context.viewLayout.setScrollPosition({scrollTop:t}),!0},t.prototype.onScrollChanged=function(e){return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new o.Position(i,1);var r=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(is)return null;var a=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),u=this._context.model.getLineMinColumn(i);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber;if(!(e=i.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var r,a=[],l=new s.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);t&&(r=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(e.startLineNumber,1)).lineNumber);for(var c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber(),h=e.startLineNumber;h<=e.endLineNumber;h++)if(!(hd)){var p=h===e.startLineNumber?e.startColumn:1,f=h===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(h),g=this._visibleLines.getVisibleLine(h).getVisibleRangesForRange(p,f,l);g&&0!==g.length&&(t&&hr)){var u=a===e.startLineNumber?e.startColumn:1,l=a===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(a),c=this._visibleLines.getVisibleLine(a).getVisibleRangesForRange(u,l,n);c&&0!==c.length&&(t=t.concat(c))}return 0===t.length?null:t},t.prototype._updateLineWidths=function(){for(var e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber(),n=1,i=e;i<=t;i++){var o=this._visibleLines.getVisibleLine(i).getWidth();n=Math.max(n,o)}1===e&&t===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n)},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._lastCursorRevealRangeHorizontallyEvent){var t=this._lastCursorRevealRangeHorizontallyEvent.range;this._lastCursorRevealRangeHorizontallyEvent=null,this.onDidRender();var n=this._computeScrollLeftToRevealRange(t);this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft})}this._linesContent.setLayerHinting(this._canUseLayerHinting);var i=this._context.viewLayout.getScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-i),this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()),this._asyncUpdateLineWidths.schedule()},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthu&&(u=c.left+c.width)}return n=u,a=Math.max(0,a-t.HORIZONTAL_EXTRA_PX),u+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(o,r,a,u),maxHorizontalOffset:n}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(l.ViewPart);t.ViewLines=h}),define(d[493],h([1,0,35,215,4,111,27,112,2,57,83,15,14,23,294]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function g(e){return 2===e?4:4===e?6:1===e?2:3}function m(e){return 2===e?2:4===e?2:1}Object.defineProperty(t,"__esModule",{value:!0});var v;!function(e){e[e.None=0]="None",e[e.Small=1]="Small",e[e.Large=2]="Large",e[e.SmallBlocks=3]="SmallBlocks",e[e.LargeBlocks=4]="LargeBlocks"}(v||(v={}));var _=140,y=function(){function e(e){var t=e.editor.pixelRatio,n=e.editor.layoutInfo,i=e.editor.viewInfo,o=e.editor.fontInfo;this.renderMinimap=0|n.renderMinimap,this.scrollBeyondLastLine=i.scrollBeyondLastLine,this.showSlider=i.minimap.showSlider,this.pixelRatio=t,this.typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this.lineHeight=e.editor.lineHeight,this.minimapWidth=n.minimapWidth,this.minimapHeight=n.height,this.canvasInnerWidth=Math.max(1,Math.floor(t*this.minimapWidth)),this.canvasInnerHeight=Math.max(1,Math.floor(t*this.minimapHeight)),this.canvasOuterWidth=this.canvasInnerWidth/t,this.canvasOuterHeight=this.canvasInnerHeight/t}return e.prototype.equals=function(e){return this.renderMinimap===e.renderMinimap&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight},e}(),C=function(){function e(e,t,n,i,o,r,s){this.scrollTop=e,this.scrollHeight=t,this._computedSliderRatio=n,this.sliderTop=i,this.sliderHeight=o,this.startLineNumber=r,this.endLineNumber=s}return e.prototype.getDesiredScrollTopFromDelta=function(e){var t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)},e.create=function(t,n,i,o,r,s,a,u,l){var c,d=t.pixelRatio,h=g(t.renderMinimap),p=Math.floor(t.canvasInnerHeight/h),f=t.lineHeight;if(r&&i!==s){var m=i-n+1;c=Math.floor(m*h/d)}else{var v=o/f;c=Math.floor(v*h/d)}var _;_=t.scrollBeyondLastLine?(s-1)*h/d:Math.max(0,s*h/d-c);var y=(_=Math.min(t.minimapHeight-c,_))/(u-o),C=a*y;if(p>=s)return new e(a,u,y,C,c,b=1,w=s);var b=Math.max(1,Math.floor(n-C*d/h));l&&l.scrollHeight===u&&(l.scrollTop>a&&(b=Math.min(b,l.startLineNumber)),l.scrollTop_)a._context.viewLayout.setScrollPosition({scrollTop:i.scrollTop});else{var r=e.posy-t;a._context.viewLayout.setScrollPosition({scrollTop:i.getDesiredScrollTopFromDelta(r)})}},function(){a._slider.toggleClassName("active",!1)})}}),a}return f(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new S(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new y(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0!==this._options.renderMinimap){e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=C.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*m(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)}else this._shadow.setClassName("minimap-shadow-hidden")},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,o=e.endLineNumber,r=g(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new w(e,s.imageData,s.lines)}for(var a=this._getBuffer(),u=t._renderUntouchedLines(a,i,o,r,this._lastRenderData),l=this._context.model.getMinimapLinesRenderingData(i,o,u),c=l.tabSize,d=this._tokensColorTracker.getColor(2),h=this._tokensColorTracker.backgroundIsLight(),p=0,f=[],m=0,v=o-i+1;m=0&&wh)return;var S=l.charCodeAt(f);if(9===S){var E=a-(f+g)%a;g+=E-1,p+=E*d}else 32===S?p+=d:(2===i?r.x2RenderChar(e,p,s,S,w,t,n):1===i?r.x1RenderChar(e,p,s,S,w,t,n):4===i?r.x2BlockRenderChar(e,p,s,w,t,n):r.x1BlockRenderChar(e,p,s,w,t,n),p+=d)}},t}(n.ViewPart);t.Minimap=E,h.registerThemingParticipant(function(e,t){var n=e.getColor(p.scrollbarSliderBackground);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(p.scrollbarSliderHoverBackground);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(p.scrollbarSliderActiveBackground);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(p.scrollbarShadow);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")})}),define(d[494],h([1,0,27,35,14,23,300]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var i=e.call(this,t)||this;return i._scrollTop=0,i._width=0,i._updateWidth(),i._shouldShow=!1,i._useShadows=i._context.configuration.editor.viewInfo.scrollbar.useShadows,i._domNode=n.createFastDomNode(document.createElement("div")),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._updateShouldShow=function(){var e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=e.width-e.minimapWidth;return this._width!==t&&(this._width=t,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(i.ViewPart);t.ScrollDecorationViewPart=s,o.registerThemingParticipant(function(e,t){var n=e.getColor(r.scrollbarShadow);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})}),define(d[495],h([1,0,14,23,67,28,306]),function(e,t,n,i,o,r){"use strict";function s(e){return new l(e)}function a(e){return new c(e.lineNumber,e.ranges.map(s))}Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.EXTERN=0]="EXTERN",e[e.INTERN=1]="INTERN",e[e.FLAT=2]="FLAT"}(u||(u={}));var l=function(){return function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}(),c=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}(),d=r.isEdgeOrIE,h=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0;return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t){var n=null,i=null;if(t&&t.length>0&&e.length>0){for(var o=e[0].lineNumber,r=0;!n&&r=0;r--)t[r].lineNumber===s&&(i=t[r].ranges[0]);n&&!n.startStyle&&(n=null),i&&!i.startStyle&&(i=null)}for(var r=0,a=e.length;r0){var p=e[r-1].ranges[0].left,f=e[r-1].ranges[0].left+e[r-1].ranges[0].width;l===p?d.top=2:l>p&&(d.top=1),c===f?h.top=2:p'},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,d=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(o.DynamicViewOverlay);t.SelectionsOverlay=h,n.registerThemingParticipant(function(e,t){var n=e.getColor(i.editorSelectionBackground);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var o=e.getColor(i.editorInactiveSelection);o&&t.addRule(".monaco-editor .selected-text { background-color: "+o+"; }");var r=e.getColor(i.editorSelectionForeground);r&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+r+"; }")})}),define(d[37],h([1,0,340,23,14,32]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLineHighlight=i.registerColor("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.localize(0,null)),t.editorLineHighlightBorder=i.registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.localize(1,null)),t.editorRangeHighlight=i.registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.localize(2,null)),t.editorCursorForeground=i.registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:r.Color.black,hc:r.Color.white},n.localize(3,null)),t.editorCursorBackground=i.registerColor("editorCursor.background",null,n.localize(4,null)),t.editorWhitespaces=i.registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.localize(5,null)),t.editorIndentGuides=i.registerColor("editorIndentGuide.background",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},n.localize(6,null)),t.editorLineNumbers=i.registerColor("editorLineNumber.foreground",{dark:"#5A5A5A",light:"#2B91AF",hc:r.Color.white},n.localize(7,null)),t.editorRuler=i.registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:r.Color.lightgrey,hc:r.Color.white},n.localize(8,null)),t.editorCodeLensForeground=i.registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.localize(9,null)),t.editorBracketMatchBackground=i.registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.localize(10,null)),t.editorBracketMatchBorder=i.registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:"#fff"},n.localize(11,null)),t.editorOverviewRulerBorder=i.registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.localize(12,null)),t.editorGutter=i.registerColor("editorGutter.background",{dark:i.editorBackground,light:i.editorBackground,hc:i.editorBackground},n.localize(13,null)),t.editorErrorForeground=i.registerColor("editorError.foreground",{dark:"#FF0000",light:"#FF0000",hc:null},n.localize(14,null)),t.editorErrorBorder=i.registerColor("editorError.border",{dark:null,light:null,hc:r.Color.fromHex("#E47777").transparent(.8)},n.localize(15,null)),t.editorWarningForeground=i.registerColor("editorWarning.foreground",{dark:"#008000",light:"#008000",hc:null},n.localize(16,null)),t.editorWarningBorder=i.registerColor("editorWarning.border",{dark:null,light:null,hc:r.Color.fromHex("#71B771").transparent(.8)},n.localize(17,null)),o.registerThemingParticipant(function(e,n){var o=e.getColor(i.editorBackground);o&&n.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+o+"; }");var r=e.getColor(i.editorForeground);r&&n.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+r+"; }");var s=e.getColor(t.editorGutter);s&&n.addRule(".monaco-editor .margin { background-color: "+s+"; }");var a=e.getColor(t.editorRangeHighlight);a&&n.addRule(".monaco-editor .rangeHighlight { background-color: "+a+"; }");var u=e.getColor(i.activeContrastBorder);u&&n.addRule(".monaco-editor .rangeHighlight { border: 1px dotted "+u+"; }; }");var l=e.getColor(t.editorWhitespaces);l&&n.addRule(".vs-whitespace { color: "+l+" !important; }")})}),define(d[497],h([1,0,67,14,37,274]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._readOnly=n._context.configuration.editor.readOnly,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorIsInEditableRange=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1;this._primaryCursorIsInEditableRange!==e.isInEditableRange&&(this._primaryCursorIsInEditableRange=e.isInEditableRange,t=!0);var n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
    ':""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&this._primaryCursorIsInEditableRange},t}(n.DynamicViewOverlay);t.CurrentLineHighlightOverlay=r,i.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorLineHighlight);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(o.editorLineHighlightBorder)){var i=e.getColor(o.editorLineHighlightBorder);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})}),define(d[498],h([1,0,67,14,37,277]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._primaryCursorIsInEditableRange=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1;this._primaryCursorIsInEditableRange!==e.isInEditableRange&&(this._primaryCursorIsInEditableRange=e.isInEditableRange,t=!0);var n=e.selections[0].positionLineNumber;return this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0),t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
    ':""},t.prototype._shouldShowCurrentLine=function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._primaryCursorIsInEditableRange},t}(n.DynamicViewOverlay);t.CurrentLineMarginHighlightOverlay=r,i.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorLineHighlight);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(o.editorLineHighlightBorder);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})}),define(d[499],h([1,0,67,14,37,4,12,280]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._renderResult=null,n._context.addEventHandler(n),n}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,o=this._lineHeight,a=r.computeScreenAwareSize(1),u=[],l=t;l<=n;l++){for(var c=l-t,d=this._context.model.getLineIndentGuide(l),h="",p=e.visibleRangeForPosition(new s.Position(l,1)),f=p?p.left:0,g=0;g',f+=i;u[c]=h}this._renderResult=u}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(n.DynamicViewOverlay);t.IndentGuidesOverlay=a,i.registerThemingParticipant(function(e,t){var n=e.getColor(o.editorIndentGuides);n&&t.addRule(".monaco-editor .lines-content .cigr { background-color: "+n+"; }")})}),define(d[188],h([1,0,37,14,15,67,12,283]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new s.Position(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return f(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.editor;this._lineHeight=e.lineHeight,this._renderLineNumbers=e.viewInfo.renderLineNumbers,this._renderCustomLineNumbers=e.viewInfo.renderCustomLineNumbers,this._renderRelativeLineNumbers=e.viewInfo.renderRelativeLineNumbers,this._lineNumbersLeft=e.layoutInfo.lineNumbersLeft,this._lineNumbersWidth=e.layoutInfo.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),!!this._renderRelativeLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderRelativeLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return String(n)},t.prototype.prepareRender=function(e){if(this._renderLineNumbers){for(var n=o.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='
    ',a=[],u=i;u<=r;u++){var l=u-i,c=this._getLineRenderLineNumber(u);a[l]=c?s+c+"
    ":""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(r.DynamicViewOverlay);t.LineNumbersOverlay=a,i.registerThemingParticipant(function(e,t){var i=e.getColor(n.editorLineNumbers);i&&t.addRule(".monaco-editor .line-numbers { color: "+i+"; }")})}),define(d[501],h([1,0,15,28,154,151,2,22,12,66,57,27,35,182,188,270]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g){"use strict";function m(e,t){var n=document.createElement("canvas").getContext("2d");n.font=v(t);var o=n.measureText(e);return i.isFirefox?o.width+2:o.width}function v(e){return _("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function _(e,t,n,i,o){return e+" normal "+t+" "+n+"px / "+i+"px "+o}Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),C=i.isEdgeOrIE||i.isFirefox,b=function(e){function t(t,n,u){var l=e.call(this,t)||this;l._primaryCursorVisibleRange=null,l._viewController=n,l._viewHelper=u;var p=l._context.configuration.editor;l._pixelRatio=p.pixelRatio,l._accessibilitySupport=p.accessibilitySupport,l._contentLeft=p.layoutInfo.contentLeft,l._contentWidth=p.layoutInfo.contentWidth,l._contentHeight=p.layoutInfo.contentHeight,l._scrollLeft=0,l._scrollTop=0,l._fontInfo=p.fontInfo,l._lineHeight=p.lineHeight,l._emptySelectionClipboard=p.emptySelectionClipboard,l._visibleTextArea=null,l._selections=[new a.Selection(1,1,1,1)],l._lastCopiedValue=null,l._lastCopiedValueIsFromEmptySelection=!1,l.textArea=d.createFastDomNode(document.createElement("textarea")),h.PartFingerprints.write(l.textArea,6),l.textArea.setClassName("inputarea"),l.textArea.setAttribute("wrap","off"),l.textArea.setAttribute("autocorrect","off"),l.textArea.setAttribute("autocapitalize","off"),l.textArea.setAttribute("autocomplete","off"),l.textArea.setAttribute("spellcheck","false"),l.textArea.setAttribute("aria-label",p.viewInfo.ariaLabel),l.textArea.setAttribute("role","textbox"),l.textArea.setAttribute("aria-multiline","true"),l.textArea.setAttribute("aria-haspopup","false"),l.textArea.setAttribute("aria-autocomplete","both"),l.textAreaCover=d.createFastDomNode(document.createElement("div")),l.textAreaCover.setPosition("absolute");var f={getLineCount:function(){return l._context.model.getLineCount()},getLineMaxColumn:function(e){return l._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return l._context.model.getValueInRange(e,t)}},g={getPlainTextToCopy:function(){var e=l._context.model.getPlainTextToCopy(l._selections,l._emptySelectionClipboard);if(l._emptySelectionClipboard){i.isFirefox?l._lastCopiedValue=e.replace(/\r\n/g,"\n"):l._lastCopiedValue=e;var t=l._selections;l._lastCopiedValueIsFromEmptySelection=1===t.length&&t[0].isEmpty()}return e},getHTMLToCopy:function(){return l._context.model.getHTMLToCopy(l._selections,l._emptySelectionClipboard)},getScreenReaderContent:function(e){return i.isIPad?r.TextAreaState.EMPTY:1===l._accessibilitySupport?r.TextAreaState.EMPTY:r.PagedScreenReaderStrategy.fromEditorSelection(e,f,l._selections[0])}};return l._textAreaInput=l._register(new o.TextAreaInput(g,l.textArea)),l._register(l._textAreaInput.onKeyDown(function(e){l._viewController.emitKeyDown(e)})),l._register(l._textAreaInput.onKeyUp(function(e){l._viewController.emitKeyUp(e)})),l._register(l._textAreaInput.onPaste(function(e){var t=!1;l._emptySelectionClipboard&&(t=e.text===l._lastCopiedValue&&l._lastCopiedValueIsFromEmptySelection),l._viewController.paste("keyboard",e.text,t)})),l._register(l._textAreaInput.onCut(function(){l._viewController.cut("keyboard")})),l._register(l._textAreaInput.onType(function(e){e.replaceCharCnt?l._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):l._viewController.type("keyboard",e.text)})),l._register(l._textAreaInput.onCompositionStart(function(){var e=l._selections[0].startLineNumber,t=l._selections[0].startColumn;l._context.privateViewEventBus.emit(new c.ViewRevealRangeRequestEvent(new s.Range(e,t,e,t),0,!0));var n=l._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(l._visibleTextArea=new y(l._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,C?0:1),l._render()),l.textArea.setClassName("inputarea ime-input"),l._viewController.compositionStart("keyboard")})),l._register(l._textAreaInput.onCompositionUpdate(function(e){i.isEdgeOrIE?l._visibleTextArea=l._visibleTextArea.setWidth(0):l._visibleTextArea=l._visibleTextArea.setWidth(m(e.data,l._fontInfo)),l._render()})),l._register(l._textAreaInput.onCompositionEnd(function(){l._visibleTextArea=null,l._render(),l.textArea.setClassName("inputarea"),l._viewController.compositionEnd("keyboard")})),l._register(l._textAreaInput.onFocus(function(){l._context.privateViewEventBus.emit(new c.ViewFocusChangedEvent(!0))})),l._register(l._textAreaInput.onBlur(function(){l._context.privateViewEventBus.emit(new c.ViewFocusChangedEvent(!1))})),l}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.pixelRatio&&(this._pixelRatio=t.pixelRatio),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.setAriaActiveDescendant=function(e){e?(this.textArea.setAttribute("role","combobox"),this.textArea.getAttribute("aria-activedescendant")!==e&&(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-activedescendant",e))):(this.textArea.setAttribute("role","textbox"),this.textArea.removeAttribute("aria-activedescendant"),this.textArea.removeAttribute("aria-haspopup"))},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new u.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,C?0:1,C?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){var r=this.textArea,s=this.textAreaCover;o?l.Configuration.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(l.Configuration.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),C)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+p.Margin.CLASS_NAME):this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+g.LineNumbersOverlay.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(h.ViewPart);t.TextAreaHandler=b}),define(d[502],h([1,0,27,35,14,37,4,299]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var i=e.call(this,t)||this;return i.domNode=n.createFastDomNode(document.createElement("div")),i.domNode.setAttribute("role","presentation"),i.domNode.setAttribute("aria-hidden","true"),i.domNode.setClassName("view-rulers"),i._renderedRulers=[],i._rulers=i._context.configuration.editor.viewInfo.rulers,i._height=i._context.configuration.editor.layoutInfo.contentHeight,i._typicalHalfwidthCharacterWidth=i._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._height=this._context.configuration.editor.layoutInfo.contentHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;)(a=n.createFastDomNode(document.createElement("div"))).setClassName("view-ruler"),a.setWidth(i),this.domNode.appendChild(a),this._renderedRulers.push(a),o--;else for(var r=e-t;r>0;){var a=this._renderedRulers.pop();this.domNode.removeChild(a),r--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;tt.length)for(var a=this._secondaryCursors.length-t.length,r=0;r0){var _=e[r-1];m=0===_.originalEndLineNumber?_.originalStartLineNumber+1:_.originalEndLineNumber+1,v=0===_.modifiedEndLineNumber?_.modifiedStartLineNumber+1:_.modifiedEndLineNumber+1}var y=f-3+1,C=g-3+1;yL&&(M+=k=L-M,T+=k),T>x){var k=x-T;M+=k,T+=k}h[p++]=new S(b,M,w,T),i[o++]=new E(h)}for(var I=i[0].entries,D=[],O=0,r=1,s=i.length;rg)&&(g=b),0!==w&&(0===m||wv)&&(v=S)}var E=document.createElement("div");E.className="diff-review-row";var L=document.createElement("div");L.className="diff-review-cell diff-review-summary",L.appendChild(document.createTextNode(d+1+"/"+this._diffs.length+": @@ -"+f+","+(g-f+1)+" +"+m+","+(v-m+1)+" @@")),E.setAttribute("data-line",String(m)),E.setAttribute("aria-label",n.localize(1,null,d+1,this._diffs.length,f,g-f+1,m,v-m+1)),E.appendChild(L),E.setAttribute("role","listitem"),p.appendChild(E);for(var x=m,_=0,y=h.length;_=i)s.push(a),o++;else{var u=t[n],l=u.compareTo(a);l<0?n++:l>0?(s.push(a),o++):(s.push(u),n++,o++)}}this._zones=s},e.prototype.setLineHeight=function(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setPixelRatio=function(e){this._pixelRatio=e,this._colorZonesInvalid=!0},e.prototype.getDOMWidth=function(){return this._domWidth},e.prototype.getCanvasWidth=function(){return this._domWidth*this._pixelRatio},e.prototype.setDOMWidth=function(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)},e.prototype.getDOMHeight=function(){return this._domHeight},e.prototype.getCanvasHeight=function(){return this._domHeight*this._pixelRatio},e.prototype.setDOMHeight=function(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.getOuterHeight=function(){return this._outerHeight},e.prototype.setOuterHeight=function(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setMaximumHeight=function(e){return this._maximumHeight!==e&&(this._maximumHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setMinimumHeight=function(e){return this._minimumHeight!==e&&(this._minimumHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setThemeType=function(e){return this._themeType!==e&&(this._themeType=e,this._colorZonesInvalid=!0,!0)},e.prototype.resolveColorZones=function(){for(var e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),i=Math.floor(this._maximumHeight*this._pixelRatio),o=Math.floor(this._minimumHeight*this._pixelRatio),r=this._themeType,s=n/Math.floor(this._outerHeight),a=[],u=0,l=this._zones.length;u_)for(var y=c.startLineNumber;y<=c.endLineNumber;y++)v=(m=Math.floor(this._getVerticalOffsetForLine(y)))+t,m=Math.floor(m*s),v=Math.floor(v*s),f.push(this.createZone(n,m,v,o,i,c.getColor(r),c.position));else f.push(this.createZone(n,m,v,o,_,c.getColor(r),c.position))}c.setColorZones(f);for(var h=0,p=f.length;hr/2&&(l=r/2),le&&(u=e-l);var c=this._color2Id[s];return c||(c=++this._lastAssignedId,this._color2Id[s]=c,this._id2Color[c]=s),new i(u-l,u+l,c,a)},e}();t.OverviewZoneManager=r}),define(d[190],h([1,0,27,20,140,14]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,i,s,a,u,l,c){this._canvasLeftOffset=e,this._domNode=n.createFastDomNode(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._lanesCount=3,this._background=null,this._zoneManager=new o.OverviewZoneManager(c),this._zoneManager.setMinimumHeight(u),this._zoneManager.setMaximumHeight(l),this._zoneManager.setThemeType(r.LIGHT),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(i),this._zoneManager.setLineHeight(s),this._zoneManager.setPixelRatio(a)}return e.prototype.dispose=function(){this._zoneManager=null},e.prototype.setLayout=function(e,t){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var n=!1;n=this._zoneManager.setDOMWidth(e.width)||n,(n=this._zoneManager.setDOMHeight(e.height)||n)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),t&&this.render(!0))},e.prototype.getLanesCount=function(){return this._lanesCount},e.prototype.setLanesCount=function(e,t){this._lanesCount=e,t&&this.render(!0)},e.prototype.setThemeType=function(e,t){this._zoneManager.setThemeType(e),t&&this.render(!0)},e.prototype.setUseBackground=function(e,t){this._background=e,t&&this.render(!0)},e.prototype.getDomNode=function(){return this._domNode.domNode},e.prototype.getPixelWidth=function(){return this._zoneManager.getCanvasWidth()},e.prototype.getPixelHeight=function(){return this._zoneManager.getCanvasHeight()},e.prototype.setScrollHeight=function(e,t){this._zoneManager.setOuterHeight(e),t&&this.render(!0)},e.prototype.setLineHeight=function(e,t){this._zoneManager.setLineHeight(e),t&&this.render(!0)},e.prototype.setPixelRatio=function(e,t){this._zoneManager.setPixelRatio(e),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),t&&this.render(!0)},e.prototype.setZones=function(e,t){this._zoneManager.setZones(e),t&&this.render(!1)},e.prototype.render=function(e){if(0===this._zoneManager.getOuterHeight())return!1;var t=this._zoneManager.getCanvasWidth(),n=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),o=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");if(null===this._background?r.clearRect(0,0,t,n):(r.fillStyle=this._background.toRGBHex(),r.fillRect(0,0,t,n)),i.length>0){var s=t-this._canvasLeftOffset;this._lanesCount>=3?this._renderThreeLanes(r,i,o,s):2===this._lanesCount?this._renderTwoLanes(r,i,o,s):1===this._lanesCount&&this._renderOneLane(r,i,o,s)}return!0},e.prototype._renderOneLane=function(e,t,n,o){this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left|i.OverviewRulerLane.Center|i.OverviewRulerLane.Right,this._canvasLeftOffset,o)},e.prototype._renderTwoLanes=function(e,t,n,o){var r=Math.floor(o/2),s=o-r,a=this._canvasLeftOffset,u=this._canvasLeftOffset+r;this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left|i.OverviewRulerLane.Center,a,r),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Right,u,s)},e.prototype._renderThreeLanes=function(e,t,n,o){var r=Math.floor(o/3),s=Math.floor(o/3),a=o-r-s,u=this._canvasLeftOffset,l=this._canvasLeftOffset+r,c=this._canvasLeftOffset+r+a;this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left,u,r),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Center,l,a),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Right,c,s)},e.prototype._renderVerticalPatch=function(e,t,n,i,o,r){for(var s=0,a=0,u=0,l=0,c=t.length;l=p?u=Math.max(u,f):(e.fillRect(o,a,r,u-a),a=p,u=f)}}e.fillRect(o,a,r,u-a)},e}();t.OverviewRulerImpl=s}),define(d[507],h([1,0,20,35,190,17,140,37,32]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(n){var i=e.call(this,n)||this;return i._overviewRuler=new o.OverviewRulerImpl(1,"decorationsOverviewRuler",i._context.viewLayout.getScrollHeight(),i._context.configuration.editor.lineHeight,i._context.configuration.editor.pixelRatio,t.MIN_DECORATION_HEIGHT,t.MAX_DECORATION_HEIGHT,function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)}),i._overviewRuler.setLanesCount(i._context.configuration.editor.viewInfo.overviewRulerLanes,!1),i._overviewRuler.setLayout(i._context.configuration.editor.layoutInfo.overviewRuler,!1),i._renderBorder=i._context.configuration.editor.viewInfo.overviewRulerBorder,i._updateColors(),i._updateBackground(!1),i._tokensColorTrackerListener=r.TokenizationRegistry.onDidChange(function(e){e.changedColorMap&&i._updateBackground(!0)}),i._shouldUpdateDecorations=!0,i._zonesFromDecorations=[],i._shouldUpdateCursorPosition=!0,i._hideCursor=i._context.configuration.editor.viewInfo.hideCursorInOverviewRuler,i._zonesFromCursors=[],i._cursorPositions=[],i}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._overviewRuler.dispose(),this._tokensColorTrackerListener.dispose()},t.prototype._updateBackground=function(e){var t=this._context.configuration.editor.viewInfo.minimap.enabled;this._overviewRuler.setUseBackground(t?r.TokenizationRegistry.getDefaultBackground():null,e)},t.prototype.onConfigurationChanged=function(e){var t=this._overviewRuler.getLanesCount(),n=this._context.configuration.editor.viewInfo.overviewRulerLanes;return t!==n&&this._overviewRuler.setLanesCount(n,!1),e.lineHeight&&this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!1),e.pixelRatio&&this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio,!1),e.viewInfo&&(this._renderBorder=this._context.configuration.editor.viewInfo.overviewRulerBorder,this._hideCursor=this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler,this._shouldUpdateCursorPosition=!0,this._updateBackground(!1)),e.layoutInfo&&this._overviewRuler.setLayout(this._context.configuration.editor.layoutInfo.overviewRuler,!1),!0},t.prototype.onCursorStateChanged=function(e){this._shouldUpdateCursorPosition=!0,this._cursorPositions=[];for(var t=0,n=e.selections.length;t0&&(this._zonesFromDecorations.length>0||this._zonesFromCursors.length>0)){var n=this._overviewRuler.getDomNode().getContext("2d");n.beginPath(),n.lineWidth=1,n.strokeStyle=this._borderColor,n.moveTo(0,0),n.lineTo(0,this._overviewRuler.getPixelHeight()),n.stroke(),n.moveTo(0,0),n.lineTo(this._overviewRuler.getPixelWidth(),0),n.stroke()}},t.MIN_DECORATION_HEIGHT=6,t.MAX_DECORATION_HEIGHT=60,t}(i.ViewPart);t.DecorationsOverviewRuler=l}),define(d[508],h([1,0,82,190]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n,o,r){var s=e.call(this)||this;return s._context=t,s._overviewRuler=new i.OverviewRulerImpl(0,n,s._context.viewLayout.getScrollHeight(),s._context.configuration.editor.lineHeight,s._context.configuration.editor.pixelRatio,o,r,function(e){return s._context.viewLayout.getVerticalOffsetForLineNumber(e)}),s._context.addEventHandler(s),s}return f(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._overviewRuler.dispose(),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!0),e.pixelRatio&&this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio,!0),!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onScrollChanged=function(t){return this._overviewRuler.setScrollHeight(t.scrollHeight,!0),e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.getDomNode=function(){return this._overviewRuler.getDomNode()},t.prototype.setLayout=function(e){this._overviewRuler.setLayout(e,!0)},t.prototype.setZones=function(e){this._overviewRuler.setZones(e,!0)},t}(n.ViewEventHandler);t.OverviewRuler=o}),define(d[509],h([1,0,10,4,27,2,82,501,490,449,217,443,230,497,498,231,113,188,499,492,182,233,235,236,507,508,502,494,495,503,237,35,216,78,491,221,486,493,57,14]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C,b,w,S,E,L,x,N,M,T,k,I,D,O,R,P,A,F,W,B,V){"use strict";function H(e){try{return e()}catch(e){n.onUnexpectedError(e)}}function z(e,t){try{return e(t)}catch(e){n.onUnexpectedError(e)}}Object.defineProperty(t,"__esModule",{value:!0});var K=function(e){function t(t,n,i,o,r,s){var d=e.call(this)||this;d._isDisposed=!1,d._cursor=r,d._renderAnimationFrame=null,d.outgoingEvents=new P.ViewOutgoingEvents(o);var h=new l.ViewController(n,o,s,d.outgoingEvents,t);return d.eventDispatcher=new c.ViewEventDispatcher(function(e){return d._renderOnce(e)}),d.eventDispatcher.addEventHandler(d),d._context=new O.ViewContext(n,i.getTheme(),o,d.eventDispatcher),d._register(i.onThemeChange(function(e){d._context.theme=e,d.eventDispatcher.emit(new B.ViewThemeChangedEvent),d.render(!0,!1)})),d.viewParts=[],d._textAreaHandler=new a.TextAreaHandler(d._context,h,d.createTextAreaHandlerHelper()),d.viewParts.push(d._textAreaHandler),d.createViewParts(),d._setLayout(),d.pointerHandler=new u.PointerHandler(d._context,h,d.createPointerHandlerHelper()),d._register(o.addEventListener(function(e){d.eventDispatcher.emitMany(e)})),d._register(d._cursor.addEventListener(function(e){d.eventDispatcher.emitMany(e)})),d}return f(t,e),t.prototype.createViewParts=function(){this.linesContent=o.createFastDomNode(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=o.createFastDomNode(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=o.createFastDomNode(document.createElement("div")),D.PartFingerprints.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new F.EditorScrollbar(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new C.ViewLines(this._context,this.linesContent),this.viewZones=new I.ViewZones(this._context),this.viewParts.push(this.viewZones);var e=new L.DecorationsOverviewRuler(this._context);this.viewParts.push(e);var t=new M.ScrollDecorationViewPart(this._context);this.viewParts.push(t);var n=new d.ContentViewOverlays(this._context);this.viewParts.push(n),n.addDynamicOverlay(new p.CurrentLineHighlightOverlay(this._context)),n.addDynamicOverlay(new T.SelectionsOverlay(this._context)),n.addDynamicOverlay(new m.DecorationsOverlay(this._context)),n.addDynamicOverlay(new y.IndentGuidesOverlay(this._context));var i=new d.MarginViewOverlays(this._context);this.viewParts.push(i),i.addDynamicOverlay(new g.CurrentLineMarginHighlightOverlay(this._context)),i.addDynamicOverlay(new v.GlyphMarginOverlay(this._context)),i.addDynamicOverlay(new S.MarginViewLineDecorationsOverlay(this._context)),i.addDynamicOverlay(new w.LinesDecorationsOverlay(this._context)),i.addDynamicOverlay(new _.LineNumbersOverlay(this._context));var r=new b.Margin(this._context);r.getDomNode().appendChild(this.viewZones.marginDomNode),r.getDomNode().appendChild(i.getDomNode()),this.viewParts.push(r),this.contentWidgets=new h.ViewContentWidgets(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new k.ViewCursors(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new E.ViewOverlayWidgets(this._context),this.viewParts.push(this.overlayWidgets);var s=new N.Rulers(this._context);this.viewParts.push(s);var a=new W.Minimap(this._context);if(this.viewParts.push(a),e){var u=this._scrollbar.getOverviewRulerLayoutInfo();u.parent.insertBefore(e.getDomNode(),u.insertBefore)}this.linesContent.appendChild(n.getDomNode()),this.linesContent.appendChild(s.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(r.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(a.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new r.Range(t,n,t,n));return i?i[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,n){e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new r.Range(t,n,t,n));return i?i[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){return this._context.configuration.editor.editorClassName+" "+V.getThemeTypeSelector(this._context.theme.type)},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.toggleClassName("focused",e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){this._isDisposed=!0,null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,n=this.viewParts.length;t");m.registerThemingParticipant(function(e,t){var n=e.getColor(_.editorErrorBorder);n&&t.addRule(".monaco-editor .redsquiggly { border-bottom: 4px double "+n+"; }");var i=e.getColor(_.editorErrorForeground);i&&t.addRule('.monaco-editor .redsquiggly { background: url("data:image/svg+xml,'+C(i)+'") repeat-x bottom left; }');var o=e.getColor(_.editorWarningBorder);o&&t.addRule(".monaco-editor .greensquiggly { border-bottom: 4px double "+o+"; }");var r=e.getColor(_.editorWarningForeground);r&&t.addRule('.monaco-editor .greensquiggly { background: url("data:image/svg+xml;utf8,'+C(r)+'") repeat-x bottom left; }')})}),define(d[141],h([1,0,16,31,19,42,191,13,30,14]),function(e,t,n,i,o,r,s,a,u,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t,n,i,o,r,s,a){return e.call(this,t,n,i,o,r,s,a)||this}return f(t,e),t.prototype._getContributions=function(){return[].concat(u.EditorBrowserRegistry.getEditorContributions()).concat(a.CommonEditorRegistry.getEditorContributions())},t.prototype._getActions=function(){return a.CommonEditorRegistry.getEditorActions()},t=v([y(2,n.IInstantiationService),y(3,r.ICodeEditorService),y(4,i.ICommandService),y(5,o.IContextKeyService),y(6,l.IThemeService)],t)}(s.CodeEditorWidget);t.CodeEditor=c}),define(d[193],h([1,0,302,18,3,26,4,36,27,99,16,19,42,2,20,61,138,106,141,90,66,86,84,11,49,14,23,140,34,504,50,308]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S,E,L,x,N,M,T,k,I,D,O){"use strict";function R(e,t,n,i,o){return{range:new p.Range(e,t,n,i),options:o}}function P(e){return e.modifiedEndLineNumber>0}function A(e){return e.originalEndLineNumber>0}function F(){var e=document.createElement("div");return e.className="diagonal-fill",e}Object.defineProperty(t,"__esModule",{value:!0});var W=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)]})},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;n0&&e.changeDecorations(function(e){e.deltaDecorations(t._decorations,[])}),this._decorations=[]},e.prototype.apply=function(e,t,n){var i=this;e.changeViewZones(function(e){for(var t=0,o=i._zones.length;t0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?n=o+1:(n=o,i=o)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=v([y(2,m.IEditorWorkerService),y(3,d.IContextKeyService),y(4,c.IInstantiationService),y(5,h.ICodeEditorService),y(6,M.IThemeService),y(7,O.IMessageService)],t)}(o.Disposable);t.DiffEditorWidget=V;var H=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n}return f(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(T.diffInserted)||T.defaultInsertColor).transparent(2),n=(e.getColor(T.diffRemoved)||T.defaultRemoveColor).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber}),i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber});var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t.prototype._getViewZones=function(e,t,n,i,o,r){return null},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){return null},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){return null},t}(o.Disposable),z=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},l=new z(this.modifiedForeignVZ),c=new z(this.originalForeignVZ),d=0,h=this.lineChanges.length;d<=h;d++){var p=d0?-1:0),o=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),n=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,t=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,r=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),s=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(r=i+=1e7+n,s=o+=1e7+t);for(var f=[],g=[];l.current&&l.current.afterLineNumber<=s;){m=void 0;m=l.current.afterLineNumber<=o?i-o+l.current.afterLineNumber:r,f.push({afterLineNumber:m,heightInLines:l.current.heightInLines,domNode:null}),l.advance()}for(;c.current&&c.current.afterLineNumber<=r;){var m=void 0;m=c.current.afterLineNumber<=i?o-i+c.current.afterLineNumber:s,g.push({afterLineNumber:m,heightInLines:c.current.heightInLines,domNode:null}),c.advance()}if(null!==p&&P(p)&&(v=this._produceOriginalFromDiff(p,n,t))&&f.push(v),null!==p&&A(p)){var v=this._produceModifiedFromDiff(p,n,t);v&&g.push(v)}var _=0,y=0;for(f=f.sort(a),g=g.sort(a);_=b.heightInLines?(C.heightInLines-=b.heightInLines,y++):(b.heightInLines-=C.heightInLines,_++)}for(;_2*t.MINIMUM_EDITOR_WIDTH?(in-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-V.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){return new q(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=i.getModel(),a=0,u=e.length;at?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(K),G=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())})),i}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new Y(e,t,n,i,o,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=0,a=e.length;s'])}var f=document.createElement("div");f.className="view-lines line-delete",f.innerHTML=a.join(""),S.Configuration.applyFontInfoSlow(f,this.modifiedEditorConfiguration.fontInfo);var g=document.createElement("div");return g.className="inline-deleted-margin-view-zone",g.innerHTML=u.join(""),S.Configuration.applyFontInfoSlow(g,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,domNode:f,marginDomNode:g}},t.prototype.renderOriginalLine=function(e,t,n,i,o,r){var s=t.getLineContent(o),a=_.LineDecoration.filter(r,o,1,s.length+1),u=C.renderViewLine(new C.RenderLineInput(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,s,t.mightContainRTL(),0,[new w.ViewLineToken(s.length,16793600)],a,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures)),l=[];return l.push('
    '),(l=l.concat(u.html)).push("
    "),l},t}(K);M.registerThemingParticipant(function(e,t){var n=e.getColor(T.diffInserted);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(T.diffRemoved);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(T.diffInsertedOutline);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px dashed "+o+"; }");var r=e.getColor(T.diffRemovedOutline);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px dashed "+r+"; }");var s=e.getColor(T.scrollbarShadow);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }")})}),define(d[194],h([1,0,26,16,31,19,42,141,14]),function(e,t,n,i,o,r,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n,i,o,r,s,a,u){var l=e.call(this,t,i.getRawConfiguration(),o,r,s,a,u)||this;return l._parentEditor=i,l._overwriteOptions=n,e.prototype.updateOptions.call(l,l._overwriteOptions),l._register(i.onDidChangeConfiguration(function(e){return l._onParentConfigurationChanged(e)})),l}return f(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){n.mixin(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=v([y(3,i.IInstantiationService),y(4,s.ICodeEditorService),y(5,o.ICommandService),y(6,r.IContextKeyService),y(7,u.IThemeService)],t)}(a.CodeEditor);t.EmbeddedCodeEditorWidget=l}),define(d[514],h([1,0,341,3,12,18,20,13,21,14,37,34]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:n.localize(0,null),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:u.EditorContextKeys.textFocus,primary:3160}})||this}f(t,e),t.prototype.run=function(e,t){var n=p.get(t);n&&n.jumpToBracket()},t=v([a.editorAction],t)}(a.EditorAction);var h=function(){return function(e,t){this.position=e,this.brackets=t}}(),p=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._lastBracketsData=[],n._lastVersionId=0,n._decorations=[],n._updateBracketsSoon=n._register(new r.RunOnceScheduler(function(){return n._updateBrackets()},50)),n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,n._updateBracketsSoon.schedule(),n._register(t.onDidChangeCursorPosition(function(e){n._matchBrackets&&n._updateBracketsSoon.schedule()})),n._register(t.onDidChangeModel(function(e){n._decorations=[],n._updateBracketsSoon.schedule()})),n._register(t.onDidChangeConfiguration(function(e){n._matchBrackets=n._editor.getConfiguration().contribInfo.matchBrackets,!n._matchBrackets&&n._decorations.length>0&&(n._decorations=n._editor.deltaDecorations(n._decorations,[])),n._updateBracketsSoon.schedule()})),n}return f(t,e),n=t,t.get=function(e){return e.getContribution(n.ID)},t.prototype.getId=function(){return n.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelection();if(t.isEmpty()){var n=t.getStartPosition(),i=e.matchBracket(n);if(i){var o=null;i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition()),o&&(this._editor.setPosition(o),this._editor.revealPosition(o))}}}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],t=0,i=0,o=this._lastBracketsData.length;i1&&r.sort(o.Position.compare);for(var c=[],d=0,p=0,f=n.length,a=0,u=r.length;a{1}",n,r),this._commands[n]=i):s=o.format("{0}",r),t.push(s)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){this._symbolRange=e;var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},preference:[a.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),f=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;n a:hover { color: "+i+" !important; }")})}),define(d[516],h([1,0,18,10,3,7,31,50,17,30,453,515]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._messageService=n,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel(function(){return i._onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeModelLanguage(function(){return i._onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeConfiguration(function(e){var t=i._isEnabled;i._isEnabled=i._editor.getConfiguration().contribInfo.codeLens,t!==i._isEnabled&&i._onModelChange()})),this._globalToDispose.push(u.CodeLensProviderRegistry.onDidChange(this._onModelChange,this)),this._onModelChange()}return t=e,e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=o.dispose(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentFindOccPromise&&(this._currentFindOccPromise.cancel(),this._currentFindOccPromise=null),this._localToDispose=o.dispose(this._localToDispose)},e.prototype.getId=function(){return t.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&u.CodeLensProviderRegistry.has(t)){for(var o=0,r=u.CodeLensProviderRegistry.all(t);oi||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(a):(n=[a],o.push(n)))}var l=this._editor.getCenteredRangeInViewport(),c=l&&o.length!==this._lenses.length&&0!==this._editor.getScrollTop();this._editor.changeDecorations(function(e){t._editor.changeViewZones(function(n){for(var i=0,r=0,s=new d.CodeLensHelper;rD)return l._domNode.style.maxWidth=e-28-t-15+"px",void(l._replaceInputBox.inputElement.style.width=s.getTotalWidth(l._findInput.inputBox.inputElement)+"px");D+28+t>=e&&(i=!0),D+28+t-O>=e&&(o=!0),D+28+t-O>=e+50&&(n=!0),s.toggleClass(l._domNode,"collapsed-find-widget",n),s.toggleClass(l._domNode,"narrow-find-widget",o),s.toggleClass(l._domNode,"reduced-find-widget",i),o||n||(l._domNode.style.maxWidth=e-28-t-15+"px");var r=s.getTotalWidth(l._findInput.inputBox.inputElement);r>0&&(l._replaceInputBox.inputElement.style.width=r+"px")};return c(),l._register(l._codeEditor.onDidChangeConfiguration(function(e){e.readOnly&&(l._codeEditor.getConfiguration().readOnly&&l._state.change({isReplaceRevealed:!1},!1),l._updateButtons()),e.layoutInfo&&c()})),l._register(l._codeEditor.onDidChangeCursorSelection(function(){l._isVisible&&l._updateToggleSelectionFindButton()})),l._findInputFocussed=g.CONTEXT_FIND_INPUT_FOCUSSED.bindTo(a),l._focusTracker=l._register(s.trackFocus(l._findInput.inputBox.inputElement)),l._focusTracker.addFocusListener(function(){if(l._findInputFocussed.set(!0),l._toggleSelectionFind.checked){var e=l._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=l._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.Range.equalsRange(e,t)||l._state.change({searchScope:e},!0))}}),l._focusTracker.addBlurListener(function(){l._findInputFocussed.set(!1)}),l._codeEditor.addOverlayWidget(l),l._viewZone=new A(0),l._applyTheme(u.getTheme()),l._register(u.onThemeChange(l._applyTheme.bind(l))),l._register(l._codeEditor.onDidChangeModel(function(e){l._isVisible&&void 0!==l._viewZoneId&&l._codeEditor.changeViewZones(function(e){e.removeZone(l._viewZoneId),l._viewZoneId=void 0})})),l._register(l._codeEditor.onDidScrollChange(function(e){e.scrollTopChanged?l._layoutViewZone():setTimeout(function(){l._layoutViewZone()},0)})),l}return f(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:d.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;s.toggleClass(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone()},t.prototype._updateMatchesCount=function(){this._matchesCount.style.minWidth=O+"px",this._state.matchesCount>=h.MATCHES_LIMIT?this._matchesCount.title=T:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);var e;if(this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=h.MATCHES_LIMIT&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=r.format(k,n,t)}else e=I;this._matchesCount.appendChild(document.createTextNode(e)),O=Math.max(O,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(n||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),s.toggleClass(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var n=this._codeEditor.getSelection();!!n&&(n.startLineNumber!==n.endLineNumber||n.startColumn!==n.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateButtons(),setTimeout(function(){s.addClass(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false"),e||(s.addClass(t._domNode,"noanimation"),setTimeout(function(){s.removeClass(t._domNode,"noanimation")},200))},0),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&n){var o=s.getDomNodePagePosition(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(n.getStartPosition()),a=o.left+r.left;if(r.topn.startLineNumber&&(i=!1);var u=s.getTopLeftOffset(this._domNode).left;a>u&&(i=!1);var l=this._codeEditor.getScrolledVisiblePosition(n.getEndPosition());o.left+l.left>u&&(i=!1)}}this._showViewZone(i)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),s.removeClass(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones(function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))}))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones(function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=P,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)})},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones(function(n){var i=P;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,i=64-P):(t._viewZone.heightInPx=P,i=P-64),n.removeZone(t._viewZoneId)):t._viewZone.heightInPx=P,t._viewZoneId=n.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+i)})},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(v.inputActiveOptionBorder),inputBackground:e.getColor(v.inputBackground),inputForeground:e.getColor(v.inputForeground),inputBorder:e.getColor(v.inputBorder),inputValidationInfoBackground:e.getColor(v.inputValidationInfoBackground),inputValidationInfoBorder:e.getColor(v.inputValidationInfoBorder),inputValidationWarningBackground:e.getColor(v.inputValidationWarningBackground),inputValidationWarningBorder:e.getColor(v.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(v.inputValidationErrorBackground),inputValidationErrorBorder:e.getColor(v.inputValidationErrorBorder)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new a.FindInput(null,this._contextViewProvider,{width:221,label:_,placeholder:y,appendCaseSensitiveLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}})),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(function(t){return e._onFindInputKeyDown(t)})),this._register(this._findInput.onInput(function(){e._state.change({searchString:e._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())})),o.isLinux&&this._register(this._findInput.onMouseDown(function(t){return e._onFindInputMouseDown(t)})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new B({label:C+this._keybindingLabelFor(h.FIND_IDS.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError)},onKeyDown:function(e){}})),this._nextBtn=this._register(new B({label:b+this._keybindingLabelFor(h.FIND_IDS.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError)},onKeyDown:function(e){}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new W({parent:t,title:w+this._keybindingLabelFor(h.FIND_IDS.ToggleSearchScopeCommand),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new B({label:S+this._keybindingLabelFor(h.FIND_IDS.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new u.InputBox(t,null,{ariaLabel:E,placeholder:L})),this._register(s.addStandardDisposableListener(this._replaceInputBox.inputElement,"keydown",function(t){return e._onReplaceInputKeyDown(t)})),this._register(s.addStandardDisposableListener(this._replaceInputBox.inputElement,"input",function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)})),this._replaceBtn=this._register(new B({label:x+this._keybindingLabelFor(h.FIND_IDS.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new B({label:N+this._keybindingLabelFor(h.FIND_IDS.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()},onKeyDown:function(e){}}));var n=document.createElement("div");return n.className="replace-part",n.appendChild(t),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),n},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new B({label:M,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()},onKeyDown:function(e){}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=D+"px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new c.Sash(this._domNode,this,{orientation:c.Orientation.VERTICAL});var t=D;this._register(this._resizeSash.addListener("start",function(n){t=s.getTotalWidth(e._domNode)})),this._register(this._resizeSash.addListener("change",function(n){var i=t+n.startX-n.currentX;if(!(i(parseFloat(s.getComputedStyle(e._domNode).maxWidth)||0)||(e._domNode.style.width=i+"px",e._isReplaceVisible&&(e._replaceInputBox.width=o))}}))},t.ID="editor.contrib.findWidget",t}(l.Widget);t.FindWidget=F;var W=function(e){function t(n){var i=e.call(this)||this;return i._opts=n,i._domNode=document.createElement("div"),i._domNode.className="monaco-checkbox",i._domNode.title=i._opts.title,i._domNode.tabIndex=0,i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._checkbox.tabIndex=-1,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._label.tabIndex=-1,i._domNode.appendChild(i._checkbox),i._domNode.appendChild(i._label),i._opts.parent.appendChild(i._domNode),i.onchange(i._checkbox,function(e){i._opts.onChange()}),i}return f(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this._checkbox.focus()},t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(l.Widget),B=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,function(e){n._opts.onTrigger(),e.preventDefault()}),n.onkeydown(n._domNode,function(e){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown(e)}),n}return f(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){s.toggleClass(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){s.toggleClass(this._domNode,e,t)},t}(l.Widget);t.SimpleButton=B,m.registerThemingParticipant(function(e,t){function n(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")}n(".findMatch",e.getColor(v.editorFindMatchHighlight)),n(".currentFindMatch",e.getColor(v.editorFindMatch)),n(".findScope",e.getColor(v.editorFindRangeHighlight)),n(".find-widget",e.getColor(v.editorWidgetBackground));var i=e.getColor(v.widgetShadow);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(v.activeContrastBorder);o&&(t.addRule(".monaco-editor .findScope { border: 1px dashed "+o.transparent(.4)+"; }"),t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+o+"; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }"),t.addRule(".monaco-editor .findMatch { border: 1px dotted "+o+"; -moz-box-sizing: border-box; box-sizing: border-box; }"));var r=e.getColor(v.contrastBorder);r&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+r+"; }");var s=e.getColor(v.errorForeground);s&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+s+"; }");var a=e.getColor("panel.border");a&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+a+"; width: 3px !important; margin-left: -4px;}")})}),define(d[520],h([1,0,69,46,19,30,519,518,176,14,76]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i,o,r,u){var l=e.call(this,t,i,u)||this;return l._widget=l._register(new s.FindWidget(t,l,l._state,n,o,i,r)),l._findOptionsWidget=l._register(new a.FindOptionsWidget(t,l._state,o,r)),l}return f(t,e),t.prototype._start=function(t){e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t=v([r.editorContribution,y(1,n.IContextViewService),y(2,o.IContextKeyService),y(3,i.IKeybindingService),y(4,l.IThemeService),y(5,c.IStorageService)],t)}(u.CommonFindController);t.FindController=d}),define(d[521],h([1,0,18,3,51,2,13,25,19,14,23,335]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,n){this._messageListeners=[],this._editor=e,this._visible=t.CONTEXT_SNIPPET_MODE.bindTo(n)}return t=e,e.get=function(e){return e.getContribution(t._id)},e.prototype.getId=function(){return t._id},e.prototype.dispose=function(){this._visible.reset()},e.prototype.showMessage=function(e,t){var s=this;o.alert(e),this._visible.set(!0),i.dispose(this._messageWidget),this._messageListeners=i.dispose(this._messageListeners),this._messageWidget=new p(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText(function(){return s.closeMessage()})),this._messageListeners.push(this._editor.onDidChangeCursorPosition(function(){return s.closeMessage()})),this._messageListeners.push(this._editor.onDidDispose(function(){return s.closeMessage()})),this._messageListeners.push(this._editor.onDidChangeModel(function(){return s.closeMessage()})),this._messageListeners.push(n.setDisposableTimeout(function(){return s.closeMessage()},3e3));var a;this._messageListeners.push(this._editor.onMouseMove(function(e){e.target.position&&(a?a.containsPosition(e.target.position)||s.closeMessage():a=new r.Range(t.lineNumber-3,1,e.target.position.lineNumber+3,1))}))},e.prototype.closeMessage=function(){this._visible.reset(),this._messageListeners=i.dispose(this._messageListeners),this._messageListeners.push(p.fadeOut(this._messageWidget))},e._id="editor.contrib.messageController",e.CONTEXT_SNIPPET_MODE=new u.RawContextKey("messageVisible",!1),e=t=v([s.commonEditorContribution,y(1,u.IContextKeyService)],e);var t}();t.MessageController=d;var h=s.EditorCommand.bindToContribution(d.get);s.CommonEditorRegistry.registerEditorCommand(new h({id:"leaveEditorMessage",precondition:d.CONTEXT_SNIPPET_MODE,handler:function(e){return e.closeMessage()},kbOpts:{weight:s.CommonEditorRegistry.commandWeight(30),primary:9}}));var p=function(){function e(e,t,n){var i=t.lineNumber,o=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i),this._position={lineNumber:i,column:1},this._domNode=document.createElement("div"),this._domNode.style.paddingLeft=e.getOffsetForColumn(i,o)-6+"px",this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,n=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[a.ContentWidgetPositionPreference.ABOVE]}},e}();l.registerThemingParticipant(function(e,t){var n=e.getColor(c.inputValidationInfoBorder);if(n){var i=e.type===l.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+n+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+i+"px solid "+n+"; }")}var o=e.getColor(c.inputValidationInfoBackground);o&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+o+"; }")})}),define(d[522],h([1,0,353,11,3,36,4,19,103,58,12,2,13,30,183,23,14,32,21,37,366]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,C,b,w,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=function(){function e(e,t){var n=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new i.Emitter,this._onMarkerSetChanged=new i.Emitter,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose(function(){return n.dispose()})),this._toUnbind.push(this._editor.onDidChangeCursorPosition(function(){n._ignoreSelectionChange||(n._nextIdx=-1)}))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){this._markers=e||[],this._markers.sort(function(e,t){return r.default.compare(e.severity,t.severity)||d.Range.compareRangesUsingStarts(e,t)}),this._nextIdx=-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i=this._markers.length&&(this._nextIdx=0)):(this._nextIdx-=1,this._nextIdx<0&&(this._nextIdx=this._markers.length-1));var t=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(t)}else this._onCurrentMarkerChanged.fire(void 0)},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.next=function(){this.move(!0)},e.prototype.previous=function(){this.move(!1)},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;t1&&(a=new r.Selection(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+h-1));var p=new l.InPlaceReplaceCommand(u,a,n.value);s.editor.pushUndoStop(),s.editor.executeCommand(e,p),s.editor.pushUndoStop(),s.decorationIds=s.editor.deltaDecorations(s.decorationIds,[{range:c,options:t.DECORATION}]),s.decorationRemover.cancel(),s.decorationRemover=i.TPromise.timeout(350),s.decorationRemover.then(function(){s.editor.changeDecorations(function(e){s.decorationIds=e.deltaDecorations(s.decorationIds,[])})})}})},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=p.ModelDecorationOptions.register({className:"valueSetReplacement"}),e=t=v([a.commonEditorContribution,y(1,u.IEditorWorkerService)],e);var t}();(function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:n.localize(0,null),alias:"Replace with Previous Value",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textFocus,primary:3154}})||this}f(t,e),t.prototype.run=function(e,t){var n=g.get(t);if(n)return n.run(this.id,!0)},t=v([a.editorAction],t)})(a.EditorAction),function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:n.localize(1,null),alias:"Replace with Next Value",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textFocus,primary:3156}})||this}f(t,e),t.prototype.run=function(e,t){var n=g.get(t);if(n)return n.run(this.id,!1)},t=v([a.editorAction],t)}(a.EditorAction);d.registerThemingParticipant(function(e,t){var n=e.getColor(h.editorBracketMatchBorder);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")})}),define(d[525],h([1,0,358,10,15,36,7,50,71,20,13,17,61,25,401,3,30,14,23,34,192,389]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var E=o.isMacintosh?n.localize(0,null):n.localize(1,null),L=o.isMacintosh?n.localize(2,null):n.localize(3,null),x=n.localize(4,null),N=n.localize(5,null),M={meta:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:E}),metaActive:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:E}),alt:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:x}),altActive:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:x}),altCommand:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:N}),altCommandActive:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:N}),metaCommand:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link",hoverMessage:L}),metaCommandActive:w.ModelDecorationOptions.register({stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"detected-link-active",hoverMessage:L})},T=function(){function e(e,t){this.link=e,this.decorationId=t}return e.decoration=function(t,n){return{range:t.range,options:e._getOptions(t,n,!1)}},e._getOptions=function(e,t,n){return/^command:/i.test(e.url)?t?n?M.metaCommandActive:M.metaCommand:n?M.altCommandActive:M.altCommand:t?n?M.metaActive:M.meta:n?M.altActive:M.alt},e.prototype.activate=function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!0))},e.prototype.deactivate=function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!1))},e}(),k=function(){function e(e,t,n,i){var o=this;this.editor=e,this.openerService=t,this.messageService=n,this.editorWorkerService=i,this.listenersToRemove=[];var r=new S.ClickLinkGesture(e);this.listenersToRemove.push(r),this.listenersToRemove.push(r.onMouseMoveOrRelevantKeyDown(function(e){var t=e[0],n=e[1];o._onEditorMouseMove(t,n)})),this.listenersToRemove.push(r.onExecute(function(e){o.onEditorMouseUp(e)})),this.listenersToRemove.push(r.onCancel(function(e){o.cleanUpActiveLinkDecoration()})),this.enabled=e.getConfiguration().contribInfo.links,this.listenersToRemove.push(e.onDidChangeConfiguration(function(t){var n=e.getConfiguration().contribInfo.links;o.enabled!==n&&(o.enabled=n,o.updateDecorations([]),o.stop(),o.beginCompute())})),this.listenersToRemove.push(e.onDidChangeModelContent(function(e){return o.onChange()})),this.listenersToRemove.push(e.onDidChangeModel(function(e){return o.onModelChanged()})),this.listenersToRemove.push(e.onDidChangeModelLanguage(function(e){return o.onModelModeChanged()})),this.listenersToRemove.push(d.LinkProviderRegistry.onDidChange(function(e){return o.onModelModeChanged()})),this.timeoutPromise=null,this.computePromise=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}return t=e,e.get=function(e){return e.getContribution(t.ID)},e.prototype.getId=function(){return t.ID},e.prototype.isComputing=function(){return s.TPromise.is(this.computePromise)},e.prototype.onModelChanged=function(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()},e.prototype.onModelModeChanged=function(){this.stop(),this.beginCompute()},e.prototype.onChange=function(){var e=this;this.timeoutPromise||(this.timeoutPromise=s.TPromise.timeout(t.RECOMPUTE_TIME),this.timeoutPromise.then(function(){e.timeoutPromise=null,e.beginCompute()}))},e.prototype.beginCompute=function(){var e=this;this.editor.getModel()&&this.enabled&&d.LinkProviderRegistry.has(this.editor.getModel())&&(this.computePromise=g.getLinks(this.editor.getModel()).then(function(t){e.updateDecorations(t),e.computePromise=null}))},e.prototype.updateDecorations=function(e){var t=this,n="altKey"===this.editor.getConfiguration().multiCursorModifier;this.editor.changeDecorations(function(i){for(var o=[],r=Object.keys(t.currentOccurrences),s=0,a=r.length;s1;r.toggleClass(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var i=r.append(this.signature,w(".code")),o=t.parameters.length>0,a=this.editor.getConfiguration().fontInfo;i.style.fontSize=a.fontSize+"px",i.style.fontFamily=a.fontFamily,o?this.renderParameters(i,t,this.hints.activeParameter):r.append(i,w("span")).textContent=t.label;var u=t.parameters[this.hints.activeParameter];if(u&&u.documentation){var l=w("span.documentation");l.textContent=u.documentation,r.append(this.docs,w("p",null,l))}r.toggleClass(this.signature,"has-docs",!!t.documentation),t.documentation&&r.append(this.docs,w("p",null,t.documentation));var c=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(c+="/"+this.hints.signatures.length),this.overloads.textContent=c,u){var d=u.label;this.announcedLabel!==d&&(s.alert(n.localize(0,null,d)),this.announcedLabel=d)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){for(var i,o=t.label.length,s=0,a=t.parameters.length-1;a>=0;a--){var u=t.parameters[a],l=0,c=0;(s=t.label.lastIndexOf(u.label,o-1))>=0&&(l=s,c=s+u.label.length),(i=document.createElement("span")).textContent=t.label.substring(c,o),r.prepend(e,i),(i=document.createElement("span")).className="parameter "+(a===n?"active":""),i.textContent=t.label.substring(l,c),r.prepend(e,i),o=l}(i=document.createElement("span")).textContent=t.label.substring(0,o),r.prepend(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature+1)%e,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature-1+e)%e,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables),this.model=null},e.ID="editor.widget.parameterHintsWidget",e=v([y(1,p.IContextKeyService)],e)}();t.ParameterHintsWidget=E,C.registerThemingParticipant(function(e,t){var n=e.getColor(b.editorHoverBorder);if(n){var i=e.type===C.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+n.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+n.transparent(.5)+"; }")}var o=e.getColor(b.editorHoverBackground);o&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+o+"; }")})}),define(d[527],h([1,0,360,3,16,21,19,13,30,526,178]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(l.ParameterHintsWidget,this.editor)}return t=e,e.get=function(e){return e.getContribution(t.ID)},e.prototype.getId=function(){return t.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=i.dispose(this.widget)},e.ID="editor.controller.parameterHints",e=t=v([u.editorContribution,y(1,o.IInstantiationService)],e);var t}(),h=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.localize(0,null),alias:"Trigger Parameter Hints",precondition:r.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:r.EditorContextKeys.textFocus,primary:3082}})||this}return f(t,e),t.prototype.run=function(e,t){var n=d.get(t);n&&n.trigger()},t=v([a.editorAction],t)}(a.EditorAction);t.TriggerParameterHintsAction=h;var p=a.CommonEditorRegistry.commandWeight(75),g=a.EditorCommand.bindToContribution(d.get);a.CommonEditorRegistry.registerEditorCommand(new g({id:"closeParameterHints",precondition:c.Context.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.textFocus,primary:9,secondary:[1033]}})),a.CommonEditorRegistry.registerEditorCommand(new g({id:"showPrevParameterHint",precondition:s.ContextKeyExpr.and(c.Context.Visible,c.Context.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.textFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),a.CommonEditorRegistry.registerEditorCommand(new g({id:"showNextParameterHint",precondition:s.ContextKeyExpr.and(c.Context.Visible,c.Context.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.textFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(d[528],h([1,0,369,10,3,7,2,25,14,23,12,393]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){var n=this;this.themeService=t,this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration(function(e){e.fontInfo&&n.updateFont()})),this._disposables.push(t.onThemeChange(function(e){return n.onThemeChange(e)}))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=o.dispose(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",n.localize(0,null)),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont(),this.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(l.inputBackground),n=e.getColor(l.inputForeground),i=e.getColor(l.widgetShadow),o=e.getColor(l.inputBorder);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=n?n.toString():null,this._inputField.style.borderWidth=o?"1px":"0px",this._inputField.style.borderStyle=o?"solid":"none",this._inputField.style.borderColor=o?o.toString():"none",this._domNode.style.boxShadow=i?" 0 2px 8px "+i:null}},e.prototype.updateFont=function(){if(this._inputField){var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[a.ContentWidgetPositionPreference.BELOW,a.ContentWidgetPositionPreference.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(){this._currentCancelInput&&this._currentCancelInput()},e.prototype.getInput=function(e,t,n,a){var u=this;this._position=new c.Position(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",n.toString()),this._inputField.setAttribute("selectionEnd",a.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var l,d=[];return l=function(){o.dispose(d),u._hide()},new r.TPromise(function(n,o){u._currentCancelInput=function(){return u._currentAcceptInput=null,u._currentCancelInput=null,o(i.canceled()),!0},u._currentAcceptInput=function(){0!==u._inputField.value.trim().length&&u._inputField.value!==t?(u._currentAcceptInput=null,u._currentCancelInput=null,n(u._inputField.value)):u.cancelInput()};d.push(u._editor.onDidChangeCursorSelection(function(){s.Range.containsPosition(e,u._editor.getPosition())||u.cancelInput()})),d.push(u._editor.onDidBlurEditor(function(){return u.cancelInput()})),u._show()},this._currentCancelInput).then(function(e){return l(),e},function(e){return l(),r.TPromise.wrapError(e)})},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout(function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))},25)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e=v([y(1,u.IThemeService)],e)}();t.default=d}),define(d[529],h([1,0,368,10,36,7,411,19,50,163,13,30,21,338,528,87,16,14,18,17,51,2]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S,E){"use strict";function L(e,t,o){var s=[],a=!1,u=w.RenameProviderRegistry.ordered(e).map(function(n){return function(){if(!a)return b.asWinJsPromise(function(i){return n.provideRenameEdits(e,t,o,i)}).then(function(e){if(e){if(!e.rejectReason)return a=!0,e;s.push(e.rejectReason)}else;},function(e){return i.onUnexpectedExternalError(e),r.TPromise.wrapError(new Error("provider failed"))})}});return b.sequence(u).then(function(e){var t=e[0];return s.length>0?{edits:void 0,rejectReason:s.join("\n")}:t||{edits:void 0,rejectReason:n.localize(0,null)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.rename=L;var x=new a.RawContextKey("renameInputVisible",!1),N=function(){function e(e,t,n,i,o,r,s){this.editor=e,this._messageService=t,this._textModelResolverService=n,this._progressService=i,this._fileService=s,this._renameInputField=new g.default(e,r),this._renameInputVisible=x.bindTo(o)}return t=e,e.get=function(e){return e.getContribution(t.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return t.ID},e.prototype.run=function(){var e=this,t=this.editor.getSelection(),s=this.editor.getModel().getWordAtPosition(t.getStartPosition());if(s){var a,u=t.startLineNumber,l=0,c=s.word.length;return a=new E.Range(u,s.startColumn,u,s.endColumn),t.isEmpty()||t.startLineNumber!==t.endLineNumber||(l=Math.max(0,t.startColumn-s.startColumn),c=Math.min(s.endColumn,t.endColumn)-s.startColumn),this._renameInputVisible.set(!0),this._renameInputField.getInput(a,s.word,l,c).then(function(t){e._renameInputVisible.reset(),e.editor.focus();var i=e._prepareRename(t).then(function(i){return i.finish().then(function(o){o&&e.editor.setSelection(o),S.alert(n.localize(1,null,s.word,t,i.ariaMessage()))})},function(t){return"string"==typeof t?void e._messageService.show(o.default.Info,t):(e._messageService.show(o.default.Error,n.localize(2,null)),r.TPromise.wrapError(t))});return e._progressService.showWhile(i,250),i},function(t){if(e._renameInputVisible.reset(),e.editor.focus(),!i.isPromiseCanceledError(t))return r.TPromise.wrapError(t)})}},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput()},e.prototype._prepareRename=function(e){var t=p.createBulkEdit(this._textModelResolverService,this.editor,this._fileService);return L(this.editor.getModel(),this.editor.getPosition(),e).then(function(e){return e.rejectReason?r.TPromise.wrapError(new Error(e.rejectReason)):(t.add(e.edits),t)})},e.ID="editor.contrib.renameController",e=t=v([d.editorContribution,y(1,u.IMessageService),y(2,m.ITextModelService),y(3,l.IProgressService),y(4,a.IContextKeyService),y(5,C.IThemeService),y(6,_.optional(s.IFileService))],e);var t}(),M=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.localize(3,null),alias:"Rename Symbol",precondition:a.ContextKeyExpr.and(h.EditorContextKeys.writable,h.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:h.EditorContextKeys.textFocus,primary:60},menuOpts:{group:"1_modification",order:1.1}})||this}return f(t,e),t.prototype.run=function(e,t){var n=N.get(t);if(n)return n.run()},t=v([c.editorAction],t)}(c.EditorAction);t.RenameAction=M;var T=c.EditorCommand.bindToContribution(N.get);c.CommonEditorRegistry.registerEditorCommand(new T({id:"acceptRenameInput",precondition:x,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.focus,primary:3}})),c.CommonEditorRegistry.registerEditorCommand(new T({id:"cancelRenameInput",precondition:x,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.focus,primary:9,secondary:[1033]}})),c.CommonEditorRegistry.registerDefaultLanguageCommand("_executeDocumentRenameProvider",function(e,t,n){var o=n.newName;if("string"!=typeof o)throw i.illegalArgument("newName");return L(e,t,o)})}),define(d[530],h([1,0,372,81,9,11,7,10,3,4,110,234,63,46,19,25,109,51,58,137,14,23,76,395]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,C,b,w,S,E,L){"use strict";function x(e){return e&&e.match(k)?e:null}function N(e){if(!e)return!1;var t=e.suggestion;return!!t.documentation||t.detail&&t.detail!==t.label}Object.defineProperty(t,"__esModule",{value:!0});var M=!1;t.editorSuggestWidgetBackground=E.registerColor("editorSuggestWidget.background",{dark:E.editorWidgetBackground,light:E.editorWidgetBackground,hc:E.editorWidgetBackground},n.localize(0,null)),t.editorSuggestWidgetBorder=E.registerColor("editorSuggestWidget.border",{dark:E.editorWidgetBorder,light:E.editorWidgetBorder,hc:E.editorWidgetBorder},n.localize(1,null)),t.editorSuggestWidgetForeground=E.registerColor("editorSuggestWidget.foreground",{dark:E.editorForeground,light:E.editorForeground,hc:E.editorForeground},n.localize(2,null)),t.editorSuggestWidgetSelectedBackground=E.registerColor("editorSuggestWidget.selectedBackground",{dark:E.listFocusBackground,light:E.listFocusBackground,hc:E.listFocusBackground},n.localize(3,null)),t.editorSuggestWidgetHighlightForeground=E.registerColor("editorSuggestWidget.highlightForeground",{dark:E.listHighlightForeground,light:E.listHighlightForeground,hc:E.listHighlightForeground},n.localize(4,null));var T,k=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i,I=function(){function e(e,t,n){this.widget=e,this.editor=t,this.triggerKeybindingLabel=n}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,i=Object.create(null);i.disposables=[],i.root=e,i.icon=l.append(e,l.$(".icon")),i.colorspan=l.append(i.icon,l.$("span.colorspan"));var o=l.append(e,l.$(".contents")),s=l.append(o,l.$(".main"));i.highlightedLabel=new c.HighlightedLabel(s),i.disposables.push(i.highlightedLabel),i.typeLabel=l.append(s,l.$("span.type-label")),i.readMore=l.append(s,l.$("span.readMore")),i.readMore.title=n.localize(5,null,this.triggerKeybindingLabel);var a=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,o=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",r=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";i.root.style.fontSize=o,s.style.fontFamily=n,s.style.lineHeight=r,i.icon.style.height=r,i.icon.style.width=r,i.readMore.style.height=r,i.readMore.style.width=r};return a(),r.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo||e.contribInfo}).on(a,null,i.disposables),i},e.prototype.renderElement=function(e,t,o){var r=this,s=o,a=e.suggestion;if(N(e)?s.root.setAttribute("aria-label",n.localize(6,null,a.label)):s.root.setAttribute("aria-label",n.localize(7,null,a.label)),s.icon.className="icon "+a.type,s.colorspan.style.backgroundColor="","color"===a.type){var u=x(a.label)||x(a.documentation);u&&(s.icon.className="icon customcolor",s.colorspan.style.backgroundColor=u)}s.highlightedLabel.set(a.label,i.createMatches(e.matches)),s.typeLabel.textContent=(a.detail||"").replace(/\n.*$/m,""),N(e)?(l.show(s.readMore),s.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},s.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),r.widget.toggleDetails()}):(l.hide(s.readMore),s.readMore.onmousedown=null,s.readMore.onclick=null)},e.prototype.disposeTemplate=function(e){e.highlightedLabel.dispose(),e.disposables=u.dispose(e.disposables)},e}();!function(e){e[e.Hidden=0]="Hidden",e[e.Loading=1]="Loading",e[e.Empty=2]="Empty",e[e.Open=3]="Open",e[e.Frozen=4]="Frozen",e[e.Details=5]="Details"}(T||(T={}));var D=function(){function e(e,t,i,o){var s=this;this.widget=t,this.editor=i,this.triggerKeybindingLabel=o,this.borderWidth=1,this.disposables=[],this.el=l.append(e,l.$(".details")),this.disposables.push(u.toDisposable(function(){return e.removeChild(s.el)})),this.body=l.$(".body"),this.scrollbar=new h.DomScrollableElement(this.body,{}),l.append(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.header=l.append(this.body,l.$(".header")),this.close=l.append(this.header,l.$("span.close")),this.close.title=n.localize(8,null,o),this.type=l.append(this.header,l.$("p.type")),this.docs=l.append(this.body,l.$("p.docs")),this.ariaLabel=null,this.configureFont(),r.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(this.configureFont,this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;if(!e||!N(e))return this.type.textContent="",this.docs.textContent="",l.addClass(this.el,"no-docs"),void(this.ariaLabel=null);l.removeClass(this.el,"no-docs"),this.docs.textContent=e.suggestion.documentation,e.suggestion.detail?(this.type.innerText=e.suggestion.detail,l.show(this.type)):(this.type.innerText="",l.hide(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=o.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,n=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",i=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";this.el.style.fontSize=n,this.type.style.fontFamily=t,this.close.style.height=i,this.close.style.width=i},e.prototype.dispose=function(){this.disposables=u.dispose(this.disposables)},e}(),O=function(){function e(e,n,i,o,s,a){var u=this;this.editor=e,this.telemetryService=n,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.onDidSelectEmitter=new r.Emitter,this.onDidFocusEmitter=new r.Emitter,this.onDidHideEmitter=new r.Emitter,this.onDidShowEmitter=new r.Emitter,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1;var c=a.lookupKeybinding("editor.action.triggerSuggest"),h=c?" ("+c.getLabel()+")":"";this.isAuto=!1,this.focusedItem=null,this.storageService=s,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",M,L.StorageScope.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=l.$(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||l.addClass(this.element,"no-icons"),this.messageElement=l.append(this.element,l.$(".message")),this.listElement=l.append(this.element,l.$(".tree")),this.details=new D(this.element,this,this.editor,h);var p=new I(this,this.editor,h);this.list=new d.List(this.listElement,this,[p],{useShadows:!1,selectOnMouseDown:!0}),this.toDispose=[w.attachListStyler(this.list,o,{listInactiveFocusBackground:t.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:E.activeContrastBorder}),o.onThemeChange(function(e){return u.onThemeChange(e)}),e.onDidBlurEditorText(function(){return u.onEditorBlur()}),e.onDidLayoutChange(function(){return u.onEditorLayoutChange()}),this.list.onSelectionChange(function(e){return u.onListSelection(e)}),this.list.onFocusChange(function(e){return u.onListFocus(e)}),this.editor.onDidChangeCursorSelection(function(){return u.onCursorSelectionChanged()})],this.suggestWidgetVisible=m.Context.Visible.bindTo(i),this.suggestWidgetMultipleSuggestions=m.Context.MultipleSuggestions.bindTo(i),this.suggestionSupportsAutoAccept=m.Context.AcceptOnKey.bindTo(i),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(o.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout=s.TPromise.timeout(150).then(function(){e.editor.isFocused()||e.setState(0)})},e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){if(e.elements.length){var t=e.elements[0];this.onDidSelectEmitter.fire(t),C.alert(n.localize(11,null,t.suggestion.label)),this.editor.focus()}},e.prototype._getSuggestionAriaAlertLabel=function(e){return N(e)?n.localize(12,null,e.suggestion.label):n.localize(13,null,e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&C.alert(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var n=e.getColor(t.editorSuggestWidgetBackground);n&&(this.listElement.style.backgroundColor=n.toString(),this.details.element.style.backgroundColor=n.toString(),this.messageElement.style.backgroundColor=n.toString());var i=e.getColor(t.editorSuggestWidgetBorder);i&&(this.listElement.style.borderColor=i.toString(),this.details.element.style.borderColor=i.toString(),this.messageElement.style.borderColor=i.toString(),this.detailsBorderColor=i.toString());var o=e.getColor(E.focusBorder);o&&(this.detailsFocusBorderColor=o.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var n=e.elements[0];if(this._ariaAlert(this._getSuggestionAriaAlertLabel(n)),n!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var i=e.indexes[0];this.suggestionSupportsAutoAccept.set(!n.suggestion.noAutoAccept);var o=this.focusedItem,r=this.focusedItemIndex;this.focusedItemIndex=i,this.focusedItem=n,o&&(this.ignoreFocusEvents=!0,this.list.splice(r,1,[o]),this.ignoreFocusEvents=!1),this.updateListHeight(),this.list.reveal(i),this.currentSuggestionDetails=n.resolve().then(function(){t.ignoreFocusEvents=!0,t.list.splice(i,1,[n]),t.ignoreFocusEvents=!1,t.list.setFocus([i]),t.list.reveal(i),t.expandDocsSettingFromStorage()?t.showDetails():l.removeClass(t.element,"docs-side")}).then(null,function(e){return!a.isPromiseCanceledError(e)&&a.onUnexpectedError(e)}).then(function(){return t.currentSuggestionDetails=null}),this.onDidFocusEmitter.fire(n)}}},e.prototype.setState=function(t){if(this.element){var n=this.state!==t;switch(this.state=t,l.toggleClass(this.element,"frozen",4===t),t){case 0:l.hide(this.messageElement,this.details.element),l.show(this.listElement),this.hide(),n&&this.list.splice(0,this.list.length);break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,l.hide(this.listElement,this.details.element),l.show(this.messageElement),l.removeClass(this.element,"docs-side"),this.show();break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,l.hide(this.listElement,this.details.element),l.show(this.messageElement),l.removeClass(this.element,"docs-side"),this.show();break;case 3:l.hide(this.messageElement),l.show(this.listElement),this.expandDocsSettingFromStorage()&&N(this.list.getFocusedElements()[0])?(l.show(this.details.element),this.expandSideOrBelow()):l.hide(this.details.element),this.show();break;case 4:l.hide(this.messageElement,this.details.element),l.show(this.listElement),this.show();break;case 5:l.hide(this.messageElement),l.show(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}n&&this.editor.layoutContentWidget(this)}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout(function(){t.loadingTimeout=null,t.setState(1)},50)))},e.prototype.showSuggestions=function(e,t,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel=e,t&&2!==this.state&&0!==this.state)this.setState(4);else{var i=this.completionModel.items.length,o=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),o)n?this.setState(0):this.setState(2),this.completionModel=null;else{var r=this.completionModel.stats;r.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",_({},r,this.editor.getTelemetryData())),this.focusedItem=null,this.focusedItemIndex=null,this.list.splice(0,this.list.length,this.completionModel.items),this.list.setFocus([0]),this.list.reveal(0,0),t?this.setState(4):this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return this.list.getFocusedElements()[0]},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(N(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),l.hide(this.details.element),l.removeClass(this.element,"docs-side"),l.removeClass(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),l.show(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this;this.updateListHeight(),this.suggestWidgetVisible.set(!0),this.showTimeout=s.TPromise.timeout(100).then(function(){l.addClass(e.element,"visible"),e.onDidShowEmitter.fire(e)})},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),l.removeClass(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[g.ContentWidgetPositionPreference.BELOW,g.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),this.editor.layoutContentWidget(this),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=l.getDomNodePagePosition(this.editor.getDomNode()),i=n.left+t.left,o=n.top+t.top+t.height,r=l.getDomNodePagePosition(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])0&&this._activeAcceptCharacters.add(i[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){r.dispose(this._disposables)},e}(),x=function(){function e(e,t,n,i,o){var r=this;this._editor=e,this._commandService=t,this._telemetryService=n,this._toDispose=[],this._model=new S.SuggestModel(this._editor),this._toDispose.push(this._model.onDidTrigger(function(e){return r._widget.showTriggered(e.auto)})),this._toDispose.push(this._model.onDidSuggest(function(e){return r._widget.showSuggestions(e.completionModel,e.isFrozen,e.auto)})),this._toDispose.push(this._model.onDidCancel(function(e){return!e.retrigger&&r._widget.hideWidget()}));var s=w.Context.AcceptSuggestionsOnEnter.bindTo(i),a=function(){var e=r._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter;s.set("on"===e||"smart"===e||!0===e)};this._toDispose.push(this._editor.onDidChangeConfiguration(function(e){return a()})),a(),this._widget=o.createInstance(E.SuggestWidget,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var u=new L(e,this._widget,function(e){return r._onDidSelectItem(e)});this._toDispose.push(u,this._model.onDidSuggest(function(e){0===e.completionModel.items.length&&u.reset()}));var l=w.Context.MakesTextEdit.bindTo(i);this._toDispose.push(this._widget.onDidFocus(function(e){var t=r._editor.getPosition(),n=e.position.column-e.suggestion.overwriteBefore,i=t.column,o=!0;"smart"!==r._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==r._model.state||e.suggestion.command||e.suggestion.additionalTextEdits||"textmate"===e.suggestion.snippetType||i-n!==e.suggestion.insertText.length||(o=r._editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:n,endLineNumber:t.lineNumber,endColumn:i})!==e.suggestion.insertText),l.set(o)})),this._toDispose.push({dispose:function(){l.reset()}})}return t=e,e.get=function(e){return e.getContribution(t.ID)},e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){this._toDispose=r.dispose(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){if(e){var t=e.suggestion,n=e.position,o=this._editor.getPosition().column-n.column;Array.isArray(t.additionalTextEdits)&&(this._editor.pushUndoStop(),this._editor.executeEdits("suggestController.additionalTextEdits",t.additionalTextEdits.map(function(e){return g.EditOperation.replace(m.Range.lift(e.range),e.text)})),this._editor.pushUndoStop());var r=t.insertText;"textmate"!==t.snippetType&&(r=C.SnippetParser.escape(r)),b.SnippetController2.get(this._editor).insert(r,t.overwriteBefore+o,t.overwriteAfter),t.command&&(s=this._commandService).executeCommand.apply(s,[t.command.id].concat(t.command.arguments)).done(void 0,i.onUnexpectedError),this._alertCompletionItem(e),this._telemetryService.publicLog("suggestSnippetInsert",_({},this._editor.getTelemetryData(),{suggestionType:t.type}))}this._model.cancel();var s},e.prototype._alertCompletionItem=function(e){var t=e.suggestion,i=n.localize(0,null,t.label,t.insertText);h.alert(i)},e.prototype.triggerSuggest=function(e){this._model.trigger(!1,!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=t=v([p.editorContribution,y(1,l.ICommandService),y(2,a.ITelemetryService),y(3,u.IContextKeyService),y(4,s.IInstantiationService)],e);var t}();t.SuggestController=x;var N=function(e){function t(){return e.call(this,{id:"editor.action.triggerSuggest",label:n.localize(1,null),alias:"Trigger Suggest",precondition:u.ContextKeyExpr.and(c.EditorContextKeys.writable,c.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:c.EditorContextKeys.textFocus,primary:2058,mac:{primary:266}}})||this}return f(t,e),t.prototype.run=function(e,t){var n=x.get(t);n&&n.triggerSuggest()},t=v([d.editorAction],t)}(d.EditorAction);t.TriggerSuggestAction=N;var M=d.CommonEditorRegistry.commandWeight(90),T=d.EditorCommand.bindToContribution(x.get);d.CommonEditorRegistry.registerEditorCommand(new T({id:"acceptSelectedSuggestion",precondition:w.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:2}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"acceptSelectedSuggestionOnEnter",precondition:w.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:M,kbExpr:u.ContextKeyExpr.and(c.EditorContextKeys.textFocus,w.Context.AcceptSuggestionsOnEnter,w.Context.MakesTextEdit),primary:3}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"hideSuggestWidget",precondition:w.Context.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:9,secondary:[1033]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectNextSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectNextPageSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:12,secondary:[2060]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectLastSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectPrevSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectPrevPageSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:11,secondary:[2059]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectFirstSuggestion",precondition:u.ContextKeyExpr.and(w.Context.Visible,w.Context.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"toggleSuggestionDetails",precondition:w.Context.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:2058,mac:{primary:266}}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"toggleSuggestionFocus",precondition:w.Context.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:M,kbExpr:c.EditorContextKeys.textFocus,primary:2570,mac:{primary:778}}}))}),define(d[532],h([1,0,374,18,10,2,20,13,17,3,23,14,54,34]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e,t){var n=u.DocumentHighlightProviderRegistry.ordered(e),r=!1;return i.sequence(n.map(function(n){return function(){if(!r)return i.asWinJsPromise(function(i){return n.provideDocumentHighlights(e,t,i)}).then(function(e){if(Array.isArray(e)&&e.length>0)return r=!0,e},function(e){o.onUnexpectedExternalError(e)})}})).then(function(e){return e[0]})}Object.defineProperty(t,"__esModule",{value:!0}),t.editorWordHighlight=c.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},n.localize(0,null)),t.editorWordHighlightStrong=c.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},n.localize(1,null)),t.getOccurrencesAtPosition=f,a.CommonEditorRegistry.registerDefaultLanguageCommand("_executeDocumentHighlights",f);var g=function(){function e(e){var t=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition(function(e){t.occurrencesHighlight&&t._onPositionChanged(e)})),this.toUnhook.push(e.onDidChangeModel(function(e){t._stopAll(),t.model=t.editor.getModel()})),this.toUnhook.push(e.onDidChangeModelContent(function(e){t._stopAll()})),this.toUnhook.push(e.onDidChangeConfiguration(function(e){var n=t.editor.getConfiguration().contribInfo.occurrencesHighlight;t.occurrencesHighlight!==n&&(t.occurrencesHighlight=n,t._stopAll())})),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){var t=this;if(this.occurrencesHighlight)if(e.reason===h.CursorChangeReason.Explicit)if(u.DocumentHighlightProviderRegistry.has(this.model)){var n=this.editor.getSelection();if(n.startLineNumber===n.endLineNumber){var i=n.startLineNumber,o=n.startColumn,s=n.endColumn,a=this.model.getWordAtPosition({lineNumber:i,column:o});if(!a||a.startColumn>o||a.endColumn=s&&(c=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),c)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var m=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=f(this.model,this.editor.getPosition()),this.workerRequest.then(function(e){m===t.workerRequestTokenId&&(t.workerRequestCompleted=!0,t.workerRequestValue=e||[],t._beginRenderDecorations())}).done()}this._lastWordRange=l}}else this._stopAll()}else this._stopAll();else this._stopAll();else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(function(){e.renderDecorations()},n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],n=0,i=this.workerRequestValue.length;n0?o.format(O,e.length):null:T}Object.defineProperty(t,"__esModule",{value:!0});var N=new d.RawContextKey("accessibilityHelpWidgetVisible",!1),M=function(e){function t(t,n){var i=e.call(this)||this;return i._editor=t,i._widget=i._register(n.createInstance(R,i._editor)),i}return f(t,e),n=t,t.get=function(e){return e.getContribution(n.ID)},t.prototype.getId=function(){return n.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=n=v([g.editorContribution,y(1,l.IInstantiationService)],t);var n}(i.Disposable),T=n.localize("noSelection","No selection"),k=n.localize("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),I=n.localize("singleSelection","Line {0}, Column {1}"),D=n.localize("multiSelectionRange","{0} selections ({1} characters selected)"),O=n.localize("multiSelection","{0} selections"),R=function(e){function t(t,i,o,s){var u=e.call(this)||this;return u._contextKeyService=i,u._keybindingService=o,u._openerService=s,u._editor=t,u._isVisibleKey=N.bindTo(u._contextKeyService),u._domNode=a.createFastDomNode(document.createElement("div")),u._domNode.setClassName("accessibilityHelpWidget"),u._domNode.setDisplay("none"),u._domNode.setAttribute("role","dialog"),u._domNode.setAttribute("aria-hidden","true"),u._contentDomNode=a.createFastDomNode(document.createElement("div")),u._contentDomNode.setAttribute("role","document"),u._domNode.appendChild(u._contentDomNode),u._isVisible=!1,u._register(u._editor.onDidLayoutChange(function(){u._isVisible&&u._layout()})),u._register(r.addStandardDisposableListener(u._contentDomNode.domNode,"keydown",function(e){if(u._isVisible&&(e.equals(2083)&&(w.alert(n.localize("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),u._editor.updateOptions({accessibilitySupport:"on"}),r.clearNode(u._contentDomNode.domNode),u._buildContent(),u._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){w.alert(n.localize("openingDocs","Now opening the Editor Accessibility documentation page."));var t=u._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),u._openerService.open(E.default.parse(t)),e.preventDefault(),e.stopPropagation()}})),u.onblur(u._contentDomNode.domNode,function(){u.hide()}),u._editor.addOverlayWidget(u),u}return f(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,n){var i=this._keybindingService.lookupKeybinding(e);return i?o.format(t,i.getAriaLabel()):o.format(n,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),i=0;if(t){var o=this._editor.getModel();o&&t.forEach(function(e){i+=o.getValueLengthInRange(e)})}var r=x(t,i);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=n.localize("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=n.localize("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=n.localize("readonlyEditor"," in a read-only code editor"):r+=n.localize("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var a=b.isMacintosh?n.localize("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):n.localize("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+a;break;case 2:r+="\n\n - "+n.localize("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+n.localize("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+a}var u=n.localize("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),l=n.localize("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),c=n.localize("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d=n.localize("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,u,l):r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,c,d),r+="\n\n - "+(b.isMacintosh?n.localize("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):n.localize("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+n.localize("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(s.renderFormattedText(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,r.clearNode(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(t.WIDTH,e.width-40)),i=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);var o=Math.round((e.height-i)/2);this._domNode.setTop(o);var r=Math.round((e.width-n)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=v([y(1,d.IContextKeyService),y(2,c.IKeybindingService),y(3,S.IOpenerService)],t)}(u.Widget),P=(function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:n.localize("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:h.EditorContextKeys.focus,primary:L.isIE?2107:571}})||this}f(t,e),t.prototype.run=function(e,t){var n=M.get(t);n&&n.show()},t=v([p.editorAction],t)}(p.EditorAction),p.EditorCommand.bindToContribution(M.get));p.CommonEditorRegistry.registerEditorCommand(new P({id:"closeAccessibilityHelp",precondition:N,handler:function(e){return e.hide()},kbOpts:{weight:p.CommonEditorRegistry.commandWeight(100),kbExpr:h.EditorContextKeys.focus,primary:9,secondary:[1033]}})),_.registerThemingParticipant(function(e,t){var n=e.getColor(C.editorWidgetBackground);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+n+"; }");var i=e.getColor(C.widgetShadow);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(C.contrastBorder);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+o+"; }")})}),define(d[535],h([1,0,376,3,9,13,25,30,88,116,17,77,68,14,23,403]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g){"use strict";function m(e){for(var t="",n=0,i=e.length;n=0;i--){var r=t.tokens1[i];if(e.column-1>=r.offset){n=i;break}}for(var s=0,i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){s=i;break}var a="",u=this._model.getLineContent(e.lineNumber),l="";if(n'+m(l)+'('+l.length+" "+(1===l.length?"char":"chars")+")",a+='
    ';var h=this._decodeMetadata(t.tokens2[1+(s<<1)]);a+='',a+='",a+='",a+='",a+='",a+='",a+="",a+='
    ',n'+o.escape(t.tokens1[n].type)+""),this._domNode.innerHTML=a,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.TokenizationRegistry.getColorMap(),n=l.TokenMetadata.getLanguageId(e),i=l.TokenMetadata.getTokenType(e),o=l.TokenMetadata.getFontStyle(e),r=l.TokenMetadata.getForeground(e),s=l.TokenMetadata.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(n),tokenType:i,fontStyle:o,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),i=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:n.tokens,tokens2:i.tokens,endState:n.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),n=1;n1?n.localize(0,null,t.lineNumber,t.column):n.localize(1,null,t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?n.localize(2,null,o.getLineCount()):n.localize(3,null,o.getLineMaxColumn(t.lineNumber)),{position:t,isValid:a,label:s}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return n.localize(4,null,this._parseResult.label)},t.prototype.run=function(e,t){return e===o.Mode.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new c.Range(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(i.QuickOpenEntry);t.GotoLineEntry=d;var h=function(e){function t(){return e.call(this,n.localize(5,null),{id:"editor.action.gotoLine",label:n.localize(6,null),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:s.EditorContextKeys.focus,primary:2085,mac:{primary:293}}})||this}return f(t,e),t.prototype.run=function(e,t){var n=this;this._show(this.getController(t),{getModel:function(e){return new i.QuickOpenModel([new d(e,t,n.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t=v([u.editorAction],t)}(a.BaseEditorQuickOpenAction);t.GotoLineAction=h}),define(d[538],h([1,0,378,10,81,7,120,100,46,21,143,13,28]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.key=t,r.setHighlights(n),r.action=i,r.editor=o,r}return f(t,e),t.prototype.getLabel=function(){return this.action.label},t.prototype.getAriaLabel=function(){return n.localize(0,null,this.getLabel())},t.prototype.getGroupLabel=function(){return this.key},t.prototype.run=function(e,t){var n=this;return e===a.Mode.OPEN&&(r.TPromise.timeout(50).done(function(){n.editor.focus();try{(n.action.run()||r.TPromise.as(null)).done(null,i.onUnexpectedError)}catch(e){i.onUnexpectedError(e)}},i.onUnexpectedError),!0)},t}(s.QuickOpenEntryGroup);t.EditorActionCommandEntry=p;var g=function(e){function t(){return e.call(this,n.localize(1,null),{id:"editor.action.quickCommand",label:n.localize(2,null),alias:"Command Palette",precondition:null,kbOpts:{kbExpr:l.EditorContextKeys.focus,primary:h.isIE?571:59},menuOpts:{}})||this}return f(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(u.IKeybindingService);this._show(this.getController(t),{getModel:function(e){return new s.QuickOpenModel(n._editorActionsToEntries(i,t,e))},getAutoFocus:function(e){return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:e}}})},t.prototype._sort=function(e,t){var n=e.getLabel().toLowerCase(),i=t.getLabel().toLowerCase();return n.localeCompare(i)},t.prototype._editorActionsToEntries=function(e,t,n){for(var i=t.getSupportedActions(),r=[],s=0;s0&&0===r.indexOf(":")){for(var m=null,v=null,_=0,y=0;y0)):_++}v&&v.setGroupLabel(this.typeToLabel(m,_))}else a.length>0&&a[0].setGroupLabel(n.localize(3,null,a.length));return a},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.localize(4,null,t);case"class":return n.localize(5,null,t);case"interface":return n.localize(6,null,t);case"method":return n.localize(7,null,t);case"function":return n.localize(8,null,t);case"property":return n.localize(9,null,t);case"variable":return n.localize(10,null,t);case"var":return n.localize(11,null,t);case"constructor":return n.localize(12,null,t);case"call":return n.localize(13,null,t)}return e},t.prototype.sortNormal=function(e,t,n){var i=t.getLabel().toLowerCase(),o=n.getLabel().toLowerCase(),r=i.localeCompare(o);if(0!==r)return r;var s=t.getRange(),a=n.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,n){e=e.substr(":".length);var i=t.getType(),o=n.getType(),r=i.localeCompare(o);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=n.getLabel().toLowerCase(),u=s.localeCompare(a);if(0!==u)return u}var l=t.getRange(),c=n.getRange();return l.startLineNumber-c.startLineNumber},t=v([d.editorAction],t)}(l.BaseEditorQuickOpenAction);t.QuickOutlineAction=g}),define(d[540],h([1,0,3,7,69,16,31,46,19,42,61,129,141,193,77,149,85,14,51,50,380,28]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S,E){"use strict";function L(){N||(N=!0,b.setARIAContainer(document.body))}Object.defineProperty(t,"__esModule",{value:!0});var x=0,N=!1,M=function(e){function t(t,n,i,o,r,s,a,u){var l=this;return n=n||{},n.ariaLabel=n.ariaLabel||S.localize(0,null),n.ariaLabel=n.ariaLabel+";"+(E.isIE?S.localize(1,null):S.localize(2,null)),l=e.call(this,t,n,i,o,r,s,u)||this,a instanceof d.StandaloneKeybindingService&&(l._standaloneKeybindingService=a),L(),l}return f(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++x,o=u.ContextKeyExpr.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),n.empty;var o=e.id,r=e.label,a=u.ContextKeyExpr.and(u.ContextKeyExpr.equals("editorId",this.getId()),u.ContextKeyExpr.deserialize(e.precondition)),l=e.keybindings,c=u.ContextKeyExpr.and(a,u.ContextKeyExpr.deserialize(e.keybindingContext)),d=e.contextMenuGroupId||null,h=e.contextMenuOrder||0,p=function(){var n=e.run(t);return n||i.TPromise.as(void 0)},f=[],g=this.getId()+":"+o;if(f.push(s.CommandsRegistry.registerCommand(g,p)),d){var v={command:{id:g,title:r},when:a,group:d,order:h};f.push(_.MenuRegistry.appendMenuItem(_.MenuId.EditorContext,v))}Array.isArray(l)&&(f=f.concat(l.map(function(e){return t._standaloneKeybindingService.addDynamicKeybinding(g,e,p,c)})));var y=new m.InternalEditorAction(g,r,r,a,p,this._contextKeyService);return this._actions[o]=y,f.push({dispose:function(){delete t._actions[o]}}),n.combinedDisposable(f)},t=v([y(2,r.IInstantiationService),y(3,l.ICodeEditorService),y(4,s.ICommandService),y(5,u.IContextKeyService),y(6,a.IKeybindingService),y(7,C.IThemeService)],t)}(h.CodeEditor);t.StandaloneCodeEditor=M;var T=function(e){function t(t,n,i,o,r,s,a,u,l,c){var d=this;"string"==typeof(n=n||{}).theme&&c.setTheme(n.theme);var h=n.model;if(delete n.model,d=e.call(this,t,n,o,r,s,a,u,c)||this,d._contextViewService=l,d._register(i),void 0===h?(h=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),d._ownsModel=!0):d._ownsModel=!1,d._attachModel(h),h){var p={oldModelUrl:null,newModelUrl:h.uri};d._onDidChangeModel.fire(p)}return d}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.destroy=function(){this.dispose()},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},t=v([y(3,r.IInstantiationService),y(4,l.ICodeEditorService),y(5,s.ICommandService),y(6,u.IContextKeyService),y(7,a.IKeybindingService),y(8,o.IContextViewService),y(9,g.IStandaloneThemeService)],t)}(M);t.StandaloneEditor=T;var k=function(e){function t(t,n,i,o,r,s,a,u,l,c,h){var p=this;return"string"==typeof(n=n||{}).theme&&(n.theme=c.setTheme(n.theme)),p=e.call(this,t,n,u,r,o,l,c,h)||this,s instanceof d.StandaloneKeybindingService&&(p._standaloneKeybindingService=s),p._contextViewService=a,p._register(i),p._contextViewService.setContainer(p._containerDomElement),p}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.destroy=function(){this.dispose()},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(M,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},t=v([y(3,r.IInstantiationService),y(4,u.IContextKeyService),y(5,a.IKeybindingService),y(6,o.IContextViewService),y(7,c.IEditorWorkerService),y(8,l.ICodeEditorService),y(9,g.IStandaloneThemeService),y(10,w.IMessageService)],t)}(p.DiffEditorWidget);t.StandaloneDiffEditor=k}),define(d[541],h([1,0,23,37]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vs={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"09885A"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(o={},o[n.editorBackground]="#FFFFFE",o[n.editorForeground]="#000000",o[n.editorInactiveSelection]="#E5EBF1",o[i.editorIndentGuides]="#D3D3D3",o[n.editorSelectionHighlight]="#ADD6FF4D",o)},t.vs_dark={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(r={},r[n.editorBackground]="#1E1E1E",r[n.editorForeground]="#D4D4D4",r[n.editorInactiveSelection]="#3A3D41",r[i.editorIndentGuides]="#404040",r[n.editorSelectionHighlight]="#ADD6FF26",r)},t.hc_black={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(s={},s[n.editorBackground]="#000000",s[n.editorForeground]="#FFFFFF",s[i.editorIndentGuides]="#FFFFFF",s)};var o,r,s}),define(d[542],h([1,0,202,541,4,17,32,23,14,44,11]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e){return e===f||e===g||e===m}function h(e){switch(e){case f:return i.vs;case g:return i.vs_dark;case m:return i.hc_black}}function p(e){var t=h(e);return new y(e,"",t.colors,t.rules)}Object.defineProperty(t,"__esModule",{value:!0});var f="vs",g="vs-dark",m="hc-black",v=l.Registry.as(a.Extensions.ColorContribution),_=l.Registry.as(u.Extensions.ThemingContribution),y=function(){function e(e,t,n,i){t.length>0?(this.id=e+" "+t,this.themeName=t):(this.id=e,this.themeName=e),this.base=e,this.rules=i,this.colors={};for(var o in n)this.colors[o]=s.Color.fromHex(n[o]);this.defaultColors={}}return e.prototype.getColor=function(e,t){return this.colors.hasOwnProperty(e)?this.colors[e]:!1!==t?this.getDefault(e):null},e.prototype.getDefault=function(e){if(this.defaultColors.hasOwnProperty(e))return this.defaultColors[e];var t=v.resolveDefaultColor(e,this);return this.defaultColors[e]=t,t},e.prototype.defines=function(e){return this.colors.hasOwnProperty(e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case f:return"light";case m:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){return this._tokenTheme||(this._tokenTheme=n.TokenTheme.createFromRawTokenTheme(this.rules)),this._tokenTheme},enumerable:!0,configurable:!0}),e}(),C=function(){function e(){this._onThemeChange=new c.Emitter,this._knownThemes=new Map,this._knownThemes.set(f,p(f)),this._knownThemes.set(g,p(g)),this._knownThemes.set(m,p(m)),this._styleElement=o.createStyleSheet(),this._styleElement.className="monaco-colors",this.setTheme(f)}return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e)||d(e))throw new Error("Illegal theme name!");if(!d(t.base))throw new Error("Illegal theme base!");var n=[],i={};if(t.inherit){var o=h(t.base);n=n.concat(o.rules);for(var r in o.colors)i[r]=o.colors[r]}n=n.concat(t.rules);for(var r in t.colors)i[r]=t.colors[r];this._knownThemes.set(e,new y(t.base,e,i,n))},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(e){var t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(f),this._theme=t;var i=[],o={},s={addRule:function(e){o[e]||(i.push(e),o[e]=!0)}};_.getThemingParticipants().forEach(function(e){return e(t,s)});var a=t.tokenTheme.getColorMap();return s.addRule(n.generateTokensCSSForColorMap(a)),this._styleElement.innerHTML=i.join("\n"),r.TokenizationRegistry.setColorMap(a),this._onThemeChange.fire(t),t.id},e}();t.StandaloneThemeServiceImpl=C}),define(d[144],h([1,0,24,16,45,80]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceContextService=i.createDecorator("contextService");var s=function(){function e(e,t){this._resource=e,this._ctime=t,this._name=o.basename(this._resource.fsPath)||this._resource.fsPath}return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctime",{get:function(){return this._ctime},enumerable:!0,configurable:!0}),e.prototype.toResource=function(e,t){return"string"==typeof e?n.default.file(o.join(t?t.fsPath:this._resource.fsPath,e)):null},e}();t.LegacyWorkspace=s;var a=function(){function e(e,t,n,i){void 0===i&&(i=null),this.id=e,this._name=t,this._roots=n,this._configuration=i,this._rootsMap=new r.TrieMap(r.TrieMap.PathSplitter),this.updateRootsMap()}return Object.defineProperty(e.prototype,"roots",{get:function(){return this._roots},set:function(e){this._roots=e,this.updateRootsMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getRoot=function(e){return e?this._rootsMap.findSubstr(e.fsPath):null},e.prototype.updateRootsMap=function(){this._rootsMap=new r.TrieMap(r.TrieMap.PathSplitter);for(var e=0,t=this.roots;e1?this.badge.setTitleFormat(n.localize(1,null,t)):this.badge.setTitleFormat(n.localize(2,null,t))},e=v([y(1,S.IWorkspaceContextService),y(2,b.optional(R.IEnvironmentService)),y(3,D.IThemeService)],e)}(),H=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),h.addClass(this.inside,"referenceMatch"),h.addClass(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),n=t.before,i=t.inside,o=t.after;this.before.innerHTML=u.escape(n),this.inside.innerHTML=u.escape(i),this.after.innerHTML=u.escape(o)},e}(),z=function(){function e(e,t,n){this._contextService=e,this._themeService=t,this._environmentService=n}return e.prototype.getHeight=function(e,t){return 22},e.prototype.getTemplateId=function(t,n){if(n instanceof T.FileReferences)return e._ids.FileReferences;if(n instanceof T.OneReference)return e._ids.OneReference;throw n},e.prototype.renderTemplate=function(t,n,i){if(n===e._ids.FileReferences)return new V(i,this._contextService,this._environmentService,this._themeService);if(n===e._ids.OneReference)return new H(i);throw n},e.prototype.renderElement=function(e,t,n,i){if(t instanceof T.FileReferences)i.set(t);else{if(!(t instanceof T.OneReference))throw n;i.set(t)}},e.prototype.disposeTemplate=function(e,t,n){n instanceof V&&n.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=v([y(0,S.IWorkspaceContextService),y(1,D.IThemeService),y(2,b.optional(R.IEnvironmentService))],e)}(),K=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof T.FileReferences?t.getAriaMessage():t instanceof T.OneReference?t.getAriaMessage():void 0},e}(),U=function(){function e(e,t){var n=this;this._disposables=[],this._onDidChangePercentages=new r.Emitter,this._ratio=t,this._sash=new p.Sash(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}});var i;this._disposables.push(this._sash.addListener("start",function(e){i=e.startX-n._width*n.ratio})),this._disposables.push(this._sash.addListener("change",function(e){var t=e.currentX-i;t>20&&t+200?e.children[0]:void 0},u.prototype._revealReference=function(e){var t=this;e.uri.scheme!==a.Schemas.inMemory?this.setTitle(e.name,o.getPathLabel(e.directory,this._contextService,this._environmentService)):this.setTitle(n.localize(6,null));var r=this._textModelResolverService.createModelReference(e.uri);return l.TPromise.join([r,this._tree.reveal(e)]).then(function(n){var i=n[0];if(t._model){s.dispose(t._previewModelReference);var o=i.object;if(o){t._previewModelReference=i,t._preview.setModel(o.textEditorModel);var r=E.Range.lift(e.range).collapseToStart();t._preview.setSelection(r),t._preview.revealRangeInCenter(r)}else t._preview.setModel(t._previewNotAvailableMessage),i.dispose();t._tree.setSelection([e]),t._tree.setFocus(e)}else i.dispose()},i.onUnexpectedError)},u}(M.PeekViewWidget);t.ReferenceWidget=j,t.peekViewTitleBackground=I.registerColor("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},n.localize(7,null)),t.peekViewTitleForeground=I.registerColor("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},n.localize(8,null)),t.peekViewTitleInfoForeground=I.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},n.localize(9,null)),t.peekViewBorder=I.registerColor("peekView.border",{dark:"#007acc",light:"#007acc",hc:I.contrastBorder},n.localize(10,null)),t.peekViewResultsBackground=I.registerColor("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:c.Color.black},n.localize(11,null)),t.peekViewResultsMatchForeground=I.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:c.Color.white},n.localize(12,null)),t.peekViewResultsFileForeground=I.registerColor("peekViewResult.fileForeground",{dark:c.Color.white,light:"#1E1E1E",hc:c.Color.white},n.localize(13,null)),t.peekViewResultsSelectionBackground=I.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.localize(14,null)),t.peekViewResultsSelectionForeground=I.registerColor("peekViewResult.selectionForeground",{dark:c.Color.white,light:"#6C6C6C",hc:c.Color.white},n.localize(15,null)),t.peekViewEditorBackground=I.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:c.Color.black},n.localize(16,null)),t.peekViewEditorGutterBackground=I.registerColor("peekViewEditorGutter.background",{dark:t.peekViewEditorBackground,light:t.peekViewEditorBackground,hc:t.peekViewEditorBackground},n.localize(17,null)),t.peekViewResultsMatchHighlight=I.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.localize(18,null)),t.peekViewEditorMatchHighlight=I.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.localize(19,null)),D.registerThemingParticipant(function(e,n){var i=e.getColor(t.peekViewResultsMatchHighlight);i&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+i+"; }");var o=e.getColor(t.peekViewEditorMatchHighlight);o&&n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+o+"; }");var r=e.getColor(I.activeContrastBorder);r&&(n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+r+"; box-sizing: border-box; }"),n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+r+"; box-sizing: border-box; }"));var s=e.getColor(t.peekViewResultsBackground);s&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+s+"; }");var a=e.getColor(t.peekViewResultsMatchForeground);a&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+a+"; }");var u=e.getColor(t.peekViewResultsFileForeground);u&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+u+"; }");var l=e.getColor(t.peekViewResultsSelectionBackground);l&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+l+"; }");var c=e.getColor(t.peekViewResultsSelectionForeground);c&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var d=e.getColor(t.peekViewEditorBackground);d&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+d+";}");var h=e.getColor(t.peekViewEditorGutterBackground);h&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+h+";}")})}),define(d[198],h([1,0,364,10,3,36,64,11,16,19,50,58,62,144,76,30,92,544,87,14,12,156]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,_,C,b,w,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ctxReferenceSearchVisible=new l.RawContextKey("referenceSearchVisible",!1);var E=function(){function e(e,n,i,o,r,s,a,u,l,c,d,h,p){this._editorService=i,this._textModelResolverService=o,this._telemetryService=r,this._messageService=s,this._instantiationService=a,this._contextService=u,this._storageService=l,this._themeService=c,this._configurationService=d,this._peekViewService=h,this._environmentService=p,this._requestIdPool=0,this._disposables=[],this._ignoreModelChangeEvent=!1,this._editor=e,this._referenceSearchVisible=t.ctxReferenceSearchVisible.bindTo(n)}return E=e,e.get=function(e){return e.getContribution(E.ID)},e.prototype.getId=function(){return E.ID},e.prototype.dispose=function(){this._widget&&(this._widget.dispose(),this._widget=null),this._editor=null},e.prototype.toggleWidget=function(e,t,i){var o,s=this;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return null;this._referenceSearchVisible.set(!0),this._disposables.push(this._editor.onDidChangeModelLanguage(function(){s.closeWidget()})),this._disposables.push(this._editor.onDidChangeModel(function(){s._ignoreModelChangeEvent||s.closeWidget()}));var u=JSON.parse(this._storageService.get("peekViewLayout",void 0,"{}"));this._widget=new _.ReferenceWidget(this._editor,u,this._textModelResolverService,this._contextService,this._themeService,this._instantiationService,this._environmentService),this._widget.setTitle(n.localize(0,null)),this._widget.show(e),this._disposables.push(this._widget.onDidClose(function(){t.cancel(),s._storageService.store("peekViewLayout",JSON.stringify(s._widget.layoutData)),s._widget=null,s.closeWidget()})),this._disposables.push(this._widget.onDidSelectReference(function(e){var t=e.element,n=e.kind;switch(n){case"open":if("editor"===e.source&&s._configurationService.lookup("editor.stablePeek").value)break;case"side":s._openReference(t,"side"===n);break;case"goto":i.onGoto?i.onGoto(t):s._gotoReference(t)}}));var l=++this._requestIdPool,c=t.then(function(t){if(l===s._requestIdPool&&s._widget){s._model&&s._model.dispose(),s._model=t;var n=Date.now();return s._disposables.push({dispose:function(){s._telemetryService.publicLog("zoneWidgetShown",{mode:"reference search",elapsedTime:Date.now()-n})}}),s._widget.setModel(s._model).then(function(){s._widget.setMetaTitle(i.getMetaTitle(s._model));var t=s._editor.getModel().uri,n=new w.Position(e.startLineNumber,e.startColumn),o=s._model.nearestReference(t,n);if(o)return s._widget.setSelection(o)})}},function(e){s._messageService.show(r.default.Error,e)}),d=a.stopwatch(a.fromPromise(c)),h=this._editor.getModel().getLanguageIdentifier().language;d(function(e){return s._telemetryService.publicLog("findReferences",{duration:e,mode:h})})},e.prototype.closeWidget=function(){this._widget&&(this._widget.dispose(),this._widget=null),this._referenceSearchVisible.reset(),this._disposables=o.dispose(this._disposables),this._model&&(this._model.dispose(),this._model=null),this._editor.focus(),this._requestIdPool+=1},e.prototype._gotoReference=function(e){var t=this;this._widget.hide(),this._ignoreModelChangeEvent=!0;var n=e.uri,o=e.range;this._editorService.openEditor({resource:n,options:{selection:o}}).done(function(e){t._ignoreModelChangeEvent=!1,e&&e.getControl()===t._editor?(t._widget.show(o),t._widget.focus()):t.closeWidget()},function(e){t._ignoreModelChangeEvent=!1,i.onUnexpectedError(e)})},e.prototype._openReference=function(e,t){var n=e.uri,i=e.range;this._editorService.openEditor({resource:n,options:{selection:i}},t),t||this.closeWidget()},e.ID="editor.contrib.referencesController",e=E=v([g.editorContribution,y(1,l.IContextKeyService),y(2,s.IEditorService),y(3,C.ITextModelService),y(4,d.ITelemetryService),y(5,c.IMessageService),y(6,u.IInstantiationService),y(7,p.IWorkspaceContextService),y(8,f.IStorageService),y(9,b.IThemeService),y(10,h.IConfigurationService),y(11,u.optional(m.IPeekViewService)),y(12,u.optional(S.IEnvironmentService))],e);var E}();t.ReferencesController=E}),define(d[199],h([1,0,351,51,40,15,36,7,64,50,2,13,177,198,125,92,19,521,21]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,y,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var b=function(){return function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n,this.showMessage=i}}();t.DefinitionActionConfig=b;var w=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return f(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(l.IMessageService),o=e.get(u.IEditorService),r=t.getModel(),a=t.getPosition();return this._getDeclarationsAtPosition(r,a).then(function(e){if(!r.isDisposed()&&t.getModel()===r){for(var i=-1,s=[],u=0;u1&&n.localize(2,null,e.references.length)},t.prototype._onResult=function(e,t,n){var o=this,r=n.getAriaMessage();if(i.alert(r),this._configuration.openInPeek)this._openInPeek(e,t,n);else{var s=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(e,s,this._configuration.openToSide).then(function(t){t&&n.references.length>1?o._openInPeek(e,t,n):n.dispose()})}},t.prototype._openReference=function(e,t,n){var i=t.uri,o=t.range;return e.openEditor({resource:i,options:{selection:c.Range.collapseToStart(o),revealIfVisible:!n}},n).then(function(e){return e&&e.getControl()})},t.prototype._openInPeek=function(e,t,n){var i=this,o=p.ReferencesController.get(t);o?o.toggleWidget(t.getSelection(),a.TPromise.as(n),{getMetaTitle:function(e){return i._getMetaTitle(e)},onGoto:function(t){return o.closeWidget(),i._openReference(e,t,!1)}}):n.dispose()},t}(d.EditorAction);t.DefinitionAction=w;var S=r.isWeb?2118:70,E=function(e){function t(){return e.call(this,new b,{id:i.ID,label:n.localize(3,null),alias:"Go to Definition",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasDefinitionProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:S},menuOpts:{group:"navigation",order:1.1}})||this}return f(t,e),i=t,t.ID="editor.action.goToDeclaration",t=i=v([d.editorAction],t);var i}(w);t.GoToDefinitionAction=E;var L=function(e){function t(){return e.call(this,new b(!0),{id:i.ID,label:n.localize(4,null),alias:"Open Definition to the Side",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasDefinitionProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:o.KeyChord(2089,S)}})||this}return f(t,e),i=t,t.ID="editor.action.openDeclarationToTheSide",t=i=v([d.editorAction],t);var i}(w);t.OpenDefinitionToSideAction=L;var x=function(e){function t(){return e.call(this,new b(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:n.localize(5,null),alias:"Peek Definition",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasDefinitionProvider,m.PeekContext.notInPeekEditor,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:582,linux:{primary:3140}},menuOpts:{group:"navigation",order:1.2}})||this}return f(t,e),t=v([d.editorAction],t)}(w);t.PeekDefinitionAction=x;var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return h.getImplementationsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?n.localize(6,null,e.word):n.localize(7,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&n.localize(8,null,e.references.length)},t}(w);t.ImplementationAction=N;var M=function(e){function t(){return e.call(this,new b,{id:i.ID,label:n.localize(9,null),alias:"Go to Implementation",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasImplementationProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:2118}})||this}return f(t,e),i=t,t.ID="editor.action.goToImplementation",t=i=v([d.editorAction],t);var i}(N);t.GoToImplementationAction=M;var T=function(e){function t(){return e.call(this,new b(!1,!0,!1),{id:i.ID,label:n.localize(10,null),alias:"Peek Implementation",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasImplementationProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:3142}})||this}return f(t,e),i=t,t.ID="editor.action.peekImplementation",t=i=v([d.editorAction],t);var i}(N);t.PeekImplementationAction=T;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return h.getTypeDefinitionsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?n.localize(11,null,e.word):n.localize(12,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&n.localize(13,null,e.references.length)},t}(w);t.TypeDefinitionAction=k;var I=function(e){function t(){return e.call(this,new b,{id:i.ID,label:n.localize(14,null),alias:"Go to Type Definition",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasTypeDefinitionProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:0},menuOpts:{group:"navigation",order:1.4}})||this}return f(t,e),i=t,t.ID="editor.action.goToTypeDefinition",t=i=v([d.editorAction],t);var i}(k);t.GoToTypeDefintionAction=I;var D=function(e){function t(){return e.call(this,new b(!1,!0,!1),{id:i.ID,label:n.localize(15,null),alias:"Peek Type Definition",precondition:_.ContextKeyExpr.and(C.EditorContextKeys.hasTypeDefinitionProvider,C.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:C.EditorContextKeys.textFocus,primary:0}})||this}return f(t,e),i=t,t.ID="editor.action.peekTypeDefinition",t=i=v([d.editorAction],t);var i}(k);t.PeekTypeDefinitionAction=D}),define(d[547],h([1,0,352,18,10,7,88,2,17,25,30,177,3,87,14,23,131,199,192,171]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,_,C){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(){function e(e,t,n){var r=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.Throttler;var s=new C.ClickLinkGesture(e);this.toUnhook.push(s),this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown(function(e){var t=e[0],n=e[1];r.startFindDefinition(t,n)})),this.toUnhook.push(s.onExecute(function(e){r.isEnabled(e)&&r.gotoDefinition(e.target,e.hasSideBySideModifier).done(function(){r.removeDecorations()},function(e){r.removeDecorations(),o.onUnexpectedError(e)})})),this.toUnhook.push(s.onCancel(function(){r.removeDecorations(),r.currentWordUnderMouse=null}))}return t=e,e.prototype.startFindDefinition=function(e,i){var s=this;if(!this.isEnabled(e,i))return this.currentWordUnderMouse=null,void this.removeDecorations();var u=e.target.position,l=u?this.editor.getModel().getWordAtPosition(u):null;if(!l)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==l.startColumn||this.currentWordUnderMouse.endColumn!==l.endColumn||this.currentWordUnderMouse.word!==l.word){this.currentWordUnderMouse=l;var c=new m.EditorState(this.editor,15);this.throttler.queue(function(){return c.validate(s.editor)?s.findDefinition(e.target):r.TPromise.as(null)}).then(function(e){if(e&&e.length&&c.validate(s.editor))if(e.length>1)s.addDecoration(new a.Range(u.lineNumber,l.startColumn,u.lineNumber,l.endColumn),n.localize(0,null,e.length));else{var i=e[0];if(!i.uri)return;s.textModelResolverService.createModelReference(i.uri).then(function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,o=i.range.startLineNumber;if(0!==n.getLineMaxColumn(o)){for(var r=n.getLineFirstNonWhitespaceColumn(o),c=Math.min(n.getLineCount(),o+t.MAX_SOURCE_PREVIEW_LINES),d=o+1,h=r;d0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===l.MouseTargetType.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&u.DefinitionProviderRegistry.has(this.editor.getModel())},e.prototype.findDefinition=function(e){return this.editor.getModel()?d.getDefinitionsAtPosition(this.editor.getModel(),e.position):r.TPromise.as(null)},e.prototype.gotoDefinition=function(e,t){var n=this;this.editor.setPosition(e.position);var i=new _.DefinitionAction(new _.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext(function(e){return i.run(e,n.editor)})},e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){this.toUnhook=h.dispose(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=t=v([c.editorContribution,y(1,p.ITextModelService),y(2,s.IModeService)],e);var t}();f.registerThemingParticipant(function(e,t){var n=e.getColor(g.editorActiveLinkForeground);n&&t.addRule(".monaco-editor .goto-definition-link { color: "+n+" !important; }")})}),define(d[548],h([1,0,363,24,7,64,16,31,19,105,12,2,20,13,17,92,198,125,18,10,21]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,_,C,b,w,S){"use strict";function E(e,t){var n=m.getOuterEditor(e);if(n){var i=_.ReferencesController.get(n);i&&i.closeWidget()}}function L(e,t){var n=g.ReferenceProviderRegistry.ordered(e).map(function(n){return b.asWinJsPromise(function(i){return n.provideReferences(e,t,{includeDeclaration:!0},i)}).then(function(e){if(Array.isArray(e))return e},function(e){w.onUnexpectedExternalError(e)})});return o.TPromise.join(n).then(function(e){for(var t=[],n=0,i=e;n1&&n.localize(0,null,e.references.length)}},N=function(){function e(e,t,n){n&&m.PeekContext.inPeekEditor.bindTo(t)}return t=e,e.prototype.dispose=function(){},e.prototype.getId=function(){return t.ID},e.ID="editor.contrib.referenceController",e=t=v([p.commonEditorContribution,y(1,u.IContextKeyService),y(2,s.optional(m.IPeekViewService))],e);var t}();t.ReferenceController=N;var M=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:n.localize(1,null),alias:"Find All References",precondition:u.ContextKeyExpr.and(S.EditorContextKeys.hasReferenceProvider,m.PeekContext.notInPeekEditor,S.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:S.EditorContextKeys.textFocus,primary:1094},menuOpts:{group:"navigation",order:1.5}})||this}return f(t,e),t.prototype.run=function(e,t){var n=_.ReferencesController.get(t);if(n){var i=t.getSelection(),o=L(t.getModel(),i.getStartPosition()).then(function(e){return new C.ReferencesModel(e)});n.toggleWidget(i,o,x)}},t=v([p.editorAction],t)}(p.EditorAction);t.ReferenceAction=M;a.CommandsRegistry.registerCommand("editor.action.findReferences",function(e,t,n){if(!(t instanceof i.default))throw new Error("illegal argument, uri");if(!n)throw new Error("illegal argument, position");return e.get(r.IEditorService).openEditor({resource:t}).then(function(e){var t=e.getControl();if(h.isCommonCodeEditor(t)){var i=_.ReferencesController.get(t);if(i){var r=L(t.getModel(),c.Position.lift(n)).then(function(e){return new C.ReferencesModel(e)}),s=new d.Range(n.lineNumber,n.column,n.lineNumber,n.column);return o.TPromise.as(i.toggleWidget(s,r,x))}}})}),a.CommandsRegistry.registerCommand("editor.action.showReferences",{handler:function(e,t,n,s){if(!(t instanceof i.default))throw new Error("illegal argument, uri expected");return e.get(r.IEditorService).openEditor({resource:t}).then(function(e){var t=e.getControl();if(h.isCommonCodeEditor(t)){var i=_.ReferencesController.get(t);if(i)return o.TPromise.as(i.toggleWidget(new d.Range(n.lineNumber,n.column,n.lineNumber,n.column),o.TPromise.as(new C.ReferencesModel(s)),x)).then(function(){return!0})}})},description:{description:"Show references at a position in a file",args:[{name:"uri",description:"The text document in which to show references",constraint:i.default},{name:"position",description:"The position at which to show",constraint:c.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array}]}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearch",weight:p.CommonEditorRegistry.commandWeight(50),primary:9,secondary:[1033],when:u.ContextKeyExpr.and(_.ctxReferenceSearchVisible,u.ContextKeyExpr.not("config.editor.stablePeek")),handler:E}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearchEditor",weight:p.CommonEditorRegistry.commandWeight(-101),primary:9,secondary:[1033],when:u.ContextKeyExpr.and(m.PeekContext.inPeekEditor,u.ContextKeyExpr.not("config.editor.stablePeek")),handler:E}),t.provideReferences=L,p.CommonEditorRegistry.registerDefaultLanguageCommand("_executeReferenceProvider",L)}),define(d[549],h([1,0,134,191,193,164,514,313,450,451,452,516,454,455,456,431,520,458,460,199,547,522,523,524,464,525,465,527,469,548,529,471,180,531,181,532,476,517]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(d[200],h([1,0,3,62,387,69,478,16,413,84,31,46,19,421,103,50,163,76,58,144,42,61,147,146,88,437,56,430,485,129,417,85,77,542]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,g,m,v,_,y,C,b,w,S,E,L,x,N,M,T,k,I,D,O,R){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var P;!function(e){function t(e,t){var n=new o(e,t);return r.push(n),n}var n=new l.ServiceCollection,o=function(){function e(e,t){this._serviceId=e,this._factory=t,this._value=null}return Object.defineProperty(e.prototype,"id",{get:function(){return this._serviceId},enumerable:!0,configurable:!0}),e.prototype.get=function(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");n.set(this._serviceId,this._value)}return this._value},e}();e.LazyStaticService=o;var r=[];e.init=function(e){var t=new l.ServiceCollection;for(var n in e)e.hasOwnProperty(n)&&t.set(a.createDecorator(n),e[n]);r.forEach(function(n){return t.set(n.id,n.get(e))});var i=new u.InstantiationService(t,!0);return t.set(a.IInstantiationService,i),[t,i]},e.instantiationService=t(a.IInstantiationService,function(){return new u.InstantiationService(n,!0)});var s=new k.SimpleConfigurationService;e.configurationService=t(i.IConfigurationService,function(){return s}),e.resourceConfigurationService=t(E.ITextResourceConfigurationService,function(){return new k.SimpleResourceConfigurationService(s)}),e.contextService=t(C.IWorkspaceContextService,function(){return new k.SimpleWorkspaceContextService}),e.telemetryService=t(y.ITelemetryService,function(){return new k.StandaloneTelemetryService}),e.messageService=t(m.IMessageService,function(){return new k.SimpleMessageService}),e.markerService=t(g.IMarkerService,function(){return new p.MarkerService}),e.modeService=t(L.IModeService,function(e){return new x.ModeServiceImpl}),e.modelService=t(N.IModelService,function(t){return new M.ModelServiceImpl(e.markerService.get(t),e.configurationService.get(t))}),e.editorWorkerService=t(w.IEditorWorkerService,function(t){return new S.EditorWorkerServiceImpl(e.modelService.get(t),e.resourceConfigurationService.get(t),e.modeService.get(t))}),e.standaloneThemeService=t(O.IStandaloneThemeService,function(){return new R.StandaloneThemeServiceImpl}),e.codeEditorService=t(b.ICodeEditorService,function(t){return new T.CodeEditorServiceImpl(e.standaloneThemeService.get(t))}),e.progressService=t(v.IProgressService,function(){return new k.SimpleProgressService}),e.storageService=t(_.IStorageService,function(){return _.NullStorageService})}(P=t.StaticServices||(t.StaticServices={}));var A=function(e){function t(t,n){var a=e.call(this)||this,u=P.init(n),l=u[0],p=u[1];a._serviceCollection=l,a._instantiationService=p;var f=a.get(i.IConfigurationService),g=a.get(m.IMessageService),v=a.get(y.ITelemetryService),_=function(e,t){var i=null;return n&&(i=n[e.toString()]),i||(i=t()),a._serviceCollection.set(e,i),i},C=_(h.IContextKeyService,function(){return a._register(new I.ContextKeyService(f))}),b=_(c.ICommandService,function(){return new k.StandaloneCommandService(a._instantiationService)});_(d.IKeybindingService,function(){return a._register(new k.StandaloneKeybindingService(C,b,g,t))});var w=_(r.IContextViewService,function(){return a._register(new s.ContextViewService(t,v,g))});return _(r.IContextMenuService,function(){return a._register(new o.ContextMenuService(t,v,g,w))}),_(D.IMenuService,function(){return new k.SimpleMenuService(b)}),a}return f(t,e),t.prototype.get=function(e){var t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t},t.prototype.set=function(e,t){this._serviceCollection.set(e,t)},t.prototype.has=function(e){return this._serviceCollection.has(e)},t}(n.Disposable);t.DynamicStandaloneServices=A}),define(d[422],h([1,0,20,25,540,48,200,480,71,273,129,17,397,164,64,31,69,16,46,19,42,61,87,68,77,132,49,54,50,408]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,_,y,C,b,w,S,E,L,x,N,M){"use strict";function T(e,t,n){var i=new s.DynamicStandaloneServices(e,t),o=null;i.has(f.IEditorService)||(o=new c.SimpleEditorService,i.set(f.IEditorService,o));var r=null;i.has(w.ITextModelService)||(r=new c.SimpleEditorModelResolverService,i.set(w.ITextModelService,r)),i.has(u.IOpenerService)||i.set(u.IOpenerService,new a.OpenerService(i.get(f.IEditorService),i.get(g.ICommandService)));var l=n(i);return o&&o.setEditor(l),r&&r.setEditor(l),l}function k(e,t,n){return T(e,n,function(n){return new o.StandaloneEditor(e,t,n,n.get(v.IInstantiationService),n.get(C.ICodeEditorService),n.get(g.ICommandService),n.get(y.IContextKeyService),n.get(_.IKeybindingService),n.get(m.IContextViewService),n.get(E.IStandaloneThemeService))})}function I(e){return s.StaticServices.codeEditorService.get().onCodeEditorAdd(function(t){e(t)})}function D(e,t,n){return T(e,n,function(n){return new o.StandaloneDiffEditor(e,t,n,n.get(v.IInstantiationService),n.get(y.IContextKeyService),n.get(_.IKeybindingService),n.get(m.IContextViewService),n.get(b.IEditorWorkerService),n.get(C.ICodeEditorService),n.get(E.IStandaloneThemeService),n.get(M.IMessageService))})}function O(e,t){return new p.DiffNavigator(e,t)}function R(e,t,n){return s.StaticServices.modelService.get().createModel(e,t,n)}function P(e,t,n){if(e=e||"",!t){var i=n?n.path:null,o=e.indexOf("\n"),r=e;return-1!==o&&(r=e.substring(0,o)),R(e,s.StaticServices.modeService.get().getOrCreateModeByFilenameOrFirstLine(i,r),n)}return R(e,s.StaticServices.modeService.get().getOrCreateMode(t),n)}function A(e,t){s.StaticServices.modelService.get().setMode(e,s.StaticServices.modeService.get().getOrCreateMode(t))}function F(e,t,n){e&&s.StaticServices.markerService.get().changeOne(t,e.uri,n)}function W(e){return s.StaticServices.markerService.get().read(e)}function B(e){return s.StaticServices.modelService.get().getModel(e)}function V(){return s.StaticServices.modelService.get().getModels()}function H(e){return s.StaticServices.modelService.get().onModelAdded(e)}function z(e){return s.StaticServices.modelService.get().onModelRemoved(e)}function K(e){return s.StaticServices.modelService.get().onModelModeChanged(function(t){e({model:t.model,oldLanguage:t.oldModeId})})}function U(e){return h.createWebWorker(s.StaticServices.modelService.get(),e)}function j(e,t){return l.Colorizer.colorizeElement(s.StaticServices.standaloneThemeService.get(),s.StaticServices.modeService.get(),e,t)}function q(e,t,n){return l.Colorizer.colorize(s.StaticServices.modeService.get(),e,t,n)}function G(e,t,n){return void 0===n&&(n=4),l.Colorizer.colorizeModelLine(e,t,n)}function Y(e){var t=d.TokenizationRegistry.get(e);return t||{getInitialState:function(){return S.NULL_STATE},tokenize:function(t,n,i){return S.nullTokenize(e,t,n,i)},tokenize2:void 0}}function Z(e,t){s.StaticServices.modeService.get().getOrCreateMode(t);for(var n=Y(t),i=e.split(/\r\n|\r|\n/),o=[],r=n.getInitialState(),a=0,u=i.length;a0&&o[r-1]===c)){var d=l.startIndex;0===a?d=0:d