@sd-angular/core 1.3.10 → 1.3.12

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,4 +1,4 @@
1
- import { EventEmitter, Component, ChangeDetectionStrategy, ChangeDetectorRef, Input, Output, ContentChild, NgModule } from '@angular/core';
1
+ import { EventEmitter, Component, ChangeDetectionStrategy, ChangeDetectorRef, Input, Output, ContentChild, ViewChild, NgModule } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { MatIconModule } from '@angular/material/icon';
4
4
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -8,13 +8,13 @@ import { SdTranslateModule } from '@sd-angular/core/translate';
8
8
  import { NgForm, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import { SdFormControl, SdLabelDefDirective, SdCommonModule } from '@sd-angular/core/common';
10
10
  import { MatButtonModule } from '@angular/material/button';
11
- import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
11
+ import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
12
12
  import { v4 } from 'uuid';
13
- import { debounceTime } from 'rxjs/operators';
14
- import { Subscription } from 'rxjs';
13
+ import { debounceTime, startWith } from 'rxjs/operators';
14
+ import { Subject, Subscription } from 'rxjs';
15
15
  import JSONEditor from 'jsoneditor';
16
16
 
17
- var _name, _form, _model, _subscription, _reload, _onChange, _updateJson;
17
+ var _name, _form, _model, _container, _containerLoaded, _subscription, _reload, _onChange, _updateJson;
18
18
  class SdJsonEditor {
19
19
  constructor(ref) {
20
20
  this.ref = ref;
@@ -27,10 +27,15 @@ class SdJsonEditor {
27
27
  // Validator
28
28
  this.isRequired = false;
29
29
  this.sdChange = new EventEmitter();
30
+ _container.set(this, void 0);
31
+ _containerLoaded.set(this, new Subject());
30
32
  this.formControl = new SdFormControl();
31
33
  _subscription.set(this, new Subscription());
32
34
  _reload.set(this, () => {
33
35
  var _a;
36
+ if (!__classPrivateFieldGet(this, _container)) {
37
+ return;
38
+ }
34
39
  const container = document.getElementById(this.id);
35
40
  const option = {
36
41
  mode: this.formControl.disabled ? 'view' : 'tree',
@@ -103,13 +108,19 @@ class SdJsonEditor {
103
108
  this.formControl.enable();
104
109
  }
105
110
  }
111
+ set container(container) {
112
+ __classPrivateFieldSet(this, _container, container);
113
+ __classPrivateFieldGet(this, _containerLoaded).next(container);
114
+ }
106
115
  ngOnInit() {
107
116
  __classPrivateFieldGet(this, _subscription).add(this.formControl.sdChanges.subscribe(() => {
108
117
  this.ref.markForCheck();
109
118
  }));
110
119
  }
111
120
  ngAfterViewInit() {
112
- __classPrivateFieldGet(this, _reload).call(this);
121
+ __classPrivateFieldGet(this, _subscription).add(__classPrivateFieldGet(this, _containerLoaded).pipe(startWith(__classPrivateFieldGet(this, _container))).subscribe(() => {
122
+ __classPrivateFieldGet(this, _reload).call(this);
123
+ }));
113
124
  }
114
125
  ngOnDestroy() {
115
126
  var _a;
@@ -117,11 +128,11 @@ class SdJsonEditor {
117
128
  __classPrivateFieldGet(this, _subscription).unsubscribe();
118
129
  }
119
130
  }
120
- _name = new WeakMap(), _form = new WeakMap(), _model = new WeakMap(), _subscription = new WeakMap(), _reload = new WeakMap(), _onChange = new WeakMap(), _updateJson = new WeakMap();
131
+ _name = new WeakMap(), _form = new WeakMap(), _model = new WeakMap(), _container = new WeakMap(), _containerLoaded = new WeakMap(), _subscription = new WeakMap(), _reload = new WeakMap(), _onChange = new WeakMap(), _updateJson = new WeakMap();
121
132
  SdJsonEditor.decorators = [
122
133
  { type: Component, args: [{
123
134
  selector: 'sd-json-editor',
124
- template: "<label *ngIf=\"label&&!sdLabelDef?.templateRef\" class=\"d-block T14M\">{{label}} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div [id]=\"id\" [style.height]=\"height\"></div>\r\n",
135
+ template: "<label *ngIf=\"label&&!sdLabelDef?.templateRef\" class=\"d-block T14M\">{{label}} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></label>\r\n<ng-container *ngIf=\"sdLabelDef?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdLabelDef.templateRef\">\r\n </ng-container>\r\n</ng-container>\r\n<div [id]=\"id\" [style.height]=\"height\" #container></div>\r\n",
125
136
  changeDetection: ChangeDetectionStrategy.OnPush,
126
137
  styles: [""]
127
138
  },] }
@@ -140,7 +151,8 @@ SdJsonEditor.propDecorators = {
140
151
  disabled: [{ type: Input }],
141
152
  tooltip: [{ type: Input }],
142
153
  sdChange: [{ type: Output }],
143
- sdLabelDef: [{ type: ContentChild, args: [SdLabelDefDirective,] }]
154
+ sdLabelDef: [{ type: ContentChild, args: [SdLabelDefDirective,] }],
155
+ container: [{ type: ViewChild, args: ['container',] }]
144
156
  };
145
157
 
146
158
  class SdJsonEditorModule {
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-json-editor.js","sources":["../../../../projects/sd-core/json-editor/src/lib/json-editor.component.ts","../../../../projects/sd-core/json-editor/src/lib/json-editor.module.ts","../../../../projects/sd-core/json-editor/src/public-api.ts","../../../../projects/sd-core/json-editor/sd-angular-core-json-editor.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener\r\n} from '@angular/core';\r\nimport { NgForm, FormGroup } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { Subscription } from 'rxjs';\r\nimport { SdFormControl } from '@sd-angular/core/common';\r\nimport 'jsoneditor';\r\nimport JSONEditor, { JSONEditorOptions } from 'jsoneditor';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\n@Component({\r\n selector: 'sd-json-editor',\r\n templateUrl: './json-editor.component.html',\r\n styleUrls: ['./json-editor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdJsonEditor implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n editor: JSONEditor;\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() height = '400px';\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n @Input() label: string;\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n this.#updateJson();\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n // this.#updateValidator();\r\n }\r\n // Optional\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() tooltip: string | ((inputValue: string) => string);\r\n @Output() sdChange = new EventEmitter<any>();\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n\r\n formControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n constructor(\r\n public ref: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnInit() {\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#reload();\r\n }\r\n\r\n #reload = () => {\r\n const container = document.getElementById(this.id);\r\n const option: JSONEditorOptions = {\r\n mode: this.formControl.disabled ? 'view' : 'tree',\r\n modes: ['tree', 'form', 'text', 'view'],\r\n onChange: () => {\r\n const text = this.editor.getText();\r\n if (!text) {\r\n this.editor.set(null);\r\n this.#model = null;\r\n this.formControl.setValue(this.#model);\r\n } else {\r\n this.#model = this.editor.get();\r\n this.formControl.setValue(this.#model);\r\n }\r\n },\r\n };\r\n this.editor = new JSONEditor(container, option);\r\n this.#updateJson();\r\n this.#subscription.add(this.formControl.valueChanges.pipe(debounceTime(100)).subscribe(this.#onChange));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #onChange = (value: any) => {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n #updateJson = () => {\r\n this.editor?.set?.(this.formControl.value);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdJsonEditor } from './json-editor.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n MatButtonModule\r\n ],\r\n declarations: [\r\n SdJsonEditor,\r\n ],\r\n exports: [\r\n SdJsonEditor\r\n ]\r\n})\r\nexport class SdJsonEditorModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/json-editor.module';\r\nexport * from './lib/json-editor.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;MA6Ba,YAAY;IAsDvB,YACS,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;QAtD/B,OAAE,GAAG,IAAIA,EAAO,EAAE,EAAE,CAAC;QAErB,gBAAQA,EAAO,EAAE,EAAC;QAMT,WAAM,GAAG,OAAO,CAAC;QAC1B,wBAAiB;QAWjB,yBAAY;QAUF,gBAAW,GAAG,IAAI,YAAY,EAAE,CAAC;;QAG3C,eAAU,GAAG,KAAK,CAAC;QAeT,aAAQ,GAAG,IAAI,YAAY,EAAO,CAAC;QAG7C,gBAAW,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,wBAAgB,IAAI,YAAY,EAAE,EAAC;QAenC,kBAAU;;YACR,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnD,MAAM,MAAM,GAAsB;gBAChC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,GAAG,MAAM,GAAG,MAAM;gBACjD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;gBACvC,QAAQ,EAAE;oBACR,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACnC,IAAI,CAAC,IAAI,EAAE;wBACT,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBACtB,uBAAA,IAAI,UAAU,IAAI,EAAC;wBACnB,IAAI,CAAC,WAAW,CAAC,QAAQ,sCAAa,CAAC;qBACxC;yBAAM;wBACL,uBAAA,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC;wBAChC,IAAI,CAAC,WAAW,CAAC,QAAQ,sCAAa,CA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ACAA;;;;;;"}
1
+ {"version":3,"file":"sd-angular-core-json-editor.js","sources":["../../../../projects/sd-core/json-editor/src/lib/json-editor.component.ts","../../../../projects/sd-core/json-editor/src/lib/json-editor.module.ts","../../../../projects/sd-core/json-editor/src/public-api.ts","../../../../projects/sd-core/json-editor/sd-angular-core-json-editor.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener\r\n} from '@angular/core';\r\nimport { NgForm, FormGroup } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport { debounceTime, startWith } from 'rxjs/operators';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { SdFormControl } from '@sd-angular/core/common';\r\nimport 'jsoneditor';\r\nimport JSONEditor, { JSONEditorOptions } from 'jsoneditor';\r\nimport { SdLabelDefDirective } from '@sd-angular/core/common';\r\n@Component({\r\n selector: 'sd-json-editor',\r\n templateUrl: './json-editor.component.html',\r\n styleUrls: ['./json-editor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdJsonEditor implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n editor: JSONEditor;\r\n #name = uuid.v4();\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() height = '400px';\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n @Input() label: string;\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(this.#model, {\r\n emitEvent: false\r\n });\r\n this.#updateJson();\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n // this.#updateValidator();\r\n }\r\n // Optional\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.formControl.disable();\r\n } else {\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() tooltip: string | ((inputValue: string) => string);\r\n @Output() sdChange = new EventEmitter<any>();\r\n @ContentChild(SdLabelDefDirective) sdLabelDef: SdLabelDefDirective;\r\n #container: HTMLElement;\r\n #containerLoaded = new Subject<HTMLElement>();\r\n @ViewChild('container') set container(container: HTMLElement) {\r\n this.#container = container;\r\n this.#containerLoaded.next(container);\r\n }\r\n formControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n constructor(\r\n public ref: ChangeDetectorRef) {\r\n }\r\n\r\n ngOnInit() {\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.#containerLoaded.pipe(startWith(this.#container)).subscribe(() => {\r\n this.#reload();\r\n }));\r\n }\r\n\r\n #reload = () => {\r\n if (!this.#container) {\r\n return;\r\n }\r\n const container = document.getElementById(this.id);\r\n const option: JSONEditorOptions = {\r\n mode: this.formControl.disabled ? 'view' : 'tree',\r\n modes: ['tree', 'form', 'text', 'view'],\r\n onChange: () => {\r\n const text = this.editor.getText();\r\n if (!text) {\r\n this.editor.set(null);\r\n this.#model = null;\r\n this.formControl.setValue(this.#model);\r\n } else {\r\n this.#model = this.editor.get();\r\n this.formControl.setValue(this.#model);\r\n }\r\n },\r\n };\r\n this.editor = new JSONEditor(container, option);\r\n this.#updateJson();\r\n this.#subscription.add(this.formControl.valueChanges.pipe(debounceTime(100)).subscribe(this.#onChange));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #onChange = (value: any) => {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n #updateJson = () => {\r\n this.editor?.set?.(this.formControl.value);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { SdJsonEditor } from './json-editor.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n MatButtonModule\r\n ],\r\n declarations: [\r\n SdJsonEditor,\r\n ],\r\n exports: [\r\n SdJsonEditor\r\n ]\r\n})\r\nexport class SdJsonEditorModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/json-editor.module';\r\nexport * from './lib/json-editor.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;MA6Ba,YAAY;IA2DvB,YACS,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;QA3D/B,OAAE,GAAG,IAAIA,EAAO,EAAE,EAAE,CAAC;QAErB,gBAAQA,EAAO,EAAE,EAAC;QAMT,WAAM,GAAG,OAAO,CAAC;QAC1B,wBAAiB;QAWjB,yBAAY;QAUF,gBAAW,GAAG,IAAI,Y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