Compare commits
158 Commits
Author | SHA1 | Date | |
---|---|---|---|
f26f0d0450 | |||
53fadfcbd5 | |||
497d3a3ac5 | |||
37524765ae | |||
ab0219d3e4 | |||
7cefd9cba5 | |||
4cf5ca2d7f | |||
a9791220fb | |||
4aed14c7a2 | |||
49d1cba3fd | |||
9bacca3070 | |||
42e7ae6d6b | |||
a8b244520c | |||
9879a2cb6a | |||
e2a54c6f18 | |||
dfd13e641a | |||
2284159b72 | |||
1de86c6bfa | |||
62087a686a | |||
572deb990e | |||
719c63a092 | |||
9d9700214f | |||
bc82e110ef | |||
fe15ebe82d | |||
1b8577d300 | |||
ef4cfb81d8 | |||
abea5942b7 | |||
a6274e9a2d | |||
8b3752f586 | |||
c8e1d24224 | |||
dbd7748ac0 | |||
68984d5702 | |||
5237439f88 | |||
c3df73616f | |||
a03b095d14 | |||
9a18658e09 | |||
2910757e8c | |||
a00bacd4ff | |||
01963447dd | |||
5d1d1ba4ba | |||
7885422033 | |||
fb48425c13 | |||
3792c5edf5 | |||
2abd91ab4a | |||
310910e8ee | |||
3301ad1556 | |||
0f8a7a5a7b | |||
f1a0c5741c | |||
cbf60db9fa | |||
34d5bda579 | |||
916ba68c94 | |||
46fc396772 | |||
0e77baf600 | |||
89fd8b5080 | |||
884f9725b5 | |||
48e093b1ba | |||
2b3875d738 | |||
279d1c2f3f | |||
29f2839d5b | |||
96683b4380 | |||
36fbf7f29e | |||
67d4c216ed | |||
9d51cdd480 | |||
d6679ca41f | |||
baadd1e06b | |||
600ab56026 | |||
ae40a9f541 | |||
48f7768b96 | |||
de3f9fcb34 | |||
313009d3ff | |||
83ede1edea | |||
ec50b4b3a0 | |||
4fbb1caaeb | |||
41a2529275 | |||
41ff71e6b0 | |||
2d07765c16 | |||
15db9fb6d9 | |||
73d92624de | |||
0d77685338 | |||
05bbfccd22 | |||
5cca89de37 | |||
ab5b7a5b89 | |||
253d5623c4 | |||
1048192bfa | |||
289e6d37fa | |||
7308c1454f | |||
cfc880d7c2 | |||
c32cff8126 | |||
4526c0c365 | |||
45e7f39af0 | |||
26b72fbccf | |||
8acf3f4196 | |||
75c8b409cc | |||
6509ddb81c | |||
7cc0173e3c | |||
f797d71e52 | |||
54db88e4b4 | |||
93c73c36c8 | |||
9c9bd4a180 | |||
0a54de3e59 | |||
d6b4b59e6d | |||
c4236d28c6 | |||
5f1b29f742 | |||
e7978a22e4 | |||
15de86774b | |||
8f57647c85 | |||
59c5bcabd5 | |||
cae421e140 | |||
05b2b09395 | |||
4dbd4f84c1 | |||
bb0ca2f19d | |||
55175f9ac7 | |||
0be0f9fa34 | |||
7baab5d7ea | |||
c3bdec176b | |||
2a84e2c270 | |||
c86f7d466c | |||
9a6db7d882 | |||
b69b1179a1 | |||
0df9fe750c | |||
0d05bfa5ff | |||
4dc9e04c2e | |||
5341a0d6b6 | |||
615bea9fc4 | |||
e518bc6976 | |||
076f8c7a91 | |||
b016b959cf | |||
eca68e28a2 | |||
68a164aac2 | |||
9b5448e096 | |||
232d063485 | |||
6a357cb227 | |||
7b8218ab77 | |||
5b6436b023 | |||
57edbb872b | |||
76f82fe15e | |||
0b03718f4a | |||
2754de26d8 | |||
abc91600e2 | |||
6a8a4aa4d2 | |||
6a6f3b1907 | |||
0dc8e21e07 | |||
68ccc02699 | |||
ed1c18b8ac | |||
e8cc4c7c90 | |||
187ebed3ab | |||
b909617271 | |||
9c2fe9f739 | |||
ed49de64bc | |||
162003ba7a | |||
5f793f0acc | |||
d23b298bd5 | |||
f9e2f00e9b | |||
6c3645f2f8 | |||
e3a6798469 | |||
60de4ef674 | |||
02e029edbc | |||
ff5a65bdce |
@ -13,31 +13,24 @@ stages:
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -45,11 +38,10 @@ auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -60,7 +52,6 @@ auditDevDependencies:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
@ -71,10 +62,9 @@ testStable:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
- npmci npm build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
@ -122,11 +112,9 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--gitzone element-->
|
||||
<!-- made by Lossless GmbH -->
|
||||
<!-- made by Task Venture Capital GmbH -->
|
||||
<!-- checkout https://maintainedby.lossless.com for awesome OpenSource projects -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
@ -10,6 +10,12 @@
|
||||
/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<link rel="preconnect" href="https://rsms.me/">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<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>
|
||||
body {
|
||||
margin: 0px;
|
||||
@ -17,7 +23,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="./bundle.js"></script>
|
||||
<script type="module" src="/bundle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
19645
package-lock.json
generated
19645
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
37
package.json
37
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.78",
|
||||
"version": "1.0.157",
|
||||
"private": false,
|
||||
"description": "website for lossless.com",
|
||||
"main": "dist_ts_web/index.js",
|
||||
@ -8,27 +8,34 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "tstest test/ --web",
|
||||
"build": "tsbuild element --allowimplicitany --skiplibcheck && tsbundle element --production",
|
||||
"watch": "tswatch element"
|
||||
"build": "tsbuild element --allowimplicitany && tsbundle element --production",
|
||||
"watch": "tswatch element",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^2.0.19",
|
||||
"@designestate/dees-element": "^2.0.12",
|
||||
"@designestate/dees-wcctools": "^1.0.74",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.1.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.1.1"
|
||||
"@designestate/dees-domtools": "^2.0.30",
|
||||
"@designestate/dees-element": "^2.0.20",
|
||||
"@designestate/dees-wcctools": "^1.0.76",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
||||
"@pushrocks/smartpromise": "^4.0.0",
|
||||
"@pushrocks/smartstring": "^4.0.5",
|
||||
"@tsclass/tsclass": "^4.0.36",
|
||||
"highlight.js": "11.7.0",
|
||||
"pdfjs-dist": "^2.15.349"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsbundle": "^1.0.102",
|
||||
"@gitzone/tstest": "^1.0.70",
|
||||
"@gitzone/tswatch": "^1.0.81",
|
||||
"@gitzone/tsbuild": "^2.1.65",
|
||||
"@gitzone/tsbundle": "^2.0.7",
|
||||
"@gitzone/tstest": "^1.0.74",
|
||||
"@gitzone/tswatch": "^2.0.7",
|
||||
"@pushrocks/projectinfo": "^5.0.1",
|
||||
"@pushrocks/tapbundle": "^5.0.3"
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.15.11"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
4617
pnpm-lock.yaml
generated
Normal file
4617
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,6 @@ Code Style | [](htt
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
@ -35,7 +34,6 @@ We are always happy for code contributions. If you are not the code contributing
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@designestate/dees-catalog',
|
||||
version: '1.0.78',
|
||||
version: '1.0.157',
|
||||
description: 'website for lossless.com'
|
||||
}
|
||||
|
47
ts_web/elements/dees-button-exit.ts
Normal file
47
ts_web/elements/dees-button-exit.ts
Normal file
@ -0,0 +1,47 @@
|
||||
import {
|
||||
cssManager,
|
||||
customElement,
|
||||
DeesElement,
|
||||
html,
|
||||
TemplateResult,
|
||||
css,
|
||||
state,
|
||||
property
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
@customElement('dees-button-exit')
|
||||
export class DeesButtonExit extends DeesElement {
|
||||
// DEMO
|
||||
public static demo = () => html`
|
||||
<dees-button-exit></dees-button-exit>
|
||||
`;
|
||||
|
||||
// INSTANCE
|
||||
@property({
|
||||
type: Number
|
||||
})
|
||||
public size: number = 24;
|
||||
|
||||
public styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
|
||||
`
|
||||
]
|
||||
|
||||
public render (): TemplateResult {
|
||||
return html`
|
||||
<style>
|
||||
.maincontainer {
|
||||
position: relative;
|
||||
width: ${this.size}px;
|
||||
height: ${this.size}px;
|
||||
}
|
||||
</style>
|
||||
<div class="maincontainer">
|
||||
<div class="firstLine"></div>
|
||||
<div class="secondLine"></div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
@ -31,7 +31,12 @@ export class DeesButton extends DeesElement {
|
||||
<p><dees-button disabled status="error">Error Status</dees-button></p>
|
||||
`;
|
||||
|
||||
@property()
|
||||
@property({
|
||||
reflect: true,
|
||||
hasChanged() {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
public text: string;
|
||||
|
||||
@property()
|
||||
@ -74,19 +79,20 @@ export class DeesButton extends DeesElement {
|
||||
}
|
||||
|
||||
.button {
|
||||
transition: all 0.1s ease;
|
||||
transition: all 0.1s , color 0s;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: ${cssManager.bdTheme('#eee', '#333')};
|
||||
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')};
|
||||
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
||||
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
||||
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
||||
border-radius: 2px;
|
||||
border-radius: 4px;
|
||||
line-height: 40px;
|
||||
padding: 0px 10px;
|
||||
padding: 0px 8px;
|
||||
min-width: 100px;
|
||||
user-select: none;
|
||||
color: ${cssManager.bdTheme('#333', ' #ccc')};
|
||||
@ -96,9 +102,9 @@ export class DeesButton extends DeesElement {
|
||||
.button:hover {
|
||||
cursor: pointer;
|
||||
background: #039be5;
|
||||
color: #ffffff;
|
||||
border: 1px solid #039be5;
|
||||
border-top: 1px solid #039be5;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
@ -143,7 +149,7 @@ export class DeesButton extends DeesElement {
|
||||
line-height: 48px;
|
||||
font-size: 16px;
|
||||
padding: 0px 48px;
|
||||
margin-top: 36px;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.button.pending {
|
||||
@ -180,9 +186,9 @@ export class DeesButton extends DeesElement {
|
||||
@click="${this.dispatchClick}"
|
||||
>
|
||||
${this.status === 'normal' ? html``: html`
|
||||
<dees-spinner status="${this.status}"></dees-spinner>
|
||||
<dees-spinner .bnw=${true} status="${this.status}"></dees-spinner>
|
||||
`}
|
||||
<div class="textbox">${this.text ? this.text : html`<slot></slot>`}</div>
|
||||
<div class="textbox">${this.text ? this.text : this.textContent}</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
@ -65,9 +65,9 @@ export class DeesChips extends DeesElement {
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
border-radius: 30px;
|
||||
margin-right: 3px;
|
||||
margin-bottom: 7px;
|
||||
border-radius: 40px;
|
||||
margin-right: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.chip:hover {
|
||||
|
180
ts_web/elements/dees-contextmenu.ts
Normal file
180
ts_web/elements/dees-contextmenu.ts
Normal file
@ -0,0 +1,180 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import {
|
||||
customElement,
|
||||
html,
|
||||
DeesElement,
|
||||
property,
|
||||
TemplateResult,
|
||||
cssManager,
|
||||
css,
|
||||
unsafeCSS,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'dees-contextmenu': DeesContextmenu;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-contextmenu')
|
||||
export class DeesContextmenu extends DeesElement {
|
||||
// DEMO
|
||||
public static demo = () => html`
|
||||
<style>
|
||||
.withMargin {
|
||||
display: block;
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
<dees-button @contextmenu=${(eventArg) => {
|
||||
DeesContextmenu.openContextMenuWithOptions(eventArg, [
|
||||
{
|
||||
name: 'copy',
|
||||
iconName: 'copySolid',
|
||||
action: async () => {
|
||||
return null;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
iconName: 'penToSquare',
|
||||
action: async () => {
|
||||
return null;
|
||||
},
|
||||
},{
|
||||
name: 'paste',
|
||||
iconName: 'pasteSolid',
|
||||
action: async () => {
|
||||
return null;
|
||||
},
|
||||
},
|
||||
]);
|
||||
}}>Hello</dees-button>
|
||||
<dees-contextmenu class="withMargin"></dees-contextmenu>
|
||||
<dees-contextmenu
|
||||
class="withMargin"
|
||||
.menuItems=${[
|
||||
{
|
||||
name: 'copy',
|
||||
iconName: 'copySolid',
|
||||
action: async () => {},
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
iconName: 'penToSquare',
|
||||
action: async () => {},
|
||||
},{
|
||||
name: 'paste',
|
||||
iconName: 'pasteSolid',
|
||||
action: async () => {},
|
||||
},
|
||||
] as plugins.tsclass.website.IMenuItem[]}
|
||||
></dees-contextmenu>
|
||||
`;
|
||||
|
||||
// STATIC
|
||||
public static async openContextMenuWithOptions(eventArg: MouseEvent, menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
|
||||
eventArg.preventDefault();
|
||||
const contextMenu = new DeesContextmenu();
|
||||
contextMenu.style.position = 'absolute';
|
||||
contextMenu.style.top = `${eventArg.clientY.toString()}px`;
|
||||
contextMenu.style.left = `${eventArg.clientX.toString()}px`;
|
||||
contextMenu.style.opacity = '0';
|
||||
contextMenu.style.transform = 'scale(0.95,0.95)';
|
||||
contextMenu.style.transformOrigin = 'top left';
|
||||
contextMenu.menuItems = menuItemsArg;
|
||||
document.body.append(contextMenu);
|
||||
await domtools.plugins.smartdelay.delayFor(0);
|
||||
contextMenu.style.opacity = '1';
|
||||
contextMenu.style.transform = 'scale(1,1)';
|
||||
}
|
||||
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
transition: all 0.1s;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
color: ${cssManager.bdTheme('#222', '#ccc')};
|
||||
font-size: 14px;
|
||||
width: 200px;
|
||||
border: 1px solid #444;
|
||||
min-height: 40px;
|
||||
border-radius: 3px;
|
||||
background: #222;
|
||||
box-shadow: 0px 1px 4px #000;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.mainbox .menuitem {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.mainbox .menuitem dees-icon {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
width: 14px;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
|
||||
.mainbox .menuitem:hover {
|
||||
cursor: pointer;
|
||||
background: #ffffff10;
|
||||
}
|
||||
|
||||
.mainbox .menuitem:active {
|
||||
cursor: pointer;
|
||||
background: #ffffff05;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<div class="mainbox">
|
||||
${this.menuItems.map((menuItemArg) => {
|
||||
return html`
|
||||
<div class="menuitem" @click=${() => this.handleClick(menuItemArg)}>
|
||||
<dees-icon .iconFA=${(menuItemArg.iconName as any) || 'minus'}></dees-icon
|
||||
>${menuItemArg.name}
|
||||
</div>
|
||||
`;
|
||||
})}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public async firstUpdated() {
|
||||
if (!this.menuItems || this.menuItems.length === 0) {
|
||||
const mainbox = this.shadowRoot.querySelector('.mainbox');
|
||||
mainbox.textContent = 'no menu items present';
|
||||
}
|
||||
}
|
||||
|
||||
public async handleClick(menuItem: plugins.tsclass.website.IMenuItem) {
|
||||
menuItem.action();
|
||||
await this.destroy();
|
||||
}
|
||||
|
||||
public async destroy() {
|
||||
this.style.opacity = '0';
|
||||
this.style.transform = 'scale(0.95,0,95)';
|
||||
await domtools.plugins.smartdelay.delayFor(100);
|
||||
this.parentElement.removeChild(this);
|
||||
}
|
||||
}
|
169
ts_web/elements/dees-dataview-codebox.ts
Normal file
169
ts_web/elements/dees-dataview-codebox.ts
Normal file
@ -0,0 +1,169 @@
|
||||
import {
|
||||
DeesElement,
|
||||
html,
|
||||
customElement,
|
||||
TemplateResult,
|
||||
property,
|
||||
state,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
import hlight from 'highlight.js';
|
||||
|
||||
import * as smartstring from '@pushrocks/smartstring';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'dees-dataview-codebox': DeesDataviewCodebox;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-dataview-codebox')
|
||||
export class DeesDataviewCodebox extends DeesElement {
|
||||
public static demo = () => html`<dees-dataview-codebox proglang="typescript">
|
||||
import * as text from './hello'; const hiThere = 'nice'; const myFunction = async () => {
|
||||
console.log('nice one'); }
|
||||
</dees-dataview-codebox>`;
|
||||
|
||||
@property()
|
||||
public progLang: string = 'typescript';
|
||||
|
||||
@property({
|
||||
type: String
|
||||
})
|
||||
public codeToDisplay: string = '// no code set';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
}
|
||||
.mainbox {
|
||||
position: relative;
|
||||
color: ${this.goBright ? '#333333' : '#ffffff'};
|
||||
}
|
||||
|
||||
.languageLabel {
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
z-index: 10;
|
||||
background: #6596ff;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
padding: 4px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.hljs-keyword {
|
||||
color: #ff65ec;
|
||||
}
|
||||
|
||||
.codegrid {
|
||||
display: grid;
|
||||
grid-template-columns: 50px auto;
|
||||
background: ${this.goBright ? '#ffffff' : '#191919'};
|
||||
border-top: 1px solid ${this.goBright ? '#ffffff' : '#333333'};
|
||||
box-shadow: 0px 0px 5px ${this.goBright ? 'rgba(0,0,0,0.1)' : 'rgba(0,0,0,0.5)'};
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.lineNumbers {
|
||||
background: ${this.goBright ? '#fafafa' : '#151515'};
|
||||
color: ${this.goBright ? '#acacac' : '#666666'};
|
||||
padding: 30px 16px 0px 0px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.lineCounter:last-child {
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow-x: auto;
|
||||
margin: 0px;
|
||||
padding: 30px 40px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-weight: ${this.goBright ? '400' : '300'};
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
code,
|
||||
code *,
|
||||
.lineNumbers {
|
||||
line-height: 1.4em;
|
||||
font-weight: 200;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #ffa465;
|
||||
}
|
||||
|
||||
.hljs-built_in {
|
||||
color: #65ff6a;
|
||||
}
|
||||
|
||||
.hljs-function {
|
||||
color: ${this.goBright ? '#2765DF': '#6596ff' };
|
||||
}
|
||||
|
||||
.hljs-params {
|
||||
color: ${this.goBright ? '#3DB420' : '#65d5ff' };
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: ${this.goBright ? '#EF9300' : '#ffd765' };
|
||||
}
|
||||
</style>
|
||||
<div class="mainbox">
|
||||
<div class="languageLabel">${this.progLang}</div>
|
||||
<div class="codegrid">
|
||||
<div class="lineNumbers">
|
||||
${(() => {
|
||||
let lineCounter = 0;
|
||||
return this.codeToDisplay.split('\n').map(lineArg => {
|
||||
lineCounter++;
|
||||
return html`<div class="lineCounter">${lineCounter}</div>`;
|
||||
})
|
||||
})()}
|
||||
</div>
|
||||
<pre><code class="${this.progLang}">${this.codeToDisplay}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public async updated(_changedProperties) {
|
||||
super.updated(_changedProperties);
|
||||
console.log('highlighting now');
|
||||
console.log(this.childNodes);
|
||||
const slottedCodeNodes: Text[] = [];
|
||||
this.childNodes.forEach((childNode) => {
|
||||
if (childNode.nodeName === '#text') {
|
||||
slottedCodeNodes.push(childNode as Text);
|
||||
}
|
||||
});
|
||||
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText) {
|
||||
this.codeToDisplay = smartstring.indent.normalize(slottedCodeNodes[0].wholeText);
|
||||
}
|
||||
await domtools.plugins.smartdelay.delayFor(0);
|
||||
const localCodeNode = this.shadowRoot.querySelector('code');
|
||||
hlight.highlightBlock(localCodeNode);
|
||||
}
|
||||
}
|
168
ts_web/elements/dees-dataview-statusobject.ts
Normal file
168
ts_web/elements/dees-dataview-statusobject.ts
Normal file
@ -0,0 +1,168 @@
|
||||
import {
|
||||
DeesElement,
|
||||
html,
|
||||
customElement,
|
||||
TemplateResult,
|
||||
property,
|
||||
state,
|
||||
cssManager,
|
||||
css,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
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 {
|
||||
interface HTMLElementTagNameMap {
|
||||
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-dataview-statusobject')
|
||||
export class DeesDataviewStatusobject extends DeesElement {
|
||||
public static demo = () => html`<dees-dataview-statusobject
|
||||
.statusObject=${{
|
||||
id: '1',
|
||||
name: 'Demo Item',
|
||||
combinedStatus: 'partly_ok',
|
||||
combinedStatusText: 'partly_ok',
|
||||
details: [
|
||||
{
|
||||
name: 'Detail 1',
|
||||
value: 'Value 1',
|
||||
status: 'ok',
|
||||
statusText: 'OK',
|
||||
},
|
||||
{
|
||||
name: 'Detail 2',
|
||||
value: 'Value 2',
|
||||
status: 'partly_ok',
|
||||
statusText: 'partly_ok',
|
||||
},
|
||||
{
|
||||
name: 'Detail 3',
|
||||
value: 'Value 3',
|
||||
status: 'not_ok',
|
||||
statusText: 'not_ok',
|
||||
},
|
||||
{
|
||||
name: 'Detail 4',
|
||||
value: 'Value 4',
|
||||
status: 'ok',
|
||||
statusText: 'OK',
|
||||
},
|
||||
],
|
||||
}}
|
||||
>
|
||||
</dees-dataview-statusobject>`;
|
||||
|
||||
@property({ type: Object }) statusObject: tsclass.code.IStatusObject;
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
.mainbox {
|
||||
max-width: 600px;
|
||||
border-radius: 3px;
|
||||
background: #1b1b1b;
|
||||
min-height: 48px;
|
||||
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||
}
|
||||
|
||||
.heading {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
grid-template-columns: 40px auto 120px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display: block;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
height: 48px;
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.statusdot {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
border-radius: 6px;
|
||||
background: grey;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.copyMain {
|
||||
cursor: pointer;
|
||||
font-size: 8px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
border: 1px solid ${cssManager.bdTheme('#999', '#444')};
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
border-radius: 3px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.statusdot.ok {
|
||||
background: green;
|
||||
}
|
||||
|
||||
.statusdot.not_ok{
|
||||
background: red;
|
||||
}
|
||||
|
||||
.statusdot.partly_ok {
|
||||
background: orange;
|
||||
}
|
||||
|
||||
.detail {
|
||||
height: 60px;
|
||||
align-items: center;
|
||||
display: grid;
|
||||
grid-template-columns: 40px auto;
|
||||
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
||||
}
|
||||
|
||||
.detail .detailsText .label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.detail .detailsText .value {
|
||||
font-size: 16px;
|
||||
font-family: Roboto Mono;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
render(): TemplateResult {
|
||||
return html`
|
||||
<div class="mainbox">
|
||||
<div class="heading">
|
||||
<div class="statusdot ${this.statusObject.combinedStatus}"></div>
|
||||
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
||||
<div class="copyMain">Copy as JSON</div>
|
||||
</div>
|
||||
${this.statusObject.details.map((detailArg) => {
|
||||
return html`
|
||||
<div class="detail">
|
||||
<div class="statusdot ${detailArg.status}"></div>
|
||||
<div class="detailsText">
|
||||
<div class="label">${detailArg.name}</div>
|
||||
<div class="value">${detailArg.value}</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
})}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
async firstUpdated() {}
|
||||
}
|
@ -41,8 +41,7 @@ export class DeesFormSubmit extends DeesElement {
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled}>
|
||||
${this.text ? this.text : html`<slot></slot>`}
|
||||
<dees-button status=${this.status} @click=${this.submit} .disabled=${this.disabled} .text=${this.text ? this.text : this.textContent}>
|
||||
</dees-button>
|
||||
`;
|
||||
}
|
||||
|
@ -1,4 +1,11 @@
|
||||
import { DeesElement, html, property, customElement } from '@designestate/dees-element';
|
||||
import {
|
||||
DeesElement,
|
||||
html,
|
||||
property,
|
||||
customElement,
|
||||
cssManager,
|
||||
css,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
@ -10,35 +17,108 @@ import {
|
||||
faMedium,
|
||||
faSlackHash,
|
||||
faTwitter,
|
||||
faInstagram,
|
||||
faTiktok,
|
||||
} from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
import {} from '@fortawesome/free-regular-svg-icons';
|
||||
import { faDesktop, faRss, faUsers } from '@fortawesome/free-solid-svg-icons';
|
||||
import {
|
||||
faCopy as faCopyRegular,
|
||||
faCircleCheck as faCircleCheckRegular,
|
||||
faCircleXmark as faCircleXmarkRegular,
|
||||
faMessage as faMessageRegular,
|
||||
faPaste as faPasteRegular,
|
||||
faSun as faSunRegular,
|
||||
} from '@fortawesome/free-regular-svg-icons';
|
||||
import {
|
||||
faArrowRight as faArrowRightSolid,
|
||||
faArrowUpRightFromSquare as faArrowUpRightFromSquareSolid,
|
||||
faBell as faBellSolid,
|
||||
faBug as faBugSolid,
|
||||
faBuilding as faBuildingSolid,
|
||||
faCaretLeft as faCaretLeftSolid,
|
||||
faCaretRight as faCaretRightSolid,
|
||||
faCheck as faCheckSolid,
|
||||
faCircleInfo as faCircleInfoSolid,
|
||||
faCircleCheck as faCircleCheckSolid,
|
||||
faCircleXmark as faCircleXmarkSolid,
|
||||
faCopy as faCopySolid,
|
||||
faDesktop as faDesktopSolid,
|
||||
faEye as faEyeSolid,
|
||||
faEyeSlash as faEyeSlashSolid,
|
||||
faGrip as faGripSolid,
|
||||
faMessage as faMessageSolid,
|
||||
faMugHot as faMugHotSolid,
|
||||
faMinus as faMinusSolid,
|
||||
faPaste as faPasteSolid,
|
||||
faPenToSquare as faPenToSquareSolid,
|
||||
faRss as faRssSolid,
|
||||
faUsers as faUsersSolid,
|
||||
faShare as faShareSolid,
|
||||
faSun as faSunSolid,
|
||||
faXmark as faXmarkSolid,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
type TFontAwesomeIcon =
|
||||
export const faIcons = {
|
||||
// normal
|
||||
| 'desktop'
|
||||
| 'rss'
|
||||
// brands
|
||||
| 'facebook'
|
||||
| 'google'
|
||||
| 'twitter'
|
||||
| 'linkedin'
|
||||
| 'medium'
|
||||
| 'slack'
|
||||
| 'users';
|
||||
const faIcons: { [key: string]: IconDefinition } = {
|
||||
// normal
|
||||
desktop: faDesktop,
|
||||
rss: faRss,
|
||||
arrowRight: faArrowRightSolid,
|
||||
arrowUpRightFromSquare: faArrowUpRightFromSquareSolid,
|
||||
arrowUpRightFromSquareSolid: faArrowUpRightFromSquareSolid,
|
||||
bell: faBellSolid,
|
||||
bellSolid: faBellSolid,
|
||||
bug: faBugSolid,
|
||||
bugSolid: faBugSolid,
|
||||
building: faBuildingSolid,
|
||||
buildingSolid: faBuildingSolid,
|
||||
caretLeft: faCaretLeftSolid,
|
||||
caretLeftSolid: faCaretLeftSolid,
|
||||
caretRight: faCaretRightSolid,
|
||||
caretRightSolid: faCaretRightSolid,
|
||||
check: faCheckSolid,
|
||||
checkSolid: faCheckSolid,
|
||||
circleInfo: faCircleInfoSolid,
|
||||
circleInfoSolid: faCircleInfoSolid,
|
||||
circleCheck: faCircleCheckRegular,
|
||||
circleCheckSolid: faCircleCheckSolid,
|
||||
circleXmark: faCircleXmarkRegular,
|
||||
circleXmarkSolid: faCircleXmarkSolid,
|
||||
copy: faCopyRegular,
|
||||
copySolid: faCopySolid,
|
||||
desktop: faDesktopSolid,
|
||||
desktopSolid: faDesktopSolid,
|
||||
eye: faEyeSolid,
|
||||
eyeSolid: faEyeSolid,
|
||||
eyeSlash: faEyeSlashSolid,
|
||||
eyeSlashSolid: faEyeSlashSolid,
|
||||
grip: faGripSolid,
|
||||
gripSolid: faGripSolid,
|
||||
message: faMessageRegular,
|
||||
messageSolid: faMessageSolid,
|
||||
mugHot: faMugHotSolid,
|
||||
faMugHotSolid: faMugHotSolid,
|
||||
minus: faMinusSolid,
|
||||
minusSolid: faMinusSolid,
|
||||
paste: faPasteRegular,
|
||||
pasteSolid: faPasteSolid,
|
||||
penToSquare: faPenToSquareSolid,
|
||||
penToSquareSolid: faPenToSquareSolid,
|
||||
rss: faRssSolid,
|
||||
rssSolid: faRssSolid,
|
||||
share: faShareSolid,
|
||||
shareSolid: faShareSolid,
|
||||
sun: faSunRegular,
|
||||
sunSolid: faSunSolid,
|
||||
xmark: faXmarkSolid,
|
||||
xmarkSolid: faXmarkSolid,
|
||||
// brands
|
||||
facebook: faFacebook,
|
||||
google: faGoogle,
|
||||
instagram: faInstagram,
|
||||
linkedin: faLinkedin,
|
||||
medium: faMedium,
|
||||
slack: faSlackHash,
|
||||
tiktok: faTiktok,
|
||||
twitter: faTwitter,
|
||||
users: faUsers,
|
||||
users: faUsersSolid,
|
||||
};
|
||||
|
||||
declare global {
|
||||
@ -51,75 +131,73 @@ declare global {
|
||||
export class DeesIcon extends DeesElement {
|
||||
public static demo = () => html`
|
||||
<dees-icon iconName="visibility"></dees-icon>
|
||||
<div style="background: #fff; padding: 10px;">
|
||||
<dees-icon iconName="visibility"></dees-icon>
|
||||
<dees-icon brandName="facebook"></dees-icon>
|
||||
<div style="background: #fff; padding: 10px; font-size: 30px">
|
||||
<style>
|
||||
dees-icon {
|
||||
transition: color 0.05s;
|
||||
}
|
||||
dees-icon:hover {
|
||||
color: #e4002b;
|
||||
}
|
||||
</style>
|
||||
<dees-icon .iconFA=${'messageSolid'}></dees-icon>
|
||||
<dees-icon .iconFA=${'sun'}></dees-icon>
|
||||
<dees-icon .iconFA=${'sunSolid'}></dees-icon>
|
||||
<dees-icon .iconFA=${'facebook'}></dees-icon>
|
||||
<dees-icon .iconFA=${'arrowUpRightFromSquare'}></dees-icon>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@property()
|
||||
public iconName: string;
|
||||
@property({
|
||||
type: String
|
||||
})
|
||||
public iconFA: keyof typeof faIcons;
|
||||
|
||||
@property()
|
||||
public brandName: TFontAwesomeIcon;
|
||||
|
||||
@property()
|
||||
public svgSize: number = 20;
|
||||
public iconSize: number;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
domtools.elementBasic.setup();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
* {
|
||||
transition: inherit !important;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
#iconContainer svg {
|
||||
display: inline-block;
|
||||
height: ${this.svgSize}px;
|
||||
}
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
font-size: inherit;
|
||||
display: inline-block;
|
||||
line-height: inherit;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
display: block;
|
||||
height: ${this.iconSize}px;
|
||||
}
|
||||
</style>
|
||||
${this.iconName ? html`<i class="material-icons">${this.iconName}</i>` : html``}
|
||||
${this.brandName ? html`<div id="iconContainer"></div>` : html``}
|
||||
<div id="iconContainer"></div>
|
||||
`;
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
if (this.brandName && !this.iconName) {
|
||||
this.shadowRoot.querySelector('#iconContainer').innerHTML = icon(
|
||||
faIcons[this.brandName]
|
||||
).html[0];
|
||||
public async updated() {
|
||||
if (!this.iconSize) {
|
||||
this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,''));
|
||||
}
|
||||
if (this.iconFA) {
|
||||
this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA
|
||||
? icon(faIcons[this.iconFA]).html[0]
|
||||
: 'icon not found';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { customElement, DeesElement, TemplateResult, property, html } from '@designestate/dees-element';
|
||||
import { customElement, DeesElement, TemplateResult, property, html, css, cssManager } from '@designestate/dees-element';
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
declare global {
|
||||
@ -9,7 +9,15 @@ declare global {
|
||||
|
||||
@customElement('dees-input-dropdown')
|
||||
export class DeesInputDropdown extends DeesElement {
|
||||
public static demo = () => html`<dees-input-dropdown></dees-input-dropdown>`
|
||||
public static demo = () => html`
|
||||
<dees-input-dropdown
|
||||
.options=${[
|
||||
{option: 'option 1', key: 'option1'},
|
||||
{option: 'option 2', key: 'option2'},
|
||||
{option: 'option 3', key: 'option3'}
|
||||
]}
|
||||
></dees-input-dropdown>
|
||||
`
|
||||
|
||||
// INSTANCE
|
||||
public changeSubject = new domtools.rxjs.Subject();
|
||||
@ -40,10 +48,9 @@ export class DeesInputDropdown extends DeesElement {
|
||||
})
|
||||
public disabled: boolean = false;
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@ -52,6 +59,7 @@ export class DeesInputDropdown extends DeesElement {
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 40px;
|
||||
color: ${cssManager.bdTheme('#222', '#fff')};
|
||||
}
|
||||
|
||||
.maincontainer {
|
||||
@ -68,41 +76,68 @@ export class DeesInputDropdown extends DeesElement {
|
||||
position: relative;
|
||||
max-width: 420px;
|
||||
height: 40px;
|
||||
border: 1px solid #CCC;
|
||||
padding: 12px;
|
||||
line-height: 40px;
|
||||
padding: 0px 8px;
|
||||
z-index: 0px;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};
|
||||
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
||||
border-radius: 3px;
|
||||
border-top: 1px solid #CCCCCC00;
|
||||
border-bottom: 1px solid #66666600;
|
||||
}
|
||||
|
||||
.selectedBox.show {
|
||||
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#666666')};
|
||||
border-bottom: 1px solid ${cssManager.bdTheme('#fafafa', '#222222')};
|
||||
}
|
||||
|
||||
.selectionBox {
|
||||
will-change:transform;
|
||||
pointer-events: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
opacity: 0;
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#222222')};
|
||||
max-width: 420px;
|
||||
box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
|
||||
height: 40px;
|
||||
min-height: 40px;
|
||||
margin-top: -40px;
|
||||
z-index: 100;
|
||||
border-radius: 3px;
|
||||
padding: 4px;
|
||||
transform: scale(0.99,0.99);
|
||||
}
|
||||
|
||||
.selectionBox.show {
|
||||
pointer-events: all;
|
||||
opacity: 1;
|
||||
min-height: 160px;
|
||||
transform: scale(1,1);
|
||||
}
|
||||
|
||||
.option {
|
||||
padding: 12px;
|
||||
transition: all 0.1s;
|
||||
line-height: 40px;
|
||||
padding: 0px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.option:hover {
|
||||
background: #fafafa;
|
||||
color: #fff;
|
||||
padding-left: 8px;
|
||||
background: #0277bd;
|
||||
}
|
||||
`
|
||||
]
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${domtools.elementBasic.styles}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="maincontainer">
|
||||
<div class="selectedBox" @click="${event => {this.toggleSelectionBox();}}">
|
||||
<div class="selectedBox show" @click="${event => {this.toggleSelectionBox();}}">
|
||||
${this.selectedOption?.option}
|
||||
</div>
|
||||
<div class="selectionBox">
|
||||
@ -132,6 +167,7 @@ export class DeesInputDropdown extends DeesElement {
|
||||
}
|
||||
|
||||
public toggleSelectionBox() {
|
||||
this.shadowRoot.querySelector('.selectedBox').classList.toggle('show');
|
||||
this.shadowRoot.querySelector('.selectionBox').classList.toggle('show');
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ declare global {
|
||||
|
||||
@customElement('dees-input-fileupload')
|
||||
export class DeesInputFileupload extends DeesElement {
|
||||
public static demo = () => html`<dees-input-fileupload></dees-input-fileupload>`;
|
||||
public static demo = () => html`<dees-input-fileupload .label=${'Attachments'}></dees-input-fileupload>`;
|
||||
|
||||
// INSTANCE
|
||||
public changeSubject = new domtools.rxjs.Subject();
|
||||
@ -48,12 +48,17 @@ export class DeesInputFileupload extends DeesElement {
|
||||
public required: boolean = false;
|
||||
|
||||
@property({
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
})
|
||||
public disabled: boolean = false;
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public buttonText: string = 'Upload File...';
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
@ -66,8 +71,13 @@ export class DeesInputFileupload extends DeesElement {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.maincontainer {
|
||||
color: ${cssManager.bdTheme('#333', '#ccc')};
|
||||
|
||||
}
|
||||
|
||||
.label {
|
||||
@ -78,40 +88,74 @@ export class DeesInputFileupload extends DeesElement {
|
||||
.uploadButton {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding: 20px 20px;
|
||||
max-width: 200px;
|
||||
padding: 8px;
|
||||
max-width: 600px;
|
||||
background: ${cssManager.bdTheme('#fafafa', '#333333')};
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uploadButton:hover {
|
||||
color: #fff;
|
||||
background: rgb(3, 155, 229);
|
||||
}
|
||||
|
||||
.uploadButton::after {
|
||||
top: 7px;
|
||||
right: 7px;
|
||||
left: 7px;
|
||||
bottom: 7px;
|
||||
transform: scale3d(0.9, 0.9, 1);
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
transform: scale3d(0.98, 0.9, 1);
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: block;
|
||||
border: 4px dashed rgba(255, 255, 255, 0);
|
||||
border: 2px dashed rgba(255, 255, 255, 0);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.uploadButton.dragOver::after {
|
||||
transform: scale3d(1, 1, 1);
|
||||
border: 4px dashed rgba(255, 255, 255, 0.3);
|
||||
border: 2px dashed rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.uploadCandidate {
|
||||
text-align: left;
|
||||
border-bottom: 1px dashed #444;
|
||||
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||
padding: 8px;
|
||||
font-family: 'Inter';
|
||||
}
|
||||
|
||||
.uploadButton:hover .uploadCandidate {
|
||||
color: ${cssManager.bdTheme('#fff', '#fff')};
|
||||
border-bottom: 1px dashed #fff;
|
||||
}
|
||||
|
||||
.uploadCandidate:last-child {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<div class="hidden">
|
||||
<input type="file"></div>
|
||||
</div>
|
||||
<div class="maincontainer">
|
||||
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
||||
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}">Upload File! (Drag/Drop enabled)</div>
|
||||
${this.value.map((fileArg) => html` <div class="uploadCandidate">${fileArg.name} | ${fileArg.size}</div> `)}
|
||||
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}" @click=${this.openFileSelector}>
|
||||
${this.buttonText}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public async openFileSelector() {
|
||||
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
|
||||
inputFile.click();
|
||||
}
|
||||
|
||||
public async updateValue(eventArg: Event) {
|
||||
const target: any = eventArg.target;
|
||||
this.value = target.value;
|
||||
@ -122,18 +166,24 @@ export class DeesInputFileupload extends DeesElement {
|
||||
const dropArea = this.shadowRoot.querySelector('.uploadButton');
|
||||
const handlerFunction = (eventArg: DragEvent) => {
|
||||
eventArg.preventDefault();
|
||||
switch(eventArg.type) {
|
||||
switch (eventArg.type) {
|
||||
case 'dragover':
|
||||
this.state = 'dragOver';
|
||||
this.buttonText = 'release to upload file...';
|
||||
break;
|
||||
case 'dragleave':
|
||||
this.state = 'idle';
|
||||
this.buttonText = 'Upload File...';
|
||||
break;
|
||||
case 'drop':
|
||||
this.state = 'idle';
|
||||
this.buttonText = 'Upload more files...';
|
||||
}
|
||||
console.log(eventArg);
|
||||
for (const file of Array.from(eventArg.dataTransfer.files)) {
|
||||
this.value.push(file);
|
||||
};
|
||||
this.requestUpdate();
|
||||
}
|
||||
console.log(`Got ${this.value.length} files!`);
|
||||
};
|
||||
dropArea.addEventListener('dragenter', handlerFunction, false);
|
||||
|
@ -57,6 +57,7 @@ export class DeesInputQuantitySelector extends DeesElement {
|
||||
min-width: 100px;
|
||||
color: ${this.goBright ? '#666' : '#CCC'};
|
||||
border: ${this.goBright ? '1px solid #333' : '1px solid #CCC'};
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.mainContainer:hover {
|
||||
|
@ -9,15 +9,19 @@ declare global {
|
||||
|
||||
@customElement('dees-input-text')
|
||||
export class DeesInputText extends DeesElement {
|
||||
public static demo = () => html`<dees-input-text></dees-input-text>`;
|
||||
public static demo = () => html`
|
||||
<dees-input-text .label=${'this is a label'}></dees-input-text>
|
||||
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
||||
`;
|
||||
|
||||
// INSTANCE
|
||||
public changeSubject = new domtools.rxjs.Subject();
|
||||
public changeSubject = new domtools.rxjs.Subject<DeesInputText>();
|
||||
public valueChangeSubject = new domtools.rxjs.Subject<string>();
|
||||
|
||||
@property({
|
||||
type: String
|
||||
})
|
||||
public label: string = 'Label';
|
||||
public label: string;
|
||||
|
||||
@property({
|
||||
type: String
|
||||
@ -39,6 +43,18 @@ export class DeesInputText extends DeesElement {
|
||||
})
|
||||
public disabled: boolean = false;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
})
|
||||
public isPasswordBool = false;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
})
|
||||
public showPasswordBool = false;
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html `
|
||||
<style>
|
||||
@ -77,6 +93,8 @@ export class DeesInputText extends DeesElement {
|
||||
transition: all 0.2s;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
font-family: ${this.isPasswordBool ? 'monospace': 'Inter'};
|
||||
letter-spacing: ${this.isPasswordBool ? '1px': 'normal'};
|
||||
color: ${this.goBright ? '#333' : '#ccc'};
|
||||
}
|
||||
|
||||
@ -91,10 +109,30 @@ export class DeesInputText extends DeesElement {
|
||||
outline: none;
|
||||
border-bottom: 1px solid #e4002b;
|
||||
}
|
||||
|
||||
.showPassword {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 10px;
|
||||
border: 1px dashed #444;
|
||||
border-radius: 7px;
|
||||
padding: 8px 0px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.showPassword:hover {
|
||||
cursor: pointer;
|
||||
background: #333;
|
||||
}
|
||||
</style>
|
||||
<div class="maincontainer">
|
||||
<div class="label">${this.label}</div>
|
||||
<input type="text" value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
|
||||
${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} />
|
||||
${this.isPasswordBool ? html`
|
||||
<div class="showPassword" @click=${this.togglePasswordView}>
|
||||
<dees-icon .iconFA=${this.showPasswordBool ? 'eye' : 'eyeSlash'}></dees-icon>
|
||||
</div>
|
||||
` : html``}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@ -103,6 +141,7 @@ export class DeesInputText extends DeesElement {
|
||||
const target: any = eventArg.target;
|
||||
this.value = target.value;
|
||||
this.changeSubject.next(this);
|
||||
this.valueChangeSubject.next(this.value);
|
||||
}
|
||||
|
||||
public async freeze() {
|
||||
@ -112,4 +151,15 @@ export class DeesInputText extends DeesElement {
|
||||
public async unfreeze() {
|
||||
this.disabled = false;
|
||||
}
|
||||
|
||||
public async togglePasswordView () {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
this.showPasswordBool = !this.showPasswordBool;
|
||||
console.log(`this.showPasswordBool is: ${this.showPasswordBool}`)
|
||||
}
|
||||
|
||||
public async focus() {
|
||||
const textInput = this.shadowRoot.querySelector('input');
|
||||
textInput.focus();
|
||||
}
|
||||
}
|
||||
|
188
ts_web/elements/dees-mobilenavigation.ts
Normal file
188
ts_web/elements/dees-mobilenavigation.ts
Normal file
@ -0,0 +1,188 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import {
|
||||
cssManager,
|
||||
css,
|
||||
customElement,
|
||||
DeesElement,
|
||||
domtools,
|
||||
html,
|
||||
property,
|
||||
} from '@designestate/dees-element';
|
||||
import { DeesWindowLayer } from './dees-windowlayer.js';
|
||||
|
||||
@customElement('dees-mobilenavigation')
|
||||
export class DeesMobilenavigation extends DeesElement {
|
||||
// STATIC
|
||||
public static demo = () => html`
|
||||
<dees-mobilenavigation
|
||||
.menuItems="${[
|
||||
{
|
||||
name: 'hello1',
|
||||
action: async () => {},
|
||||
},
|
||||
{
|
||||
name: 'hello2',
|
||||
action: async () => {},
|
||||
},
|
||||
{
|
||||
name: 'hello3',
|
||||
action: async () => {},
|
||||
},
|
||||
]}"
|
||||
></dees-mobilenavigation>
|
||||
`;
|
||||
|
||||
private static singletonRef: DeesMobilenavigation;
|
||||
public static async createAndInit(menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
|
||||
if (!this.singletonRef) {
|
||||
this.singletonRef = new DeesMobilenavigation();
|
||||
document.body.append(this.singletonRef);
|
||||
await this.singletonRef.init();
|
||||
}
|
||||
this.singletonRef.menuItems = menuItemsArg;
|
||||
await this.singletonRef.readyDeferred.promise;
|
||||
this.singletonRef.show();
|
||||
return this.singletonRef;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public heading: string = `MENU`;
|
||||
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
|
||||
|
||||
readyDeferred = domtools.plugins.smartpromise.defer();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
/* this.init().then(() => {
|
||||
this.show();
|
||||
}); */
|
||||
}
|
||||
|
||||
/**
|
||||
* inits the mobile navigation
|
||||
*/
|
||||
public async init() {
|
||||
await this.updateComplete;
|
||||
this.readyDeferred.resolve();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
}
|
||||
|
||||
.main {
|
||||
transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
will-change: transform;
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
min-width: 280px;
|
||||
transform: translateX(200px);
|
||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||
z-index: 250;
|
||||
opacity: 0;
|
||||
padding: 16px 32px;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#000')};;
|
||||
border-left: 1px dashed #444;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.main.show {
|
||||
pointer-events: all;
|
||||
transform: translateX(0px);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.menuItem {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
margin-left: -8px;
|
||||
margin-right: -8px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.menuItem:hover {
|
||||
background: ${cssManager.bdTheme('#CCC', '#333')};;
|
||||
}
|
||||
|
||||
.heading {
|
||||
text-align: left;
|
||||
font-size: 24px;
|
||||
padding: 8px 0px;
|
||||
font-family: Inter;
|
||||
font-weight: 300;
|
||||
border-bottom: 1px dashed #444;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
<div class="main">
|
||||
<div class="heading">${this.heading}</div>
|
||||
${this.menuItems.map((menuItem) => {
|
||||
return html`
|
||||
<div
|
||||
class="menuItem"
|
||||
@click="${() => {
|
||||
this.hide();
|
||||
menuItem.action();
|
||||
}}"
|
||||
>
|
||||
${menuItem.name}
|
||||
</div>
|
||||
`;
|
||||
})}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
private windowLayer: DeesWindowLayer;
|
||||
|
||||
/**
|
||||
* inits the show
|
||||
*/
|
||||
public async show() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
const main = this.shadowRoot.querySelector('.main');
|
||||
if (!this.windowLayer) {
|
||||
this.windowLayer = new DeesWindowLayer();
|
||||
this.windowLayer.addEventListener('click', () => {
|
||||
this.hide();
|
||||
});
|
||||
}
|
||||
document.body.append(this.windowLayer);
|
||||
await domtools.convenience.smartdelay.delayFor(0);
|
||||
this.windowLayer.show();
|
||||
|
||||
await domtools.convenience.smartdelay.delayFor(0);
|
||||
main.classList.add('show');
|
||||
}
|
||||
|
||||
/**
|
||||
* inits the hide function
|
||||
*/
|
||||
public async hide() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
const main = this.shadowRoot.querySelector('.main');
|
||||
main.classList.remove('show');
|
||||
this.windowLayer.hide();
|
||||
}
|
||||
|
||||
async disconnectedCallback() {
|
||||
document.body.removeChild(this.windowLayer);
|
||||
}
|
||||
}
|
119
ts_web/elements/dees-pdf.ts
Normal file
119
ts_web/elements/dees-pdf.ts
Normal file
@ -0,0 +1,119 @@
|
||||
import { DeesElement, property, html, customElement, domtools, TemplateResult } from '@designestate/dees-element';
|
||||
|
||||
import { Deferred } from '@pushrocks/smartpromise';
|
||||
|
||||
import type pdfjsTypes from 'pdfjs-dist';
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'dees-pdf': DeesPdf;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-pdf')
|
||||
export class DeesPdf extends DeesElement {
|
||||
// DEMO
|
||||
public static demo = () => html` <dees-pdf></dees-pdf> `;
|
||||
|
||||
// INSTANCE
|
||||
|
||||
@property()
|
||||
public pdfUrl: string =
|
||||
'https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// you have access to all kinds of things through this.
|
||||
// this.setAttribute('gotIt','true');
|
||||
}
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style>
|
||||
:host {
|
||||
font-family: 'Inter', sans-serif;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
max-width: 800px;
|
||||
}
|
||||
:host([hidden]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#pdfcanvas {
|
||||
box-shadow: 0px 0px 5px #ccc;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<canvas id="pdfcanvas" .height=${0} .width=${0}></canvas>
|
||||
`;
|
||||
}
|
||||
|
||||
public static pdfJsReady: Promise<any>;
|
||||
public static pdfjsLib: typeof pdfjsTypes;
|
||||
public async connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (!DeesPdf.pdfJsReady) {
|
||||
const pdfJsReadyDeferred = domtools.plugins.smartpromise.defer();
|
||||
DeesPdf.pdfJsReady = pdfJsReadyDeferred.promise;
|
||||
const loadDeferred = domtools.plugins.smartpromise.defer();
|
||||
const script = document.createElement('script');
|
||||
script.addEventListener('load', () => {
|
||||
console.log('pdf.js loaded!');
|
||||
loadDeferred.resolve();
|
||||
});
|
||||
script.src = 'https:////mozilla.github.io/pdf.js/build/pdf.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
// The workerSrc property shall be specified.
|
||||
await loadDeferred.promise;
|
||||
DeesPdf.pdfjsLib = window['pdfjs-dist/build/pdf'];
|
||||
DeesPdf.pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
|
||||
pdfJsReadyDeferred.resolve();
|
||||
}
|
||||
await DeesPdf.pdfJsReady;
|
||||
this.displayContent();
|
||||
}
|
||||
|
||||
public async displayContent() {
|
||||
await DeesPdf.pdfJsReady;
|
||||
|
||||
// Asynchronous download of PDF
|
||||
const loadingTask = DeesPdf.pdfjsLib.getDocument(this.pdfUrl);
|
||||
loadingTask.promise.then(
|
||||
(pdf) => {
|
||||
console.log('PDF loaded');
|
||||
|
||||
// Fetch the first page
|
||||
const pageNumber = 1;
|
||||
pdf.getPage(pageNumber).then((page) => {
|
||||
console.log('Page loaded');
|
||||
|
||||
const scale = 10;
|
||||
const viewport = page.getViewport({ scale: scale });
|
||||
|
||||
// Prepare canvas using PDF page dimensions
|
||||
const canvas: any = this.shadowRoot.querySelector('#pdfcanvas');
|
||||
const context = canvas.getContext('2d');
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
// Render PDF page into canvas context
|
||||
const renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport,
|
||||
};
|
||||
|
||||
const renderTask = page.render(renderContext);
|
||||
renderTask.promise.then(function () {
|
||||
console.log('Page rendered');
|
||||
});
|
||||
});
|
||||
},
|
||||
(reason) => {
|
||||
// PDF loading error
|
||||
console.error(reason);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
0
ts_web/elements/dees-preview.ts
Normal file
0
ts_web/elements/dees-preview.ts
Normal file
0
ts_web/elements/dees-searchbox.ts
Normal file
0
ts_web/elements/dees-searchbox.ts
Normal file
156
ts_web/elements/dees-speechbubble.ts
Normal file
156
ts_web/elements/dees-speechbubble.ts
Normal file
@ -0,0 +1,156 @@
|
||||
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-speechbubble': DeesSpeechbubble;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-speechbubble')
|
||||
export class DeesSpeechbubble extends DeesElement {
|
||||
public static demo = () => html` <dees-speechbubble></dees-speechbubble> `;
|
||||
|
||||
@property()
|
||||
public text: string;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
})
|
||||
public disabled = false;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
})
|
||||
public isHidden = false;
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
:host([hidden]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.maincontainer {
|
||||
will-change: transform;
|
||||
transition: transform 0.2s;
|
||||
transform: translateX(0px);
|
||||
position: relative;
|
||||
transition: all 0.2s;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.maincontainer:hover {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
transform: rotate(45deg);
|
||||
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
left: 4px;
|
||||
top: 5px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.speechbubble {
|
||||
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||
padding: 0px 10px;
|
||||
border-radius: 3px;
|
||||
position: absolute;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
top: 0px;
|
||||
left: 8px;
|
||||
}
|
||||
|
||||
.wave {
|
||||
animation-name: wave-animation; /* Refers to the name of your @keyframes element below */
|
||||
animation-duration: 2.5s; /* Change to speed up or slow down */
|
||||
animation-iteration-count: infinite; /* Never stop waving :) */
|
||||
transform-origin: 70% 70%; /* Pivot around the bottom-left palm */
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@keyframes wave-animation {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
10% {
|
||||
transform: rotate(14deg);
|
||||
} /* The following five values can be played with to make the waving more or less extreme */
|
||||
20% {
|
||||
transform: rotate(-8deg);
|
||||
}
|
||||
30% {
|
||||
transform: rotate(14deg);
|
||||
}
|
||||
40% {
|
||||
transform: rotate(-4deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotate(10deg);
|
||||
}
|
||||
60% {
|
||||
transform: rotate(0deg);
|
||||
} /* Reset for the last half to pause */
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<div class="maincontainer" @click=${this.handleClick}>
|
||||
<div class="arrow"></div>
|
||||
<div class="speechbubble"><span class="wave">👋</span> We build with launch.sh, and you can too.</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public async handleClick() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
globalThis.location.href = "https://launch.sh"
|
||||
}
|
||||
|
||||
public async firstUpdated() {
|
||||
if (!this.textContent) {
|
||||
this.textContent = 'Button';
|
||||
this.performUpdate();
|
||||
}
|
||||
}
|
||||
}
|
@ -23,6 +23,8 @@ export class DeesSpinner extends DeesElement {
|
||||
<dees-spinner></dees-spinner>
|
||||
<dees-spinner status="success"></dees-spinner>
|
||||
<dees-spinner status="error"></dees-spinner>
|
||||
<dees-spinner size=${64} status="success"></dees-spinner>
|
||||
<dees-spinner .size=${64} status="error"></dees-spinner>
|
||||
`;
|
||||
|
||||
@property({
|
||||
@ -30,6 +32,11 @@ export class DeesSpinner extends DeesElement {
|
||||
})
|
||||
public size = 20;
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public bnw: boolean = false;
|
||||
|
||||
@property()
|
||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||
|
||||
@ -45,6 +52,7 @@ export class DeesSpinner extends DeesElement {
|
||||
}
|
||||
|
||||
#loading {
|
||||
position: relative;
|
||||
transition: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@ -58,16 +66,14 @@ export class DeesSpinner extends DeesElement {
|
||||
}
|
||||
|
||||
#loading.success {
|
||||
border: 0px solid rgba(255, 255, 255, 0);
|
||||
background: #8bc34a;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
animation: none;
|
||||
-webkit-animation: none;
|
||||
}
|
||||
|
||||
#loading.error {
|
||||
border: 0px solid rgba(255, 255, 255, 0);
|
||||
background: #e64a19;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
animation: none;
|
||||
-webkit-animation: none;
|
||||
@ -84,36 +90,10 @@ export class DeesSpinner extends DeesElement {
|
||||
}
|
||||
}
|
||||
|
||||
#loading .checkmark {
|
||||
display: inline-block;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
-ms-transform: rotate(45deg); /* IE 9 */
|
||||
-webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
#loading .checkmark_stem {
|
||||
dees-icon {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 9px;
|
||||
background-color: #fff;
|
||||
left: 9px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
#loading .checkmark_kick {
|
||||
position: absolute;
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
background-color: #fff;
|
||||
left: 6px;
|
||||
top: 11px;
|
||||
}
|
||||
|
||||
#loading.disabled .checkmark_stem,
|
||||
#loading.disabled .checkmark_kick {
|
||||
background-color: ${cssManager.bdTheme('#333', '#fff')};
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
`,
|
||||
];
|
||||
@ -125,16 +105,25 @@ export class DeesSpinner extends DeesElement {
|
||||
width: ${this.size}px;
|
||||
height: ${this.size}px;
|
||||
}
|
||||
#loading.success {
|
||||
color: ${cssManager.bdTheme(this.bnw ? '#333': `#8bc34a`, this.bnw ? '#fff' : `#8bc34a`)};
|
||||
|
||||
}
|
||||
#loading.error {
|
||||
color: ${cssManager.bdTheme(this.bnw ? '#333': `#e64a19`, this.bnw ? '#fff' : `#e64a19`)};
|
||||
}
|
||||
dees-icon {
|
||||
font-size: ${this.size}px;
|
||||
}
|
||||
</style>
|
||||
<div class="${this.status}" id="loading">
|
||||
${this.status === 'success' || this.status === 'error'
|
||||
? html`
|
||||
<span class="checkmark">
|
||||
<div class="checkmark_stem"></div>
|
||||
<div class="checkmark_kick"></div>
|
||||
</span>
|
||||
`
|
||||
: null}
|
||||
${(() => {
|
||||
if (this.status === 'success') {
|
||||
return html`<dees-icon style="transform: translateX(1%) translateY(3%);" .iconFA=${'circleCheck' as any}></dees-icon>`;
|
||||
} else if (this.status === 'error') {
|
||||
return html`<dees-icon .iconFA=${'circleXmark' as any}></dees-icon>`;
|
||||
}
|
||||
})()}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ export class DeesStepper extends DeesElement {
|
||||
.step .title {
|
||||
text-align: center;
|
||||
padding-top: 50px;
|
||||
font-family: Roboto;
|
||||
font-family: Inter;
|
||||
font-size: 25px;
|
||||
font-weight: 300;
|
||||
}
|
||||
@ -229,7 +229,8 @@ export class DeesStepper extends DeesElement {
|
||||
{
|
||||
vertical: true,
|
||||
horizontal: false,
|
||||
easing: 'easeInOutQuint',
|
||||
easing: 'easeInOutExpo',
|
||||
duration: 700,
|
||||
},
|
||||
stepperContainer
|
||||
);
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
cssManager,
|
||||
css,
|
||||
unsafeCSS,
|
||||
state,
|
||||
} from '@designestate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
@ -17,6 +18,13 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
export interface IDataAction<T = any> {
|
||||
name: string;
|
||||
iconName: string;
|
||||
useTableBehaviour?: 'upload' | 'cancelUpload' | 'none';
|
||||
actionFunc: (itemArg: T) => Promise<any>;
|
||||
}
|
||||
|
||||
@customElement('dees-table')
|
||||
export class DeesTable<T> extends DeesElement {
|
||||
public static demo = () => html`
|
||||
@ -61,11 +69,26 @@ export class DeesTable<T> extends DeesElement {
|
||||
description: 'Office-Supplies - STAPLES BREMEN',
|
||||
},
|
||||
]}
|
||||
>This is a slotted Text</dees-table
|
||||
>
|
||||
.dataActions="${[{
|
||||
name: 'upload',
|
||||
iconName: 'upload',
|
||||
useTableBehaviour: 'upload',
|
||||
actionFunc: async (itemArg: any) => {
|
||||
|
||||
},
|
||||
},{
|
||||
name: 'visibility',
|
||||
iconName: 'visibility',
|
||||
useTableBehaviour: 'preview',
|
||||
actionFunc: async (itemArg: any) => {
|
||||
|
||||
},
|
||||
}] as IDataAction[]}"
|
||||
>This is a slotted Text</dees-table>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// INSTANCE
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
@ -81,6 +104,11 @@ export class DeesTable<T> extends DeesElement {
|
||||
})
|
||||
public data: T[] = [];
|
||||
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public dataActions: IDataAction[] = [];
|
||||
|
||||
@property({
|
||||
type: Object,
|
||||
})
|
||||
@ -96,6 +124,9 @@ export class DeesTable<T> extends DeesElement {
|
||||
})
|
||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||
|
||||
public files: File[] = [];
|
||||
public fileWeakMap = new WeakMap();
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
@ -104,24 +135,29 @@ export class DeesTable<T> extends DeesElement {
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
.mainbox {
|
||||
color: #fff;
|
||||
font-family: Roboto Mono;
|
||||
padding: 20px;
|
||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||
font-family: 'Inter';
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
padding: 16px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
background: #393939;
|
||||
background: ${cssManager.bdTheme('#ffffff', '#333333')};
|
||||
border-radius: 3px;
|
||||
border-top: 1px solid ${cssManager.bdTheme('#fff', '#444')};
|
||||
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
|
||||
overflow-x: auto;
|
||||
}
|
||||
.headingSeparation {
|
||||
margin-top: 7px;
|
||||
border-bottom: 1px solid #bcbcbc;
|
||||
border-bottom: 1px solid ${cssManager.bdTheme('#bcbcbc', '#bcbcbc')};
|
||||
}
|
||||
|
||||
table,
|
||||
.noDataSet {
|
||||
margin-top: 20px;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
@ -129,7 +165,7 @@ export class DeesTable<T> extends DeesElement {
|
||||
text-align: center;
|
||||
}
|
||||
tr {
|
||||
border-bottom: 1px dashed #808080;
|
||||
border-bottom: 1px dashed ${cssManager.bdTheme('#999', '#808080')};
|
||||
text-align: left;
|
||||
}
|
||||
tr:last-child {
|
||||
@ -140,7 +176,7 @@ export class DeesTable<T> extends DeesElement {
|
||||
cursor: pointer;
|
||||
}
|
||||
tr:hover .innerCellContainer {
|
||||
background: #ffffff10;
|
||||
background: ${cssManager.bdTheme('#22222210', '#ffffff20')};
|
||||
}
|
||||
tr:first-child:hover {
|
||||
cursor: auto;
|
||||
@ -149,7 +185,7 @@ export class DeesTable<T> extends DeesElement {
|
||||
background: none;
|
||||
}
|
||||
tr.selected .innerCellContainer {
|
||||
background: #ffffff20
|
||||
background: ${cssManager.bdTheme('#22222220', '#ffffff20')};
|
||||
}
|
||||
th {
|
||||
text-transform: uppercase;
|
||||
@ -157,10 +193,10 @@ export class DeesTable<T> extends DeesElement {
|
||||
th,
|
||||
td {
|
||||
padding: 3px 0px;
|
||||
border-right: 1px dashed #808080;
|
||||
border-right: 1px dashed ${cssManager.bdTheme('#999', '#808080')};
|
||||
}
|
||||
.innerCellContainer {
|
||||
padding: 7px 10px;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
th:first-child .innerCellContainer,
|
||||
td:first-child .innerCellContainer {
|
||||
@ -175,12 +211,30 @@ export class DeesTable<T> extends DeesElement {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.action {
|
||||
margin: -8px 0px;
|
||||
padding: 8px;
|
||||
line-height: 16px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.action:first-child {
|
||||
margin-left: -8px;
|
||||
width: min-content;
|
||||
}
|
||||
|
||||
.action:hover {
|
||||
background: ${cssManager.bdTheme('#CCC', '#111')};
|
||||
}
|
||||
|
||||
.tableStatistics {
|
||||
padding: 5px 20px;
|
||||
font-size: 14px;
|
||||
color: #ffffff90;
|
||||
background: #00000050;
|
||||
margin: 20px -20px -20px -20px;
|
||||
padding: 4px 16px;
|
||||
font-size: 12px;
|
||||
color: ${cssManager.bdTheme('#111', '#ffffff90')};
|
||||
background: ${cssManager.bdTheme('#eeeeeb', '#00000050')};
|
||||
margin: 16px -16px -16px -16px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
`,
|
||||
];
|
||||
@ -208,6 +262,15 @@ export class DeesTable<T> extends DeesElement {
|
||||
</th>
|
||||
`
|
||||
)}
|
||||
${(() => {
|
||||
if (this.dataActions && this.dataActions.length > 0) {
|
||||
return html`
|
||||
<th>
|
||||
<div class="innerCellContainer">Actions</div>
|
||||
</th>
|
||||
`;
|
||||
}
|
||||
})()}
|
||||
</tr>
|
||||
${this.data.map(
|
||||
(itemArg) => html`
|
||||
@ -215,6 +278,38 @@ export class DeesTable<T> extends DeesElement {
|
||||
@click=${() => {
|
||||
this.selectedDataRow = itemArg;
|
||||
}}
|
||||
@dragenter=${async (eventArg: DragEvent) => {
|
||||
console.log((eventArg.target as HTMLElement).tagName)
|
||||
console.log('dragenter');
|
||||
eventArg.preventDefault();
|
||||
eventArg.stopPropagation();
|
||||
(eventArg.target as HTMLElement).parentElement.style.background = '#800000';
|
||||
}}
|
||||
@dragleave=${async (eventArg: DragEvent) => {
|
||||
console.log((eventArg.target as HTMLElement).tagName)
|
||||
console.log('dragleave');
|
||||
eventArg.preventDefault();
|
||||
eventArg.stopPropagation();
|
||||
(eventArg.target as HTMLElement).parentElement.style.background = 'none';
|
||||
}}
|
||||
@dragover=${async (eventArg: DragEvent) => {
|
||||
eventArg.preventDefault();
|
||||
}}
|
||||
@drop=${async (eventArg: DragEvent) => {
|
||||
eventArg.preventDefault();
|
||||
const newFiles = []
|
||||
for (const file of Array.from(eventArg.dataTransfer.files)) {
|
||||
this.files.push(file);
|
||||
newFiles.push(file);
|
||||
this.requestUpdate();
|
||||
}
|
||||
const result: File[] = this.fileWeakMap.get(itemArg as object);
|
||||
if (!result) {
|
||||
this.fileWeakMap.set(itemArg as object, newFiles)
|
||||
} else {
|
||||
result.push(...newFiles);
|
||||
}
|
||||
}}
|
||||
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
|
||||
>
|
||||
${headings.map(
|
||||
@ -224,6 +319,25 @@ export class DeesTable<T> extends DeesElement {
|
||||
</td>
|
||||
`
|
||||
)}
|
||||
${(() => {
|
||||
if (this.dataActions && this.dataActions.length > 0) {
|
||||
return html`
|
||||
<td>
|
||||
<div class="innerCellContainer">
|
||||
${(() => {
|
||||
const actions: TemplateResult[] = [];
|
||||
for (const action of this.dataActions) {
|
||||
actions.push(html`<div class="action">${action.iconName ? html`
|
||||
<dees-icon .iconName=${'upload_file'}></dees-icon>
|
||||
` : action.name}</div>`)
|
||||
}
|
||||
return actions;
|
||||
})()}
|
||||
</div>
|
||||
</td>
|
||||
`;
|
||||
}
|
||||
})()}
|
||||
</tr>
|
||||
`
|
||||
)}
|
||||
@ -233,7 +347,9 @@ export class DeesTable<T> extends DeesElement {
|
||||
: 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`}
|
||||
${this.selectedDataRow
|
||||
? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected`
|
||||
: html`No row selected`}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
1
ts_web/elements/dees-tooltip.ts
Normal file
1
ts_web/elements/dees-tooltip.ts
Normal file
@ -0,0 +1 @@
|
||||
import {} from '@designestate/dees-element';
|
@ -42,6 +42,7 @@ export class DeesWindowLayer extends DeesElement {
|
||||
background: rgba(0, 0, 0, 0.0);
|
||||
backdrop-filter: brightness(1);
|
||||
pointer-events: none;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
.visible {
|
||||
@ -63,10 +64,22 @@ export class DeesWindowLayer extends DeesElement {
|
||||
}
|
||||
|
||||
dispatchClicked() {
|
||||
this.dispatchEvent(new CustomEvent('clicked'))
|
||||
this.dispatchEvent(new CustomEvent('clicked'));
|
||||
}
|
||||
|
||||
public toggleVisibility () {
|
||||
this.visible = !this.visible;
|
||||
}
|
||||
|
||||
public async show() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
await domtools.convenience.smartdelay.delayFor(0);
|
||||
this.visible = true;
|
||||
}
|
||||
|
||||
public async hide() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
await domtools.convenience.smartdelay.delayFor(0);
|
||||
this.visible = false;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
export * from './dees-button-exit.js';
|
||||
export * from './dees-button.js';
|
||||
export * from './dees-chips.js';
|
||||
export * from './dees-contextmenu.js';
|
||||
export * from './dees-dataview-codebox.js';
|
||||
export * from './dees-dataview-statusobject.js';
|
||||
export * from './dees-form.js';
|
||||
export * from './dees-form-submit.js';
|
||||
export * from './dees-icon.js';
|
||||
@ -9,6 +13,9 @@ export * from './dees-input-fileupload.js';
|
||||
export * from './dees-input-quantityselector.js';
|
||||
export * from './dees-input-radio.js';
|
||||
export * from './dees-input-text.js';
|
||||
export * from './dees-mobilenavigation.js';
|
||||
export * from './dees-pdf.js';
|
||||
export * from './dees-speechbubble.js';
|
||||
export * from './dees-spinner.js';
|
||||
export * from './dees-stepper.js';
|
||||
export * from './dees-table.js';
|
||||
|
5
ts_web/elements/plugins.ts
Normal file
5
ts_web/elements/plugins.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
}
|
@ -1 +1,2 @@
|
||||
export * from './elements/index.js';
|
||||
export { commitinfo } from './00_commitinfo_data.js';
|
||||
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"noUnusedLocals": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"outDir": "dist/",
|
||||
"skipLibCheck": true,
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"target": "ES2020",
|
||||
"module": "ES2020",
|
||||
"moduleResolution": "Node12"
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Reference in New Issue
Block a user