@design.estate/dees-catalog 1.0.256 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.256",
3
+ "version": "1.0.257",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.256',
6
+ version: '1.0.257',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -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: 0px -16px;
240
+ margin-top: 16px;
227
241
  padding: 0px 16px;
228
- border-bottom: 1px solid ${cssManager.bdTheme('#fff', '#ffffff20')};
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,
@@ -419,7 +441,7 @@ export class DeesTable<T> extends DeesElement {
419
441
  </div>
420
442
  </div>
421
443
  <div class="headingSeparation"></div>
422
- <div class="searchGrid">
444
+ <div class="searchGrid hidden">
423
445
  <dees-input-text
424
446
  .label=${'lucene syntax search'}
425
447
  .description=${`
@@ -641,11 +663,30 @@ export class DeesTable<T> extends DeesElement {
641
663
  `;
642
664
  }
643
665
 
644
- public async firstUpdated() {}
666
+ public async firstUpdated() {
667
+
668
+ }
645
669
 
646
670
  public async updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void> {
647
671
  super.updated(changedProperties);
648
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
+ }
649
690
  }
650
691
 
651
692
  public async determineColumnWidths() {