@po-ui/ng-code-editor 5.22.0 → 5.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -20
- package/bundles/po-ui-ng-code-editor.umd.js +929 -929
- package/bundles/po-ui-ng-code-editor.umd.js.map +1 -1
- package/esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface.js +2 -2
- package/esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface.js +2 -2
- package/esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface.js +2 -2
- package/esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface.js +2 -2
- package/esm2015/lib/components/po-code-editor/po-code-editor-base.component.js +248 -248
- package/esm2015/lib/components/po-code-editor/po-code-editor-register.service.js +63 -63
- package/esm2015/lib/components/po-code-editor/po-code-editor-suggestion.service.js +28 -28
- package/esm2015/lib/components/po-code-editor/po-code-editor.component.js +225 -225
- package/esm2015/lib/components/po-code-editor/po-code-editor.module.js +31 -31
- package/esm2015/lib/index.js +4 -4
- package/esm2015/po-ui-ng-code-editor.js +6 -6
- package/esm2015/public-api.js +2 -2
- package/fesm2015/po-ui-ng-code-editor.js +574 -574
- package/fesm2015/po-ui-ng-code-editor.js.map +1 -1
- package/lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface.d.ts +22 -22
- package/lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface.d.ts +37 -37
- package/lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface.d.ts +21 -21
- package/lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface.d.ts +17 -17
- package/lib/components/po-code-editor/po-code-editor-base.component.d.ts +191 -191
- package/lib/components/po-code-editor/po-code-editor-register.service.d.ts +67 -67
- package/lib/components/po-code-editor/po-code-editor-suggestion.service.d.ts +7 -7
- package/lib/components/po-code-editor/po-code-editor.component.d.ts +58 -58
- package/lib/components/po-code-editor/po-code-editor.module.d.ts +10 -10
- package/lib/index.d.ts +7 -7
- package/package.json +5 -5
- package/po-ui-ng-code-editor-5.22.4.tgz +0 -0
- package/po-ui-ng-code-editor.d.ts +6 -6
- package/po-ui-ng-code-editor.metadata.json +1 -1
- package/public-api.d.ts +1 -1
- package/schematics/README.md +98 -98
- package/schematics/collection.json +10 -10
- package/schematics/ng-add/index.d.ts +10 -10
- package/schematics/ng-add/index.js +38 -38
- package/schematics/ng-add/index.spec.d.ts +1 -1
- package/schematics/ng-add/index.spec.js +113 -113
- package/schematics/ng-add/schema.json +7 -7
- package/po-ui-ng-code-editor-5.22.0.tgz +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';
|
|
3
|
-
/**
|
|
4
|
-
* @description
|
|
5
|
-
*
|
|
6
|
-
* Módulo do componente po-code-editor.
|
|
7
|
-
*/
|
|
8
|
-
export declare class PoCodeEditorModule {
|
|
9
|
-
static forRegister(props: PoCodeEditorRegisterable): ModuleWithProviders<PoCodeEditorModule>;
|
|
10
|
-
}
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Módulo do componente po-code-editor.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PoCodeEditorModule {
|
|
9
|
+
static forRegister(props: PoCodeEditorRegisterable): ModuleWithProviders<PoCodeEditorModule>;
|
|
10
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { PoCodeEditorComponent } from './components/po-code-editor/po-code-editor.component';
|
|
2
|
-
export { PoCodeEditorRegister } from './components/po-code-editor/po-code-editor-register.service';
|
|
3
|
-
export { PoCodeEditorRegisterable } from './components/po-code-editor/interfaces/po-code-editor-registerable.interface';
|
|
4
|
-
export { PoCodeEditorRegisterableOptions } from './components/po-code-editor/interfaces/po-code-editor-registerable-options.interface';
|
|
5
|
-
export { PoCodeEditorRegisterableTokens } from './components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface';
|
|
6
|
-
export { PoCodeEditorRegisterableSuggestion } from './components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface';
|
|
7
|
-
export { PoCodeEditorModule } from './components/po-code-editor/po-code-editor.module';
|
|
1
|
+
export { PoCodeEditorComponent } from './components/po-code-editor/po-code-editor.component';
|
|
2
|
+
export { PoCodeEditorRegister } from './components/po-code-editor/po-code-editor-register.service';
|
|
3
|
+
export { PoCodeEditorRegisterable } from './components/po-code-editor/interfaces/po-code-editor-registerable.interface';
|
|
4
|
+
export { PoCodeEditorRegisterableOptions } from './components/po-code-editor/interfaces/po-code-editor-registerable-options.interface';
|
|
5
|
+
export { PoCodeEditorRegisterableTokens } from './components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface';
|
|
6
|
+
export { PoCodeEditorRegisterableSuggestion } from './components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface';
|
|
7
|
+
export { PoCodeEditorModule } from './components/po-code-editor/po-code-editor.module';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-code-editor",
|
|
3
|
-
"version": "5.22.
|
|
4
|
-
"tag": "
|
|
3
|
+
"version": "5.22.4",
|
|
4
|
+
"tag": "v5-lts",
|
|
5
5
|
"description": "PO UI - Code Editor",
|
|
6
6
|
"author": "PO UI",
|
|
7
7
|
"license": "MIT",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"schematics": "./schematics/collection.json",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@po-ui/ng-components": "5.22.
|
|
16
|
-
"@po-ui/ng-schematics": "5.22.
|
|
15
|
+
"@po-ui/ng-components": "5.22.4",
|
|
16
|
+
"@po-ui/ng-schematics": "5.22.4",
|
|
17
17
|
"monaco-editor": "0.24.0",
|
|
18
18
|
"core-js": "^3.13.0",
|
|
19
19
|
"intl": "^1.2.5",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@angular/common": "^12.0.1",
|
|
24
24
|
"@angular/core": "^12.0.1",
|
|
25
25
|
"@angular/forms": "^12.0.1",
|
|
26
|
-
"@po-ui/ng-components": "5.22.
|
|
26
|
+
"@po-ui/ng-components": "5.22.4",
|
|
27
27
|
"monaco-editor": "0.24.0",
|
|
28
28
|
"zone.js": "~0.11.4"
|
|
29
29
|
},
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
export { PoCodeEditorBaseComponent as ɵa } from './lib/components/po-code-editor/po-code-editor-base.component';
|
|
6
|
-
export { PoCodeEditorSuggestionService as ɵb } from './lib/components/po-code-editor/po-code-editor-suggestion.service';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
export { PoCodeEditorBaseComponent as ɵa } from './lib/components/po-code-editor/po-code-editor-base.component';
|
|
6
|
+
export { PoCodeEditorSuggestionService as ɵb } from './lib/components/po-code-editor/po-code-editor-suggestion.service';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"PoCodeEditorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":58,"character":1},"arguments":[{"selector":"po-code-editor","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":19,"character":13},"useExisting":{"__symbolic":"reference","name":"PoCodeEditorComponent"},"multi":true}],"template":"<div #editorContainer [style.height]=\"height\"></div>\n"}]}],"members":{"editorContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":64,"character":3},"arguments":["editorContainer",{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":69,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":70,"character":16},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"PoCodeEditorRegister"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"monacoCreateModel":[{"__symbolic":"method"}],"setValueInEditor":[{"__symbolic":"method"}],"setLanguage":[{"__symbolic":"method"}],"setTheme":[{"__symbolic":"method"}],"setReadOnly":[{"__symbolic":"method"}],"setSuggestions":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"initMonaco":[{"__symbolic":"method"}],"setMonacoLanguage":[{"__symbolic":"method"}],"registerCustomLanguage":[{"__symbolic":"method"}]}},"PoCodeEditorRegister":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":62,"character":1}}],"members":{}},"PoCodeEditorRegisterable":{"__symbolic":"interface"},"PoCodeEditorRegisterableOptions":{"__symbolic":"interface"},"PoCodeEditorRegisterableTokens":{"__symbolic":"interface"},"PoCodeEditorRegisterableSuggestion":{"__symbolic":"interface"},"PoCodeEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":12}],"declarations":[{"__symbolic":"reference","name":"PoCodeEditorComponent"}],"exports":[{"__symbolic":"reference","name":"PoCodeEditorComponent"}],"providers":[{"__symbolic":"reference","name":"PoCodeEditorRegister"}]}]}],"members":{},"statics":{"forRegister":{"__symbolic":"function","parameters":["props"],"value":{"ngModule":{"__symbolic":"reference","name":"PoCodeEditorModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PoCodeEditorRegister"},"useValue":{"__symbolic":"reference","name":"props"}}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":66,"character":1}}],"members":{"language":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3},"arguments":["p-language"]}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3},"arguments":["p-readonly"]}]}],"showDiff":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["p-show-diff"]}]}],"suggestions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":177,"character":3},"arguments":["p-suggestions"]}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":207,"character":3},"arguments":["p-theme"]}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":228,"character":3},"arguments":["p-height"]}]}],"getOptions":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"convertToBoolean":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"setLanguage":[{"__symbolic":"method"}],"setTheme":[{"__symbolic":"method"}],"setReadOnly":[{"__symbolic":"method"}],"setSuggestions":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"getSuggestion":[{"__symbolic":"method"}],"deduplicateSuggestions":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"PoCodeEditorComponent":"./lib/components/po-code-editor/po-code-editor.component","PoCodeEditorRegister":"./lib/components/po-code-editor/po-code-editor-register.service","PoCodeEditorRegisterable":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface","PoCodeEditorRegisterableOptions":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface","PoCodeEditorRegisterableTokens":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface","PoCodeEditorRegisterableSuggestion":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface","PoCodeEditorModule":"./lib/components/po-code-editor/po-code-editor.module","ɵa":"./lib/components/po-code-editor/po-code-editor-base.component","ɵb":"./lib/components/po-code-editor/po-code-editor-suggestion.service"},"importAs":"@po-ui/ng-code-editor"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"PoCodeEditorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵa"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":58,"character":1},"arguments":[{"selector":"po-code-editor","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":19,"character":13},"useExisting":{"__symbolic":"reference","name":"PoCodeEditorComponent"},"multi":true}],"template":"<div #editorContainer [style.height]=\"height\"></div>\r\n"}]}],"members":{"editorContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":64,"character":3},"arguments":["editorContainer",{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":69,"character":18},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":70,"character":16},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"PoCodeEditorRegister"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"monacoCreateModel":[{"__symbolic":"method"}],"setValueInEditor":[{"__symbolic":"method"}],"setLanguage":[{"__symbolic":"method"}],"setTheme":[{"__symbolic":"method"}],"setReadOnly":[{"__symbolic":"method"}],"setSuggestions":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"initMonaco":[{"__symbolic":"method"}],"setMonacoLanguage":[{"__symbolic":"method"}],"registerCustomLanguage":[{"__symbolic":"method"}]}},"PoCodeEditorRegister":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":62,"character":1}}],"members":{}},"PoCodeEditorRegisterable":{"__symbolic":"interface"},"PoCodeEditorRegisterableOptions":{"__symbolic":"interface"},"PoCodeEditorRegisterableTokens":{"__symbolic":"interface"},"PoCodeEditorRegisterableSuggestion":{"__symbolic":"interface"},"PoCodeEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":12}],"declarations":[{"__symbolic":"reference","name":"PoCodeEditorComponent"}],"exports":[{"__symbolic":"reference","name":"PoCodeEditorComponent"}],"providers":[{"__symbolic":"reference","name":"PoCodeEditorRegister"}]}]}],"members":{},"statics":{"forRegister":{"__symbolic":"function","parameters":["props"],"value":{"ngModule":{"__symbolic":"reference","name":"PoCodeEditorModule"},"providers":[{"provide":{"__symbolic":"reference","name":"PoCodeEditorRegister"},"useValue":{"__symbolic":"reference","name":"props"}}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":66,"character":1}}],"members":{"language":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":93,"character":3},"arguments":["p-language"]}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3},"arguments":["p-readonly"]}]}],"showDiff":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["p-show-diff"]}]}],"suggestions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":177,"character":3},"arguments":["p-suggestions"]}]}],"theme":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":207,"character":3},"arguments":["p-theme"]}]}],"height":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":228,"character":3},"arguments":["p-height"]}]}],"getOptions":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"convertToBoolean":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"setLanguage":[{"__symbolic":"method"}],"setTheme":[{"__symbolic":"method"}],"setReadOnly":[{"__symbolic":"method"}],"setSuggestions":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"getSuggestion":[{"__symbolic":"method"}],"deduplicateSuggestions":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"PoCodeEditorComponent":"./lib/components/po-code-editor/po-code-editor.component","PoCodeEditorRegister":"./lib/components/po-code-editor/po-code-editor-register.service","PoCodeEditorRegisterable":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface","PoCodeEditorRegisterableOptions":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface","PoCodeEditorRegisterableTokens":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface","PoCodeEditorRegisterableSuggestion":"./lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface","PoCodeEditorModule":"./lib/components/po-code-editor/po-code-editor.module","ɵa":"./lib/components/po-code-editor/po-code-editor-base.component","ɵb":"./lib/components/po-code-editor/po-code-editor-suggestion.service"},"importAs":"@po-ui/ng-code-editor"}
|
package/public-api.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './lib/index';
|
|
1
|
+
export * from './lib/index';
|
package/schematics/README.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
# PO UI Code Editor
|
|
2
|
-
|
|
3
|
-
## Modo desenvolvimento
|
|
4
|
-
|
|
5
|
-
Para desenvolver novos *schematics* ou alterá-los é necessário executar o comando abaixo na raiz do projeto:
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
~ <caminho_do_repositorio>/po-angular
|
|
9
|
-
> npm run build:schematics
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Após executar o comando será criada a pasta `dist/ng-schematics` e você estará apto a utilizar a biblioteca
|
|
13
|
-
em modo de desenvolvimento para implementar novas melhorias/correções e etc.
|
|
14
|
-
|
|
15
|
-
## Como testar
|
|
16
|
-
|
|
17
|
-
Há duas possibilidades para execução de testes para os novos *schematics*:
|
|
18
|
-
|
|
19
|
-
### 1 - npm link
|
|
20
|
-
|
|
21
|
-
O comando **npm link** criará um link simbólico do pacote que deseja testar dentro do `node_modules` da aplicação. Desta forma, é possível executar *schematics* do `po-code-editor` diretamente em `./projects/app/src/app`.
|
|
22
|
-
|
|
23
|
-
Primeiramente, é necessário alterar em `angular.json`:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
...
|
|
27
|
-
"defaultProject": "app"
|
|
28
|
-
...
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Executar o build do projeto `po-code-editor`:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
> npm run build:code-editor
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Agora executaremos o comando de link:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
> npm link dist/ng-code-editor
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Por fim, executando o comando abaixo, o pacote do `po-code-editor` será instalado e também será adicionado o módulo `PoCodeEditorModule` em `app.module.ts`:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
> ng generate @po-ui/ng-code-editor:ng-add
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
> Pra remover posteriormente o pacote `po-code-editor` do `node_modules` execute `npm uninstall @po-ui/ng-code-editor`.
|
|
50
|
-
### 2 - verdaccio
|
|
51
|
-
|
|
52
|
-
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
53
|
-
onde publicaremos os pacotes para realizar o teste.
|
|
54
|
-
|
|
55
|
-
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
56
|
-
|
|
57
|
-
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
> verdaccio
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
> npm set registry http://localhost:4873
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
70
|
-
|
|
71
|
-
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
72
|
-
|
|
73
|
-
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
74
|
-
|
|
75
|
-
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
76
|
-
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
77
|
-
|
|
78
|
-
Feito isso, podemos realizar o build e a publicação local dos pacotes do `po-code-editor` e também das suas dependências:
|
|
79
|
-
|
|
80
|
-
1 - Publicar o `@po-ui/style` ou fixar a versão do style no `package.json` da raiz.
|
|
81
|
-
|
|
82
|
-
2 - Publicação dos pacotes do `po-angular` no Verdaccio.
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
> npm run build && npm run publish:local
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
3 - Adicionar a tag na versão latest do `po-code-editor`:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
> npm dist-tags add @po-ui/ng-code-editor@version
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
4 - Por fim, execute o comando abaixo no seu projeto Angular:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
> ng add @po-ui/ng-code-editor
|
|
98
|
-
```
|
|
1
|
+
# PO UI Code Editor
|
|
2
|
+
|
|
3
|
+
## Modo desenvolvimento
|
|
4
|
+
|
|
5
|
+
Para desenvolver novos *schematics* ou alterá-los é necessário executar o comando abaixo na raiz do projeto:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
~ <caminho_do_repositorio>/po-angular
|
|
9
|
+
> npm run build:schematics
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Após executar o comando será criada a pasta `dist/ng-schematics` e você estará apto a utilizar a biblioteca
|
|
13
|
+
em modo de desenvolvimento para implementar novas melhorias/correções e etc.
|
|
14
|
+
|
|
15
|
+
## Como testar
|
|
16
|
+
|
|
17
|
+
Há duas possibilidades para execução de testes para os novos *schematics*:
|
|
18
|
+
|
|
19
|
+
### 1 - npm link
|
|
20
|
+
|
|
21
|
+
O comando **npm link** criará um link simbólico do pacote que deseja testar dentro do `node_modules` da aplicação. Desta forma, é possível executar *schematics* do `po-code-editor` diretamente em `./projects/app/src/app`.
|
|
22
|
+
|
|
23
|
+
Primeiramente, é necessário alterar em `angular.json`:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
...
|
|
27
|
+
"defaultProject": "app"
|
|
28
|
+
...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Executar o build do projeto `po-code-editor`:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
> npm run build:code-editor
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Agora executaremos o comando de link:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
> npm link dist/ng-code-editor
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Por fim, executando o comando abaixo, o pacote do `po-code-editor` será instalado e também será adicionado o módulo `PoCodeEditorModule` em `app.module.ts`:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
> ng generate @po-ui/ng-code-editor:ng-add
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> Pra remover posteriormente o pacote `po-code-editor` do `node_modules` execute `npm uninstall @po-ui/ng-code-editor`.
|
|
50
|
+
### 2 - verdaccio
|
|
51
|
+
|
|
52
|
+
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
53
|
+
onde publicaremos os pacotes para realizar o teste.
|
|
54
|
+
|
|
55
|
+
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
56
|
+
|
|
57
|
+
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
> verdaccio
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
> npm set registry http://localhost:4873
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
70
|
+
|
|
71
|
+
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
72
|
+
|
|
73
|
+
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
74
|
+
|
|
75
|
+
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
76
|
+
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
77
|
+
|
|
78
|
+
Feito isso, podemos realizar o build e a publicação local dos pacotes do `po-code-editor` e também das suas dependências:
|
|
79
|
+
|
|
80
|
+
1 - Publicar o `@po-ui/style` ou fixar a versão do style no `package.json` da raiz.
|
|
81
|
+
|
|
82
|
+
2 - Publicação dos pacotes do `po-angular` no Verdaccio.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
> npm run build && npm run publish:local
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
3 - Adicionar a tag na versão latest do `po-code-editor`:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
> npm dist-tags add @po-ui/ng-code-editor@version
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
4 - Por fim, execute o comando abaixo no seu projeto Angular:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
> ng add @po-ui/ng-code-editor
|
|
98
|
+
```
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
-
"schematics": {
|
|
4
|
-
"ng-add": {
|
|
5
|
-
"description": "Add my library to the project.",
|
|
6
|
-
"factory": "./ng-add/index",
|
|
7
|
-
"schema": "./ng-add/schema.json"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Add my library to the project.",
|
|
6
|
+
"factory": "./ng-add/index",
|
|
7
|
+
"schema": "./ng-add/schema.json"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
/**
|
|
3
|
-
* Scaffolds the basics of the PO Code Editor, this includes:
|
|
4
|
-
* - Install dependencies;
|
|
5
|
-
* - Imports PoCodeEditorModule to app root module;
|
|
6
|
-
* - Configure the theme's style in the project workspace;
|
|
7
|
-
* - Configure the monaco editor's asset in the project workspace;
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export default function (options: any): Rule;
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Scaffolds the basics of the PO Code Editor, this includes:
|
|
4
|
+
* - Install dependencies;
|
|
5
|
+
* - Imports PoCodeEditorModule to app root module;
|
|
6
|
+
* - Configure the theme's style in the project workspace;
|
|
7
|
+
* - Configure the monaco editor's asset in the project workspace;
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export default function (options: any): Rule;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
-
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
|
-
const module_1 = require("@po-ui/ng-schematics/module/module");
|
|
7
|
-
const build_target_options_1 = require("@po-ui/ng-schematics/build-target-options/build-target-options");
|
|
8
|
-
/** PO Module name that will be inserted into app root module */
|
|
9
|
-
const poCodeEditorModuleName = 'PoCodeEditorModule';
|
|
10
|
-
const poCodeEditorModuleSourcePath = '@po-ui/ng-code-editor';
|
|
11
|
-
// Path needs to be always relative to the `package.json` or workspace root.
|
|
12
|
-
const poThemeStylePath = './node_modules/@po-ui/style/css/po-theme-default.min.css';
|
|
13
|
-
// Monaco asset to be included in the project.
|
|
14
|
-
const poCodeEditorMonacoAsset = { glob: '**/*', input: 'node_modules/monaco-editor/min', output: '/assets/monaco/' };
|
|
15
|
-
/**
|
|
16
|
-
* Scaffolds the basics of the PO Code Editor, this includes:
|
|
17
|
-
* - Install dependencies;
|
|
18
|
-
* - Imports PoCodeEditorModule to app root module;
|
|
19
|
-
* - Configure the theme's style in the project workspace;
|
|
20
|
-
* - Configure the monaco editor's asset in the project workspace;
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
function default_1(options) {
|
|
24
|
-
return schematics_1.chain([
|
|
25
|
-
addPoPackageAndInstall(),
|
|
26
|
-
module_1.addModuleImportToRootModule(options, poCodeEditorModuleName, poCodeEditorModuleSourcePath),
|
|
27
|
-
build_target_options_1.configuringBuildTargets(options, 'styles', poThemeStylePath),
|
|
28
|
-
build_target_options_1.configuringBuildTargets(options, 'assets', poCodeEditorMonacoAsset)
|
|
29
|
-
]);
|
|
30
|
-
}
|
|
31
|
-
exports.default = default_1;
|
|
32
|
-
function addPoPackageAndInstall() {
|
|
33
|
-
return (tree, context) => {
|
|
34
|
-
package_config_1.addPackageToPackageJson(tree, '@po-ui/ng-code-editor', '5.22.
|
|
35
|
-
// install packages
|
|
36
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
37
|
-
};
|
|
38
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
|
+
const module_1 = require("@po-ui/ng-schematics/module/module");
|
|
7
|
+
const build_target_options_1 = require("@po-ui/ng-schematics/build-target-options/build-target-options");
|
|
8
|
+
/** PO Module name that will be inserted into app root module */
|
|
9
|
+
const poCodeEditorModuleName = 'PoCodeEditorModule';
|
|
10
|
+
const poCodeEditorModuleSourcePath = '@po-ui/ng-code-editor';
|
|
11
|
+
// Path needs to be always relative to the `package.json` or workspace root.
|
|
12
|
+
const poThemeStylePath = './node_modules/@po-ui/style/css/po-theme-default.min.css';
|
|
13
|
+
// Monaco asset to be included in the project.
|
|
14
|
+
const poCodeEditorMonacoAsset = { glob: '**/*', input: 'node_modules/monaco-editor/min', output: '/assets/monaco/' };
|
|
15
|
+
/**
|
|
16
|
+
* Scaffolds the basics of the PO Code Editor, this includes:
|
|
17
|
+
* - Install dependencies;
|
|
18
|
+
* - Imports PoCodeEditorModule to app root module;
|
|
19
|
+
* - Configure the theme's style in the project workspace;
|
|
20
|
+
* - Configure the monaco editor's asset in the project workspace;
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function default_1(options) {
|
|
24
|
+
return schematics_1.chain([
|
|
25
|
+
addPoPackageAndInstall(),
|
|
26
|
+
module_1.addModuleImportToRootModule(options, poCodeEditorModuleName, poCodeEditorModuleSourcePath),
|
|
27
|
+
build_target_options_1.configuringBuildTargets(options, 'styles', poThemeStylePath),
|
|
28
|
+
build_target_options_1.configuringBuildTargets(options, 'assets', poCodeEditorMonacoAsset)
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
exports.default = default_1;
|
|
32
|
+
function addPoPackageAndInstall() {
|
|
33
|
+
return (tree, context) => {
|
|
34
|
+
package_config_1.addPackageToPackageJson(tree, '@po-ui/ng-code-editor', '5.22.4');
|
|
35
|
+
// install packages
|
|
36
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|