@ecodev/natural 40.1.0 → 41.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/localize/init'), require('@angular/core'), require('rxjs'), require('@angular/forms'), require('@angular/router'), require('lodash-es'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs/operators'), require('@angular/material/table'), require('@angular/cdk/collections'), require('apollo-angular'), require('@apollo/client/core'), require('@angular/material/core'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/menu'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/material/tooltip'), require('@angular/material/tabs'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/list'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/animations'), require('@angular/material/datepicker'), require('@angular/cdk/tree'), require('@angular/material/chips'), require('@angular/material/progress-spinner'), require('@angular/material/tree'), require('@angular/material/autocomplete'), require('@angular/cdk/coercion'), require('@angular/flex-layout'), require('@angular/flex-layout/core'), require('@angular/material/paginator'), require('@angular/material/sidenav'), require('ts-md5'), require('prosemirror-view'), require('prosemirror-state'), require('prosemirror-example-setup'), require('prosemirror-model'), require('prosemirror-schema-basic'), require('prosemirror-schema-list')) :
3
- typeof define === 'function' && define.amd ? define('@ecodev/natural', ['exports', '@angular/localize/init', '@angular/core', 'rxjs', '@angular/forms', '@angular/router', 'lodash-es', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs/operators', '@angular/material/table', '@angular/cdk/collections', 'apollo-angular', '@apollo/client/core', '@angular/material/core', '@angular/cdk/platform', '@angular/common', '@angular/material/button', '@angular/material/checkbox', '@angular/material/menu', '@angular/material/icon', '@angular/platform-browser', '@angular/material/tooltip', '@angular/material/tabs', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/list', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/animations', '@angular/material/datepicker', '@angular/cdk/tree', '@angular/material/chips', '@angular/material/progress-spinner', '@angular/material/tree', '@angular/material/autocomplete', '@angular/cdk/coercion', '@angular/flex-layout', '@angular/flex-layout/core', '@angular/material/paginator', '@angular/material/sidenav', 'ts-md5', 'prosemirror-view', 'prosemirror-state', 'prosemirror-example-setup', 'prosemirror-model', 'prosemirror-schema-basic', 'prosemirror-schema-list'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ecodev = global.ecodev || {}, global.ecodev.natural = {}), global.ng.localize.init, global.ng.core, global.rxjs, global.ng.forms, global.ng.router, global["lodash-es"], global.ng.material.dialog, global.ng.material.snackBar, global.rxjs.operators, global.ng.material.table, global.ng.cdk.collections, global["apollo-angular"], global.core, global.ng.material.core, global.ng.cdk.platform, global.ng.common, global.ng.material.button, global.ng.material.checkbox, global.ng.material.menu, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.tooltip, global.ng.material.tabs, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.list, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.animations, global.ng.material.datepicker, global.ng.cdk.tree, global.ng.material.chips, global.ng.material.progressSpinner, global.ng.material.tree, global.ng.material.autocomplete, global.ng.cdk.coercion, global.ng.flexLayout, global.ng.flexLayout.core, global.ng.material.paginator, global.ng.material.sidenav, global.tsMd5, global.prosemirrorView, global.prosemirrorState, global.prosemirrorExampleSetup, global.prosemirrorModel, global.prosemirrorSchemaBasic, global.prosemirrorSchemaList));
5
- })(this, (function (exports, init, i0, rxjs, forms, i1$1, lodashEs, i1, i2, operators, table, collections, i1$2, core, i1$3, i2$1, i1$4, button, checkbox, menu, icon, i2$2, tooltip, tabs, formField, input, select, list, i1$5, portal, a11y, animations, datepicker, tree$1, chips, progressSpinner, tree, autocomplete, coercion, flexLayout, i4, paginator, sidenav, tsMd5, prosemirrorView, prosemirrorState, prosemirrorExampleSetup, prosemirrorModel, prosemirrorSchemaBasic, prosemirrorSchemaList) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/localize/init'), require('@angular/core'), require('rxjs'), require('@angular/forms'), require('@angular/router'), require('lodash-es'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs/operators'), require('@angular/material/table'), require('@angular/cdk/collections'), require('apollo-angular'), require('@apollo/client/core'), require('@angular/material/core'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/menu'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/material/tooltip'), require('@angular/material/tabs'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/list'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/animations'), require('@angular/material/datepicker'), require('@angular/cdk/tree'), require('@angular/material/chips'), require('@angular/material/progress-spinner'), require('@angular/material/tree'), require('@angular/material/autocomplete'), require('@angular/cdk/coercion'), require('@angular/flex-layout'), require('@angular/flex-layout/core'), require('@angular/material/paginator'), require('@angular/material/sidenav'), require('ts-md5')) :
3
+ typeof define === 'function' && define.amd ? define('@ecodev/natural', ['exports', '@angular/localize/init', '@angular/core', 'rxjs', '@angular/forms', '@angular/router', 'lodash-es', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs/operators', '@angular/material/table', '@angular/cdk/collections', 'apollo-angular', '@apollo/client/core', '@angular/material/core', '@angular/cdk/platform', '@angular/common', '@angular/material/button', '@angular/material/checkbox', '@angular/material/menu', '@angular/material/icon', '@angular/platform-browser', '@angular/material/tooltip', '@angular/material/tabs', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/list', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/animations', '@angular/material/datepicker', '@angular/cdk/tree', '@angular/material/chips', '@angular/material/progress-spinner', '@angular/material/tree', '@angular/material/autocomplete', '@angular/cdk/coercion', '@angular/flex-layout', '@angular/flex-layout/core', '@angular/material/paginator', '@angular/material/sidenav', 'ts-md5'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ecodev = global.ecodev || {}, global.ecodev.natural = {}), global.ng.localize.init, global.ng.core, global.rxjs, global.ng.forms, global.ng.router, global["lodash-es"], global.ng.material.dialog, global.ng.material.snackBar, global.rxjs.operators, global.ng.material.table, global.ng.cdk.collections, global["apollo-angular"], global["@apollo/client/core"], global.ng.material.core, global.ng.cdk.platform, global.ng.common, global.ng.material.button, global.ng.material.checkbox, global.ng.material.menu, global.ng.material.icon, global.ng.platformBrowser, global.ng.material.tooltip, global.ng.material.tabs, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.list, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.animations, global.ng.material.datepicker, global.ng.cdk.tree, global.ng.material.chips, global.ng.material.progressSpinner, global.ng.material.tree, global.ng.material.autocomplete, global.ng.cdk.coercion, global.ng.flexLayout, global.ng.flexLayout.core, global.ng.material.paginator, global.ng.material.sidenav, global["ts-md5"]));
5
+ })(this, (function (exports, init, i0, rxjs, forms, i1$1, lodashEs, i1, i2, operators, table, collections, i1$2, core, i1$3, i2$1, i1$4, button, checkbox, menu, icon, i2$2, tooltip, tabs, formField, input, select, list, i1$5, portal, a11y, animations, datepicker, tree$1, chips, progressSpinner, tree, autocomplete, coercion, flexLayout, i4, paginator, sidenav, tsMd5) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -7214,7 +7214,7 @@
7214
7214
  }());
