Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa91dad272 | |||
05a22599b8 | |||
bd0b279fc2 | |||
8276a5b09b | |||
a9200859ec | |||
210a0ad8a1 | |||
2756a3cb68 | |||
acf0ea3874 | |||
284d2be0e3 | |||
dfb9175613 | |||
16a213f536 | |||
9869b0c6aa | |||
e63cb9669b | |||
06766c6895 | |||
48f1b02f0b | |||
f41550fa22 | |||
ac18ed0684 | |||
0ed59e850e |
59
package-lock.json
generated
59
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.18",
|
"version": "1.0.27",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -1072,16 +1072,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "4.0.10",
|
"version": "4.0.13",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.10.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz",
|
||||||
"integrity": "sha512-qlVVIWo/Ysp/cyUyHi2mgtFyT0E9xXLCpewBAb7TrwnuRKrSMrmE4YsqPsGOhBxqziSEOPaXZmWaMLwKqjvQiQ==",
|
"integrity": "sha512-Nde8rq1DjaDCREKlGGY/zS8g+eFu4zSU2jrbO4DdtYD+9oiauBMz2jzao3fr8401XpNW1Ex8T8FPdjUW8lUMow==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.12",
|
"@pushrocks/smartrx": "^2.0.15",
|
||||||
"@pushrocks/smarttime": "^3.0.18",
|
"@pushrocks/smarttime": "^3.0.18",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"symbol-tree": "^3.2.4"
|
"symbol-tree": "^3.2.4"
|
||||||
},
|
},
|
||||||
@ -1095,11 +1094,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrx": {
|
"@pushrocks/smartrx": {
|
||||||
"version": "2.0.12",
|
"version": "2.0.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.12.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.15.tgz",
|
||||||
"integrity": "sha512-1iH5cn3Hvb8cnPlmeBL3oOZ/hkvuEQcQ6dykFeDMJkJQ0zrT5iSkzq8EA4fCmIe12aeMkL+38TOC79CCySb0Hg==",
|
"integrity": "sha512-bvxyO19sUgWj7S/WflVO7QVYggTUXoM4rCYn+Akid844CC5zoSzIRx9Egm2xeMD6y4WbBbFWpHr67L7nEYxGWQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^4.0.8",
|
"@pushrocks/lik": "^4.0.11",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"rxjs": "^6.5.5"
|
"rxjs": "^6.5.5"
|
||||||
}
|
}
|
||||||
@ -1383,13 +1382,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartstate": {
|
"@pushrocks/smartstate": {
|
||||||
"version": "1.0.15",
|
"version": "1.0.16",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstate/-/smartstate-1.0.15.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstate/-/smartstate-1.0.16.tgz",
|
||||||
"integrity": "sha512-LuqA8othfyd6Ne/DaFt42K/mS7MUa9twbsFboOuXSUi/S6DNWy7Z62EHIsftrVHtgrenBeF+JZaJ8lLCVMHcng==",
|
"integrity": "sha512-RUdeKuM2N5S3su9WEX2XoSE0VV12vMyR4vh4h2gV+uS4Syu4H13ntoN2MQfGh63JHkviICELZ0u+XqRtNvAO4g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^4.0.0",
|
"@pushrocks/lik": "^4.0.12",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
|
"@pushrocks/smartrx": "^2.0.15",
|
||||||
"rxjs": "^6.5.5"
|
"rxjs": "^6.5.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/smartrx": {
|
||||||
|
"version": "2.0.15",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.15.tgz",
|
||||||
|
"integrity": "sha512-bvxyO19sUgWj7S/WflVO7QVYggTUXoM4rCYn+Akid844CC5zoSzIRx9Egm2xeMD6y4WbBbFWpHr67L7nEYxGWQ==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/lik": "^4.0.11",
|
||||||
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
|
"rxjs": "^6.5.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smarttime": {
|
"@pushrocks/smarttime": {
|
||||||
@ -1410,6 +1422,7 @@
|
|||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartunique/-/smartunique-3.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartunique/-/smartunique-3.0.3.tgz",
|
||||||
"integrity": "sha512-f+c3s2WzzjASoRHyYTLU0kHDVWREg4sZVdi5L42bTA3CTUWNrcGUC62h4wP4U4BiPl3bopTr3LPhClZHJ738oA==",
|
"integrity": "sha512-f+c3s2WzzjASoRHyYTLU0kHDVWREg4sZVdi5L42bTA3CTUWNrcGUC62h4wP4U4BiPl3bopTr3LPhClZHJ738oA==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/shortid": "0.0.29",
|
"@types/shortid": "0.0.29",
|
||||||
"@types/uuid": "^7.0.0",
|
"@types/uuid": "^7.0.0",
|
||||||
@ -1630,7 +1643,8 @@
|
|||||||
"@types/shortid": {
|
"@types/shortid": {
|
||||||
"version": "0.0.29",
|
"version": "0.0.29",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fshortid/-/shortid-0.0.29.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fshortid/-/shortid-0.0.29.tgz",
|
||||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps="
|
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/through2": {
|
"@types/through2": {
|
||||||
"version": "2.0.36",
|
"version": "2.0.36",
|
||||||
@ -1661,7 +1675,8 @@
|
|||||||
"@types/uuid": {
|
"@types/uuid": {
|
||||||
"version": "7.0.4",
|
"version": "7.0.4",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fuuid/-/uuid-7.0.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fuuid/-/uuid-7.0.4.tgz",
|
||||||
"integrity": "sha512-WGZCqBZZ0mXN2RxvLHL6/7RCu+OWs28jgQMP04LWfpyJlQUMTR6YU9CNJAKDgbw+EV/u687INXuLUc7FuML/4g=="
|
"integrity": "sha512-WGZCqBZZ0mXN2RxvLHL6/7RCu+OWs28jgQMP04LWfpyJlQUMTR6YU9CNJAKDgbw+EV/u687INXuLUc7FuML/4g==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/which": {
|
"@types/which": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.2",
|
||||||
@ -2621,7 +2636,8 @@
|
|||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "2.1.11",
|
"version": "2.1.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.1.11.tgz",
|
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.1.11.tgz",
|
||||||
"integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA=="
|
"integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"no-case": {
|
"no-case": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.2",
|
||||||
@ -3044,6 +3060,7 @@
|
|||||||
"version": "2.2.15",
|
"version": "2.2.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/shortid/-/shortid-2.2.15.tgz",
|
"resolved": "https://verdaccio.lossless.one/shortid/-/shortid-2.2.15.tgz",
|
||||||
"integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==",
|
"integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"nanoid": "^2.1.0"
|
"nanoid": "^2.1.0"
|
||||||
}
|
}
|
||||||
@ -3152,6 +3169,11 @@
|
|||||||
"has-flag": "^3.0.0"
|
"has-flag": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sweet-scroll": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/sweet-scroll/-/sweet-scroll-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-mR6fRsAQANtm3zpzhUE73KAOt2aT4ZsWzNSggiEsSqdO6Zh4gM7ioJG81EngrZEl0XAc3ZvzEfhxggOoEBc8jA=="
|
||||||
|
},
|
||||||
"symbol-tree": {
|
"symbol-tree": {
|
||||||
"version": "3.2.4",
|
"version": "3.2.4",
|
||||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.4.tgz",
|
||||||
@ -3329,7 +3351,8 @@
|
|||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://verdaccio.lossless.one/uuid/-/uuid-7.0.3.tgz",
|
"resolved": "https://verdaccio.lossless.one/uuid/-/uuid-7.0.3.tgz",
|
||||||
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
|
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"wcwidth": {
|
"wcwidth": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.18",
|
"version": "1.0.27",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "tools to simplify complex css structures",
|
"description": "tools to simplify complex css structures",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -22,10 +22,11 @@
|
|||||||
"tslint-config-prettier": "^1.15.0"
|
"tslint-config-prettier": "^1.15.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^4.0.10",
|
"@pushrocks/lik": "^4.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartstate": "^1.0.15",
|
"@pushrocks/smartstate": "^1.0.16",
|
||||||
"lit-element": "^2.3.1"
|
"lit-element": "^2.3.1",
|
||||||
|
"sweet-scroll": "^4.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
@ -15,6 +15,8 @@ tools to simplify complex css structures
|
|||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://prettier.io/)
|
[](https://prettier.io/)
|
||||||
|
[](https://prettier.io/)
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -1,24 +1,32 @@
|
|||||||
|
import { DomTools } from './domtools.classes.domtools';
|
||||||
|
|
||||||
export const desktop = 1240;
|
export const desktop = 1240;
|
||||||
export const tablet = 700;
|
export const tablet = 1024;
|
||||||
export const phablet = 500;
|
export const phablet = 600;
|
||||||
export const phone = 340;
|
export const phone = 400;
|
||||||
|
|
||||||
export type TEnvironment = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
|
export type TViewport = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone';
|
||||||
|
|
||||||
let environment: TEnvironment = 'native';
|
export const getEnvironment = (): TViewport => {
|
||||||
|
if (globalThis.deesDomTools && globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport) {
|
||||||
export const setEnvironment = envArg => {
|
return globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport;
|
||||||
environment = envArg;
|
} else {
|
||||||
|
return 'native';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const cssForTablet = (contentArg) => {
|
export const cssForTablet = (contentArg) => {
|
||||||
if (environment === 'native' || environment === 'desktop') {
|
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
|
||||||
return `
|
return `
|
||||||
@media (max-width: ${tablet}px) {
|
@media (max-width: ${tablet}px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} else if (environment === 'tablet' || environment === 'phablet' || environment === 'phone') {
|
} else if (
|
||||||
|
getEnvironment() === 'tablet' ||
|
||||||
|
getEnvironment() === 'phablet' ||
|
||||||
|
getEnvironment() === 'phone'
|
||||||
|
) {
|
||||||
return `
|
return `
|
||||||
@media (min-width: 0px) {
|
@media (min-width: 0px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
@ -28,13 +36,13 @@ export const cssForTablet = (contentArg) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cssForPhablet = (contentArg) => {
|
export const cssForPhablet = (contentArg) => {
|
||||||
if (environment === 'native' || environment === 'desktop') {
|
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
|
||||||
return `
|
return `
|
||||||
@media (max-width: ${phablet}px) {
|
@media (max-width: ${phablet}px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} else if (environment === 'phablet' || environment === 'phone') {
|
} else if (getEnvironment() === 'phablet' || getEnvironment() === 'phone') {
|
||||||
return `
|
return `
|
||||||
@media (min-width: 0px) {
|
@media (min-width: 0px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
@ -44,13 +52,13 @@ export const cssForPhablet = (contentArg) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cssForPhone = (contentArg) => {
|
export const cssForPhone = (contentArg) => {
|
||||||
if (environment === 'native' || environment === 'desktop') {
|
if (getEnvironment() === 'native' || getEnvironment() === 'desktop') {
|
||||||
return `
|
return `
|
||||||
@media (max-width: ${phone}px) {
|
@media (max-width: ${phone}px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} else if (environment === 'phone') {
|
} else if (getEnvironment() === 'phone') {
|
||||||
return `
|
return `
|
||||||
@media (min-width: 0px) {
|
@media (min-width: 0px) {
|
||||||
${contentArg}
|
${contentArg}
|
||||||
|
@ -1,8 +1,20 @@
|
|||||||
import * as plugins from './domtools.plugins';
|
import * as plugins from './domtools.plugins';
|
||||||
import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap';
|
import { Stringmap } from '@pushrocks/lik/dist_ts/lik.stringmap';
|
||||||
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
|
import { FastMap } from '@pushrocks/lik/dist_ts/lik.fastmap';
|
||||||
|
import { TViewport } from './domtools.breakpoints';
|
||||||
|
import { DomToolsRouter } from './domtools.classes.router';
|
||||||
|
|
||||||
|
export interface IDomToolsState {
|
||||||
|
virtualViewport: TViewport;
|
||||||
|
}
|
||||||
|
|
||||||
export class DomTools {
|
export class DomTools {
|
||||||
|
// ======
|
||||||
|
// STATIC
|
||||||
|
// ======
|
||||||
|
/**
|
||||||
|
* setups domtools
|
||||||
|
*/
|
||||||
public static async setupDomTools() {
|
public static async setupDomTools() {
|
||||||
let domToolsInstance: DomTools;
|
let domToolsInstance: DomTools;
|
||||||
if (!globalThis.deesDomTools) {
|
if (!globalThis.deesDomTools) {
|
||||||
@ -25,7 +37,25 @@ export class DomTools {
|
|||||||
return domToolsInstance;
|
return domToolsInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========
|
||||||
|
// INSTANCE
|
||||||
|
// ========
|
||||||
public smartstate = new plugins.smartstate.Smartstate();
|
public smartstate = new plugins.smartstate.Smartstate();
|
||||||
|
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
|
||||||
|
virtualViewport: 'native',
|
||||||
|
});
|
||||||
|
|
||||||
|
public router = new DomToolsRouter({
|
||||||
|
debug: false
|
||||||
|
});
|
||||||
|
|
||||||
|
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
|
||||||
|
async (statePart, payload) => {
|
||||||
|
const currentState = statePart.getState();
|
||||||
|
currentState.virtualViewport = payload;
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
public domToolsReady = plugins.smartpromise.defer();
|
public domToolsReady = plugins.smartpromise.defer();
|
||||||
public domReady = plugins.smartpromise.defer();
|
public domReady = plugins.smartpromise.defer();
|
||||||
@ -40,6 +70,8 @@ export class DomTools {
|
|||||||
bodyElement: null,
|
bodyElement: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
public async setGlobalStyles(stylesText: string) {
|
public async setGlobalStyles(stylesText: string) {
|
||||||
await this.domReady.promise;
|
await this.domReady.promise;
|
||||||
const styleElement = document.createElement('style');
|
const styleElement = document.createElement('style');
|
||||||
@ -57,18 +89,24 @@ export class DomTools {
|
|||||||
*/
|
*/
|
||||||
public async runOnce<T>(identifierArg: string, funcArg: () => Promise<T>) {
|
public async runOnce<T>(identifierArg: string, funcArg: () => Promise<T>) {
|
||||||
const runningId = `${identifierArg}+runningCheck`;
|
const runningId = `${identifierArg}+runningCheck`;
|
||||||
if(!this.runOnceTrackerStringMap.checkString(identifierArg)) {
|
if (!this.runOnceTrackerStringMap.checkString(identifierArg)) {
|
||||||
this.runOnceTrackerStringMap.addString(identifierArg);
|
this.runOnceTrackerStringMap.addString(identifierArg);
|
||||||
this.runOnceTrackerStringMap.addString(runningId);
|
this.runOnceTrackerStringMap.addString(runningId);
|
||||||
const result = await funcArg();
|
const result = await funcArg();
|
||||||
this.runOnceResultMap.addToMap(identifierArg, result);
|
this.runOnceResultMap.addToMap(identifierArg, result);
|
||||||
this.runOnceTrackerStringMap.removeString(runningId);
|
this.runOnceTrackerStringMap.removeString(runningId);
|
||||||
}
|
}
|
||||||
return await this.runOnceTrackerStringMap.registerUntilTrue(stringMap => {
|
return await this.runOnceTrackerStringMap.registerUntilTrue(
|
||||||
return !stringMap.includes(runningId);
|
(stringMap) => {
|
||||||
}, () => {
|
return !stringMap.includes(runningId);
|
||||||
return this.runOnceResultMap.getByKey(identifierArg);
|
},
|
||||||
});
|
() => {
|
||||||
|
return this.runOnceResultMap.getByKey(identifierArg);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
setVirtualViewport(environmentArg: TViewport) {
|
||||||
|
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -3,4 +3,4 @@ export interface IDeesColorSet {
|
|||||||
secondaryAccent: string;
|
secondaryAccent: string;
|
||||||
primaryBackground: string;
|
primaryBackground: string;
|
||||||
secondaryBackground: string;
|
secondaryBackground: string;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
export const cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number) => {
|
export const cssGridColumns = (amountOfColumnsArg: number, gapSizeArg: number) => {
|
||||||
let returnString = ``;
|
let returnString = ``;
|
||||||
for (let i = 0; i < amountOfColumnsArg; i++) {
|
for (let i = 0; i < amountOfColumnsArg; i++) {
|
||||||
returnString += ` calc((100%/${amountOfColumnsArg}) - (${gapSizeArg * (amountOfColumnsArg - 1)}px/${amountOfColumnsArg}))`;
|
returnString += ` calc((100%/${amountOfColumnsArg}) - (${gapSizeArg *
|
||||||
|
(amountOfColumnsArg - 1)}px/${amountOfColumnsArg}))`;
|
||||||
}
|
}
|
||||||
return returnString;
|
return returnString;
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import * as plugins from './domtools.plugins';
|
import * as plugins from './domtools.plugins';
|
||||||
import { DomTools } from './domtools.classes.domtools';
|
import { DomTools } from './domtools.classes.domtools';
|
||||||
|
|
||||||
|
|
||||||
import { html } from 'lit-element';
|
import { html } from 'lit-element';
|
||||||
export const styles = html`
|
export const styles = html`
|
||||||
<style>
|
<style>
|
||||||
@ -12,7 +11,6 @@ export const styles = html`
|
|||||||
</style>
|
</style>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a basic setup for elements
|
* a basic setup for elements
|
||||||
* makes sure everything is in check
|
* makes sure everything is in check
|
||||||
|
@ -2,7 +2,4 @@
|
|||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import * as smartstate from '@pushrocks/smartstate';
|
import * as smartstate from '@pushrocks/smartstate';
|
||||||
|
|
||||||
export {
|
export { smartpromise, smartstate };
|
||||||
smartpromise,
|
|
||||||
smartstate
|
|
||||||
};
|
|
||||||
|
@ -4,8 +4,5 @@ import * as elementBasic from './domtools.elementbasic';
|
|||||||
import * as breakpoints from './domtools.breakpoints';
|
import * as breakpoints from './domtools.breakpoints';
|
||||||
import * as css from './domtools.css';
|
import * as css from './domtools.css';
|
||||||
|
|
||||||
export {
|
export { css, breakpoints, elementBasic };
|
||||||
css,
|
export { DomTools } from './domtools.classes.domtools';
|
||||||
breakpoints,
|
|
||||||
elementBasic
|
|
||||||
};
|
|
||||||
|
Reference in New Issue
Block a user