@ebuilding/abc 2.0.0 → 2.0.1

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,125 +1,135 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, NgModule } from '@angular/core';
2
+ import { EventEmitter, forwardRef, Input, ViewChild, Output, Component, NgModule } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
5
 
5
- // import { Component, ElementRef, Input, Output, ViewChild, EventEmitter, forwardRef, AfterViewInit } from '@angular/core';
6
- // import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
- // @Component({
8
- // selector: 'deon-python',
9
- // templateUrl: './index.html',
10
- // styleUrls: ['./index.less'],
11
- // providers: [
12
- // {
13
- // provide: NG_VALUE_ACCESSOR,
14
- // useExisting: forwardRef(() => GramPythonComponent),
15
- // multi: true,
16
- // },
17
- // ],
18
- // })
19
- // export class GramPythonComponent implements AfterViewInit {
20
- // @Input() title: any = null;
21
- // @Input() config: any;
22
- // // tslint:disable-next-line:no-output-native
23
- // @Output() change: EventEmitter<any> = new EventEmitter<any>();
24
- // // tslint:disable-next-line:no-output-native
25
- // @Output() focus: EventEmitter<any> = new EventEmitter<any>();
26
- // // tslint:disable-next-line:no-output-native
27
- // @Output() blur: EventEmitter<any> = new EventEmitter<any>();
28
- // @Output() cursorActivity: EventEmitter<any> = new EventEmitter<any>();
29
- // @ViewChild('host') host: ElementRef | undefined;
30
- // private instance: any;
31
- // private val = '';
32
- // get value(): string {
33
- // return this.val;
34
- // }
35
- // @Input() set value(v) {
36
- // if (v !== this.val) {
37
- // this.val = v;
38
- // this.onChange(v);
39
- // }
40
- // }
41
- // /**
42
- // * On component view init
43
- // */
44
- // ngAfterViewInit(): void {
45
- // this.config = this.config || {};
46
- // this.codemirrorInit(this.config);
47
- // }
48
- // /**
49
- // * Initialize codemirror
50
- // */
51
- // codemirrorInit(config: any): void {
52
- // if (!this.host) {
53
- // throw new Error('Internal library error - host must be defined');
54
- // }
55
- // if (typeof window !== 'undefined') {
56
- // import('codemirror')
57
- // // tslint:disable-next-line:no-any
58
- // .then((loaded: any) => {
59
- // // in this case, the .default is required for Typescript Dynamic Imports
60
- // const codemirror = loaded.default;
61
- // this.instance = codemirror.fromTextArea(this.host?.nativeElement, config);
62
- // this.instance.setValue(this.val);
63
- // this.instance.on('change', () => {
64
- // this.updateValue(this.instance.getValue());
65
- // });
66
- // this.instance.on('focus', (instance: any, event: any) => {
67
- // this.focus.emit({ instance, event });
68
- // });
69
- // this.instance.on('cursorActivity', (instance: any) => {
70
- // this.cursorActivity.emit({ instance });
71
- // });
72
- // this.instance.on('blur', (instance: any, event: any) => {
73
- // this.blur.emit({ instance, event });
74
- // });
75
- // })
76
- // .catch((err) => {});
77
- // }
78
- // }
79
- // /**
80
- // * Value update process
81
- // */
82
- // updateValue(value: any): void {
83
- // this.value = value;
84
- // this.onTouched();
85
- // this.change.emit(value);
86
- // }
87
- // /**
88
- // * Implements ControlValueAccessor
89
- // */
90
- // writeValue(value: any): void {
91
- // this.val = value || '';
92
- // if (this.instance) {
93
- // this.instance.setValue(this.val);
94
- // }
95
- // }
96
- // onChange(_: any): void {}
97
- // onTouched(): void {}
98
- // registerOnChange(fn: any): void {
99
- // this.onChange = fn;
100
- // }
101
- // registerOnTouched(fn: any): void {
102
- // this.onTouched = fn;
103
- // }
104
- // }
105
6
  class GramPythonComponent {
106
- constructor() { }
107
- ngOnInit() { }
7
+ title = null;
8
+ config;
9
+ // tslint:disable-next-line:no-output-native
10
+ change = new EventEmitter();
11
+ // tslint:disable-next-line:no-output-native
12
+ focus = new EventEmitter();
13
+ // tslint:disable-next-line:no-output-native
14
+ blur = new EventEmitter();
15
+ cursorActivity = new EventEmitter();
16
+ host;
17
+ instance;
18
+ val = '';
19
+ get value() {
20
+ return this.val;
21
+ }
22
+ set value(v) {
23
+ if (v !== this.val) {
24
+ this.val = v;
25
+ this.onChange(v);
26
+ }
27
+ }
28
+ /**
29
+ * On component view init
30
+ */
31
+ ngAfterViewInit() {
32
+ this.config = this.config || {};
33
+ this.codemirrorInit(this.config);
34
+ }
35
+ /**
36
+ * Initialize codemirror
37
+ */
38
+ codemirrorInit(config) {
39
+ if (!this.host) {
40
+ throw new Error('Internal library error - host must be defined');
41
+ }
42
+ if (typeof window !== 'undefined') {
43
+ import('codemirror')
44
+ // tslint:disable-next-line:no-any
45
+ .then((loaded) => {
46
+ // in this case, the .default is required for Typescript Dynamic Imports
47
+ const codemirror = loaded.default;
48
+ this.instance = codemirror.fromTextArea(this.host?.nativeElement, config);
49
+ this.instance.setValue(this.val);
50
+ this.instance.on('change', () => {
51
+ this.updateValue(this.instance.getValue());
52
+ });
53
+ this.instance.on('focus', (instance, event) => {
54
+ this.focus.emit({ instance, event });
55
+ });
56
+ this.instance.on('cursorActivity', (instance) => {
57
+ this.cursorActivity.emit({ instance });
58
+ });
59
+ this.instance.on('blur', (instance, event) => {
60
+ this.blur.emit({ instance, event });
61
+ });
62
+ })
63
+ .catch((err) => { });
64
+ }
65
+ }
66
+ /**
67
+ * Value update process
68
+ */
69
+ updateValue(value) {
70
+ this.value = value;
71
+ this.onTouched();
72
+ this.change.emit(value);
73
+ }
74
+ /**
75
+ * Implements ControlValueAccessor
76
+ */
77
+ writeValue(value) {
78
+ this.val = value || '';
79
+ if (this.instance) {
80
+ this.instance.setValue(this.val);
81
+ }
82
+ }
83
+ onChange(_) { }
84
+ onTouched() { }
85
+ registerOnChange(fn) {
86
+ this.onChange = fn;
87
+ }
88
+ registerOnTouched(fn) {
89
+ this.onTouched = fn;
90
+ }
108
91
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GramPythonComponent, isStandalone: true, selector: "deon-python", ngImport: i0, template: "<!-- <div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div> -->", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;overflow:auto}:host ::ng-deep .CodeMirror{flex:1;height:100%;min-height:400px}:host ::ng-deep input::placeholder{font-size:12px!important}:host ::ng-deep .ant-input{font-size:12px!important;border:0!important}:host ::ng-deep .ant-input:focus{box-shadow:none!important}:host ::ng-deep .formula-head{display:flex;flex:1;flex-direction:column;width:100%;overflow:hidden;font-size:12px;border:1px solid #eaeaea;border-radius:4px}:host ::ng-deep .formula-head .formula-title{display:inline-block;width:100%;padding:8px 12px;background:#f3f8fb}:host ::ng-deep .formula-head .formula-body{flex:1;padding:12px 12px 0}:host ::ng-deep .formula-head .formula-body .button-body{display:inline-block;width:100%;padding:0 0 10px;text-align:right}:host ::ng-deep .formula-head .formula-body .button-body button{font-size:12px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
92
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GramPythonComponent, isStandalone: true, selector: "deon-python", inputs: { title: "title", config: "config", value: "value" }, outputs: { change: "change", focus: "focus", blur: "blur", cursorActivity: "cursorActivity" }, providers: [
93
+ {
94
+ provide: NG_VALUE_ACCESSOR,
95
+ useExisting: forwardRef(() => GramPythonComponent),
96
+ multi: true,
97
+ },
98
+ ], viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true }], ngImport: i0, template: "<div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;overflow:auto}:host ::ng-deep .CodeMirror{flex:1;height:100%;min-height:400px}:host ::ng-deep input::placeholder{font-size:12px!important}:host ::ng-deep .ant-input{font-size:12px!important;border:0!important}:host ::ng-deep .ant-input:focus{box-shadow:none!important}:host ::ng-deep .formula-head{display:flex;flex:1;flex-direction:column;width:100%;overflow:hidden;font-size:12px;border:1px solid #eaeaea;border-radius:4px}:host ::ng-deep .formula-head .formula-title{display:inline-block;width:100%;padding:8px 12px;background:#f3f8fb}:host ::ng-deep .formula-head .formula-body{flex:1;padding:12px 12px 0}:host ::ng-deep .formula-head .formula-body .button-body{display:inline-block;width:100%;padding:0 0 10px;text-align:right}:host ::ng-deep .formula-head .formula-body .button-body button{font-size:12px!important}\n"] });
110
99
  }
