@eox/itemfilter 1.4.1 → 1.6.0

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.
Files changed (104) hide show
  1. package/dist/eox-itemfilter.js +1654 -1567
  2. package/dist/eox-itemfilter.umd.cjs +139 -67
  3. package/package.json +16 -3
  4. package/src/components/results.js +7 -3
  5. package/src/enums/config.js +6 -0
  6. package/src/main.js +22 -1
  7. package/src/methods/results/create.js +10 -1
  8. package/src/style.eox.js +65 -2
  9. package/types/components/chips.d.ts +43 -0
  10. package/types/components/chips.d.ts.map +1 -0
  11. package/types/components/expand-container.d.ts +35 -0
  12. package/types/components/expand-container.d.ts.map +1 -0
  13. package/types/components/filters/range.d.ts +51 -0
  14. package/types/components/filters/range.d.ts.map +1 -0
  15. package/types/components/filters/selector.d.ts +135 -0
  16. package/types/components/filters/selector.d.ts.map +1 -0
  17. package/types/components/filters/spatial.d.ts +82 -0
  18. package/types/components/filters/spatial.d.ts.map +1 -0
  19. package/types/components/filters/text.d.ts +54 -0
  20. package/types/components/filters/text.d.ts.map +1 -0
  21. package/types/components/itemfilter-container.d.ts +77 -0
  22. package/types/components/itemfilter-container.d.ts.map +1 -0
  23. package/types/components/results.d.ts +88 -0
  24. package/types/components/results.d.ts.map +1 -0
  25. package/types/enums/config.d.ts +77 -0
  26. package/types/enums/config.d.ts.map +1 -0
  27. package/types/enums/index.d.ts +2 -0
  28. package/types/enums/index.d.ts.map +1 -0
  29. package/types/helpers/chip-items.d.ts +9 -0
  30. package/types/helpers/chip-items.d.ts.map +1 -0
  31. package/types/helpers/filter-client.d.ts +3 -0
  32. package/types/helpers/filter-client.d.ts.map +1 -0
  33. package/types/helpers/filter-external.d.ts +11 -0
  34. package/types/helpers/filter-external.d.ts.map +1 -0
  35. package/types/helpers/get-value.d.ts +9 -0
  36. package/types/helpers/get-value.d.ts.map +1 -0
  37. package/types/helpers/highlighting.d.ts +11 -0
  38. package/types/helpers/highlighting.d.ts.map +1 -0
  39. package/types/helpers/index.d.ts +12 -0
  40. package/types/helpers/index.d.ts.map +1 -0
  41. package/types/helpers/is-filters-dirty.d.ts +8 -0
  42. package/types/helpers/is-filters-dirty.d.ts.map +1 -0
  43. package/types/helpers/map-layers.d.ts +9 -0
  44. package/types/helpers/map-layers.d.ts.map +1 -0
  45. package/types/helpers/reset-filter.d.ts +8 -0
  46. package/types/helpers/reset-filter.d.ts.map +1 -0
  47. package/types/helpers/spatial.d.ts +3 -0
  48. package/types/helpers/spatial.d.ts.map +1 -0
  49. package/types/helpers/tab-index.d.ts +9 -0
  50. package/types/helpers/tab-index.d.ts.map +1 -0
  51. package/types/helpers/toggle-accordion.d.ts +10 -0
  52. package/types/helpers/toggle-accordion.d.ts.map +1 -0
  53. package/types/main.d.ts +290 -0
  54. package/types/main.d.ts.map +1 -0
  55. package/types/methods/chips/handler.d.ts +23 -0
  56. package/types/methods/chips/handler.d.ts.map +1 -0
  57. package/types/methods/chips/index.d.ts +2 -0
  58. package/types/methods/chips/index.d.ts.map +1 -0
  59. package/types/methods/container/handler.d.ts +35 -0
  60. package/types/methods/container/handler.d.ts.map +1 -0
  61. package/types/methods/container/index.d.ts +5 -0
  62. package/types/methods/container/index.d.ts.map +1 -0
  63. package/types/methods/container/init-popver.d.ts +9 -0
  64. package/types/methods/container/init-popver.d.ts.map +1 -0
  65. package/types/methods/container/reset-filter.d.ts +9 -0
  66. package/types/methods/container/reset-filter.d.ts.map +1 -0
  67. package/types/methods/container/reset-search.d.ts +8 -0
  68. package/types/methods/container/reset-search.d.ts.map +1 -0
  69. package/types/methods/container/search-filter.d.ts +9 -0
  70. package/types/methods/container/search-filter.d.ts.map +1 -0
  71. package/types/methods/filters/index.d.ts +5 -0
  72. package/types/methods/filters/index.d.ts.map +1 -0
  73. package/types/methods/filters/range.d.ts +23 -0
  74. package/types/methods/filters/range.d.ts.map +1 -0
  75. package/types/methods/filters/selector.d.ts +42 -0
  76. package/types/methods/filters/selector.d.ts.map +1 -0
  77. package/types/methods/filters/spatial.d.ts +26 -0
  78. package/types/methods/filters/spatial.d.ts.map +1 -0
  79. package/types/methods/filters/text.d.ts +13 -0
  80. package/types/methods/filters/text.d.ts.map +1 -0
  81. package/types/methods/itemfilter/create-filter.d.ts +11 -0
  82. package/types/methods/itemfilter/create-filter.d.ts.map +1 -0
  83. package/types/methods/itemfilter/create-reset.d.ts +11 -0
  84. package/types/methods/itemfilter/create-reset.d.ts.map +1 -0
  85. package/types/methods/itemfilter/filter-apply.d.ts +11 -0
  86. package/types/methods/itemfilter/filter-apply.d.ts.map +1 -0
  87. package/types/methods/itemfilter/index.d.ts +7 -0
  88. package/types/methods/itemfilter/index.d.ts.map +1 -0
  89. package/types/methods/itemfilter/reset-filter.d.ts +7 -0
  90. package/types/methods/itemfilter/reset-filter.d.ts.map +1 -0
  91. package/types/methods/itemfilter/search.d.ts +11 -0
  92. package/types/methods/itemfilter/search.d.ts.map +1 -0
  93. package/types/methods/itemfilter/sort-results.d.ts +10 -0
  94. package/types/methods/itemfilter/sort-results.d.ts.map +1 -0
  95. package/types/methods/results/aggregate-results.d.ts +11 -0
  96. package/types/methods/results/aggregate-results.d.ts.map +1 -0
  97. package/types/methods/results/create.d.ts +17 -0
  98. package/types/methods/results/create.d.ts.map +1 -0
  99. package/types/methods/results/index.d.ts +3 -0
  100. package/types/methods/results/index.d.ts.map +1 -0
  101. package/types/style.d.ts +2 -0
  102. package/types/style.d.ts.map +1 -0
  103. package/types/style.eox.d.ts +2 -0
  104. package/types/style.eox.d.ts.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@types/geojson": "^7946.0.14",