7215
7215
  NaturalHierarchicSelectorDialogComponent.decorators = [
7216
7216
  { type: i0.Component, args: [{
7217
- template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button [mat-dialog-close] i18n mat-button>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n",
7217
+ template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button [mat-dialog-close] mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n",
7218
7218
  styles: [":host mat-dialog-actions{display:flex;flex-direction:row;justify-content:flex-end}\n"]
7219
7219
  },] }
7220
7220
  ];
@@ -8816,6 +8816,13 @@
8816
8816
  * no effect.
8817
8817
  */
8818
8818
  _this.selectable = false;
8819
+ /**
8820
+ * If true, the file selection will be broadcast through `NaturalFileService.filesChanged`.
8821
+ *
8822
+ * It is useful to set this to false if there is two upload on a page with different purpose
8823
+ * and the second upload should not be confused with the first one.
8824
+ */
8825
+ _this.broadcast = true;
8819
8826
  /**
8820
8827
  * The single valid file that has been selected.
8821
8828
  *
@@ -8909,7 +8916,9 @@
8909
8916
  }
8910
8917
  if (selection.valid.length || selection.invalid.length) {
8911
8918
  this.filesChange.emit(selection);
8912
- this.naturalFileService.filesChanged.next(selection);
8919
+ if (this.broadcast) {
8920
+ this.naturalFileService.filesChanged.next(selection);
8921
+ }
8913
8922
  }
8914
8923
  this.getFileElement().value = '';
8915
8924
  };
@@ -8998,6 +9007,7 @@
8998
9007
  maxSize: [{ type: i0.Input }],
8999
9008
  fileSelectionDisabled: [{ type: i0.Input }],
9000
9009
  selectable: [{ type: i0.Input }],
9010
+ broadcast: [{ type: i0.Input }],
9001
9011
  fileChange: [{ type: i0.Output }],
9002
9012
  filesChange: [{ type: i0.Output }],
9003
9013
  onChange: [{ type: i0.HostListener, args: ['change', ['$event'],] }]
@@ -9082,7 +9092,9 @@
9082
9092
  this.closeDrags();
9083
9093
  };
9084
9094
  NaturalFileDropDirective.prototype.hasObservers = function () {
9085
- return this.fileChange.observed || this.filesChange.observed || this.naturalFileService.filesChanged.observed;
9095
+ return (this.fileChange.observed ||
9096
+ this.filesChange.observed ||
9097
+ (this.broadcast && this.naturalFileService.filesChanged.observed));
9086
9098
  };
9087
9099
  return NaturalFileDropDirective;
9088
9100
  }(NaturalAbstractFile));
@@ -10027,7 +10039,7 @@
10027
10039
  NaturalRelationsComponent.decorators = [
10028
10040
  { type: i0.Component, args: [{
10029
10041
  selector: 'natural-relations',
10030
- template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n (click)=\"removeRelation(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n",
10042
+ template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n",
10031
10043
  styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"]
10032
10044
  },] }
10033
10045
  ];
@@ -11131,142 +11143,6 @@
11131
11143
  { type: i2$2.Title }
11132
11144
  ]; };
11133
11145
 
11134
- /*
11135
- * Public API Surface of natural
11136
- */
11137
-
11138
- var myNodes = {
11139
- heading: prosemirrorSchemaBasic.nodes.heading,
11140
- doc: prosemirrorSchemaBasic.nodes.doc,
11141
- paragraph: prosemirrorSchemaBasic.nodes.paragraph,
11142
- text: prosemirrorSchemaBasic.nodes.text,
11143
- hard_break: prosemirrorSchemaBasic.nodes.hard_break,
11144
- };
11145
- var myMarks = {
11146
- link: prosemirrorSchemaBasic.marks.link,
11147
- em: prosemirrorSchemaBasic.marks.em,
11148
- strong: prosemirrorSchemaBasic.marks.strong,
11149
- };
11150
- var basicSchema = new prosemirrorModel.Schema({ nodes: myNodes, marks: myMarks });
11151
- var schema = new prosemirrorModel.Schema({
11152
- nodes: prosemirrorSchemaList.addListNodes(basicSchema.spec.nodes, 'paragraph block*', 'block'),
11153
- marks: basicSchema.spec.marks,
11154
- });
11155
-
11156
- /**
11157
- * Prosemirror component
11158
- * Usage :
11159
- * <natural-editor [(ngModel)]="htmlString"></natural-editor>
11160
- */
11161
- // @dynamic
11162
- var NaturalEditorComponent = /** @class */ (function () {
11163
- function NaturalEditorComponent(ngControl, document) {
11164
- this.ngControl = ngControl;
11165
- this.document = document;
11166
- this.view = null;
11167
- this.contentChange = new i0.EventEmitter();
11168
- /**
11169
- * HTML string
11170
- */
11171
- this.content = '';
11172
- if (this.ngControl !== null) {
11173
- this.ngControl.valueAccessor = this;
11174
- }
11175
- }
11176
- NaturalEditorComponent.prototype.ngOnInit = function () {
11177
- var _this = this;
11178
- var serializer = prosemirrorModel.DOMSerializer.fromSchema(schema);
11179
- var state = this.createState();
11180
- this.view = new prosemirrorView.EditorView(this.editor.nativeElement, {
11181
- state: state,
11182
- dispatchTransaction: function (transaction) {
11183
- if (!_this.view) {
11184
- return;
11185
- }
11186
- var newState = _this.view.state.apply(transaction);
11187
- _this.view.updateState(newState);
11188
- // Transform doc into HTML string
11189
- var dom = serializer.serializeFragment(_this.view.state.doc);
11190
- var el = _this.document.createElement('_');
11191
- el.appendChild(dom);
11192
- var newContent = el.innerHTML;
11193
- if (_this.content === newContent) {
11194
- return;
11195
- }
11196
- _this.content = el.innerHTML;
11197
- if (_this.onChange) {
11198
- _this.onChange(_this.content);
11199
- }
11200
- _this.contentChange.emit(_this.content);
11201
- },
11202
- });
11203
- };
11204
- NaturalEditorComponent.prototype.writeValue = function (val) {
11205
- if (typeof val === 'string' && val !== this.content) {
11206
- this.content = val;
11207
- }
11208
- if (this.view !== null) {
11209
- var state = this.createState();
11210
- this.view.updateState(state);
11211
- }
11212
- };
11213
- NaturalEditorComponent.prototype.createState = function () {
11214
- var template = this.document.createElement('_');
11215
- template.innerHTML = '<div>' + this.content + '</div>';
11216
- if (!template.firstChild) {
11217
- throw new Error('child of template element could not be created');
11218
- }
11219
- var parser = prosemirrorModel.DOMParser.fromSchema(schema);
11220
- var doc = parser.parse(template.firstChild);
11221
- return prosemirrorState.EditorState.create({
11222
- doc: doc,
11223
- plugins: prosemirrorExampleSetup.exampleSetup({ schema: schema }),
11224
- });
11225
- };
11226
- NaturalEditorComponent.prototype.registerOnChange = function (fn) {
11227
- this.onChange = fn;
11228
- };
11229
- NaturalEditorComponent.prototype.registerOnTouched = function (fn) { };
11230
- NaturalEditorComponent.prototype.setDisabledState = function (isDisabled) {
11231
- // TODO disable editor ?
11232
- };
11233
- NaturalEditorComponent.prototype.ngOnDestroy = function () {
11234
- if (this.view) {
11235
- this.view.destroy();
11236
- this.view = null;
11237
- }
11238
- };
11239
- return NaturalEditorComponent;
11240
- }());
11241
- NaturalEditorComponent.decorators = [
11242
- { type: i0.Component, args: [{
11243
- selector: 'natural-editor',
11244
- template: " <div #editor></div>",
11245
- styles: ["@charset \"UTF-8\";::ng-deep .ProseMirror{position:relative;background:rgba(0,0,0,.1)}::ng-deep .ProseMirror{word-wrap:break-word;white-space:pre-wrap;-webkit-font-variant-ligatures:none;font-feature-settings:none;font-variant-ligatures:none}::ng-deep .ProseMirror pre{white-space:pre-wrap}::ng-deep .ProseMirror li{position:relative}::ng-deep .ProseMirror-hideselection *::selection{background:transparent}::ng-deep .ProseMirror-hideselection *::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection{caret-color:transparent}::ng-deep .ProseMirror-selectednode{outline:2px solid #8cf}::ng-deep li.ProseMirror-selectednode{outline:none}::ng-deep li.ProseMirror-selectednode:after{content:\"\";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid #8cf;pointer-events:none}::ng-deep .ProseMirror-textblock-dropdown{min-width:3em}::ng-deep .ProseMirror-menu{margin:20px;line-height:1}::ng-deep .ProseMirror-tooltip .ProseMirror-menu{width:-moz-fit-content;width:fit-content;white-space:pre}::ng-deep .ProseMirror-menuitem{margin-right:8px;display:inline-block}::ng-deep .ProseMirror-menuseparator{border-right:1px solid rgba(255,255,255,.3);margin-right:12px}::ng-deep .ProseMirror-menu-dropdown,::ng-deep .ProseMirror-menu-dropdown-menu{white-space:nowrap}::ng-deep .ProseMirror-menu-dropdown{vertical-align:1px;cursor:pointer;position:relative;padding-right:15px}::ng-deep .ProseMirror-menu-dropdown-wrap{padding:1px 0 1px 4px;display:inline-block;position:relative}::ng-deep .ProseMirror-menu-dropdown:after{content:\"\";border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 2px)}::ng-deep .ProseMirror-menu-dropdown-menu,::ng-deep .ProseMirror-menu-submenu{position:absolute;background:white;color:#666;padding:2px;border-radius:4px;box-shadow:0 5px 5px #00000080}::ng-deep .ProseMirror-menu-dropdown-menu{z-index:15;min-width:6em;padding:6px;top:40px}::ng-deep .ProseMirror-menu-dropdown-item{cursor:pointer;padding:12px}::ng-deep .ProseMirror-menu-dropdown-item:hover{background:#f2f2f2}::ng-deep .ProseMirror-menu-submenu{padding:6px}::ng-deep .ProseMirror-menu-submenu-wrap{position:relative;margin-right:-4px}::ng-deep .ProseMirror-menu-submenu-label:after{content:\"\";border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid currentColor;opacity:.6;position:absolute;right:4px;top:calc(50% - 4px)}::ng-deep .ProseMirror-menu-submenu{display:none;min-width:6em;left:100%;top:-17px}::ng-deep .ProseMirror-menu-active{background:white;color:#000}::ng-deep .ProseMirror-menu-disabled{opacity:.3}::ng-deep .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu,::ng-deep .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu{display:block}::ng-deep .ProseMirror-menubar{border-top-left-radius:inherit;border-top-right-radius:inherit;position:relative;min-height:1em;color:#fffc;padding:10px 18px;top:0;left:0;right:0;background:rgba(0,0,0,.8);z-index:10;box-sizing:border-box;overflow:visible;font-size:18px}::ng-deep .ProseMirror-icon{display:inline-block;line-height:.8;vertical-align:-2px;padding:8px;cursor:pointer;border-radius:4px}::ng-deep .ProseMirror-menu-disabled.ProseMirror-icon{cursor:default}::ng-deep .ProseMirror-icon svg{fill:currentColor;height:1em}::ng-deep .ProseMirror-icon span{vertical-align:text-top}::ng-deep .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}::ng-deep .ProseMirror-gapcursor:after{content:\"\";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid black;animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}::ng-deep .ProseMirror-focused .ProseMirror-gapcursor{display:block}::ng-deep .ProseMirror-example-setup-style hr{padding:2px 10px;border:none;margin:1em 0}::ng-deep .ProseMirror-example-setup-style hr:after{content:\"\";display:block;height:1px;background-color:silver;line-height:2px}::ng-deep .ProseMirror ul,::ng-deep .ProseMirror ol{padding-left:30px}::ng-deep .ProseMirror blockquote{padding-left:1em;border-left:3px solid #eee;margin-left:0;margin-right:0}::ng-deep .ProseMirror-example-setup-style img{cursor:default}::ng-deep .ProseMirror-prompt{background:white;padding:20px;position:fixed;border-radius:4px;z-index:11;box-shadow:-.5px 2px 15px #000c;font-size:16px;color:#000}::ng-deep .ProseMirror-prompt h5{margin:0;font-weight:normal;font-size:24px}::ng-deep .ProseMirror-prompt input[type=text],::ng-deep .ProseMirror-prompt textarea{background:rgba(0,0,0,.1);border:none;border-bottom:1px solid rgba(0,0,0,.8);outline:none;padding:10px 20px;margin:.4em 0;width:20em;border-top-left-radius:4px;border-top-right-radius:4px;font-size:16px;color:#000}::ng-deep .ProseMirror-prompt-close{position:absolute;left:2px;top:1px;color:#000;border:none;background:transparent;padding:0}::ng-deep .ProseMirror-prompt-close:after{content:\"\\e2\\153\\2022\";font-size:12px}::ng-deep .ProseMirror-invalid{background:#ffc;border:1px solid #cc7;border-radius:4px;padding:5px 10px;position:absolute;min-width:10em}::ng-deep .ProseMirror-prompt-buttons{margin-top:5px;display:none}::ng-deep #editor,::ng-deep .editor{background:white;color:#000;background-clip:padding-box;border-radius:4px;border:2px solid rgba(0,0,0,.2);padding:5px 0;margin-bottom:23px}::ng-deep .ProseMirror p:first-child,::ng-deep .ProseMirror h1:first-child,::ng-deep .ProseMirror h2:first-child,::ng-deep .ProseMirror h3:first-child,::ng-deep .ProseMirror h4:first-child,::ng-deep .ProseMirror h5:first-child,::ng-deep .ProseMirror h6:first-child{margin-top:10px}::ng-deep .ProseMirror{padding:4px 8px 4px 14px;line-height:1.2;outline:none}::ng-deep .ProseMirror p{margin-bottom:1em}\n"]
11246
- },] }
11247
- ];
11248
- NaturalEditorComponent.ctorParameters = function () { return [
11249
- { type: forms.NgControl, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
11250
- { type: Document, decorators: [{ type: i0.Inject, args: [i1$4.DOCUMENT,] }] }
11251
- ]; };
11252
- NaturalEditorComponent.propDecorators = {
11253
- editor: [{ type: i0.ViewChild, args: ['editor', { read: i0.ElementRef, static: true },] }],
11254
- contentChange: [{ type: i0.Output }]
11255
- };
11256
-
11257
- var NaturalEditorModule = /** @class */ (function () {
11258
- function NaturalEditorModule() {
11259
- }
11260
- return NaturalEditorModule;
11261
- }());
11262
- NaturalEditorModule.decorators = [
11263
- { type: i0.NgModule, args: [{
11264
- declarations: [NaturalEditorComponent],
11265
- imports: [i1$4.CommonModule],
11266
- exports: [NaturalEditorComponent],
11267
- },] }
11268
- ];
11269
-
11270
11146
  /*
11271
11147
  * Public API Surface of natural
11272
11148
  */
@@ -11307,8 +11183,6 @@
11307
11183
  exports.NaturalDialogTriggerModule = NaturalDialogTriggerModule;
11308
11184
  exports.NaturalDropdownComponentsModule = NaturalDropdownComponentsModule;
11309
11185
  exports.NaturalDropdownRef = NaturalDropdownRef;
11310
- exports.NaturalEditorComponent = NaturalEditorComponent;
11311
- exports.NaturalEditorModule = NaturalEditorModule;
11312
11186
  exports.NaturalEllipsisPipe = NaturalEllipsisPipe;
11313
11187
  exports.NaturalEnumPipe = NaturalEnumPipe;
11314
11188
  exports.NaturalEnumService = NaturalEnumService;