A set of Angular utilities
Package | Version | Links |
---|---|---|
@ng-util/lazy |
||
@ng-util/util |
||
@ng-util/monaco-editor |
||
@ng-util/markdown |
The MIT License (see the LICENSE file for the full text)
A set of Angular utilities
License: MIT License
A set of Angular utilities
Package | Version | Links |
---|---|---|
@ng-util/lazy |
||
@ng-util/util |
||
@ng-util/monaco-editor |
||
@ng-util/markdown |
The MIT License (see the LICENSE file for the full text)
用注解的方式编写 Http 请求。
@BaseUrl('/user')
@BaseHeaders({ bh: 'a' })
class RestService extends BaseApi {
@GET()
query(@Query('pi') pi: number, @Query('ps') ps: number): Observable {
return;
}
@GET(':id')
get(@Path('id') id: number): Observable {
return;
}
@GET()
get(@Payload data: {}): Observable {
return;
}
// 使用 `::id` 来表示转义,若 `id` 值为 `undefined` 会忽略转换,例如:
// 当 `id` 为 `10` 时 => 10:type
// 当 `id` 为 `undefined` 时 => :id:type
@GET(':id::type')
get(@Path('id') id: number): Observable {
return;
}
@POST(':id')
save(@Path('id') id: number, @Body data: Object): Observable {
return;
}
@POST()
save(@Payload data: {}): Observable {
return;
}
@FORM()
save(@Payload data: {}): Observable {
return;
}
// 若请求的URL不符合授权要求,会直接抛出 `401` 错误,且不发送请求
@GET('', { acl: 'admin' })
ACL(): Observable {
return;
}
}
./node_modules/ajv/dist/core.js:3:24-186 - Error: Module not found: Error: Can't resolve 'E:\Projects\mars-exporter\web\pc\node_modules\@angular-devkit\build-angular\node_modules\@babe l\runtime\helpers\asyncToGenerator.js' in 'E:\Projects\mars-exporter\web\pc\node_modules\ajv\dist'
只要把 NuMonacoEditorModule 放进Angular的二级 library ,就会发生死循环
打包方式参考的 @delon 用ng-packagr,并关了ivy。
✖ Compiling with Angular in legacy View Engine compilation mode.
RangeError: Maximum call stack size exceeded
at parseUnionOrIntersectionType (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:32239:32)
at parseUnionTypeOrHigher (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:32249:20)
at parseTypeWorker (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:32345:24)
at doOutsideOfContext (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:30153:20)
at parseType (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:32338:20)
at parseTypeAnnotation (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:32358:57)
at parseParameterWorker (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:31602:225)
at parseParameterInOuterAwaitContext (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:31576:20)
at parseListElement (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:30876:20)
at parseDelimitedList (E:\workspace_20200515\mt-framework-ng\node_modules\typescript\lib\typescript.js:31173:31)
"dependencies": {
"@angular/animations": "~12.1.3",
"@angular/common": "~12.1.3",
"@angular/compiler": "~12.1.3",
"@angular/core": "~12.1.3",
"@angular/forms": "~12.1.3",
"@angular/platform-browser": "~12.1.3",
"@angular/platform-browser-dynamic": "~12.1.3",
"@angular/router": "~12.1.3",
"@delon/abc": "^12.0.2",
"@delon/acl": "^12.0.2",
"@delon/auth": "^12.0.2",
"@delon/cache": "^12.0.2",
"@delon/form": "^12.0.2",
"@delon/mock": "^12.0.2",
"@delon/theme": "^12.0.2",
"@delon/util": "^12.0.2",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4",
"@stackblitz/sdk": "^1.5.2",
"ajv": "^8.6.1",
"ajv-formats": "^2.1.0",
"extend": "^3.0.2",
"angular-split": "^5.0.0",
"classlist.js": "^1.1.20150312",
"crypto-js": "^4.1.1",
"file-saver": "^2.0.5",
"jsencrypt": "^3.2.0",
"ng2-dragula": "^2.1.1",
"ng-zorro-antd": "^12.0.0",
"ngx-color-picker": "^11.0.0",
"echarts": "^4.2.1",
"ngx-echarts": "^4.2.1",
"ngx-ueditor": "^12.0.0",
"screenfull": "^5.0.2",
"@ng-util/monaco-editor": "^12.0.0",
"monaco-editor": "^0.26.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.1.1",
"@angular/cli": "~12.1.1",
"@angular/compiler-cli": "~12.1.1",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"@types/crypto-js": "^4.0.2",
"jasmine-core": "~3.7.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"typescript": "~4.3.2",
"codelyzer": "^6.0.0",
"jasmine-spec-reporter": "~5.0.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"@angular/language-service": "~12.1.1",
"@types/jasminewd2": "~2.0.3",
"karma-junit-reporter": "^2.0.1",
"karma-spec-reporter": "0.0.32",
"karma-viewport": "^1.0.6",
"@types/aos": "^3.0.3",
"@types/file-saver": "^2.0.1",
"@types/deep-extend": "^0.4.31",
"@types/extend": "^3.0.1",
"@types/fs-extra": "^9.0.1",
"@types/mockjs": "^1.0.2",
"@types/parse5": "^6.0.0",
"karma-summary-reporter": "^1.7.2",
"karma-parallel": "^0.3.1",
"chalk": "^4.1.0",
"codecov": "^3.7.0",
"conventional-changelog-cli": "^2.0.34",
"fs-extra": "^9.0.0",
"husky": "^6.0.0",
"jsonml.js": "^0.1.0",
"klaw-sync": "^6.0.0",
"less-vars-to-js": "^1.3.0",
"less-plugin-clean-css": "^1.5.1",
"less-plugin-npm-import": "^2.1.0",
"mark-twain": "^2.0.3",
"mockjs": "^1.1.0",
"mustache": "^4.0.1",
"ng-packagr": "^12.1.1",
"parse5": "^6.0.1",
"prettier": "^2.2.1",
"readline-sync": "^1.4.10",
"stream": "0.0.2",
"stylelint": "^13.8.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.3.0",
"stylelint-order": "^4.1.0",
"source-map-explorer": "^2.5.1",
"xlsx": "^0.17.0",
"jszip": "^3.6.0",
"screenfull": "^5.1.0",
"less-bundle-promise": "^1.0.7",
"ng-alain": "^12.0.2",
"ng-alain-codelyzer": "^0.0.1",
"ng-alain-sts": "^0.0.1",
"ng-alain-plugin-theme": "^12.0.0",
"tsconfig-paths": "^3.9.0",
"@nguniversal/builders": "^12.1.0",
"@types/express": "^4.17.9",
"html-minifier-terser": "^5.1.1",
"terser": "^5.6.1",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-angular": "^12.1.4",
"@angular-eslint/builder": "~12.2.2",
"@angular-eslint/eslint-plugin": "~12.2.2",
"@angular-eslint/eslint-plugin-template": "~12.2.2",
"@angular-eslint/schematics": "~12.2.2",
"@angular-eslint/template-parser": "~12.2.2",
"@typescript-eslint/eslint-plugin": "~4.23.0",
"@typescript-eslint/parser": "~4.23.0",
"eslint": "^7.26.0",
"eslint-config-prettier": "~8.3.0",
"eslint-plugin-import": "~2.23.4",
"eslint-plugin-jsdoc": "~36.0.2",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-prettier": "~3.4.0",
"lint-staged": "^10.5.3"
},
{
"dependencies": {
"@ng-util/monaco-editor": "^12.0.1",
"monaco-editor": "^0.26.1",
"@mt-framework-ng/core": "PEER-0.0.0-PLACEHOLDER",
"@mt-framework-ng/util": "PEER-0.0.0-PLACEHOLDER",
"@mt-framework-ng/service": "PEER-0.0.0-PLACEHOLDER"
},
"ngPackage": {
"lib": {
"flatModuleFile": "matech-dyn-form",
"entryFile": "public_api.ts",
"umdModuleIds": {
"ng-zorro-antd": "ng-zorro-antd",
"date-fns": "DateFns",
"@delon/abc": "delon.abc",
"@delon/acl": "delon.acl",
"@delon/auth": "delon.auth",
"@delon/cache": "delon.cache",
"@delon/form": "delon.form",
"@delon/mock": "delon.mock",
"@delon/theme": "delon.theme",
"@delon/util": "delon.util",
"@mt-framework-ng/core": "mt-framework-ng.core",
"@mt-framework-ng/util": "mt-framework-ng.util",
"@mt-framework-ng/service": "mt-framework-ng.service"
}
},
"allowedNonPeerDependencies": [
"@ng-util/monaco-editor",
"monaco-editor",
"@mt-framework-ng/core",
"@mt-framework-ng/util",
"@mt-framework-ng/service"
]
}
}
monaco.languages.register({id: "sql"})
monaco.languages.setMonarchTokensProvider("sql", language as any)
This projects always gets the latest Vditor plugin by fetching it through the vditor cdn. However it seems like v. 3.9.8 doesn't work and there is no way to adjust the version in this plugin. I can confirm by going into node_modules and update the urls in this plugin to point it https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js
and https://cdn.jsdelivr.net/npm/[email protected]/dist/index.css
that it works again.
Hi!
I was trying this library and found out that nu-markdown-preview options are not working.
reading the code i saw that there is no options sended to the veditor
https://stackblitz.com/edit/ng-util-monaco-editor-dt6cnd?file=src/app/app.component.ts
Starting with 12.1.0 @ng-util/monaco-editor completely ignores setting readOnly: true in options, even when [disabled] property is not bound in a template. I think when [disabled] is undefined, ng-util should honor the options variant.
在 Electron 环境中, 组件不会显示任何东西,也不报任何错误。
Hello!
But sometimes it's undesirable to format document automatically. Any way to disable that?
Hi,
I copy pasted the code from stackblitz and I have an unexpected behavior.
The first editor is not loaded for no reason ...
"dependencies": {
"@angular/animations": "^15.2.0",
"@angular/common": "^15.2.0",
"@angular/compiler": "^15.2.0",
"@angular/core": "^15.2.0",
"@angular/forms": "^15.2.0",
"@angular/platform-browser": "^15.2.0",
"@angular/platform-browser-dynamic": "^15.2.0",
"@angular/router": "^15.2.0",
"@ng-util/monaco-editor": "^15.0.0",
"@ngstack/code-editor": "^5.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.2",
"@angular/cli": "~15.2.2",
"@angular/compiler-cli": "^15.2.0",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~4.5.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.9.4"
}
Hi,
Do you have any example on how I can register a custom language using the @ng-util/monaco-editor package?
I was able to do it from my Module, however I want to do it inside of my Component's code dynamically
If I try to run commands like this one:
monaco.languages.registerCompletionItemProvider('mrf',{....}
I will get an issue saying that "monaco" variable is not defined
Thanks
通过简单的配置,即可进行整个系统的鉴权操作。
This feature is useful when rendering markdown (no editor).
将 http 请求、临时数据、配置等信息存储到【内存、cookie、localstorage】等。
the disabled
attribute is not working. it does not have any effect on the editor. i expected this attribute puts the editor in a read-only mode where no user interaction is possible.
11.2.0
<nu-monaco-editor [disabled]="true"></nu-monaco-editor>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.