Compare commits

..

14 Commits

Author SHA1 Message Date
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
3 changed files with 22 additions and 9 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@designestate/dees-catalog", "name": "@designestate/dees-catalog",
"version": "1.0.53", "version": "1.0.60",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@designestate/dees-catalog", "name": "@designestate/dees-catalog",
"version": "1.0.53", "version": "1.0.60",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@designestate/dees-domtools": "^1.0.91", "@designestate/dees-domtools": "^1.0.91",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-catalog", "name": "@designestate/dees-catalog",
"version": "1.0.53", "version": "1.0.60",
"private": false, "private": false,
"description": "website for lossless.com", "description": "website for lossless.com",
"main": "dist_ts_web/index.js", "main": "dist_ts_web/index.js",

View File

@@ -14,6 +14,15 @@ import * as domtools from '@designestate/dees-domtools';
export interface IStep { export interface IStep {
title: string; title: string;
content: TemplateResult; 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') @customElement('dees-stepper')
@@ -90,13 +99,13 @@ export class DeesStepper extends DeesElement {
color: ${cssManager.bdTheme('#333', '#fff')}; color: ${cssManager.bdTheme('#333', '#fff')};
margin: auto; margin: auto;
margin-bottom: 20px; margin-bottom: 20px;
filter: opacity(0.5); filter: opacity(0.5) grayscale(1);
box-shadow: 0px 0px 3px #00000010; box-shadow: 0px 0px 3px #00000010;
} }
.step.selected { .step.selected {
pointer-events: all; pointer-events: all;
filter: opacity(1); filter: opacity(1) grayscale(0);
box-shadow: 0px 0px 5px #00000010; box-shadow: 0px 0px 5px #00000010;
} }
@@ -166,9 +175,6 @@ export class DeesStepper extends DeesElement {
public firstUpdated() { public firstUpdated() {
this.selectedStep = this.steps[0]; this.selectedStep = this.steps[0];
this.setScrollStatus(); this.setScrollStatus();
domtools.plugins.smartdelay.delayFor(2000).then(() => {
this.goNext();
})
} }
public updated() { public updated() {
@@ -197,12 +203,19 @@ export class DeesStepper extends DeesElement {
easing: 'easeInOutQuint' easing: 'easeInOutQuint'
}, stepperContainer); }, stepperContainer);
} }
if (!this.selectedStep.validationFuncCalled && this.selectedStep.validationFunc) {
this.selectedStep.validationFuncCalled = true;
await this.selectedStep.validationFunc(this, selectedStepElement);
}
this.scroller.to(scrollPosition); this.scroller.to(scrollPosition);
} }
public goBack() { public async goBack() {
const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep); const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep);
this.selectedStep = this.steps[currentIndex - 1]; 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() { public goNext() {