Skip to content

Commit

Permalink
Merge pull request #380 from mgusmano/ext-components-7.0.x
Browse files Browse the repository at this point in the history
KS dist
  • Loading branch information
mgusmano authored Aug 23, 2019
2 parents e066317 + 39ba164 commit 60ccce1
Show file tree
Hide file tree
Showing 346 changed files with 165,040 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
copy/
build/
dist/
dist2/
buildext/

ext-components-prod
Expand Down
70 changes: 67 additions & 3 deletions demos/ext-grid-inline-1-prop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,79 @@

<script>



window['mjg'] = function onReady(event) {
console.log('onReady')
}

class ExtGrid extends HTMLElement {
get config() {return this.getAttribute('config')};
set config(val) {if (val) {this.setAttribute('config', val)} else {this.removeAttribute('config')}}
static get observedAttributes() {return ['config']};
get config() {
console.log('get')
return this.getAttribute('config')
};
set config(val) {
console.log('set')
if (val) {
this.setAttribute('config', val)
} else {
this.removeAttribute('config')
}
}

get onready() {
console.log('get')
return this.getAttribute('onready')
};
set onready(val) {
console.log('set')
if (val) {
this.setAttribute('onready', val)
}
else {
this.removeAttribute('onready')
}
}


static get observedAttributes() {return ['config', 'onready']};

attributeChangedCallback(attr, oldVal, newVal) {
console.log('attr: ' + attr)

if (/^on/.test(attr)) {
if (newVal) {
console.log('newVal: ' + newVal)
this.addEventListener('ready', function (event) {
console.log('eventlistener')
console.log(event)
var functionString = newVal;
// todo: error check for only 1 dot
var r = functionString.split('.');
console.log(r)
console.log(window['mjg'])
var obj = r[0];
var func = r[1];
if (obj && func) {
console.log(window[obj])
//window[obj][func](event);
window[obj](event);
}
});
}
}
}

connectedCallback() {
console.log('connectedCallback')
console.log(this.onready)
var o = JSON.parse(this.config)
o.xtype = 'grid'
console.dir(this)
o.renderTo = this
this.ext = Ext.create(o)
this.dispatchEvent(new CustomEvent('ready',{detail:{cmp: this.ext}}))
console.log('after dispatch')
}
}

Expand All @@ -29,6 +92,7 @@
</head>
<body>
<ext-grid
onready='mjg.onReady'
config='
{
"title":"Grid with a single config",
Expand Down
389 changes: 389 additions & 0 deletions packages/ext-web-components-bundler/dist/css.development.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/ext-web-components-bundler/dist/css.production.js

Large diffs are not rendered by default.

Binary file not shown.
6,149 changes: 6,149 additions & 0 deletions packages/ext-web-components-bundler/dist/ewc.development.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/ext-web-components-bundler/dist/ewc.production.js

Large diffs are not rendered by default.

Binary file not shown.
Loading

0 comments on commit 60ccce1

Please sign in to comment.