Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6949aed381 | |||
| 1f3502685f | |||
| 8d1451fffa | |||
| 8b2fedf1d6 | |||
| 30ffb2650a | |||
| 55b65c7e4c | |||
| 5c81dd540a | |||
| cb5bc809ea | |||
| ab1956c452 | |||
| 3b99796073 | |||
| 20755775ea | |||
| 4e1b797377 | |||
| 4a3aa2d6d9 | |||
| 4e49045444 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.53",
|
||||
"version": "1.0.60",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.53",
|
||||
"version": "1.0.60",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^1.0.91",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.53",
|
||||
"version": "1.0.60",
|
||||
"private": false,
|
||||
"description": "website for lossless.com",
|
||||
"main": "dist_ts_web/index.js",
|
||||
|
||||
@@ -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,13 +99,13 @@ 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;
|
||||
}
|
||||
|
||||
.step.selected {
|
||||
pointer-events: all;
|
||||
filter: opacity(1);
|
||||
filter: opacity(1) grayscale(0);
|
||||
box-shadow: 0px 0px 5px #00000010;
|
||||
}
|
||||
|
||||
@@ -166,9 +175,6 @@ export class DeesStepper extends DeesElement {
|
||||
public firstUpdated() {
|
||||
this.selectedStep = this.steps[0];
|
||||
this.setScrollStatus();
|
||||
domtools.plugins.smartdelay.delayFor(2000).then(() => {
|
||||
this.goNext();
|
||||
})
|
||||
}
|
||||
|
||||
public updated() {
|
||||
@@ -197,12 +203,19 @@ export class DeesStepper extends DeesElement {
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user