Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
c86f7d466c | |||
9a6db7d882 | |||
b69b1179a1 | |||
0df9fe750c | |||
0d05bfa5ff | |||
4dc9e04c2e | |||
5341a0d6b6 | |||
615bea9fc4 | |||
e518bc6976 | |||
076f8c7a91 | |||
b016b959cf | |||
eca68e28a2 |
7183
package-lock.json
generated
7183
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.93",
|
"version": "1.0.99",
|
||||||
"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",
|
||||||
@ -14,22 +14,23 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@designestate/dees-domtools": "^2.0.22",
|
"@designestate/dees-domtools": "^2.0.23",
|
||||||
"@designestate/dees-element": "^2.0.15",
|
"@designestate/dees-element": "^2.0.16",
|
||||||
"@designestate/dees-wcctools": "^1.0.74",
|
"@designestate/dees-wcctools": "^1.0.74",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
"@fortawesome/fontawesome-svg-core": "^6.1.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.1.1",
|
"@fortawesome/free-brands-svg-icons": "^6.1.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
"@fortawesome/free-regular-svg-icons": "^6.1.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
"@fortawesome/free-solid-svg-icons": "^6.1.2",
|
||||||
"pdfjs-dist": "^2.14.305"
|
"@tsclass/tsclass": "^4.0.19",
|
||||||
|
"pdfjs-dist": "^2.15.349"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.61",
|
"@gitzone/tsbuild": "^2.1.65",
|
||||||
"@gitzone/tsbundle": "^2.0.3",
|
"@gitzone/tsbundle": "^2.0.7",
|
||||||
"@gitzone/tstest": "^1.0.71",
|
"@gitzone/tstest": "^1.0.73",
|
||||||
"@gitzone/tswatch": "^2.0.1",
|
"@gitzone/tswatch": "^2.0.5",
|
||||||
"@pushrocks/projectinfo": "^5.0.1",
|
"@pushrocks/projectinfo": "^5.0.1",
|
||||||
"@pushrocks/tapbundle": "^5.0.3"
|
"@pushrocks/tapbundle": "^5.0.4"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.93',
|
version: '1.0.99',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,9 @@ import {
|
|||||||
faMedium,
|
faMedium,
|
||||||
faSlackHash,
|
faSlackHash,
|
||||||
faTwitter,
|
faTwitter,
|
||||||
|
faInstagram,
|
||||||
|
faTiktok,
|
||||||
|
|
||||||
} from '@fortawesome/free-brands-svg-icons';
|
} from '@fortawesome/free-brands-svg-icons';
|
||||||
|
|
||||||
import {} from '@fortawesome/free-regular-svg-icons';
|
import {} from '@fortawesome/free-regular-svg-icons';
|
||||||
@ -22,10 +25,12 @@ type TFontAwesomeIcon =
|
|||||||
// brands
|
// brands
|
||||||
| 'facebook'
|
| 'facebook'
|
||||||
| 'google'
|
| 'google'
|
||||||
| 'twitter'
|
|
||||||
| 'linkedin'
|
| 'linkedin'
|
||||||
|
| 'instagram'
|
||||||
| 'medium'
|
| 'medium'
|
||||||
| 'slack'
|
| 'slack'
|
||||||
|
| 'tiktok'
|
||||||
|
| 'twitter'
|
||||||
| 'users';
|
| 'users';
|
||||||
const faIcons: { [key: string]: IconDefinition } = {
|
const faIcons: { [key: string]: IconDefinition } = {
|
||||||
// normal
|
// normal
|
||||||
@ -34,9 +39,11 @@ const faIcons: { [key: string]: IconDefinition } = {
|
|||||||
// brands
|
// brands
|
||||||
facebook: faFacebook,
|
facebook: faFacebook,
|
||||||
google: faGoogle,
|
google: faGoogle,
|
||||||
|
instagram: faInstagram,
|
||||||
linkedin: faLinkedin,
|
linkedin: faLinkedin,
|
||||||
medium: faMedium,
|
medium: faMedium,
|
||||||
slack: faSlackHash,
|
slack: faSlackHash,
|
||||||
|
tiktok: faTiktok,
|
||||||
twitter: faTwitter,
|
twitter: faTwitter,
|
||||||
users: faUsers,
|
users: faUsers,
|
||||||
};
|
};
|
||||||
|
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: #fff;
|
||||||
|
z-index: 250;
|
||||||
|
opacity: 0;
|
||||||
|
padding: 16px 32px;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
background: #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: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 24px;
|
||||||
|
padding: 8px 0px;
|
||||||
|
font-family: 'Roboto';
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -42,6 +42,7 @@ export class DeesWindowLayer extends DeesElement {
|
|||||||
background: rgba(0, 0, 0, 0.0);
|
background: rgba(0, 0, 0, 0.0);
|
||||||
backdrop-filter: brightness(1);
|
backdrop-filter: brightness(1);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
z-index: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
.visible {
|
.visible {
|
||||||
@ -63,10 +64,22 @@ export class DeesWindowLayer extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dispatchClicked() {
|
dispatchClicked() {
|
||||||
this.dispatchEvent(new CustomEvent('clicked'))
|
this.dispatchEvent(new CustomEvent('clicked'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleVisibility () {
|
public toggleVisibility () {
|
||||||
this.visible = !this.visible;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ export * from './dees-input-fileupload.js';
|
|||||||
export * from './dees-input-quantityselector.js';
|
export * from './dees-input-quantityselector.js';
|
||||||
export * from './dees-input-radio.js';
|
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-pdf.js';
|
export * from './dees-pdf.js';
|
||||||
export * from './dees-speechbubble.js';
|
export * from './dees-speechbubble.js';
|
||||||
export * from './dees-spinner.js';
|
export * from './dees-spinner.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,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"target": "ES2020",
|
"useDefineForClassFields": false,
|
||||||
"module": "ES2020",
|
"target": "ES2022",
|
||||||
"moduleResolution": "Node12"
|
"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