@eox/itemfilter 1.10.0 → 1.10.1

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.
@@ -861,16 +861,13 @@ tc-range-slider {
861
861
  margin-top: 4px;
862
862
  padding: 8px;
863
863
  }
864
- .inline-container {
865
- position: relative;
866
- align-items: center;
867
- }
868
864
  .inline-container-wrapper {
869
865
  width: 100%;
870
866
  position: relative;
871
867
  }
872
868
  .inline-container {
873
869
  position: relative;
870
+ align-items: center;
874
871
  border: 1px solid var(--border-color);
875
872
  border-radius: 4px;
876
873
  flex: 1;
@@ -880,6 +877,7 @@ tc-range-slider {
880
877
  display: flex;
881
878
  inline-size: 100%;
882
879
  block-size: 100%;
880
+ overflow-x: auto;
883
881
  }
884
882
  [popover] {
885
883
  position: fixed;
@@ -887,7 +885,6 @@ tc-range-slider {
887
885
  left: 0;
888
886
  margin: 0;
889
887
  padding: 0;
890
- background-color: var(--background-color);
891
888
  border: none;
892
889
  }
893
890
  .input-container {
@@ -921,13 +918,21 @@ button.icon {
921
918
  width: unset;
922
919
  }
923
920
  -container-results::-webkit-scrollbar,
924
- .inline-container::-webkit-scrollbar {
925
- height: 2px;
921
+ .inline-container::-webkit-scrollbar,
922
+ .inline-content::-webkit-scrollbar {
923
+ inline-size: 0.4rem;
924
+ block-size: 0.4rem;
926
925
  }
927
926
  -container-results::-webkit-scrollbar-thumb,
928
- .inline-container::-webkit-scrollbar-thumb {
927
+ .inline-container::-webkit-scrollbar-thumb,
928
+ .inline-content::-webkit-scrollbar-thumb {
929
929
  background: lightgrey;
930
- border-radius: 2px;
930
+ border-radius: 1rem;
931
+ cursor: default;
932
+ }
933
+ .inline-container:is(:hover,:focus)::-webkit-scrollbar-thumb,
934
+ .inline-content:is(:hover,:focus)::-webkit-scrollbar-thumb {
935
+ background: var(--outline);
931
936
  }
932
937
  .hidden {
933
938
  height: 0;
@@ -1059,6 +1064,12 @@ mark.highlight {
1059
1064
  flex: 0;
1060
1065
  align-items: center;
1061
1066
  }
1067
+ .chip {
1068
+ white-space: nowrap;
1069
+ }
1070
+ .input-container.field {
1071
+ min-width: 10rem;
1072
+ }
1062
1073
  .input-container.dirty-filter-input {
1063
1074
  margin-left: 25px;
1064
1075
  }
@@ -4226,9 +4237,12 @@ class Wc extends tt {
4226
4237
  />
4227
4238
  </div>
4228
4239
  </div>
4229
- <div popover="manual">
4240
+ <div
4241
+ popover="manual"
4242
+ class="square surface-container-lowest small-elevate"
4243
+ >
4230
4244
  <div
4231
- class="inline-content square border"
4245
+ class="inline-content"
4232
4246
  slot="content"
4233
4247
  @keydown="${fe(this, ze, Jn)}"
4234
4248
  @click="${fe(this, ze, Qn)}"
@@ -6248,6 +6262,14 @@ class Ad extends tt {
6248
6262
  controller: { attribute: !1, type: Object }
6249
6263
  };
6250
6264
  }
6265
+ /**
6266
+ * Overrides the default createRenderRoot method to render in the light DOM.
6267
+ *
6268
+ * @returns {this} - The current instance to render in the light DOM.
6269
+ */
6270
+ createRenderRoot() {
6271
+ return this;
6272
+ }
6251
6273
  /**
6252
6274
  * Lifecycle method called when the element is connected to the DOM.
6253
6275
  * Adds a keyboard event listener.
@@ -6299,7 +6321,7 @@ class Ad extends tt {
6299
6321
  i.stopPropagation(), this.controller.remove(i), this.requestUpdate();
6300
6322
  }}
6301
6323
  ></span>
6302
- </span>
6324
+ </span>
6303
6325
  </span>
6304
6326
  `
6305
6327
  )}
@@ -311,16 +311,13 @@ tc-range-slider {
311
311
  margin-top: 4px;
312
312
  padding: 8px;
313
313
  }
314
- .inline-container {
315
- position: relative;
316
- align-items: center;
317
- }
318
314
  .inline-container-wrapper {
319
315
  width: 100%;
320
316
  position: relative;
321
317
  }
322
318
  .inline-container {
323
319
  position: relative;
320
+ align-items: center;
324
321
  border: 1px solid var(--border-color);
325
322
  border-radius: 4px;
326
323
  flex: 1;
@@ -330,6 +327,7 @@ tc-range-slider {
330
327
  display: flex;
331
328
  inline-size: 100%;
332
329
  block-size: 100%;
330
+ overflow-x: auto;
333
331
  }
334
332
  [popover] {
335
333
  position: fixed;
@@ -337,7 +335,6 @@ tc-range-slider {
337
335
  left: 0;
338
336
  margin: 0;
339
337
  padding: 0;
340
- background-color: var(--background-color);
341
338
  border: none;
342
339
  }
343
340
  .input-container {
@@ -371,13 +368,21 @@ button.icon {
371
368
  width: unset;
372
369
  }
373
370
  -container-results::-webkit-scrollbar,
374
- .inline-container::-webkit-scrollbar {
375
- height: 2px;
371
+ .inline-container::-webkit-scrollbar,
372
+ .inline-content::-webkit-scrollbar {
373
+ inline-size: 0.4rem;
374
+ block-size: 0.4rem;
376
375
  }
377
376
  -container-results::-webkit-scrollbar-thumb,
378
- .inline-container::-webkit-scrollbar-thumb {
377
+ .inline-container::-webkit-scrollbar-thumb,
378
+ .inline-content::-webkit-scrollbar-thumb {
379
379
  background: lightgrey;
380
- border-radius: 2px;
380
+ border-radius: 1rem;
381
+ cursor: default;
382
+ }
383
+ .inline-container:is(:hover,:focus)::-webkit-scrollbar-thumb,
384
+ .inline-content:is(:hover,:focus)::-webkit-scrollbar-thumb {
385
+ background: var(--outline);
381
386
  }
382
387
  .hidden {
383
388
  height: 0;
@@ -509,6 +514,12 @@ mark.highlight {
509
514
  flex: 0;
510
515
  align-items: center;
511
516
  }
517
+ .chip {
518
+ white-space: nowrap;
519
+ }
520
+ .input-container.field {
521
+ min-width: 10rem;
522
+ }
512
523
  .input-container.dirty-filter-input {
513
524
  margin-left: 25px;
514
525
  }
@@ -615,9 +626,12 @@ input {
615
626
  />
616
627
  </div>
617
628
  </div>
618
- <div popover="manual">
629
+ <div
630
+ popover="manual"
631
+ class="square surface-container-lowest small-elevate"
632
+ >
619
633
  <div
620
- class="inline-content square border"
634
+ class="inline-content"
621
635
  slot="content"
622
636
  @keydown="${fe(this,ze,po)}"
623
637
  @click="${fe(this,ze,ho)}"
@@ -876,7 +890,7 @@ input {
876
890
  @filter="${i=>{this.filterObject.state.geometry=i.detail.geometry,this.filterObject.dirty=!0,this.filterObject.stringifiedState="Polygon",this.dispatchEvent(new CustomEvent("filter"))}}"
877
891
  ></eox-itemfilter-spatial>
878
892
  </div>
879
- `})}}en=new WeakSet,ss=function(r){rd(r,this)},customElements.define("eox-itemfilter-spatial",md);class gd extends tt{constructor(){super();nt(this,tn);this.geometry=null,this.eoxMap=null}static get properties(){return{geometry:{type:Object},eoxMap:{type:Object}}}firstUpdated(){fe(this,tn,ls).call(this)}reset(){td(this)}render(){return V`<div id="eox-map"></div>`}}tn=new WeakSet,ls=function(){La(this)},customElements.define("eox-itemfilter-spatial-filter",gd);function bd(t,e){e.renderRoot.querySelectorAll(".chip").forEach(r=>{r.classList.remove("highlighted")}),t.target instanceof HTMLElement&&t.target.classList.add("highlighted"),e.requestUpdate()}function vd(t,e){const{code:r,target:i}=t;i instanceof HTMLElement&&i.id!=="eox-itemfilter-input-search"||e.parentElement.classList.contains("hidden")&&["ArrowLeft","ArrowRight","Backspace"].includes(r)||(r==="Space"&&t.preventDefault(),["Escape","Space","Enter"].includes(r)||t.stopPropagation(),["ArrowLeft","ArrowRight","Escape","Backspace"].includes(r)&&yd(r,t.target.value??"",e))}function yd(t,e,r){const i=r.renderRoot.querySelector(".chip.highlighted");if((t==="Escape"||e)&&i&&i.classList.remove("highlighted"),t==="Backspace"&&!e){if(r.items.length){i&&(i.querySelector(".chip-item-close").click(),r.items.splice(Array.from(r.renderRoot.querySelectorAll(".chip")).indexOf(i),1));const n=r.renderRoot.querySelectorAll(".chip")[r.renderRoot.querySelectorAll(".chip").length-1];n.classList.contains("highlighted")||n.classList.add("highlighted"),r.requestUpdate()}r._dispatchEvent()}if((t==="ArrowLeft"||t==="ArrowRight")&&!e){if(r.renderRoot.querySelectorAll(".chip").length<1)return;let n=0;const o=r.renderRoot.querySelector(".chip.highlighted");o&&(n=Array.from(r.renderRoot.querySelectorAll(".chip")).indexOf(o),o.classList.remove("highlighted")),n=n+(t==="ArrowLeft"?-1:1),t==="ArrowLeft"&&n<0&&(n=r.renderRoot.querySelectorAll(".chip").length-1),t==="ArrowRight"&&n>r.renderRoot.querySelectorAll(".chip").length-1&&(n=0),Array.from(r.renderRoot.querySelectorAll(".chip"))[n].classList.add("highlighted")}}class xd extends tt{constructor(){super();nt(this,cr);this.items={},this.controller={}}static get properties(){return{items:{attribute:!1,type:Object},controller:{attribute:!1,type:Object}}}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",fe(this,cr,bo).bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",fe(this,cr,bo).bind(this))}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.items}))}render(){return V`
893
+ `})}}en=new WeakSet,ss=function(r){rd(r,this)},customElements.define("eox-itemfilter-spatial",md);class gd extends tt{constructor(){super();nt(this,tn);this.geometry=null,this.eoxMap=null}static get properties(){return{geometry:{type:Object},eoxMap:{type:Object}}}firstUpdated(){fe(this,tn,ls).call(this)}reset(){td(this)}render(){return V`<div id="eox-map"></div>`}}tn=new WeakSet,ls=function(){La(this)},customElements.define("eox-itemfilter-spatial-filter",gd);function bd(t,e){e.renderRoot.querySelectorAll(".chip").forEach(r=>{r.classList.remove("highlighted")}),t.target instanceof HTMLElement&&t.target.classList.add("highlighted"),e.requestUpdate()}function vd(t,e){const{code:r,target:i}=t;i instanceof HTMLElement&&i.id!=="eox-itemfilter-input-search"||e.parentElement.classList.contains("hidden")&&["ArrowLeft","ArrowRight","Backspace"].includes(r)||(r==="Space"&&t.preventDefault(),["Escape","Space","Enter"].includes(r)||t.stopPropagation(),["ArrowLeft","ArrowRight","Escape","Backspace"].includes(r)&&yd(r,t.target.value??"",e))}function yd(t,e,r){const i=r.renderRoot.querySelector(".chip.highlighted");if((t==="Escape"||e)&&i&&i.classList.remove("highlighted"),t==="Backspace"&&!e){if(r.items.length){i&&(i.querySelector(".chip-item-close").click(),r.items.splice(Array.from(r.renderRoot.querySelectorAll(".chip")).indexOf(i),1));const n=r.renderRoot.querySelectorAll(".chip")[r.renderRoot.querySelectorAll(".chip").length-1];n.classList.contains("highlighted")||n.classList.add("highlighted"),r.requestUpdate()}r._dispatchEvent()}if((t==="ArrowLeft"||t==="ArrowRight")&&!e){if(r.renderRoot.querySelectorAll(".chip").length<1)return;let n=0;const o=r.renderRoot.querySelector(".chip.highlighted");o&&(n=Array.from(r.renderRoot.querySelectorAll(".chip")).indexOf(o),o.classList.remove("highlighted")),n=n+(t==="ArrowLeft"?-1:1),t==="ArrowLeft"&&n<0&&(n=r.renderRoot.querySelectorAll(".chip").length-1),t==="ArrowRight"&&n>r.renderRoot.querySelectorAll(".chip").length-1&&(n=0),Array.from(r.renderRoot.querySelectorAll(".chip"))[n].classList.add("highlighted")}}class xd extends tt{constructor(){super();nt(this,cr);this.items={},this.controller={}}static get properties(){return{items:{attribute:!1,type:Object},controller:{attribute:!1,type:Object}}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.getRootNode().addEventListener("keydown",fe(this,cr,bo).bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.getRootNode().removeEventListener("keydown",fe(this,cr,bo).bind(this))}_dispatchEvent(){this.dispatchEvent(new CustomEvent("items-selected",{detail:this.items}))}render(){return V`
880
894
  <span class="chip-container">
881
895
  ${Di(this.items,r=>V`
882
896
  <span class="chip tiny-margin" @click=${fe(this,cr,cs).bind(this)}>
@@ -886,7 +900,7 @@ input {
886
900
  data-close=${r.key}
887
901
  @click=${i=>{i.stopPropagation(),this.controller.remove(i),this.requestUpdate()}}
888
902
  ></span>
889
- </span>
903
+ </span>
890
904
  </span>
891
905
  `)}
892
906
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@types/geojson": "^7946.0.14",
@@ -38,6 +38,15 @@ export class EOxItemFilterChipsV2 extends LitElement {
38
38
  this.controller = {};
39
39
  }
40
40
 
41
+ /**
42
+ * Overrides the default createRenderRoot method to render in the light DOM.
43
+ *
44
+ * @returns {this} - The current instance to render in the light DOM.
45
+ */
46
+ createRenderRoot() {
47
+ return this;
48
+ }
49
+
41
50
  /**
42
51
  * Lifecycle method called when the element is connected to the DOM.
43
52
  * Adds a keyboard event listener.
@@ -115,7 +124,7 @@ export class EOxItemFilterChipsV2 extends LitElement {
115
124
  this.requestUpdate();
116
125
  }}
117
126
  ></span>
118
- </span>
127
+ </span>
119
128
  </span>
120
129
  `,
121
130
  )}
@@ -282,9 +282,12 @@ export class EOxItemFilterContainer extends LitElement {
282
282
  />
283
283
  </div>
284
284
  </div>
285
- <div popover="manual">
285
+ <div
286
+ popover="manual"
287
+ class="square surface-container-lowest small-elevate"
288
+ >
286
289
  <div
287
- class="inline-content square border"
290
+ class="inline-content"
288
291
  slot="content"
289
292
  @keydown="${this.#handleKeyDown}"
290
293
  @click="${this.#handleFormClick}"
package/src/style.eox.js CHANGED
@@ -236,16 +236,13 @@ tc-range-slider {
236
236
  margin-top: 4px;
237
237
  padding: 8px;
238
238
  }
239
- .inline-container {
240
- position: relative;
241
- align-items: center;
242
- }
243
239
  .inline-container-wrapper {
244
240
  width: 100%;
245
241
  position: relative;
246
242
  }
247
243
  .inline-container {
248
244
  position: relative;
245
+ align-items: center;
249
246
  border: 1px solid var(--border-color);
250
247
  border-radius: 4px;
251
248
  flex: 1;
@@ -255,6 +252,7 @@ tc-range-slider {
255
252
  display: flex;
256
253
  inline-size: 100%;
257
254
  block-size: 100%;
255
+ overflow-x: auto;
258
256
  }
259
257
  [popover] {
260
258
  position: fixed;
@@ -262,7 +260,6 @@ tc-range-slider {
262
260
  left: 0;
263
261
  margin: 0;
264
262
  padding: 0;
265
- background-color: var(--background-color);
266
263
  border: none;
267
264
  }
268
265
  .input-container {
@@ -296,13 +293,21 @@ button.icon {
296
293
  width: unset;
297
294
  }
298
295
  -container-results::-webkit-scrollbar,
299
- .inline-container::-webkit-scrollbar {
300
- height: 2px;
296
+ .inline-container::-webkit-scrollbar,
297
+ .inline-content::-webkit-scrollbar {
298
+ inline-size: 0.4rem;
299
+ block-size: 0.4rem;
301
300
  }
302
301
  -container-results::-webkit-scrollbar-thumb,
303
- .inline-container::-webkit-scrollbar-thumb {
302
+ .inline-container::-webkit-scrollbar-thumb,
303
+ .inline-content::-webkit-scrollbar-thumb {
304
304
  background: lightgrey;
305
- border-radius: 2px;
305
+ border-radius: 1rem;
306
+ cursor: default;
307
+ }
308
+ .inline-container:is(:hover,:focus)::-webkit-scrollbar-thumb,
309
+ .inline-content:is(:hover,:focus)::-webkit-scrollbar-thumb {
310
+ background: var(--outline);
306
311
  }
307
312
  .hidden {
308
313
  height: 0;
@@ -434,6 +439,12 @@ mark.highlight {
434
439
  flex: 0;
435
440
  align-items: center;
436
441
  }
442
+ .chip {
443
+ white-space: nowrap;
444
+ }
445
+ .input-container.field {
446
+ min-width: 10rem;
447
+ }
437
448
  .input-container.dirty-filter-input {
438
449
  margin-left: 25px;
439
450
  }
@@ -27,6 +27,12 @@ export class EOxItemFilterChipsV2 extends LitElement {
27
27
  * @type Object
28
28
  */
29
29
  controller: any;
30
+ /**
31
+ * Overrides the default createRenderRoot method to render in the light DOM.
32
+ *
33
+ * @returns {this} - The current instance to render in the light DOM.
34
+ */
35
+ createRenderRoot(): this;
30
36
  /**
31
37
  * Dispatches a custom event with the selected items.
32
38
  *
@@ -1 +1 @@
1
- {"version":3,"file":"chips.d.ts","sourceRoot":"","sources":["../../src/components/chips.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;MAKC;IAKC;;OAEG;IACH,WAAe;IAEf;;OAEG;IACH,gBAAoB;IA2BtB;;;;OAIG;IAEH,uBAMC;IAqBD;;OAEG;IACH,+CAuBC;;CACF;2BA5HgC,KAAK"}
1
+ {"version":3,"file":"chips.d.ts","sourceRoot":"","sources":["../../src/components/chips.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;MAKC;IAKC;;OAEG;IACH,WAAe;IAEf;;OAEG;IACH,gBAAoB;IAGtB;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IA0BD;;;;OAIG;IAEH,uBAMC;IAqBD;;OAEG;IACH,+CAuBC;;CACF;2BArIgC,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"itemfilter-container.d.ts","sourceRoot":"","sources":["../../src/components/itemfilter-container.js"],"names":[],"mappings":"AAeA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;;;;;;;;MAOC;IAKC;;OAEG;IACH,sBAA0B;IAE1B;;OAEG;IACH,kBAAqB;IAErB;;OAEG;IACH,oBAAuB;IAEvB;;OAEG;IACH,aAAiB;IAEjB;;OAEG;IACH,qBAFU,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,GAAC,UAAU,KAAK,GAAG,CAEE;IAE9D;;OAEG;IACH,gBAFU,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,KAAK,GAAG,CAEA;IAGtD;;OAEG;IACH,gCAIC;IAED,4BAEC;IA6CD;;;;;;OAMG;IACH,wBAAoB;IA+DpB;;;OAGG;IACH,qBAEC;IAED,uCAKC;IAED;;OAEG;IACH,+CAqFC;;CACF;2BA5SgC,KAAK"}
1
+ {"version":3,"file":"itemfilter-container.d.ts","sourceRoot":"","sources":["../../src/components/itemfilter-container.js"],"names":[],"mappings":"AAeA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;;;;;;;;MAOC;IAKC;;OAEG;IACH,sBAA0B;IAE1B;;OAEG;IACH,kBAAqB;IAErB;;OAEG;IACH,oBAAuB;IAEvB;;OAEG;IACH,aAAiB;IAEjB;;OAEG;IACH,qBAFU,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,GAAC,UAAU,KAAK,GAAG,CAEE;IAE9D;;OAEG;IACH,gBAFU,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,KAAK,GAAG,CAEA;IAGtD;;OAEG;IACH,gCAIC;IAED,4BAEC;IA6CD;;;;;;OAMG;IACH,wBAAoB;IA+DpB;;;OAGG;IACH,qBAEC;IAED,uCAKC;IAED;;OAEG;IACH,+CAwFC;;CACF;2BA/SgC,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAKA,8BA+bE"}
1
+ {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAKA,8BA0cE"}