Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
5f1b29f742 | |||
e7978a22e4 | |||
15de86774b | |||
8f57647c85 | |||
59c5bcabd5 | |||
cae421e140 | |||
05b2b09395 | |||
4dbd4f84c1 | |||
bb0ca2f19d | |||
55175f9ac7 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.101",
|
"version": "1.0.106",
|
||||||
"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",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.101',
|
version: '1.0.106',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export class DeesButton extends DeesElement {
|
|||||||
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', 'none')};
|
box-shadow: ${cssManager.bdTheme('0px 0px 5px rgba(0,0,0,0.1)', '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: 2px;
|
border-radius: 4px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
padding: 0px 8px;
|
padding: 0px 8px;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
@ -86,6 +86,9 @@ export class DeesIcon extends DeesElement {
|
|||||||
display: block;
|
display: block;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
#iconContainer svg {
|
#iconContainer svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -104,7 +107,7 @@ export class DeesIcon extends DeesElement {
|
|||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
|
|
||||||
/* Support for all WebKit browsers. */
|
/* Support for all WebKit browsers. */
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
/* Support for Safari and Chrome. */
|
/* Support for Safari and Chrome. */
|
||||||
|
@ -19,7 +19,7 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-input-fileupload')
|
@customElement('dees-input-fileupload')
|
||||||
export class DeesInputFileupload extends DeesElement {
|
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
|
// INSTANCE
|
||||||
public changeSubject = new domtools.rxjs.Subject();
|
public changeSubject = new domtools.rxjs.Subject();
|
||||||
@ -71,8 +71,13 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
color: ${cssManager.bdTheme('#333', '#ccc')};
|
color: ${cssManager.bdTheme('#333', '#ccc')};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -89,6 +94,12 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uploadButton:hover {
|
||||||
|
color: #fff;
|
||||||
|
background: rgb(3, 155, 229);
|
||||||
|
}
|
||||||
|
|
||||||
.uploadButton::after {
|
.uploadButton::after {
|
||||||
top: 2px;
|
top: 2px;
|
||||||
right: 2px;
|
right: 2px;
|
||||||
@ -109,10 +120,16 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
.uploadCandidate {
|
.uploadCandidate {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-bottom: 1px dashed #444;
|
border-bottom: 1px dashed #444;
|
||||||
color: #fff;
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-family: 'Roboto Mono';
|
font-family: 'Roboto Mono';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uploadButton:hover .uploadCandidate {
|
||||||
|
color: ${cssManager.bdTheme('#fff', '#fff')};
|
||||||
|
border-bottom: 1px dashed #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.uploadCandidate:last-child {
|
.uploadCandidate:last-child {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
@ -121,16 +138,24 @@ export class DeesInputFileupload extends DeesElement {
|
|||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
|
<div class="hidden">
|
||||||
|
<input type="file"></div>
|
||||||
|
</div>
|
||||||
<div class="maincontainer">
|
<div class="maincontainer">
|
||||||
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
${this.label ? html`<div class="label">${this.label}</div>` : null}
|
||||||
<div class="uploadButton ${this.state === 'dragOver' ? 'dragOver' : ''}">
|
${this.value.map((fileArg) => html` <div class="uploadCandidate">${fileArg.name} | ${fileArg.size}</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}
|
${this.buttonText}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async openFileSelector() {
|
||||||
|
const inputFile: HTMLInputElement = this.shadowRoot.querySelector('input[type="file"]');
|
||||||
|
inputFile.click();
|
||||||
|
}
|
||||||
|
|
||||||
public async updateValue(eventArg: Event) {
|
public async updateValue(eventArg: Event) {
|
||||||
const target: any = eventArg.target;
|
const target: any = eventArg.target;
|
||||||
this.value = target.value;
|
this.value = target.value;
|
||||||
|
@ -57,6 +57,7 @@ export class DeesInputQuantitySelector extends DeesElement {
|
|||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
color: ${this.goBright ? '#666' : '#CCC'};
|
color: ${this.goBright ? '#666' : '#CCC'};
|
||||||
border: ${this.goBright ? '1px solid #333' : '1px solid #CCC'};
|
border: ${this.goBright ? '1px solid #333' : '1px solid #CCC'};
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContainer:hover {
|
.mainContainer:hover {
|
||||||
|
0
ts_web/elements/dees-preview.ts
Normal file
0
ts_web/elements/dees-preview.ts
Normal file
@ -134,7 +134,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="maincontainer" @click=${this.handleClick}>
|
<div class="maincontainer" @click=${this.handleClick}>
|
||||||
<div class="arrow"></div>
|
<div class="arrow"></div>
|
||||||
<div class="speechbubble"><span class="wave">👋</span> Hey! We are consulting.</div>
|
<div class="speechbubble"><span class="wave">👋</span> Hey! We are API-driven.</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ export class DeesSpeechbubble extends DeesElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalThis.location.href = "https://lossless.consulting"
|
globalThis.location.href = "https://api.global"
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
|
@ -229,7 +229,8 @@ export class DeesStepper extends DeesElement {
|
|||||||
{
|
{
|
||||||
vertical: true,
|
vertical: true,
|
||||||
horizontal: false,
|
horizontal: false,
|
||||||
easing: 'easeInOutQuint',
|
easing: 'easeInOutExpo',
|
||||||
|
duration: 700,
|
||||||
},
|
},
|
||||||
stepperContainer
|
stepperContainer
|
||||||
);
|
);
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
cssManager,
|
cssManager,
|
||||||
css,
|
css,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
|
state,
|
||||||
} from '@designestate/dees-element';
|
} from '@designestate/dees-element';
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
import * as domtools from '@designestate/dees-domtools';
|
||||||
@ -19,7 +20,7 @@ declare global {
|
|||||||
|
|
||||||
export interface IDataAction<T = any> {
|
export interface IDataAction<T = any> {
|
||||||
name: string;
|
name: string;
|
||||||
icon: string;
|
iconName: string;
|
||||||
useTableBehaviour?: 'upload' | 'cancelUpload' | 'none';
|
useTableBehaviour?: 'upload' | 'cancelUpload' | 'none';
|
||||||
actionFunc: (itemArg: T) => Promise<any>;
|
actionFunc: (itemArg: T) => Promise<any>;
|
||||||
}
|
}
|
||||||
@ -70,16 +71,24 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
]}
|
]}
|
||||||
.dataActions="${[{
|
.dataActions="${[{
|
||||||
name: 'upload',
|
name: 'upload',
|
||||||
icon: 'upload',
|
iconName: 'upload',
|
||||||
useTableBehaviour: 'upload',
|
useTableBehaviour: 'upload',
|
||||||
actionFunc: async (itemArg: any) => {
|
actionFunc: async (itemArg: any) => {
|
||||||
|
|
||||||
|
},
|
||||||
|
},{
|
||||||
|
name: 'visibility',
|
||||||
|
iconName: 'visibility',
|
||||||
|
useTableBehaviour: 'preview',
|
||||||
|
actionFunc: async (itemArg: any) => {
|
||||||
|
|
||||||
},
|
},
|
||||||
}] as IDataAction[]}"
|
}] as IDataAction[]}"
|
||||||
>This is a slotted Text</dees-table>
|
>This is a slotted Text</dees-table>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
// INSTANCE
|
||||||
@property({
|
@property({
|
||||||
type: String,
|
type: String,
|
||||||
})
|
})
|
||||||
@ -115,6 +124,9 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
})
|
})
|
||||||
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
public status: 'normal' | 'pending' | 'success' | 'error' = 'normal';
|
||||||
|
|
||||||
|
public files: File[] = [];
|
||||||
|
public fileWeakMap = new WeakMap();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@ -200,6 +212,8 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
.action {
|
.action {
|
||||||
margin: -8px 0px;
|
margin: -8px 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
line-height: 16px;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action:first-child {
|
.action:first-child {
|
||||||
@ -208,7 +222,7 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.action:hover {
|
.action:hover {
|
||||||
background: #111;
|
background: ${cssManager.bdTheme('#CCC', '#111')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableStatistics {
|
.tableStatistics {
|
||||||
@ -247,7 +261,7 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
${(() => {
|
${(() => {
|
||||||
if (this.dataActions) {
|
if (this.dataActions && this.dataActions.length > 0) {
|
||||||
return html`
|
return html`
|
||||||
<th>
|
<th>
|
||||||
<div class="innerCellContainer">Actions</div>
|
<div class="innerCellContainer">Actions</div>
|
||||||
@ -262,20 +276,37 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
@click=${() => {
|
@click=${() => {
|
||||||
this.selectedDataRow = itemArg;
|
this.selectedDataRow = itemArg;
|
||||||
}}
|
}}
|
||||||
@dragenter=${async (eventArg) => {
|
@dragenter=${async (eventArg: DragEvent) => {
|
||||||
console.log('hey');
|
console.log((eventArg.target as HTMLElement).tagName)
|
||||||
|
console.log('dragenter');
|
||||||
eventArg.preventDefault();
|
eventArg.preventDefault();
|
||||||
eventArg.stopPropagation();
|
eventArg.stopPropagation();
|
||||||
|
(eventArg.target as HTMLElement).parentElement.style.background = '#800000';
|
||||||
}}
|
}}
|
||||||
@dragover=${async (eventArg) => {
|
@dragleave=${async (eventArg: DragEvent) => {
|
||||||
console.log('hey');
|
console.log((eventArg.target as HTMLElement).tagName)
|
||||||
|
console.log('dragleave');
|
||||||
eventArg.preventDefault();
|
eventArg.preventDefault();
|
||||||
eventArg.stopPropagation();
|
eventArg.stopPropagation();
|
||||||
|
(eventArg.target as HTMLElement).parentElement.style.background = 'none';
|
||||||
}}
|
}}
|
||||||
@drop=${async (eventArg) => {
|
@dragover=${async (eventArg: DragEvent) => {
|
||||||
console.log('hey');
|
|
||||||
eventArg.preventDefault();
|
eventArg.preventDefault();
|
||||||
eventArg.stopPropagation();
|
}}
|
||||||
|
@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' : ''}"
|
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
|
||||||
>
|
>
|
||||||
@ -287,14 +318,16 @@ export class DeesTable<T> extends DeesElement {
|
|||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
${(() => {
|
${(() => {
|
||||||
if (this.dataActions) {
|
if (this.dataActions && this.dataActions.length > 0) {
|
||||||
return html`
|
return html`
|
||||||
<td>
|
<td>
|
||||||
<div class="innerCellContainer">
|
<div class="innerCellContainer">
|
||||||
${(() => {
|
${(() => {
|
||||||
const actions: TemplateResult[] = [];
|
const actions: TemplateResult[] = [];
|
||||||
for (const action of this.dataActions) {
|
for (const action of this.dataActions) {
|
||||||
actions.push(html`<div class="action">${action.name}</div>`)
|
actions.push(html`<div class="action">${action.iconName ? html`
|
||||||
|
<dees-icon .iconName=${'upload_file'}></dees-icon>
|
||||||
|
` : action.name}</div>`)
|
||||||
}
|
}
|
||||||
return actions;
|
return actions;
|
||||||
})()}
|
})()}
|
||||||
|
Reference in New Issue
Block a user