111
100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonComponent, decorators: [{
112
101
  type: Component,
113
- args: [{ selector: 'deon-python', imports: [
114
- CommonModule
115
- ], template: "<!-- <div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div> -->", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;overflow:auto}:host ::ng-deep .CodeMirror{flex:1;height:100%;min-height:400px}:host ::ng-deep input::placeholder{font-size:12px!important}:host ::ng-deep .ant-input{font-size:12px!important;border:0!important}:host ::ng-deep .ant-input:focus{box-shadow:none!important}:host ::ng-deep .formula-head{display:flex;flex:1;flex-direction:column;width:100%;overflow:hidden;font-size:12px;border:1px solid #eaeaea;border-radius:4px}:host ::ng-deep .formula-head .formula-title{display:inline-block;width:100%;padding:8px 12px;background:#f3f8fb}:host ::ng-deep .formula-head .formula-body{flex:1;padding:12px 12px 0}:host ::ng-deep .formula-head .formula-body .button-body{display:inline-block;width:100%;padding:0 0 10px;text-align:right}:host ::ng-deep .formula-head .formula-body .button-body button{font-size:12px!important}\n"] }]
116
- }], ctorParameters: () => [] });
102
+ args: [{ selector: 'deon-python', providers: [
103
+ {
104
+ provide: NG_VALUE_ACCESSOR,
105
+ useExisting: forwardRef(() => GramPythonComponent),
106
+ multi: true,
107
+ },
108
+ ], template: "<div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div>", styles: [":host ::ng-deep{display:flex;flex:1;flex-direction:column;width:100%;overflow:auto}:host ::ng-deep .CodeMirror{flex:1;height:100%;min-height:400px}:host ::ng-deep input::placeholder{font-size:12px!important}:host ::ng-deep .ant-input{font-size:12px!important;border:0!important}:host ::ng-deep .ant-input:focus{box-shadow:none!important}:host ::ng-deep .formula-head{display:flex;flex:1;flex-direction:column;width:100%;overflow:hidden;font-size:12px;border:1px solid #eaeaea;border-radius:4px}:host ::ng-deep .formula-head .formula-title{display:inline-block;width:100%;padding:8px 12px;background:#f3f8fb}:host ::ng-deep .formula-head .formula-body{flex:1;padding:12px 12px 0}:host ::ng-deep .formula-head .formula-body .button-body{display:inline-block;width:100%;padding:0 0 10px;text-align:right}:host ::ng-deep .formula-head .formula-body .button-body button{font-size:12px!important}\n"] }]
109
+ }], propDecorators: { title: [{
110
+ type: Input
111
+ }], config: [{
112
+ type: Input
113
+ }], change: [{
114
+ type: Output
115
+ }], focus: [{
116
+ type: Output
117
+ }], blur: [{
118
+ type: Output
119
+ }], cursorActivity: [{
120
+ type: Output
121
+ }], host: [{
122
+ type: ViewChild,
123
+ args: ['host']
124
+ }], value: [{
125
+ type: Input
126
+ }] } });
117
127
 
