Compare commits

...

32 Commits

Author SHA1 Message Date
1b1de04f86 1.0.68 2021-10-07 18:47:36 +02:00
7941628d1d fix(core): update 2021-10-07 18:47:36 +02:00
369437ceba 1.0.67 2021-10-07 18:01:05 +02:00
72f7782898 fix(core): update 2021-10-07 18:01:05 +02:00
820d6ae40f 1.0.66 2021-09-15 13:10:28 +02:00
5dd3da9f31 fix(core): update 2021-09-15 13:10:28 +02:00
3ce0683a05 1.0.65 2021-09-15 00:59:51 +02:00
00d41f1b6e fix(core): update 2021-09-15 00:59:50 +02:00
caba7ada28 1.0.64 2021-09-15 00:48:29 +02:00
6cff32cc36 fix(core): update 2021-09-15 00:48:29 +02:00
e6e8ac9782 1.0.63 2021-09-15 00:45:15 +02:00
7a13fdcd95 fix(core): update 2021-09-15 00:45:14 +02:00
c450fb32ea 1.0.62 2021-09-14 17:31:16 +02:00
6554bfd721 fix(core): update 2021-09-14 17:31:16 +02:00
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
6 changed files with 429 additions and 138 deletions

160
package-lock.json generated
View File

@ -1,25 +1,25 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.68",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.68",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.90",
"@designestate/dees-element": "^1.0.19",
"@designestate/dees-domtools": "^1.0.94",
"@designestate/dees-element": "^1.0.23",
"@designestate/dees-wcctools": "^1.0.57",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"typescript": "^4.4.2"
"typescript": "^4.4.3"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.26",
"@gitzone/tsbuild": "^2.1.27",
"@gitzone/tsbundle": "^1.0.87",
"@gitzone/tstest": "^1.0.57",
"@gitzone/tswatch": "^1.0.56",
@ -1893,36 +1893,36 @@
}
},
"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.94",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.94.tgz",
"integrity": "sha512-PMMvzEh6dCpjIacicACa+FKMUr8tkzPU6/0GJ1aWMkyaCMKRxZar0d6OmTTCA77IVNuFr++YhbNzvIDnBtpYRA==",
"license": "MIT",
"dependencies": {
"@apiglobal/typedrequest": "^1.0.56",
"@designestate/dees-comms": "^1.0.9",
"@pushrocks/lik": "^4.0.20",
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrouter": "^1.0.7",
"@pushrocks/lik": "^4.0.22",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartrouter": "^1.0.11",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smartstate": "^1.0.21",
"@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^3.0.15",
"@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0",
"lit-element": "^2.5.1",
"sweet-scroll": "^4.0.0"
}
},
"node_modules/@designestate/dees-element": {
"version": "1.0.19",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-element/-/dees-element-1.0.19.tgz",
"integrity": "sha512-tp4dx8r0zDi2RWoEHNVsSeu1rldDJ6zAP3yjO2MXmrzSBNomVnwePjoDW4YXweXu3NvujIFIQ4WFTfCejkAnsw==",
"version": "1.0.23",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-element/-/dees-element-1.0.23.tgz",
"integrity": "sha512-RjCJtqwXyw8OfHEOVct6HxLEBfyLovGcNFoMG+dViS8jVWIv24ZmbPTqDOGaHcSNWNwFZJ7NWTAWxfB3pcnOVg==",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.87",
"@designestate/dees-domtools": "^1.0.94",
"@pushrocks/isounique": "^1.0.4",
"@pushrocks/smartrx": "^2.0.19",
"lit-element": "^2.4.0"
"lit-element": "^2.5.1"
}
},
"node_modules/@designestate/dees-wcctools": {
@ -2004,9 +2004,9 @@
}
},
"node_modules/@gitzone/tsbuild": {
"version": "2.1.26",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.26.tgz",
"integrity": "sha512-FE0cjdAyzTR+Rr7pHULTF5rHiCW+FFnEHuV4kP7pdrHzl5oFZTUQ3uqEFEgmsrV6a0gzNwKgr/MfnVO/3sUrdw==",
"version": "2.1.27",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.27.tgz",
"integrity": "sha512-P+GjwUwjDCxSsmukEQPwswdg1etQy/4MBeTaq876UrM57AgfhyJlJlvyvyLRtbISJxFSGQm53BZloHI4skit+g==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -2016,7 +2016,7 @@
"@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartpath": "^4.0.3",
"@pushrocks/smartpromise": "^3.1.6",
"typescript": "^4.3.5"
"typescript": "^4.4.2"
},
"bin": {
"tsbuild": "cli.js"
@ -2704,17 +2704,17 @@
"license": "MIT"
},
"node_modules/@pushrocks/lik": {
"version": "4.0.20",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
"version": "4.0.22",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.22.tgz",
"integrity": "sha512-dg6Du7nr/SLU80yJw7a0zk2xX9Vc8SCLZaQMmSRBlsnL1/Z7qpWDOtpRC9VlL9vTLenbvwGTvPWMpOKyyNbiiA==",
"license": "MIT",
"dependencies": {
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartmatch": "^1.0.7",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smarttime": "^3.0.37",
"@types/minimatch": "^3.0.3",
"@pushrocks/smarttime": "^3.0.38",
"@types/minimatch": "^3.0.5",
"symbol-tree": "^3.2.4"
}
},
@ -3344,12 +3344,12 @@
}
},
"node_modules/@pushrocks/smartrouter": {
"version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.7.tgz",
"integrity": "sha512-ns4ye4uyzjpFUDr/vciOZog4y5QDsFBxwnYmXkSMxCA7hwiL0Fn64lvCexjez05t6Gz54ge5yflWSvyv63X0kA==",
"version": "1.0.11",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.11.tgz",
"integrity": "sha512-wh71Z/OXn4ymBgUb9JLnaZeXqcK+nrukciKBpN3jG03mItSi+RjShh/mGbNsWCk2D6CYRTzTaf9rx0uHOMZUoQ==",
"license": "MIT",
"dependencies": {
"path-to-regexp": "^6.1.0"
"path-to-regexp": "^6.2.0"
}
},
"node_modules/@pushrocks/smartrx": {
@ -3972,9 +3972,9 @@
"license": "MIT"
},
"node_modules/@types/minimatch": {
"version": "3.0.3",
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"version": "3.0.5",
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.5.tgz",
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
"license": "MIT"
},
"node_modules/@types/node": {
@ -10505,9 +10505,9 @@
}
},
"node_modules/lit-element": {
"version": "2.4.0",
"resolved": "https://verdaccio.lossless.one/lit-element/-/lit-element-2.4.0.tgz",
"integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==",
"version": "2.5.1",
"resolved": "https://verdaccio.lossless.one/lit-element/-/lit-element-2.5.1.tgz",
"integrity": "sha512-ogu7PiJTA33bEK0xGu1dmaX5vhcRjBXCFexPja0e7P7jqLhTpNKYRPmE+GmiCaRVAbiQKGkUgkh/i6+bh++dPQ==",
"license": "BSD-3-Clause",
"dependencies": {
"lit-html": "^1.1.1"
@ -15434,9 +15434,9 @@
"license": "MIT"
},
"node_modules/typescript": {
"version": "4.4.2",
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.4.2.tgz",
"integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==",
"version": "4.4.3",
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.4.3.tgz",
"integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==",
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@ -17435,34 +17435,34 @@
}
},
"@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.94",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-domtools/-/dees-domtools-1.0.94.tgz",
"integrity": "sha512-PMMvzEh6dCpjIacicACa+FKMUr8tkzPU6/0GJ1aWMkyaCMKRxZar0d6OmTTCA77IVNuFr++YhbNzvIDnBtpYRA==",
"requires": {
"@apiglobal/typedrequest": "^1.0.56",
"@designestate/dees-comms": "^1.0.9",
"@pushrocks/lik": "^4.0.20",
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrouter": "^1.0.7",
"@pushrocks/lik": "^4.0.22",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartrouter": "^1.0.11",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smartstate": "^1.0.21",
"@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^3.0.15",
"@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0",
"lit-element": "^2.5.1",
"sweet-scroll": "^4.0.0"
}
},
"@designestate/dees-element": {
"version": "1.0.19",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-element/-/dees-element-1.0.19.tgz",
"integrity": "sha512-tp4dx8r0zDi2RWoEHNVsSeu1rldDJ6zAP3yjO2MXmrzSBNomVnwePjoDW4YXweXu3NvujIFIQ4WFTfCejkAnsw==",
"version": "1.0.23",
"resolved": "https://verdaccio.lossless.one/@designestate%2fdees-element/-/dees-element-1.0.23.tgz",
"integrity": "sha512-RjCJtqwXyw8OfHEOVct6HxLEBfyLovGcNFoMG+dViS8jVWIv24ZmbPTqDOGaHcSNWNwFZJ7NWTAWxfB3pcnOVg==",
"requires": {
"@designestate/dees-domtools": "^1.0.87",
"@designestate/dees-domtools": "^1.0.94",
"@pushrocks/isounique": "^1.0.4",
"@pushrocks/smartrx": "^2.0.19",
"lit-element": "^2.4.0"
"lit-element": "^2.5.1"
}
},
"@designestate/dees-wcctools": {
@ -17518,9 +17518,9 @@
}
},
"@gitzone/tsbuild": {
"version": "2.1.26",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.26.tgz",
"integrity": "sha512-FE0cjdAyzTR+Rr7pHULTF5rHiCW+FFnEHuV4kP7pdrHzl5oFZTUQ3uqEFEgmsrV6a0gzNwKgr/MfnVO/3sUrdw==",
"version": "2.1.27",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.27.tgz",
"integrity": "sha512-P+GjwUwjDCxSsmukEQPwswdg1etQy/4MBeTaq876UrM57AgfhyJlJlvyvyLRtbISJxFSGQm53BZloHI4skit+g==",
"dev": true,
"requires": {
"@pushrocks/early": "^3.0.6",
@ -17529,7 +17529,7 @@
"@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartpath": "^4.0.3",
"@pushrocks/smartpromise": "^3.1.6",
"typescript": "^4.3.5"
"typescript": "^4.4.2"
},
"dependencies": {
"@pushrocks/smartfile": {
@ -18089,16 +18089,16 @@
"integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw=="
},
"@pushrocks/lik": {
"version": "4.0.20",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.20.tgz",
"integrity": "sha512-DJbxSZFwDuHe4W7dU5anyO72gy4woZpkxSpySphdHbSYZf50VJ1sMOKIccSpgRIczeB0BTR5i0c+cKnNFrg2jw==",
"version": "4.0.22",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.22.tgz",
"integrity": "sha512-dg6Du7nr/SLU80yJw7a0zk2xX9Vc8SCLZaQMmSRBlsnL1/Z7qpWDOtpRC9VlL9vTLenbvwGTvPWMpOKyyNbiiA==",
"requires": {
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartmatch": "^1.0.7",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smarttime": "^3.0.37",
"@types/minimatch": "^3.0.3",
"@pushrocks/smarttime": "^3.0.38",
"@types/minimatch": "^3.0.5",
"symbol-tree": "^3.2.4"
}
},
@ -18631,11 +18631,11 @@
}
},
"@pushrocks/smartrouter": {
"version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.7.tgz",
"integrity": "sha512-ns4ye4uyzjpFUDr/vciOZog4y5QDsFBxwnYmXkSMxCA7hwiL0Fn64lvCexjez05t6Gz54ge5yflWSvyv63X0kA==",
"version": "1.0.11",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.11.tgz",
"integrity": "sha512-wh71Z/OXn4ymBgUb9JLnaZeXqcK+nrukciKBpN3jG03mItSi+RjShh/mGbNsWCk2D6CYRTzTaf9rx0uHOMZUoQ==",
"requires": {
"path-to-regexp": "^6.1.0"
"path-to-regexp": "^6.2.0"
}
},
"@pushrocks/smartrx": {
@ -19160,9 +19160,9 @@
"integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM="
},
"@types/minimatch": {
"version": "3.0.3",
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
"version": "3.0.5",
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.5.tgz",
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
},
"@types/node": {
"version": "14.14.11",
@ -24110,9 +24110,9 @@
}
},
"lit-element": {
"version": "2.4.0",
"resolved": "https://verdaccio.lossless.one/lit-element/-/lit-element-2.4.0.tgz",
"integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==",
"version": "2.5.1",
"resolved": "https://verdaccio.lossless.one/lit-element/-/lit-element-2.5.1.tgz",
"integrity": "sha512-ogu7PiJTA33bEK0xGu1dmaX5vhcRjBXCFexPja0e7P7jqLhTpNKYRPmE+GmiCaRVAbiQKGkUgkh/i6+bh++dPQ==",
"requires": {
"lit-html": "^1.1.1"
}
@ -27833,9 +27833,9 @@
"dev": true
},
"typescript": {
"version": "4.4.2",
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.4.2.tgz",
"integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ=="
"version": "4.4.3",
"resolved": "https://verdaccio.lossless.one/typescript/-/typescript-4.4.3.tgz",
"integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA=="
},
"uglify-js": {
"version": "3.13.3",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.52",
"version": "1.0.68",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",
@ -13,17 +13,17 @@
"author": "Lossless GmbH",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.90",
"@designestate/dees-element": "^1.0.19",
"@designestate/dees-domtools": "^1.0.94",
"@designestate/dees-element": "^1.0.23",
"@designestate/dees-wcctools": "^1.0.57",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-brands-svg-icons": "^5.15.4",
"@fortawesome/free-regular-svg-icons": "^5.15.4",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"typescript": "^4.4.2"
"typescript": "^4.4.3"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.26",
"@gitzone/tsbuild": "^2.1.27",
"@gitzone/tsbundle": "^1.0.87",
"@gitzone/tstest": "^1.0.57",
"@gitzone/tswatch": "^1.0.56",

View File

@ -103,7 +103,9 @@ export class DeesForm extends DeesElement {
requiredOK = false;
}
}
this.getSubmitButton().disabled = !requiredOK;
if (this.getSubmitButton()) {
this.getSubmitButton().disabled = !requiredOK;
}
}
public async gatherData() {
@ -136,6 +138,13 @@ export class DeesForm extends DeesElement {
const submitButton = this.getSubmitButton();
switch (visualStateArg) {
case 'normal':
submitButton.disabled = false;
submitButton.status = 'normal';
for (const inputChild of inputChildren) {
inputChild.disabled = false;
}
break;
case 'pending':
submitButton.disabled = true;
submitButton.status = 'pending';

View File

@ -14,44 +14,57 @@ 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')
export class DeesStepper extends DeesElement {
public static demo = () => html` <dees-stepper></dees-stepper> `;
public static demo = () =>
html`
<dees-stepper
.steps=${[
{
title: 'Whats your name?',
content: html`
<dees-form>
<dees-input-text
key="email"
label="Your Email"
value="hello@something.com"
disabled
></dees-input-text>
<dees-input-text key="firstName" required label="Vorname"></dees-input-text>
<dees-input-text key="lastName" required label="Nachname"></dees-input-text>
<dees-form-submit>Next</dees-form-submit>
</dees-form>
`,
validationFunc: async (stepperArg, elementArg) => {
const deesForm = elementArg.querySelector('dees-form');
deesForm.addEventListener('formData', eventArg => {
stepperArg.goNext();
})
}
},
{
title: 'Whats your mobile number?',
content: html``,
}
] as IStep[]}
></dees-stepper>
`;
@property({
type: Array,
})
public steps: IStep[] = [
{
title: 'Whats your name?',
content: html`
<dees-form>
<dees-input-text key="email" label="Your Email" value="hello@something.com" disabled></dees-input-text>
<dees-input-text key="firstName" required label="Vorname"></dees-input-text>
<dees-input-text key="lastName" required label="Nachname"></dees-input-text>
<dees-form-submit>Next</dees-form-submit>
</dees-form>
`,
},
{
title: 'Whats your mobile number?',
content: html``,
},
{
title: 'Whats the verification code?',
content: html``,
},
{
title: 'Whats your new password?',
content: html``,
},
{
title: 'Verification:',
content: html``,
},
];
public steps: IStep[] = [];
@property({
type: Object,
@ -87,23 +100,31 @@ export class DeesStepper extends DeesElement {
min-height: 300px;
border-radius: 3px;
background: ${cssManager.bdTheme('#ffffff', '#181818')};
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#181818')};
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 {
border-top: 1px solid #e4002b;
pointer-events: all;
filter: opacity(1);
filter: opacity(1) grayscale(0);
box-shadow: 0px 0px 5px #00000010;
user-select: auto;
}
.step.hiddenStep {
filter: opacity(0);
}
.step:last-child {
margin-bottom: 100vh;
}
.step .stepCounter {
position: absolute;
top: 0px;
@ -148,9 +169,20 @@ export class DeesStepper extends DeesElement {
<div class="stepperContainer">
${this.steps.map(
(stepArg) =>
html`<div class="step ${stepArg === this.selectedStep ? 'selected' : null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep) ? 'hiddenStep' : ''}">
${this.getIndexOfStep(stepArg) > 0 ? html`<div class="goBack" @click=${this.goBack}><- go to previous step</div>` : ``}
<div class="stepCounter">Step ${this.steps.findIndex(elementArg => elementArg === stepArg) + 1} of ${this.steps.length} </div>
html`<div
class="step ${stepArg === this.selectedStep
? 'selected'
: null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep)
? 'hiddenStep'
: ''}"
>
${this.getIndexOfStep(stepArg) > 0
? html`<div class="goBack" @click=${this.goBack}><- go to previous step</div>`
: ``}
<div class="stepCounter">
Step ${this.steps.findIndex((elementArg) => elementArg === stepArg) + 1} of
${this.steps.length}
</div>
<div class="title">${stepArg.title}</div>
<div class="content">${stepArg.content}</div>
</div> `
@ -160,22 +192,19 @@ export class DeesStepper extends DeesElement {
}
public getIndexOfStep = (stepArg: IStep): number => {
return this.steps.findIndex(stepArg2 => stepArg === stepArg2 )
}
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
};
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);
@ -183,30 +212,45 @@ export class DeesStepper extends DeesElement {
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
if (!stepperContainer.style.paddingTop) {
stepperContainer.style.paddingTop = `${(stepperContainer.offsetHeight / 2) - (selectedStepElement.offsetHeight / 2)}px`;
stepperContainer.style.paddingTop = `${
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
}px`;
}
console.log('Setting scroll status');
console.log(selectedStepElement);
const scrollPosition = selectedStepElement.offsetTop - (stepperContainer.offsetHeight / 2) + (selectedStepElement.offsetHeight / 2) ;
const scrollPosition =
selectedStepElement.offsetTop -
stepperContainer.offsetHeight / 2 +
selectedStepElement.offsetHeight / 2;
console.log(scrollPosition);
const domtoolsInstance = await domtools.DomTools.setupDomTools()
const domtoolsInstance = await domtools.DomTools.setupDomTools();
if (!this.scroller) {
this.scroller = new domtools.plugins.sweetScroll({
vertical: true,
horizontal: false,
easing: 'easeInOutQuint'
}, stepperContainer);
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() {
const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep);
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() {
const currentIndex = this.steps.findIndex(stepArg => stepArg === this.selectedStep);
const currentIndex = this.steps.findIndex((stepArg) => stepArg === this.selectedStep);
this.selectedStep = this.steps[currentIndex + 1];
}
}

View File

@ -0,0 +1,237 @@
import {
customElement,
html,
DeesElement,
property,
TemplateResult,
cssManager,
css,
unsafeCSS,
} from '@designestate/dees-element';
import * as domtools from '@designestate/dees-domtools';
declare global {
interface HTMLElementTagNameMap {
'dees-table': DeesTable<any>;
}
}
@customElement('dees-table')
export class DeesTable<T> extends DeesElement {
public static demo = () => html`
<style>
.demoWrapper {
box-sizing: border-box;
position: absolute;
width: 100%;
height: 100%;
padding: 60px;
background: #000000;
}
</style>
<div class="demoWrapper">
<dees-table
heading1="Current Account Statement"
heading2="Bunq - Payment Account 2 - April 2021"
.data=${[
{
date: '2021-04-01',
amount: '2464.65 €',
description: 'Printing Paper (Office Supplies) - STAPLES BREMEN',
},
{
date: '2021-04-02',
amount: '165.65 €',
description: 'Logitech Mouse (Hardware) - logi.com OnlineShop',
},
{
date: '2021-04-03',
amount: '2999,00 €',
description: 'Macbook Pro 16inch (Hardware) - Apple.de OnlineShop',
},
{
date: '2021-04-01',
amount: '2464.65 €',
description: 'Office-Supplies - STAPLES BREMEN',
},
{
date: '2021-04-01',
amount: '2464.65 €',
description: 'Office-Supplies - STAPLES BREMEN',
},
]}
>This is a slotted Text</dees-table
>
</div>
`;
@property()
public heading1: string;
@property()
public heading2: string;
@property({
type: Array,
})
public data: T[] = [];
@property()
public selectedDataRow: T;
@property({
type: String,
})
public type: 'normal' | 'highlighted' | 'discreet' | 'big' = 'normal';
@property({
type: String,
})
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
constructor() {
super();
}
public static styles = [
cssManager.defaultStyles,
css`
.mainbox {
color: #fff;
font-family: Roboto Mono;
padding: 20px;
display: block;
width: 100%;
min-height: 50px;
background: #393939;
border-radius: 3px;
}
.headingSeparation {
margin-top: 7px;
border-bottom: 1px solid #bcbcbc;
}
table,
.noDataSet {
margin-top: 20px;
color: #fff;
border-collapse: collapse;
width: 100%;
}
.noDataSet {
text-align: center;
}
tr {
border-bottom: 1px dashed #808080;
text-align: left;
}
tr:last-child {
border-bottom: none;
text-align: left;
}
tr:hover {
cursor: pointer;
}
tr:hover .innerCellContainer {
background: #ffffff10;
}
tr:first-child:hover {
cursor: auto;
}
tr:first-child:hover .innerCellContainer {
background: none;
}
tr.selected .innerCellContainer {
background: #ffffff20
}
th {
text-transform: uppercase;
}
th,
td {
padding: 3px 0px;
border-right: 1px dashed #808080;
}
.innerCellContainer {
padding: 7px 10px;
}
th:first-child .innerCellContainer,
td:first-child .innerCellContainer {
padding-left: 0px;
}
th:last-child .innerCellContainer,
td:last-child .innerCellContainer {
padding-right: 0px;
}
th:last-child,
td:last-child {
border-right: none;
}
.tableStatistics {
padding: 5px 20px;
font-size: 14px;
color: #ffffff90;
background: #00000050;
margin: 20px -20px -20px -20px;
}
`,
];
public render(): TemplateResult {
return html`
<div class="mainbox">
<!-- the heading part -->
<div>${this.heading1}</div>
<div>${this.heading2}</div>
<div class="headingSeparation"></div>
<!-- the actual table -->
<style></style>
${this.data.length > 0
? (() => {
const headings: string[] = Object.keys(this.data[0]);
return html`
<table>
<tr>
${headings.map(
(headingArg) => html`
<th>
<div class="innerCellContainer">${headingArg}</div>
</th>
`
)}
</tr>
${this.data.map(
(itemArg) => html`
<tr
@click=${() => {
this.selectedDataRow = itemArg;
}}
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
>
${headings.map(
(headingArg) => html`
<td>
<div class="innerCellContainer">${itemArg[headingArg]}</div>
</td>
`
)}
</tr>
`
)}
</table>
`;
})()
: html` <div class="noDataSet">No data set!</div> `}
<div class="tableStatistics">
${this.data.length} data rows (total) |
${this.selectedDataRow ? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected` : html`No row selected`}
</div>
</div>
`;
}
public async firstUpdated() {}
}

View File

@ -10,6 +10,7 @@ export * from './dees-input-radio';
export * from './dees-input-text';
export * from './dees-spinner';
export * from './dees-stepper';
export * from './dees-table';
export * from './dees-toast';
export * from './dees-updater';
export * from './dees-windowlayer';