Compare commits
52 Commits
Author | SHA1 | Date | |
---|---|---|---|
66644364b5 | |||
51febdae06 | |||
745ff299dc | |||
3606d60ba6 | |||
8970a79141 | |||
566a7ce148 | |||
362bef15e3 | |||
446c494863 | |||
dbe2f2f217 | |||
02ca92a431 | |||
a9015e787c | |||
9cd28fa819 | |||
7b3793e943 | |||
a22c04d98d | |||
5367512292 | |||
9c387f8ace | |||
c3ec288d09 | |||
9d952afebb | |||
621262fde7 | |||
e3e79d9a11 | |||
d08a92814e | |||
a6f277250e | |||
09cb82d587 | |||
316e2a0b27 | |||
e0d2679801 | |||
107800a057 | |||
4ee8512ee4 | |||
f75a3714ae | |||
d6047f2e78 | |||
03769c8412 | |||
1a782eb4ee | |||
a27adf25cb | |||
96e237b9af | |||
710e06b2f1 | |||
a3bc25c4ac | |||
ee5b712a37 | |||
879ae5ad91 | |||
2bbda416b2 | |||
de88957857 | |||
aa0c63d569 | |||
d843f27fd3 | |||
a26755b7d3 | |||
345a562a21 | |||
3fae99554d | |||
ed30ed3f8f | |||
beef47959b | |||
aec2cf18fd | |||
0f45633666 | |||
8588888ce7 | |||
2a62a635cd | |||
0eb2557956 | |||
9960bf7018 |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @gitzone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
@ -10,11 +10,9 @@
|
|||||||
/>
|
/>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
<link rel="preconnect" href="https://rsms.me/">
|
<!--Lets load standard fonts-->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
|
||||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// dees tools
|
// dees tools
|
||||||
import * as deesWccTools from '@designestate/dees-wcctools';
|
import * as deesWccTools from '@design.estate/dees-wcctools';
|
||||||
import * as deesDomTools from '@designestate/dees-domtools';
|
import * as deesDomTools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
// elements and pages
|
// elements and pages
|
||||||
import * as elements from '../ts_web/elements/index.js';
|
import * as elements from '../ts_web/elements/index.js';
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
"projectType": "wcc",
|
"projectType": "wcc",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "design.estate",
|
||||||
"gitrepo": "dees-catalog",
|
"gitrepo": "dees-catalog",
|
||||||
"description": "a webcomponents catalog for handling daily stuff on the web",
|
"description": "a webcomponents catalog for handling daily stuff on the web",
|
||||||
"npmPackagename": "@designestate/dees-catalog",
|
"npmPackagename": "@design.estate/dees-catalog",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate"
|
"projectDomain": "design.estate"
|
||||||
}
|
}
|
||||||
|
40
package.json
40
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@design.estate/dees-catalog",
|
||||||
"version": "1.0.157",
|
"version": "1.0.183",
|
||||||
"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",
|
||||||
@ -15,27 +15,27 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.30",
|
"@design.estate/dees-domtools": "^2.0.38",
|
||||||
"@designestate/dees-element": "^2.0.20",
|
"@design.estate/dees-element": "^2.0.25",
|
||||||
"@designestate/dees-wcctools": "^1.0.76",
|
"@design.estate/dees-wcctools": "^1.0.78",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
"@fortawesome/free-brands-svg-icons": "^6.4.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
"@fortawesome/free-regular-svg-icons": "^6.4.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
||||||
"@pushrocks/smartpromise": "^4.0.0",
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
"@pushrocks/smartstring": "^4.0.5",
|
"@push.rocks/smartstring": "^4.0.8",
|
||||||
"@tsclass/tsclass": "^4.0.36",
|
"@tsclass/tsclass": "^4.0.42",
|
||||||
"highlight.js": "11.7.0",
|
"highlight.js": "11.8.0",
|
||||||
"pdfjs-dist": "^2.15.349"
|
"pdfjs-dist": "^2.16.105"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.65",
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
"@gitzone/tsbundle": "^2.0.7",
|
"@gitzone/tsbundle": "^2.0.8",
|
||||||
"@gitzone/tstest": "^1.0.74",
|
"@gitzone/tstest": "^1.0.77",
|
||||||
"@gitzone/tswatch": "^2.0.7",
|
"@gitzone/tswatch": "^2.0.7",
|
||||||
"@pushrocks/projectinfo": "^5.0.1",
|
"@push.rocks/projectinfo": "^5.0.2",
|
||||||
"@pushrocks/tapbundle": "^5.0.4",
|
"@push.rocks/tapbundle": "^5.0.15",
|
||||||
"@types/node": "^18.15.11"
|
"@types/node": "^20.5.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
2998
pnpm-lock.yaml
generated
2998
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
24
readme.md
24
readme.md
@ -1,26 +1,26 @@
|
|||||||
# @designestate/dees-catalog
|
# @design.estate/dees-catalog
|
||||||
a webcomponents catalog for handling daily stuff on the web
|
a webcomponents catalog for handling daily stuff on the web
|
||||||
|
|
||||||
## Availabililty and Links
|
## Availabililty and Links
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-catalog)
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@design.estate/dees-catalog)
|
||||||
* [gitlab.com (source)](https://gitlab.com/designestate/dees-catalog)
|
* [gitlab.com (source)](https://gitlab.com/design.estate/dees-catalog)
|
||||||
* [github.com (source mirror)](https://github.com/designestate/dees-catalog)
|
* [github.com (source mirror)](https://github.com/design.estate/dees-catalog)
|
||||||
* [docs (typedoc)](https://designestate.gitlab.io/dees-catalog/)
|
* [docs (typedoc)](https://design.estate.gitlab.io/dees-catalog/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
|
||||||
Status Category | Status Badge
|
Status Category | Status Badge
|
||||||
-- | --
|
-- | --
|
||||||
GitLab Pipelines | [](https://lossless.cloud)
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
npm | [](https://lossless.cloud)
|
npm | [](https://lossless.cloud)
|
||||||
Snyk | [](https://lossless.cloud)
|
Snyk | [](https://lossless.cloud)
|
||||||
TypeScript Support | [](https://lossless.cloud)
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
Code Style | [](https://lossless.cloud)
|
Code Style | [](https://lossless.cloud)
|
||||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { tap, expect, webhelpers } from '@pushrocks/tapbundle';
|
import { tap, expect, webhelpers } from '@push.rocks/tapbundle';
|
||||||
|
|
||||||
import * as deesCatalog from '../ts_web';
|
import * as deesCatalog from '../ts_web';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* autocreated commitinfo by @pushrocks/commitinfo
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.157',
|
version: '1.0.183',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,12 @@ import {
|
|||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
html,
|
html,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
state,
|
state,
|
||||||
property
|
property
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
@customElement('dees-button-exit')
|
@customElement('dees-button-exit')
|
||||||
export class DeesButtonExit extends DeesElement {
|
export class DeesButtonExit extends DeesElement {
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -87,7 +88,7 @@ export class DeesButton extends DeesElement {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${cssManager.bdTheme('#fff', '#333')};
|
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||||
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
box-shadow: ${cssManager.bdTheme('0px 1px 3px rgba(0,0,0,0.3)', 'none')};
|
||||||
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
||||||
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -4,13 +4,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@ -2,16 +2,16 @@ import {
|
|||||||
DeesElement,
|
DeesElement,
|
||||||
html,
|
html,
|
||||||
customElement,
|
customElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
state,
|
state,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import hlight from 'highlight.js';
|
import hlight from 'highlight.js';
|
||||||
|
|
||||||
import * as smartstring from '@pushrocks/smartstring';
|
import * as smartstring from '@push.rocks/smartstring';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -30,9 +30,10 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
public progLang: string = 'typescript';
|
public progLang: string = 'typescript';
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public codeToDisplay: string = '// no code set';
|
public codeToDisplay: string = '';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -108,7 +109,7 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
.lineNumbers {
|
.lineNumbers {
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
font-family: monospace;
|
font-family: 'Intel One Mono', 'monospace';
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-string {
|
.hljs-string {
|
||||||
@ -143,12 +144,15 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
})
|
})
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
<pre><code class="${this.progLang}">${this.codeToDisplay}</code></pre>
|
<pre><code></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@state()
|
||||||
|
private codeToDisplayStore = '';
|
||||||
|
|
||||||
public async updated(_changedProperties) {
|
public async updated(_changedProperties) {
|
||||||
super.updated(_changedProperties);
|
super.updated(_changedProperties);
|
||||||
console.log('highlighting now');
|
console.log('highlighting now');
|
||||||
@ -159,11 +163,16 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
slottedCodeNodes.push(childNode as Text);
|
slottedCodeNodes.push(childNode as Text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText) {
|
if (this.codeToDisplay && this.codeToDisplay !== this.codeToDisplayStore) {
|
||||||
this.codeToDisplay = smartstring.indent.normalize(slottedCodeNodes[0].wholeText);
|
this.codeToDisplayStore = smartstring.indent.normalize(this.codeToDisplay).trimStart();
|
||||||
|
}
|
||||||
|
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText && !this.codeToDisplay) {
|
||||||
|
this.codeToDisplayStore = smartstring.indent.normalize(slottedCodeNodes[0].wholeText).trimStart();
|
||||||
|
this.codeToDisplay = this.codeToDisplayStore;
|
||||||
}
|
}
|
||||||
await domtools.plugins.smartdelay.delayFor(0);
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
const localCodeNode = this.shadowRoot.querySelector('code');
|
const localCodeNode = this.shadowRoot.querySelector('code');
|
||||||
hlight.highlightBlock(localCodeNode);
|
const html = hlight.highlight(this.codeToDisplayStore, {language: this.progLang, ignoreIllegals: true});
|
||||||
|
localCodeNode.innerHTML = html.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,21 +2,16 @@ import {
|
|||||||
DeesElement,
|
DeesElement,
|
||||||
html,
|
html,
|
||||||
customElement,
|
customElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
state,
|
state,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
import hlight from 'highlight.js';
|
|
||||||
|
|
||||||
import * as smartstring from '@pushrocks/smartstring';
|
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
||||||
@ -52,7 +47,7 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Detail 4',
|
name: 'Detail 4',
|
||||||
value: 'Value 4',
|
value: 'Value 4 jhdkfjhalskdfjhfdjskalsdkfjhfdjskalskdjfhjdkslaksjdhfjdkslaskdfjhfjdkslaskdjfhjdskalskdjhfdjskalskdjfhdjskl',
|
||||||
status: 'ok',
|
status: 'ok',
|
||||||
statusText: 'OK',
|
statusText: 'OK',
|
||||||
},
|
},
|
||||||
@ -67,9 +62,9 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
.mainbox {
|
.mainbox {
|
||||||
max-width: 600px;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: #1b1b1b;
|
background: ${cssManager.bdTheme('#fff', '#1b1b1b')};
|
||||||
|
box-shadow: 0px 1px 3px #00000030;
|
||||||
min-height: 48px;
|
min-height: 48px;
|
||||||
color: ${cssManager.bdTheme('#000', '#fff')};
|
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||||
}
|
}
|
||||||
@ -123,20 +118,27 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.detail {
|
.detail {
|
||||||
height: 60px;
|
minheight: 60px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 40px auto;
|
grid-template-columns: 40px auto;
|
||||||
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail .detailsText {
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
padding-right: 8px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.detail .detailsText .label {
|
.detail .detailsText .label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail .detailsText .value {
|
.detail .detailsText .value {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-family: Roboto Mono;
|
font-family: 'Intel One Mono';
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
@ -145,11 +147,11 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<div class="statusdot ${this.statusObject.combinedStatus}"></div>
|
<div class="statusdot ${this.statusObject?.combinedStatus}"></div>
|
||||||
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
||||||
<div class="copyMain">Copy as JSON</div>
|
<div class="copyMain">Copy as JSON</div>
|
||||||
</div>
|
</div>
|
||||||
${this.statusObject.details.map((detailArg) => {
|
${this.statusObject?.details?.map((detailArg) => {
|
||||||
return html`
|
return html`
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="statusdot ${detailArg.status}"></div>
|
<div class="statusdot ${detailArg.status}"></div>
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
css,
|
css,
|
||||||
cssManager,
|
cssManager,
|
||||||
property,
|
property,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
import { DeesForm } from './dees-form.js';
|
import { DeesForm } from './dees-form.js';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@ -20,6 +21,7 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
|
|
||||||
@ -29,7 +31,7 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
public text: string;
|
public text: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
})
|
})
|
||||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||||
|
|
||||||
@ -41,7 +43,12 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return html`
|
return html`
|
||||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled} .text=${this.text ? this.text : this.textContent}>
|
<dees-button
|
||||||
|
status=${this.status}
|
||||||
|
@click=${this.submit}
|
||||||
|
.disabled=${this.disabled}
|
||||||
|
.text=${this.text ? this.text : this.textContent}
|
||||||
|
>
|
||||||
</dees-button>
|
</dees-button>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -53,4 +60,12 @@ export class DeesFormSubmit extends DeesElement {
|
|||||||
const parentElement: DeesForm = this.parentElement as DeesForm;
|
const parentElement: DeesForm = this.parentElement as DeesForm;
|
||||||
parentElement.gatherAndDispatch();
|
parentElement.gatherAndDispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async focus() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
if (!this.disabled) {
|
||||||
|
domtools.convenience.smartdelay.delayFor(0);
|
||||||
|
this.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, html, TemplateResult, DeesElement } from '@designestate/dees-element';
|
import { customElement, html, type TemplateResult, DeesElement, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
import { DeesInputCheckbox } from './dees-input-checkbox.js';
|
import { DeesInputCheckbox } from './dees-input-checkbox.js';
|
||||||
import { DeesInputText } from './dees-input-text.js';
|
import { DeesInputText } from './dees-input-text.js';
|
||||||
@ -7,9 +7,15 @@ import { DeesInputQuantitySelector } from './dees-input-quantityselector.js';
|
|||||||
import { DeesInputRadio } from './dees-input-radio.js';
|
import { DeesInputRadio } from './dees-input-radio.js';
|
||||||
import { DeesFormSubmit } from './dees-form-submit.js';
|
import { DeesFormSubmit } from './dees-form-submit.js';
|
||||||
|
|
||||||
export type TFormElement = Array<
|
// Unified set for form input types
|
||||||
DeesInputCheckbox | DeesInputText | DeesInputQuantitySelector | DeesInputRadio
|
const FORM_INPUT_TYPES = [
|
||||||
>;
|
DeesInputCheckbox,
|
||||||
|
DeesInputText,
|
||||||
|
DeesInputQuantitySelector,
|
||||||
|
DeesInputRadio
|
||||||
|
];
|
||||||
|
|
||||||
|
export type TFormInputElement = DeesInputCheckbox | DeesInputText | DeesInputQuantitySelector | DeesInputRadio;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -19,6 +25,7 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-form')
|
@customElement('dees-form')
|
||||||
export class DeesForm extends DeesElement {
|
export class DeesForm extends DeesElement {
|
||||||
|
|
||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
<dees-form
|
<dees-form
|
||||||
style="display: block; margin:auto; max-width: 500px; padding: 20px"
|
style="display: block; margin:auto; max-width: 500px; padding: 20px"
|
||||||
@ -31,17 +38,14 @@ export class DeesForm extends DeesElement {
|
|||||||
>
|
>
|
||||||
<dees-input-text .required="${true}" key="hello1" label="a text"></dees-input-text>
|
<dees-input-text .required="${true}" key="hello1" label="a text"></dees-input-text>
|
||||||
<dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text>
|
<dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text>
|
||||||
<dees-input-checkbox
|
<dees-input-checkbox .required="${true}" key="hello3" label="another text"></dees-input-checkbox>
|
||||||
.required="${true}"
|
|
||||||
key="hello3"
|
|
||||||
label="another text"
|
|
||||||
></dees-input-checkbox>
|
|
||||||
<dees-form-submit>Submit</dees-form-submit>
|
<dees-form-submit>Submit</dees-form-submit>
|
||||||
</dees-form>
|
</dees-form>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
public name: string = 'myform';
|
public name: string = 'myform';
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
|
public readyDeferred = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
@ -54,51 +58,39 @@ export class DeesForm extends DeesElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public firstUpdated() {
|
public async firstUpdated() {
|
||||||
const formChildren = this.getFormChildren();
|
const formChildren = this.getFormElements();
|
||||||
this.checkRequiredStatus();
|
this.updateRequiredStatus();
|
||||||
|
|
||||||
for (const child of formChildren) {
|
for (const child of formChildren) {
|
||||||
child.changeSubject.subscribe(async (elementArg: TFormElement) => {
|
child.changeSubject.subscribe(async () => {
|
||||||
const valueObject = await this.gatherData();
|
const valueObject = await this.collectFormData();
|
||||||
this.changeSubject.next(valueObject);
|
this.changeSubject.next(valueObject);
|
||||||
console.log(valueObject);
|
console.log(valueObject);
|
||||||
this.checkRequiredStatus();
|
this.updateRequiredStatus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
await this.addBehaviours();
|
||||||
|
this.readyDeferred.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFormChildren() {
|
public getFormElements(): Array<TFormInputElement> {
|
||||||
const children: Array<DeesElement> = this.children as any;
|
return (Array.from(this.children)).filter(child =>
|
||||||
const formChildren: TFormElement = [];
|
FORM_INPUT_TYPES.includes(child.constructor as any)
|
||||||
|
) as unknown as TFormInputElement[];
|
||||||
for (const child of children) {
|
|
||||||
if (
|
|
||||||
child instanceof DeesInputCheckbox ||
|
|
||||||
child instanceof DeesInputText ||
|
|
||||||
child instanceof DeesInputQuantitySelector
|
|
||||||
) {
|
|
||||||
formChildren.push(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return formChildren;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSubmitButton() {
|
public getSubmitButton(): DeesFormSubmit | undefined {
|
||||||
const children: Array<DeesElement> = this.children as any;
|
return Array.from(this.children).find(child =>
|
||||||
let submitButton: DeesFormSubmit;
|
child instanceof DeesFormSubmit
|
||||||
for (const childArg of children) {
|
) as DeesFormSubmit;
|
||||||
if (childArg instanceof DeesFormSubmit) {
|
|
||||||
submitButton = childArg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return submitButton;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async checkRequiredStatus() {
|
public async updateRequiredStatus() {
|
||||||
console.log('checking the required status.');
|
console.log('checking the required status.');
|
||||||
|
|
||||||
let requiredOK = true;
|
let requiredOK = true;
|
||||||
for (const childArg of this.getFormChildren()) {
|
for (const childArg of this.getFormElements()) {
|
||||||
if (childArg.required && !childArg.value) {
|
if (childArg.required && !childArg.value) {
|
||||||
requiredOK = false;
|
requiredOK = false;
|
||||||
}
|
}
|
||||||
@ -108,17 +100,20 @@ export class DeesForm extends DeesElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async gatherData() {
|
public async collectFormData() {
|
||||||
const children = this.getFormChildren();
|
const children = this.getFormElements();
|
||||||
const valueObject: { [key: string]: string | number | boolean } = {};
|
const valueObject: { [key: string]: string | number | boolean } = {};
|
||||||
for (const child of children) {
|
for (const child of children) {
|
||||||
|
if (!child.key) {
|
||||||
|
console.log(`form element with label "${child.label}" has no key. skipping.`);
|
||||||
|
}
|
||||||
valueObject[child.key] = child.value;
|
valueObject[child.key] = child.value;
|
||||||
}
|
}
|
||||||
return valueObject;
|
return valueObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async gatherAndDispatch() {
|
public async gatherAndDispatch() {
|
||||||
const valueObject = await this.gatherData();
|
const valueObject = await this.collectFormData();
|
||||||
const formDataEvent = new CustomEvent('formData', {
|
const formDataEvent = new CustomEvent('formData', {
|
||||||
detail: {
|
detail: {
|
||||||
data: valueObject,
|
data: valueObject,
|
||||||
@ -134,7 +129,7 @@ export class DeesForm extends DeesElement {
|
|||||||
visualStateArg: 'normal' | 'pending' | 'error' | 'success',
|
visualStateArg: 'normal' | 'pending' | 'error' | 'success',
|
||||||
textStateArg: string
|
textStateArg: string
|
||||||
) {
|
) {
|
||||||
const inputChildren = this.getFormChildren();
|
const inputChildren = this.getFormElements();
|
||||||
const submitButton = this.getSubmitButton();
|
const submitButton = this.getSubmitButton();
|
||||||
|
|
||||||
switch (visualStateArg) {
|
switch (visualStateArg) {
|
||||||
@ -170,4 +165,36 @@ export class DeesForm extends DeesElement {
|
|||||||
|
|
||||||
submitButton.text = textStateArg;
|
submitButton.text = textStateArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resets the form
|
||||||
|
*/
|
||||||
|
reset() {
|
||||||
|
const inputChildren = this.getFormElements();
|
||||||
|
const submitButton = this.getSubmitButton();
|
||||||
|
|
||||||
|
for (const inputChild of inputChildren) {
|
||||||
|
inputChild.value = null;
|
||||||
|
}
|
||||||
|
this.setStatus('normal', 'Submit');
|
||||||
|
}
|
||||||
|
|
||||||
|
public async addBehaviours() {
|
||||||
|
// Use event delegation
|
||||||
|
this.addEventListener('keydown', (event: KeyboardEvent) => {
|
||||||
|
const target = event.target as DeesElement;
|
||||||
|
if (!FORM_INPUT_TYPES.includes(target.constructor as any)) return;
|
||||||
|
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
const children = this.getFormElements();
|
||||||
|
const currentIndex = children.indexOf(target as any);
|
||||||
|
if (currentIndex < children.length - 1) {
|
||||||
|
children[currentIndex + 1].focus();
|
||||||
|
} else {
|
||||||
|
target.blur();
|
||||||
|
this.getSubmitButton()?.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,12 @@ import {
|
|||||||
customElement,
|
customElement,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
import { icon, IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
import { icon, type IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
||||||
import {
|
import {
|
||||||
faFacebook,
|
faFacebook,
|
||||||
faGoogle,
|
faGoogle,
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
cssManager
|
cssManager,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
} from '@design.estate/dees-element';
|
||||||
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -25,6 +26,7 @@ export class DeesInputCheckbox extends DeesElement {
|
|||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String,
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ export class DeesInputCheckbox extends DeesElement {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="maincontainer" @click="${this.toggleSelected}">
|
<div class="maincontainer" @click="${this.toggleSelected}">
|
||||||
<div class="checkbox ${this.value ? 'selected' : ''} ${this.disabled ? 'disabled' : ''}">
|
<div class="checkbox ${this.value ? 'selected' : ''} ${this.disabled ? 'disabled' : ''}" tabindex="0">
|
||||||
${this.value
|
${this.value
|
||||||
? html`
|
? html`
|
||||||
<span class="checkmark">
|
<span class="checkmark">
|
||||||
@ -171,4 +173,11 @@ export class DeesInputCheckbox extends DeesElement {
|
|||||||
);
|
);
|
||||||
this.changeSubject.next(this);
|
this.changeSubject.next(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public focus(): void {
|
||||||
|
const checkboxDiv = this.shadowRoot.querySelector('.checkbox');
|
||||||
|
if (checkboxDiv) {
|
||||||
|
(checkboxDiv as any).focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, property, html, css, cssManager } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, property, html, css, cssManager, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -22,7 +22,10 @@ export class DeesInputDropdown extends DeesElement {
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
|
|
||||||
@property()
|
@property({
|
||||||
|
type: String,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
public label: string = 'Label';
|
public label: string = 'Label';
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
property,
|
property,
|
||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
cssManager,
|
cssManager,
|
||||||
} from '@designestate/dees-element';
|
type CSSResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -31,6 +32,7 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String,
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@ -122,7 +124,7 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
border-bottom: 1px dashed #444;
|
border-bottom: 1px dashed #444;
|
||||||
color: ${cssManager.bdTheme('#666', '#ccc')};
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-family: 'Inter';
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uploadButton:hover .uploadCandidate {
|
.uploadButton:hover .uploadCandidate {
|
||||||
@ -154,7 +156,10 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
public async openFileSelector() {
|
public async openFileSelector() {
|
||||||
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
|
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
|
||||||
inputFile.click();
|
inputFile.click();
|
||||||
|
this.state = 'idle';
|
||||||
|
this.buttonText = 'Upload more files...';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async updateValue(eventArg: Event) {
|
public async updateValue(eventArg: Event) {
|
||||||
const target: any = eventArg.target;
|
const target: any = eventArg.target;
|
||||||
@ -163,6 +168,20 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public firstUpdated() {
|
public firstUpdated() {
|
||||||
|
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
|
||||||
|
inputFile.addEventListener('change', (event: Event) => {
|
||||||
|
const target = event.target as HTMLInputElement;
|
||||||
|
for (const file of Array.from(target.files)) {
|
||||||
|
this.value.push(file);
|
||||||
|
}
|
||||||
|
this.requestUpdate();
|
||||||
|
console.log(`Got ${this.value.length} files!`);
|
||||||
|
// Reset the input value to allow selecting the same file again if needed
|
||||||
|
target.value = '';
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// lets handle drag and drop
|
||||||
const dropArea = this.shadowRoot.querySelector('.uploadButton');
|
const dropArea = this.shadowRoot.querySelector('.uploadButton');
|
||||||
const handlerFunction = (eventArg: DragEvent) => {
|
const handlerFunction = (eventArg: DragEvent) => {
|
||||||
eventArg.preventDefault();
|
eventArg.preventDefault();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, property, html, TemplateResult, DeesElement } from '@designestate/dees-element';
|
import { customElement, property, html, type TemplateResult, DeesElement, type CSSResult, } from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -15,6 +15,12 @@ export class DeesInputQuantitySelector extends DeesElement {
|
|||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
|
public label: string = 'Label';
|
||||||
|
|
||||||
|
@property({
|
||||||
|
type: String,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {customElement, DeesElement, TemplateResult, property, html} from '@designestate/dees-element';
|
import {customElement, DeesElement, type TemplateResult, property, html, type CSSResult,} from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -14,7 +14,10 @@ export class DeesInputRadio extends DeesElement {
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
|
|
||||||
@property()
|
@property({
|
||||||
|
type: String,
|
||||||
|
reflect: true,
|
||||||
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {customElement, DeesElement, TemplateResult, property, html, cssManager} from '@designestate/dees-element';
|
import {customElement, DeesElement, type TemplateResult, property, html, cssManager, type CSSResult,} from '@design.estate/dees-element';
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -10,7 +10,7 @@ declare global {
|
|||||||
@customElement('dees-input-text')
|
@customElement('dees-input-text')
|
||||||
export class DeesInputText extends DeesElement {
|
export class DeesInputText extends DeesElement {
|
||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
<dees-input-text .label=${'this is a label'}></dees-input-text>
|
<dees-input-text .label=${'this is a label'} .value=${'test'}></dees-input-text>
|
||||||
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -24,12 +24,14 @@ export class DeesInputText extends DeesElement {
|
|||||||
public label: string;
|
public label: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public value: string = '';
|
public value: string = '';
|
||||||
|
|
||||||
@ -127,7 +129,7 @@ export class DeesInputText extends DeesElement {
|
|||||||
</style>
|
</style>
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
${this.label ? html`<div class="label">${this.label}</div>` : html``}
|
||||||
<input type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
<input type="${this.isPasswordBool && !this.showPasswordBool ? 'password' : 'text'}" .value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
||||||
${this.isPasswordBool ? html`
|
${this.isPasswordBool ? html`
|
||||||
<div class="showPassword" @click=${this.togglePasswordView}>
|
<div class="showPassword" @click=${this.togglePasswordView}>
|
||||||
<dees-icon .iconFA=${this.showPasswordBool ? 'eye' : 'eyeSlash'}></dees-icon>
|
<dees-icon .iconFA=${this.showPasswordBool ? 'eye' : 'eyeSlash'}></dees-icon>
|
||||||
@ -162,4 +164,9 @@ export class DeesInputText extends DeesElement {
|
|||||||
const textInput = this.shadowRoot.querySelector('input');
|
const textInput = this.shadowRoot.querySelector('input');
|
||||||
textInput.focus();
|
textInput.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async blur() {
|
||||||
|
const textInput = this.shadowRoot.querySelector('input');
|
||||||
|
textInput.blur();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,13 @@ import * as plugins from './plugins.js';
|
|||||||
import {
|
import {
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
domtools,
|
domtools,
|
||||||
html,
|
html,
|
||||||
property,
|
property,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||||
|
|
||||||
@customElement('dees-mobilenavigation')
|
@customElement('dees-mobilenavigation')
|
||||||
@ -56,7 +57,7 @@ export class DeesMobilenavigation extends DeesElement {
|
|||||||
})
|
})
|
||||||
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||||
|
|
||||||
readyDeferred = domtools.plugins.smartpromise.defer();
|
readyDeferred: plugins.smartpromise.Deferred<any> = domtools.plugins.smartpromise.defer();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -120,7 +121,7 @@ export class DeesMobilenavigation extends DeesElement {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding: 8px 0px;
|
padding: 8px 0px;
|
||||||
font-family: Inter;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
border-bottom: 1px dashed #444;
|
border-bottom: 1px dashed #444;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { DeesElement, property, html, customElement, domtools, TemplateResult } from '@designestate/dees-element';
|
import { DeesElement, property, html, customElement, domtools, type TemplateResult, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import { Deferred } from '@pushrocks/smartpromise';
|
import { Deferred } from '@push.rocks/smartpromise';
|
||||||
|
|
||||||
import type pdfjsTypes from 'pdfjs-dist';
|
import type pdfjsTypes from 'pdfjs-dist';
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ export class DeesPdf extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
:host {
|
:host {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
122
ts_web/elements/dees-simple-login.ts
Normal file
122
ts_web/elements/dees-simple-login.ts
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
DeesElement,
|
||||||
|
property,
|
||||||
|
type TemplateResult,
|
||||||
|
cssManager,
|
||||||
|
css,
|
||||||
|
unsafeCSS,
|
||||||
|
type CSSResult,
|
||||||
|
state,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-simple-login': DeesSimpleLogin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-simple-login')
|
||||||
|
export class DeesSimpleLogin extends DeesElement {
|
||||||
|
// STATIC
|
||||||
|
public static demo = () => html`
|
||||||
|
<dees-simple-login>
|
||||||
|
Hello there
|
||||||
|
</dees-simple-login>
|
||||||
|
`;
|
||||||
|
// INSTANCE
|
||||||
|
|
||||||
|
@property()
|
||||||
|
public title = 'Dees Simple Login';
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.loginContainer {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center; /* aligns horizontally */
|
||||||
|
align-items: center; /* aligns vertically */
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.login {
|
||||||
|
min-width: 320px;
|
||||||
|
min-height: 100px;
|
||||||
|
background: ${cssManager.bdTheme('#eeeeeb', '#111')};
|
||||||
|
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 24px;
|
||||||
|
transition: opacity 0.3s, transform 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.slotContainer {
|
||||||
|
opacity:0;
|
||||||
|
transition: opacity 0.3s, transform 0.3s;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
public render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<div class="loginContainer">
|
||||||
|
<div class="login">
|
||||||
|
<dees-form>
|
||||||
|
<div class="header">Login to ${this.title}</div>
|
||||||
|
<dees-input-text key="username" label="username" required></dees-input-text>
|
||||||
|
<dees-input-text key="password" label="password" isPasswordBool required></dees-input-text>
|
||||||
|
<dees-form-submit disabled>login</dees-form-submit>
|
||||||
|
</dees-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="slotContainer">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async firstUpdated(_changedProperties): Promise<void> {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
super.firstUpdated(_changedProperties);
|
||||||
|
const form = this.shadowRoot.querySelector('dees-form');
|
||||||
|
await form.readyDeferred.promise;
|
||||||
|
const username = this.shadowRoot.querySelector('dees-input-text[label="username"]');
|
||||||
|
const password = this.shadowRoot.querySelector('dees-input-text[label="password"]');
|
||||||
|
const submit = this.shadowRoot.querySelector('dees-form-submit');
|
||||||
|
form.addEventListener('formData', (event: CustomEvent) => {
|
||||||
|
this.dispatchEvent(new CustomEvent('login', { detail: event.detail }));
|
||||||
|
// this.switchToSlottedContent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* allows switching to slotted content
|
||||||
|
*/
|
||||||
|
public async switchToSlottedContent() {
|
||||||
|
const domtools = await this.domtoolsPromise;
|
||||||
|
const loginDiv: HTMLDivElement = this.shadowRoot.querySelector('.login');
|
||||||
|
const loginContainerDiv: HTMLDivElement = this.shadowRoot.querySelector('.loginContainer');
|
||||||
|
const slotContainerDiv: HTMLDivElement = this.shadowRoot.querySelector('.slotContainer');
|
||||||
|
loginDiv.style.opacity = '0';
|
||||||
|
loginDiv.style.transform = 'translateY(20px)';
|
||||||
|
loginContainerDiv.style.pointerEvents = 'none';
|
||||||
|
slotContainerDiv.style.transform = 'translateY(20px)';
|
||||||
|
await domtools.convenience.smartdelay.delayFor(300);
|
||||||
|
slotContainerDiv.style.opacity = '1';
|
||||||
|
slotContainerDiv.style.transform = 'translateY(0px)';
|
||||||
|
await domtools.convenience.smartdelay.delayFor(300);
|
||||||
|
slotContainerDiv.style.pointerEvents = 'all';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -3,13 +3,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
|
type CSSResult,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -4,12 +4,13 @@ import {
|
|||||||
html,
|
html,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
|
type CSSResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
export interface IStep {
|
export interface IStep {
|
||||||
title: string;
|
title: string;
|
||||||
@ -48,15 +49,15 @@ export class DeesStepper extends DeesElement {
|
|||||||
`,
|
`,
|
||||||
validationFunc: async (stepperArg, elementArg) => {
|
validationFunc: async (stepperArg, elementArg) => {
|
||||||
const deesForm = elementArg.querySelector('dees-form');
|
const deesForm = elementArg.querySelector('dees-form');
|
||||||
deesForm.addEventListener('formData', eventArg => {
|
deesForm.addEventListener('formData', (eventArg) => {
|
||||||
stepperArg.goNext();
|
stepperArg.goNext();
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Whats your mobile number?',
|
title: 'Whats your mobile number?',
|
||||||
content: html``,
|
content: html``,
|
||||||
}
|
},
|
||||||
] as IStep[]}
|
] as IStep[]}
|
||||||
></dees-stepper>
|
></dees-stepper>
|
||||||
`;
|
`;
|
||||||
@ -153,7 +154,7 @@ export class DeesStepper extends DeesElement {
|
|||||||
.step .title {
|
.step .title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
font-family: Inter;
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
@ -195,22 +196,26 @@ export class DeesStepper extends DeesElement {
|
|||||||
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
||||||
};
|
};
|
||||||
|
|
||||||
public firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
await this.domtoolsPromise;
|
||||||
|
await this.domtools.convenience.smartdelay.delayFor(0);
|
||||||
this.selectedStep = this.steps[0];
|
this.selectedStep = this.steps[0];
|
||||||
this.setScrollStatus();
|
this.setScrollStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updated() {
|
public async updated() {
|
||||||
this.setScrollStatus();
|
this.setScrollStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
public scroller: typeof domtools.plugins.SweetScroll.prototype;
|
||||||
|
|
||||||
public async setScrollStatus() {
|
public async setScrollStatus() {
|
||||||
await domtools.plugins.smartdelay.delayFor(50);
|
|
||||||
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
const stepperContainer: HTMLElement = this.shadowRoot.querySelector('.stepperContainer');
|
||||||
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
const firstStepElement: HTMLElement = this.shadowRoot.querySelector('.step');
|
||||||
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
const selectedStepElement: HTMLElement = this.shadowRoot.querySelector('.selected');
|
||||||
|
if (!selectedStepElement) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!stepperContainer.style.paddingTop) {
|
if (!stepperContainer.style.paddingTop) {
|
||||||
stepperContainer.style.paddingTop = `${
|
stepperContainer.style.paddingTop = `${
|
||||||
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
|
stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2
|
||||||
|
@ -3,14 +3,15 @@ import {
|
|||||||
html,
|
html,
|
||||||
DeesElement,
|
DeesElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
type TemplateResult,
|
||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
|
type CSSResult,
|
||||||
state,
|
state,
|
||||||
} from '@designestate/dees-element';
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -136,7 +137,7 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
css`
|
css`
|
||||||
.mainbox {
|
.mainbox {
|
||||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
font-family: 'Inter';
|
font-family: 'Mona Sans', 'Inter', sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1 +1 @@
|
|||||||
import {} from '@designestate/dees-element';
|
import {} from '@design.estate/dees-element';
|
@ -1,10 +1,10 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html, property } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
|
|
||||||
import './dees-windowlayer';
|
import './dees-windowlayer';
|
||||||
import { css, cssManager } from '@designestate/dees-element';
|
import { css, cssManager } from '@design.estate/dees-element';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { customElement, DeesElement, TemplateResult, html, property } from '@designestate/dees-element';
|
import { customElement, DeesElement, type TemplateResult, html, property, type CSSResult, } from '@design.estate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
|
3
ts_web/elements/helperclasses/formcontroller.ts
Normal file
3
ts_web/elements/helperclasses/formcontroller.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export class FormController {
|
||||||
|
|
||||||
|
}
|
@ -4,8 +4,8 @@ export * from './dees-chips.js';
|
|||||||
export * from './dees-contextmenu.js';
|
export * from './dees-contextmenu.js';
|
||||||
export * from './dees-dataview-codebox.js';
|
export * from './dees-dataview-codebox.js';
|
||||||
export * from './dees-dataview-statusobject.js';
|
export * from './dees-dataview-statusobject.js';
|
||||||
export * from './dees-form.js';
|
|
||||||
export * from './dees-form-submit.js';
|
export * from './dees-form-submit.js';
|
||||||
|
export * from './dees-form.js';
|
||||||
export * from './dees-icon.js';
|
export * from './dees-icon.js';
|
||||||
export * from './dees-input-checkbox.js';
|
export * from './dees-input-checkbox.js';
|
||||||
export * from './dees-input-dropdown.js';
|
export * from './dees-input-dropdown.js';
|
||||||
@ -15,6 +15,7 @@ export * from './dees-input-radio.js';
|
|||||||
export * from './dees-input-text.js';
|
export * from './dees-input-text.js';
|
||||||
export * from './dees-mobilenavigation.js';
|
export * from './dees-mobilenavigation.js';
|
||||||
export * from './dees-pdf.js';
|
export * from './dees-pdf.js';
|
||||||
|
export * from './dees-simple-login.js';
|
||||||
export * from './dees-speechbubble.js';
|
export * from './dees-speechbubble.js';
|
||||||
export * from './dees-spinner.js';
|
export * from './dees-spinner.js';
|
||||||
export * from './dees-stepper.js';
|
export * from './dees-stepper.js';
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
// @push.rocks scope
|
||||||
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
|
|
||||||
|
export {
|
||||||
|
smartpromise,
|
||||||
|
}
|
||||||
|
|
||||||
|
// @tsclass scope
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
@ -6,5 +6,8 @@
|
|||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"moduleResolution": "nodenext",
|
"moduleResolution": "nodenext",
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true
|
||||||
}
|
},
|
||||||
|
"exclude": [
|
||||||
|
"dist_*/**/*.d.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user