118
128
  const components = [GramPythonComponent];
119
129
  class GramPythonModule {
120
130
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
121
131
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: GramPythonModule, imports: [CommonModule, GramPythonComponent], exports: [GramPythonComponent] });
122
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonModule, imports: [CommonModule, components] });
132
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonModule, imports: [CommonModule] });
123
133
  }
124
134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramPythonModule, decorators: [{
125
135
  type: NgModule,
@@ -1 +1 @@
1
- {"version":3,"file":"components.python.mjs","sources":["../../../../packages/abc/python/src/default/index.ts","../../../../packages/abc/python/src/default/index.html","../../../../packages/abc/python/src/index.module.ts","../../../../packages/abc/python/components.python.ts"],"sourcesContent":["// import { Component, ElementRef, Input, Output, ViewChild, EventEmitter, forwardRef, AfterViewInit } from '@angular/core';\n// import { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// @Component({\n// selector: 'deon-python',\n// templateUrl: './index.html',\n// styleUrls: ['./index.less'],\n// providers: [\n// {\n// provide: NG_VALUE_ACCESSOR,\n// useExisting: forwardRef(() => GramPythonComponent),\n// multi: true,\n// },\n// ],\n// })\n// export class GramPythonComponent implements AfterViewInit {\n// @Input() title: any = null;\n\n// @Input() config: any;\n\n// // tslint:disable-next-line:no-output-native\n// @Output() change: EventEmitter<any> = new EventEmitter<any>();\n// // tslint:disable-next-line:no-output-native\n// @Output() focus: EventEmitter<any> = new EventEmitter<any>();\n// // tslint:disable-next-line:no-output-native\n// @Output() blur: EventEmitter<any> = new EventEmitter<any>();\n\n// @Output() cursorActivity: EventEmitter<any> = new EventEmitter<any>();\n\n// @ViewChild('host') host: ElementRef | undefined;\n\n// private instance: any;\n// private val = '';\n\n// get value(): string {\n// return this.val;\n// }\n\n// @Input() set value(v) {\n// if (v !== this.val) {\n// this.val = v;\n// this.onChange(v);\n// }\n// }\n\n// /**\n// * On component view init\n// */\n// ngAfterViewInit(): void {\n// this.config = this.config || {};\n// this.codemirrorInit(this.config);\n// }\n\n// /**\n// * Initialize codemirror\n// */\n// codemirrorInit(config: any): void {\n// if (!this.host) {\n// throw new Error('Internal library error - host must be defined');\n// }\n\n// if (typeof window !== 'undefined') {\n// import('codemirror')\n// // tslint:disable-next-line:no-any\n// .then((loaded: any) => {\n// // in this case, the .default is required for Typescript Dynamic Imports\n// const codemirror = loaded.default;\n\n// this.instance = codemirror.fromTextArea(this.host?.nativeElement, config);\n// this.instance.setValue(this.val);\n\n// this.instance.on('change', () => {\n// this.updateValue(this.instance.getValue());\n// });\n\n// this.instance.on('focus', (instance: any, event: any) => {\n// this.focus.emit({ instance, event });\n// });\n\n// this.instance.on('cursorActivity', (instance: any) => {\n// this.cursorActivity.emit({ instance });\n// });\n\n// this.instance.on('blur', (instance: any, event: any) => {\n// this.blur.emit({ instance, event });\n// });\n// })\n// .catch((err) => {});\n// }\n// }\n\n// /**\n// * Value update process\n// */\n// updateValue(value: any): void {\n// this.value = value;\n// this.onTouched();\n// this.change.emit(value);\n// }\n\n// /**\n// * Implements ControlValueAccessor\n// */\n// writeValue(value: any): void {\n// this.val = value || '';\n// if (this.instance) {\n// this.instance.setValue(this.val);\n// }\n// }\n\n// onChange(_: any): void {}\n\n// onTouched(): void {}\n\n// registerOnChange(fn: any): void {\n// this.onChange = fn;\n// }\n\n// registerOnTouched(fn: any): void {\n// this.onTouched = fn;\n// }\n// }\n\nimport { Component, OnInit, Input } from '@angular/core';\nimport { CommonModule } from \"@angular/common\";\n\n@Component({\n selector: 'deon-python',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n imports: [\n CommonModule\n ]\n})\nexport class GramPythonComponent implements OnInit {\n\n constructor() { }\n ngOnInit() { }\n}\n","<!-- <div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div> -->","\nimport {\n NgModule, \n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\"; \nimport { GramPythonComponent } from './default/index';\n \n\nconst components: any[] = [GramPythonComponent];\n\n@NgModule({\n exports: [...components],\n imports: [\n CommonModule, \n ...components\n ], \n})\nexport class GramPythonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;MAaa,mBAAmB,CAAA;AAE9B,IAAA,WAAA,GAAA;AACA,IAAA,QAAQ;wGAHG,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtIhC,gQAOU,EAAA,MAAA,EAAA,CAAA,83BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED4HN,YAAY,EAAA,CAAA,EAAA,CAAA;;4FAGH,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAGd,OAAA,EAAA;wBACP;AACD,qBAAA,EAAA,QAAA,EAAA,gQAAA,EAAA,MAAA,EAAA,CAAA,83BAAA,CAAA,EAAA;;;AE5HH,MAAM,UAAU,GAAU,CAAC,mBAAmB,CAAC;MASlC,gBAAgB,CAAA;wGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAJzB,OAAA,EAAA,CAAA,YAAY,EALW,mBAAmB,aAAnB,mBAAmB,CAAA,EAAA,CAAA;yGASjC,gBAAgB,EAAA,OAAA,EAAA,CAJzB,YAAY,EACT,UAAU,CAAA,EAAA,CAAA;;4FAGJ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACZ,wBAAA,GAAG;AACJ,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"components.python.mjs","sources":["../../../../packages/abc/python/src/default/index.ts","../../../../packages/abc/python/src/default/index.html","../../../../packages/abc/python/src/index.module.ts","../../../../packages/abc/python/components.python.ts"],"sourcesContent":["import { Component, ElementRef, Input, Output, ViewChild, EventEmitter, forwardRef, AfterViewInit } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'deon-python',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GramPythonComponent),\n multi: true,\n },\n ],\n})\nexport class GramPythonComponent implements AfterViewInit {\n @Input() title: any = null;\n\n @Input() config: any;\n\n // tslint:disable-next-line:no-output-native\n @Output() change: EventEmitter<any> = new EventEmitter<any>();\n // tslint:disable-next-line:no-output-native\n @Output() focus: EventEmitter<any> = new EventEmitter<any>();\n // tslint:disable-next-line:no-output-native\n @Output() blur: EventEmitter<any> = new EventEmitter<any>();\n\n @Output() cursorActivity: EventEmitter<any> = new EventEmitter<any>();\n\n @ViewChild('host') host: ElementRef | undefined;\n\n private instance: any;\n private val = '';\n\n get value(): string {\n return this.val;\n }\n\n @Input() set value(v) {\n if (v !== this.val) {\n this.val = v;\n this.onChange(v);\n }\n }\n\n /**\n * On component view init\n */\n ngAfterViewInit(): void {\n this.config = this.config || {};\n this.codemirrorInit(this.config);\n }\n\n /**\n * Initialize codemirror\n */\n codemirrorInit(config: any): void {\n if (!this.host) {\n throw new Error('Internal library error - host must be defined');\n }\n\n if (typeof window !== 'undefined') {\n import('codemirror')\n // tslint:disable-next-line:no-any\n .then((loaded: any) => {\n // in this case, the .default is required for Typescript Dynamic Imports\n const codemirror = loaded.default;\n\n this.instance = codemirror.fromTextArea(this.host?.nativeElement, config);\n this.instance.setValue(this.val);\n\n this.instance.on('change', () => {\n this.updateValue(this.instance.getValue());\n });\n\n this.instance.on('focus', (instance: any, event: any) => {\n this.focus.emit({ instance, event });\n });\n\n this.instance.on('cursorActivity', (instance: any) => {\n this.cursorActivity.emit({ instance });\n });\n\n this.instance.on('blur', (instance: any, event: any) => {\n this.blur.emit({ instance, event });\n });\n })\n .catch((err) => { });\n }\n }\n\n /**\n * Value update process\n */\n updateValue(value: any): void {\n this.value = value;\n this.onTouched();\n this.change.emit(value);\n }\n\n /**\n * Implements ControlValueAccessor\n */\n writeValue(value: any): void {\n this.val = value || '';\n if (this.instance) {\n this.instance.setValue(this.val);\n }\n }\n\n onChange(_: any): void { }\n\n onTouched(): void { }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n}\n","<div class=\"formula-head\">\n <div class=\"formula-title\">\n <span class=\"formula-name\">{{ title }}</span><span class=\"formula-equal\">=</span>\n </div>\n <div class=\"formula-body\">\n <textarea #host></textarea>\n </div>\n</div>","\nimport {\n NgModule, \n} from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\"; \nimport { GramPythonComponent } from './default/index';\n \n\nconst components: any[] = [GramPythonComponent];\n\n@NgModule({\n exports: [...components],\n imports: [\n CommonModule, \n ...components\n ], \n})\nexport class GramPythonModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAea,mBAAmB,CAAA;IACrB,KAAK,GAAQ,IAAI;AAEjB,IAAA,MAAM;;AAGL,IAAA,MAAM,GAAsB,IAAI,YAAY,EAAO;;AAEnD,IAAA,KAAK,GAAsB,IAAI,YAAY,EAAO;;AAElD,IAAA,IAAI,GAAsB,IAAI,YAAY,EAAO;AAEjD,IAAA,cAAc,GAAsB,IAAI,YAAY,EAAO;AAElD,IAAA,IAAI;AAEf,IAAA,QAAQ;IACR,GAAG,GAAG,EAAE;AAEhB,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,GAAG;;IAGjB,IAAa,KAAK,CAAC,CAAC,EAAA;AAClB,QAAA,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE;AAClB,YAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,YAAA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;;AAIpB;;AAEG;IACH,eAAe,GAAA;QACb,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE;AAC/B,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC;;AAGlC;;AAEG;AACH,IAAA,cAAc,CAAC,MAAW,EAAA;AACxB,QAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;AAC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mBAAmB,aAAnB,mBAAmB,CAAA,EAAA,CAAA;AASjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAJzB,YAAY,CAAA,EAAA,CAAA;;4FAIH,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACZ,wBAAA,GAAG;AACJ,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebuilding/abc",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "dependencies": {
5
5
  "extend": "undefined",
6
6
  "tslib": "^2.3.0"
@@ -23,6 +23,10 @@
23
23
  "types": "./card/index.d.ts",
24
24
  "default": "./fesm2022/components.card.mjs"
25
25
  },