@@ -12,16 +12,29 @@
12
12
  "node": ">=18.0.0"
13
13
  },
14
14
  "files": [
15
+ "types",
15
16
  "dist",
16
17
  "src"
17
18
  ],
18
19
  "main": "./src/main.js",
20
+ "types": "./types/main.d.ts",
21
+ "typesVersions": {
22
+ "*": {
23
+ ".": [
24
+ "./types/main.d.ts"
25
+ ],
26
+ "src/*": [
27
+ "./types/*"
28
+ ]
29
+ }
30
+ },
19
31
  "scripts": {
32
+ "prepack": "tsc -p tsconfig.build.json || true",
20
33
  "build": "vite build",
21
34
  "watch": "vite build --watch"
22
35
  },
23
36
  "dependencies": {
24
- "@eox/elements-utils": "^0.0.1",
37
+ "@eox/elements-utils": "^0.1.1",
25
38
  "@floating-ui/dom": "^1.6.8",
26
39
  "@turf/boolean-intersects": "^7.0.0",
27
40
  "@turf/boolean-within": "^7.0.0",
@@ -33,6 +46,6 @@
33
46
  "toolcool-range-slider": "^4.0.27"
34
47
  },
35
48
  "peerDependencies": {
36
- "@eox/map": "^1.15.0"
49
+ "@eox/map": "*"
37
50
  }
