@record-evolution/widget-filter-dropdown 1.0.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 widget-linechart
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # \<widget-filter-dropdown>
2
+
3
+ A filter dropdown widget using Material Design components for IronFlock dashboards.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm i @record-evolution/widget-filter-dropdown
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Import Map Requirement
14
+
15
+ This widget uses Material Web components as external dependencies. You **must** provide an import map in your consuming application to resolve `@material/web` imports.
16
+
17
+ **Option 1: Load from CDN**
18
+
19
+ ```html
20
+ <script type="importmap">
21
+ {
22
+ "imports": {
23
+ "@material/web/": "https://cdn.jsdelivr.net/npm/@material/web@2.4.0/"
24
+ }
25
+ }
26
+ </script>
27
+ ```
28
+
29
+ **Option 2: Load from local node_modules** (if you have `@material/web` installed)
30
+
31
+ ```html
32
+ <script type="importmap">
33
+ {
34
+ "imports": {
35
+ "@material/web/": "/node_modules/@material/web/"
36
+ }
37
+ }
38
+ </script>
39
+ ```
40
+
41
+ **Important:** If your consuming application also uses Material Web components and bundles them with Vite, you must externalize `@material/web` in your Vite config:
42
+
43
+ ```typescript
44
+ // vite.config.ts
45
+ export default defineConfig({
46
+ build: {
47
+ rollupOptions: {
48
+ external: [/^@material\/web/]
49
+ }
50
+ }
51
+ })
52
+ ```
53
+
54
+ ### Loading the Widget
55
+
56
+ ```html
57
+ <!-- Define import map first -->
58
+ <script type="importmap">
59
+ {
60
+ "imports": {
61
+ "@material/web/": "https://cdn.jsdelivr.net/npm/@material/web@2.4.0/"
62
+ }
63
+ }
64
+ </script>
65
+
66
+ <!-- Then load the widget -->
67
+ <script type="module">
68
+ import 'https://cdn.jsdelivr.net/npm/@record-evolution/widget-filter-dropdown@1.0.0/dist/widget-filter-dropdown.js'
69
+ </script>
70
+
71
+ <widget-filter-dropdown-1.0.0></widget-filter-dropdown-1.0.0>
72
+ ```
73
+
74
+ ## Expected Data Format
75
+
76
+ The widget accepts configuration matching the `definition-schema.json`:
77
+
78
+ ```json
79
+ {
80
+ "label": "Select Device Type",
81
+ "parameterKey": "deviceType",
82
+ "data": [
83
+ {
84
+ "label": "Temperature Sensor",
85
+ "value": "temp_sensor"
86
+ },
87
+ {
88
+ "label": "Humidity Sensor",
89
+ "value": "humidity_sensor"
90
+ }
91
+ ]
92
+ }
93
+ ```
94
+
95
+ ### Properties
96
+
97
+ - **label** (string): Display label shown above the dropdown
98
+ - **parameterKey** (string): Key used to identify this filter parameter in events
99
+ - **data** (array): List of dropdown options
100
+ - **label** (string): Display text for the option
101
+ - **value** (string): Value sent in the filter-change event
102
+
103
+ ### Events
104
+
105
+ The widget dispatches a `filter-change` event when a selection is made:
106
+
107
+ ```javascript
108
+ {
109
+ detail: {
110
+ parameterKey: "deviceType",
111
+ value: "temp_sensor"
112
+ }
113
+ }
114
+ ```
115
+
116
+ ## Development
117
+
118
+ ### Local Development
119
+
120
+ To develop the widget locally:
121
+
122
+ ```bash
123
+ npm start
124
+ ```
125
+
126
+ This starts a development server at `localhost:8000/demo/` serving `demo/index.html`.
127
+
128
+ ### Building
129
+
130
+ ```bash
131
+ npm run build
132
+ ```
133
+
134
+ ### Releasing
135
+
136
+ ```bash
137
+ npm run release
138
+ ```
139
+
140
+ This automatically bumps the patch version, builds, and pushes to GitHub. The GitHub Action will publish to npm.
141
+
142
+ ## Tooling configs
143
+
144
+ For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
145
+
146
+ If you customize the configuration a lot, you can consider moving them to individual files.
@@ -0,0 +1,657 @@
1
+ import "@material/web/select/outlined-select.js";
2
+ import "@material/web/select/select-option.js";
3
+ const M = globalThis, z = M.ShadowRoot && (M.ShadyCSS === void 0 || M.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, B = /* @__PURE__ */ Symbol(), K = /* @__PURE__ */ new WeakMap();
4
+ let it = class {
5
+ constructor(t, e, s) {
6
+ if (this._$cssResult$ = !0, s !== B) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
7
+ this.cssText = t, this.t = e;
8
+ }
9
+ get styleSheet() {
10
+ let t = this.o;
11
+ const e = this.t;
12
+ if (z && t === void 0) {
13
+ const s = e !== void 0 && e.length === 1;
14
+ s && (t = K.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && K.set(e, t));
15
+ }
16
+ return t;
17
+ }
18
+ toString() {
19
+ return this.cssText;
20
+ }
21
+ };
22
+ const at = (r) => new it(typeof r == "string" ? r : r + "", void 0, B), lt = (r, ...t) => {
23
+ const e = r.length === 1 ? r[0] : t.reduce(((s, i, o) => s + ((n) => {
24
+ if (n._$cssResult$ === !0) return n.cssText;
25
+ if (typeof n == "number") return n;
26
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
27
+ })(i) + r[o + 1]), r[0]);
28
+ return new it(e, r, B);
29
+ }, ct = (r, t) => {
30
+ if (z) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
31
+ else for (const e of t) {
32
+ const s = document.createElement("style"), i = M.litNonce;
33
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
34
+ }
35
+ }, J = z ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
36
+ let e = "";
37
+ for (const s of t.cssRules) e += s.cssText;
38
+ return at(e);
39
+ })(r) : r;
40
+ const { is: dt, defineProperty: pt, getOwnPropertyDescriptor: ut, getOwnPropertyNames: $t, getOwnPropertySymbols: ft, getPrototypeOf: mt } = Object, R = globalThis, Z = R.trustedTypes, _t = Z ? Z.emptyScript : "", gt = R.reactiveElementPolyfillSupport, w = (r, t) => r, H = { toAttribute(r, t) {
41
+ switch (t) {
42
+ case Boolean:
43
+ r = r ? _t : null;
44
+ break;
45
+ case Object:
46
+ case Array:
47
+ r = r == null ? r : JSON.stringify(r);
48
+ }
49
+ return r;
50
+ }, fromAttribute(r, t) {
51
+ let e = r;
52
+ switch (t) {
53
+ case Boolean:
54
+ e = r !== null;
55
+ break;
56
+ case Number:
57
+ e = r === null ? null : Number(r);
58
+ break;
59
+ case Object:
60
+ case Array:
61
+ try {
62
+ e = JSON.parse(r);
63
+ } catch {
64
+ e = null;
65
+ }
66
+ }
67
+ return e;
68
+ } }, L = (r, t) => !dt(r, t), F = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: L };
69
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
70
+ let v = class extends HTMLElement {
71
+ static addInitializer(t) {
72
+ this._$Ei(), (this.l ??= []).push(t);
73
+ }
74
+ static get observedAttributes() {
75
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
76
+ }
77
+ static createProperty(t, e = F) {
78
+ if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
79
+ const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
80
+ i !== void 0 && pt(this.prototype, t, i);
81
+ }
82
+ }
83
+ static getPropertyDescriptor(t, e, s) {
84
+ const { get: i, set: o } = ut(this.prototype, t) ?? { get() {
85
+ return this[e];
86
+ }, set(n) {
87
+ this[e] = n;
88
+ } };
89
+ return { get: i, set(n) {
90
+ const a = i?.call(this);
91
+ o?.call(this, n), this.requestUpdate(t, a, s);
92
+ }, configurable: !0, enumerable: !0 };
93
+ }
94
+ static getPropertyOptions(t) {
95
+ return this.elementProperties.get(t) ?? F;
96
+ }
97
+ static _$Ei() {
98
+ if (this.hasOwnProperty(w("elementProperties"))) return;
99
+ const t = mt(this);
100
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
101
+ }
102
+ static finalize() {
103
+ if (this.hasOwnProperty(w("finalized"))) return;
104
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(w("properties"))) {
105
+ const e = this.properties, s = [...$t(e), ...ft(e)];
106
+ for (const i of s) this.createProperty(i, e[i]);
107
+ }
108
+ const t = this[Symbol.metadata];
109
+ if (t !== null) {
110
+ const e = litPropertyMetadata.get(t);
111
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
112
+ }
113
+ this._$Eh = /* @__PURE__ */ new Map();
114
+ for (const [e, s] of this.elementProperties) {
115
+ const i = this._$Eu(e, s);
116
+ i !== void 0 && this._$Eh.set(i, e);
117
+ }
118
+ this.elementStyles = this.finalizeStyles(this.styles);
119
+ }
120
+ static finalizeStyles(t) {
121
+ const e = [];
122
+ if (Array.isArray(t)) {
123
+ const s = new Set(t.flat(1 / 0).reverse());
124
+ for (const i of s) e.unshift(J(i));
125
+ } else t !== void 0 && e.push(J(t));
126
+ return e;
127
+ }
128
+ static _$Eu(t, e) {
129
+ const s = e.attribute;
130
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
131
+ }
132
+ constructor() {
133
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
134
+ }
135
+ _$Ev() {
136
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
137
+ }
138
+ addController(t) {
139
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
140
+ }
141
+ removeController(t) {
142
+ this._$EO?.delete(t);
143
+ }
144
+ _$E_() {
145
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
146
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
147
+ t.size > 0 && (this._$Ep = t);
148
+ }
149
+ createRenderRoot() {
150
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
151
+ return ct(t, this.constructor.elementStyles), t;
152
+ }
153
+ connectedCallback() {
154
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
155
+ }
156
+ enableUpdating(t) {
157
+ }
158
+ disconnectedCallback() {
159
+ this._$EO?.forEach(((t) => t.hostDisconnected?.()));
160
+ }
161
+ attributeChangedCallback(t, e, s) {
162
+ this._$AK(t, s);
163
+ }
164
+ _$ET(t, e) {
165
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
166
+ if (i !== void 0 && s.reflect === !0) {
167
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : H).toAttribute(e, s.type);
168
+ this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
169
+ }
170
+ }
171
+ _$AK(t, e) {
172
+ const s = this.constructor, i = s._$Eh.get(t);
173
+ if (i !== void 0 && this._$Em !== i) {
174
+ const o = s.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
175
+ this._$Em = i;
176
+ const a = n.fromAttribute(e, o.type);
177
+ this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
178
+ }
179
+ }
180
+ requestUpdate(t, e, s) {
181
+ if (t !== void 0) {
182
+ const i = this.constructor, o = this[t];
183
+ if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? L)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
184
+ this.C(t, e, s);
185
+ }
186
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
187
+ }
188
+ C(t, e, { useDefault: s, reflect: i, wrapped: o }, n) {
189
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
190
+ }
191
+ async _$EP() {
192
+ this.isUpdatePending = !0;
193
+ try {
194
+ await this._$ES;
195
+ } catch (e) {
196
+ Promise.reject(e);
197
+ }
198
+ const t = this.scheduleUpdate();
199
+ return t != null && await t, !this.isUpdatePending;
200
+ }
201
+ scheduleUpdate() {
202
+ return this.performUpdate();
203
+ }
204
+ performUpdate() {
205
+ if (!this.isUpdatePending) return;
206
+ if (!this.hasUpdated) {
207
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
208
+ for (const [i, o] of this._$Ep) this[i] = o;
209
+ this._$Ep = void 0;
210
+ }
211
+ const s = this.constructor.elementProperties;
212
+ if (s.size > 0) for (const [i, o] of s) {
213
+ const { wrapped: n } = o, a = this[i];
214
+ n !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, o, a);
215
+ }
216
+ }
217
+ let t = !1;
218
+ const e = this._$AL;
219
+ try {
220
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
221
+ } catch (s) {
222
+ throw t = !1, this._$EM(), s;
223
+ }
224
+ t && this._$AE(e);
225
+ }
226
+ willUpdate(t) {
227
+ }
228
+ _$AE(t) {
229
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
230
+ }
231
+ _$EM() {
232
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
233
+ }
234
+ get updateComplete() {
235
+ return this.getUpdateComplete();
236
+ }
237
+ getUpdateComplete() {
238
+ return this._$ES;
239
+ }
240
+ shouldUpdate(t) {
241
+ return !0;
242
+ }
243
+ update(t) {
244
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
245
+ }
246
+ updated(t) {
247
+ }
248
+ firstUpdated(t) {
249
+ }
250
+ };
251
+ v.elementStyles = [], v.shadowRootOptions = { mode: "open" }, v[w("elementProperties")] = /* @__PURE__ */ new Map(), v[w("finalized")] = /* @__PURE__ */ new Map(), gt?.({ ReactiveElement: v }), (R.reactiveElementVersions ??= []).push("2.1.1");
252
+ const V = globalThis, N = V.trustedTypes, G = N ? N.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, rt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, ot = "?" + m, yt = `<${ot}>`, y = document, P = () => y.createComment(""), x = (r) => r === null || typeof r != "object" && typeof r != "function", I = Array.isArray, At = (r) => I(r) || typeof r?.[Symbol.iterator] == "function", k = `[
253
+ \f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, _ = RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
254
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Y = /'/g, tt = /"/g, nt = /^(?:script|style|textarea|title)$/i, vt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), et = vt(1), b = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), g = y.createTreeWalker(y, 129);
255
+ function ht(r, t) {
256
+ if (!I(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
257
+ return G !== void 0 ? G.createHTML(t) : t;
258
+ }
259
+ const bt = (r, t) => {
260
+ const e = r.length - 1, s = [];
261
+ let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = S;
262
+ for (let a = 0; a < e; a++) {
263
+ const h = r[a];
264
+ let c, p, l = -1, u = 0;
265
+ for (; u < h.length && (n.lastIndex = u, p = n.exec(h), p !== null); ) u = n.lastIndex, n === S ? p[1] === "!--" ? n = Q : p[1] !== void 0 ? n = X : p[2] !== void 0 ? (nt.test(p[2]) && (i = RegExp("</" + p[2], "g")), n = _) : p[3] !== void 0 && (n = _) : n === _ ? p[0] === ">" ? (n = i ?? S, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? tt : Y) : n === tt || n === Y ? n = _ : n === Q || n === X ? n = S : (n = _, i = void 0);
266
+ const f = n === _ && r[a + 1].startsWith("/>") ? " " : "";
267
+ o += n === S ? h + yt : l >= 0 ? (s.push(c), h.slice(0, l) + rt + h.slice(l) + m + f) : h + m + (l === -2 ? a : f);
268
+ }
269
+ return [ht(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
270
+ };
271
+ class O {
272
+ constructor({ strings: t, _$litType$: e }, s) {
273
+ let i;
274
+ this.parts = [];
275
+ let o = 0, n = 0;
276
+ const a = t.length - 1, h = this.parts, [c, p] = bt(t, e);
277
+ if (this.el = O.createElement(c, s), g.currentNode = this.el.content, e === 2 || e === 3) {
278
+ const l = this.el.content.firstChild;
279
+ l.replaceWith(...l.childNodes);
280
+ }
281
+ for (; (i = g.nextNode()) !== null && h.length < a; ) {
282
+ if (i.nodeType === 1) {
283
+ if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(rt)) {
284
+ const u = p[n++], f = i.getAttribute(l).split(m), T = /([.?@])?(.*)/.exec(u);
285
+ h.push({ type: 1, index: o, name: T[2], strings: f, ctor: T[1] === "." ? St : T[1] === "?" ? wt : T[1] === "@" ? Ct : D }), i.removeAttribute(l);
286
+ } else l.startsWith(m) && (h.push({ type: 6, index: o }), i.removeAttribute(l));
287
+ if (nt.test(i.tagName)) {
288
+ const l = i.textContent.split(m), u = l.length - 1;
289
+ if (u > 0) {
290
+ i.textContent = N ? N.emptyScript : "";
291
+ for (let f = 0; f < u; f++) i.append(l[f], P()), g.nextNode(), h.push({ type: 2, index: ++o });
292
+ i.append(l[u], P());
293
+ }
294
+ }
295
+ } else if (i.nodeType === 8) if (i.data === ot) h.push({ type: 2, index: o });
296
+ else {
297
+ let l = -1;
298
+ for (; (l = i.data.indexOf(m, l + 1)) !== -1; ) h.push({ type: 7, index: o }), l += m.length - 1;
299
+ }
300
+ o++;
301
+ }
302
+ }
303
+ static createElement(t, e) {
304
+ const s = y.createElement("template");
305
+ return s.innerHTML = t, s;
306
+ }
307
+ }
308
+ function E(r, t, e = r, s) {
309
+ if (t === b) return t;
310
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
311
+ const o = x(t) ? void 0 : t._$litDirective$;
312
+ return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = E(r, i._$AS(r, t.values), i, s)), t;
313
+ }
314
+ class Et {
315
+ constructor(t, e) {
316
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
317
+ }
318
+ get parentNode() {
319
+ return this._$AM.parentNode;
320
+ }
321
+ get _$AU() {
322
+ return this._$AM._$AU;
323
+ }
324
+ u(t) {
325
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? y).importNode(e, !0);
326
+ g.currentNode = i;
327
+ let o = g.nextNode(), n = 0, a = 0, h = s[0];
328
+ for (; h !== void 0; ) {
329
+ if (n === h.index) {
330
+ let c;
331
+ h.type === 2 ? c = new U(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new Pt(o, this, t)), this._$AV.push(c), h = s[++a];
332
+ }
333
+ n !== h?.index && (o = g.nextNode(), n++);
334
+ }
335
+ return g.currentNode = y, i;
336
+ }
337
+ p(t) {
338
+ let e = 0;
339
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
340
+ }
341
+ }
342
+ class U {
343
+ get _$AU() {
344
+ return this._$AM?._$AU ?? this._$Cv;
345
+ }
346
+ constructor(t, e, s, i) {
347
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
348
+ }
349
+ get parentNode() {
350
+ let t = this._$AA.parentNode;
351
+ const e = this._$AM;
352
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
353
+ }
354
+ get startNode() {
355
+ return this._$AA;
356
+ }
357
+ get endNode() {
358
+ return this._$AB;
359
+ }
360
+ _$AI(t, e = this) {
361
+ t = E(this, t, e), x(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== b && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
362
+ }
363
+ O(t) {
364
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
365
+ }
366
+ T(t) {
367
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
368
+ }
369
+ _(t) {
370
+ this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(y.createTextNode(t)), this._$AH = t;
371
+ }
372
+ $(t) {
373
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(ht(s.h, s.h[0]), this.options)), s);
374
+ if (this._$AH?._$AD === i) this._$AH.p(e);
375
+ else {
376
+ const o = new Et(i, this), n = o.u(this.options);
377
+ o.p(e), this.T(n), this._$AH = o;
378
+ }
379
+ }
380
+ _$AC(t) {
381
+ let e = st.get(t.strings);
382
+ return e === void 0 && st.set(t.strings, e = new O(t)), e;
383
+ }
384
+ k(t) {
385
+ I(this._$AH) || (this._$AH = [], this._$AR());
386
+ const e = this._$AH;
387
+ let s, i = 0;
388
+ for (const o of t) i === e.length ? e.push(s = new U(this.O(P()), this.O(P()), this, this.options)) : s = e[i], s._$AI(o), i++;
389
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
390
+ }
391
+ _$AR(t = this._$AA.nextSibling, e) {
392
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
393
+ const s = t.nextSibling;
394
+ t.remove(), t = s;
395
+ }
396
+ }
397
+ setConnected(t) {
398
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
399
+ }
400
+ }
401
+ class D {
402
+ get tagName() {
403
+ return this.element.tagName;
404
+ }
405
+ get _$AU() {
406
+ return this._$AM._$AU;
407
+ }
408
+ constructor(t, e, s, i, o) {
409
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
410
+ }
411
+ _$AI(t, e = this, s, i) {
412
+ const o = this.strings;
413
+ let n = !1;
414
+ if (o === void 0) t = E(this, t, e, 0), n = !x(t) || t !== this._$AH && t !== b, n && (this._$AH = t);
415
+ else {
416
+ const a = t;
417
+ let h, c;
418
+ for (t = o[0], h = 0; h < o.length - 1; h++) c = E(this, a[s + h], e, h), c === b && (c = this._$AH[h]), n ||= !x(c) || c !== this._$AH[h], c === d ? t = d : t !== d && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c;
419
+ }
420
+ n && !i && this.j(t);
421
+ }
422
+ j(t) {
423
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
424
+ }
425
+ }
426
+ class St extends D {
427
+ constructor() {
428
+ super(...arguments), this.type = 3;
429
+ }
430
+ j(t) {
431
+ this.element[this.name] = t === d ? void 0 : t;
432
+ }
433
+ }
434
+ class wt extends D {
435
+ constructor() {
436
+ super(...arguments), this.type = 4;
437
+ }
438
+ j(t) {
439
+ this.element.toggleAttribute(this.name, !!t && t !== d);
440
+ }
441
+ }
442
+ class Ct extends D {
443
+ constructor(t, e, s, i, o) {
444
+ super(t, e, s, i, o), this.type = 5;
445
+ }
446
+ _$AI(t, e = this) {
447
+ if ((t = E(this, t, e, 0) ?? d) === b) return;
448
+ const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== d && (s === d || i);
449
+ i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
450
+ }
451
+ handleEvent(t) {
452
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
453
+ }
454
+ }
455
+ class Pt {
456
+ constructor(t, e, s) {
457
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
458
+ }
459
+ get _$AU() {
460
+ return this._$AM._$AU;
461
+ }
462
+ _$AI(t) {
463
+ E(this, t);
464
+ }
465
+ }
466
+ const xt = V.litHtmlPolyfillSupport;
467
+ xt?.(O, U), (V.litHtmlVersions ??= []).push("3.3.1");
468
+ const Ot = (r, t, e) => {
469
+ const s = e?.renderBefore ?? t;
470
+ let i = s._$litPart$;
471
+ if (i === void 0) {
472
+ const o = e?.renderBefore ?? null;
473
+ s._$litPart$ = i = new U(t.insertBefore(P(), o), o, void 0, e ?? {});
474
+ }
475
+ return i._$AI(r), i;
476
+ };
477
+ const q = globalThis;
478
+ class C extends v {
479
+ constructor() {
480
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
481
+ }
482
+ createRenderRoot() {
483
+ const t = super.createRenderRoot();
484
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
485
+ }
486
+ update(t) {
487
+ const e = this.render();
488
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ot(e, this.renderRoot, this.renderOptions);
489
+ }
490
+ connectedCallback() {
491
+ super.connectedCallback(), this._$Do?.setConnected(!0);
492
+ }
493
+ disconnectedCallback() {
494
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
495
+ }
496
+ render() {
497
+ return b;
498
+ }
499
+ }
500
+ C._$litElement$ = !0, C.finalized = !0, q.litElementHydrateSupport?.({ LitElement: C });
501
+ const Ut = q.litElementPolyfillSupport;
502
+ Ut?.({ LitElement: C });
503
+ (q.litElementVersions ??= []).push("4.2.1");
504
+ const Tt = (r) => (t, e) => {
505
+ e !== void 0 ? e.addInitializer((() => {
506
+ customElements.define(r, t);
507
+ })) : customElements.define(r, t);
508
+ };
509
+ const Mt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: L }, Ht = (r = Mt, t, e) => {
510
+ const { kind: s, metadata: i } = e;
511
+ let o = globalThis.litPropertyMetadata.get(i);
512
+ if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), o.set(e.name, r), s === "accessor") {
513
+ const { name: n } = e;
514
+ return { set(a) {
515
+ const h = t.get.call(this);
516
+ t.set.call(this, a), this.requestUpdate(n, h, r);
517
+ }, init(a) {
518
+ return a !== void 0 && this.C(n, void 0, r, a), a;
519
+ } };
520
+ }
521
+ if (s === "setter") {
522
+ const { name: n } = e;
523
+ return function(a) {
524
+ const h = this[n];
525
+ t.call(this, a), this.requestUpdate(n, h, r);
526
+ };
527
+ }
528
+ throw Error("Unsupported decorator location: " + s);
529
+ };
530
+ function j(r) {
531
+ return (t, e) => typeof e == "object" ? Ht(r, t, e) : ((s, i, o) => {
532
+ const n = i.hasOwnProperty(o);
533
+ return i.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
534
+ })(r, t, e);
535
+ }
536
+ function W(r) {
537
+ return j({ ...r, state: !0, attribute: !1 });
538
+ }
539
+ var Nt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, A = (r, t, e, s) => {
540
+ for (var i = s > 1 ? void 0 : s ? Rt(t, e) : t, o = r.length - 1, n; o >= 0; o--)
541
+ (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
542
+ return s && i && Nt(t, e, i), i;
543
+ };
544
+ let $ = class extends C {
545
+ constructor() {
546
+ super(...arguments), this.version = "1.0.3";
547
+ }
548
+ update(r) {
549
+ r.has("theme") && this.registerTheme(this.theme), super.update(r);
550
+ }
551
+ firstUpdated(r) {
552
+ this.registerTheme(this.theme);
553
+ }
554
+ registerTheme(r) {
555
+ const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), e = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
556
+ this.themeBgColor = e || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
557
+ }
558
+ handleSelectionChange(r) {
559
+ const t = r.target;
560
+ t.value === "" ? (this.selectedValue = void 0, setTimeout(() => {
561
+ t.reset(), t.blur();
562
+ }, 0)) : this.selectedValue = t.value;
563
+ const e = this.route?.split("?")[1] || "", s = new URLSearchParams(e);
564
+ this.inputData?.parameterKey && (this.selectedValue !== void 0 && this.selectedValue !== "" ? s.set(this.inputData.parameterKey, this.selectedValue) : s.delete(this.inputData.parameterKey));
565
+ const i = this.route?.split("?")[0] || "", o = s.toString(), n = o ? `${i}?${o}` : i, a = new CustomEvent("nav-submit", {
566
+ detail: { path: n },
567
+ bubbles: !0,
568
+ composed: !0
569
+ });
570
+ this.dispatchEvent(a);
571
+ }
572
+ render() {
573
+ const r = this.themeTitleColor || "black", t = this.themeBgColor || "transparent";
574
+ return et`
575
+ <style>
576
+ :host {
577
+ background-color: ${t};
578
+ --md-sys-color-on-surface: ${r};
579
+ --md-sys-color-on-surface-variant: ${r};
580
+ --md-sys-color-surface-container: ${t};
581
+ --md-menu-container-color: ${t};
582
+ }
583
+ </style>
584
+ <md-outlined-select
585
+ @change=${this.handleSelectionChange}
586
+ .value=${this.selectedValue ?? ""}
587
+ .label=${this.inputData?.label || "Select an option"}
588
+ >
589
+ <md-select-option value="">
590
+ <div slot="headline">---</div>
591
+ </md-select-option>
592
+ ${this.inputData?.data?.map(
593
+ (e) => et`
594
+ <md-select-option value=${e.value ?? ""}>
595
+ <div slot="headline">${e.label}</div>
596
+ </md-select-option>
597
+ `
598
+ )}
599
+ </md-outlined-select>
600
+ `;
601
+ }
602
+ };
603
+ $.styles = lt`
604
+ :host {
605
+ display: flex;
606
+ flex-direction: column;
607
+ justify-content: center;
608
+ align-items: stretch;
609
+ font-family: sans-serif;
610
+ box-sizing: border-box;
611
+ padding: 1cqh 1cqw;
612
+ width: 100%;
613
+ }
614
+
615
+ md-outlined-select {
616
+ width: 100%;
617
+ min-width: 0;
618
+ --md-outlined-select-text-field-container-shape: 4px;
619
+ --md-outlined-field-top-space: 8px;
620
+ --md-outlined-field-bottom-space: 8px;
621
+ --md-outlined-field-leading-space: 12px;
622
+ --md-outlined-field-trailing-space: 12px;
623
+ min-height: 40px;
624
+ height: 40px;
625
+ }
626
+
627
+ .filter-label {
628
+ margin-bottom: 8px;
629
+ font-size: 14px;
630
+ font-weight: 500;
631
+ }
632
+ `;
633
+ A([
634
+ j({ type: Object })
635
+ ], $.prototype, "inputData", 2);
636
+ A([
637
+ j({ type: Object })
638
+ ], $.prototype, "theme", 2);
639
+ A([
640
+ j({ type: String })
641
+ ], $.prototype, "route", 2);
642
+ A([
643
+ W()
644
+ ], $.prototype, "themeBgColor", 2);
645
+ A([
646
+ W()
647
+ ], $.prototype, "themeTitleColor", 2);
648
+ A([
649
+ W()
650
+ ], $.prototype, "selectedValue", 2);
651
+ $ = A([
652
+ Tt("widget-filter-dropdown-1.0.3")
653
+ ], $);
654
+ export {
655
+ $ as WidgetfilterDropdown
656
+ };
657
+ //# sourceMappingURL=widget-filter-dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-filter-dropdown.js","sources":["../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../src/widget-filter-dropdown.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.3.1\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.1\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { html, css, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { InputData } from './definition-schema'\n\nimport '@material/web/select/outlined-select.js'\nimport '@material/web/select/select-option.js'\n\ntype Theme = {\n theme_name: string\n theme_object: any\n}\n\nexport\n@customElement('widget-filter-dropdown-versionplaceholder')\nclass WidgetfilterDropdown extends LitElement {\n @property({ type: Object }) inputData?: InputData\n @property({ type: Object }) theme?: Theme\n @property({ type: String }) route?: string\n\n @state() private themeBgColor?: string\n @state() private themeTitleColor?: string\n @state() private selectedValue?: string\n\n version: string = 'versionplaceholder'\n\n update(changedProperties: Map<string, any>) {\n if (changedProperties.has('theme')) {\n this.registerTheme(this.theme)\n }\n\n super.update(changedProperties)\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.registerTheme(this.theme)\n }\n\n registerTheme(theme?: Theme) {\n const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()\n const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()\n this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor\n this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color\n }\n\n handleSelectionChange(event: Event) {\n const select = event.target as any\n\n // If empty option is selected, unselect the dropdown\n if (select.value === '') {\n this.selectedValue = undefined\n // Programmatically reset the select to unselected state\n setTimeout(() => {\n select.reset()\n select.blur()\n }, 0)\n } else {\n this.selectedValue = select.value\n }\n\n // Get current URL and its search parameters\n // Extract only the query string part (after ?)\n const queryString = this.route?.split('?')[1] || ''\n const searchParams = new URLSearchParams(queryString)\n\n // Set, update, or remove the parameter with the key from inputData.parameterKey\n if (this.inputData?.parameterKey) {\n if (this.selectedValue !== undefined && this.selectedValue !== '') {\n searchParams.set(this.inputData.parameterKey, this.selectedValue)\n } else {\n searchParams.delete(this.inputData.parameterKey)\n }\n }\n\n // Construct the new URL with updated parameters\n const pathPart = this.route?.split('?')[0] || ''\n const paramsString = searchParams.toString()\n const goto = paramsString ? `${pathPart}?${paramsString}` : pathPart\n\n const navEvent = new CustomEvent('nav-submit', {\n detail: { path: goto },\n bubbles: true,\n composed: true\n })\n this.dispatchEvent(navEvent)\n }\n\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n font-family: sans-serif;\n box-sizing: border-box;\n padding: 1cqh 1cqw;\n width: 100%;\n }\n\n md-outlined-select {\n width: 100%;\n min-width: 0;\n --md-outlined-select-text-field-container-shape: 4px;\n --md-outlined-field-top-space: 8px;\n --md-outlined-field-bottom-space: 8px;\n --md-outlined-field-leading-space: 12px;\n --md-outlined-field-trailing-space: 12px;\n min-height: 40px;\n height: 40px;\n }\n\n .filter-label {\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n `\n\n render() {\n const fontColor = this.themeTitleColor || 'black'\n const bgColor = this.themeBgColor || 'transparent'\n\n return html`\n <style>\n :host {\n background-color: ${bgColor};\n --md-sys-color-on-surface: ${fontColor};\n --md-sys-color-on-surface-variant: ${fontColor};\n --md-sys-color-surface-container: ${bgColor};\n --md-menu-container-color: ${bgColor};\n }\n </style>\n <md-outlined-select\n @change=${this.handleSelectionChange}\n .value=${this.selectedValue ?? ''}\n .label=${this.inputData?.label || 'Select an option'}\n >\n <md-select-option value=\"\">\n <div slot=\"headline\">---</div>\n </md-select-option>\n ${this.inputData?.data?.map(\n (item) => html`\n <md-select-option value=${item.value ?? ''}>\n <div slot=\"headline\">${item.label}</div>\n </md-select-option>\n `\n )}\n </md-outlined-select>\n `\n }\n}\n"],"names":["t","e","s","o","n$3","r","n","i","S","c","h","a","l","p","d","u","f","b","y","v","_","m","g","$","x","T","E","A","C","P","V","N","H","I","L","k","M","R","z","j","B","WidgetfilterDropdown","LitElement","changedProperties","_changedProperties","theme","cssTextColor","cssBgColor","event","select","queryString","searchParams","pathPart","paramsString","goto","navEvent","fontColor","bgColor","html","item","css","__decorateClass","property","state","customElement"],"mappings":";;AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,IAAE,uBAAM,GAAGC,IAAE,oBAAI;AAAO,IAAAC,KAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID,EAAE,OAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,KAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,EAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,i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AAA;AAAA,EAGb;AACJ;AAvIMlB,EAwEK,SAASmB;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAvEYC,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GADxBrB,EAC0B,WAAA,aAAA,CAAA;AACAoB,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAFxBrB,EAE0B,WAAA,SAAA,CAAA;AACAoB,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAHxBrB,EAG0B,WAAA,SAAA,CAAA;AAEXoB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GALLtB,EAKe,WAAA,gBAAA,CAAA;AACAoB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GANLtB,EAMe,WAAA,mBAAA,CAAA;AACAoB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAPLtB,EAOe,WAAA,iBAAA,CAAA;AAPfA,IAANoB,EAAA;AAAA,EADCG,GAAc,8BAA2C;AAAA,GACpDvB,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6]}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@record-evolution/widget-filter-dropdown",
3
+ "description": "Webcomponent widget-filter-dropdown following open-wc recommendations",
4
+ "license": "MIT",
5
+ "author": "widget-filter-dropdown",
6
+ "version": "1.0.3",
7
+ "engines": {
8
+ "node": ">=24.9.0",
9
+ "npm": ">=10.0.2"
10
+ },
11
+ "type": "module",
12
+ "main": "dist/widget-filter-dropdown.js",
13
+ "types": "dist/src/widget-filter-dropdown.d.ts",
14
+ "files": [
15
+ "dist",
16
+ "src",
17
+ "thumbnail.png"
18
+ ],
19
+ "scripts": {
20
+ "analyze": "cem analyze --litelement",
21
+ "start": "vite",
22
+ "build": "vite build",
23
+ "watch": "vite build --watch",
24
+ "link": "npm run build && npm link && cd ../RESWARM/frontend && npm link @record-evolution/widget-filter-dropdown",
25
+ "unlink": "npm unlink --global && cd ../RESWARM/frontend && npm unlink @record-evolution/widget-filter-dropdown && npm i @record-evolution/widget-filter-dropdown",
26
+ "types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
27
+ "release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag && npm run build"
28
+ },
29
+ "dependencies": {
30
+ "lit": "^3.3.2",
31
+ "@material/web": "^2.4.1"
32
+ },
33
+ "devDependencies": {
34
+ "@custom-elements-manifest/analyzer": "^0.10.5",
35
+ "@rollup/plugin-replace": "^6.0.2",
36
+ "json-schema-to-typescript": "^15.0.4",
37
+ "tslib": "^2.8.1",
38
+ "typescript": "^5.9.2",
39
+ "vite": "^7.3.1"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/RecordEvolution/widget-filter-dropdown.git"
44
+ },
45
+ "keywords": [
46
+ "widget",
47
+ "filter",
48
+ "dropdown"
49
+ ],
50
+ "bugs": {
51
+ "url": "https://github.com/RecordEvolution/widget-filter-dropdown/issues"
52
+ },
53
+ "homepage": "https://github.com/RecordEvolution/widget-filter-dropdown#readme"
54
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "label": "Select Fruit",
3
+ "parameterKey": "fruit",
4
+ "data": [
5
+ {
6
+ "label": "Apple",
7
+ "value": "apple"
8
+ },
9
+ {
10
+ "label": "Banana",
11
+ "value": "banana"
12
+ },
13
+ {
14
+ "label": "Orange",
15
+ "value": "orange"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,26 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type Label = string;
9
+ /**
10
+ * The key used to identify the parameter when referenced in data filter configurations.
11
+ */
12
+ export type ParameterKey = string;
13
+ export type Label1 = string;
14
+ export type Value = string;
15
+ export type DropdownListItems = {
16
+ label?: Label1;
17
+ value?: Value;
18
+ [k: string]: unknown;
19
+ }[];
20
+
21
+ export interface InputData {
22
+ label?: Label;
23
+ parameterKey?: ParameterKey;
24
+ data?: DropdownListItems;
25
+ [k: string]: unknown;
26
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "title": "Input Data",
3
+ "type": "object",
4
+ "properties": {
5
+ "label": {
6
+ "title": "Label",
7
+ "order": 1,
8
+ "type": "string"
9
+ },
10
+ "parameterKey": {
11
+ "title": "Parameter Key",
12
+ "order": 2,
13
+ "description": "The key used to identify the parameter when referenced in data filter configurations.",
14
+ "type": "string"
15
+ },
16
+ "data": {
17
+ "title": "Dropdown List Items",
18
+ "order": 3,
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "label": {
24
+ "title": "Label",
25
+ "order": 1,
26
+ "type": "string"
27
+ },
28
+ "value": {
29
+ "title": "Value",
30
+ "order": 2,
31
+ "type": "string"
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,150 @@
1
+ import { html, css, LitElement, PropertyValues } from 'lit'
2
+ import { customElement, property, state } from 'lit/decorators.js'
3
+ import { InputData } from './definition-schema'
4
+
5
+ import '@material/web/select/outlined-select.js'
6
+ import '@material/web/select/select-option.js'
7
+
8
+ type Theme = {
9
+ theme_name: string
10
+ theme_object: any
11
+ }
12
+
13
+ export
14
+ @customElement('widget-filter-dropdown-versionplaceholder')
15
+ class WidgetfilterDropdown extends LitElement {
16
+ @property({ type: Object }) inputData?: InputData
17
+ @property({ type: Object }) theme?: Theme
18
+ @property({ type: String }) route?: string
19
+
20
+ @state() private themeBgColor?: string
21
+ @state() private themeTitleColor?: string
22
+ @state() private selectedValue?: string
23
+
24
+ version: string = 'versionplaceholder'
25
+
26
+ update(changedProperties: Map<string, any>) {
27
+ if (changedProperties.has('theme')) {
28
+ this.registerTheme(this.theme)
29
+ }
30
+
31
+ super.update(changedProperties)
32
+ }
33
+
34
+ protected firstUpdated(_changedProperties: PropertyValues): void {
35
+ this.registerTheme(this.theme)
36
+ }
37
+
38
+ registerTheme(theme?: Theme) {
39
+ const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()
40
+ const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()
41
+ this.themeBgColor = cssBgColor || this.theme?.theme_object?.backgroundColor
42
+ this.themeTitleColor = cssTextColor || this.theme?.theme_object?.title?.textStyle?.color
43
+ }
44
+
45
+ handleSelectionChange(event: Event) {
46
+ const select = event.target as any
47
+
48
+ // If empty option is selected, unselect the dropdown
49
+ if (select.value === '') {
50
+ this.selectedValue = undefined
51
+ // Programmatically reset the select to unselected state
52
+ setTimeout(() => {
53
+ select.reset()
54
+ select.blur()
55
+ }, 0)
56
+ } else {
57
+ this.selectedValue = select.value
58
+ }
59
+
60
+ // Get current URL and its search parameters
61
+ // Extract only the query string part (after ?)
62
+ const queryString = this.route?.split('?')[1] || ''
63
+ const searchParams = new URLSearchParams(queryString)
64
+
65
+ // Set, update, or remove the parameter with the key from inputData.parameterKey
66
+ if (this.inputData?.parameterKey) {
67
+ if (this.selectedValue !== undefined && this.selectedValue !== '') {
68
+ searchParams.set(this.inputData.parameterKey, this.selectedValue)
69
+ } else {
70
+ searchParams.delete(this.inputData.parameterKey)
71
+ }
72
+ }
73
+
74
+ // Construct the new URL with updated parameters
75
+ const pathPart = this.route?.split('?')[0] || ''
76
+ const paramsString = searchParams.toString()
77
+ const goto = paramsString ? `${pathPart}?${paramsString}` : pathPart
78
+
79
+ const navEvent = new CustomEvent('nav-submit', {
80
+ detail: { path: goto },
81
+ bubbles: true,
82
+ composed: true
83
+ })
84
+ this.dispatchEvent(navEvent)
85
+ }
86
+
87
+ static styles = css`
88
+ :host {
89
+ display: flex;
90
+ flex-direction: column;
91
+ justify-content: center;
92
+ align-items: stretch;
93
+ font-family: sans-serif;
94
+ box-sizing: border-box;
95
+ padding: 1cqh 1cqw;
96
+ width: 100%;
97
+ }
98
+
99
+ md-outlined-select {
100
+ width: 100%;
101
+ min-width: 0;
102
+ --md-outlined-select-text-field-container-shape: 4px;
103
+ --md-outlined-field-top-space: 8px;
104
+ --md-outlined-field-bottom-space: 8px;
105
+ --md-outlined-field-leading-space: 12px;
106
+ --md-outlined-field-trailing-space: 12px;
107
+ min-height: 40px;
108
+ height: 40px;
109
+ }
110
+
111
+ .filter-label {
112
+ margin-bottom: 8px;
113
+ font-size: 14px;
114
+ font-weight: 500;
115
+ }
116
+ `
117
+
118
+ render() {
119
+ const fontColor = this.themeTitleColor || 'black'
120
+ const bgColor = this.themeBgColor || 'transparent'
121
+
122
+ return html`
123
+ <style>
124
+ :host {
125
+ background-color: ${bgColor};
126
+ --md-sys-color-on-surface: ${fontColor};
127
+ --md-sys-color-on-surface-variant: ${fontColor};
128
+ --md-sys-color-surface-container: ${bgColor};
129
+ --md-menu-container-color: ${bgColor};
130
+ }
131
+ </style>
132
+ <md-outlined-select
133
+ @change=${this.handleSelectionChange}
134
+ .value=${this.selectedValue ?? ''}
135
+ .label=${this.inputData?.label || 'Select an option'}
136
+ >
137
+ <md-select-option value="">
138
+ <div slot="headline">---</div>
139
+ </md-select-option>
140
+ ${this.inputData?.data?.map(
141
+ (item) => html`
142
+ <md-select-option value=${item.value ?? ''}>
143
+ <div slot="headline">${item.label}</div>
144
+ </md-select-option>
145
+ `
146
+ )}
147
+ </md-outlined-select>
148
+ `
149
+ }
150
+ }
package/thumbnail.png ADDED
Binary file