26
+ "./card-list": {
27
+ "types": "./card-list/index.d.ts",
28
+ "default": "./fesm2022/components.card-list.mjs"
29
+ },
26
30
  "./card-emp": {
27
31
  "types": "./card-emp/index.d.ts",
28
32
  "default": "./fesm2022/components.card-emp.mjs"
@@ -31,10 +35,6 @@
31
35
  "types": "./card-assess/index.d.ts",
32
36
  "default": "./fesm2022/components.card-assess.mjs"
33
37
  },
34
- "./card-list": {
35
- "types": "./card-list/index.d.ts",
36
- "default": "./fesm2022/components.card-list.mjs"
37
- },
38
38
  "./card-okr": {
39
39
  "types": "./card-okr/index.d.ts",
40
40
  "default": "./fesm2022/components.card-okr.mjs"
@@ -47,22 +47,18 @@
47
47
  "types": "./card-result/index.d.ts",
48
48
  "default": "./fesm2022/components.card-result.mjs"
49
49
  },
50
- "./card-score": {
51
- "types": "./card-score/index.d.ts",
52
- "default": "./fesm2022/components.card-score.mjs"
53
- },
54
50
  "./card-user": {
55
51
  "types": "./card-user/index.d.ts",
56
52
  "default": "./fesm2022/components.card-user.mjs"
57
53
  },
