@eox/itemfilter 1.15.0 → 1.17.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.
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,11 +9,11 @@
9
9
  "devDependencies": {
10
10
  "@types/geojson": "^7946.0.14",
11
11
  "@types/lodash.debounce": "^4.0.7",
12
- "vite": "^7.1.12"
12
+ "vite": "^8.0.12"
13
13
  },
14
14
  "engines": {
15
15
  "npm": ">=8.0.0",
16
- "node": ">=18.0.0"
16
+ "node": ">=24.0.0"
17
17
  },
18
18
  "files": [
19
19
  "types",
@@ -40,12 +40,12 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@eox/elements-utils": "^1.1.0",
43
- "@eox/ui": "^0.6.0",
43
+ "@eox/ui": "^1.1.0",
44
44
  "@floating-ui/dom": "^1.6.8",
45
- "@turf/boolean-intersects": "^7.0.0",
46
- "@turf/boolean-within": "^7.0.0",
45
+ "@turf/boolean-intersects": "^7.3.5",
46
+ "@turf/boolean-within": "^7.3.5",
47
47
  "dayjs": "^1.11.9",
48
- "fuse.js": "^7.0.0",
48
+ "fuse.js": "^7.3.0",
49
49
  "lit": "^3.2.0",
50
50
  "lodash.debounce": "^4.0.8",
51
51
  "lodash.flatmap": "^4.5.0",
@@ -54,6 +54,7 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@eox/layout": "*",
57
- "@eox/map": ">=2.0.0 || >=2.1.0-dev.1"
57
+ "@eox/map": ">=2.0.0 || >=2.1.0-dev.1",
58
+ "@eox/timecontrol": ">=2.0.0"
58
59
  }
59
60
  }
@@ -2,11 +2,14 @@ import { LitElement, html } from "lit";
2
2
  import { when } from "lit/directives/when.js";
3
3
  import _debounce from "lodash.debounce";
4
4
  import "toolcool-range-slider";
5
+ import dayjs from "dayjs";
6
+ import { DATE_TIME_FORMAT } from "../../enums/index.js";
5
7
  import {
6
8
  rangeInputHandlerMethod,
7
9
  rangeLabelMethod,
8
10
  resetRangeMethod,
9
11
  } from "../../methods/filters/index.js";
12
+ import { isDate } from "../../helpers/index.js";
10
13
 
11
14
  /**
12
15
  * EOxItemFilterRange is a custom web component that provides a range slider for filtering items.
@@ -16,12 +19,14 @@ import {
16
19
  * @module EOxItemFilterRange
17
20
  * @extends LitElement
18
21
  * @property {Object} filterObject - The filter object containing state and range limits.
22
+ * @property {Array} suggestions - The list of suggestions for the selector.
19
23
  * @property {Number} tabIndex - The tab index for the input elements.
20
24
  */
