Compare commits

...

18 Commits

Author SHA1 Message Date
9ce4ca14b8 1.0.61 2021-09-10 15:56:37 +02:00
76bcda760c fix(core): update 2021-09-10 15:56:37 +02:00
6949aed381 1.0.60 2021-09-10 15:51:30 +02:00
1f3502685f fix(core): update 2021-09-10 15:51:30 +02:00
8d1451fffa 1.0.59 2021-09-10 15:42:16 +02:00
8b2fedf1d6 fix(core): update 2021-09-10 15:42:16 +02:00
30ffb2650a 1.0.58 2021-09-10 15:23:54 +02:00
55b65c7e4c fix(core): update 2021-09-10 15:23:54 +02:00
5c81dd540a 1.0.57 2021-09-10 15:02:48 +02:00
cb5bc809ea fix(core): update 2021-09-10 15:02:48 +02:00
ab1956c452 1.0.56 2021-09-09 00:35:11 +02:00
3b99796073 fix(core): update 2021-09-09 00:35:10 +02:00
20755775ea 1.0.55 2021-09-09 00:06:06 +02:00
4e1b797377 fix(core): update 2021-09-09 00:06:05 +02:00
4a3aa2d6d9 1.0.54 2021-09-09 00:02:36 +02:00
4e49045444 fix(core): update 2021-09-09 00:02:35 +02:00
9e54c973d5 1.0.53 2021-09-01 22:44:44 +02:00
122c535dec fix(core): update 2021-09-01 22:44:43 +02:00
3 changed files with 34 additions and 19 deletions

18
package-lock.json generated
View File

@ -1,15 +1,15 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.61",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.61",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.90",
"@designestate/dees-domtools": "^1.0.91",
"@designestate/dees-element": "^1.0.19",
"@designestate/dees-wcctools": "^1.0.57",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
@ -1893,9 +1893,9 @@
}
},
"node_modules/@designestate/dees-domtools": {
"version": "1.0.90",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.90.tgz",
"integrity": "sha512-tQ8tlBunWMSza+kvZaCVExJnl45jgNGuqbK9bdPBczwllUAVNLVRNaAucEeMj1SiDAKOg8zwshkQJ4AWcjSidw==",
"version": "1.0.91",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.91.tgz",
"integrity": "sha512-1lsp3iBfI7dX1sm+TUI7U5xjSsxlaYjs7May9LmOaxg1M8oYJtcwnFsyQ4yeAAw7Nopucm+rOGjmdODcAr8V/Q==",
"license": "MIT",
"dependencies": {
"@apiglobal/typedrequest": "^1.0.56",
@ -17435,9 +17435,9 @@
}
},
"@designestate/dees-domtools": {
"version": "1.0.90",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.90.tgz",
"integrity": "sha512-tQ8tlBunWMSza+kvZaCVExJnl45jgNGuqbK9bdPBczwllUAVNLVRNaAucEeMj1SiDAKOg8zwshkQJ4AWcjSidw==",
"version": "1.0.91",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.91.tgz",
"integrity": "sha512-1lsp3iBfI7dX1sm+TUI7U5xjSsxlaYjs7May9LmOaxg1M8oYJtcwnFsyQ4yeAAw7Nopucm+rOGjmdODcAr8V/Q==",
"requires": {
"@apiglobal/typedrequest": "^1.0.56",
"@designestate/dees-comms": "^1.0.9",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.61",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",
@ -13,7 +13,7 @@
"author": "Lossless GmbH",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.90",
"@designestate/dees-domtools": "^1.0.91",
"@designestate/dees-element": "^1.0.19",
"@designestate/dees-wcctools": "^1.0.57",
"@fortawesome/fontawesome-svg-core": "^1.2.36",

View File

@ -14,6 +14,15 @@ import * as domtools from '@designestate/dees-domtools';
export interface IStep {
title: string;
content: TemplateResult;
validationFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>;
onReturnToStepFunc?: (stepper: DeesStepper, htmlElement: HTMLElement) => Promise<any>;
validationFuncCalled?: boolean;
}
declare global {
interface HTMLElementTagNameMap {
'dees-stepper': DeesStepper;
}
}
@customElement('dees-stepper')
@ -90,14 +99,16 @@ export class DeesStepper extends DeesElement {
color: ${cssManager.bdTheme('#333', '#fff')};
margin: auto;
margin-bottom: 20px;
filter: opacity(0.5);
filter: opacity(0.5) grayscale(1);
box-shadow: 0px 0px 3px #00000010;
user-select: none;
}
.step.selected {
pointer-events: all;
filter: opacity(1);
filter: opacity(1) grayscale(0);
box-shadow: 0px 0px 5px #00000010;
user-select: auto;
}
.step.hiddenStep {
@ -166,16 +177,13 @@ export class DeesStepper extends DeesElement {
public firstUpdated() {
this.selectedStep = this.steps[0];
this.setScrollStatus();
domtools.plugins.smartdelay.delayFor(2000).then(() => {
this.goNext();
})
}
public updated() {
this.setScrollStatus();
}
public scroller: typeof domtools.plugins.sweetScroll.prototype;
public scroller: typeof domtools.plugins.SweetScroll.prototype;
public async setScrollStatus() {
await domtools.plugins.smartdelay.delayFor(50);
@ -191,18 +199,25 @@ export class DeesStepper extends DeesElement {
console.log(scrollPosition);
const domtoolsInstance = await domtools.DomTools.setupDomTools()
if (!this.scroller) {
this.scroller = new domtools.plugins.sweetScroll({
this.scroller = new domtools.plugins.SweetScroll({
vertical: true,
horizontal: false,
easing: 'easeInOutQuint'
}, stepperContainer);
}
if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) {
this.selectedStep.validationFuncCalled = true;
await this.selectedStep.validationFunc(this, selectedStepElement);
}
this.scroller.to(scrollPosition);
}
public goBack() {
public async goBack() {
const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep);
this.selectedStep = this.steps[currentIndex - 1];
await this.domtoolsPromise;
await this.domtools.convenience.smartdelay.delayFor(100);
this.selectedStep.onReturnToStepFunc?.(this, this.shadowRoot.querySelector('.selected'));
}
public goNext() {