54
+ "./card-score": {
55
+ "types": "./card-score/index.d.ts",
56
+ "default": "./fesm2022/components.card-score.mjs"
57
+ },
58
58
  "./card2": {
59
59
  "types": "./card2/index.d.ts",
60
60
  "default": "./fesm2022/components.card2.mjs"
61
61
  },
62
- "./codemirror": {
63
- "types": "./codemirror/index.d.ts",
64
- "default": "./fesm2022/codemirror.mjs"
65
- },
66
62
  "./collect": {
67
63
  "types": "./collect/index.d.ts",
68
64
  "default": "./fesm2022/components.collect.mjs"
@@ -79,10 +75,6 @@
79
75
  "types": "./flow-button/index.d.ts",
80
76
  "default": "./fesm2022/components.flow-button.mjs"
81
77
  },
82
- "./header": {
83
- "types": "./header/index.d.ts",
84
- "default": "./fesm2022/components.header.mjs"
85
- },
86
78
  "./header-user": {
87
79
  "types": "./header-user/index.d.ts",
88
80
  "default": "./fesm2022/components.header-user.mjs"
@@ -91,17 +83,17 @@
91
83
  "types": "./line/index.d.ts",
92
84
  "default": "./fesm2022/components.line.mjs"
93
85
  },
94
- "./nz-table": {
95
- "types": "./nz-table/index.d.ts",
96
- "default": "./fesm2022/components.nz-table.mjs"
97
- },
98
86
  "./no-role": {
99
87
  "types": "./no-role/index.d.ts",
100
88
  "default": "./fesm2022/components.no-role.mjs"
101
89
  },
