diff --git a/.gitignore b/.gitignore index a42097164..f4a945dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ testem.log Thumbs.db *.env + +**/proxies-list.txt diff --git a/angular.json b/angular.json index 6f7caba41..53a9f025f 100644 --- a/angular.json +++ b/angular.json @@ -985,6 +985,11 @@ "glob": "**/*", "input": "node_modules/monaco-editor/min", "output": "./assets/monaco" + }, + { + "glob": "**/*", + "input": "node_modules/@aiao/elements/lib/aiao-elements/assets", + "output": "./assets" } ], "styles": [ @@ -1453,6 +1458,11 @@ "glob": "**/*", "input": "node_modules/monaco-editor/min", "output": "./assets/monaco" + }, + { + "glob": "**/*", + "input": "node_modules/@aiao/elements/lib/aiao-elements/assets", + "output": "./assets" } ], "styles": ["apps/dev-elements-react/src/theme/variables.scss", "apps/dev-elements-react/src/global.scss"], diff --git a/apps/dev-elements-angular/src/app/app-routing.module.ts b/apps/dev-elements-angular/src/app/app-routing.module.ts index d79801187..489b28442 100644 --- a/apps/dev-elements-angular/src/app/app-routing.module.ts +++ b/apps/dev-elements-angular/src/app/app-routing.module.ts @@ -14,6 +14,10 @@ const routes: Routes = [ path: 'elements-preview', loadChildren: () => import('./elements-preview/elements-preview.module').then(_ => _.ElementsPreviewModule) }, + { + path: 'text-editor', + loadChildren: () => import('./text-editor/text-editor.module').then(_ => _.TextEditorModule) + }, { path: '', redirectTo: 'code-editor', diff --git a/apps/dev-elements-angular/src/app/app.component.ts b/apps/dev-elements-angular/src/app/app.component.ts index 6d3f261e9..8c830e700 100644 --- a/apps/dev-elements-angular/src/app/app.component.ts +++ b/apps/dev-elements-angular/src/app/app.component.ts @@ -28,6 +28,11 @@ export class AppComponent { title: 'Elements Preview', url: '/elements-preview', icon: 'link' + }, + { + title: 'Text Editor', + url: '/text-editor', + icon: 'link' } ]; } diff --git a/apps/dev-elements-angular/src/app/text-editor/text-editor.component.html b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.html new file mode 100644 index 000000000..5e1ed28b2 --- /dev/null +++ b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.html @@ -0,0 +1,11 @@ + + + + + + Elements Preview + + + + + diff --git a/apps/dev-elements-angular/src/app/text-editor/text-editor.component.scss b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/apps/dev-elements-angular/src/app/text-editor/text-editor.component.spec.ts b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.spec.ts new file mode 100644 index 000000000..5c5b2a187 --- /dev/null +++ b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.spec.ts @@ -0,0 +1,28 @@ +import { AiaoElementsModule } from '@aiao/elements-angular'; +import { CommonModule } from '@angular/common'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { TextEditorComponent } from './text-editor.component'; + +describe('TextEditorComponent', () => { + let component: TextEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TextEditorComponent], + imports: [CommonModule, IonicModule, AiaoElementsModule] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TextEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/apps/dev-elements-angular/src/app/text-editor/text-editor.component.ts b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.ts new file mode 100644 index 000000000..81d7cb84a --- /dev/null +++ b/apps/dev-elements-angular/src/app/text-editor/text-editor.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-text-editor', + templateUrl: './text-editor.component.html', + styleUrls: ['./text-editor.component.scss'] +}) +export class TextEditorComponent implements OnInit { + hello = '

hello world

'; + + constructor() {} + + ngOnInit(): void {} +} diff --git a/apps/dev-elements-angular/src/app/text-editor/text-editor.module.ts b/apps/dev-elements-angular/src/app/text-editor/text-editor.module.ts new file mode 100644 index 000000000..c66793c74 --- /dev/null +++ b/apps/dev-elements-angular/src/app/text-editor/text-editor.module.ts @@ -0,0 +1,20 @@ +import { AiaoElementsModule } from '@aiao/elements-angular'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; +import { RouterModule, Routes } from '@angular/router'; +import { IonicModule } from '@ionic/angular'; + +import { TextEditorComponent } from './text-editor.component'; + +const routes: Routes = [ + { + path: '', + component: TextEditorComponent + } +]; +@NgModule({ + declarations: [TextEditorComponent], + imports: [CommonModule, IonicModule, AiaoElementsModule, ReactiveFormsModule, RouterModule.forChild(routes)] +}) +export class TextEditorModule {} diff --git a/apps/dev-elements-react/src/app/app.tsx b/apps/dev-elements-react/src/app/app.tsx index 97326c1b2..597276909 100644 --- a/apps/dev-elements-react/src/app/app.tsx +++ b/apps/dev-elements-react/src/app/app.tsx @@ -9,6 +9,7 @@ import { IonReactRouter } from '@ionic/react-router'; import CodeEditorPage from './code-editor/code-editor'; import ElementsEditorPage from './elements-editor/ElementsEditor'; import ElementsPreviewPage from './elements-preview/ElementsPreview'; +import TextEditorPage from './text-editor/TextEditor'; import Menu from './menu/Menu'; export const App: React.FunctionComponent = () => { @@ -23,6 +24,7 @@ export const App: React.FunctionComponent = () => { + } /> diff --git a/apps/dev-elements-react/src/app/menu/Menu.tsx b/apps/dev-elements-react/src/app/menu/Menu.tsx index 4d5e6b888..bbd47b97b 100644 --- a/apps/dev-elements-react/src/app/menu/Menu.tsx +++ b/apps/dev-elements-react/src/app/menu/Menu.tsx @@ -43,6 +43,11 @@ const appPages: IMenu[] = [ title: 'Elements Preview', url: '/elements-preview', icon: link + }, + { + title: 'Text Editor', + url: '/text-editor', + icon: link } ]; diff --git a/apps/dev-elements-react/src/app/text-editor/TextEditor.scss b/apps/dev-elements-react/src/app/text-editor/TextEditor.scss new file mode 100644 index 000000000..e69de29bb diff --git a/apps/dev-elements-react/src/app/text-editor/TextEditor.tsx b/apps/dev-elements-react/src/app/text-editor/TextEditor.tsx new file mode 100644 index 000000000..ab2115ef0 --- /dev/null +++ b/apps/dev-elements-react/src/app/text-editor/TextEditor.tsx @@ -0,0 +1,29 @@ +import './TextEditor.scss'; + +import React, { useState } from 'react'; +import { withRouter } from 'react-router-dom'; + +import { AiaoTextEditor } from '@aiao/elements-react'; +import { IonButtons, IonContent, IonHeader, IonMenuButton, IonPage, IonTitle, IonToolbar } from '@ionic/react'; + +const ELementsPreviewPage: React.FC = () => { + const [hello, setHello] = useState('hello world'); + + return ( + + + + + + + elements editor + + + + + + + ); +}; + +export default withRouter(ELementsPreviewPage); diff --git a/libs/elements-angular/src/lib/directives/proxies-list.txt b/libs/elements-angular/src/lib/directives/proxies-list.txt deleted file mode 100644 index 0e246f389..000000000 --- a/libs/elements-angular/src/lib/directives/proxies-list.txt +++ /dev/null @@ -1,15 +0,0 @@ - -import * as d from './proxies'; - -export const DIRECTIVES = [ -d.AiaoCodeDiffEditor, - d.AiaoCodeEditor, - d.AiaoElementsEditor, - d.AiaoElementsEditorPreview, - d.AiaoElementsForm, - d.AiaoElementsView, - d.AiaoImg, - d.AiaoTextEditor, - d.AiaoTree, - d.AiaoTreeNode -]; diff --git a/libs/elements-angular/src/lib/directives/proxies.ts b/libs/elements-angular/src/lib/directives/proxies.ts index caf051b5a..52cc0c987 100644 --- a/libs/elements-angular/src/lib/directives/proxies.ts +++ b/libs/elements-angular/src/lib/directives/proxies.ts @@ -68,8 +68,8 @@ export class AiaoElementsForm { } export declare interface AiaoElementsView extends Components.AiaoElementsView {} -@ProxyCmp({inputs: ['html']}) -@Component({ selector: 'aiao-elements-view', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['html'] }) +@ProxyCmp({inputs: ['css', 'html', 'js']}) +@Component({ selector: 'aiao-elements-view', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['css', 'html', 'js'] }) export class AiaoElementsView { protected el: HTMLElement; constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { @@ -93,15 +93,16 @@ export class AiaoImg { } export declare interface AiaoTextEditor extends Components.AiaoTextEditor {} -@ProxyCmp({inputs: ['defaultParagraphSeparator', 'disabled', 'edit', 'element', 'name', 'placeholder', 'value'], 'methods': ['bold', 'italic', 'underline', 'strikethrough', 'heading', 'paragraph', 'backColor', 'foreColor', 'quote', 'indent', 'outdent', 'olist', 'ulist', 'line', 'insertHTML', 'link', 'unlink', 'image', 'alginCenter', 'alginLeft', 'alginFull', 'alginRight', 'undo', 'redo', 'getSelectionElements', 'saveSelection', 'restoreSelection']}) -@Component({ selector: 'aiao-text-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['defaultParagraphSeparator', 'disabled', 'edit', 'element', 'name', 'placeholder', 'value'] }) +@ProxyCmp({inputs: ['actionBar', 'defaultParagraphSeparator', 'disabled', 'element', 'name', 'value'], 'methods': ['getSelectionElements', 'saveSelection', 'restoreSelection', 'action']}) +@Component({ selector: 'aiao-text-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['actionBar', 'defaultParagraphSeparator', 'disabled', 'element', 'name', 'value'] }) export class AiaoTextEditor { - mlabChange!: EventEmitter; + aiaoChange!: EventEmitter; + aiaoStateChange!: EventEmitter; protected el: HTMLElement; constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { c.detach(); this.el = r.nativeElement; - proxyOutputs(this, this.el, ['mlabChange']); + proxyOutputs(this, this.el, ['aiaoChange', 'aiaoStateChange']); } } @@ -109,34 +110,13 @@ export declare interface AiaoTree extends Components.AiaoTree {} @ProxyCmp({inputs: ['autoExpandParent', 'canDrag', 'checkable', 'config', 'data', 'defaultExpandLevel', 'defaultExpandParent', 'defaultExpandedKeys', 'defaultSelectedKeys', 'disabled', 'multiple', 'selectable', 'showIcon', 'showLine', 'showMode'], 'methods': ['canDrop', 'select', 'overElement', 'outElement', 'nodeRefMap']}) @Component({ selector: 'aiao-tree', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['autoExpandParent', 'canDrag', 'checkable', 'config', 'data', 'defaultExpandLevel', 'defaultExpandParent', 'defaultExpandedKeys', 'defaultSelectedKeys', 'disabled', 'multiple', 'selectable', 'showIcon', 'showLine', 'showMode'] }) export class AiaoTree { - mlabChange!: EventEmitter; - mlabTreeNodeChange!: EventEmitter; - mlabTreeDrop!: EventEmitter; - protected el: HTMLElement; - constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { - c.detach(); - this.el = r.nativeElement; - proxyOutputs(this, this.el, ['mlabChange', 'mlabTreeNodeChange', 'mlabTreeDrop']); - } -} - -export declare interface AiaoTreeNode extends Components.AiaoTreeNode {} -@ProxyCmp({inputs: ['canDrag', 'checkable', 'disabled', 'expanded', 'hover', 'icon', 'isLeaf', 'name', 'selectable', 'selected', 'showIcon', 'showLine', 'value']}) -@Component({ selector: 'aiao-tree-node', changeDetection: ChangeDetectionStrategy.OnPush, template: '', inputs: ['canDrag', 'checkable', 'disabled', 'expanded', 'hover', 'icon', 'isLeaf', 'name', 'selectable', 'selected', 'showIcon', 'showLine', 'value'] }) -export class AiaoTreeNode { - mlabTreeNodeDragStart!: EventEmitter; - mlabTreeNodeDragEnter!: EventEmitter; - mlabTreeNodeDragOver!: EventEmitter; - mlabTreeNodeDragLeave!: EventEmitter; - mlabTreeNodeDrop!: EventEmitter; - mlabTreeNodeDragEnd!: EventEmitter; - mlabTreeNodeClick!: EventEmitter; - mlabTreeNodeOver!: EventEmitter; - mlabTreeNodeOut!: EventEmitter; + aiaoChange!: EventEmitter; + aiaoTreeNodeChange!: EventEmitter; + aiaoTreeDrop!: EventEmitter; protected el: HTMLElement; constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) { c.detach(); this.el = r.nativeElement; - proxyOutputs(this, this.el, ['mlabTreeNodeDragStart', 'mlabTreeNodeDragEnter', 'mlabTreeNodeDragOver', 'mlabTreeNodeDragLeave', 'mlabTreeNodeDrop', 'mlabTreeNodeDragEnd', 'mlabTreeNodeClick', 'mlabTreeNodeOver', 'mlabTreeNodeOut']); + proxyOutputs(this, this.el, ['aiaoChange', 'aiaoTreeNodeChange', 'aiaoTreeDrop']); } } diff --git a/libs/elements-angular/src/lib/elements-initialize.ts b/libs/elements-angular/src/lib/elements-initialize.ts index 2188c8d57..f5afe959f 100644 --- a/libs/elements-angular/src/lib/elements-initialize.ts +++ b/libs/elements-angular/src/lib/elements-initialize.ts @@ -8,6 +8,8 @@ let didInitialize = false; // 初始化 export function initialize(config: IAiaoElementsConfig, doc: Document, zone: NgZone) { return (): any => { + let { resourcesUrl } = config; + resourcesUrl = resourcesUrl || './'; const win = doc.defaultView as any; if (win && typeof (window as any) !== 'undefined') { if (didInitialize) { @@ -19,6 +21,7 @@ export function initialize(config: IAiaoElementsConfig, doc: Document, zone: NgZ elements.config = { ...config, + resourcesUrl, _zoneGate: (h: any) => zone.run(h) }; @@ -27,6 +30,7 @@ export function initialize(config: IAiaoElementsConfig, doc: Document, zone: NgZ return applyPolyfills().then(() => { return defineCustomElements(win, { + resourcesUrl, exclude: [], syncQueue: true, raf, diff --git a/libs/elements-angular/src/lib/elements.module.ts b/libs/elements-angular/src/lib/elements.module.ts index 4cee7550d..8259b31de 100644 --- a/libs/elements-angular/src/lib/elements.module.ts +++ b/libs/elements-angular/src/lib/elements.module.ts @@ -1,4 +1,3 @@ -import { IAiaoElementsConfig } from '@aiao/elements'; import { CommonModule, DOCUMENT } from '@angular/common'; import { APP_INITIALIZER, ModuleWithProviders, NgModule, NgZone } from '@angular/core'; @@ -11,10 +10,10 @@ import { AiaoElementsView, AiaoImg, AiaoTextEditor, - AiaoTree, - AiaoTreeNode + AiaoTree } from './directives/proxies'; import { initialize } from './elements-initialize'; +import { AiaoElementsOptions } from './interface'; import { TextValueAccessor } from './providers/control-value-accessors/text-value-accessor'; import { AIAO_ELEMENTS_CONFIG } from './util/config'; @@ -29,7 +28,6 @@ const DECLARATIONS = [ AiaoImg, AiaoTextEditor, AiaoTree, - AiaoTreeNode, // accessor TextValueAccessor ]; @@ -40,13 +38,13 @@ const DECLARATIONS = [ exports: DECLARATIONS }) export class AiaoElementsModule { - static forRoot(config?: IAiaoElementsConfig): ModuleWithProviders { + static forRoot(opts?: AiaoElementsOptions): ModuleWithProviders { return { ngModule: AiaoElementsModule, providers: [ { provide: AIAO_ELEMENTS_CONFIG, - useValue: config + useValue: opts }, { provide: APP_INITIALIZER, diff --git a/libs/elements-angular/src/lib/interface.ts b/libs/elements-angular/src/lib/interface.ts new file mode 100644 index 000000000..34073b578 --- /dev/null +++ b/libs/elements-angular/src/lib/interface.ts @@ -0,0 +1,4 @@ +import { IAiaoElementsConfig } from '@aiao/elements'; + +// tslint:disable-next-line: no-empty-interface +export interface AiaoElementsOptions extends IAiaoElementsConfig {} diff --git a/libs/elements-react/src/lib/proxies.ts b/libs/elements-react/src/lib/proxies.ts index ea0372658..b8207df0f 100644 --- a/libs/elements-react/src/lib/proxies.ts +++ b/libs/elements-react/src/lib/proxies.ts @@ -17,4 +17,3 @@ export const AiaoElementsView = /*@__PURE__*/createReactComponent('aiao-img'); export const AiaoTextEditor = /*@__PURE__*/createReactComponent('aiao-text-editor'); export const AiaoTree = /*@__PURE__*/createReactComponent('aiao-tree'); -export const AiaoTreeNode = /*@__PURE__*/createReactComponent('aiao-tree-node'); diff --git a/libs/elements/scripts/testing/styles.css b/libs/elements/scripts/testing/styles.css index 3eca6f399..9c9ca9274 100644 --- a/libs/elements/scripts/testing/styles.css +++ b/libs/elements/scripts/testing/styles.css @@ -34,12 +34,12 @@ :root, html, html.md.md { - --ion-font-family: Roboto, 'mdTestingFont', sans-serif; + --aiao-font-family: Roboto, 'mdTestingFont', sans-serif; font-family: Roboto, 'mdTestingFont', sans-serif; } :root.ios.ios, html.ios.ios { - --ion-font-family: -apple-system, BlinkMacSystemFont, 'iosTestingFont', sans-serif; + --aiao-font-family: -apple-system, BlinkMacSystemFont, 'iosTestingFont', sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'iosTestingFont', sans-serif; } diff --git a/libs/elements/src/lib/components/code-diff-editor/test/basic/index.html b/libs/elements/src/lib/components/code-diff-editor/test/basic/index.html index c5098d251..f1110cc8f 100644 --- a/libs/elements/src/lib/components/code-diff-editor/test/basic/index.html +++ b/libs/elements/src/lib/components/code-diff-editor/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -21,6 +16,13 @@ + diff --git a/libs/elements/src/lib/components/code-editor/test/basic/index.html b/libs/elements/src/lib/components/code-editor/test/basic/index.html index fc9c21cc0..9e02115e8 100644 --- a/libs/elements/src/lib/components/code-editor/test/basic/index.html +++ b/libs/elements/src/lib/components/code-editor/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -23,11 +18,17 @@ - css - typescript - format - + + + + - @@ -26,6 +22,13 @@ + diff --git a/libs/elements/src/lib/components/code-editor/test/cdn/index.html b/libs/elements/src/lib/components/code-editor/test/cdn/index.html index a6c824ed0..132771be6 100644 --- a/libs/elements/src/lib/components/code-editor/test/cdn/index.html +++ b/libs/elements/src/lib/components/code-editor/test/cdn/index.html @@ -4,10 +4,6 @@ Stencil Component Starter - - - - @@ -19,6 +15,13 @@ + diff --git a/libs/elements/src/lib/components/code-editor/test/json-value/index.html b/libs/elements/src/lib/components/code-editor/test/json-value/index.html index c1527a505..7345b110f 100644 --- a/libs/elements/src/lib/components/code-editor/test/json-value/index.html +++ b/libs/elements/src/lib/components/code-editor/test/json-value/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -21,6 +16,13 @@ + diff --git a/libs/elements/src/lib/components/elements-editor/test/basic/index.html b/libs/elements/src/lib/components/elements-editor/test/basic/index.html index bd54a0dd0..34a822cd8 100644 --- a/libs/elements/src/lib/components/elements-editor/test/basic/index.html +++ b/libs/elements/src/lib/components/elements-editor/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -21,6 +16,11 @@ + @@ -42,14 +42,11 @@ editor.view = view; editor.value = [ { - tag: 'ion-button', + tag: 'button', innerText: 'button', class: { a: true }, - attributes: { - mode: 'ios' - }, style: { minWidth: '200px' } diff --git a/libs/elements/src/lib/components/elements-editor/test/preview/index.html b/libs/elements/src/lib/components/elements-editor/test/preview/index.html index 0337b3203..c31db1a00 100644 --- a/libs/elements/src/lib/components/elements-editor/test/preview/index.html +++ b/libs/elements/src/lib/components/elements-editor/test/preview/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -21,6 +16,11 @@ + @@ -39,30 +39,16 @@ ]; editor.value = [ { - tag: 'ion-button', + tag: 'button', innerText: 'button', class: { a: true }, - attributes: { - mode: 'ios' - }, style: { minWidth: '200px' } }, - { - tag: 'h1' - }, - { - tag: 'div', - children: [ - { - tag: 'h1', - innerText: 'true' - } - ] - }, + { tag: 'h1' }, { tag: 'aiao-img', attributes: { diff --git a/libs/elements/src/lib/components/elements-form/elements-form.tsx b/libs/elements/src/lib/components/elements-form/elements-form.tsx index 8c32a9555..f8663abe9 100644 --- a/libs/elements/src/lib/components/elements-form/elements-form.tsx +++ b/libs/elements/src/lib/components/elements-form/elements-form.tsx @@ -14,7 +14,7 @@ export class ElementsFrom implements ComponentInterface { private _formInputElements: HTMLInputElement[]; private _formElements: Element[]; - viewRef: HTMLAiaoElementsViewElement; + viewRef: HTMLElement; @Element() el!: HTMLElement; form: HTMLFormElement; @@ -186,7 +186,7 @@ export class ElementsFrom implements ComponentInterface { return (
(this.form = ref)}> - (this.viewRef = ref)}> +
(this.viewRef = ref)}>
); diff --git a/libs/elements/src/lib/components/elements-form/test/basic/index.html b/libs/elements/src/lib/components/elements-form/test/basic/index.html index 6bc389e32..2f2fa7a67 100644 --- a/libs/elements/src/lib/components/elements-form/test/basic/index.html +++ b/libs/elements/src/lib/components/elements-form/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -39,19 +34,18 @@
change event
const input = document.querySelector('#input'); const change = document.querySelector('#change'); form.html = ` - - -
- - car 0 - - - - car 1 - - -
- +
+ + +
+
+ + +
+
+ + +
`; form.value = { @@ -59,12 +53,10 @@
change event
car: ['BMW', 'Honda'] }; form.addEventListener('aiaoChange', e => { - console.log('change', e); change.textContent = JSON.stringify(e.detail.value, { spece: 2 }); }); form.addEventListener('aiaoInput', e => { - console.log('input', e); input.textContent = JSON.stringify(e.detail.value, { spece: 2 }); }); diff --git a/libs/elements/src/lib/components/elements-preview/test/basic/index.html b/libs/elements/src/lib/components/elements-preview/test/basic/index.html index 33f758af4..c349784ba 100644 --- a/libs/elements/src/lib/components/elements-preview/test/basic/index.html +++ b/libs/elements/src/lib/components/elements-preview/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -22,6 +17,11 @@ } + {js && } +
+ + ); } } diff --git a/libs/elements/src/lib/components/elements-view/test/basic/index.html b/libs/elements/src/lib/components/elements-view/test/basic/index.html index 637d1f9ff..a4537c11f 100644 --- a/libs/elements/src/lib/components/elements-view/test/basic/index.html +++ b/libs/elements/src/lib/components/elements-view/test/basic/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -23,6 +18,12 @@ - + + diff --git a/libs/elements/src/lib/components/elements-view/test/code-editor/index.html b/libs/elements/src/lib/components/elements-view/test/code-editor/index.html index 40ee7f4fd..fd3454eb6 100644 --- a/libs/elements/src/lib/components/elements-view/test/code-editor/index.html +++ b/libs/elements/src/lib/components/elements-view/test/code-editor/index.html @@ -5,11 +5,6 @@ Stencil Component Starter - - - - - @@ -22,6 +17,11 @@