21
25
  export class EOxItemFilterRange extends LitElement {
22
26
  // Define properties with defaults and types
23
27
  static properties = {
24
28
  filterObject: { attribute: false, type: Object },
29
+ suggestions: { attribute: false, type: Array },
25
30
  tabIndex: { attribute: false, type: Number },
26
31
  };
27
32
 
@@ -33,6 +38,11 @@ export class EOxItemFilterRange extends LitElement {
33
38
  */
34
39
  this.filterObject = {};
35
40
 
41
+ /**
42
+ * @type Array
43
+ */
44
+ this.suggestions = [];
45
+
36
46
  /**
37
47
  * @type Boolean
38
48
  */
@@ -94,20 +104,66 @@ export class EOxItemFilterRange extends LitElement {
94
104
  return when(
95
105
  this.filterObject,
96
106
  () => html`
97
- <div
98
- style="margin-left: var(--list-padding); display: flex; gap: .5rem; align-items: center;"
99
- >
100
- ${this.#label("min", "before")}
101
- <tc-range-slider
102
- min="${this.filterObject.min}"
103
- max="${this.filterObject.max}"
104
- value1="${this.filterObject.state.min || this.filterObject.min}"
105
- value2="${this.filterObject.state.max || this.filterObject.max}"
106
- step="${this.filterObject.step || 1}"
107
- @change=${this.debouncedInputHandler}
108
- ></tc-range-slider>
109
- ${this.#label("max", "after")}
110
- </div>
107
+ ${when(
108
+ isDate(this.filterObject),
109
+ () => html`
110
+ <eox-timecontrol
111
+ .controlValues=${[
112
+ {
113
+ id: this.filterObject.key,
114
+ title: this.filterObject.title || "Filter",
115
+ timeControlValues: (
116
+ this.filterObject.filterKeys ||
117
+ this.suggestions ||
118
+ []
119
+ ).map((item) =>
120
+ typeof item === "object" ? item : { date: item },
121
+ ),
122
+ },
123
+ ]}
124
+ .initDate=${[
125
+ dayjs(this.filterObject.state.min || this.filterObject.min),
126
+ dayjs(this.filterObject.state.max || this.filterObject.max),
127
+ ]}
128
+ @select=${(e) =>
129
+ rangeInputHandlerMethod(
130
+ new CustomEvent("values", {
131
+ detail: {
132
+ values: [
133
+ dayjs(e.detail.date[0]).valueOf(),
134
+ dayjs(e.detail.date[1]).valueOf(),
135
+ ],
136
+ },
137
+ }),
138
+ this,
139
+ )}
140
+ >
141
+ <eox-timecontrol-date
142
+ .format=${DATE_TIME_FORMAT}
143
+ ></eox-timecontrol-date>
144
+ <eox-timecontrol-picker
145
+ popup
146
+ range
147
+ show-dots
148
+ .position=${["bottom", "left"]}
149
+ ></eox-timecontrol-picker>
150
+ </eox-timecontrol>
151
+ `,
152
+ () => html`
153
+ <div style="display: flex; gap: .5rem; align-items: center;">
154
+ ${this.#label("min", "before")}
155
+ <tc-range-slider
156
+ min="${this.filterObject.min}"
157
+ max="${this.filterObject.max}"
158
+ value1="${this.filterObject.state.min || this.filterObject.min}"
159
+ value2="${this.filterObject.state.max || this.filterObject.max}"
160
+ step="${this.filterObject.step || 1}"
161
+ @change=${this.debouncedInputHandler}
162
+ ></tc-range-slider>
163
+ ${this.#label("max", "after")}
164
+ </div>
165
+ `,
166
+ )}
111
167
  `,
112
168
  );
113
169
  }
@@ -87,8 +87,10 @@ class EOxItemFilterSpatial extends LitElement {
87
87
  return when(
88
88
  this.filterObject,
89
89
  () => html`
90
- <div style="margin-left: var(--list-padding)">
91
- <nav class="vertical-margin small-margin wrap">
90
+ <div
91
+ style="margin-left: var(--list-padding); padding-right: var(--padding)"
92
+ >
93
+ <nav class="no-margin wrap">
92
94
  ${map(
93
95
  ["intersects", "within"],
94
96
  (mode) => html`
@@ -102,7 +104,7 @@ class EOxItemFilterSpatial extends LitElement {
102
104
  value="${mode}"
103
105
  @click=${() => this.#handleClick(mode)}
104
106
  />
105
- <span>${mode} filter geometry</span>
107
+ <span style="font-size: x-small">${mode} geometry</span>
106
108
  </label>
107
109
  `,
108
110
  )}
@@ -116,7 +118,7 @@ class EOxItemFilterSpatial extends LitElement {
116
118
  this.filterObject.stringifiedState = "Polygon";
117
119
  this.dispatchEvent(new CustomEvent("filter"));
118
120
  }}"
119
- ></eox-itemfilter-spatial>
121
+ ></eox-itemfilter-spatial-filter>
120
122
  </div>
121
123
  `,
122
124
  );
@@ -117,3 +117,5 @@ export const ELEMENT_PROPERTIES = [
117
117
  "expandMultipleResults",
118
118
  "items",
119
119
  ];
120
+
121
+ export const DATE_TIME_FORMAT = "YYYY-MM-DD";
@@ -1 +1 @@
1
- export { ELEMENT_CONFIG, ELEMENT_PROPERTIES } from "./config";
1
+ export { ELEMENT_CONFIG, ELEMENT_PROPERTIES, DATE_TIME_FORMAT } from "./config";
@@ -100,7 +100,7 @@ export const filter = async (items, filters, config) => {
100
100
  for (const [key, value] of Object.entries(rangeFilters)) {
101
101
  // Function to parse value based on format
102
102
  const parseValue = (input) => {
103
- return value.format === "date" ? dayjs(input).unix() : input;
103
+ return value.format === "date" ? dayjs(input).valueOf() : input;
104
104
  };
105
105
  const rangeValue = getValue(key, results[i]);
106
106
  if (rangeValue) {
@@ -11,3 +11,4 @@ export { default as toggleAccordion } from "./toggle-accordion";
11
11
  export { default as getValue } from "./get-value";
12
12
  export { default as capitalize } from "./capitalize";
13
13
  export { default as mergeHighlightIndices } from "./merge-highlight-indices";
14
+ export { default as isDate } from "./is-date";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if the filterObject format is date-like.
3
+ *
4
+ * @param {Object} filterObject - The filter object.
5
+ * @returns {boolean} True if it is a date, otherwise false.
6
+ */
7
+ export default function isDate(filterObject) {
8
+ return Boolean(filterObject.format === "date");
9
+ }
package/src/main.js CHANGED
@@ -35,13 +35,13 @@ import {
35
35
  * - Supports `text`, `select`, `multiselect`, `range` (including date), and `spatial` filters
36
36
  * - Aggregates results by a property key (e.g. themes)
37
37
  * - Inline mode for compact UI
38
- * - Pre-set filter state via `state` in `filterProperties`
38
+ * - Pre-set filter state via `state` in `filterProperties` property/attribute
39
39
  * - Nested property filtering using dot notation
40
- * - External search API endpoint support via `externalFilter`
40
+ * - External search API endpoint support via `externalFilter` property
41
41
  * - Auto-spreading of single-item aggregations to root level
42
42
  * - Card display mode for results (`result-type="cards"`)
43
43
  * - Secondary result action button with custom icon and event handler (`click:result-action`)
44
- * - Custom result sorting via `resultSorting` property
44
+ * - Custom result sorting via `resultSorting` property/attribute
45
45
  * - Customizable layout and styling via CSS variables
46
46
  *
47
47
  * Usage examples and visual demos are available in Storybook stories, including scenarios for inline mode, external filtering, nested properties, card display, CSS variable customization, and result actions.
@@ -58,15 +58,15 @@ export class EOxItemFilter extends LitElement {
58
58
  // Define properties with defaults and types
59
59
  static get properties() {
60
60
  return {
61
- items: { attribute: false, type: Object },
61
+ items: { type: Array },
62
62
  results: { state: true, attribute: false, type: Object },
63
63
  filters: { state: true, attribute: false, type: Object },
64
- selectedResult: { attribute: false, type: Object },
64
+ selectedResult: { type: Object },
65
65
  aggregateResults: { attribute: "aggregate-results", type: String },
66
66
  autoSpreadSingle: { attribute: "auto-spread-single", type: Boolean },
67
67
  enableHighlighting: { attribute: "enable-highlighting", type: Boolean },
68
- filterProperties: { attribute: false, type: Array },
69
- fuseConfig: { attribute: false, type: Object },
68
+ filterProperties: { type: Array },
69
+ fuseConfig: { type: Object },
70
70
  inlineMode: { attribute: "inline-mode", type: Boolean },
71
71
  matchAllWhenEmpty: { attribute: "match-all-when-empty", type: Boolean },
72
72
  showResults: { attribute: "show-result", type: Boolean },
@@ -74,7 +74,7 @@ export class EOxItemFilter extends LitElement {
74
74
  titleProperty: { attribute: "title-property", type: String },
75
75
  subTitleProperty: { attribute: "sub-title-property", type: String },
76
76
  imageProperty: { attribute: "image-property", type: String },
77
- resultSorting: { attribute: false, type: Object },
77
+ resultSorting: { type: Object },
78
78
  expandMultipleFilters: {
79
79
  attribute: "enable-multiple-filter",
80
80
  type: Boolean,
@@ -86,8 +86,8 @@ export class EOxItemFilter extends LitElement {
86
86
  },
87
87
  externalFilter: { attribute: false, type: Function },
88
88
  resultType: { attribute: "result-type", type: String },
89
- enableResultAction: { attribute: false, type: Boolean },
90
- resultActionIcon: { attribute: false, type: String },
89
+ enableResultAction: { type: Boolean },
90
+ resultActionIcon: { type: String },
91
91
  styleOverride: { type: String },
92
92
  unstyled: { type: Boolean },
93
93
  };
@@ -111,7 +111,7 @@ export class EOxItemFilter extends LitElement {
111
111
  constructor() {
112
112
  super();
113
113
 
114
- /** The items to be filtered
114
+ /** The items to be filtered. Can be passed as a property or stringified JSON attribute.
115
115
  * @type Array<Object>
116
116
  */
117
117
  this.items = null;
@@ -170,13 +170,14 @@ export class EOxItemFilter extends LitElement {
170
170
  * The function can return a URL string, or an object containing a `url,
171
171
  * an optional `fetchFn` to handle the request, or/and an optional `key` to
172
172
  * return a specific property from the fetched data.
173
+ * This is a property-only field as it expects a function.
173
174
  *
174
175
  * @type {() => string| (() => {url:string;key?:string;fetchFn?:string})}
175
176
  */
176
177
  this.externalFilter = null;
177
178
 
178
179
  /**
179
- * The filter properties.
180
+ * The filter properties. Can be passed as a property or stringified JSON attribute.
180
181
  * @type Array<{key?: String, keys?: Array<String>, title: String, type: String, placeholder?: String, format?: String, state?: Object}>
181
182
  */
182
183
  this.filterProperties = [];
@@ -1,8 +1,7 @@
1
- import { resetFilter } from "../../helpers/index.js";
1
+ import { resetFilter, isDate } from "../../helpers/index.js";
2
2
  import dayjs from "dayjs";
3
3
  import { html } from "lit";
4
-
5
- const DATE_TIME_FORMAT = "ddd, D MMM YYYY HH:mm:ss";
4
+ import { DATE_TIME_FORMAT } from "../../enums/index.js";
6
5
 
7
6
  /**
8
7
  * Resets the range filter to its default state and requests an update.
@@ -14,15 +13,26 @@ export function resetRangeMethod(EOxItemFilterRange) {
14
13
  EOxItemFilterRange.filterObject,
15
14
  );
16
15
  if (EOxItemFilterRange.filterObject) {
16
+ const min = EOxItemFilterRange.filterObject.min;
17
+ const max = EOxItemFilterRange.filterObject.max;
18
+
19
+ /**
20
+ * @type {import("@eox/timecontrol").EOxTimeControl}
21
+ */
22
+ const eleTimeControl = EOxItemFilterRange.querySelector("eox-timecontrol");
23
+ if (eleTimeControl) {
24
+ eleTimeControl.dateChange([dayjs(min), dayjs(max)], eleTimeControl);
25
+ }
26
+
17
27
  /**
18
28
  * @type {import("toolcool-range-slider").RangeSlider}
19
29
  */
20
30
  const eleTCRangeSlider =
21
31
  EOxItemFilterRange.querySelector("tc-range-slider");
22
- const min = EOxItemFilterRange.filterObject.min;
23
- const max = EOxItemFilterRange.filterObject.max;
24
- if (eleTCRangeSlider.value1 !== min) eleTCRangeSlider.value1 = min;
25
- if (eleTCRangeSlider.value2 !== max) eleTCRangeSlider.value2 = max;
32
+ if (eleTCRangeSlider) {
33
+ if (eleTCRangeSlider.value1 !== min) eleTCRangeSlider.value1 = min;
34
+ if (eleTCRangeSlider.value2 !== max) eleTCRangeSlider.value2 = max;
35
+ }
26
36
  }
27
37
  EOxItemFilterRange.requestUpdate();
28
38
  }
@@ -52,7 +62,7 @@ export function rangeInputHandlerMethod(evt, EOxItemFilterRange) {
52
62
  if (EOxItemFilterRange.filterObject.dirty) {
53
63
  EOxItemFilterRange.filterObject.stringifiedState =
54
64
  EOxItemFilterRange.filterObject.format === "date"
55
- ? `${dayjs.unix(min).format(DATE_TIME_FORMAT)} - ${dayjs.unix(max).format(DATE_TIME_FORMAT)}`
65
+ ? `${dayjs(min).format(DATE_TIME_FORMAT)} - ${dayjs(max).format(DATE_TIME_FORMAT)}`
56
66
  : `${min} - ${max}`;
57
67
  }
58
68
 
@@ -76,10 +86,9 @@ export function rangeInputHandlerMethod(evt, EOxItemFilterRange) {
76
86
  * @returns {import("lit").HTMLTemplateResult}
77
87
  */
78
88
  export function rangeLabelMethod(val, pos, EOxItemFilterRange) {
79
- const isDate = Boolean(EOxItemFilterRange.filterObject.format === "date");
80
89
  const filteredVal = EOxItemFilterRange.filterObject.state[val];
81
- const label = isDate
82
- ? dayjs.unix(filteredVal).format(DATE_TIME_FORMAT)
90
+ const label = isDate(EOxItemFilterRange.filterObject)
91
+ ? dayjs(filteredVal).format(DATE_TIME_FORMAT)
83
92
  : filteredVal;
84
93
  return html`<div class="range-${pos}">${label}</div>`;
85
94
  }
@@ -59,6 +59,9 @@ function createFilterMethod(filterObject, tabIndex, EOxItemFilter) {
59
59
  .tabIndex=${tabIndex}
60
60
  .filterObject=${filterObject}
61
61
  slot="filter"
62
+ .suggestions="${uniq(
63
+ flatMap(EOxItemFilter.items, filterObject.key),
64
+ ).filter((i) => i)}"
62
65
  .unstyled=${EOxItemFilter.unstyled}
63
66
  @filter=${() => EOxItemFilter.search()}
64
67
  ></eox-itemfilter-range>
@@ -22,7 +22,7 @@ function filterApplyMethod(config, items, EOxItemFilter) {
22
22
  // Function to parse values based on their format
23
23
  const parseValue = (value) => {
24
24
  return filterProperty.format === "date"
25
- ? dayjs(value).unix()
25
+ ? dayjs(value).valueOf()
26
26
  : parseFloat(value);
27
27
  };
28
28
 
package/src/style.eox.js CHANGED
@@ -39,19 +39,19 @@ ${eoxStyle}
39
39
  #000000 20%,
40
40
  transparent
41
41
  );
42
- --background-color: var(--eox-background-color, transparent);
43
- --padding: 0.5rem;
44
- --padding-vertical: 0.25rem;
45
- --list-padding: 2rem;
46
- --text-transform: capitalize;
47
- --form-flex-direction: column;
48
- --filter-display: block;
49
- background-color: var(--background-color);
42
+ --_background-color: var(--background-color, var(--eox-background-color, transparent));
43
+ --_padding: var(--padding, 0.5rem);
44
+ --_padding-vertical: var(--padding-vertical, 0.25rem);
45
+ --_list-padding: var(--list-padding, 2rem);
46
+ --_text-transform: var(--text-transform, capitalize);
47
+ --_form-flex-direction: var(--form-flex-direction, column);
48
+ --_filter-display: var(--filter-display, block);
49
+ background-color: var(--_background-color);
50
50
  display: flex;
51
51
  flex-direction: column;
52
52
  }
53
53
  form#itemfilter {
54
- flex-direction: var(--form-flex-direction);
54
+ flex-direction: var(--_form-flex-direction);
55
55
  margin-top: 0;
56
56
  }
57
57
  eox-itemfilter-container {
@@ -72,7 +72,7 @@ eox-itemfilter-results button.chip {
72
72
  pointer-events: none;
73
73
  }
74
74
  .list li {
75
- padding: 0 var(--padding) !important;
75
+ padding: 0 var(--_padding) !important;
76
76
  }
77
77
  .list.no-padding > li {
78
78
  padding: 0 !important;
@@ -82,7 +82,7 @@ li label {
82
82
  align-items: center;
83
83
  }
84
84
  .title {
85
- text-transform: var(--text-transform);
85
+ text-transform: var(--_text-transform);
86
86
  }
87
87
  .title.highlight-enabled {
88
88
  text-transform: inherit;
@@ -111,14 +111,14 @@ eox-itemfilter-expandcontainer > [data-type=filter] {
111
111
  }
112
112
  [data-type=filter] .title,
113
113
  details summary {
114
- text-transform: var(--text-transform);
114
+ text-transform: var(--_text-transform);
115
115
  }
116
116
  details summary nav {
117
117
  height: 32px;
118
118
  }
119
119
  details > summary {
120
120
  min-block-size: 0rem;
121
- padding: 0 var(--padding);
121
+ padding: 0 var(--_padding);
122
122
  user-select: none;
123
123
  }
124
124
  details > summary i {
@@ -133,7 +133,7 @@ summary > * {
133
133
  ul.multiselect.list > li,
134
134
  ul.select.list > li,
135
135
  details > div > ul#results.list > li {
136
- padding-left: var(--list-padding) !important;
136
+ padding-left: var(--_list-padding) !important;
137
137
  }
138
138
  section:not(section:last-of-type) {
139
139
  margin-bottom: 1rem;
@@ -149,14 +149,14 @@ section:not(section:last-of-type) {
149
149
  border-radius: none;
150
150
  }
151
151
  .no-results {
152
- padding-left: var(--padding);
153
- padding-right: var(--padding);
152
+ padding-left: var(--_padding);
153
+ padding-right: var(--_padding);
154
154
  }
155
155
  ul#results li:not(:hover) .result-action {
156
156
  display: none;
157
157
  }
158
158
  eox-layout {
159
- padding: var(--padding-vertical) var(--padding);
159
+ padding: var(--_padding-vertical) var(--_padding);
160
160
  gap: var(--card-gap, 16px);
161
161
  --column-width: var(--card-width, 300px);
162
162
  --row-height: var(--card-height, 200px);
@@ -220,30 +220,32 @@ ul#results eox-layout-item.highlighted .result-action > * {
220
220
  }
221
221
  section {
222
222
  position: relative;
223
- background-color: var(--background-color);
223
+ background-color: var(--_background-color);
224
224
  }
225
225
  nav.title-nav {
226
- padding-left: var(--padding);
227
- padding-right: var(--padding);
226
+ padding-left: var(--_padding);
227
+ padding-right: var(--_padding);
228
228
  }
229
- eox-itemfilter-range,
230
- tc-range-slider {
231
- align-items: center;
229
+ eox-itemfilter-range {
232
230
  display: block;
231
+ margin-left: var(--_list-padding);
232
+ padding-right: var(--_padding);
233
+ }
234
+ .range-wrapper {
235
+ margin-left: var(--_list-padding);
236
+ padding-right: var(--_padding);
233
237
  }
234
238
  tc-range-slider {
235
- width: calc(100% - 32px);
236
- margin-left: 8px;
237
- margin-right: 8px;
239
+ width: 100%;
238
240
  --width: 100%;
239
241
  }
240
- .range-before,
241
- .range-after {
242
- font-size: small;
242
+ .range-labels {
243
+ display: flex;
244
+ justify-content: space-between;
243
245
  }
244
246
  .range-before,
245
247
  .range-after {
246
- margin: 1rem 0px;
248
+ font-size: x-small;
247
249
  }
248
250
 
249
251
  .inline-content {
@@ -478,12 +480,17 @@ mark.highlight {
478
480
  color: #ba1a1a !important;
479
481
  font-size: x-small;
480
482
  }
483
+ .row {
484
+ display: flex;
485
+ flex-direction: row;
486
+ gap: 8px;
487
+ }
481
488
  @media (prefers-color-scheme: dark) {
482
489
  .error-validation {
483
490
  color: #ffb4ab !important;
484
491
  }
485
492
  }
486
493
  input {
487
- background-color: var(--background-color);
494
+ background-color: var(--_background-color);
488
495
  }
489
496
  `;
@@ -6,6 +6,7 @@
6
6
  * @module EOxItemFilterRange
7
7
  * @extends LitElement
8
8
  * @property {Object} filterObject - The filter object containing state and range limits.
9
+ * @property {Array} suggestions - The list of suggestions for the selector.
9
10
  * @property {Number} tabIndex - The tab index for the input elements.
10
11
  */
11
12
  export class EOxItemFilterRange extends LitElement {
@@ -14,6 +15,10 @@ export class EOxItemFilterRange extends LitElement {
14
15
  attribute: boolean;
15
16
  type: ObjectConstructor;
16
17
  };
18
+ suggestions: {
19
+ attribute: boolean;
20
+ type: ArrayConstructor;
21
+ };
17
22
  tabIndex: {
18
23
  attribute: boolean;
19
24
  type: NumberConstructor;
@@ -23,6 +28,10 @@ export class EOxItemFilterRange extends LitElement {
23
28
  * @type Object
24
29
  */
25
30
  filterObject: any;
31
+ /**
32
+ * @type Array
33
+ */
34
+ suggestions: any[];
26
35
  /**
27
36
  * @type {(evt: CustomEvent<any>) => void}
28
37
  */
@@ -1 +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,cAFU,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,CAEQ;IAEjD;;OAEG;IACH,gCAEE;IAuBJ;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAED;;OAEG;IACH,oBAoBC;;CACF;2BAjHgC,KAAK"}
1
+ {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/components/filters/range.js"],"names":[],"mappings":"AAaA;;;;;;;;;;GAUG;AACH;IAEE;;;;;;;;;;;;;MAIE;IAKA;;OAEG;IACH,kBAAsB;IAEtB;;OAEG;IACH,mBAAqB;IAOrB;;OAEG;IACH,cAFU,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,CAEQ;IAEjD;;OAEG;IACH,gCAEE;IAuBJ;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAED;;OAEG;IACH,oBAkEC;;CACF;2BAzKgC,KAAK"}
@@ -1 +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;IAWD;;OAEG;IACH,oBAqCC;;CACF;AAID;;;;;;;;GAQG;AACH;IAEE;;;;;;;MAKC;IAKC;;OAEG;IACH,cAAoB;IAEpB;;OAEG;IACH,YAAkB;IAGpB;;OAEG;IACH,qBAEC;IASD;;OAEG;IACH,cAEC;IAED;;OAEG;IACH,+CAEC;;CACF;2BA1LyC,KAAK"}
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;IAWD;;OAEG;IACH,oBAuCC;;CACF;AAID;;;;;;;;GAQG;AACH;IAEE;;;;;;;MAKC;IAKC;;OAEG;IACH,cAAoB;IAEpB;;OAEG;IACH,YAAkB;IAGpB;;OAEG;IACH,qBAEC;IASD;;OAEG;IACH,cAEC;IAED;;OAEG;IACH,+CAEC;;CACF;2BA5LyC,KAAK"}
@@ -81,4 +81,5 @@ export const ELEMENT_CONFIG: Readonly<{
81
81
  expandMultipleResults: true;
82
82
  }>;
83
83
  export const ELEMENT_PROPERTIES: string[];
84
+ export const DATE_TIME_FORMAT: "YYYY-MM-DD";
84
85
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/enums/config.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;GAEF;AAEH,0CAmBE"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/enums/config.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;GAEF;AAEH,0CAmBE;AAEF,+BAAgC,YAAY,CAAC"}
@@ -1,2 +1,2 @@
1
- export { ELEMENT_CONFIG, ELEMENT_PROPERTIES } from "./config";
1
+ export { ELEMENT_CONFIG, ELEMENT_PROPERTIES, DATE_TIME_FORMAT } from "./config";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -9,6 +9,7 @@ export { default as toggleAccordion } from "./toggle-accordion";
9
9
  export { default as getValue } from "./get-value";
10
10
  export { default as capitalize } from "./capitalize";
11
11
  export { default as mergeHighlightIndices } from "./merge-highlight-indices";
12
+ export { default as isDate } from "./is-date";
12
13
  export { intersects, within } from "./spatial";
13
14
  export { indexItems, filter } from "./filter-client";
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Checks if the filterObject format is date-like.
3
+ *
4
+ * @param {Object} filterObject - The filter object.
5
+ * @returns {boolean} True if it is a date, otherwise false.
6
+ */
7
+ export default function isDate(filterObject: any): boolean;
8
+ //# sourceMappingURL=is-date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-date.d.ts","sourceRoot":"","sources":["../../src/helpers/is-date.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,mDAFa,OAAO,CAInB"}