@po-ui/ng-code-editor 5.22.0 → 6.0.0
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/{esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface.js → esm2020/lib/components/po-code-editor/interfaces/po-code-editor-registerable-options.interface.mjs} +0 -0
- package/{esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface.js → esm2020/lib/components/po-code-editor/interfaces/po-code-editor-registerable-suggestion.interface.mjs} +0 -0
- package/{esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface.js → esm2020/lib/components/po-code-editor/interfaces/po-code-editor-registerable-tokens.interface.mjs} +0 -0
- package/{esm2015/lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface.js → esm2020/lib/components/po-code-editor/interfaces/po-code-editor-registerable.interface.mjs} +0 -0
- package/esm2020/lib/components/po-code-editor/po-code-editor-base.component.mjs +261 -0
- package/esm2020/lib/components/po-code-editor/po-code-editor-register.service.mjs +66 -0
- package/esm2020/lib/components/po-code-editor/po-code-editor-suggestion.service.mjs +29 -0
- package/{esm2015/lib/components/po-code-editor/po-code-editor.component.js → esm2020/lib/components/po-code-editor/po-code-editor.component.mjs} +24 -20
- package/esm2020/lib/components/po-code-editor/po-code-editor.module.mjs +37 -0
- package/{esm2015/lib/index.js → esm2020/lib/index.mjs} +0 -0
- package/esm2020/po-ui-ng-code-editor.mjs +5 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/po-ui-ng-code-editor.mjs +632 -0
- package/fesm2015/po-ui-ng-code-editor.mjs.map +1 -0
- package/{fesm2015/po-ui-ng-code-editor.js → fesm2020/po-ui-ng-code-editor.mjs} +86 -63
- package/fesm2020/po-ui-ng-code-editor.mjs.map +1 -0
- package/lib/components/po-code-editor/po-code-editor-base.component.d.ts +3 -0
- package/lib/components/po-code-editor/po-code-editor-register.service.d.ts +3 -0
- package/lib/components/po-code-editor/po-code-editor-suggestion.service.d.ts +3 -0
- package/lib/components/po-code-editor/po-code-editor.component.d.ts +3 -0
- package/lib/components/po-code-editor/po-code-editor.module.d.ts +6 -0
- package/package.json +26 -14
- package/po-ui-ng-code-editor-6.0.0.tgz +0 -0
- package/po-ui-ng-code-editor.d.ts +1 -2
- package/schematics/ng-add/index.js +5 -5
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/index.spec.js +23 -23
- package/schematics/ng-add/index.spec.js.map +1 -1
- package/bundles/po-ui-ng-code-editor.umd.js +0 -981
- package/bundles/po-ui-ng-code-editor.umd.js.map +0 -1
- package/esm2015/lib/components/po-code-editor/po-code-editor-base.component.js +0 -248
- package/esm2015/lib/components/po-code-editor/po-code-editor-register.service.js +0 -63
- package/esm2015/lib/components/po-code-editor/po-code-editor-suggestion.service.js +0 -28
- package/esm2015/lib/components/po-code-editor/po-code-editor.module.js +0 -31
- package/esm2015/po-ui-ng-code-editor.js +0 -7
- package/fesm2015/po-ui-ng-code-editor.js.map +0 -1
- package/po-ui-ng-code-editor-5.22.0.tgz +0 -0
- package/po-ui-ng-code-editor.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"po-ui-ng-code-editor.mjs","sources":["../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-base.component.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-suggestion.service.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.html","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.module.ts","../../../projects/code-editor/src/po-ui-ng-code-editor.ts"],"sourcesContent":["import { Input, Directive } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\n\nimport { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';\n\nconst PO_CODE_EDITOR_THEMES = ['vs-dark', 'vs', 'hc-black'];\nconst PO_CODE_EDITOR_THEME_DEFAULT = 'vs';\n\n/**\n * @description\n *\n * O `po-code-editor` é um componente para edição de código fonte baseado no Monaco Editor da Microsoft.\n *\n * Sendo assim, algumas configurações presentes no Monaco podem ser utilizadas aqui, como a escolha da linguagem\n * (utilizando o highlight syntax específico), escolha do tema e opção de diff, além de ser muito similar ao Visual\n * Studio Code, com autocomplete e fechamento automático de brackets.\n *\n * Este componente pode ser usado em qualquer situação que necessite de adição de códigos, como por exemplo, criar\n * receitas utilizando Terraform para gerenciar topologias.\n * É importante ressaltar que este não é um componente para edição de textos comuns.\n *\n * O [(ngModel)] deve ser usado para manipular o conteúdo do po-code-editor, ou seja, tanto para incluir um conteúdo quanto\n * para recuperar o conteúdo do po-code-editor, utiliza-se uma variável passada por [(ngModel)].\n *\n * #### Adicionando o pacote @po-ui/ng-code-editor\n *\n * Para instalar o pacote `po-code-editor` em sua aplicação execute:\n *\n * ```shell\n * ng add @po-ui/ng-code-editor\n * ```\n *\n * O comando `ng add` do `Angular CLI`:\n * - inclui o `po-code-editor` no seu projeto;\n * - adiciona o módulo `PoCodeEditorModule`:;\n *\n * ```\n * // app.module.ts\n * ...\n * import { PoModule } from '@po-ui/ng-components';\n * import { PoCodeEditorModule } from '@po-ui/ng-code-editor';\n * ...\n * @NgModule({\n * imports: [\n * ...\n * PoModule,\n * PoCodeEditorModule\n * ],\n * ...\n * })\n * export class AppModule { }\n * ```\n *\n * - adiciona o tema PO UI e também o *asset* do Monaco no arquivo `angular.json`, conforme abaixo:\n *\n * <pre ngNonBindable>\n * ...\n * \"assets\": [\n * { \"glob\": \"**/*\", \"input\": \"node_modules/monaco-editor/min\", \"output\": \"/assets/monaco/\" }\n * ],\n * \"styles\": [\n * \"./node_modules/@po-ui/style/css/po-theme-default.min.css\"\n * ]\n * ...\n * </pre>\n */\n@Directive()\nexport abstract class PoCodeEditorBaseComponent implements ControlValueAccessor {\n editor: any;\n modifiedValue: string = '';\n value: any = '';\n\n private _height: number = 150;\n private _language = 'plainText';\n private _readonly: boolean = false;\n private _showDiff: boolean = false;\n private _suggestions: Array<PoCodeEditorRegisterableSuggestion>;\n private _theme = PO_CODE_EDITOR_THEME_DEFAULT;\n\n /**\n * @optional\n *\n * @description\n *\n * Linguagem na qual será apresentado o código fonte.\n * Para saber quais são as linguagens compatíveis, consulte a documentação oficial do\n * [**Monaco Editor**](https://microsoft.github.io/monaco-editor/).\n *\n * Também é possível adicionar uma nova linguagem personalizada utilizando o serviço:\n * [**po-code-editor-register**](https://po-ui.io/documentation/po-code-editor-register?view=doc).\n *\n * @default `plainText`\n */\n @Input('p-language') set language(language: string) {\n this._language = language && language.length ? language.trim() : 'plainText';\n\n if (this.editor && this._language) {\n this.setLanguage(this._language);\n }\n }\n\n get language(): string {\n return this._language;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Indica se o editor será aberto em modo de leitura.\n *\n * Neste caso, não é possível editar o código inserido.\n *\n * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente.\n *\n * @default `false`\n */\n @Input('p-readonly') set readonly(readonly: boolean) {\n this._readonly = <any>readonly === '' ? true : this.convertToBoolean(readonly);\n\n if (this.editor) {\n this.setReadOnly(readonly);\n }\n }\n\n get readonly(): boolean {\n return this._readonly;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Indica se o editor será aberto em modo de comparação.\n *\n * Caso esteja habilitada esta opção, então o [(ngModel)] deverá ser passado como um array, cuja primeira opção deve\n * conter uma string com o código original e na segunda posição uma string código modificado para efeito de\n * comparação. Neste caso, o usuário conseguirá editar apenas o código modificado e isso refletirá na segunda posição\n * do array consequentemente.\n *\n * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente.\n *\n * @default `false`\n */\n @Input('p-show-diff') set showDiff(showDiff: boolean) {\n this._showDiff = <any>showDiff === '' ? true : this.convertToBoolean(showDiff);\n }\n\n get showDiff(): boolean {\n return this._showDiff;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Lista de sugestões usadas pelo autocomplete dentro do editor.\n *\n * Para visualizar a lista de sugestões use o comando `CTRL + SPACE`.\n *\n * Caso o editor esteja usando uma linguagem que já tenha uma lista de sugestões predefinida, o valor passado será adicionado\n * a lista preexistente, aumentando as opções para o usuário.\n *\n * Caso tenha mais de um editor da mesma linguagem na aplicação, as sugestões serão adicionadas para que todos os editores da mesma linguagem\n * tenham as mesmas sugestões.\n *\n * ```\n * <po-code-editor\n * [p-suggestions]=\"[{ label: 'po', insertText: 'Portinari UI' }, { label: 'ng', insertText: 'Angular' }]\">\n * </po-code-editor>\n * ```\n *\n * Ao fornecer uma lista de sugestões é possível acelerar a escrita de scripts pelos usuários.\n */\n @Input('p-suggestions') set suggestions(values: Array<PoCodeEditorRegisterableSuggestion>) {\n this._suggestions = values;\n\n if (this.editor && this._suggestions) {\n this.setSuggestions(this._suggestions);\n }\n }\n\n get suggestions(): Array<PoCodeEditorRegisterableSuggestion> {\n return this._suggestions;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Define um tema para o editor.\n *\n * Temas válidos:\n * - `vs-dark`\n * - `vs`\n * - `hc-black`\n *\n * É importante salientar que o tema será aplicados a todos os componentes po-code-editor existentes na tela,\n * ou seja, todas as instâncias do componente receberão o último tema atribuído ou o tema da última instância\n * criada.\n *\n * @default `vs`\n */\n @Input('p-theme') set theme(theme: string) {\n this._theme = PO_CODE_EDITOR_THEMES.includes(theme) ? theme : PO_CODE_EDITOR_THEME_DEFAULT;\n\n if (this.editor) {\n this.setTheme(theme);\n }\n }\n\n get theme(): string {\n return this._theme;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Define a altura do componente em pixels do po-code-editor.\n * Esta propriedade não poderá ser alterada após o componente ter sido iniciado.\n * A altura mínima é 150 pixels.\n */\n @Input('p-height') set height(height: string) {\n this._height = parseFloat(height) >= 150 ? parseFloat(height) : 150;\n }\n\n get height(): string {\n return `${this._height}px`;\n }\n\n /* istanbul ignore next */\n onTouched = (value: any) => {};\n /* istanbul ignore next */\n onChangePropagate = (value: any) => {};\n\n getOptions() {\n return { language: this.language, theme: this.theme, readOnly: this.readonly };\n }\n\n registerOnChange(fn: any): void {\n this.onChangePropagate = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n protected convertToBoolean(val: any): boolean {\n if (typeof val === 'string') {\n val = val.toLowerCase().trim();\n return val === 'true' || val === 'on' || val === '';\n }\n\n if (typeof val === 'number') {\n return val === 1;\n }\n\n return !!val;\n }\n\n abstract writeValue(value: any);\n\n abstract setLanguage(value: any);\n\n abstract setTheme(value: any);\n\n abstract setReadOnly(value: any);\n\n abstract setSuggestions(value: any);\n}\n","import { Injectable } from '@angular/core';\nimport {\n PoCodeEditorSuggestionList,\n PoCodeEditorRegisterableSuggestion\n} from './interfaces/po-code-editor-registerable-suggestion.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PoCodeEditorSuggestionService {\n private suggestions: PoCodeEditorSuggestionList = {};\n constructor() {}\n\n public getSuggestion(language: string, newSuggestion: Array<PoCodeEditorRegisterableSuggestion>) {\n if (this.suggestions[language]) {\n const deduplicateSuggestions = this.deduplicateSuggestions(this.suggestions[language], newSuggestion);\n this.suggestions[language] = [...this.suggestions[language], ...deduplicateSuggestions];\n return deduplicateSuggestions;\n } else {\n return (this.suggestions[language] = [...newSuggestion]);\n }\n }\n\n private deduplicateSuggestions(\n originalSuggestions: Array<PoCodeEditorRegisterableSuggestion>,\n newSuggestions: Array<PoCodeEditorRegisterableSuggestion>\n ) {\n return newSuggestions.filter(\n newItem => !originalSuggestions.find(originalItem => originalItem['label'] === newItem['label'])\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';\nimport { PoCodeEditorRegisterableOptions } from './interfaces/po-code-editor-registerable-options.interface';\nimport { PoCodeEditorRegisterableSuggestionType } from './interfaces/po-code-editor-registerable-suggestion.interface';\n\n/**\n * @description\n *\n * Wrapper para registro de sintaxes customizadas para o po-code-editor.\n *\n * Para utilização do serviço de idiomas **PoCodeEditorRegister**,\n * deve-se importar o módulo PoCodeEditorModule mesmo já tendo importado\n * o módulo PoModule.\n * Na importação opcionalmente pode ser invocado o método **forRegister** informando um objeto para configuração.\n *\n * Exemplo de configuração:\n * ```\n * import { PoCodeEditorModule, PoCodeEditorRegisterable } from '@po-ui/ng-code-editor';\n *\n * declare const monaco: any; // Importante para usar configurações com tipos definidos pelo Monaco\n *\n * // A função `provideCompletionItems` precisa ser exportada para ser compatível com AOT.\n * export function provideCompletionItems() {\n * const suggestions = [{\n * label: 'terraform',\n * insertText: '#terraform language'\n * }, {\n * label: 'server',\n * insertText: 'server ${1:ip}'\n * }];\n *\n * return { suggestions: suggestions };\n * }\n *\n * const customEditor: PoCodeEditorRegisterable = {\n * language: 'terraform',\n * options: {\n * keywords: ['resource', 'provider', 'variable', 'output', 'module', 'true', 'false'],\n * operators: ['{', '}', '(', ')', '[', ']', '?', ':'],\n * symbols: /[=><!~?:&|+\\-*\\/\\^%]+/,\n * escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n * tokenizer: {\n * ...\n * }\n * },\n * suggestions: { provideCompletionItems: provideCompletionItems }\n * };\n *\n * @NgModule({\n * declarations: [],\n * imports: [\n * PoModule,\n * PoCodeEditorModule.forRegister(customEditor)\n * ],\n * bootstrap: [AppComponent]\n * })\n * ```\n *\n * > As configurações para o registro de uma nova sintaxe no Monaco code editor podem ser encontradas em\n * > [**Monaco Editor**](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages).\n */\n@Injectable()\nexport class PoCodeEditorRegister implements PoCodeEditorRegisterable {\n /** Sintaxe a ser registrada. */\n language: string;\n\n /** Opções da sintaxe para registro no po-code-editor. */\n options: PoCodeEditorRegisterableOptions;\n\n /** Lista de sugestões para a função de autocomplete (CTRL + SPACE). */\n suggestions?: PoCodeEditorRegisterableSuggestionType;\n}\n","import { AfterViewInit, Component, DoCheck, ElementRef, forwardRef, NgZone, ViewChild, Provider } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { PoCodeEditorBaseComponent } from './po-code-editor-base.component';\nimport { PoCodeEditorRegister } from './po-code-editor-register.service';\nimport { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';\nimport { PoCodeEditorSuggestionService } from './po-code-editor-suggestion.service';\n\n// variáveis relacionadas ao Monaco\nlet loadedMonaco: boolean = false;\nlet loadPromise: Promise<void>;\n\ndeclare const monaco: any;\n// eslint-disable-next-line\ndeclare const require: any;\n\n/* istanbul ignore next */\nconst providers: Array<Provider> = [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line\n useExisting: forwardRef(() => PoCodeEditorComponent),\n multi: true\n }\n];\n\n/**\n * @docsExtends PoCodeEditorBaseComponent\n *\n * @example\n *\n * <example name=\"po-code-editor-basic\" title=\"PO Code Editor Basic\">\n * <file name=\"sample-po-code-editor-basic/sample-po-code-editor-basic.component.html\"> </file>\n * <file name=\"sample-po-code-editor-basic/sample-po-code-editor-basic.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-labs\" title=\"PO Code Editor Labs\">\n * <file name=\"sample-po-code-editor-labs/sample-po-code-editor-labs.component.html\"> </file>\n * <file name=\"sample-po-code-editor-labs/sample-po-code-editor-labs.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-diff\" title=\"PO Code Editor - Diff\">\n * <file name=\"sample-po-code-editor-diff/sample-po-code-editor-diff.component.html\"> </file>\n * <file name=\"sample-po-code-editor-diff/sample-po-code-editor-diff.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-terraform\" title=\"PO Code Editor - Terraform\">\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.component.html\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.component.ts\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.constant.ts\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.module.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-suggestion\" title=\"PO Code Editor Suggestion\">\n * <file name=\"sample-po-code-editor-suggestion/sample-po-code-editor-suggestion.component.html\"> </file>\n * <file name=\"sample-po-code-editor-suggestion/sample-po-code-editor-suggestion.component.ts\"> </file>\n * </example>\n */\n@Component({\n selector: 'po-code-editor',\n templateUrl: './po-code-editor.component.html',\n providers\n})\nexport class PoCodeEditorComponent extends PoCodeEditorBaseComponent implements AfterViewInit, DoCheck {\n @ViewChild('editorContainer', { static: true }) editorContainer: ElementRef;\n\n canLoad = false;\n\n constructor(\n private zone: NgZone,\n private el: ElementRef,\n private poCodeEditorSuggestionService: PoCodeEditorSuggestionService,\n private codeEditorRegister?: PoCodeEditorRegister\n ) {\n super();\n }\n\n /* istanbul ignore next */\n ngAfterViewInit(): void {\n if (loadedMonaco) {\n /* istanbul ignore next */\n loadPromise.then(() => {\n setTimeout(() => {\n if (this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n } else {\n this.canLoad = true;\n }\n });\n });\n } else {\n loadedMonaco = true;\n loadPromise = new Promise<void>((resolve: any) => {\n /* istanbul ignore next */\n const onGotAmdLoader: any = () => {\n (<any>window).require.config({ paths: { 'vs': './assets/monaco/vs' } });\n (<any>window).require(['vs/editor/editor.main'], () => {\n setTimeout(() => {\n if (this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n } else {\n this.canLoad = true;\n }\n resolve();\n });\n });\n };\n\n if (!(<any>window).require) {\n const loaderScript: HTMLScriptElement = document.createElement('script');\n loaderScript.type = 'text/javascript';\n loaderScript.src = './assets/monaco/vs/loader.js';\n loaderScript.addEventListener('load', onGotAmdLoader);\n document.body.appendChild(loaderScript);\n }\n });\n }\n }\n\n ngDoCheck() {\n if (this.canLoad && this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n this.canLoad = false;\n }\n }\n\n /* istanbul ignore next */\n monacoCreateModel(value: string) {\n return monaco.editor.createModel(value);\n }\n\n setValueInEditor() {\n if (this.showDiff) {\n setTimeout(() => {\n if (this.editor) {\n this.editor.setModel({\n original: this.monacoCreateModel(this.value),\n modified: this.monacoCreateModel(this.modifiedValue)\n });\n }\n });\n } else {\n setTimeout(() => {\n if (this.editor) {\n this.editor.setValue(this.value);\n }\n });\n }\n }\n\n setLanguage(language: string) {\n if (this.showDiff) {\n this.setMonacoLanguage(this.editor.getModel().original, language);\n this.setMonacoLanguage(this.editor.getModel().modified, language);\n } else {\n this.setMonacoLanguage(this.editor.getModel(), language);\n }\n }\n\n /* istanbul ignore next */\n setTheme(theme: string) {\n monaco.editor.setTheme(theme);\n }\n\n setReadOnly(readOnly: boolean) {\n this.editor.updateOptions({ readOnly: readOnly });\n }\n\n /* istanbul ignore next */\n setSuggestions(newSuggestions: Array<PoCodeEditorRegisterableSuggestion>, language = this.language) {\n if (!newSuggestions) {\n return;\n }\n\n const suggestions = this.poCodeEditorSuggestionService.getSuggestion(language, newSuggestions);\n\n monaco.languages.registerCompletionItemProvider(language, {\n provideCompletionItems: () => ({ suggestions })\n });\n }\n\n writeValue(value) {\n this.value = value && value instanceof Array ? value[0] : value;\n this.modifiedValue = value && value instanceof Array && value.length > 0 ? value[1] : '';\n this.setValueInEditor();\n }\n\n /* istanbul ignore next */\n private initMonaco(options: any): void {\n if (this.showDiff) {\n this.editor = monaco.editor.createDiffEditor(this.editorContainer.nativeElement, options);\n\n this.editor.setModel({\n original: monaco.editor.createModel(this.value),\n modified: monaco.editor.createModel(this.modifiedValue)\n });\n\n this.editor.onDidUpdateDiff((e: any) => {\n const original = this.editor.getModel().original.getValue();\n const modified = this.editor.getModel().modified.getValue();\n this.onChangePropagate([original, modified]);\n });\n } else {\n this.editor = monaco.editor.create(this.editorContainer.nativeElement, options);\n this.editor.setValue(this.value);\n this.editor.onDidChangeModelContent((e: any) => {\n const value = this.editor.getValue();\n this.onChangePropagate(value);\n this.zone.run(() => (this.value = value));\n });\n }\n setTimeout(() => {\n this.setLanguage(this.language);\n this.setSuggestions(this.suggestions);\n }, 500);\n }\n\n /* istanbul ignore next */\n private setMonacoLanguage(model, language) {\n monaco.editor.setModelLanguage(model, language);\n }\n\n private registerCustomLanguage() {\n if (this.codeEditorRegister.language) {\n monaco.languages.register({ id: this.codeEditorRegister.language });\n\n if (this.codeEditorRegister.options) {\n monaco.languages.setMonarchTokensProvider(this.codeEditorRegister.language, this.codeEditorRegister.options);\n }\n\n if (this.codeEditorRegister.suggestions) {\n this.setSuggestions(\n this.codeEditorRegister.suggestions.provideCompletionItems().suggestions,\n this.codeEditorRegister.language\n );\n }\n }\n }\n}\n","<div #editorContainer [style.height]=\"height\"></div>\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PoCodeEditorComponent } from './po-code-editor.component';\nimport { PoCodeEditorRegister } from './po-code-editor-register.service';\nimport { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';\n\n/**\n * @description\n *\n * Módulo do componente po-code-editor.\n */\n@NgModule({\n imports: [CommonModule],\n declarations: [PoCodeEditorComponent],\n exports: [PoCodeEditorComponent],\n providers: [PoCodeEditorRegister]\n})\nexport class PoCodeEditorModule {\n static forRegister(props: PoCodeEditorRegisterable): ModuleWithProviders<PoCodeEditorModule> {\n return {\n ngModule: PoCodeEditorModule,\n providers: [\n {\n provide: PoCodeEditorRegister,\n useValue: props\n }\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAC5D,MAA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,CAAC;oBAChC,SAAS,EAAE,CAAC,oBAAoB,CAAC;iBAClC;;;wFACY,kBAAkB,mBAJd,qBAAqB,aAD1B,YAAY,aAEZ,qBAAqB;;ACfjC;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Injectable, forwardRef, Component,
|
|
2
|
+
import { Directive, Input, Injectable, forwardRef, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
@@ -238,17 +238,56 @@ class PoCodeEditorBaseComponent {
|
|
|
238
238
|
return !!val;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
PoCodeEditorBaseComponent
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
241
|
+
PoCodeEditorBaseComponent.ɵfac = function PoCodeEditorBaseComponent_Factory(t) { return new (t || PoCodeEditorBaseComponent)(); };
|
|
242
|
+
PoCodeEditorBaseComponent.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PoCodeEditorBaseComponent, inputs: { language: ["p-language", "language"], readonly: ["p-readonly", "readonly"], showDiff: ["p-show-diff", "showDiff"], suggestions: ["p-suggestions", "suggestions"], theme: ["p-theme", "theme"], height: ["p-height", "height"] } });
|
|
243
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoCodeEditorBaseComponent, [{
|
|
244
|
+
type: Directive
|
|
245
|
+
}], null, { language: [{
|
|
246
|
+
type: Input,
|
|
247
|
+
args: ['p-language']
|
|
248
|
+
}], readonly: [{
|
|
249
|
+
type: Input,
|
|
250
|
+
args: ['p-readonly']
|
|
251
|
+
}], showDiff: [{
|
|
252
|
+
type: Input,
|
|
253
|
+
args: ['p-show-diff']
|
|
254
|
+
}], suggestions: [{
|
|
255
|
+
type: Input,
|
|
256
|
+
args: ['p-suggestions']
|
|
257
|
+
}], theme: [{
|
|
258
|
+
type: Input,
|
|
259
|
+
args: ['p-theme']
|
|
260
|
+
}], height: [{
|
|
261
|
+
type: Input,
|
|
262
|
+
args: ['p-height']
|
|
263
|
+
}] }); })();
|
|
264
|
+
|
|
265
|
+
class PoCodeEditorSuggestionService {
|
|
266
|
+
constructor() {
|
|
267
|
+
this.suggestions = {};
|
|
268
|
+
}
|
|
269
|
+
getSuggestion(language, newSuggestion) {
|
|
270
|
+
if (this.suggestions[language]) {
|
|
271
|
+
const deduplicateSuggestions = this.deduplicateSuggestions(this.suggestions[language], newSuggestion);
|
|
272
|
+
this.suggestions[language] = [...this.suggestions[language], ...deduplicateSuggestions];
|
|
273
|
+
return deduplicateSuggestions;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
return (this.suggestions[language] = [...newSuggestion]);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
deduplicateSuggestions(originalSuggestions, newSuggestions) {
|
|
280
|
+
return newSuggestions.filter(newItem => !originalSuggestions.find(originalItem => originalItem['label'] === newItem['label']));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
PoCodeEditorSuggestionService.ɵfac = function PoCodeEditorSuggestionService_Factory(t) { return new (t || PoCodeEditorSuggestionService)(); };
|
|
284
|
+
PoCodeEditorSuggestionService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PoCodeEditorSuggestionService, factory: PoCodeEditorSuggestionService.ɵfac, providedIn: 'root' });
|
|
285
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoCodeEditorSuggestionService, [{
|
|
286
|
+
type: Injectable,
|
|
287
|
+
args: [{
|
|
288
|
+
providedIn: 'root'
|
|
289
|
+
}]
|
|
290
|
+
}], function () { return []; }, null); })();
|
|
252
291
|
|
|
253
292
|
/**
|
|
254
293
|
* @description
|
|
@@ -308,36 +347,13 @@ PoCodeEditorBaseComponent.propDecorators = {
|
|
|
308
347
|
*/
|
|
309
348
|
class PoCodeEditorRegister {
|
|
310
349
|
}
|
|
311
|
-
PoCodeEditorRegister
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
constructor() {
|
|
317
|
-
this.suggestions = {};
|
|
318
|
-
}
|
|
319
|
-
getSuggestion(language, newSuggestion) {
|
|
320
|
-
if (this.suggestions[language]) {
|
|
321
|
-
const deduplicateSuggestions = this.deduplicateSuggestions(this.suggestions[language], newSuggestion);
|
|
322
|
-
this.suggestions[language] = [...this.suggestions[language], ...deduplicateSuggestions];
|
|
323
|
-
return deduplicateSuggestions;
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
return (this.suggestions[language] = [...newSuggestion]);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
deduplicateSuggestions(originalSuggestions, newSuggestions) {
|
|
330
|
-
return newSuggestions.filter(newItem => !originalSuggestions.find(originalItem => originalItem['label'] === newItem['label']));
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
PoCodeEditorSuggestionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PoCodeEditorSuggestionService_Factory() { return new PoCodeEditorSuggestionService(); }, token: PoCodeEditorSuggestionService, providedIn: "root" });
|
|
334
|
-
PoCodeEditorSuggestionService.decorators = [
|
|
335
|
-
{ type: Injectable, args: [{
|
|
336
|
-
providedIn: 'root'
|
|
337
|
-
},] }
|
|
338
|
-
];
|
|
339
|
-
PoCodeEditorSuggestionService.ctorParameters = () => [];
|
|
350
|
+
PoCodeEditorRegister.ɵfac = function PoCodeEditorRegister_Factory(t) { return new (t || PoCodeEditorRegister)(); };
|
|
351
|
+
PoCodeEditorRegister.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PoCodeEditorRegister, factory: PoCodeEditorRegister.ɵfac });
|
|
352
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoCodeEditorRegister, [{
|
|
353
|
+
type: Injectable
|
|
354
|
+
}], null, null); })();
|
|
340
355
|
|
|
356
|
+
const _c0 = ["editorContainer"];
|
|
341
357
|
// variáveis relacionadas ao Monaco
|
|
342
358
|
let loadedMonaco = false;
|
|
343
359
|
let loadPromise;
|
|
@@ -541,22 +557,24 @@ class PoCodeEditorComponent extends PoCodeEditorBaseComponent {
|
|
|
541
557
|
}
|
|
542
558
|
}
|
|
543
559
|
}
|
|
544
|
-
PoCodeEditorComponent
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
]
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
+
PoCodeEditorComponent.ɵfac = function PoCodeEditorComponent_Factory(t) { return new (t || PoCodeEditorComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(PoCodeEditorSuggestionService), i0.ɵɵdirectiveInject(PoCodeEditorRegister)); };
|
|
561
|
+
PoCodeEditorComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoCodeEditorComponent, selectors: [["po-code-editor"]], viewQuery: function PoCodeEditorComponent_Query(rf, ctx) { if (rf & 1) {
|
|
562
|
+
i0.ɵɵviewQuery(_c0, 7);
|
|
563
|
+
} if (rf & 2) {
|
|
564
|
+
let _t;
|
|
565
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.editorContainer = _t.first);
|
|
566
|
+
} }, features: [i0.ɵɵProvidersFeature(providers), i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["editorContainer", ""]], template: function PoCodeEditorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
567
|
+
i0.ɵɵelement(0, "div", null, 0);
|
|
568
|
+
} if (rf & 2) {
|
|
569
|
+
i0.ɵɵstyleProp("height", ctx.height);
|
|
570
|
+
} }, encapsulation: 2 });
|
|
571
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoCodeEditorComponent, [{
|
|
572
|
+
type: Component,
|
|
573
|
+
args: [{ selector: 'po-code-editor', providers: providers, template: "<div #editorContainer [style.height]=\"height\"></div>\n" }]
|
|
574
|
+
}], function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: PoCodeEditorSuggestionService }, { type: PoCodeEditorRegister }]; }, { editorContainer: [{
|
|
575
|
+
type: ViewChild,
|
|
576
|
+
args: ['editorContainer', { static: true }]
|
|
577
|
+
}] }); })();
|
|
560
578
|
|
|
561
579
|
/**
|
|
562
580
|
* @description
|
|
@@ -576,18 +594,23 @@ class PoCodeEditorModule {
|
|
|
576
594
|
};
|
|
577
595
|
}
|
|
578
596
|
}
|
|
579
|
-
PoCodeEditorModule
|
|
580
|
-
|
|
597
|
+
PoCodeEditorModule.ɵfac = function PoCodeEditorModule_Factory(t) { return new (t || PoCodeEditorModule)(); };
|
|
598
|
+
PoCodeEditorModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PoCodeEditorModule });
|
|
599
|
+
PoCodeEditorModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [PoCodeEditorRegister], imports: [[CommonModule]] });
|
|
600
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoCodeEditorModule, [{
|
|
601
|
+
type: NgModule,
|
|
602
|
+
args: [{
|
|
581
603
|
imports: [CommonModule],
|
|
582
604
|
declarations: [PoCodeEditorComponent],
|
|
583
605
|
exports: [PoCodeEditorComponent],
|
|
584
606
|
providers: [PoCodeEditorRegister]
|
|
585
|
-
}
|
|
586
|
-
];
|
|
607
|
+
}]
|
|
608
|
+
}], null, null); })();
|
|
609
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PoCodeEditorModule, { declarations: [PoCodeEditorComponent], imports: [CommonModule], exports: [PoCodeEditorComponent] }); })();
|
|
587
610
|
|
|
588
611
|
/**
|
|
589
612
|
* Generated bundle index. Do not edit.
|
|
590
613
|
*/
|
|
591
614
|
|
|
592
|
-
export { PoCodeEditorComponent, PoCodeEditorModule, PoCodeEditorRegister
|
|
593
|
-
//# sourceMappingURL=po-ui-ng-code-editor.
|
|
615
|
+
export { PoCodeEditorComponent, PoCodeEditorModule, PoCodeEditorRegister };
|
|
616
|
+
//# sourceMappingURL=po-ui-ng-code-editor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"po-ui-ng-code-editor.mjs","sources":["../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-base.component.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-suggestion.service.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.html","../../../projects/code-editor/src/lib/components/po-code-editor/po-code-editor.module.ts","../../../projects/code-editor/src/po-ui-ng-code-editor.ts"],"sourcesContent":["import { Input, Directive } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\n\nimport { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';\n\nconst PO_CODE_EDITOR_THEMES = ['vs-dark', 'vs', 'hc-black'];\nconst PO_CODE_EDITOR_THEME_DEFAULT = 'vs';\n\n/**\n * @description\n *\n * O `po-code-editor` é um componente para edição de código fonte baseado no Monaco Editor da Microsoft.\n *\n * Sendo assim, algumas configurações presentes no Monaco podem ser utilizadas aqui, como a escolha da linguagem\n * (utilizando o highlight syntax específico), escolha do tema e opção de diff, além de ser muito similar ao Visual\n * Studio Code, com autocomplete e fechamento automático de brackets.\n *\n * Este componente pode ser usado em qualquer situação que necessite de adição de códigos, como por exemplo, criar\n * receitas utilizando Terraform para gerenciar topologias.\n * É importante ressaltar que este não é um componente para edição de textos comuns.\n *\n * O [(ngModel)] deve ser usado para manipular o conteúdo do po-code-editor, ou seja, tanto para incluir um conteúdo quanto\n * para recuperar o conteúdo do po-code-editor, utiliza-se uma variável passada por [(ngModel)].\n *\n * #### Adicionando o pacote @po-ui/ng-code-editor\n *\n * Para instalar o pacote `po-code-editor` em sua aplicação execute:\n *\n * ```shell\n * ng add @po-ui/ng-code-editor\n * ```\n *\n * O comando `ng add` do `Angular CLI`:\n * - inclui o `po-code-editor` no seu projeto;\n * - adiciona o módulo `PoCodeEditorModule`:;\n *\n * ```\n * // app.module.ts\n * ...\n * import { PoModule } from '@po-ui/ng-components';\n * import { PoCodeEditorModule } from '@po-ui/ng-code-editor';\n * ...\n * @NgModule({\n * imports: [\n * ...\n * PoModule,\n * PoCodeEditorModule\n * ],\n * ...\n * })\n * export class AppModule { }\n * ```\n *\n * - adiciona o tema PO UI e também o *asset* do Monaco no arquivo `angular.json`, conforme abaixo:\n *\n * <pre ngNonBindable>\n * ...\n * \"assets\": [\n * { \"glob\": \"**/*\", \"input\": \"node_modules/monaco-editor/min\", \"output\": \"/assets/monaco/\" }\n * ],\n * \"styles\": [\n * \"./node_modules/@po-ui/style/css/po-theme-default.min.css\"\n * ]\n * ...\n * </pre>\n */\n@Directive()\nexport abstract class PoCodeEditorBaseComponent implements ControlValueAccessor {\n editor: any;\n modifiedValue: string = '';\n value: any = '';\n\n private _height: number = 150;\n private _language = 'plainText';\n private _readonly: boolean = false;\n private _showDiff: boolean = false;\n private _suggestions: Array<PoCodeEditorRegisterableSuggestion>;\n private _theme = PO_CODE_EDITOR_THEME_DEFAULT;\n\n /**\n * @optional\n *\n * @description\n *\n * Linguagem na qual será apresentado o código fonte.\n * Para saber quais são as linguagens compatíveis, consulte a documentação oficial do\n * [**Monaco Editor**](https://microsoft.github.io/monaco-editor/).\n *\n * Também é possível adicionar uma nova linguagem personalizada utilizando o serviço:\n * [**po-code-editor-register**](https://po-ui.io/documentation/po-code-editor-register?view=doc).\n *\n * @default `plainText`\n */\n @Input('p-language') set language(language: string) {\n this._language = language && language.length ? language.trim() : 'plainText';\n\n if (this.editor && this._language) {\n this.setLanguage(this._language);\n }\n }\n\n get language(): string {\n return this._language;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Indica se o editor será aberto em modo de leitura.\n *\n * Neste caso, não é possível editar o código inserido.\n *\n * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente.\n *\n * @default `false`\n */\n @Input('p-readonly') set readonly(readonly: boolean) {\n this._readonly = <any>readonly === '' ? true : this.convertToBoolean(readonly);\n\n if (this.editor) {\n this.setReadOnly(readonly);\n }\n }\n\n get readonly(): boolean {\n return this._readonly;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Indica se o editor será aberto em modo de comparação.\n *\n * Caso esteja habilitada esta opção, então o [(ngModel)] deverá ser passado como um array, cuja primeira opção deve\n * conter uma string com o código original e na segunda posição uma string código modificado para efeito de\n * comparação. Neste caso, o usuário conseguirá editar apenas o código modificado e isso refletirá na segunda posição\n * do array consequentemente.\n *\n * Obs: Esta propriedade não refletirá efeito se alterada após o carregamento do componente.\n *\n * @default `false`\n */\n @Input('p-show-diff') set showDiff(showDiff: boolean) {\n this._showDiff = <any>showDiff === '' ? true : this.convertToBoolean(showDiff);\n }\n\n get showDiff(): boolean {\n return this._showDiff;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Lista de sugestões usadas pelo autocomplete dentro do editor.\n *\n * Para visualizar a lista de sugestões use o comando `CTRL + SPACE`.\n *\n * Caso o editor esteja usando uma linguagem que já tenha uma lista de sugestões predefinida, o valor passado será adicionado\n * a lista preexistente, aumentando as opções para o usuário.\n *\n * Caso tenha mais de um editor da mesma linguagem na aplicação, as sugestões serão adicionadas para que todos os editores da mesma linguagem\n * tenham as mesmas sugestões.\n *\n * ```\n * <po-code-editor\n * [p-suggestions]=\"[{ label: 'po', insertText: 'Portinari UI' }, { label: 'ng', insertText: 'Angular' }]\">\n * </po-code-editor>\n * ```\n *\n * Ao fornecer uma lista de sugestões é possível acelerar a escrita de scripts pelos usuários.\n */\n @Input('p-suggestions') set suggestions(values: Array<PoCodeEditorRegisterableSuggestion>) {\n this._suggestions = values;\n\n if (this.editor && this._suggestions) {\n this.setSuggestions(this._suggestions);\n }\n }\n\n get suggestions(): Array<PoCodeEditorRegisterableSuggestion> {\n return this._suggestions;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Define um tema para o editor.\n *\n * Temas válidos:\n * - `vs-dark`\n * - `vs`\n * - `hc-black`\n *\n * É importante salientar que o tema será aplicados a todos os componentes po-code-editor existentes na tela,\n * ou seja, todas as instâncias do componente receberão o último tema atribuído ou o tema da última instância\n * criada.\n *\n * @default `vs`\n */\n @Input('p-theme') set theme(theme: string) {\n this._theme = PO_CODE_EDITOR_THEMES.includes(theme) ? theme : PO_CODE_EDITOR_THEME_DEFAULT;\n\n if (this.editor) {\n this.setTheme(theme);\n }\n }\n\n get theme(): string {\n return this._theme;\n }\n\n /**\n * @optional\n *\n * @description\n *\n * Define a altura do componente em pixels do po-code-editor.\n * Esta propriedade não poderá ser alterada após o componente ter sido iniciado.\n * A altura mínima é 150 pixels.\n */\n @Input('p-height') set height(height: string) {\n this._height = parseFloat(height) >= 150 ? parseFloat(height) : 150;\n }\n\n get height(): string {\n return `${this._height}px`;\n }\n\n /* istanbul ignore next */\n onTouched = (value: any) => {};\n /* istanbul ignore next */\n onChangePropagate = (value: any) => {};\n\n getOptions() {\n return { language: this.language, theme: this.theme, readOnly: this.readonly };\n }\n\n registerOnChange(fn: any): void {\n this.onChangePropagate = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n protected convertToBoolean(val: any): boolean {\n if (typeof val === 'string') {\n val = val.toLowerCase().trim();\n return val === 'true' || val === 'on' || val === '';\n }\n\n if (typeof val === 'number') {\n return val === 1;\n }\n\n return !!val;\n }\n\n abstract writeValue(value: any);\n\n abstract setLanguage(value: any);\n\n abstract setTheme(value: any);\n\n abstract setReadOnly(value: any);\n\n abstract setSuggestions(value: any);\n}\n","import { Injectable } from '@angular/core';\nimport {\n PoCodeEditorSuggestionList,\n PoCodeEditorRegisterableSuggestion\n} from './interfaces/po-code-editor-registerable-suggestion.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PoCodeEditorSuggestionService {\n private suggestions: PoCodeEditorSuggestionList = {};\n constructor() {}\n\n public getSuggestion(language: string, newSuggestion: Array<PoCodeEditorRegisterableSuggestion>) {\n if (this.suggestions[language]) {\n const deduplicateSuggestions = this.deduplicateSuggestions(this.suggestions[language], newSuggestion);\n this.suggestions[language] = [...this.suggestions[language], ...deduplicateSuggestions];\n return deduplicateSuggestions;\n } else {\n return (this.suggestions[language] = [...newSuggestion]);\n }\n }\n\n private deduplicateSuggestions(\n originalSuggestions: Array<PoCodeEditorRegisterableSuggestion>,\n newSuggestions: Array<PoCodeEditorRegisterableSuggestion>\n ) {\n return newSuggestions.filter(\n newItem => !originalSuggestions.find(originalItem => originalItem['label'] === newItem['label'])\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';\nimport { PoCodeEditorRegisterableOptions } from './interfaces/po-code-editor-registerable-options.interface';\nimport { PoCodeEditorRegisterableSuggestionType } from './interfaces/po-code-editor-registerable-suggestion.interface';\n\n/**\n * @description\n *\n * Wrapper para registro de sintaxes customizadas para o po-code-editor.\n *\n * Para utilização do serviço de idiomas **PoCodeEditorRegister**,\n * deve-se importar o módulo PoCodeEditorModule mesmo já tendo importado\n * o módulo PoModule.\n * Na importação opcionalmente pode ser invocado o método **forRegister** informando um objeto para configuração.\n *\n * Exemplo de configuração:\n * ```\n * import { PoCodeEditorModule, PoCodeEditorRegisterable } from '@po-ui/ng-code-editor';\n *\n * declare const monaco: any; // Importante para usar configurações com tipos definidos pelo Monaco\n *\n * // A função `provideCompletionItems` precisa ser exportada para ser compatível com AOT.\n * export function provideCompletionItems() {\n * const suggestions = [{\n * label: 'terraform',\n * insertText: '#terraform language'\n * }, {\n * label: 'server',\n * insertText: 'server ${1:ip}'\n * }];\n *\n * return { suggestions: suggestions };\n * }\n *\n * const customEditor: PoCodeEditorRegisterable = {\n * language: 'terraform',\n * options: {\n * keywords: ['resource', 'provider', 'variable', 'output', 'module', 'true', 'false'],\n * operators: ['{', '}', '(', ')', '[', ']', '?', ':'],\n * symbols: /[=><!~?:&|+\\-*\\/\\^%]+/,\n * escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n * tokenizer: {\n * ...\n * }\n * },\n * suggestions: { provideCompletionItems: provideCompletionItems }\n * };\n *\n * @NgModule({\n * declarations: [],\n * imports: [\n * PoModule,\n * PoCodeEditorModule.forRegister(customEditor)\n * ],\n * bootstrap: [AppComponent]\n * })\n * ```\n *\n * > As configurações para o registro de uma nova sintaxe no Monaco code editor podem ser encontradas em\n * > [**Monaco Editor**](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages).\n */\n@Injectable()\nexport class PoCodeEditorRegister implements PoCodeEditorRegisterable {\n /** Sintaxe a ser registrada. */\n language: string;\n\n /** Opções da sintaxe para registro no po-code-editor. */\n options: PoCodeEditorRegisterableOptions;\n\n /** Lista de sugestões para a função de autocomplete (CTRL + SPACE). */\n suggestions?: PoCodeEditorRegisterableSuggestionType;\n}\n","import { AfterViewInit, Component, DoCheck, ElementRef, forwardRef, NgZone, ViewChild, Provider } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { PoCodeEditorBaseComponent } from './po-code-editor-base.component';\nimport { PoCodeEditorRegister } from './po-code-editor-register.service';\nimport { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';\nimport { PoCodeEditorSuggestionService } from './po-code-editor-suggestion.service';\n\n// variáveis relacionadas ao Monaco\nlet loadedMonaco: boolean = false;\nlet loadPromise: Promise<void>;\n\ndeclare const monaco: any;\n// eslint-disable-next-line\ndeclare const require: any;\n\n/* istanbul ignore next */\nconst providers: Array<Provider> = [\n {\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line\n useExisting: forwardRef(() => PoCodeEditorComponent),\n multi: true\n }\n];\n\n/**\n * @docsExtends PoCodeEditorBaseComponent\n *\n * @example\n *\n * <example name=\"po-code-editor-basic\" title=\"PO Code Editor Basic\">\n * <file name=\"sample-po-code-editor-basic/sample-po-code-editor-basic.component.html\"> </file>\n * <file name=\"sample-po-code-editor-basic/sample-po-code-editor-basic.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-labs\" title=\"PO Code Editor Labs\">\n * <file name=\"sample-po-code-editor-labs/sample-po-code-editor-labs.component.html\"> </file>\n * <file name=\"sample-po-code-editor-labs/sample-po-code-editor-labs.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-diff\" title=\"PO Code Editor - Diff\">\n * <file name=\"sample-po-code-editor-diff/sample-po-code-editor-diff.component.html\"> </file>\n * <file name=\"sample-po-code-editor-diff/sample-po-code-editor-diff.component.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-terraform\" title=\"PO Code Editor - Terraform\">\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.component.html\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.component.ts\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.constant.ts\"> </file>\n * <file name=\"sample-po-code-editor-terraform/sample-po-code-editor-terraform.module.ts\"> </file>\n * </example>\n *\n * <example name=\"po-code-editor-suggestion\" title=\"PO Code Editor Suggestion\">\n * <file name=\"sample-po-code-editor-suggestion/sample-po-code-editor-suggestion.component.html\"> </file>\n * <file name=\"sample-po-code-editor-suggestion/sample-po-code-editor-suggestion.component.ts\"> </file>\n * </example>\n */\n@Component({\n selector: 'po-code-editor',\n templateUrl: './po-code-editor.component.html',\n providers\n})\nexport class PoCodeEditorComponent extends PoCodeEditorBaseComponent implements AfterViewInit, DoCheck {\n @ViewChild('editorContainer', { static: true }) editorContainer: ElementRef;\n\n canLoad = false;\n\n constructor(\n private zone: NgZone,\n private el: ElementRef,\n private poCodeEditorSuggestionService: PoCodeEditorSuggestionService,\n private codeEditorRegister?: PoCodeEditorRegister\n ) {\n super();\n }\n\n /* istanbul ignore next */\n ngAfterViewInit(): void {\n if (loadedMonaco) {\n /* istanbul ignore next */\n loadPromise.then(() => {\n setTimeout(() => {\n if (this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n } else {\n this.canLoad = true;\n }\n });\n });\n } else {\n loadedMonaco = true;\n loadPromise = new Promise<void>((resolve: any) => {\n /* istanbul ignore next */\n const onGotAmdLoader: any = () => {\n (<any>window).require.config({ paths: { 'vs': './assets/monaco/vs' } });\n (<any>window).require(['vs/editor/editor.main'], () => {\n setTimeout(() => {\n if (this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n } else {\n this.canLoad = true;\n }\n resolve();\n });\n });\n };\n\n if (!(<any>window).require) {\n const loaderScript: HTMLScriptElement = document.createElement('script');\n loaderScript.type = 'text/javascript';\n loaderScript.src = './assets/monaco/vs/loader.js';\n loaderScript.addEventListener('load', onGotAmdLoader);\n document.body.appendChild(loaderScript);\n }\n });\n }\n }\n\n ngDoCheck() {\n if (this.canLoad && this.el.nativeElement.offsetWidth) {\n this.registerCustomLanguage();\n this.initMonaco(this.getOptions());\n this.canLoad = false;\n }\n }\n\n /* istanbul ignore next */\n monacoCreateModel(value: string) {\n return monaco.editor.createModel(value);\n }\n\n setValueInEditor() {\n if (this.showDiff) {\n setTimeout(() => {\n if (this.editor) {\n this.editor.setModel({\n original: this.monacoCreateModel(this.value),\n modified: this.monacoCreateModel(this.modifiedValue)\n });\n }\n });\n } else {\n setTimeout(() => {\n if (this.editor) {\n this.editor.setValue(this.value);\n }\n });\n }\n }\n\n setLanguage(language: string) {\n if (this.showDiff) {\n this.setMonacoLanguage(this.editor.getModel().original, language);\n this.setMonacoLanguage(this.editor.getModel().modified, language);\n } else {\n this.setMonacoLanguage(this.editor.getModel(), language);\n }\n }\n\n /* istanbul ignore next */\n setTheme(theme: string) {\n monaco.editor.setTheme(theme);\n }\n\n setReadOnly(readOnly: boolean) {\n this.editor.updateOptions({ readOnly: readOnly });\n }\n\n /* istanbul ignore next */\n setSuggestions(newSuggestions: Array<PoCodeEditorRegisterableSuggestion>, language = this.language) {\n if (!newSuggestions) {\n return;\n }\n\n const suggestions = this.poCodeEditorSuggestionService.getSuggestion(language, newSuggestions);\n\n monaco.languages.registerCompletionItemProvider(language, {\n provideCompletionItems: () => ({ suggestions })\n });\n }\n\n writeValue(value) {\n this.value = value && value instanceof Array ? value[0] : value;\n this.modifiedValue = value && value instanceof Array && value.length > 0 ? value[1] : '';\n this.setValueInEditor();\n }\n\n /* istanbul ignore next */\n private initMonaco(options: any): void {\n if (this.showDiff) {\n this.editor = monaco.editor.createDiffEditor(this.editorContainer.nativeElement, options);\n\n this.editor.setModel({\n original: monaco.editor.createModel(this.value),\n modified: monaco.editor.createModel(this.modifiedValue)\n });\n\n this.editor.onDidUpdateDiff((e: any) => {\n const original = this.editor.getModel().original.getValue();\n const modified = this.editor.getModel().modified.getValue();\n this.onChangePropagate([original, modified]);\n });\n } else {\n this.editor = monaco.editor.create(this.editorContainer.nativeElement, options);\n this.editor.setValue(this.value);\n this.editor.onDidChangeModelContent((e: any) => {\n const value = this.editor.getValue();\n this.onChangePropagate(value);\n this.zone.run(() => (this.value = value));\n });\n }\n setTimeout(() => {\n this.setLanguage(this.language);\n this.setSuggestions(this.suggestions);\n }, 500);\n }\n\n /* istanbul ignore next */\n private setMonacoLanguage(model, language) {\n monaco.editor.setModelLanguage(model, language);\n }\n\n private registerCustomLanguage() {\n if (this.codeEditorRegister.language) {\n monaco.languages.register({ id: this.codeEditorRegister.language });\n\n if (this.codeEditorRegister.options) {\n monaco.languages.setMonarchTokensProvider(this.codeEditorRegister.language, this.codeEditorRegister.options);\n }\n\n if (this.codeEditorRegister.suggestions) {\n this.setSuggestions(\n this.codeEditorRegister.suggestions.provideCompletionItems().suggestions,\n this.codeEditorRegister.language\n );\n }\n }\n }\n}\n","<div #editorContainer [style.height]=\"height\"></div>\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PoCodeEditorComponent } from './po-code-editor.component';\nimport { PoCodeEditorRegister } from './po-code-editor-register.service';\nimport { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';\n\n/**\n * @description\n *\n * Módulo do componente po-code-editor.\n */\n@NgModule({\n imports: [CommonModule],\n declarations: [PoCodeEditorComponent],\n exports: [PoCodeEditorComponent],\n providers: [PoCodeEditorRegister]\n})\nexport class PoCodeEditorModule {\n static forRegister(props: PoCodeEditorRegisterable): ModuleWithProviders<PoCodeEditorModule> {\n return {\n ngModule: PoCodeEditorModule,\n providers: [\n {\n provide: PoCodeEditorRegister,\n useValue: props\n }\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAKA,MAAM,qBAAqB,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAC5D,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2DsB,yBAAyB;IAD/C;QAGE,kBAAa,GAAW,EAAE,CAAC;QAC3B,UAAK,GAAQ,EAAE,CAAC;QAER,YAAO,GAAW,GAAG,CAAC;QACtB,cAAS,GAAG,WAAW,CAAC;QACxB,cAAS,GAAY,KAAK,CAAC;QAC3B,c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AAkB,CAAC,OAAO,CAAC,CAAC;aAC9G;YAED,IAAI,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE;gBACvC,IAAI,CAAC,cAAc,CACjB,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC,WAAW,EACxE,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CACjC,CAAC;aACH;SACF;KACF;;0FAjLU,qBAAqB;wEAArB,qBAAqB;;;;;0CAFhC,SAAS;QC7DX,+BAAoD;;QAA9B,oCAAuB;;uFD+DhC,qBAAqB;cALjC,SAAS;2BACE,gBAAgB,aAE1B,SAAS;2JAGuC,eAAe;kBAA9D,SAAS;mBAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AEzDhD;;;;;MAWa,kBAAkB;IAC7B,OAAO,WAAW,CAAC,KAA+B;QAChD,OAAO;YACL,QAAQ,EAAE,kBAAkB;YAC5B,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,oBAAoB;oBAC7B,QAAQ,EAAE,KAAK;iBAChB;aACF;SACF,CAAC;KACH;;oFAXU,kBAAkB;oEAAlB,kBAAkB;yEAFlB,CAAC,oBAAoB,CAAC,YAHxB,CAAC,YAAY,CAAC;uFAKZ,kBAAkB;cAN9B,QAAQ;eAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,qBAAqB,CAAC;gBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;gBAChC,SAAS,EAAE,CAAC,oBAAoB,CAAC;aAClC;;wFACY,kBAAkB,mBAJd,qBAAqB,aAD1B,YAAY,aAEZ,qBAAqB;;ACfjC;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ControlValueAccessor } from '@angular/forms';
|
|
2
2
|
import { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* @description
|
|
5
6
|
*
|
|
@@ -188,4 +189,6 @@ export declare abstract class PoCodeEditorBaseComponent implements ControlValueA
|
|
|
188
189
|
abstract setTheme(value: any): any;
|
|
189
190
|
abstract setReadOnly(value: any): any;
|
|
190
191
|
abstract setSuggestions(value: any): any;
|
|
192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoCodeEditorBaseComponent, never>;
|
|
193
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PoCodeEditorBaseComponent, never, never, { "language": "p-language"; "readonly": "p-readonly"; "showDiff": "p-show-diff"; "suggestions": "p-suggestions"; "theme": "p-theme"; "height": "p-height"; }, {}, never>;
|
|
191
194
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';
|
|
2
2
|
import { PoCodeEditorRegisterableOptions } from './interfaces/po-code-editor-registerable-options.interface';
|
|
3
3
|
import { PoCodeEditorRegisterableSuggestionType } from './interfaces/po-code-editor-registerable-suggestion.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* @description
|
|
6
7
|
*
|
|
@@ -64,4 +65,6 @@ export declare class PoCodeEditorRegister implements PoCodeEditorRegisterable {
|
|
|
64
65
|
options: PoCodeEditorRegisterableOptions;
|
|
65
66
|
/** Lista de sugestões para a função de autocomplete (CTRL + SPACE). */
|
|
66
67
|
suggestions?: PoCodeEditorRegisterableSuggestionType;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoCodeEditorRegister, never>;
|
|
69
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PoCodeEditorRegister>;
|
|
67
70
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class PoCodeEditorSuggestionService {
|
|
3
4
|
private suggestions;
|
|
4
5
|
constructor();
|
|
5
6
|
getSuggestion(language: string, newSuggestion: Array<PoCodeEditorRegisterableSuggestion>): PoCodeEditorRegisterableSuggestion[];
|
|
6
7
|
private deduplicateSuggestions;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoCodeEditorSuggestionService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PoCodeEditorSuggestionService>;
|
|
7
10
|
}
|
|
@@ -3,6 +3,7 @@ import { PoCodeEditorBaseComponent } from './po-code-editor-base.component';
|
|
|
3
3
|
import { PoCodeEditorRegister } from './po-code-editor-register.service';
|
|
4
4
|
import { PoCodeEditorRegisterableSuggestion } from './interfaces/po-code-editor-registerable-suggestion.interface';
|
|
5
5
|
import { PoCodeEditorSuggestionService } from './po-code-editor-suggestion.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* @docsExtends PoCodeEditorBaseComponent
|
|
8
9
|
*
|
|
@@ -55,4 +56,6 @@ export declare class PoCodeEditorComponent extends PoCodeEditorBaseComponent imp
|
|
|
55
56
|
private initMonaco;
|
|
56
57
|
private setMonacoLanguage;
|
|
57
58
|
private registerCustomLanguage;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoCodeEditorComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PoCodeEditorComponent, "po-code-editor", never, {}, {}, never, never>;
|
|
58
61
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerable.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./po-code-editor.component";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
3
6
|
/**
|
|
4
7
|
* @description
|
|
5
8
|
*
|
|
@@ -7,4 +10,7 @@ import { PoCodeEditorRegisterable } from './interfaces/po-code-editor-registerab
|
|
|
7
10
|
*/
|
|
8
11
|
export declare class PoCodeEditorModule {
|
|
9
12
|
static forRegister(props: PoCodeEditorRegisterable): ModuleWithProviders<PoCodeEditorModule>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PoCodeEditorModule, never>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PoCodeEditorModule, [typeof i1.PoCodeEditorComponent], [typeof i2.CommonModule], [typeof i1.PoCodeEditorComponent]>;
|
|
15
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PoCodeEditorModule>;
|
|
10
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-code-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"description": "PO UI - Code Editor",
|
|
6
6
|
"author": "PO UI",
|
|
@@ -12,27 +12,39 @@
|
|
|
12
12
|
},
|
|
13
13
|
"schematics": "./schematics/collection.json",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@po-ui/ng-components": "
|
|
16
|
-
"@po-ui/ng-schematics": "
|
|
15
|
+
"@po-ui/ng-components": "6.0.0",
|
|
16
|
+
"@po-ui/ng-schematics": "6.0.0",
|
|
17
17
|
"monaco-editor": "0.24.0",
|
|
18
18
|
"core-js": "^3.13.0",
|
|
19
19
|
"intl": "^1.2.5",
|
|
20
|
-
"tslib": "^2.
|
|
20
|
+
"tslib": "^2.3.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@angular/common": "^
|
|
24
|
-
"@angular/core": "^
|
|
25
|
-
"@angular/forms": "^
|
|
26
|
-
"@po-ui/ng-components": "
|
|
23
|
+
"@angular/common": "^13.0.2",
|
|
24
|
+
"@angular/core": "^13.0.2",
|
|
25
|
+
"@angular/forms": "^13.0.2",
|
|
26
|
+
"@po-ui/ng-components": "6.0.0",
|
|
27
27
|
"monaco-editor": "0.24.0",
|
|
28
28
|
"zone.js": "~0.11.4"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"fesm2015": "fesm2015/po-ui-ng-code-editor.
|
|
30
|
+
"module": "fesm2015/po-ui-ng-code-editor.mjs",
|
|
31
|
+
"es2020": "fesm2020/po-ui-ng-code-editor.mjs",
|
|
32
|
+
"esm2020": "esm2020/po-ui-ng-code-editor.mjs",
|
|
33
|
+
"fesm2020": "fesm2020/po-ui-ng-code-editor.mjs",
|
|
34
|
+
"fesm2015": "fesm2015/po-ui-ng-code-editor.mjs",
|
|
35
35
|
"typings": "po-ui-ng-code-editor.d.ts",
|
|
36
|
-
"
|
|
36
|
+
"exports": {
|
|
37
|
+
"./package.json": {
|
|
38
|
+
"default": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./po-ui-ng-code-editor.d.ts",
|
|
42
|
+
"esm2020": "./esm2020/po-ui-ng-code-editor.mjs",
|
|
43
|
+
"es2020": "./fesm2020/po-ui-ng-code-editor.mjs",
|
|
44
|
+
"es2015": "./fesm2015/po-ui-ng-code-editor.mjs",
|
|
45
|
+
"node": "./fesm2015/po-ui-ng-code-editor.mjs",
|
|
46
|
+
"default": "./fesm2020/po-ui-ng-code-editor.mjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
37
49
|
"sideEffects": false
|
|
38
50
|
}
|
|
Binary file
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
+
/// <amd-module name="@po-ui/ng-code-editor" />
|
|
4
5
|
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';
|
|
@@ -21,17 +21,17 @@ const poCodeEditorMonacoAsset = { glob: '**/*', input: 'node_modules/monaco-edit
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
function default_1(options) {
|
|
24
|
-
return schematics_1.chain([
|
|
24
|
+
return (0, schematics_1.chain)([
|
|
25
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)
|
|
26
|
+
(0, module_1.addModuleImportToRootModule)(options, poCodeEditorModuleName, poCodeEditorModuleSourcePath),
|
|
27
|
+
(0, build_target_options_1.configuringBuildTargets)(options, 'styles', poThemeStylePath),
|
|
28
|
+
(0, build_target_options_1.configuringBuildTargets)(options, 'assets', poCodeEditorMonacoAsset)
|
|
29
29
|
]);
|
|
30
30
|
}
|
|
31
31
|
exports.default = default_1;
|
|
32
32
|
function addPoPackageAndInstall() {
|
|
33
33
|
return (tree, context) => {
|
|
34
|
-
package_config_1.addPackageToPackageJson(tree, '@po-ui/ng-code-editor', '
|
|
34
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-code-editor', '6.0.0');
|
|
35
35
|
// install packages
|
|
36
36
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/code-editor/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAAA,2DAAiF;AACjF,4DAA0E;AAE1E,wEAA8E;AAC9E,+DAAiF;AACjF,yGAAyG;AAEzG,gEAAgE;AAChE,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,MAAM,4BAA4B,GAAG,uBAAuB,CAAC;AAE7D,4EAA4E;AAC5E,MAAM,gBAAgB,GAAG,0D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