@molecule/app-price-range-slider-angular 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -9
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/price-range-slider.component.d.ts +16 -0
- package/dist/price-range-slider.component.d.ts.map +1 -1
- package/dist/price-range-slider.component.js +52 -19
- package/dist/price-range-slider.component.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-21T12:46:58.106Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-price-range-slider-angular
|
|
@@ -122,8 +122,9 @@ omits the `<span>` entirely when there is no label).
|
|
|
122
122
|
<div [class]="rowClasses()">
|
|
123
123
|
<span [class]="endpointClasses()">{{ fmt(low()) }}</span
|
|
124
124
|
><input
|
|
125
|
+
#minInput
|
|
125
126
|
type="range"
|
|
126
|
-
aria-label="
|
|
127
|
+
[attr.aria-label]="minLabel()"
|
|
127
128
|
[attr.min]="min"
|
|
128
129
|
[attr.max]="max"
|
|
129
130
|
[attr.step]="stepValue()"
|
|
@@ -131,8 +132,9 @@ omits the `<span>` entirely when there is no label).
|
|
|
131
132
|
(input)="onMinInput($event)"
|
|
132
133
|
[class]="endpointInputClasses()"
|
|
133
134
|
/><input
|
|
135
|
+
#maxInput
|
|
134
136
|
type="range"
|
|
135
|
-
aria-label="
|
|
137
|
+
[attr.aria-label]="maxLabel()"
|
|
136
138
|
[attr.min]="min"
|
|
137
139
|
[attr.max]="max"
|
|
138
140
|
[attr.step]="stepValue()"
|
|
@@ -163,8 +165,17 @@ export class PriceRangeSlider implements AfterViewInit, DoCheck {
|
|
|
163
165
|
/** The label capture wrapper, detached when there is no label. */
|
|
164
166
|
@ViewChild('labelWrap') labelWrap?: ElementRef<HTMLElement>
|
|
165
167
|
|
|
168
|
+
/** The minimum handle's input (found by template ref, never by translated label). */
|
|
169
|
+
@ViewChild('minInput') minInput?: ElementRef<HTMLInputElement>
|
|
170
|
+
|
|
171
|
+
/** The maximum handle's input. */
|
|
172
|
+
@ViewChild('maxInput') maxInput?: ElementRef<HTMLInputElement>
|
|
173
|
+
|
|
166
174
|
private readonly host: HTMLElement = inject(ElementRef).nativeElement
|
|
167
175
|
|
|
176
|
+
/** The i18n provider, read at label time so the labels follow a locale switch. */
|
|
177
|
+
private readonly i18n = useTranslation()
|
|
178
|
+
|
|
168
179
|
/**
|
|
169
180
|
* The current class map.
|
|
170
181
|
* @returns The UIClassMap.
|
|
@@ -250,6 +261,22 @@ export class PriceRangeSlider implements AfterViewInit, DoCheck {
|
|
|
250
261
|
return this.formatValue ? this.formatValue(n) : `$${n.toLocaleString()}`
|
|
251
262
|
}
|
|
252
263
|
|
|
264
|
+
/**
|
|
265
|
+
* The minimum handle's label, through `t()` so it follows the locale.
|
|
266
|
+
* @returns The translated label.
|
|
267
|
+
*/
|
|
268
|
+
minLabel(): string {
|
|
269
|
+
return this.i18n.t('priceRangeSlider.aria.minimum', undefined, { defaultValue: 'Minimum' })
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The maximum handle's label, through `t()` so it follows the locale.
|
|
274
|
+
* @returns The translated label.
|
|
275
|
+
*/
|
|
276
|
+
maxLabel(): string {
|
|
277
|
+
return this.i18n.t('priceRangeSlider.aria.maximum', undefined, { defaultValue: 'Maximum' })
|
|
278
|
+
}
|
|
279
|
+
|
|
253
280
|
/**
|
|
254
281
|
* The label input's text (a string input renders as text; a projected node
|
|
255
282
|
* label renders through the capture point instead).
|
|
@@ -277,8 +304,8 @@ export class PriceRangeSlider implements AfterViewInit, DoCheck {
|
|
|
277
304
|
* edit, and React re-writes the property on every re-render.
|
|
278
305
|
*/
|
|
279
306
|
private syncInputs(): void {
|
|
280
|
-
const minEl = this.
|
|
281
|
-
const maxEl = this.
|
|
307
|
+
const minEl = this.minInput?.nativeElement
|
|
308
|
+
const maxEl = this.maxInput?.nativeElement
|
|
282
309
|
if (minEl && minEl.value !== String(this.low())) minEl.value = String(this.low())
|
|
283
310
|
if (maxEl && maxEl.value !== String(this.high())) maxEl.value = String(this.high())
|
|
284
311
|
}
|
|
@@ -353,7 +380,13 @@ Peer dependencies:
|
|
|
353
380
|
- `@molecule/app-ui-angular`
|
|
354
381
|
|
|
355
382
|
The default `formatValue` renders US-style dollars (`$1,000`) — always pass
|
|
356
|
-
your own formatter for non-USD apps. The two sliders
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
383
|
+
your own formatter for non-USD apps. The two sliders' aria-labels
|
|
384
|
+
("Minimum"/"Maximum") translate through `t()`
|
|
385
|
+
(`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
|
|
386
|
+
follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
|
|
387
|
+
The optional `label` is projected `[slot=label]` content (or a string
|
|
388
|
+
`label` input).
|
|
389
|
+
|
|
390
|
+
## Translations
|
|
391
|
+
|
|
392
|
+
Translation strings are provided by `@molecule/app-locales-price-range-slider`.
|
package/dist/index.d.ts
CHANGED
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
37
|
* The default `formatValue` renders US-style dollars (`$1,000`) — always pass
|
|
38
|
-
* your own formatter for non-USD apps. The two sliders
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* your own formatter for non-USD apps. The two sliders' aria-labels
|
|
39
|
+
* ("Minimum"/"Maximum") translate through `t()`
|
|
40
|
+
* (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
|
|
41
|
+
* follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
|
|
42
|
+
* The optional `label` is projected `[slot=label]` content (or a string
|
|
43
|
+
* `label` input).
|
|
42
44
|
*
|
|
43
45
|
* @module
|
|
44
46
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,cAAc,mCAAmC,CAAA;AACjD,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
37
|
* The default `formatValue` renders US-style dollars (`$1,000`) — always pass
|
|
38
|
-
* your own formatter for non-USD apps. The two sliders
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* your own formatter for non-USD apps. The two sliders' aria-labels
|
|
39
|
+
* ("Minimum"/"Maximum") translate through `t()`
|
|
40
|
+
* (`priceRangeSlider.aria.minimum`/`priceRangeSlider.aria.maximum`), so they
|
|
41
|
+
* follow the active locale. Requires a wired ClassMap bond (`getClassMap()`).
|
|
42
|
+
* The optional `label` is projected `[slot=label]` content (or a string
|
|
43
|
+
* `label` input).
|
|
42
44
|
*
|
|
43
45
|
* @module
|
|
44
46
|
*/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,cAAc,mCAAmC,CAAA;AACjD,cAAc,YAAY,CAAA"}
|
|
@@ -40,7 +40,13 @@ export declare class PriceRangeSlider implements AfterViewInit, DoCheck {
|
|
|
40
40
|
onChange?: (value: [number, number]) => void;
|
|
41
41
|
/** The label capture wrapper, detached when there is no label. */
|
|
42
42
|
labelWrap?: ElementRef<HTMLElement>;
|
|
43
|
+
/** The minimum handle's input (found by template ref, never by translated label). */
|
|
44
|
+
minInput?: ElementRef<HTMLInputElement>;
|
|
45
|
+
/** The maximum handle's input. */
|
|
46
|
+
maxInput?: ElementRef<HTMLInputElement>;
|
|
43
47
|
private readonly host;
|
|
48
|
+
/** The i18n provider, read at label time so the labels follow a locale switch. */
|
|
49
|
+
private readonly i18n;
|
|
44
50
|
/**
|
|
45
51
|
* The current class map.
|
|
46
52
|
* @returns The UIClassMap.
|
|
@@ -96,6 +102,16 @@ export declare class PriceRangeSlider implements AfterViewInit, DoCheck {
|
|
|
96
102
|
* @returns The formatted label.
|
|
97
103
|
*/
|
|
98
104
|
fmt(n: number): string;
|
|
105
|
+
/**
|
|
106
|
+
* The minimum handle's label, through `t()` so it follows the locale.
|
|
107
|
+
* @returns The translated label.
|
|
108
|
+
*/
|
|
109
|
+
minLabel(): string;
|
|
110
|
+
/**
|
|
111
|
+
* The maximum handle's label, through `t()` so it follows the locale.
|
|
112
|
+
* @returns The translated label.
|
|
113
|
+
*/
|
|
114
|
+
maxLabel(): string;
|
|
99
115
|
/**
|
|
100
116
|
* The label input's text (a string input renders as text; a projected node
|
|
101
117
|
* label renders through the capture point instead).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-range-slider.component.d.ts","sourceRoot":"","sources":["../src/price-range-slider.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UA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B;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,oBAAoB,IAAI,MAAM;IAI9B;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,GAAG,IAAI,MAAM;IAIb;;;OAGG;IACH,IAAI,IAAI,MAAM;IAId;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAItB;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,SAAS,IAAI,MAAM;IAInB,oEAAoE;IACpE,eAAe,IAAI,IAAI;IAKvB,sFAAsF;IACtF,SAAS,IAAI,IAAI;IAKjB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAOlB,4EAA4E;IAC5E,OAAO,CAAC,SAAS;IAUjB;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAIhB;;;;;;;OAOG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAM9B;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;yCA7MnB,gBAAgB;2CAAhB,gBAAgB;CAkN5B"}
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { Component, ElementRef, inject, ViewChild, } from '@angular/core';
|
|
7
|
+
import { useTranslation } from '@molecule/app-angular';
|
|
7
8
|
import { getClassMap } from '@molecule/app-ui';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
const _c0 = ["labelWrap"];
|
|
10
|
-
const _c1 = [
|
|
11
|
-
const _c2 = ["
|
|
11
|
+
const _c1 = ["minInput"];
|
|
12
|
+
const _c2 = ["maxInput"];
|
|
13
|
+
const _c3 = [[["", "slot", "label"]]];
|
|
14
|
+
const _c4 = ["[slot=label]"];
|
|
12
15
|
/**
|
|
13
16
|
* Whether an ng-content capture point received any element or text node.
|
|
14
17
|
*
|
|
@@ -60,7 +63,13 @@ export class PriceRangeSlider {
|
|
|
60
63
|
onChange;
|
|
61
64
|
/** The label capture wrapper, detached when there is no label. */
|
|
62
65
|
labelWrap;
|
|
66
|
+
/** The minimum handle's input (found by template ref, never by translated label). */
|
|
67
|
+
minInput;
|
|
68
|
+
/** The maximum handle's input. */
|
|
69
|
+
maxInput;
|
|
63
70
|
host = inject(ElementRef).nativeElement;
|
|
71
|
+
/** The i18n provider, read at label time so the labels follow a locale switch. */
|
|
72
|
+
i18n = useTranslation();
|
|
64
73
|
/**
|
|
65
74
|
* The current class map.
|
|
66
75
|
* @returns The UIClassMap.
|
|
@@ -136,6 +145,20 @@ export class PriceRangeSlider {
|
|
|
136
145
|
fmt(n) {
|
|
137
146
|
return this.formatValue ? this.formatValue(n) : `$${n.toLocaleString()}`;
|
|
138
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* The minimum handle's label, through `t()` so it follows the locale.
|
|
150
|
+
* @returns The translated label.
|
|
151
|
+
*/
|
|
152
|
+
minLabel() {
|
|
153
|
+
return this.i18n.t('priceRangeSlider.aria.minimum', undefined, { defaultValue: 'Minimum' });
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The maximum handle's label, through `t()` so it follows the locale.
|
|
157
|
+
* @returns The translated label.
|
|
158
|
+
*/
|
|
159
|
+
maxLabel() {
|
|
160
|
+
return this.i18n.t('priceRangeSlider.aria.maximum', undefined, { defaultValue: 'Maximum' });
|
|
161
|
+
}
|
|
139
162
|
/**
|
|
140
163
|
* The label input's text (a string input renders as text; a projected node
|
|
141
164
|
* label renders through the capture point instead).
|
|
@@ -160,8 +183,8 @@ export class PriceRangeSlider {
|
|
|
160
183
|
* edit, and React re-writes the property on every re-render.
|
|
161
184
|
*/
|
|
162
185
|
syncInputs() {
|
|
163
|
-
const minEl = this.
|
|
164
|
-
const maxEl = this.
|
|
186
|
+
const minEl = this.minInput?.nativeElement;
|
|
187
|
+
const maxEl = this.maxInput?.nativeElement;
|
|
165
188
|
if (minEl && minEl.value !== String(this.low()))
|
|
166
189
|
minEl.value = String(this.low());
|
|
167
190
|
if (maxEl && maxEl.value !== String(this.high()))
|
|
@@ -213,14 +236,16 @@ export class PriceRangeSlider {
|
|
|
213
236
|
}
|
|
214
237
|
static ɵfac = function PriceRangeSlider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PriceRangeSlider)(); };
|
|
215
238
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PriceRangeSlider, selectors: [["div", "mol-price-range-slider", ""]], viewQuery: function PriceRangeSlider_Query(rf, ctx) { if (rf & 1) {
|
|
216
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
239
|
+
i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
|
|
217
240
|
} if (rf & 2) {
|
|
218
241
|
let _t;
|
|
219
242
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelWrap = _t.first);
|
|
243
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.minInput = _t.first);
|
|
244
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.maxInput = _t.first);
|
|
220
245
|
} }, hostVars: 2, hostBindings: function PriceRangeSlider_HostBindings(rf, ctx) { if (rf & 2) {
|
|
221
246
|
i0.ɵɵclassMap(ctx.classes());
|
|
222
|
-
} }, inputs: { min: "min", max: "max", value: "value", step: "step", formatValue: "formatValue", label: "label", className: "className", onChange: "onChange" }, ngContentSelectors:
|
|
223
|
-
i0.ɵɵprojectionDef(
|
|
247
|
+
} }, inputs: { min: "min", max: "max", value: "value", step: "step", formatValue: "formatValue", label: "label", className: "className", onChange: "onChange" }, ngContentSelectors: _c4, decls: 13, vars: 25, consts: [["labelWrap", ""], ["minInput", ""], ["maxInput", ""], ["type", "range", 3, "input"]], template: function PriceRangeSlider_Template(rf, ctx) { if (rf & 1) {
|
|
248
|
+
i0.ɵɵprojectionDef(_c3);
|
|
224
249
|
i0.ɵɵdomElementStart(0, "span", null, 0);
|
|
225
250
|
i0.ɵɵprojection(2);
|
|
226
251
|
i0.ɵɵtext(3);
|
|
@@ -228,14 +253,14 @@ export class PriceRangeSlider {
|
|
|
228
253
|
i0.ɵɵdomElementStart(4, "div")(5, "span");
|
|
229
254
|
i0.ɵɵtext(6);
|
|
230
255
|
i0.ɵɵdomElementEnd();
|
|
231
|
-
i0.ɵɵdomElementStart(7, "input", 1);
|
|
256
|
+
i0.ɵɵdomElementStart(7, "input", 3, 1);
|
|
232
257
|
i0.ɵɵdomListener("input", function PriceRangeSlider_Template_input_input_7_listener($event) { return ctx.onMinInput($event); });
|
|
233
258
|
i0.ɵɵdomElementEnd();
|
|
234
|
-
i0.ɵɵdomElementStart(
|
|
235
|
-
i0.ɵɵdomListener("input", function
|
|
259
|
+
i0.ɵɵdomElementStart(9, "input", 3, 2);
|
|
260
|
+
i0.ɵɵdomListener("input", function PriceRangeSlider_Template_input_input_9_listener($event) { return ctx.onMaxInput($event); });
|
|
236
261
|
i0.ɵɵdomElementEnd();
|
|
237
|
-
i0.ɵɵdomElementStart(
|
|
238
|
-
i0.ɵɵtext(
|
|
262
|
+
i0.ɵɵdomElementStart(11, "span");
|
|
263
|
+
i0.ɵɵtext(12);
|
|
239
264
|
i0.ɵɵdomElementEnd()();
|
|
240
265
|
} if (rf & 2) {
|
|
241
266
|
i0.ɵɵclassMap(ctx.labelClasses());
|
|
@@ -249,11 +274,11 @@ export class PriceRangeSlider {
|
|
|
249
274
|
i0.ɵɵtextInterpolate(ctx.fmt(ctx.low()));
|
|
250
275
|
i0.ɵɵadvance();
|
|
251
276
|
i0.ɵɵclassMap(ctx.endpointInputClasses());
|
|
252
|
-
i0.ɵɵattribute("min", ctx.min)("max", ctx.max)("step", ctx.stepValue())("value", ctx.low());
|
|
253
|
-
i0.ɵɵadvance();
|
|
277
|
+
i0.ɵɵattribute("aria-label", ctx.minLabel())("min", ctx.min)("max", ctx.max)("step", ctx.stepValue())("value", ctx.low());
|
|
278
|
+
i0.ɵɵadvance(2);
|
|
254
279
|
i0.ɵɵclassMap(ctx.endpointInputClasses());
|
|
255
|
-
i0.ɵɵattribute("min", ctx.min)("max", ctx.max)("step", ctx.stepValue())("value", ctx.high());
|
|
256
|
-
i0.ɵɵadvance();
|
|
280
|
+
i0.ɵɵattribute("aria-label", ctx.maxLabel())("min", ctx.min)("max", ctx.max)("step", ctx.stepValue())("value", ctx.high());
|
|
281
|
+
i0.ɵɵadvance(2);
|
|
257
282
|
i0.ɵɵclassMap(ctx.endpointClasses());
|
|
258
283
|
i0.ɵɵadvance();
|
|
259
284
|
i0.ɵɵtextInterpolate(ctx.fmt(ctx.high()));
|
|
@@ -275,8 +300,9 @@ export class PriceRangeSlider {
|
|
|
275
300
|
<div [class]="rowClasses()">
|
|
276
301
|
<span [class]="endpointClasses()">{{ fmt(low()) }}</span
|
|
277
302
|
><input
|
|
303
|
+
#minInput
|
|
278
304
|
type="range"
|
|
279
|
-
aria-label="
|
|
305
|
+
[attr.aria-label]="minLabel()"
|
|
280
306
|
[attr.min]="min"
|
|
281
307
|
[attr.max]="max"
|
|
282
308
|
[attr.step]="stepValue()"
|
|
@@ -284,8 +310,9 @@ export class PriceRangeSlider {
|
|
|
284
310
|
(input)="onMinInput($event)"
|
|
285
311
|
[class]="endpointInputClasses()"
|
|
286
312
|
/><input
|
|
313
|
+
#maxInput
|
|
287
314
|
type="range"
|
|
288
|
-
aria-label="
|
|
315
|
+
[attr.aria-label]="maxLabel()"
|
|
289
316
|
[attr.min]="min"
|
|
290
317
|
[attr.max]="max"
|
|
291
318
|
[attr.step]="stepValue()"
|
|
@@ -298,6 +325,12 @@ export class PriceRangeSlider {
|
|
|
298
325
|
}], null, { labelWrap: [{
|
|
299
326
|
type: ViewChild,
|
|
300
327
|
args: ['labelWrap']
|
|
328
|
+
}], minInput: [{
|
|
329
|
+
type: ViewChild,
|
|
330
|
+
args: ['minInput']
|
|
331
|
+
}], maxInput: [{
|
|
332
|
+
type: ViewChild,
|
|
333
|
+
args: ['maxInput']
|
|
301
334
|
}] }); })();
|
|
302
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PriceRangeSlider, { className: "PriceRangeSlider", filePath: "price-range-slider.component.ts", lineNumber:
|
|
335
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PriceRangeSlider, { className: "PriceRangeSlider", filePath: "price-range-slider.component.ts", lineNumber: 86 }); })();
|
|
303
336
|
//# sourceMappingURL=price-range-slider.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-range-slider.component.js","sourceRoot":"","sources":["../src/price-range-slider.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EAET,UAAU,EACV,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"price-range-slider.component.js","sourceRoot":"","sources":["../src/price-range-slider.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,SAAS,EAET,UAAU,EACV,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;;;;;AAE9C;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,EAA8B,EAAW,EAAE;IAC3D,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CA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A,YAAgB;YAAA,oBACjD;YAAA,sCAUC;YAFA,qGAAS,sBAAkB,IAAC;YAR7B,oBAUC;YAAA,sCAUA;YAFA,qGAAS,sBAAkB,IAAC;YAR5B,oBAUA;YAAA,gCAAkC;YAAA,aAAiB;YACvD,AADuD,oBAAO,EACxD;;YA1BoB,iCAAwB;YACA,eAAiB;YAAjB,qCAAiB;YAE9D,cAAsB;YAAtB,+BAAsB;YACnB,cAA2B;YAA3B,oCAA2B;YAAC,cAAgB;YAAhB,wCAAgB;YAUhD,cAAgC;YAAhC,yCAAgC;;YAUhC,eAAgC;YAAhC,yCAAgC;;YAC1B,eAA2B;YAA3B,oCAA2B;YAAC,cAAiB;YAAjB,yCAAiB;;;iFAG9C,gBAAgB;cApC5B,SAAS;eAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,EAAE;gBACX,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC;gBACxF,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BD;aACV;;kBAoBE,SAAS;mBAAC,WAAW;;kBAGrB,SAAS;mBAAC,UAAU;;kBAGpB,SAAS;mBAAC,UAAU;;kFAzBV,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-price-range-slider-angular",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Single- or dual-handle range slider with formatted labels",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-price-range-slider-angular",
|
|
6
6
|
"type": "module",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"@angular/compiler-cli": "22.2.3",
|
|
56
56
|
"@angular/core": "22.2.3",
|
|
57
57
|
"@angular/platform-browser": "22.2.3",
|
|
58
|
-
"@molecule/app-angular": "3.
|
|
58
|
+
"@molecule/app-angular": "3.9.0",
|
|
59
59
|
"@molecule/app-framework-conformance": "0.0.0",
|
|
60
60
|
"@molecule/app-i18n": "1.2.2",
|
|
61
61
|
"@molecule/app-icons": "1.0.4",
|
|
62
|
-
"@molecule/app-ui": "1.
|
|
63
|
-
"@molecule/app-ui-angular": "1.
|
|
62
|
+
"@molecule/app-ui": "1.5.0",
|
|
63
|
+
"@molecule/app-ui-angular": "1.3.1",
|
|
64
64
|
"@types/node": "26.6.5",
|
|
65
65
|
"jsdom": "30.1.3",
|
|
66
66
|
"rxjs": "7.8.2",
|