38
51
  }
@@ -30,6 +30,7 @@ export class EOxItemFilterResults extends LitElement {
30
30
  filters: { state: true, type: Object },
31
31
  resultAggregation: { attribute: false, type: Array },
32
32
  selectedResult: { state: true, type: Object },
33
+ resultType: { attribute: "result-type", type: String },
33
34
  };
34
35
  }
35
36
 
@@ -55,6 +56,11 @@ export class EOxItemFilterResults extends LitElement {
55
56
  * @type Object
56
57
  */
57
58
  this.selectedResult = null;
59
+
60
+ /**
61
+ * @type String("list"|"card")
62
+ */
63
+ this.resultType = "list";
58
64
  }
59
65
 
60
66
  /**
@@ -114,9 +120,7 @@ export class EOxItemFilterResults extends LitElement {
114
120
  render() {
115
121
  return html`
116
122
  <section id="section-results">
117
- <div>
118
- <h6 class="main-heading">Results</h6>
119
- </div>
123
+ <div slot="resultstitle"></div>
120
124
  <div id="container-results" class="scroll">
121
125
  ${when(
122
126
  this.results.length < 1,
@@ -65,6 +65,11 @@ export const ELEMENT_CONFIG = Object.freeze({
65
65
  */
66
66
  subTitleProperty: undefined,
67
67
 
68
+ /**
69
+ * The property of the result items used for an image
70
+ */
71
+ imageProperty: undefined,
72
+
68
73
  /**
69
74
  * Allow opening multiple filter accordions in parallel
70
75
  * @default true
@@ -96,6 +101,7 @@ export const ELEMENT_PROPERTIES = [
96
101
  "showResults",
97
102
  "titleProperty",
98
103
  "subTitleProperty",
104
+ "imageProperty",
99
105
  "idProperty",
100
106
  "expandMultipleFilters",
101
107
  "expandResults",
package/src/main.js CHANGED
@@ -56,6 +56,7 @@ export class EOxItemFilter extends LitElement {
56
56
  idProperty: { attribute: "id-property", type: String },
57
57
  titleProperty: { attribute: "title-property", type: String },
58
58
  subTitleProperty: { attribute: "sub-title-property", type: String },
59
+ imageProperty: { attribute: "image-property", type: String },
59
60
  expandMultipleFilters: {
60
61
  attribute: "enable-multiple-filter",
61
62
  type: Boolean,
@@ -66,6 +67,7 @@ export class EOxItemFilter extends LitElement {
66
67
  type: Boolean,
67
68
  },
68
69
  externalFilter: { attribute: false, type: Function },
70
+ resultType: { attribute: "result-type", type: String },
69
71
  unstyled: { type: Boolean },
70
72
  };
71
73
  }
@@ -198,6 +200,13 @@ export class EOxItemFilter extends LitElement {
198
200
  */
199
201
  this.subTitleProperty = undefined;
200
202
 
203
+ /**
204
+ * The property of the result items used for an image
205
+ *
206
+ * @type String
207
+ */
208
+ this.imageProperty = undefined;
209
+
201
210
  /**
202
211
  * Unique id property of items
203
212
  *
@@ -225,6 +234,13 @@ export class EOxItemFilter extends LitElement {
225
234
  */
226
235
  this.expandMultipleResults = true;
227
236
 
237
+ /**
238
+ * Rendering type for results (can be `list`or `cards`)
239
+ *
240
+ * @type String
241
+ */
242
+ this.resultType = "list";
243
+
228
244
  /**
229
245
  * Render the element without additional styles
230
246
  */
