@design.estate/dees-catalog 1.0.229 → 1.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +169 -145
- package/dist_bundle/bundle.js.map +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/dees-chips.d.ts +2 -0
- package/dist_ts_web/elements/dees-chips.demo.js +2 -1
- package/dist_ts_web/elements/dees-chips.js +58 -16
- package/dist_ts_web/elements/dees-input-dropdown.d.ts +2 -1
- package/dist_ts_web/elements/dees-input-dropdown.demo.d.ts +1 -0
- package/dist_ts_web/elements/dees-input-dropdown.demo.js +11 -0
- package/dist_ts_web/elements/dees-input-dropdown.js +9 -19
- package/dist_ts_web/elements/dees-modal.js +2 -1
- package/dist_ts_web/elements/dees-windowlayer.js +11 -3
- package/dist_watch/bundle.js +3642 -2752
- package/dist_watch/bundle.js.map +4 -4
- package/package.json +12 -12
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-chips.demo.ts +1 -0
- package/ts_web/elements/dees-chips.ts +63 -18
- package/ts_web/elements/dees-input-dropdown.demo.ts +11 -0
- package/ts_web/elements/dees-input-dropdown.ts +10 -18
- package/ts_web/elements/dees-modal.ts +1 -0
- package/ts_web/elements/dees-windowlayer.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-catalog",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.231",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "website for lossless.com",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
|
@@ -16,28 +16,28 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@design.estate/dees-domtools": "^2.0.55",
|
|
19
|
-
"@design.estate/dees-element": "^2.0.
|
|
19
|
+
"@design.estate/dees-element": "^2.0.33",
|
|
20
20
|
"@design.estate/dees-wcctools": "^1.0.81",
|
|
21
|
-
"@fortawesome/fontawesome-svg-core": "^6.
|
|
22
|
-
"@fortawesome/free-brands-svg-icons": "^6.
|
|
23
|
-
"@fortawesome/free-regular-svg-icons": "^6.
|
|
24
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
21
|
+
"@fortawesome/fontawesome-svg-core": "^6.5.0",
|
|
22
|
+
"@fortawesome/free-brands-svg-icons": "^6.5.0",
|
|
23
|
+
"@fortawesome/free-regular-svg-icons": "^6.5.0",
|
|
24
|
+
"@fortawesome/free-solid-svg-icons": "^6.5.0",
|
|
25
25
|
"@push.rocks/smarti18n": "^1.0.4",
|
|
26
26
|
"@push.rocks/smartpromise": "^4.0.3",
|
|
27
27
|
"@push.rocks/smartstring": "^4.0.9",
|
|
28
28
|
"@tsclass/tsclass": "^4.0.46",
|
|
29
29
|
"highlight.js": "11.9.0",
|
|
30
|
-
"ibantools": "^4.3.
|
|
30
|
+
"ibantools": "^4.3.6",
|
|
31
31
|
"pdfjs-dist": "^3.11.174"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
34
|
+
"@git.zone/tsbuild": "^2.1.66",
|
|
35
|
+
"@git.zone/tsbundle": "^2.0.8",
|
|
36
|
+
"@git.zone/tstest": "^1.0.77",
|
|
37
|
+
"@git.zone/tswatch": "^2.0.7",
|
|
38
38
|
"@push.rocks/projectinfo": "^5.0.2",
|
|
39
39
|
"@push.rocks/tapbundle": "^5.0.15",
|
|
40
|
-
"@types/node": "^20.
|
|
40
|
+
"@types/node": "^20.10.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"ts/**/*",
|
|
@@ -19,7 +19,7 @@ declare global {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
type Tag = { key: string
|
|
22
|
+
type Tag = { key: string; value: string };
|
|
23
23
|
|
|
24
24
|
@customElement('dees-chips')
|
|
25
25
|
export class DeesChips extends DeesElement {
|
|
@@ -29,7 +29,12 @@ export class DeesChips extends DeesElement {
|
|
|
29
29
|
public selectionMode: 'none' | 'single' | 'multiple' = 'single';
|
|
30
30
|
|
|
31
31
|
@property({
|
|
32
|
-
type:
|
|
32
|
+
type: Boolean,
|
|
33
|
+
})
|
|
34
|
+
public chipsAreRemovable: boolean = false;
|
|
35
|
+
|
|
36
|
+
@property({
|
|
37
|
+
type: Array,
|
|
33
38
|
})
|
|
34
39
|
public selectableChips: Tag[] = [];
|
|
35
40
|
|
|
@@ -37,10 +42,9 @@ export class DeesChips extends DeesElement {
|
|
|
37
42
|
public selectedChip: Tag = null;
|
|
38
43
|
|
|
39
44
|
@property({
|
|
40
|
-
type: Array
|
|
45
|
+
type: Array,
|
|
41
46
|
})
|
|
42
47
|
public selectedChips: Tag[] = [];
|
|
43
|
-
|
|
44
48
|
|
|
45
49
|
constructor() {
|
|
46
50
|
super();
|
|
@@ -49,7 +53,6 @@ export class DeesChips extends DeesElement {
|
|
|
49
53
|
public static styles = [
|
|
50
54
|
cssManager.defaultStyles,
|
|
51
55
|
css`
|
|
52
|
-
|
|
53
56
|
:host {
|
|
54
57
|
display: block;
|
|
55
58
|
box-sizing: border-box;
|
|
@@ -73,20 +76,20 @@ export class DeesChips extends DeesElement {
|
|
|
73
76
|
margin-bottom: 4px;
|
|
74
77
|
position: relative;
|
|
75
78
|
overflow: hidden;
|
|
76
|
-
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
|
|
79
|
+
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
.chip:hover {
|
|
80
83
|
background: #666666;
|
|
81
|
-
cursor: pointer;
|
|
84
|
+
cursor: pointer;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
.chip.selected {
|
|
85
|
-
background: #
|
|
88
|
+
background: #00a3ff;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
.chipKey {
|
|
89
|
-
background: rgba(0,0,0,0.3);
|
|
92
|
+
background: rgba(0, 0, 0, 0.3);
|
|
90
93
|
height: 100%;
|
|
91
94
|
display: inline-block;
|
|
92
95
|
margin-left: -8px;
|
|
@@ -94,18 +97,44 @@ export class DeesChips extends DeesElement {
|
|
|
94
97
|
padding-right: 8px;
|
|
95
98
|
margin-right: 8px;
|
|
96
99
|
}
|
|
97
|
-
|
|
100
|
+
|
|
101
|
+
dees-icon {
|
|
102
|
+
padding: 0px 6px 0px 4px;
|
|
103
|
+
margin-left: 4px;
|
|
104
|
+
margin-right: -8px;
|
|
105
|
+
background: rgba(0, 0, 0, 0.3);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
dees-icon:hover {
|
|
109
|
+
background: #e4002b;
|
|
110
|
+
}
|
|
98
111
|
`,
|
|
99
112
|
];
|
|
100
113
|
|
|
101
114
|
public render(): TemplateResult {
|
|
102
115
|
return html`
|
|
103
116
|
<div class="mainbox">
|
|
104
|
-
${this.selectableChips.map(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
${this.selectableChips.map(
|
|
118
|
+
(chip) => html`
|
|
119
|
+
<div
|
|
120
|
+
@click=${() => this.selectChip(chip)}
|
|
121
|
+
class="chip ${this.isSelected(chip) ? 'selected' : ''}"
|
|
122
|
+
>
|
|
123
|
+
${chip.key ? html`<div class="chipKey">${chip.key}</div>` : html``} ${chip.value}
|
|
124
|
+
${this.chipsAreRemovable
|
|
125
|
+
? html`
|
|
126
|
+
<dees-icon
|
|
127
|
+
@click=${(event: Event) => {
|
|
128
|
+
event.stopPropagation(); // prevent the selectChip event from being triggered
|
|
129
|
+
this.removeChip(chip);
|
|
130
|
+
}}
|
|
131
|
+
.iconFA=${'xmark'}
|
|
132
|
+
></dees-icon>
|
|
133
|
+
`
|
|
134
|
+
: html``}
|
|
135
|
+
</div>
|
|
136
|
+
`
|
|
137
|
+
)}
|
|
109
138
|
</div>
|
|
110
139
|
`;
|
|
111
140
|
}
|
|
@@ -121,7 +150,7 @@ export class DeesChips extends DeesElement {
|
|
|
121
150
|
if (this.selectionMode === 'single') {
|
|
122
151
|
return this.selectedChip?.key === chip.key;
|
|
123
152
|
} else {
|
|
124
|
-
return this.selectedChips.some(selected => selected.key === chip.key);
|
|
153
|
+
return this.selectedChips.some((selected) => selected.key === chip.key);
|
|
125
154
|
}
|
|
126
155
|
}
|
|
127
156
|
|
|
@@ -138,9 +167,9 @@ export class DeesChips extends DeesElement {
|
|
|
138
167
|
this.selectedChip = chip;
|
|
139
168
|
this.selectedChips = [chip];
|
|
140
169
|
}
|
|
141
|
-
} else if(this.selectionMode === 'multiple') {
|
|
170
|
+
} else if (this.selectionMode === 'multiple') {
|
|
142
171
|
if (this.isSelected(chip)) {
|
|
143
|
-
this.selectedChips = this.selectedChips.filter(selected => selected.key !== chip.key);
|
|
172
|
+
this.selectedChips = this.selectedChips.filter((selected) => selected.key !== chip.key);
|
|
144
173
|
} else {
|
|
145
174
|
this.selectedChips = [...this.selectedChips, chip];
|
|
146
175
|
}
|
|
@@ -148,4 +177,20 @@ export class DeesChips extends DeesElement {
|
|
|
148
177
|
}
|
|
149
178
|
console.log(this.selectedChips);
|
|
150
179
|
}
|
|
180
|
+
|
|
181
|
+
public removeChip(chipToRemove: Tag): void {
|
|
182
|
+
// Remove the chip from selectableChips
|
|
183
|
+
this.selectableChips = this.selectableChips.filter((chip) => chip.key !== chipToRemove.key);
|
|
184
|
+
|
|
185
|
+
// Remove the chip from selectedChips if present
|
|
186
|
+
this.selectedChips = this.selectedChips.filter((chip) => chip.key !== chipToRemove.key);
|
|
187
|
+
|
|
188
|
+
// If the removed chip was the selectedChip, set selectedChip to null
|
|
189
|
+
if (this.selectedChip && this.selectedChip.key === chipToRemove.key) {
|
|
190
|
+
this.selectedChip = null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Trigger an update to re-render the component
|
|
194
|
+
this.requestUpdate();
|
|
195
|
+
}
|
|
151
196
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { html } from '@design.estate/dees-element';
|
|
2
|
+
|
|
3
|
+
export const demoFunc = () => html`
|
|
4
|
+
<dees-input-dropdown
|
|
5
|
+
.options=${[
|
|
6
|
+
{option: 'option 1', key: 'option1'},
|
|
7
|
+
{option: 'option 2', key: 'option2'},
|
|
8
|
+
{option: 'option 3', key: 'option3'}
|
|
9
|
+
]}
|
|
10
|
+
></dees-input-dropdown>
|
|
11
|
+
`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { customElement, DeesElement, type TemplateResult, property, html, css, cssManager, type CSSResult, } from '@design.estate/dees-element';
|
|
2
2
|
import * as domtools from '@design.estate/dees-domtools';
|
|
3
|
+
import { demoFunc } from './dees-input-dropdown.demo.js';
|
|
3
4
|
|
|
4
5
|
declare global {
|
|
5
6
|
interface HTMLElementTagNameMap {
|
|
@@ -9,15 +10,7 @@ declare global {
|
|
|
9
10
|
|
|
10
11
|
@customElement('dees-input-dropdown')
|
|
11
12
|
export class DeesInputDropdown extends DeesElement {
|
|
12
|
-
public static demo =
|
|
13
|
-
<dees-input-dropdown
|
|
14
|
-
.options=${[
|
|
15
|
-
{option: 'option 1', key: 'option1'},
|
|
16
|
-
{option: 'option 2', key: 'option2'},
|
|
17
|
-
{option: 'option 3', key: 'option3'}
|
|
18
|
-
]}
|
|
19
|
-
></dees-input-dropdown>
|
|
20
|
-
`
|
|
13
|
+
public static demo = demoFunc
|
|
21
14
|
|
|
22
15
|
// INSTANCE
|
|
23
16
|
public changeSubject = new domtools.plugins.smartrx.rxjs.Subject();
|
|
@@ -100,12 +93,11 @@ export class DeesInputDropdown extends DeesElement {
|
|
|
100
93
|
cursor: pointer;
|
|
101
94
|
transition: all 0.2s ease;
|
|
102
95
|
opacity: 0;
|
|
103
|
-
position:
|
|
96
|
+
position: absolute;
|
|
104
97
|
background: ${cssManager.bdTheme('#ffffff', '#222222')};
|
|
105
98
|
max-width: 420px;
|
|
106
99
|
box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
|
|
107
100
|
min-height: 40px;
|
|
108
|
-
margin-top: -40px;
|
|
109
101
|
z-index: 100;
|
|
110
102
|
border-radius: 3px;
|
|
111
103
|
padding: 4px;
|
|
@@ -135,12 +127,8 @@ export class DeesInputDropdown extends DeesElement {
|
|
|
135
127
|
|
|
136
128
|
public render(): TemplateResult {
|
|
137
129
|
return html`
|
|
138
|
-
${domtools.elementBasic.styles}
|
|
139
|
-
<style>
|
|
140
|
-
|
|
141
|
-
</style>
|
|
142
130
|
<div class="maincontainer">
|
|
143
|
-
<div class="selectedBox show" @click="${event => {this.
|
|
131
|
+
<div class="selectedBox show" @click="${event => {this.openSelectionBox();}}">
|
|
144
132
|
${this.selectedOption?.option}
|
|
145
133
|
</div>
|
|
146
134
|
<div class="selectionBox">
|
|
@@ -165,12 +153,16 @@ export class DeesInputDropdown extends DeesElement {
|
|
|
165
153
|
detail: selectedOption,
|
|
166
154
|
bubbles: true
|
|
167
155
|
}));
|
|
168
|
-
this.
|
|
156
|
+
this.openSelectionBox();
|
|
169
157
|
this.changeSubject.next(this);
|
|
170
158
|
}
|
|
171
159
|
|
|
172
|
-
public
|
|
160
|
+
public openSelectionBox() {
|
|
173
161
|
this.shadowRoot.querySelector('.selectedBox').classList.toggle('show');
|
|
174
162
|
this.shadowRoot.querySelector('.selectionBox').classList.toggle('show');
|
|
175
163
|
}
|
|
164
|
+
|
|
165
|
+
public closeSelectionBox() {
|
|
166
|
+
|
|
167
|
+
}
|
|
176
168
|
}
|
|
@@ -66,14 +66,22 @@ export class DeesWindowLayer extends DeesElement {
|
|
|
66
66
|
pointer-events: none;
|
|
67
67
|
z-index: 200;
|
|
68
68
|
}
|
|
69
|
+
.slotContent {
|
|
70
|
+
height: 100vh;
|
|
71
|
+
width: 100vw;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
69
76
|
|
|
70
77
|
.visible {
|
|
71
78
|
background: rgba(0, 0, 0, 0.2);
|
|
72
79
|
backdrop-filter: brightness(0.9) ${this.options.blur ? 'blur(2px)' : ''};
|
|
73
|
-
pointer-events: all;
|
|
74
80
|
}
|
|
75
81
|
</style>
|
|
76
|
-
<div
|
|
82
|
+
<div class="windowOverlay ${this.visible ? 'visible' : null}">
|
|
83
|
+
</div>
|
|
84
|
+
<div @click=${this.dispatchClicked} class="slotContent">
|
|
77
85
|
<slot></slot>
|
|
78
86
|
</div>
|
|
79
87
|
`;
|