102
- "./plan-item": {
103
- "types": "./plan-item/index.d.ts",
104
- "default": "./fesm2022/components.plan-item.mjs"
90
+ "./header": {
91
+ "types": "./header/index.d.ts",
92
+ "default": "./fesm2022/components.header.mjs"
93
+ },
94
+ "./nz-table": {
95
+ "types": "./nz-table/index.d.ts",
96
+ "default": "./fesm2022/components.nz-table.mjs"
105
97
  },
106
98
  "./nz-table-tree": {
107
99
  "types": "./nz-table-tree/index.d.ts",
@@ -111,25 +103,25 @@
111
103
  "types": "./principal/index.d.ts",
112
104
  "default": "./fesm2022/components.principal.mjs"
113
105
  },
114
- "./record": {
115
- "types": "./record/index.d.ts",
116
- "default": "./fesm2022/components.record.mjs"
117
- },
118
106
  "./python": {
119
107
  "types": "./python/index.d.ts",
120
108
  "default": "./fesm2022/components.python.mjs"
121
109
  },
122
- "./step-entry": {
123
- "types": "./step-entry/index.d.ts",
124
- "default": "./fesm2022/components.step-entry.mjs"
110
+ "./plan-item": {
111
+ "types": "./plan-item/index.d.ts",
112
+ "default": "./fesm2022/components.plan-item.mjs"
125
113
  },
126
114
  "./quick": {
127
115
  "types": "./quick/index.d.ts",
128
116
  "default": "./fesm2022/components.quick.mjs"
129
117
  },
130
- "./target-value": {
131
- "types": "./target-value/index.d.ts",
132
- "default": "./fesm2022/components.target-value.mjs"
118
+ "./record": {
119
+ "types": "./record/index.d.ts",
120
+ "default": "./fesm2022/components.record.mjs"
121
+ },
122
+ "./step-entry": {
123
+ "types": "./step-entry/index.d.ts",
124
+ "default": "./fesm2022/components.step-entry.mjs"
133
125
  },
134
126
  "./text": {
135
127
  "types": "./text/index.d.ts",
@@ -138,6 +130,10 @@
138
130
  "./tree": {
139
131
  "types": "./tree/index.d.ts",
140
132
  "default": "./fesm2022/components.tree.mjs"
133
+ },
134
+ "./target-value": {
135
+ "types": "./target-value/index.d.ts",
136
+ "default": "./fesm2022/components.target-value.mjs"
141
137
  }
142
138
  },
143
139
  "sideEffects": false
@@ -1,8 +1,37 @@
1
- import { OnInit } from '@angular/core';
1
+ import { ElementRef, EventEmitter, AfterViewInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class GramPythonComponent implements OnInit {
4
- constructor();
5
- ngOnInit(): void;
3
+ export declare class GramPythonComponent implements AfterViewInit {
4
+ title: any;
5
+ config: any;
6
+ change: EventEmitter<any>;
7
+ focus: EventEmitter<any>;
8
+ blur: EventEmitter<any>;
9
+ cursorActivity: EventEmitter<any>;
10
+ host: ElementRef | undefined;
11
+ private instance;
12
+ private val;
13
+ get value(): string;
14
+ set value(v: string);
15
+ /**
16
+ * On component view init
17
+ */
18
+ ngAfterViewInit(): void;
19
+ /**
20
+ * Initialize codemirror
21
+ */
22
+ codemirrorInit(config: any): void;
23
+ /**
24
+ * Value update process
25
+ */
26
+ updateValue(value: any): void;
27
+ /**
28
+ * Implements ControlValueAccessor
29
+ */
30
+ writeValue(value: any): void;
31
+ onChange(_: any): void;
32
+ onTouched(): void;
33
+ registerOnChange(fn: any): void;
34
+ registerOnTouched(fn: any): void;
6
35
  static ɵfac: i0.ɵɵFactoryDeclaration<GramPythonComponent, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<GramPythonComponent, "deon-python", never, {}, {}, never, never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<GramPythonComponent, "deon-python", never, { "title": { "alias": "title"; "required": false; }; "config": { "alias": "config"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; "focus": "focus"; "blur": "blur"; "cursorActivity": "cursorActivity"; }, never, never, true, never>;
8
37
  }
@@ -1 +0,0 @@
1
- export * from './src/public_api';
@@ -1,10 +0,0 @@
1
- import { OnInit, AfterViewInit, OnChanges } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class GramCodemirrorComponent implements OnInit, AfterViewInit, OnChanges {
4
- constructor();
5
- ngOnInit(): void;
6
- ngAfterViewInit(): void;
7
- ngOnChanges(change: any): void;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<GramCodemirrorComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<GramCodemirrorComponent, "deon-codemirror", never, {}, {}, never, never, true, never>;
10
- }
@@ -1,7 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./default/index";
3
- export declare class GramCodemirrorModule {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<GramCodemirrorModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<GramCodemirrorModule, never, [typeof i1.GramCodemirrorComponent], [typeof i1.GramCodemirrorComponent]>;
6
- static ɵinj: i0.ɵɵInjectorDeclaration<GramCodemirrorModule>;
7
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Public API surface of GramCodemirror
3
- */
4
- export * from './default/index';
5
- export * from './index.module';