Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
27d338420c | |||
81f2e662fb | |||
d8905b687f | |||
75f6da194b | |||
e653450ec5 | |||
9de9f0c202 | |||
75929c089d | |||
6a97e8d020 | |||
6aeb970bbe | |||
ea7fa0816d | |||
1b1de04f86 | |||
7941628d1d |
@ -36,6 +36,7 @@ auditProductionDependencies:
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
5
license
5
license
@ -8,7 +8,10 @@ copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
copies or substantial portions of the Software. You agree to being mentioned
|
||||
as reference by Lossless GmbH. This includes the use of your entity logos
|
||||
or profile picture by Lossless GmbH on websites and readme's, also on third party
|
||||
pages like gitlab.com or github.com.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
|
15061
package-lock.json
generated
15061
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@designestate/dees-catalog",
|
||||
"version": "1.0.67",
|
||||
"version": "1.0.73",
|
||||
"private": false,
|
||||
"description": "website for lossless.com",
|
||||
"main": "dist_ts_web/index.js",
|
||||
@ -13,22 +13,22 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^1.0.94",
|
||||
"@designestate/dees-element": "^1.0.23",
|
||||
"@designestate/dees-wcctools": "^1.0.57",
|
||||
"@designestate/dees-domtools": "^1.0.102",
|
||||
"@designestate/dees-element": "^1.0.28",
|
||||
"@designestate/dees-wcctools": "^1.0.66",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.15.4",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.15.4",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
||||
"typescript": "^4.4.3"
|
||||
"typescript": "^4.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.27",
|
||||
"@gitzone/tsbundle": "^1.0.87",
|
||||
"@gitzone/tstest": "^1.0.57",
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tsbundle": "^1.0.88",
|
||||
"@gitzone/tstest": "^1.0.60",
|
||||
"@gitzone/tswatch": "^1.0.56",
|
||||
"@pushrocks/projectinfo": "^4.0.5",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@pushrocks/tapbundle": "^3.2.15",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
},
|
||||
|
123
ts_web/elements/dees-chips.ts
Normal file
123
ts_web/elements/dees-chips.ts
Normal file
@ -0,0 +1,123 @@
|
||||
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-chips': DeesChips;
|
||||
}
|
||||
}
|
||||
|
||||
@customElement('dees-chips')
|
||||
export class DeesChips extends DeesElement {
|
||||
public static demo = () => html`
|
||||
<dees-chips .selectableChips=${['Payment Account 1', 'PaymentAccount2', 'Payment Account 3']}></dees-chips>
|
||||
<dees-chips selectionMode="multiple" .selectableChips=${['Payment Account 1', 'PaymentAccount2', 'Payment Account 3']}></dees-chips>
|
||||
|
||||
`;
|
||||
|
||||
@property()
|
||||
public selectionMode: 'single' | 'multiple' = 'single';
|
||||
|
||||
@property({
|
||||
type: Array
|
||||
})
|
||||
public selectableChips: string[] = [];
|
||||
|
||||
@property()
|
||||
public selectedChip: string = null;
|
||||
|
||||
@property({
|
||||
type: Array
|
||||
})
|
||||
public selectedChips: string[] = [];
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mainbox {
|
||||
|
||||
}
|
||||
|
||||
.chip {
|
||||
background: #494949;
|
||||
display: inline-block;
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
border-radius: 30px;
|
||||
margin-right: 3px;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
.chip:hover {
|
||||
background: #666666;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chip.selected {
|
||||
background: #00A3FF;
|
||||
}
|
||||
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<div class="mainbox">
|
||||
${this.selectableChips.map(chipArg => html`
|
||||
<div @click=${() => this.selectChip(chipArg)} class="chip ${this.selectedChip === chipArg || this.selectedChips.includes(chipArg) ? 'selected' : ''}">
|
||||
${chipArg}
|
||||
</div>
|
||||
`)}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
public async firstUpdated() {
|
||||
if (!this.textContent) {
|
||||
this.textContent = 'Button';
|
||||
this.performUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public async selectChip(chipArg: string) {
|
||||
if (this.selectionMode === 'single') {
|
||||
if (this.selectedChip === chipArg) {
|
||||
this.selectedChip = null;
|
||||
this.selectedChips = [];
|
||||
} else {
|
||||
this.selectedChip = chipArg;
|
||||
this.selectedChips = [chipArg];
|
||||
}
|
||||
} else if(this.selectionMode === 'multiple') {
|
||||
if (this.selectedChips.includes(chipArg)) {
|
||||
this.selectedChips = this.selectedChips.filter(chipArg2 => chipArg !== chipArg2)
|
||||
} else {
|
||||
this.selectedChips.push(chipArg);
|
||||
}
|
||||
this.requestUpdate();
|
||||
}
|
||||
console.log(this.selectedChips);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { LitElement, html, property, customElement } from 'lit-element';
|
||||
import { DeesElement, html, property, customElement } from '@designestate/dees-element';
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
||||
@ -48,8 +48,9 @@ declare global {
|
||||
}
|
||||
|
||||
@customElement('dees-icon')
|
||||
export class DeesIcon extends LitElement {
|
||||
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>
|
||||
|
0
ts_web/elements/dees-search.ts
Normal file
0
ts_web/elements/dees-search.ts
Normal file
@ -66,18 +66,24 @@ export class DeesTable<T> extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
@property()
|
||||
public heading1: string;
|
||||
|
||||
@property()
|
||||
public heading2: string;
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
public heading1: string = 'heading 1';
|
||||
|
||||
@property({
|
||||
type: Array
|
||||
type: String,
|
||||
})
|
||||
public heading2: string = 'heading 2';
|
||||
|
||||
@property({
|
||||
type: Array,
|
||||
})
|
||||
public data: T[] = [];
|
||||
|
||||
@property()
|
||||
@property({
|
||||
type: Object,
|
||||
})
|
||||
public selectedDataRow: T;
|
||||
|
||||
@property({
|
||||
@ -142,6 +148,9 @@ export class DeesTable<T> extends DeesElement {
|
||||
tr:first-child:hover .innerCellContainer {
|
||||
background: none;
|
||||
}
|
||||
tr.selected .innerCellContainer {
|
||||
background: #ffffff20
|
||||
}
|
||||
th {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
@ -192,28 +201,39 @@ export class DeesTable<T> extends DeesElement {
|
||||
return html`
|
||||
<table>
|
||||
<tr>
|
||||
${headings.map(headingArg => html`
|
||||
<th>
|
||||
<div class="innerCellContainer">${headingArg}</div>
|
||||
</th>
|
||||
`)}
|
||||
${headings.map(
|
||||
(headingArg) => html`
|
||||
<th>
|
||||
<div class="innerCellContainer">${headingArg}</div>
|
||||
</th>
|
||||
`
|
||||
)}
|
||||
</tr>
|
||||
${this.data.map(itemArg => html`
|
||||
<tr>
|
||||
${headings.map(headingArg => html`
|
||||
<td>
|
||||
<div class="innerCellContainer">${itemArg[headingArg]}</div>
|
||||
</td>
|
||||
`)}
|
||||
</tr>
|
||||
`)}
|
||||
${this.data.map(
|
||||
(itemArg) => html`
|
||||
<tr
|
||||
@click=${() => {
|
||||
this.selectedDataRow = itemArg;
|
||||
}}
|
||||
class="${itemArg === this.selectedDataRow ? 'selected' : ''}"
|
||||
>
|
||||
${headings.map(
|
||||
(headingArg) => html`
|
||||
<td>
|
||||
<div class="innerCellContainer">${itemArg[headingArg]}</div>
|
||||
</td>
|
||||
`
|
||||
)}
|
||||
</tr>
|
||||
`
|
||||
)}
|
||||
</table>
|
||||
`;
|
||||
})()
|
||||
: html` <div class="noDataSet">No data set!</div> `}
|
||||
<div class="tableStatistics">
|
||||
${this.data.length} data rows (total) |
|
||||
${this.selectedDataRow ? html`` : html`No row selected`}
|
||||
${this.selectedDataRow ? html`Row ${this.data.indexOf(this.selectedDataRow) + 1} selected` : html`No row selected`}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -14,12 +14,16 @@ declare global {
|
||||
|
||||
@customElement('dees-updater')
|
||||
export class DeesUpdater extends LitElement {
|
||||
public static demo = () => html`<dees-updater ></dees-updater>`;
|
||||
public static demo = () => html`<dees-updater></dees-updater>`;
|
||||
|
||||
@property()
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
currentVersion: string;
|
||||
|
||||
@property()
|
||||
@property({
|
||||
type: String,
|
||||
})
|
||||
updatedVersion: string;
|
||||
|
||||
constructor() {
|
||||
|
@ -1,4 +1,5 @@
|
||||
export * from './dees-button';
|
||||
export * from './dees-chips';
|
||||
export * from './dees-form';
|
||||
export * from './dees-form-submit';
|
||||
export * from './dees-icon';
|
||||
|
Reference in New Issue
Block a user