@design.estate/dees-catalog 1.0.255 → 1.0.257
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 +235 -221
- package/dist_bundle/bundle.js.map +3 -3
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/dees-icon.d.ts +1 -0
- package/dist_ts_web/elements/dees-icon.js +3 -2
- package/dist_ts_web/elements/dees-table.d.ts +4 -0
- package/dist_ts_web/elements/dees-table.js +62 -22
- package/dist_watch/bundle.js +65 -21
- package/dist_watch/bundle.js.map +2 -2
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-icon.ts +2 -0
- package/ts_web/elements/dees-table.ts +71 -29
package/package.json
CHANGED
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
faFileInvoiceDollar as faFileInvoiceDollarSolid,
|
|
53
53
|
faGear as faGearSolid,
|
|
54
54
|
faGrip as faGripSolid,
|
|
55
|
+
faMagnifyingGlass as faMagnifyingGlassSolid,
|
|
55
56
|
faMessage as faMessageSolid,
|
|
56
57
|
faMoneyCheckDollar as faMoneyCheckDollarSolid,
|
|
57
58
|
faMugHot as faMugHotSolid,
|
|
@@ -97,6 +98,7 @@ export const faIcons = {
|
|
|
97
98
|
fileInvoiceDoller: faFileInvoiceDollarSolid,
|
|
98
99
|
gear: faGearSolid,
|
|
99
100
|
grip: faGripSolid,
|
|
101
|
+
magnifyingGlass: faMagnifyingGlassSolid,
|
|
100
102
|
message: faMessageRegular,
|
|
101
103
|
messageSolid: faMessageSolid,
|
|
102
104
|
moneyCheckDollar: faMoneyCheckDollarSolid,
|
|
@@ -117,12 +117,21 @@ export class DeesTable<T> extends DeesElement {
|
|
|
117
117
|
public changeSubject = new domtools.plugins.smartrx.rxjs.Subject<DeesTable<T>>();
|
|
118
118
|
// end dees-form compatibility -----------------------------------------
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* What does a row of data represent?
|
|
122
|
+
*/
|
|
120
123
|
@property({
|
|
121
124
|
type: String,
|
|
122
125
|
reflect: true,
|
|
123
126
|
})
|
|
124
127
|
public dataName: string;
|
|
125
128
|
|
|
129
|
+
|
|
130
|
+
@property({
|
|
131
|
+
type: Boolean,
|
|
132
|
+
})
|
|
133
|
+
searchable: boolean = true;
|
|
134
|
+
|
|
126
135
|
@property({
|
|
127
136
|
type: Array,
|
|
128
137
|
})
|
|
@@ -203,11 +212,16 @@ export class DeesTable<T> extends DeesElement {
|
|
|
203
212
|
}
|
|
204
213
|
|
|
205
214
|
.headerActions {
|
|
215
|
+
user-select: none;
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: row;
|
|
206
218
|
margin-left: auto;
|
|
207
219
|
}
|
|
208
220
|
.headerAction {
|
|
209
221
|
display: flex;
|
|
222
|
+
flex-direction: row;
|
|
210
223
|
color: ${cssManager.bdTheme('#333', '#ccc')};
|
|
224
|
+
margin-left: 16px;
|
|
211
225
|
}
|
|
212
226
|
|
|
213
227
|
.headerAction:hover {
|
|
@@ -223,9 +237,17 @@ export class DeesTable<T> extends DeesElement {
|
|
|
223
237
|
display: grid;
|
|
224
238
|
grid-gap: 16px;
|
|
225
239
|
grid-template-columns: 1fr 200px;
|
|
226
|
-
margin:
|
|
240
|
+
margin-top: 16px;
|
|
227
241
|
padding: 0px 16px;
|
|
228
|
-
border-
|
|
242
|
+
border-top: 1px solid ${cssManager.bdTheme('#fff', '#ffffff20')};
|
|
243
|
+
border-radius: 8px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.searchGrid.hidden {
|
|
247
|
+
height: 0px;
|
|
248
|
+
opacity: 0;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
margin-top: 0px;
|
|
229
251
|
}
|
|
230
252
|
|
|
231
253
|
table,
|
|
@@ -315,10 +337,12 @@ export class DeesTable<T> extends DeesElement {
|
|
|
315
337
|
font-weight: inherit;
|
|
316
338
|
padding: 0px 6px;
|
|
317
339
|
}
|
|
318
|
-
.
|
|
340
|
+
.actionsContainer {
|
|
341
|
+
display: flex;
|
|
342
|
+
flex-direction: row;
|
|
319
343
|
height: 24px;
|
|
320
|
-
display: inline-block;
|
|
321
344
|
transform: translateY(-4px);
|
|
345
|
+
margin-left: -6px;
|
|
322
346
|
}
|
|
323
347
|
.action {
|
|
324
348
|
position: relative;
|
|
@@ -329,11 +353,6 @@ export class DeesTable<T> extends DeesElement {
|
|
|
329
353
|
border-radius: 8px;
|
|
330
354
|
}
|
|
331
355
|
|
|
332
|
-
.actionContainer:first-child {
|
|
333
|
-
margin-left: -6px;
|
|
334
|
-
width: min-content;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
356
|
.action:hover {
|
|
338
357
|
background: ${cssManager.bdTheme(colors.bright.blue, colors.dark.blue)};
|
|
339
358
|
}
|
|
@@ -422,7 +441,7 @@ export class DeesTable<T> extends DeesElement {
|
|
|
422
441
|
</div>
|
|
423
442
|
</div>
|
|
424
443
|
<div class="headingSeparation"></div>
|
|
425
|
-
<div class="searchGrid">
|
|
444
|
+
<div class="searchGrid hidden">
|
|
426
445
|
<dees-input-text
|
|
427
446
|
.label=${'lucene syntax search'}
|
|
428
447
|
.description=${`
|
|
@@ -574,24 +593,28 @@ export class DeesTable<T> extends DeesElement {
|
|
|
574
593
|
return html`
|
|
575
594
|
<td>
|
|
576
595
|
<div class="innerCellContainer">
|
|
577
|
-
|
|
578
|
-
(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
596
|
+
<div class="actionsContainer">
|
|
597
|
+
${this.getActionsForType('inRow').map(
|
|
598
|
+
(actionArg) => html`
|
|
599
|
+
<div
|
|
600
|
+
class="action"
|
|
601
|
+
@click=${() =>
|
|
602
|
+
actionArg.actionFunc({
|
|
603
|
+
item: itemArg,
|
|
604
|
+
table: this,
|
|
605
|
+
})}
|
|
606
|
+
>
|
|
607
|
+
${actionArg.iconName
|
|
608
|
+
? html`
|
|
609
|
+
<dees-icon
|
|
610
|
+
.iconFA=${actionArg.iconName}
|
|
611
|
+
></dees-icon>
|
|
612
|
+
`
|
|
613
|
+
: actionArg.name}
|
|
614
|
+
</div>
|
|
615
|
+
`
|
|
616
|
+
)}
|
|
617
|
+
</div>
|
|
595
618
|
</div>
|
|
596
619
|
</td>
|
|
597
620
|
`;
|
|
@@ -640,11 +663,30 @@ export class DeesTable<T> extends DeesElement {
|
|
|
640
663
|
`;
|
|
641
664
|
}
|
|
642
665
|
|
|
643
|
-
public async firstUpdated() {
|
|
666
|
+
public async firstUpdated() {
|
|
667
|
+
|
|
668
|
+
}
|
|
644
669
|
|
|
645
670
|
public async updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void> {
|
|
646
671
|
super.updated(changedProperties);
|
|
647
672
|
this.determineColumnWidths();
|
|
673
|
+
if (this.searchable) {
|
|
674
|
+
const existing = this.dataActions.find((actionArg) => actionArg.type.includes('header') && actionArg.name === 'Search');
|
|
675
|
+
if (!existing) {
|
|
676
|
+
this.dataActions.unshift({
|
|
677
|
+
name: 'Search',
|
|
678
|
+
iconName: 'magnifyingGlass',
|
|
679
|
+
type: ['header'],
|
|
680
|
+
actionFunc: async () => {
|
|
681
|
+
console.log('open search');
|
|
682
|
+
const searchGrid = this.shadowRoot.querySelector('.searchGrid');
|
|
683
|
+
searchGrid.classList.toggle('hidden');
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
console.log(this.dataActions);
|
|
687
|
+
this.requestUpdate();
|
|
688
|
+
};
|
|
689
|
+
}
|
|
648
690
|
}
|
|
649
691
|
|
|
650
692
|
public async determineColumnWidths() {
|