Giter VIP home page Giter VIP logo

ng-util's Introduction

ng-util's People

Contributors

cipchk avatar evilbdef avatar met-pub avatar palenge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ng-util's Issues

@ng-util/http 功能提议

用注解的方式编写 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;
  }
}

@ng-util/[email protected]在angular13.3.3中出现异常

./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'

library 里的组件使用了NuMonacoEditor导致死循环

问题

只要把 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"
},

二级package.json

{
"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"
]
}
}

Markdown doesn't seem to work with newest version of Vditor using jsdelivr cdn.

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.

Ref: Vanessa219/vditor#1244

preview options not supported

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

First nu-monaco-editor component is'nt loaded

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"
  }

How to register a custom language with @ng-util/monaco-editor?

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

@ng-util/auth 功能提议

通过简单的配置,即可进行整个系统的鉴权操作。

  • TokenService
  • SimpleGuard
  • SimpleInterceptor

disabled-attribute not working

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.

version

11.2.0

sample code

<nu-monaco-editor [disabled]="true"></nu-monaco-editor>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.