From 5ed6e091e33fbfd6f525f27f3798cfb711cd1ab3 Mon Sep 17 00:00:00 2001 From: Ghislain Beaulac Date: Mon, 24 Sep 2018 12:25:21 -0400 Subject: [PATCH] prepare official release 2.0.1 --- .angular-cli.json | 1 - dist.tgz | Bin 8469 -> 19738 bytes dist/README.md | 21 +- dist/angular-markdown-editor.d.ts | 2 + dist/angular-markdown-editor.metadata.json | 2 +- dist/bundles/angular-markdown-editor.umd.js | 140 ++++++++++++- .../angular-markdown-editor.umd.js.map | 20 +- .../angular-markdown-editor.umd.min.js | 2 +- .../angular-markdown-editor.umd.min.js.map | 96 ++++++++- dist/esm2015/angular-markdown-editor.js | 198 +++++++++++++++++- dist/esm2015/angular-markdown-editor.js.map | 8 +- dist/esm5/angular-markdown-editor.js | 135 +++++++++++- dist/esm5/angular-markdown-editor.js.map | 8 +- .../angular-markdown-editor.component.d.ts | 36 ++++ .../angular-markdown-editor.module.d.ts | 10 + dist/lib/angular-markdown-editor/index.d.ts | 2 + dist/package.json | 4 +- package.json | 7 +- readme.md | 21 +- src/app/reactive/reactive.component.ts | 4 +- src/assets/.gitkeep | 0 src/assets/i18n/en.json | 56 ----- src/assets/i18n/fr.json | 57 ----- .../angular-markdown-editor.component.ts | 2 +- .../angular-markdown-editor.module.ts | 12 +- .../global-editor-options.ts | 1 - src/lib/angular-markdown-editor/index.ts | 2 + vscode.code-workspace | 11 - 28 files changed, 685 insertions(+), 173 deletions(-) create mode 100644 dist/lib/angular-markdown-editor/angular-markdown-editor.component.d.ts create mode 100644 dist/lib/angular-markdown-editor/angular-markdown-editor.module.d.ts delete mode 100644 src/assets/.gitkeep delete mode 100644 src/assets/i18n/en.json delete mode 100644 src/assets/i18n/fr.json delete mode 100644 vscode.code-workspace diff --git a/.angular-cli.json b/.angular-cli.json index c6bcd69..c2b6235 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -8,7 +8,6 @@ "root": "src", "outDir": "dist-demo", "assets": [ - "assets", "favicon.ico" ], "index": "index.html",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/README.md index 084d591..8ee98be 100644 --- a/dist/README.md +++ b/dist/README.md @@ -65,6 +65,19 @@ For example, below we are adding the highlight for `C#`, `JavaScript` and `TypeS ], ``` +### Import Module +```typescript +import { AngularMarkdownEditorModule } from 'angular-markdown-editor'; + +@NgModule({ + declarations: [], + imports: [AngularMarkdownEditorModule] + + // or pre-define global configuration using the forRoot + // imports: [AngularMarkdownEditorModule.forRoot({ iconlibrary: 'fa' })] +}); +``` + ### Input attributes You can pass the following input attribute: @@ -76,7 +89,7 @@ You can pass the following input attribute: | **locale** | EditorLocale | no | locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries | ### Global Options -The library comes with it's own Global Editor Options, these propertoes can be overriden at any by the `options` attribute. Click to see the [Global Options]() defined. +The library comes with it's own Global Editor Options, these propertoes can be overriden at any by the `options` attribute. Click to see the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts) defined. ### Event Hooks You can hook to any of the [Bootstrap Markdown Editor Events](http://www.codingdrama.com/bootstrap-markdown/) through 2 ways, just choose the one you prefer: @@ -148,7 +161,7 @@ export class MyComponent { - onShow ### API - Editor Methods -The editor API is quite dense and I will not list the entire set of methods, but you can see the entire list [here](). +The editor API is quite dense and I will not list the entire set of methods, but you can see the entire list from the [Editor Method Interface](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/models/editorMethod.interface.ts). To call any of the Editor Methods, you will have to first get a reference to the Editor's instance which you can get from the `onShow` callback. Get the Editor's instance through the `onShow`, via the Custom Event (from the View) or Editor Option callback (just choose the one you prefer). Below shows how to get it through the latter option. @@ -201,10 +214,10 @@ export class TestComponent implements OnInit { ``` ### Additional Editor Buttons -I really thought that some buttons were missing to go a great job (~~Strikethrough~~ & **Table**). So I added them directly in the [Global Options](). If you want to add your own, then just look at how it was done in the [Global Options]() and read the section `additionalButtons` of [Bootstrap Markdown](http://www.codingdrama.com/bootstrap-markdown/) website. +I really thought that some buttons were missing to go a great job (~~Strikethrough~~ & **Table**). So I added them directly in the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts). If you want to add your own, then just look at how it was done in the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts) and read the section `additionalButtons` of [Bootstrap Markdown](http://www.codingdrama.com/bootstrap-markdown/) website. ### Adding Locale -You can add a locale to the editor but passing a `locale` object (and bind it in the View) which contain a `language` and the dictionary of words used by the editor. The entire list of words can be seen in the example below. So for example, if we want to add French locale, we will do the following (you can see [demo code]()): +You can add a locale to the editor but passing a `locale` object (and bind it in the View) which contain a `language` and the dictionary of words used by the editor. The entire list of words can be seen in the example below. So for example, if we want to add French locale, we will do the following (you can see [demo code](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/app/template/template.component.ts)): ###### View ```html diff --git a/dist/angular-markdown-editor.d.ts b/dist/angular-markdown-editor.d.ts index 7417cc8..a5c24e3 100644 --- a/dist/angular-markdown-editor.d.ts +++ b/dist/angular-markdown-editor.d.ts @@ -2,3 +2,5 @@ * Generated bundle index. Do not edit. */ export * from './public_api'; +export { MARKDOWN_EDITOR_VALUE_ACCESSOR as ɵa } from './lib/angular-markdown-editor/angular-markdown-editor.component'; +export { EditorOption as ɵb } from './lib/angular-markdown-editor/models'; diff --git a/dist/angular-markdown-editor.metadata.json b/dist/angular-markdown-editor.metadata.json index a5dafba..1550273 100644 --- a/dist/angular-markdown-editor.metadata.json +++ b/dist/angular-markdown-editor.metadata.json @@ -1 +1 @@ -{"__symbolic":"module","version":4,"metadata":{"Dictionary":{"__symbolic":"interface"},"EditorInstance":{"__symbolic":"interface"},"EditorLocale":{"__symbolic":"interface"},"EditorMethod":{"__symbolic":"interface"},"EditorOption":{"__symbolic":"interface"},"Icon":{"__symbolic":"interface"},"IconSet":{"__symbolic":"interface"},"MarkdownEditorConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}]}}},"origins":{"Dictionary":"./lib/angular-markdown-editor/models/dictionary.interface","EditorInstance":"./lib/angular-markdown-editor/models/editorInstance.interface","EditorLocale":"./lib/angular-markdown-editor/models/editorLocale.interface","EditorMethod":"./lib/angular-markdown-editor/models/editorMethod.interface","EditorOption":"./lib/angular-markdown-editor/models/editorOption.interface","Icon":"./lib/angular-markdown-editor/models/icon.interface","IconSet":"./lib/angular-markdown-editor/models/iconSet.interface","MarkdownEditorConfig":"./lib/angular-markdown-editor/markdown-editor-config"},"importAs":"angular-markdown-editor"} \ No newline at end of file +{"__symbolic":"module","version":4,"metadata":{"ɵa":{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"AngularMarkdownEditorComponent"},"multi":true},"Dictionary":{"__symbolic":"interface"},"EditorInstance":{"__symbolic":"interface"},"EditorLocale":{"__symbolic":"interface"},"EditorMethod":{"__symbolic":"interface"},"EditorOption":{"__symbolic":"interface"},"Icon":{"__symbolic":"interface"},"IconSet":{"__symbolic":"interface"},"MarkdownEditorConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor"}]}},"AngularMarkdownEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"moduleId":"angulaMarkdownEditor","selector":"angular-markdown-editor","template":"","providers":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{"elm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["markdownEditorElm"]}]}],"locale":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"textareaId":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"rows":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":["config"]}]],"parameters":[{"__symbolic":"reference","name":"ɵb"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"addLocaleSet":[{"__symbolic":"method"}],"initialization":[{"__symbolic":"method"}],"hookToEditorEvents":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"dispatchCustomEvent":[{"__symbolic":"method"}]}},"AngularMarkdownEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"AngularMarkdownEditorComponent"}],"exports":[{"__symbolic":"reference","name":"AngularMarkdownEditorComponent"}],"entryComponents":[{"__symbolic":"reference","name":"AngularMarkdownEditorComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"AngularMarkdownEditorModule"},"providers":[{"provide":"config","useValue":{"__symbolic":"reference","name":"config"}}]}}}}},"origins":{"ɵa":"./lib/angular-markdown-editor/angular-markdown-editor.component","Dictionary":"./lib/angular-markdown-editor/models/dictionary.interface","EditorInstance":"./lib/angular-markdown-editor/models/editorInstance.interface","EditorLocale":"./lib/angular-markdown-editor/models/editorLocale.interface","EditorMethod":"./lib/angular-markdown-editor/models/editorMethod.interface","EditorOption":"./lib/angular-markdown-editor/models/editorOption.interface","Icon":"./lib/angular-markdown-editor/models/icon.interface","IconSet":"./lib/angular-markdown-editor/models/iconSet.interface","MarkdownEditorConfig":"./lib/angular-markdown-editor/markdown-editor-config","AngularMarkdownEditorComponent":"./lib/angular-markdown-editor/angular-markdown-editor.component","AngularMarkdownEditorModule":"./lib/angular-markdown-editor/angular-markdown-editor.module","ɵb":"./lib/angular-markdown-editor/models"},"importAs":"angular-markdown-editor"} \ No newline at end of file diff --git a/dist/bundles/angular-markdown-editor.umd.js b/dist/bundles/angular-markdown-editor.umd.js index f7ef6c5..f8534d9 100644 --- a/dist/bundles/angular-markdown-editor.umd.js +++ b/dist/bundles/angular-markdown-editor.umd.js @@ -1,8 +1,8 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define('angular-markdown-editor', ['exports'], factory) : - (factory((global['angular-markdown-editor'] = {}))); -}(this, (function (exports) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common')) : + typeof define === 'function' && define.amd ? define('angular-markdown-editor', ['exports', '@angular/core', '@angular/forms', '@angular/common'], factory) : + (factory((global['angular-markdown-editor'] = {}),global.ng.core,global.ng.forms,global.ng.common)); +}(this, (function (exports,core,forms,common) { 'use strict'; var GlobalEditorOptions = { autofocus: false, @@ -85,8 +85,140 @@ var MarkdownEditorConfig = /** @class */ (function () { } return MarkdownEditorConfig; }()); +var MARKDOWN_EDITOR_VALUE_ACCESSOR = { + provide: forms.NG_VALUE_ACCESSOR, + useExisting: core.forwardRef(function () { return AngularMarkdownEditorComponent; }), + multi: true +}; +var AngularMarkdownEditorComponent = /** @class */ (function () { + function AngularMarkdownEditorComponent(forRootConfig) { + this.forRootConfig = forRootConfig; + this.rows = 10; + this.onModelChange = function () { }; + this.onModelTouched = function () { }; + } + Object.defineProperty(AngularMarkdownEditorComponent.prototype, "locale", { + set: function (locale) { + this.addLocaleSet(locale); + }, + enumerable: true, + configurable: true + }); + AngularMarkdownEditorComponent.prototype.ngAfterViewInit = function () { + this.initialization(); + }; + AngularMarkdownEditorComponent.prototype.addLocaleSet = function (editorLocale) { + if (!editorLocale) { + return; + } + if (Array.isArray(editorLocale)) { + editorLocale.forEach(function (locale) { return $.fn.markdown.messages[locale.language] = locale.dictionary; }); + } + else { + $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary; + } + }; + AngularMarkdownEditorComponent.prototype.initialization = function () { + var _this = this; + var markdownDefaultOptions = $.fn.markdown.defaults; + var options = Object.assign({}, markdownDefaultOptions, GlobalEditorOptions, this.forRootConfig, this.options); + this.hookToEditorEvents(options); + var previousOnChange = options.onChange; + options.onChange = function (e) { + _this.onModelChange(e && e.getContent && e.getContent()); + if (typeof previousOnChange === 'function') { + previousOnChange(e); + } + }; + $("#" + this.textareaId).markdown(options); + }; + AngularMarkdownEditorComponent.prototype.hookToEditorEvents = function (options) { + var _this = this; + var _loop_1 = function (prop) { + if (options.hasOwnProperty(prop) && prop.startsWith('on')) { + var previousEvent_1 = options[prop]; + options[prop] = function (e) { + _this.dispatchCustomEvent(prop, { eventData: e }); + if (typeof previousEvent_1 === 'function') { + previousEvent_1(e); + } + }; + } + }; + for (var prop in options) { + _loop_1(prop); + } + }; + AngularMarkdownEditorComponent.prototype.writeValue = function (value) { + this.value = value; + if (this.value) { + this.elm.nativeElement.value = this.value; + } + }; + AngularMarkdownEditorComponent.prototype.registerOnChange = function (fn) { + this.onModelChange = fn; + }; + AngularMarkdownEditorComponent.prototype.registerOnTouched = function (fn) { + this.onModelTouched = fn; + }; + AngularMarkdownEditorComponent.prototype.dispatchCustomEvent = function (eventName, data, isBubbling, isCancelable) { + if (isBubbling === void 0) { isBubbling = true; } + if (isCancelable === void 0) { isCancelable = true; } + var eventInit = { bubbles: isBubbling, cancelable: isCancelable }; + if (data) { + eventInit.detail = data; + } + return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit)); + }; + return AngularMarkdownEditorComponent; +}()); +AngularMarkdownEditorComponent.decorators = [ + { type: core.Injectable }, + { type: core.Component, args: [{ + moduleId: 'angulaMarkdownEditor', + selector: 'angular-markdown-editor', + template: '', + providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR] + },] }, +]; +AngularMarkdownEditorComponent.ctorParameters = function () { return [ + { type: undefined, decorators: [{ type: core.Inject, args: ['config',] },] }, +]; }; +AngularMarkdownEditorComponent.propDecorators = { + "elm": [{ type: core.ViewChild, args: ['markdownEditorElm',] },], + "locale": [{ type: core.Input },], + "textareaId": [{ type: core.Input },], + "options": [{ type: core.Input },], + "rows": [{ type: core.Input },], +}; +var AngularMarkdownEditorModule = /** @class */ (function () { + function AngularMarkdownEditorModule() { + } + AngularMarkdownEditorModule.forRoot = function (config) { + if (config === void 0) { config = {}; } + return { + ngModule: AngularMarkdownEditorModule, + providers: [ + { provide: 'config', useValue: config } + ] + }; + }; + return AngularMarkdownEditorModule; +}()); +AngularMarkdownEditorModule.decorators = [ + { type: core.NgModule, args: [{ + imports: [common.CommonModule], + declarations: [AngularMarkdownEditorComponent], + exports: [AngularMarkdownEditorComponent], + entryComponents: [AngularMarkdownEditorComponent] + },] }, +]; +AngularMarkdownEditorModule.ctorParameters = function () { return []; }; exports.MarkdownEditorConfig = MarkdownEditorConfig; +exports.AngularMarkdownEditorComponent = AngularMarkdownEditorComponent; +exports.AngularMarkdownEditorModule = AngularMarkdownEditorModule; +exports.ɵa = MARKDOWN_EDITOR_VALUE_ACCESSOR; Object.defineProperty(exports, '__esModule', { value: true }); diff --git a/dist/bundles/angular-markdown-editor.umd.js.map b/dist/bundles/angular-markdown-editor.umd.js.map index 7086a80..340bb13 100644 --- a/dist/bundles/angular-markdown-editor.umd.js.map +++ b/dist/bundles/angular-markdown-editor.umd.js.map @@ -2,13 +2,27 @@ "version": 3, "file": "angular-markdown-editor.umd.js", "sources": [ + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.module.ts", + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.component.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/markdown-editor-config.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/global-editor-options.ts" ], "sourcesContent": [ + "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularMarkdownEditorComponent } from './angular-markdown-editor.component';\nimport { EditorOption } from './models';\n\n\n@NgModule({\n imports: [CommonModule],\n declarations: [AngularMarkdownEditorComponent],\n exports: [AngularMarkdownEditorComponent],\n entryComponents: [AngularMarkdownEditorComponent]\n})\nexport class AngularMarkdownEditorModule {\n static forRoot(config: EditorOption = {}) {\n return {\n ngModule: AngularMarkdownEditorModule,\n providers: [\n { provide: 'config', useValue: config }\n ]\n };\n }\n}\n", + "import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Injectable, Input, ViewChild } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorLocale, EditorOption } from './models';\nimport { GlobalEditorOptions } from './global-editor-options';\n\ndeclare var $: any;\n\nexport const MARKDOWN_EDITOR_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AngularMarkdownEditorComponent),\n multi: true\n};\n\n@Injectable()\n@Component({\n moduleId: 'angulaMarkdownEditor',\n selector: 'angular-markdown-editor',\n template: '',\n providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR]\n})\nexport class AngularMarkdownEditorComponent implements AfterViewInit {\n @ViewChild('markdownEditorElm') elm: ElementRef;\n\n /** Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries */\n @Input()\n set locale(locale: EditorLocale | EditorLocale[]) {\n this.addLocaleSet(locale);\n }\n\n /** Id of the textarea DOM element used by the lib */\n @Input() textareaId: string;\n\n /** Markdown Editor Options to pass to the element */\n @Input() options?: EditorOption;\n\n /** Number of rows for the textarea */\n @Input() rows = 10;\n\n public value: any | any[];\n public onModelChange: Function = () => {};\n public onModelTouched: Function = () => {};\n\n constructor(@Inject('config') private forRootConfig: EditorOption) {}\n\n ngAfterViewInit() {\n this.initialization();\n }\n\n addLocaleSet(editorLocale: EditorLocale | EditorLocale[]) {\n if (!editorLocale) {\n return;\n }\n if (Array.isArray(editorLocale)) {\n editorLocale.forEach((locale: EditorLocale) => $.fn.markdown.messages[locale.language] = locale.dictionary);\n } else {\n $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary;\n }\n }\n\n initialization() {\n // get all default options to get the entire list of onEvent so that we can attach Dispatch Custom Event to them\n // we also merge these with the options, and pass these merged options to the hookToEditorEvents() method to cover all onEvent callbacks\n const markdownDefaultOptions = $.fn.markdown.defaults;\n\n // re-hook new events that were optionally defined in the options\n // merge the options, the order matters (last options on the right have higher priorities)\n const options = { ...markdownDefaultOptions, ...GlobalEditorOptions, ...this.forRootConfig, ...this.options };\n\n // hook all events to respective callbacks\n // 1- could be coming from a Dispatched Event in the View:: (onX)=\"do()\"\n // 2- or from editor option callback in the Component:: const options = { onX: () => do() }\n this.hookToEditorEvents(options);\n\n // hook to the onChange event to update our model\n // however we don't want to override the previous callback, so we will run that one to if exists\n const previousOnChange = options.onChange;\n options.onChange = (e) => {\n this.onModelChange(e && e.getContent && e.getContent());\n if (typeof previousOnChange === 'function') {\n previousOnChange(e);\n }\n };\n\n // finally create the editor\n $(`#${this.textareaId}`).markdown(options);\n }\n\n /**\n * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)=\"doSomething($event.detail.eventData)\"\n * @param editor options\n */\n hookToEditorEvents(options) {\n for (const prop in options) {\n if (options.hasOwnProperty(prop) && prop.startsWith('on')) {\n const previousEvent = options[prop];\n\n // on Callback triggered\n options[prop] = (e) => {\n // Dispatch a Custom Event, so that the (onX)=\"do()\" from the View works\n this.dispatchCustomEvent(prop, { eventData: e });\n\n // if an event was passed through the options (instead of dispatch), and is not empty function, then we need to run it as well\n // basically we don't want the Dispatch Custom Event (onX)=\"do()\" to override the ones passed directly in the editor option callbacks\n if (typeof previousEvent === 'function') {\n previousEvent(e);\n }\n };\n }\n }\n }\n\n /**\n * Write value to the native element\n * @param value string\n */\n writeValue(value: string): void {\n this.value = value;\n\n // preset values in the DOM element\n if (this.value) {\n this.elm.nativeElement.value = this.value;\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n /** Dispatch of Custom Event, which by default will bubble & is cancelable */\n private dispatchCustomEvent(eventName: string, data?: any, isBubbling: boolean = true, isCancelable: boolean = true) {\n const eventInit: CustomEventInit = { bubbles: isBubbling, cancelable: isCancelable };\n if (data) {\n eventInit.detail = data;\n }\n return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit));\n }\n}\n", "import { GlobalEditorOptions } from './global-editor-options';\n\nexport class MarkdownEditorConfig {\n options: any;\n\n constructor() {\n this.options = GlobalEditorOptions;\n }\n}\n", - "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n // additionalButtons: [],\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" + "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" ], - "names": [], - "mappings": ";;;;;;ACEA,IAAa,mBAAmB,GAAiB;IAE/C,SAAS,EAAE,KAAK;IAChB,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,OAAO;IACpB,YAAY,EAAE,QAAQ;IACtB,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE;QACjB,CAAC;gBACD,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,CAAC;wBACL,IAAI,EAAE,kBAAkB;wBACxB,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE;4BACJ,EAAE,EAAE,qBAAqB;4BACzB,KAAK,EAAE,2BAA2B;yBACnC;wBACD,QAAQ,EAAE,UAAC,CAAC,EAAlB;4BAEQ,IAAI,KAAK,CAAC;4BACV,IAAI,MAAM,CAAC;4BACX,IAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;4BAClC,IAAM,OAAO,GAAG,CAAC,CAAC,UAAU,EAA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AgD;kCACpD,8CAA8C;kCAC9C,8CAA8C;kCAC9C,8CAA8C;kCAC9C,2CAA2C,CAAC;4BAGhD,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;4BAC1B,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;4BAGxB,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;yBAC/C;qBACF,CAAC;aACH,CAAC;KACH;CACF,CAAD;ADxFA,IAAA,oBAAA,kBAAA,YAAA;IAKE,SAAF,oBAAA,GAAA;QACI,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC;KACpC;IACH,OAAA,oBAAC,CAAD;CAAC,EAAD,CAAA;;;;;;;;;;;;" + "names": [ + "CommonModule", + "NgModule", + "Input", + "ViewChild", + "Inject", + "Component", + "Injectable", + "forwardRef", + "NG_VALUE_ACCESSOR" + ], + "mappings": ";;;;;;AGEA,IAAa,mBAAmB,GAAiB;IAC/C,SAAS,EAAE,KAAK;IAChB,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,OAAO;IACpB,YAAY,EAAE,QAAQ;IACtB,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE;QACjB,CAAC;gBACD,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,CAAC;wBACL,IAAI,EAAE,kBAAkB;wBACxB,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE;4BACJ,EAAE,EAAE,qBAAqB;4BACzB,KAAK,EAAE,2BAA2B;yBACnC;wBACD,QAAQ,EAAE,UAAC,CAAC,EAAlB;4BAEQ,IAAI,KAAK,CAAC;4BACV,IAAI,MAAM,CAAC;4BACX,IAAM,QAAQ,G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AR,EAAA;;ADpCA,IAAA,2BAAA,kBAAA,YAAA;IAAA,SAAA,2BAAA,GAAA;;IAaS,2BAAT,CAAA,OAAgB,GAAd,UAAe,MAAyB,EAA1C;QAAiB,IAAjB,MAAA,KAAA,KAAA,CAAA,EAAiB,EAAA,MAAjB,GAAA,EAA0C,CAA1C,EAAA;QACI,OAAO;YACL,QAAQ,EAAE,2BAA2B;YACrC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;aACxC;SACF,CAAC;KACH,CAAH;;;;IAdA,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAACD,mBAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,8BAA8B,CAAC;gBAC9C,OAAO,EAAE,CAAC,8BAA8B,CAAC;gBACzC,eAAe,EAAE,CAAC,8BAA8B,CAAC;aAClD,EAAD,EAAA;;;;;;;;;;;;;;;;;" } diff --git a/dist/bundles/angular-markdown-editor.umd.min.js b/dist/bundles/angular-markdown-editor.umd.min.js index 6e83568..c3a981c 100644 --- a/dist/bundles/angular-markdown-editor.umd.min.js +++ b/dist/bundles/angular-markdown-editor.umd.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("angular-markdown-editor",["exports"],t):t(e["angular-markdown-editor"]={})}(this,function(e){"use strict";var t={autofocus:!1,disabledButtons:[],dropZoneOptions:null,enableDropDataUri:!1,footer:"",height:"inherit",hiddenButtons:[],hideable:!1,iconlibrary:"glyph",initialstate:"editor",language:"fr",additionalButtons:[[{name:"groupFont",data:[{name:"cmdStrikethrough",toggle:!1,title:"Strikethrough",icon:{fa:"fa fa-strikethrough",glyph:"glyphicon glyphicon-minus"},callback:function(e){var t,n,o=e.getSelection(),i=e.getContent();t=0===o.length?e.__localize("strikethrough"):o.text,"~~"===i.substr(o.start-2,2)&&"~~"===i.substr(o.end,2)?(e.setSelection(o.start-2,o.end+2),e.replaceSelection(t),n=o.start-2):(e.replaceSelection("~~"+t+"~~"),n=o.start+2),e.setSelection(n,n+t.length)}}]},{name:"groupMisc",data:[{name:"cmdTable",toggle:!1,title:"Table",icon:{fa:"fa fa-table",glyph:"glyphicon glyphicon-th"},callback:function(e){var t,n,o=e.getSelection();t="\n| Tables | Are | Cool | \n| ------------- |:-------------:| -----:| \n| col 3 is | right-aligned | $1600 | \n| col 2 is | centered | $12 | \n| zebra stripes | are neat | $1 |",e.replaceSelection(t),n=o.start,e.setSelection(n,n+t.length)}}]}]]},n=function(){this.options=t};e.MarkdownEditorConfig=n,Object.defineProperty(e,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-markdown-editor",["exports","@angular/core","@angular/forms","@angular/common"],e):e(t["angular-markdown-editor"]={},t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,e,o,n){"use strict";var r={autofocus:!1,disabledButtons:[],dropZoneOptions:null,enableDropDataUri:!1,footer:"",height:"inherit",hiddenButtons:[],hideable:!1,iconlibrary:"glyph",initialstate:"editor",language:"fr",additionalButtons:[[{name:"groupFont",data:[{name:"cmdStrikethrough",toggle:!1,title:"Strikethrough",icon:{fa:"fa fa-strikethrough",glyph:"glyphicon glyphicon-minus"},callback:function(t){var e,o,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("strikethrough"):n.text,"~~"===r.substr(n.start-2,2)&&"~~"===r.substr(n.end,2)?(t.setSelection(n.start-2,n.end+2),t.replaceSelection(e),o=n.start-2):(t.replaceSelection("~~"+e+"~~"),o=n.start+2),t.setSelection(o,o+e.length)}}]},{name:"groupMisc",data:[{name:"cmdTable",toggle:!1,title:"Table",icon:{fa:"fa fa-table",glyph:"glyphicon glyphicon-th"},callback:function(t){var e,o,n=t.getSelection();e="\n| Tables | Are | Cool | \n| ------------- |:-------------:| -----:| \n| col 3 is | right-aligned | $1600 | \n| col 2 is | centered | $12 | \n| zebra stripes | are neat | $1 |",t.replaceSelection(e),o=n.start,t.setSelection(o,o+e.length)}}]}]]},a=function(){this.options=r},i={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return s}),multi:!0},s=function(){function t(t){this.forRootConfig=t,this.rows=10,this.onModelChange=function(){},this.onModelTouched=function(){}}return Object.defineProperty(t.prototype,"locale",{set:function(t){this.addLocaleSet(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.initialization()},t.prototype.addLocaleSet=function(t){t&&(Array.isArray(t)?t.forEach(function(t){return $.fn.markdown.messages[t.language]=t.dictionary}):$.fn.markdown.messages[t.language]=t.dictionary)},t.prototype.initialization=function(){var e=this,t=$.fn.markdown.defaults,o=Object.assign({},t,r,this.forRootConfig,this.options);this.hookToEditorEvents(o);var n=o.onChange;o.onChange=function(t){e.onModelChange(t&&t.getContent&&t.getContent()),"function"==typeof n&&n(t)},$("#"+this.textareaId).markdown(o)},t.prototype.hookToEditorEvents=function(t){var n=this,e=function(e){if(t.hasOwnProperty(e)&&e.startsWith("on")){var o=t[e];t[e]=function(t){n.dispatchCustomEvent(e,{eventData:t}),"function"==typeof o&&o(t)}}};for(var o in t)e(o)},t.prototype.writeValue=function(t){this.value=t,this.value&&(this.elm.nativeElement.value=this.value)},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.dispatchCustomEvent=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=!0);var r={bubbles:o,cancelable:n};return e&&(r.detail=e),this.elm.nativeElement.dispatchEvent(new CustomEvent(t,r))},t}();s.decorators=[{type:e.Injectable},{type:e.Component,args:[{moduleId:"angulaMarkdownEditor",selector:"angular-markdown-editor",template:'',providers:[i]}]}],s.ctorParameters=function(){return[{type:undefined,decorators:[{type:e.Inject,args:["config"]}]}]},s.propDecorators={elm:[{type:e.ViewChild,args:["markdownEditorElm"]}],locale:[{type:e.Input}],textareaId:[{type:e.Input}],options:[{type:e.Input}],rows:[{type:e.Input}]};var l=function(){function e(){}return e.forRoot=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[{provide:"config",useValue:t}]}},e}();l.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],declarations:[s],exports:[s],entryComponents:[s]}]}],l.ctorParameters=function(){return[]},t.MarkdownEditorConfig=a,t.AngularMarkdownEditorComponent=s,t.AngularMarkdownEditorModule=l,t.ɵa=i,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=angular-markdown-editor.umd.min.js.map diff --git a/dist/bundles/angular-markdown-editor.umd.min.js.map b/dist/bundles/angular-markdown-editor.umd.min.js.map index 69b11f0..5bbf7ba 100644 --- a/dist/bundles/angular-markdown-editor.umd.min.js.map +++ b/dist/bundles/angular-markdown-editor.umd.min.js.map @@ -3,11 +3,15 @@ "file": "angular-markdown-editor.umd.min.js", "sources": [ "ng://angular-markdown-editor/out/lib/angular-markdown-editor/global-editor-options.ts", - "ng://angular-markdown-editor/out/lib/angular-markdown-editor/markdown-editor-config.ts" + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/markdown-editor-config.ts", + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.component.ts", + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.module.ts" ], "sourcesContent": [ - "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n // additionalButtons: [],\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n", - "import { GlobalEditorOptions } from './global-editor-options';\n\nexport class MarkdownEditorConfig {\n options: any;\n\n constructor() {\n this.options = GlobalEditorOptions;\n }\n}\n" + "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n", + "import { GlobalEditorOptions } from './global-editor-options';\n\nexport class MarkdownEditorConfig {\n options: any;\n\n constructor() {\n this.options = GlobalEditorOptions;\n }\n}\n", + "import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Injectable, Input, ViewChild } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorLocale, EditorOption } from './models';\nimport { GlobalEditorOptions } from './global-editor-options';\n\ndeclare var $: any;\n\nexport const MARKDOWN_EDITOR_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AngularMarkdownEditorComponent),\n multi: true\n};\n\n@Injectable()\n@Component({\n moduleId: 'angulaMarkdownEditor',\n selector: 'angular-markdown-editor',\n template: '',\n providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR]\n})\nexport class AngularMarkdownEditorComponent implements AfterViewInit {\n @ViewChild('markdownEditorElm') elm: ElementRef;\n\n /** Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries */\n @Input()\n set locale(locale: EditorLocale | EditorLocale[]) {\n this.addLocaleSet(locale);\n }\n\n /** Id of the textarea DOM element used by the lib */\n @Input() textareaId: string;\n\n /** Markdown Editor Options to pass to the element */\n @Input() options?: EditorOption;\n\n /** Number of rows for the textarea */\n @Input() rows = 10;\n\n public value: any | any[];\n public onModelChange: Function = () => {};\n public onModelTouched: Function = () => {};\n\n constructor(@Inject('config') private forRootConfig: EditorOption) {}\n\n ngAfterViewInit() {\n this.initialization();\n }\n\n addLocaleSet(editorLocale: EditorLocale | EditorLocale[]) {\n if (!editorLocale) {\n return;\n }\n if (Array.isArray(editorLocale)) {\n editorLocale.forEach((locale: EditorLocale) => $.fn.markdown.messages[locale.language] = locale.dictionary);\n } else {\n $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary;\n }\n }\n\n initialization() {\n // get all default options to get the entire list of onEvent so that we can attach Dispatch Custom Event to them\n // we also merge these with the options, and pass these merged options to the hookToEditorEvents() method to cover all onEvent callbacks\n const markdownDefaultOptions = $.fn.markdown.defaults;\n\n // re-hook new events that were optionally defined in the options\n // merge the options, the order matters (last options on the right have higher priorities)\n const options = { ...markdownDefaultOptions, ...GlobalEditorOptions, ...this.forRootConfig, ...this.options };\n\n // hook all events to respective callbacks\n // 1- could be coming from a Dispatched Event in the View:: (onX)=\"do()\"\n // 2- or from editor option callback in the Component:: const options = { onX: () => do() }\n this.hookToEditorEvents(options);\n\n // hook to the onChange event to update our model\n // however we don't want to override the previous callback, so we will run that one to if exists\n const previousOnChange = options.onChange;\n options.onChange = (e) => {\n this.onModelChange(e && e.getContent && e.getContent());\n if (typeof previousOnChange === 'function') {\n previousOnChange(e);\n }\n };\n\n // finally create the editor\n $(`#${this.textareaId}`).markdown(options);\n }\n\n /**\n * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)=\"doSomething($event.detail.eventData)\"\n * @param editor options\n */\n hookToEditorEvents(options) {\n for (const prop in options) {\n if (options.hasOwnProperty(prop) && prop.startsWith('on')) {\n const previousEvent = options[prop];\n\n // on Callback triggered\n options[prop] = (e) => {\n // Dispatch a Custom Event, so that the (onX)=\"do()\" from the View works\n this.dispatchCustomEvent(prop, { eventData: e });\n\n // if an event was passed through the options (instead of dispatch), and is not empty function, then we need to run it as well\n // basically we don't want the Dispatch Custom Event (onX)=\"do()\" to override the ones passed directly in the editor option callbacks\n if (typeof previousEvent === 'function') {\n previousEvent(e);\n }\n };\n }\n }\n }\n\n /**\n * Write value to the native element\n * @param value string\n */\n writeValue(value: string): void {\n this.value = value;\n\n // preset values in the DOM element\n if (this.value) {\n this.elm.nativeElement.value = this.value;\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n /** Dispatch of Custom Event, which by default will bubble & is cancelable */\n private dispatchCustomEvent(eventName: string, data?: any, isBubbling: boolean = true, isCancelable: boolean = true) {\n const eventInit: CustomEventInit = { bubbles: isBubbling, cancelable: isCancelable };\n if (data) {\n eventInit.detail = data;\n }\n return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit));\n }\n}\n", + "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularMarkdownEditorComponent } from './angular-markdown-editor.component';\nimport { EditorOption } from './models';\n\n\n@NgModule({\n imports: [CommonModule],\n declarations: [AngularMarkdownEditorComponent],\n exports: [AngularMarkdownEditorComponent],\n entryComponents: [AngularMarkdownEditorComponent]\n})\nexport class AngularMarkdownEditorModule {\n static forRoot(config: EditorOption = {}) {\n return {\n ngModule: AngularMarkdownEditorModule,\n providers: [\n { provide: 'config', useValue: config }\n ]\n };\n }\n}\n" ], "names": [ "GlobalEditorOptions", @@ -48,7 +52,89 @@ "replaceSelection", "MarkdownEditorConfig", "this", - "options" + "options", + "MARKDOWN_EDITOR_VALUE_ACCESSOR", + "provide", + "NG_VALUE_ACCESSOR", + "useExisting", + "forwardRef", + "AngularMarkdownEditorComponent", + "multi", + "forRootConfig", + "rows", + "onModelChange", + "onModelTouched", + "Object", + "defineProperty", + "prototype", + "set", + "locale", + "addLocaleSet", + "ngAfterViewInit", + "initialization", + "editorLocale", + "Array", + "isArray", + "forEach", + "$", + "fn", + "markdown", + "messages", + "dictionary", + "_this", + "markdownDefaultOptions", + "defaults", + "assign", + "hookToEditorEvents", + "previousOnChange", + "onChange", + "textareaId", + "_loop_1", + "prop", + "hasOwnProperty", + "startsWith", + "previousEvent_1", + "dispatchCustomEvent", + "eventData", + "writeValue", + "value", + "elm", + "nativeElement", + "registerOnChange", + "registerOnTouched", + "eventName", + "isBubbling", + "isCancelable", + "eventInit", + "bubbles", + "cancelable", + "detail", + "dispatchEvent", + "CustomEvent", + "type", + "Injectable", + "Component", + "args", + "moduleId", + "selector", + "template", + "providers", + "undefined", + "decorators", + "Inject", + "ViewChild", + "Input", + "AngularMarkdownEditorModule", + "forRoot", + "config", + "ngModule", + "useValue", + "NgModule", + "imports", + "CommonModule", + "declarations", + "exports", + "entryComponents" ], - "mappings": "uOAEA,IAAaA,EAAoC,CAE/CC,WAAW,EACXC,gBAAiB,GACjBC,gBAAiB,KACjBC,mBAAmB,EACnBC,OAAQ,GACRC,OAAQ,UACRC,cAAe,GACfC,UAAU,EACVC,YAAa,QACbC,aAAc,SACdC,SAAU,KACVC,kBAAmB,CACjB,CAAC,CACDC,KAAM,YACNC,KAAM,CAAC,CACLD,KAAM,mBACNE,QAAQ,EACRC,MAAO,gBACPC,KAAM,CAC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E,iBAPA,CAAAM,KAACC,EAAAA,YACD,CAAAD,KAACE,EAAAA,UAADC,KAAA,CAAW,CACTC,SAAU,uBACVC,SAAU,0BACVC,SAAU,6HACVC,UAAW,CAACjE,0CAwBd,CAAA0D,KAAAQ,UAAAC,WAAA,CAAA,CAAAT,KAAeU,EAAAA,OAAfP,KAAA,CAAsB,iCArBtBhB,IAAA,CAAA,CAAAa,KAAGW,EAAAA,UAAHR,KAAA,CAAa,uBAGb9C,OAAA,CAAA,CAAA2C,KAAGY,EAAAA,QAMHnC,WAAA,CAAA,CAAAuB,KAAGY,EAAAA,QAGHvE,QAAA,CAAA,CAAA2D,KAAGY,EAAAA,QAGH9D,KAAA,CAAA,CAAAkD,KAAGY,EAAAA,SCpCH,IAAAC,EAAA,WAAA,SAAAA,YAaSA,EAATC,QAAE,SAAeC,GACb,YADJ,IAAAA,IAAiBA,EAAjB,IACW,CACLC,SAAUH,EACVN,UAAW,CACT,CAAEhE,QAAS,SAAU0E,SAAUF,QAjBvC,iBAMA,CAAAf,KAACkB,EAAAA,SAADf,KAAA,CAAU,CACRgB,QAAS,CAACC,EAAAA,cACVC,aAAc,CAAC1E,GACf2E,QAAS,CAAC3E,GACV4E,gBAAiB,CAAC5E" } diff --git a/dist/esm2015/angular-markdown-editor.js b/dist/esm2015/angular-markdown-editor.js index db90c60..957fba7 100644 --- a/dist/esm2015/angular-markdown-editor.js +++ b/dist/esm2015/angular-markdown-editor.js @@ -1,9 +1,12 @@ +import { Component, forwardRef, Inject, Injectable, Input, ViewChild, NgModule } from '@angular/core'; +import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { CommonModule } from '@angular/common'; + /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ const GlobalEditorOptions = { - // additionalButtons: [], autofocus: false, disabledButtons: [], dropZoneOptions: null, @@ -96,6 +99,197 @@ class MarkdownEditorConfig { } } +/** + * @fileoverview added by tsickle + * @suppress {checkTypes} checked by tsc + */ +const MARKDOWN_EDITOR_VALUE_ACCESSOR = { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => AngularMarkdownEditorComponent), + multi: true +}; +class AngularMarkdownEditorComponent { + /** + * @param {?} forRootConfig + */ + constructor(forRootConfig) { + this.forRootConfig = forRootConfig; + /** + * Number of rows for the textarea + */ + this.rows = 10; + this.onModelChange = () => { }; + this.onModelTouched = () => { }; + } + /** + * Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries + * @param {?} locale + * @return {?} + */ + set locale(locale) { + this.addLocaleSet(locale); + } + /** + * @return {?} + */ + ngAfterViewInit() { + this.initialization(); + } + /** + * @param {?} editorLocale + * @return {?} + */ + addLocaleSet(editorLocale) { + if (!editorLocale) { + return; + } + if (Array.isArray(editorLocale)) { + editorLocale.forEach((locale) => $.fn.markdown.messages[locale.language] = locale.dictionary); + } + else { + $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary; + } + } + /** + * @return {?} + */ + initialization() { + // get all default options to get the entire list of onEvent so that we can attach Dispatch Custom Event to them + // we also merge these with the options, and pass these merged options to the hookToEditorEvents() method to cover all onEvent callbacks + const /** @type {?} */ markdownDefaultOptions = $.fn.markdown.defaults; + // re-hook new events that were optionally defined in the options + // merge the options, the order matters (last options on the right have higher priorities) + const /** @type {?} */ options = Object.assign({}, markdownDefaultOptions, GlobalEditorOptions, this.forRootConfig, this.options); + // hook all events to respective callbacks + // 1- could be coming from a Dispatched Event in the View:: (onX)="do()" + // 2- or from editor option callback in the Component:: const options = { onX: () => do() } + this.hookToEditorEvents(options); + // hook to the onChange event to update our model + // however we don't want to override the previous callback, so we will run that one to if exists + const /** @type {?} */ previousOnChange = options.onChange; + options.onChange = (e) => { + this.onModelChange(e && e.getContent && e.getContent()); + if (typeof previousOnChange === 'function') { + previousOnChange(e); + } + }; + // finally create the editor + $(`#${this.textareaId}`).markdown(options); + } + /** + * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)="doSomething($event.detail.eventData)" + * @param {?} options + * @return {?} + */ + hookToEditorEvents(options) { + for (const /** @type {?} */ prop in options) { + if (options.hasOwnProperty(prop) && prop.startsWith('on')) { + const /** @type {?} */ previousEvent = options[prop]; + // on Callback triggered + options[prop] = (e) => { + // Dispatch a Custom Event, so that the (onX)="do()" from the View works + this.dispatchCustomEvent(prop, { eventData: e }); + // if an event was passed through the options (instead of dispatch), and is not empty function, then we need to run it as well + // basically we don't want the Dispatch Custom Event (onX)="do()" to override the ones passed directly in the editor option callbacks + if (typeof previousEvent === 'function') { + previousEvent(e); + } + }; + } + } + } + /** + * Write value to the native element + * @param {?} value string + * @return {?} + */ + writeValue(value) { + this.value = value; + // preset values in the DOM element + if (this.value) { + this.elm.nativeElement.value = this.value; + } + } + /** + * @param {?} fn + * @return {?} + */ + registerOnChange(fn) { + this.onModelChange = fn; + } + /** + * @param {?} fn + * @return {?} + */ + registerOnTouched(fn) { + this.onModelTouched = fn; + } + /** + * Dispatch of Custom Event, which by default will bubble & is cancelable + * @param {?} eventName + * @param {?=} data + * @param {?=} isBubbling + * @param {?=} isCancelable + * @return {?} + */ + dispatchCustomEvent(eventName, data, isBubbling = true, isCancelable = true) { + const /** @type {?} */ eventInit = { bubbles: isBubbling, cancelable: isCancelable }; + if (data) { + eventInit.detail = data; + } + return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit)); + } +} +AngularMarkdownEditorComponent.decorators = [ + { type: Injectable }, + { type: Component, args: [{ + moduleId: 'angulaMarkdownEditor', + selector: 'angular-markdown-editor', + template: '', + providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR] + },] }, +]; +/** @nocollapse */ +AngularMarkdownEditorComponent.ctorParameters = () => [ + { type: undefined, decorators: [{ type: Inject, args: ['config',] },] }, +]; +AngularMarkdownEditorComponent.propDecorators = { + "elm": [{ type: ViewChild, args: ['markdownEditorElm',] },], + "locale": [{ type: Input },], + "textareaId": [{ type: Input },], + "options": [{ type: Input },], + "rows": [{ type: Input },], +}; + +/** + * @fileoverview added by tsickle + * @suppress {checkTypes} checked by tsc + */ +class AngularMarkdownEditorModule { + /** + * @param {?=} config + * @return {?} + */ + static forRoot(config = {}) { + return { + ngModule: AngularMarkdownEditorModule, + providers: [ + { provide: 'config', useValue: config } + ] + }; + } +} +AngularMarkdownEditorModule.decorators = [ + { type: NgModule, args: [{ + imports: [CommonModule], + declarations: [AngularMarkdownEditorComponent], + exports: [AngularMarkdownEditorComponent], + entryComponents: [AngularMarkdownEditorComponent] + },] }, +]; +/** @nocollapse */ +AngularMarkdownEditorModule.ctorParameters = () => []; + /** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc @@ -115,5 +309,5 @@ class MarkdownEditorConfig { * Generated bundle index. Do not edit. */ -export { MarkdownEditorConfig }; +export { MarkdownEditorConfig, AngularMarkdownEditorComponent, AngularMarkdownEditorModule, MARKDOWN_EDITOR_VALUE_ACCESSOR as ɵa }; //# sourceMappingURL=angular-markdown-editor.js.map diff --git a/dist/esm2015/angular-markdown-editor.js.map b/dist/esm2015/angular-markdown-editor.js.map index 7b73e3f..9eaf18e 100644 --- a/dist/esm2015/angular-markdown-editor.js.map +++ b/dist/esm2015/angular-markdown-editor.js.map @@ -2,13 +2,17 @@ "version": 3, "file": "angular-markdown-editor.js", "sources": [ + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.module.ts", + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.component.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/markdown-editor-config.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/global-editor-options.ts" ], "sourcesContent": [ + "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularMarkdownEditorComponent } from './angular-markdown-editor.component';\nimport { EditorOption } from './models';\n\n\n@NgModule({\n imports: [CommonModule],\n declarations: [AngularMarkdownEditorComponent],\n exports: [AngularMarkdownEditorComponent],\n entryComponents: [AngularMarkdownEditorComponent]\n})\nexport class AngularMarkdownEditorModule {\n static forRoot(config: EditorOption = {}) {\n return {\n ngModule: AngularMarkdownEditorModule,\n providers: [\n { provide: 'config', useValue: config }\n ]\n };\n }\n}\n", + "import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Injectable, Input, ViewChild } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorLocale, EditorOption } from './models';\nimport { GlobalEditorOptions } from './global-editor-options';\n\ndeclare var $: any;\n\nexport const MARKDOWN_EDITOR_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AngularMarkdownEditorComponent),\n multi: true\n};\n\n@Injectable()\n@Component({\n moduleId: 'angulaMarkdownEditor',\n selector: 'angular-markdown-editor',\n template: '',\n providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR]\n})\nexport class AngularMarkdownEditorComponent implements AfterViewInit {\n @ViewChild('markdownEditorElm') elm: ElementRef;\n\n /** Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries */\n @Input()\n set locale(locale: EditorLocale | EditorLocale[]) {\n this.addLocaleSet(locale);\n }\n\n /** Id of the textarea DOM element used by the lib */\n @Input() textareaId: string;\n\n /** Markdown Editor Options to pass to the element */\n @Input() options?: EditorOption;\n\n /** Number of rows for the textarea */\n @Input() rows = 10;\n\n public value: any | any[];\n public onModelChange: Function = () => {};\n public onModelTouched: Function = () => {};\n\n constructor(@Inject('config') private forRootConfig: EditorOption) {}\n\n ngAfterViewInit() {\n this.initialization();\n }\n\n addLocaleSet(editorLocale: EditorLocale | EditorLocale[]) {\n if (!editorLocale) {\n return;\n }\n if (Array.isArray(editorLocale)) {\n editorLocale.forEach((locale: EditorLocale) => $.fn.markdown.messages[locale.language] = locale.dictionary);\n } else {\n $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary;\n }\n }\n\n initialization() {\n // get all default options to get the entire list of onEvent so that we can attach Dispatch Custom Event to them\n // we also merge these with the options, and pass these merged options to the hookToEditorEvents() method to cover all onEvent callbacks\n const markdownDefaultOptions = $.fn.markdown.defaults;\n\n // re-hook new events that were optionally defined in the options\n // merge the options, the order matters (last options on the right have higher priorities)\n const options = { ...markdownDefaultOptions, ...GlobalEditorOptions, ...this.forRootConfig, ...this.options };\n\n // hook all events to respective callbacks\n // 1- could be coming from a Dispatched Event in the View:: (onX)=\"do()\"\n // 2- or from editor option callback in the Component:: const options = { onX: () => do() }\n this.hookToEditorEvents(options);\n\n // hook to the onChange event to update our model\n // however we don't want to override the previous callback, so we will run that one to if exists\n const previousOnChange = options.onChange;\n options.onChange = (e) => {\n this.onModelChange(e && e.getContent && e.getContent());\n if (typeof previousOnChange === 'function') {\n previousOnChange(e);\n }\n };\n\n // finally create the editor\n $(`#${this.textareaId}`).markdown(options);\n }\n\n /**\n * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)=\"doSomething($event.detail.eventData)\"\n * @param editor options\n */\n hookToEditorEvents(options) {\n for (const prop in options) {\n if (options.hasOwnProperty(prop) && prop.startsWith('on')) {\n const previousEvent = options[prop];\n\n // on Callback triggered\n options[prop] = (e) => {\n // Dispatch a Custom Event, so that the (onX)=\"do()\" from the View works\n this.dispatchCustomEvent(prop, { eventData: e });\n\n // if an event was passed through the options (instead of dispatch), and is not empty function, then we need to run it as well\n // basically we don't want the Dispatch Custom Event (onX)=\"do()\" to override the ones passed directly in the editor option callbacks\n if (typeof previousEvent === 'function') {\n previousEvent(e);\n }\n };\n }\n }\n }\n\n /**\n * Write value to the native element\n * @param value string\n */\n writeValue(value: string): void {\n this.value = value;\n\n // preset values in the DOM element\n if (this.value) {\n this.elm.nativeElement.value = this.value;\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n /** Dispatch of Custom Event, which by default will bubble & is cancelable */\n private dispatchCustomEvent(eventName: string, data?: any, isBubbling: boolean = true, isCancelable: boolean = true) {\n const eventInit: CustomEventInit = { bubbles: isBubbling, cancelable: isCancelable };\n if (data) {\n eventInit.detail = data;\n }\n return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit));\n }\n}\n", "import { GlobalEditorOptions } from './global-editor-options';\n\nexport class MarkdownEditorConfig {\n options: any;\n\n constructor() {\n this.options = GlobalEditorOptions;\n }\n}\n", - "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n // additionalButtons: [],\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" + "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" ], "names": [], - "mappings": ";;;;ACEA,AAAO,MAAM,mBAAmB,GAAiB;;IAE/C,SAAS,EAAE,KAAK;IAChB,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,OAAO;IACpB,YAAY,EAAE,QAAQ;IACtB,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE;QACjB,CAAC;gBACD,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,CAAC;wBACL,IAAI,EAAE,kBAAkB;wBACxB,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE;4BACJ,EAAE,EAAE,qBAAqB;4BACzB,KAAK,EAAE,2BAA2B;yBACnC;wBACD,QAAQ,EAAE,CAAC,CAAC,KAAlB;;4BAEQ,qBAAI,KAAK,CAAC;4BACV,qBAAI,MAAM,CAAC;4BACX,uBAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;4BAClC,uBAAM,OAAO,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;4BAE/B,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;;gCAEzB,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;6BACvC;iCAAM;gCACL,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC;6BACvB;;4BAGD,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI;gCAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE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,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;IAGA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;;;;;;;ADpCA,AAYA,MAAA,2BAAA,CAAA;;;;;IACE,OAAO,OAAO,CAAC,MAAjB,GAAwC,EAAE,EAA1C;QACI,OAAO;YACL,QAAQ,EAAE,2BAA2B;YACrC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;aACxC;SACF,CAAC;KACH;;;IAdH,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,8BAA8B,CAAC;gBAC9C,OAAO,EAAE,CAAC,8BAA8B,CAAC;gBACzC,eAAe,EAAE,CAAC,8BAA8B,CAAC;aAClD,EAAD,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;" } diff --git a/dist/esm5/angular-markdown-editor.js b/dist/esm5/angular-markdown-editor.js index e99e92a..110d4a0 100644 --- a/dist/esm5/angular-markdown-editor.js +++ b/dist/esm5/angular-markdown-editor.js @@ -1,3 +1,7 @@ +import { Component, forwardRef, Inject, Injectable, Input, ViewChild, NgModule } from '@angular/core'; +import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { CommonModule } from '@angular/common'; + var GlobalEditorOptions = { autofocus: false, disabledButtons: [], @@ -79,6 +83,135 @@ var MarkdownEditorConfig = /** @class */ (function () { } return MarkdownEditorConfig; }()); +var MARKDOWN_EDITOR_VALUE_ACCESSOR = { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(function () { return AngularMarkdownEditorComponent; }), + multi: true +}; +var AngularMarkdownEditorComponent = /** @class */ (function () { + function AngularMarkdownEditorComponent(forRootConfig) { + this.forRootConfig = forRootConfig; + this.rows = 10; + this.onModelChange = function () { }; + this.onModelTouched = function () { }; + } + Object.defineProperty(AngularMarkdownEditorComponent.prototype, "locale", { + set: function (locale) { + this.addLocaleSet(locale); + }, + enumerable: true, + configurable: true + }); + AngularMarkdownEditorComponent.prototype.ngAfterViewInit = function () { + this.initialization(); + }; + AngularMarkdownEditorComponent.prototype.addLocaleSet = function (editorLocale) { + if (!editorLocale) { + return; + } + if (Array.isArray(editorLocale)) { + editorLocale.forEach(function (locale) { return $.fn.markdown.messages[locale.language] = locale.dictionary; }); + } + else { + $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary; + } + }; + AngularMarkdownEditorComponent.prototype.initialization = function () { + var _this = this; + var markdownDefaultOptions = $.fn.markdown.defaults; + var options = Object.assign({}, markdownDefaultOptions, GlobalEditorOptions, this.forRootConfig, this.options); + this.hookToEditorEvents(options); + var previousOnChange = options.onChange; + options.onChange = function (e) { + _this.onModelChange(e && e.getContent && e.getContent()); + if (typeof previousOnChange === 'function') { + previousOnChange(e); + } + }; + $("#" + this.textareaId).markdown(options); + }; + AngularMarkdownEditorComponent.prototype.hookToEditorEvents = function (options) { + var _this = this; + var _loop_1 = function (prop) { + if (options.hasOwnProperty(prop) && prop.startsWith('on')) { + var previousEvent_1 = options[prop]; + options[prop] = function (e) { + _this.dispatchCustomEvent(prop, { eventData: e }); + if (typeof previousEvent_1 === 'function') { + previousEvent_1(e); + } + }; + } + }; + for (var prop in options) { + _loop_1(prop); + } + }; + AngularMarkdownEditorComponent.prototype.writeValue = function (value) { + this.value = value; + if (this.value) { + this.elm.nativeElement.value = this.value; + } + }; + AngularMarkdownEditorComponent.prototype.registerOnChange = function (fn) { + this.onModelChange = fn; + }; + AngularMarkdownEditorComponent.prototype.registerOnTouched = function (fn) { + this.onModelTouched = fn; + }; + AngularMarkdownEditorComponent.prototype.dispatchCustomEvent = function (eventName, data, isBubbling, isCancelable) { + if (isBubbling === void 0) { isBubbling = true; } + if (isCancelable === void 0) { isCancelable = true; } + var eventInit = { bubbles: isBubbling, cancelable: isCancelable }; + if (data) { + eventInit.detail = data; + } + return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit)); + }; + return AngularMarkdownEditorComponent; +}()); +AngularMarkdownEditorComponent.decorators = [ + { type: Injectable }, + { type: Component, args: [{ + moduleId: 'angulaMarkdownEditor', + selector: 'angular-markdown-editor', + template: '', + providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR] + },] }, +]; +AngularMarkdownEditorComponent.ctorParameters = function () { return [ + { type: undefined, decorators: [{ type: Inject, args: ['config',] },] }, +]; }; +AngularMarkdownEditorComponent.propDecorators = { + "elm": [{ type: ViewChild, args: ['markdownEditorElm',] },], + "locale": [{ type: Input },], + "textareaId": [{ type: Input },], + "options": [{ type: Input },], + "rows": [{ type: Input },], +}; +var AngularMarkdownEditorModule = /** @class */ (function () { + function AngularMarkdownEditorModule() { + } + AngularMarkdownEditorModule.forRoot = function (config) { + if (config === void 0) { config = {}; } + return { + ngModule: AngularMarkdownEditorModule, + providers: [ + { provide: 'config', useValue: config } + ] + }; + }; + return AngularMarkdownEditorModule; +}()); +AngularMarkdownEditorModule.decorators = [ + { type: NgModule, args: [{ + imports: [CommonModule], + declarations: [AngularMarkdownEditorComponent], + exports: [AngularMarkdownEditorComponent], + entryComponents: [AngularMarkdownEditorComponent] + },] }, +]; +AngularMarkdownEditorModule.ctorParameters = function () { return []; }; -export { MarkdownEditorConfig }; +export { MarkdownEditorConfig, AngularMarkdownEditorComponent, AngularMarkdownEditorModule, MARKDOWN_EDITOR_VALUE_ACCESSOR as ɵa }; //# sourceMappingURL=angular-markdown-editor.js.map diff --git a/dist/esm5/angular-markdown-editor.js.map b/dist/esm5/angular-markdown-editor.js.map index ed0c175..6358b92 100644 --- a/dist/esm5/angular-markdown-editor.js.map +++ b/dist/esm5/angular-markdown-editor.js.map @@ -2,13 +2,17 @@ "version": 3, "file": "angular-markdown-editor.js", "sources": [ + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.module.ts", + "ng://angular-markdown-editor/out/lib/angular-markdown-editor/angular-markdown-editor.component.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/markdown-editor-config.ts", "ng://angular-markdown-editor/out/lib/angular-markdown-editor/global-editor-options.ts" ], "sourcesContent": [ + "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularMarkdownEditorComponent } from './angular-markdown-editor.component';\nimport { EditorOption } from './models';\n\n\n@NgModule({\n imports: [CommonModule],\n declarations: [AngularMarkdownEditorComponent],\n exports: [AngularMarkdownEditorComponent],\n entryComponents: [AngularMarkdownEditorComponent]\n})\nexport class AngularMarkdownEditorModule {\n static forRoot(config: EditorOption = {}) {\n return {\n ngModule: AngularMarkdownEditorModule,\n providers: [\n { provide: 'config', useValue: config }\n ]\n };\n }\n}\n", + "import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Injectable, Input, ViewChild } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorLocale, EditorOption } from './models';\nimport { GlobalEditorOptions } from './global-editor-options';\n\ndeclare var $: any;\n\nexport const MARKDOWN_EDITOR_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AngularMarkdownEditorComponent),\n multi: true\n};\n\n@Injectable()\n@Component({\n moduleId: 'angulaMarkdownEditor',\n selector: 'angular-markdown-editor',\n template: '',\n providers: [MARKDOWN_EDITOR_VALUE_ACCESSOR]\n})\nexport class AngularMarkdownEditorComponent implements AfterViewInit {\n @ViewChild('markdownEditorElm') elm: ElementRef;\n\n /** Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries */\n @Input()\n set locale(locale: EditorLocale | EditorLocale[]) {\n this.addLocaleSet(locale);\n }\n\n /** Id of the textarea DOM element used by the lib */\n @Input() textareaId: string;\n\n /** Markdown Editor Options to pass to the element */\n @Input() options?: EditorOption;\n\n /** Number of rows for the textarea */\n @Input() rows = 10;\n\n public value: any | any[];\n public onModelChange: Function = () => {};\n public onModelTouched: Function = () => {};\n\n constructor(@Inject('config') private forRootConfig: EditorOption) {}\n\n ngAfterViewInit() {\n this.initialization();\n }\n\n addLocaleSet(editorLocale: EditorLocale | EditorLocale[]) {\n if (!editorLocale) {\n return;\n }\n if (Array.isArray(editorLocale)) {\n editorLocale.forEach((locale: EditorLocale) => $.fn.markdown.messages[locale.language] = locale.dictionary);\n } else {\n $.fn.markdown.messages[editorLocale.language] = editorLocale.dictionary;\n }\n }\n\n initialization() {\n // get all default options to get the entire list of onEvent so that we can attach Dispatch Custom Event to them\n // we also merge these with the options, and pass these merged options to the hookToEditorEvents() method to cover all onEvent callbacks\n const markdownDefaultOptions = $.fn.markdown.defaults;\n\n // re-hook new events that were optionally defined in the options\n // merge the options, the order matters (last options on the right have higher priorities)\n const options = { ...markdownDefaultOptions, ...GlobalEditorOptions, ...this.forRootConfig, ...this.options };\n\n // hook all events to respective callbacks\n // 1- could be coming from a Dispatched Event in the View:: (onX)=\"do()\"\n // 2- or from editor option callback in the Component:: const options = { onX: () => do() }\n this.hookToEditorEvents(options);\n\n // hook to the onChange event to update our model\n // however we don't want to override the previous callback, so we will run that one to if exists\n const previousOnChange = options.onChange;\n options.onChange = (e) => {\n this.onModelChange(e && e.getContent && e.getContent());\n if (typeof previousOnChange === 'function') {\n previousOnChange(e);\n }\n };\n\n // finally create the editor\n $(`#${this.textareaId}`).markdown(options);\n }\n\n /**\n * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)=\"doSomething($event.detail.eventData)\"\n * @param editor options\n */\n hookToEditorEvents(options) {\n for (const prop in options) {\n if (options.hasOwnProperty(prop) && prop.startsWith('on')) {\n const previousEvent = options[prop];\n\n // on Callback triggered\n options[prop] = (e) => {\n // Dispatch a Custom Event, so that the (onX)=\"do()\" from the View works\n this.dispatchCustomEvent(prop, { eventData: e });\n\n // if an event was passed through the options (instead of dispatch), and is not empty function, then we need to run it as well\n // basically we don't want the Dispatch Custom Event (onX)=\"do()\" to override the ones passed directly in the editor option callbacks\n if (typeof previousEvent === 'function') {\n previousEvent(e);\n }\n };\n }\n }\n }\n\n /**\n * Write value to the native element\n * @param value string\n */\n writeValue(value: string): void {\n this.value = value;\n\n // preset values in the DOM element\n if (this.value) {\n this.elm.nativeElement.value = this.value;\n }\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n /** Dispatch of Custom Event, which by default will bubble & is cancelable */\n private dispatchCustomEvent(eventName: string, data?: any, isBubbling: boolean = true, isCancelable: boolean = true) {\n const eventInit: CustomEventInit = { bubbles: isBubbling, cancelable: isCancelable };\n if (data) {\n eventInit.detail = data;\n }\n return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit));\n }\n}\n", "import { GlobalEditorOptions } from './global-editor-options';\n\nexport class MarkdownEditorConfig {\n options: any;\n\n constructor() {\n this.options = GlobalEditorOptions;\n }\n}\n", - "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n // additionalButtons: [],\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" + "import { EditorOption } from './models/editorOption.interface';\n\nexport const GlobalEditorOptions: EditorOption = {\n autofocus: false,\n disabledButtons: [],\n dropZoneOptions: null,\n enableDropDataUri: false,\n footer: '',\n height: 'inherit',\n hiddenButtons: [],\n hideable: false,\n iconlibrary: 'glyph',\n initialstate: 'editor',\n language: 'fr',\n additionalButtons: [\n [{\n name: 'groupFont',\n data: [{\n name: 'cmdStrikethrough',\n toggle: false,\n title: 'Strikethrough',\n icon: {\n fa: 'fa fa-strikethrough',\n glyph: 'glyphicon glyphicon-minus'\n },\n callback: (e) => {\n // Give/remove ~~ surround the selection\n let chunk;\n let cursor;\n const selected = e.getSelection();\n const content = e.getContent();\n\n if (selected.length === 0) {\n // Give extra word\n chunk = e.__localize('strikethrough');\n } else {\n chunk = selected.text;\n }\n\n // transform selection and set the cursor into chunked text\n if (content.substr(selected.start - 2, 2) === '~~' &&\n content.substr(selected.end, 2) === '~~') {\n e.setSelection(selected.start - 2, selected.end + 2);\n e.replaceSelection(chunk);\n cursor = selected.start - 2;\n } else {\n e.replaceSelection('~~' + chunk + '~~');\n cursor = selected.start + 2;\n }\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n },\n {\n name: 'groupMisc',\n data: [{\n name: 'cmdTable',\n toggle: false,\n title: 'Table',\n icon: {\n fa: 'fa fa-table',\n glyph: 'glyphicon glyphicon-th'\n },\n callback: (e) => {\n // Replace selection with some drinks\n let chunk;\n let cursor;\n const selected = e.getSelection();\n\n chunk = '\\n| Tables | Are | Cool | \\n'\n + '| ------------- |:-------------:| -----:| \\n'\n + '| col 3 is | right-aligned | $1600 | \\n'\n + '| col 2 is | centered | $12 | \\n'\n + '| zebra stripes | are neat | $1 |';\n\n // transform selection and set the cursor into chunked text\n e.replaceSelection(chunk);\n cursor = selected.start;\n\n // Set the cursor\n e.setSelection(cursor, cursor + chunk.length);\n }\n }]\n }]\n ]\n};\n" ], "names": [], - "mappings": "ACEA,IAAa,mBAAmB,GAAiB;IAE/C,SAAS,EAAE,KAAK;IAChB,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,KAAK;IACxB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,SAAS;IACjB,aAAa,EAAE,EAAE;IACjB,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,OAAO;IACpB,YAAY,EAAE,QAAQ;IACtB,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE;QACjB,CAAC;gBACD,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,CAAC;wBACL,IAAI,EAAE,kBAAkB;wBACxB,MAAM,EAAE,KAAK;wBACb,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE;4BACJ,EAAE,EAAE,qBAAqB;4BACzB,KAAK,EAAE,2BAA2B;yBACnC;wBACD,QAAQ,EAAE,UAAC,CAAC;4BAEV,IAAI,KAAK,CAAC;4BACV,IAAI,MAAM,CAAC;4BACX,IAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC;4BAClC,IAAM,OAAO,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;4BAE/B,IAAI,QAAQ,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AA;IAGA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;IAMA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;IAGA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;IAGA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,EAAA;;ADpCA;IAAA;;IAaS,mCAAO,GAAd,UAAe,MAAyB;QAAzB,uBAAA,EAAA,WAAyB;QACtC,OAAO;YACL,QAAQ,EAAE,2BAA2B;YACrC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE;aACxC;SACF,CAAC;KACH;;;;IAdH,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,YAAY,EAAE,CAAC,8BAA8B,CAAC;gBAC9C,OAAO,EAAE,CAAC,8BAA8B,CAAC;gBACzC,eAAe,EAAE,CAAC,8BAA8B,CAAC;aAClD,EAAD,EAAA;;;;;;" } diff --git a/dist/lib/angular-markdown-editor/angular-markdown-editor.component.d.ts b/dist/lib/angular-markdown-editor/angular-markdown-editor.component.d.ts new file mode 100644 index 0000000..002c89c --- /dev/null +++ b/dist/lib/angular-markdown-editor/angular-markdown-editor.component.d.ts @@ -0,0 +1,36 @@ +import { AfterViewInit, ElementRef } from '@angular/core'; +import { EditorLocale, EditorOption } from './models'; +export declare const MARKDOWN_EDITOR_VALUE_ACCESSOR: any; +export declare class AngularMarkdownEditorComponent implements AfterViewInit { + private forRootConfig; + elm: ElementRef; + /** Locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries */ + locale: EditorLocale | EditorLocale[]; + /** Id of the textarea DOM element used by the lib */ + textareaId: string; + /** Markdown Editor Options to pass to the element */ + options?: EditorOption; + /** Number of rows for the textarea */ + rows: number; + value: any | any[]; + onModelChange: Function; + onModelTouched: Function; + constructor(forRootConfig: EditorOption); + ngAfterViewInit(): void; + addLocaleSet(editorLocale: EditorLocale | EditorLocale[]): void; + initialization(): void; + /** + * Hook any of the editor event(s) to Dispatch Custom Event so that we can use them in Angular with (onX)="doSomething($event.detail.eventData)" + * @param editor options + */ + hookToEditorEvents(options: any): void; + /** + * Write value to the native element + * @param value string + */ + writeValue(value: string): void; + registerOnChange(fn: Function): void; + registerOnTouched(fn: Function): void; + /** Dispatch of Custom Event, which by default will bubble & is cancelable */ + private dispatchCustomEvent(eventName, data?, isBubbling?, isCancelable?); +} diff --git a/dist/lib/angular-markdown-editor/angular-markdown-editor.module.d.ts b/dist/lib/angular-markdown-editor/angular-markdown-editor.module.d.ts new file mode 100644 index 0000000..4c0de84 --- /dev/null +++ b/dist/lib/angular-markdown-editor/angular-markdown-editor.module.d.ts @@ -0,0 +1,10 @@ +import { EditorOption } from './models'; +export declare class AngularMarkdownEditorModule { + static forRoot(config?: EditorOption): { + ngModule: typeof AngularMarkdownEditorModule; + providers: { + provide: string; + useValue: EditorOption; + }[]; + }; +} diff --git a/dist/lib/angular-markdown-editor/index.d.ts b/dist/lib/angular-markdown-editor/index.d.ts index cd00c90..ea11a85 100644 --- a/dist/lib/angular-markdown-editor/index.d.ts +++ b/dist/lib/angular-markdown-editor/index.d.ts @@ -1,2 +1,4 @@ export * from './models/index'; export { MarkdownEditorConfig } from './markdown-editor-config'; +export { AngularMarkdownEditorComponent } from './angular-markdown-editor.component'; +export { AngularMarkdownEditorModule } from './angular-markdown-editor.module'; diff --git a/dist/package.json b/dist/package.json index b5b83d7..cf354e2 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "angular-markdown-editor", - "version": "2.0.0-beta", + "version": "2.0.1", "description": "Bootstrap Markdown components made available in Angular", "keywords": [ "angular", @@ -19,7 +19,6 @@ "bootstrap": "^3.3.7", "bootstrap-markdown": "toopay/bootstrap-markdown", "core-js": "^2.5.1", - "font-awesome": "^4.7.0", "jquery": ">=3.2.1", "vinyl-paths": "^2.1.0", "tslib": "^1.7.1" @@ -49,6 +48,7 @@ "custom-event-polyfill": "^0.3.0", "del": "^3.0.0", "del-cli": "^1.1.0", + "font-awesome": "^4.7.0", "gulp": "^3.9.1", "gulp-bump": "^2.7.0", "gulp-sass": "^3.1.0", diff --git a/package.json b/package.json index 8f5c9ae..a98bed9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-markdown-editor", - "version": "2.0.0-beta", + "version": "2.0.1", "description": "Bootstrap Markdown components made available in Angular", "keywords": [ "angular", @@ -15,9 +15,8 @@ "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", - "build-lib": "npm-run-all packagr copy:lib", + "build-lib": "npm-run-all packagr", "build-lib-demo": "npm-run-all build-lib del-demo:dist copy-demo:dist", - "copy:lib": "cross-env copyfiles --up 2 src/assets/lib/** dist", "copy-demo:dist": "cross-env copyfiles --up 1 dist/**/*.* ../angular-markdown-editor-demo/node_lib/angular-markdown-editor", "del-demo:dist": "cross-env rimraf ../angular-markdown-editor-demo/node_lib/angular-markdown-editor", "pack-lib": "npm pack ./dist", @@ -46,7 +45,6 @@ "bootstrap": "^3.3.7", "bootstrap-markdown": "toopay/bootstrap-markdown", "core-js": "^2.5.1", - "font-awesome": "^4.7.0", "jquery": ">=3.2.1", "vinyl-paths": "^2.1.0" }, @@ -75,6 +73,7 @@ "custom-event-polyfill": "^0.3.0", "del": "^3.0.0", "del-cli": "^1.1.0", + "font-awesome": "^4.7.0", "gulp": "^3.9.1", "gulp-bump": "^2.7.0", "gulp-sass": "^3.1.0", diff --git a/readme.md b/readme.md index 084d591..8ee98be 100644 --- a/readme.md +++ b/readme.md @@ -65,6 +65,19 @@ For example, below we are adding the highlight for `C#`, `JavaScript` and `TypeS ], ``` +### Import Module +```typescript +import { AngularMarkdownEditorModule } from 'angular-markdown-editor'; + +@NgModule({ + declarations: [], + imports: [AngularMarkdownEditorModule] + + // or pre-define global configuration using the forRoot + // imports: [AngularMarkdownEditorModule.forRoot({ iconlibrary: 'fa' })] +}); +``` + ### Input attributes You can pass the following input attribute: @@ -76,7 +89,7 @@ You can pass the following input attribute: | **locale** | EditorLocale | no | locale set that has a language and dictionary that can be added as an alternative language. Can be 1 or more dictionaries | ### Global Options -The library comes with it's own Global Editor Options, these propertoes can be overriden at any by the `options` attribute. Click to see the [Global Options]() defined. +The library comes with it's own Global Editor Options, these propertoes can be overriden at any by the `options` attribute. Click to see the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts) defined. ### Event Hooks You can hook to any of the [Bootstrap Markdown Editor Events](http://www.codingdrama.com/bootstrap-markdown/) through 2 ways, just choose the one you prefer: @@ -148,7 +161,7 @@ export class MyComponent { - onShow ### API - Editor Methods -The editor API is quite dense and I will not list the entire set of methods, but you can see the entire list [here](). +The editor API is quite dense and I will not list the entire set of methods, but you can see the entire list from the [Editor Method Interface](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/models/editorMethod.interface.ts). To call any of the Editor Methods, you will have to first get a reference to the Editor's instance which you can get from the `onShow` callback. Get the Editor's instance through the `onShow`, via the Custom Event (from the View) or Editor Option callback (just choose the one you prefer). Below shows how to get it through the latter option. @@ -201,10 +214,10 @@ export class TestComponent implements OnInit { ``` ### Additional Editor Buttons -I really thought that some buttons were missing to go a great job (~~Strikethrough~~ & **Table**). So I added them directly in the [Global Options](). If you want to add your own, then just look at how it was done in the [Global Options]() and read the section `additionalButtons` of [Bootstrap Markdown](http://www.codingdrama.com/bootstrap-markdown/) website. +I really thought that some buttons were missing to go a great job (~~Strikethrough~~ & **Table**). So I added them directly in the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts). If you want to add your own, then just look at how it was done in the [Global Options](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/lib/angular-markdown-editor/global-editor-options.ts) and read the section `additionalButtons` of [Bootstrap Markdown](http://www.codingdrama.com/bootstrap-markdown/) website. ### Adding Locale -You can add a locale to the editor but passing a `locale` object (and bind it in the View) which contain a `language` and the dictionary of words used by the editor. The entire list of words can be seen in the example below. So for example, if we want to add French locale, we will do the following (you can see [demo code]()): +You can add a locale to the editor but passing a `locale` object (and bind it in the View) which contain a `language` and the dictionary of words used by the editor. The entire list of words can be seen in the example below. So for example, if we want to add French locale, we will do the following (you can see [demo code](https://github.com/ghiscoding/angular-markdown-editor/blob/master/src/app/template/template.component.ts)): ###### View ```html diff --git a/src/app/reactive/reactive.component.ts b/src/app/reactive/reactive.component.ts index 71c6fea..536e368 100644 --- a/src/app/reactive/reactive.component.ts +++ b/src/app/reactive/reactive.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { MarkdownService } from 'ngx-markdown'; -import { EditorOption } from '../../lib/angular-markdown-editor'; +import { EditorInstance, EditorOption } from '../../lib/angular-markdown-editor'; @Component({ templateUrl: './reactive.component.html', @@ -9,7 +9,7 @@ import { EditorOption } from '../../lib/angular-markdown-editor'; styleUrls: ['./reactive.component.scss'] }) export class ReactiveComponent implements OnInit { - bsEditorInstance: any; + bsEditorInstance: EditorInstance; markdownText: string; showEditor = true; templateForm: FormGroup; diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json deleted file mode 100644 index 6b77838..0000000 --- a/src/assets/i18n/en.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "ALL_SELECTED": "All Selected", - "CANCEL": "Cancel", - "CLEAR_ALL_FILTERS": "Clear All Filters", - "CLEAR_ALL_SORTING": "Clear All Sorting", - "COLUMNS": "Columns", - "COMMANDS": "Commands", - "CONTAINS": "Contains", - "ENDS_WITH": "Ends With", - "EQUALS": "Equals", - "EXPORT_TO_CSV": "Export in CSV format", - "EXPORT_TO_TAB_DELIMITED": "Export in Text format (Tab delimited)", - "FROM_TO_OF_TOTAL_ITEMS": "{{from}}-{{to}} of {{totalItems}} items", - "FORCE_FIT_COLUMNS": "Force fit columns", - "INVALID_FLOAT": "The number must be valid and have a maximum of {{maxDecimal}} decimals.", - "GROUP_BY": "Group by", - "HIDE_COLUMN": "Hide Column", - "IN_COLLECTION_SEPERATED_BY_COMMA": "Search items in a collection, must be separated by a comma (a,b)", - "ITEMS": "Items", - "ITEMS_PER_PAGE": "items per page", - "NOT_IN_COLLECTION_SEPERATED_BY_COMMA": "Search items not in a collection, must be separated by a comma (a,b)", - "OF": "of", - "PAGE": "Page", - "PAGE_X_OF_Y": "page {{x}} of {{y}}", - "REFRESH_DATASET": "Refresh Dataset", - "SAVE": "Save", - "SELECT_ALL": "Select All", - "SORT_ASCENDING": "Sort Ascending", - "SORT_DESCENDING": "Sort Descending", - "STARTS_WITH": "Starts With", - "SYNCHRONOUS_RESIZE": "Synchronous resize", - "TOGGLE_FILTER_ROW": "Toggle Filter Row", - "X_OF_Y_SELECTED": "# of % selected", - - "BILLING": { - "ADDRESS": { - "STREET": "Billing Address Street", - "ZIP": "Billing Address Zip" - } - }, - "CUSTOM_COMMANDS": "Custom Commands", - "DURATION": "Duration", - "COMPANY": "Company", - "COMPLETED": "Completed", - "FALSE": "False", - "FEMALE": "Female", - "FINISH": "Finish", - "GENDER": "Gender", - "HELP": "Help", - "MALE": "Male", - "NAME": "Name", - "START": "Start", - "TASK_X": "Task {{x}}", - "TITLE": "Title", - "TRUE": "True" -} diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json deleted file mode 100644 index 0b9a2c6..0000000 --- a/src/assets/i18n/fr.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "ALL_SELECTED": "Tout sélectionnés", - "CANCEL": "Annuler", - "CLEAR_ALL_FILTERS": "Effacer tous les filtres", - "CLEAR_ALL_SORTING": "Effacer tous les tris", - "COLUMNS": "Colonnes", - "COMMANDS": "Commandes", - "CONTAINS": "Contient", - "ENDS_WITH": "Se termine par", - "EQUALS": "Égale", - "EXPORT_TO_CSV": "Exporter en format CSV", - "EXPORT_TO_TAB_DELIMITED": "Exporter en format texte (délimité par tabulation)", - "FROM_TO_OF_TOTAL_ITEMS": "{{from}}-{{to}} de {{totalItems}} éléments", - "FORCE_FIT_COLUMNS": "Ajustement forcé des colonnes", - "GROUP_BY": "Grouper par", - "HIDE_COLUMN": "Cacher la colonne", - "IN_COLLECTION_SEPERATED_BY_COMMA": "Recherche incluant certain éléments d'une collection, doit être séparé par une virgule (a,b)", - "INVALID_FLOAT": "Le nombre doit être valide et avoir un maximum de {{maxDecimal}} décimales.", - "ITEMS": "Éléments", - "ITEMS_PER_PAGE": "éléments par page", - "NOT_IN_COLLECTION_SEPERATED_BY_COMMA": "Recherche excluant certain éléments d'une collection, doit être séparé par une virgule (a,b)", - "OF": "de", - "PAGE": "Page", - "PAGE_X_OF_Y": "page {{x}} de {{y}}", - "REFRESH_DATASET": "Rafraîchir les données", - "SAVE": "Sauvegarder", - "SELECT_ALL": "Sélectionner tout", - "SORT_ASCENDING": "Trier par ordre croissant", - "SORT_DESCENDING": "Trier par ordre décroissant", - "STARTS_WITH": "Commence par", - "SYNCHRONOUS_RESIZE": "Redimension synchrone", - "TOGGLE_FILTER_ROW": "Basculer la ligne des filtres", - "X_OF_Y_SELECTED": "# de % sélectionné", - - "BILLING": { - "ADDRESS": { - "STREET": "Adresse de facturation", - "ZIP": "Code zip de facturation" - } - }, - "DURATION": "Durée", - "COMPANY": "Compagnie", - "COMPLETED": "Terminé", - "CUSTOM_COMMANDS": "Commandes Personnalisées", - "FALSE": "Faux", - "FEMALE": "Féminin", - "FINISH": "Fin", - "GENDER": "Sexe", - "HELP": "Aide", - "MALE": "Masculin", - "NAME": "Name", - "START": "Début", - "TASK_X": "Tâche {{x}}", - "TITLE": "Titre", - "TITLE.NAME": "Nom du Titre", - "TRUE": "Vrai" -} diff --git a/src/lib/angular-markdown-editor/angular-markdown-editor.component.ts b/src/lib/angular-markdown-editor/angular-markdown-editor.component.ts index 87d1582..e80327b 100644 --- a/src/lib/angular-markdown-editor/angular-markdown-editor.component.ts +++ b/src/lib/angular-markdown-editor/angular-markdown-editor.component.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Injectable, Input, ViewChild } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; -import { EditorLocale, EditorOption, Dictionary } from './models'; +import { EditorLocale, EditorOption } from './models'; import { GlobalEditorOptions } from './global-editor-options'; declare var $: any; diff --git a/src/lib/angular-markdown-editor/angular-markdown-editor.module.ts b/src/lib/angular-markdown-editor/angular-markdown-editor.module.ts index 9f90e36..c609f3a 100644 --- a/src/lib/angular-markdown-editor/angular-markdown-editor.module.ts +++ b/src/lib/angular-markdown-editor/angular-markdown-editor.module.ts @@ -5,15 +5,9 @@ import { EditorOption } from './models'; @NgModule({ - imports: [ - CommonModule - ], - declarations: [ - AngularMarkdownEditorComponent - ], - exports: [ - AngularMarkdownEditorComponent - ], + imports: [CommonModule], + declarations: [AngularMarkdownEditorComponent], + exports: [AngularMarkdownEditorComponent], entryComponents: [AngularMarkdownEditorComponent] }) export class AngularMarkdownEditorModule { diff --git a/src/lib/angular-markdown-editor/global-editor-options.ts b/src/lib/angular-markdown-editor/global-editor-options.ts index 991dc32..c22d45f 100644 --- a/src/lib/angular-markdown-editor/global-editor-options.ts +++ b/src/lib/angular-markdown-editor/global-editor-options.ts @@ -1,7 +1,6 @@ import { EditorOption } from './models/editorOption.interface'; export const GlobalEditorOptions: EditorOption = { - // additionalButtons: [], autofocus: false, disabledButtons: [], dropZoneOptions: null, diff --git a/src/lib/angular-markdown-editor/index.ts b/src/lib/angular-markdown-editor/index.ts index a657595..47a0c27 100644 --- a/src/lib/angular-markdown-editor/index.ts +++ b/src/lib/angular-markdown-editor/index.ts @@ -3,3 +3,5 @@ export * from './models/index'; // components & module export { MarkdownEditorConfig } from './markdown-editor-config'; +export { AngularMarkdownEditorComponent } from './angular-markdown-editor.component'; +export { AngularMarkdownEditorModule } from './angular-markdown-editor.module'; diff --git a/vscode.code-workspace b/vscode.code-workspace deleted file mode 100644 index 60b24d8..0000000 --- a/vscode.code-workspace +++ /dev/null @@ -1,11 +0,0 @@ -{ - "folders": [ - { - "path": "./" - }, - { - "path": "../Angular-Slickgrid-PackageTest" - } - ], - "settings": {} -}