Compare commits

...

4 Commits

Author SHA1 Message Date
0665f85d49 1.0.31 2020-06-01 15:56:33 +00:00
c222a66ead fix(core): update 2020-06-01 15:56:32 +00:00
8d628d3285 1.0.30 2020-06-01 15:07:13 +00:00
681de01143 fix(core): update 2020-06-01 15:07:13 +00:00
5 changed files with 32 additions and 16 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-wcctools",
"version": "1.0.29",
"version": "1.0.31",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -2202,9 +2202,9 @@
}
},
"@pushrocks/smartdelay": {
"version": "2.0.6",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.6.tgz",
"integrity": "sha512-4wUnzWNhRPODpaaL5GuRaje/C5dg+TMhBxmr57PKc2fqYpy6azWJwonf/s5xpcbJLCPJRbj1x8M5MqgCFq2uvg==",
"version": "2.0.9",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.9.tgz",
"integrity": "sha512-aVZJit1wq4fBG6ft2LJSPEnNbLSbRUuwNYggSeDqLtY7mXvAQmu4SIsXx18gfOtf69CoZR36RY3ff/IJv62C7w==",
"requires": {
"@pushrocks/smartpromise": "^3.0.6"
}

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-wcctools",
"version": "1.0.29",
"version": "1.0.31",
"private": false,
"description": "wcc tools for creating element catalogues",
"main": "dist_ts_web/index.js",
@ -15,6 +15,7 @@
"dependencies": {
"@designestate/dees-domtools": "^1.0.26",
"@gitzone/tsrun": "^1.1.17",
"@pushrocks/smartdelay": "^2.0.9",
"@pushrocks/smartexpress": "^3.0.10",
"lit-element": "^2.0.0-rc.5",
"lit-html": "^1.0.0-rc.2",

View File

@ -1,6 +1,6 @@
import { LitElement, property, html, customElement, TemplateResult } from 'lit-element';
import * as deesDomtools from '@designestate/dees-domtools';
import * as plugins from '../wcctools.plugins';
import { WccDefaultElement } from './wcc-defaultelement';
@ -15,7 +15,7 @@ export class WccDashboard extends LitElement {
public selectedItem: TemplateResult | LitElement;
@property()
public selectedViewport: deesDomtools.breakpoints.TViewport = 'desktop';
public selectedViewport: plugins.deesDomtools.breakpoints.TViewport = 'desktop';
@property()
public pages: { [key: string]: TemplateResult } = {};
@ -73,22 +73,29 @@ export class WccDashboard extends LitElement {
this.setWarning(null);
return html`${anonItem.demo()}`;
} else {
this.selectedItem = WccDefaultElement as any;
this.updateSlot();
}
})()}
</wcc-frame>
${this.selectedViewport}
`;
}
private currentlyUpdating: boolean = false;
public async updateSlot() {
console.log('updateSlot');
const oldSelectedItem = this.selectedItem;
if (this.currentlyUpdating) {
return;
}
this.currentlyUpdating = true;
!this.selectedItem ? this.selectedItem = WccDefaultElement as any : null;
const localSelectedItem = this.selectedItem;
this.selectedItem = null;
const domtools = await deesDomtools.DomTools.setupDomTools();
console.log('updateSlot');
const domtools = await plugins.deesDomtools.DomTools.setupDomTools();
domtools.setVirtualViewport(this.selectedViewport);
this.selectedItem = oldSelectedItem;
await super.performUpdate();
this.selectedItem = localSelectedItem;
await super.performUpdate();
this.currentlyUpdating = false;
}
public setWarning(warningTextArg: string) {

View File

@ -13,9 +13,6 @@ export class WccProperties extends LitElement {
@property()
public selectedItem: TemplateResult | LitElement;
@property()
public selectedInstance;
@property()
public selectedViewport = 'native';

View File

@ -0,0 +1,11 @@
import * as smartdelay from '@pushrocks/smartdelay';
export {
smartdelay
};
import * as deesDomtools from '@designestate/dees-domtools';
export {
deesDomtools
};