@@ -454,8 +470,13 @@ export class EOxItemFilter extends LitElement {
454
470
  .filters=${this.filters}
455
471
  .resultAggregation=${this.#resultAggregation}
456
472
  .selectedResult=${this.selectedResult}
473
+ .resultType=${this.resultType}
457
474
  @result=${this.updateResult}
458
- ></eox-itemfilter-results>
475
+ >
476
+ <slot name="resultstitle"
477
+ ><h6 class="main-heading">Results</h6></slot
478
+ >
479
+ </eox-itemfilter-results>
459
480
  `,
460
481
  )}
461
482
  </form>
@@ -2,6 +2,7 @@ import { html, nothing } from "lit";
2
2
  import { repeat } from "lit/directives/repeat.js";
3
3
  import { when } from "lit/directives/when.js";
4
4
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
5
+ import { getValue } from "../../helpers";
5
6
 
6
7
  /**
7
8
  * Creates the item details view for the aggregation property in the EOxItemFilterResults component.
@@ -63,7 +64,7 @@ export function createItemListMethod(
63
64
  : nothing;
64
65
 
65
66
  return html`
66
- <ul>
67
+ <ul class=${EOxItemFilterResults.resultType}>
67
68
  ${repeat(
68
69
  items,
69
70
  (item) => item.id,
@@ -87,6 +88,14 @@ export function createItemListMethod(
87
88
  ${when(
88
89
  config.subTitleProperty,
89
90
  () => html`
91
+ ${getValue(config.imageProperty, item)
92
+ ? html`
93
+ <img
94
+ class="image"
95
+ src="${getValue(config.imageProperty, item)}"
96
+ />
97
+ `
98
+ : nothing}
90
99
  <div class="title-container">
91
100
  <span class="title"
92
101
  >${unsafeHTML(item[config.titleProperty])}</span
package/src/style.eox.js CHANGED
@@ -24,10 +24,22 @@ export const styleEOX = `
24
24
  --background-color: #fff;
25
25
  --padding: 0.5rem;
26
26
  --text-transform: capitalize;
27
+ --form-flex-direction: column;
28
+ --filter-display: block;
27
29
  }
28
30
  * {
29
31
  font-family: Roboto, sans-serif;
30
32
  }
33
+ form#itemfilter {
34
+ flex-direction: var(--form-flex-direction);
35
+ }
36
+ eox-itemfilter-container {
37
+ min-width: 200px;
38
+ display: var(--filter-display);
39
+ }
40
+ eox-itemfilter-results {
41
+ flex-grow: 1;
42
+ }
31
43
  ul {
32
44
  padding-left: 0;
33
45
  margin-top: 0;
@@ -38,6 +50,11 @@ li {
38
50
  li span {
39
51
  text-overflow: ellipsis;
40
52
  white-space: nowrap;
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+ .cards li span {
57
+ display: block;
41
58
  }
42
59
  li label {
43
60
  display: flex;
@@ -62,11 +79,35 @@ details > summary::-webkit-details-marker {
62
79
  align-items: center;
63
80
  text-transform: var(--text-transform);
64
81
  }
82
+ .cards .title {
83
+ font-size: 16px;
84
+ font-weight: 600;
85
+ text-wrap: auto;
86
+ line-height: 19px;
87
+ }
65
88
  .subtitle {
66
89
  font-size: 11px;
67
90
  opacity: .7;
68
91
  margin-top: 6px;
69
92
  }
93
+ .cards .subtitle {
94
+ font-size: 14px;
95
+ color: #757575;
96
+ text-wrap: auto;
97
+ line-height: 19px;
98
+ }
99
+ .image {
100
+ width: 24px;
101
+ height: 24px;
102
+ object-fit: cover;
103
+ overflow: hidden;
104
+ margin-right: 8px;
105
+ }
106
+ .cards .image {
107
+ width: 100%;
108
+ height: 190px;
109
+ margin-bottom: 8px;
110
+ }
70
111
  .title-container {
71
112
  display: flex;
72
113
  flex-direction: column;
@@ -89,8 +130,7 @@ details.details-results summary::before {
89
130
  width: 24px;
90
131
  }
91
132
  details.details-filter summary::after {
92
- position: absolute;
93
- right: 8px;
133
+ margin-left: auto;
94
134
  transform: rotate(90deg);
95
135
  }
96
136
  details[open] summary::before {
@@ -148,6 +188,29 @@ ul:not(#filters) > li {
148
188
  ul#results li {
149
189
  padding: 5px var(--padding);
150
190
  }
191
+ ul#results ul.cards {
192
+ display: flex;
193
+ flex-wrap: wrap;
194
+ width: 100%;
195
+ gap: 40px;
196
+ margin: 20px 0;
197
+ cursor: initial;
198
+ }
199
+ ul#results ul.cards li {
200
+ flex-basis: calc(33.3% - 77px);
201
+ min-width: 0;
202
+ align-self: flex-start;
203
+ }
204
+ @media screen and (max-width: 768px) {
205
+ ul#results ul.cards li {
206
+ flex-basis: calc(50% - 70px);
207
+ }
208
+ }
209
+ @media screen and (max-width: 480px) {
210
+ ul#results ul.cards li {
211
+ flex-basis: 100%;
212
+ }
213
+ }
151
214
  section {
152
215
  position: relative;
153
216
  background-color: var(--background-color);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * EOxItemFilterChipsV2 is a custom web component that provides a chip-style item selector.
3
+ * It uses the LitElement base class and integrates with external methods for handling chip clicks,
4
+ * close events, and keyboard events.
5
+ *
6
+ * @module EOxItemFilterChips
7
+ * @extends LitElement
8
+ * @property {Object} items - The items to be displayed as chips.
9
+ * @property {Object} controller - The controller object to manage chip actions.
10
+ */
11
+ export class EOxItemFilterChipsV2 extends LitElement {
12
+ static get properties(): {
13
+ items: {
14
+ attribute: boolean;
15
+ type: ObjectConstructor;
16
+ };
17
+ controller: {
18
+ attribute: boolean;
19
+ type: ObjectConstructor;
20
+ };
21
+ };
22
+ /**
23
+ * @type Object
24
+ */
25
+ items: any;
26
+ /**
27
+ * @type Object
28
+ */
29
+ controller: any;
30
+ /**
31
+ * Dispatches a custom event with the selected items.
32
+ *
33
+ * @private
34
+ */
35
+ private _dispatchEvent;
36
+ /**
37
+ * Renders the HTML template for the component.
38
+ */
39
+ render(): import("lit-html").TemplateResult<1>;
40
+ #private;
41
+ }
42
+ import { LitElement } from "lit";
43
+ //# sourceMappingURL=chips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chips.d.ts","sourceRoot":"","sources":["../../src/components/chips.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;MAKC;IAKC;;OAEG;IACH,WAAe;IAEf;;OAEG;IACH,gBAAoB;IA2BtB;;;;OAIG;IACH,uBAMC;IAsBD;;OAEG;IACH,+CA0BC;;CACF;2BAhIgC,KAAK"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * EOxItemFilterExpandContainer is a custom web component that provides an expandable container for item filters.
3
+ * The component supports a featured view and an expandable details view.
4
+ *
5
+ * @module EOxItemFilterExpandContainer
6
+ * @extends LitElement
7
+ * @property {Object} filterObject - The filter object containing state and properties such as title and expanded state.
8
+ * @property {Boolean} unstyled - Flag to determine if default styles should be applied.
9
+ */
10
+ export class EOxItemFilterExpandContainer extends LitElement {
11
+ static get properties(): {
12
+ filterObject: {
13
+ attribute: boolean;
14
+ type: ObjectConstructor;
15
+ };
16
+ unstyled: {
17
+ type: BooleanConstructor;
18
+ };
19
+ };
20
+ /**
21
+ * @type Object
22
+ */
23
+ filterObject: any;
24
+ /**
25
+ * @type Boolean
26
+ */
27
+ unstyled: boolean;
28
+ /**
29
+ * Renders the HTML template for the component.
30
+ */
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ #private;
33
+ }
34
+ import { LitElement } from "lit";
35
+ //# sourceMappingURL=expand-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expand-container.d.ts","sourceRoot":"","sources":["../../src/components/expand-container.js"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH;IAEE;;;;;;;;MAKC;IAKC;;OAEG;IACH,kBAAsB;IAEtB;;OAEG;IACH,kBAAqB;IAoBvB;;OAEG;IACH,+CA+BC;;CACF;2BAxFyC,KAAK"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * EOxItemFilterRange is a custom web component that provides a range slider for filtering items.
3
+ * It uses the LitElement base class and integrates with external methods for handling input events,
4
+ * generating labels, and resetting the range filter.
5
+ *
6
+ * @module EOxItemFilterRange
7
+ * @extends LitElement
8
+ * @property {Object} filterObject - The filter object containing state and range limits.
9
+ * @property {Number} tabIndex - The tab index for the input elements.
10
+ */
11
+ export class EOxItemFilterRange extends LitElement {
12
+ static properties: {
13
+ filterObject: {
14
+ attribute: boolean;
15
+ type: ObjectConstructor;
16
+ };
17
+ tabIndex: {
18
+ attribute: boolean;
19
+ type: NumberConstructor;
20
+ };
21
+ };
22
+ /**
23
+ * @type Object
24
+ */
25
+ filterObject: any;
26
+ /**
27
+ * @type Function
28
+ */
29
+ inputHandler: Function;
30
+ /**
31
+ * @type Function
32
+ */
33
+ debouncedInputHandler: Function;
34
+ /**
35
+ * Resets the range filter using the resetRangeMethod.
36
+ */
37
+ reset(): void;
38
+ /**
39
+ * Overrides the default createRenderRoot method to render in the light DOM.
40
+ *
41
+ * @returns {this} - The current instance to render in the light DOM.
42
+ */
43
+ createRenderRoot(): this;
44
+ /**
45
+ * Renders the HTML template for the component.
46
+ */
47
+ render(): undefined;
48
+ #private;
49
+ }
50
+ import { LitElement } from "lit";
51
+ //# sourceMappingURL=range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/components/filters/range.js"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH;IAEE;;;;;;;;;MAGE;IAKA;;OAEG;IACH,kBAAsB;IAOtB;;OAEG;IACH,uBAAiD;IAEjD;;OAEG;IACH,gCAEE;IAyBJ;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAED;;OAEG;IACH,oBAgBC;;CACF;2BA/GgC,KAAK"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * EOxSelector is a custom web component that provides a flexible selector interface for filtering items.
3
+ * It supports both autocomplete and select modes and integrates with external methods for handling input,
4
+ * key events, and selection updates.
5
+ *
6
+ * @module EOxSelector
7
+ * @extends LitElement
8
+ * @property {Object} filterObject - The filter object containing state and placeholder.
9
+ * @property {Array} suggestions - The list of suggestions for the selector.
10
+ * @property {Array} selectedItems - The list of currently selected items.
11
+ * @property {String} query - The current input query for autocomplete.
12
+ * @property {Boolean} showSuggestions - Flag to control the display of suggestions in autocomplete mode.
13
+ * @property {Number} highlightedIndex - The index of the currently highlighted suggestion.
14
+ * @property {Array} filteredSuggestions - The list of suggestions filtered based on the query.
15
+ * @property {String} type - The type of selector ("select", "multi-select", etc.).
16
+ * @property {Boolean} unstyled - Flag to determine if default styles should be applied.
17
+ * @property {Number} tabIndex - The tab index for the input elements.
18
+ * @property {Boolean} inlineMode - State whether to enable or disable inline mode
19
+ */
20
+ export class EOxSelector extends LitElement {
21
+ static properties: {
22
+ filterObject: {
23
+ attribute: boolean;
24
+ type: ObjectConstructor;
25
+ };
26
+ suggestions: {
27
+ attribute: boolean;
28
+ type: ArrayConstructor;
29
+ };
30
+ selectedItems: {
31
+ state: boolean;
32
+ type: ArrayConstructor;
33
+ };
34
+ query: {
35
+ state: boolean;
36
+ type: StringConstructor;
37
+ };
38
+ showSuggestions: {
39
+ state: boolean;
40
+ type: BooleanConstructor;
41
+ };
42
+ highlightedIndex: {
43
+ state: boolean;
44
+ type: NumberConstructor;
45
+ };
46
+ filteredSuggestions: {
47
+ state: boolean;
48
+ type: ArrayConstructor;
49
+ };
50
+ type: {
51
+ attribute: boolean;
52
+ type: StringConstructor;
53
+ };
54
+ unstyled: {
55
+ type: BooleanConstructor;
56
+ };
57
+ tabIndex: {
58
+ attribute: boolean;
59
+ type: NumberConstructor;
60
+ };
61
+ inlineMode: {
62
+ attribute: string;
63
+ type: BooleanConstructor;
64
+ };
65
+ };
66
+ /**
67
+ * @type Object
68
+ */
69
+ filterObject: any;
70
+ /**
71
+ * @type Array
72
+ */
73
+ suggestions: any[];
74
+ /**
75
+ * @type Array
76
+ */
77
+ selectedItems: any[];
78
+ /**
79
+ * @type String
80
+ */
81
+ query: string;
82
+ /**
83
+ * @type Boolean
84
+ */
85
+ showSuggestions: boolean;
86
+ /**
87
+ * @type Number
88
+ */
89
+ highlightedIndex: number;
90
+ /**
91
+ * @type Array
92
+ */
93
+ filteredSuggestions: any[];
94
+ /**
95
+ * @type String
96
+ */
97
+ type: string;
98
+ /**
99
+ * @type Boolean
100
+ */
101
+ unstyled: boolean;
102
+ /**
103
+ * @type Boolean
104
+ */
105
+ inlineMode: boolean;
106
+ /**
107
+ * Called when the element is updated. Triggers the updatedSelectorMethod.
108
+ *
109
+ * @param {Map} changedProperties - The properties that have changed.
110
+ */
111
+ updated(changedProperties: Map<any, any>): void;
112
+ /**
113
+ * Resets the selector using the resetSelectorMethod.
114
+ */
115
+ reset(): void;
116
+ /**
117
+ * Debounced version of the toggleItem method to improve performance by limiting the rate at which the method is called.
118
+ *
119
+ * @function debouncedInputHandler
120
+ * @private
121
+ */
122
+ private debouncedInputHandler;
123
+ /**
124
+ * Initialise pre-defined selected items using `state`
125
+ *
126
+ */
127
+ firstUpdated(): void;
128
+ /**
129
+ * Renders the HTML template for the component.
130
+ */
131
+ render(): import("lit-html").TemplateResult<1>;
132
+ #private;
133
+ }
134
+ import { LitElement } from "lit";
135
+ //# sourceMappingURL=selector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../../../src/components/filters/selector.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYE;IAKA;;OAEG;IACH,kBAAsB;IAEtB;;OAEG;IACH,mBAAqB;IAErB;;OAEG;IACH,qBAAuB;IAEvB;;OAEG;IACH,cAAe;IAEf;;OAEG;IACH,yBAA4B;IAE5B;;OAEG;IACH,yBAA0B;IAE1B;;OAEG;IACH,2BAA6B;IAE7B;;OAEG;IACH,aAAoB;IAEpB;;OAEG;IACH,kBAAqB;IAOrB;;OAEG;IACH,oBAAuB;IAGzB;;;;OAIG;IACH,gDAEC;IAgCD;;OAEG;IACH,cAEC;IAED;;;;;OAKG;IACH,8BAEG;IAEH;;;OAGG;IACH,qBAUC;IAED;;OAEG;IACH,+CA0DC;;CACF;2BAlPyC,KAAK"}
@@ -0,0 +1,82 @@
1
+ export function within(itemGeometry: any, filterGeometry: any): boolean;
2
+ /**
3
+ * EOxItemFilterSpatial is a custom web component that provides a spatial filter for items.
4
+ * The component allows users to select a spatial filter mode (intersects or within) and apply it to a map.
5
+ *
6
+ * @module EOxItemFilterSpatial
7
+ * @extends LitElement
8
+ * @property {Object} filterObject - The filter object containing the state and geometry.
9
+ * @property {Number} tabIndex - The tab index for the input elements.
10
+ */
11
+ export class EOxItemFilterSpatial extends LitElement {
12
+ static get properties(): {
13
+ filterObject: {
14
+ type: ObjectConstructor;
15
+ };
16
+ tabIndex: {
17
+ attribute: boolean;
18
+ type: NumberConstructor;
19
+ };
20
+ };
21
+ /**
22
+ * @type Object
23
+ */
24
+ filterObject: any;
25
+ /**
26
+ * Resets the spatial filter using the resetSpatialMethod.
27
+ */
28
+ reset(): void;
29
+ /**
30
+ * Overrides the default createRenderRoot method to render in the light DOM.
31
+ *
32
+ * @returns {this} - The current instance to render in the light DOM.
33
+ */
34
+ createRenderRoot(): this;
35
+ /**
36
+ * Renders the HTML template for the component.he template result for rendering.
37
+ */
38
+ render(): undefined;
39
+ #private;
40
+ }
41
+ /**
42
+ * SpatialFilter is a custom web component that renders a map and allows users to apply spatial filters.
43
+ * It uses the LitElement base class and integrates with external methods for setup and reset functionalities.
44
+ *
45
+ * @module SpatialFilter
46
+ * @extends LitElement
47
+ * @property {Object} geometry - The geometry object used for the spatial filter.
48
+ * @property {Object} eoxMap - The map object used to display and interact with the spatial filter.
49
+ */
50
+ export class SpatialFilter extends LitElement {
51
+ static get properties(): {
52
+ geometry: {
53
+ type: ObjectConstructor;
54
+ };
55
+ eoxMap: {
56
+ type: ObjectConstructor;
57
+ };
58
+ };
59
+ /**
60
+ * @type Object
61
+ */
62
+ geometry: any;
63
+ /**
64
+ * @type Object
65
+ */
66
+ eoxMap: any;
67
+ /**
68
+ * Lifecycle method called after the first update. Initializes the spatial filter.
69
+ */
70
+ firstUpdated(): void;
71
+ /**
72
+ * Resets the spatial filter using the resetSpatialFilterMethod.
73
+ */
74
+ reset(): void;
75
+ /**
76
+ * Renders the HTML template for the component.
77
+ */
78
+ render(): import("lit-html").TemplateResult<1>;
79
+ #private;
80
+ }
81
+ import { LitElement } from "lit";
82
+ //# sourceMappingURL=spatial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../../../src/components/filters/spatial.js"],"names":[],"mappings":"AAkBO,gEAFM,OAAO,CAOnB;AAED;;;;;;;;GAQG;AACH;IAEE;;;;;;;;MAKC;IAKC;;OAEG;IACH,kBAAsB;IAQxB;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAYD;;OAEG;IACH,oBAmCC;;CACF;AAID;;;;;;;;GAQG;AACH;IAEE;;;;;;;MAKC;IAKC;;OAEG;IACH,cAAoB;IAEpB;;OAEG;IACH,YAAkB;IAGpB;;OAEG;IACH,qBAEC;IAWD;;OAEG;IACH,cAEC;IAED;;OAEG;IACH,+CAEC;;CACF;2BA3LyC,KAAK"}