@wirekyt/angular 0.0.34 → 1.0.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.
- package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs +0 -5
- package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-listbox.mjs +627 -0
- package/dist/fesm2022/wirekyt-angular-listbox.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-menu.mjs +0 -6
- package/dist/fesm2022/wirekyt-angular-menu.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-number-input.mjs +467 -0
- package/dist/fesm2022/wirekyt-angular-number-input.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-password-input.mjs +437 -0
- package/dist/fesm2022/wirekyt-angular-password-input.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-pin-input.mjs +485 -0
- package/dist/fesm2022/wirekyt-angular-pin-input.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-progress.mjs +337 -0
- package/dist/fesm2022/wirekyt-angular-progress.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-qr-code.mjs +0 -11
- package/dist/fesm2022/wirekyt-angular-qr-code.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-radio-group.mjs +461 -0
- package/dist/fesm2022/wirekyt-angular-radio-group.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-rating-group.mjs +435 -0
- package/dist/fesm2022/wirekyt-angular-rating-group.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-scroll-area.mjs +276 -0
- package/dist/fesm2022/wirekyt-angular-scroll-area.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-segment-group.mjs +506 -0
- package/dist/fesm2022/wirekyt-angular-segment-group.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-signature-pad.mjs +382 -0
- package/dist/fesm2022/wirekyt-angular-signature-pad.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-slider.mjs +574 -0
- package/dist/fesm2022/wirekyt-angular-slider.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-splitter.mjs +303 -0
- package/dist/fesm2022/wirekyt-angular-splitter.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-steps.mjs +465 -0
- package/dist/fesm2022/wirekyt-angular-steps.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-swap.mjs +192 -0
- package/dist/fesm2022/wirekyt-angular-swap.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-switch.mjs +340 -0
- package/dist/fesm2022/wirekyt-angular-switch.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-tags-input.mjs +645 -0
- package/dist/fesm2022/wirekyt-angular-tags-input.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-timer.mjs +294 -0
- package/dist/fesm2022/wirekyt-angular-timer.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-toggle-group.mjs +194 -0
- package/dist/fesm2022/wirekyt-angular-toggle-group.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-toggle.mjs +170 -0
- package/dist/fesm2022/wirekyt-angular-toggle.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-tour.mjs +806 -0
- package/dist/fesm2022/wirekyt-angular-tour.mjs.map +1 -0
- package/dist/package.json +81 -1
- package/dist/types/wirekyt-angular-checkbox.d.ts +1 -1
- package/dist/types/wirekyt-angular-color-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-combobox.d.ts +1 -1
- package/dist/types/wirekyt-angular-date-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-json-tree-view.d.ts +0 -5
- package/dist/types/wirekyt-angular-json-tree-view.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-listbox.d.ts +206 -0
- package/dist/types/wirekyt-angular-listbox.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-menu.d.ts +0 -23
- package/dist/types/wirekyt-angular-menu.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-number-input.d.ts +143 -0
- package/dist/types/wirekyt-angular-number-input.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-password-input.d.ts +124 -0
- package/dist/types/wirekyt-angular-password-input.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-pin-input.d.ts +131 -0
- package/dist/types/wirekyt-angular-pin-input.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-progress.d.ts +129 -0
- package/dist/types/wirekyt-angular-progress.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-qr-code.d.ts +0 -11
- package/dist/types/wirekyt-angular-qr-code.d.ts.map +1 -1
- package/dist/types/wirekyt-angular-radio-group.d.ts +149 -0
- package/dist/types/wirekyt-angular-radio-group.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-rating-group.d.ts +136 -0
- package/dist/types/wirekyt-angular-rating-group.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-scroll-area.d.ts +106 -0
- package/dist/types/wirekyt-angular-scroll-area.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-segment-group.d.ts +152 -0
- package/dist/types/wirekyt-angular-segment-group.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-signature-pad.d.ts +120 -0
- package/dist/types/wirekyt-angular-signature-pad.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-slider.d.ts +176 -0
- package/dist/types/wirekyt-angular-slider.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-splitter.d.ts +116 -0
- package/dist/types/wirekyt-angular-splitter.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-steps.d.ts +160 -0
- package/dist/types/wirekyt-angular-steps.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-swap.d.ts +86 -0
- package/dist/types/wirekyt-angular-swap.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-switch.d.ts +110 -0
- package/dist/types/wirekyt-angular-switch.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-tags-input.d.ts +193 -0
- package/dist/types/wirekyt-angular-tags-input.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-timer.d.ts +109 -0
- package/dist/types/wirekyt-angular-timer.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-toggle-group.d.ts +81 -0
- package/dist/types/wirekyt-angular-toggle-group.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-toggle.d.ts +69 -0
- package/dist/types/wirekyt-angular-toggle.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-tour.d.ts +209 -0
- package/dist/types/wirekyt-angular-tour.d.ts.map +1 -0
- package/package.json +82 -3
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import * as slider from '@wirekyt/dom/machines/slider';
|
|
2
|
+
export { anatomy as sliderAnatomy } from '@wirekyt/dom/machines/slider';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, input, model, booleanAttribute, output, signal, effect, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, computed, numberAttribute, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
5
|
+
import { injectLocale, injectEnvironment, createId, useMachine, createCvaController, bindProps } from '@wirekyt/angular';
|
|
6
|
+
import { injectFieldContextOptional } from '@wirekyt/angular/field';
|
|
7
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
const SLIDER_CONTEXT = new InjectionToken("WIREKYT.SLIDER_CONTEXT");
|
|
10
|
+
function injectSliderContext() {
|
|
11
|
+
return inject(SLIDER_CONTEXT);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const SLIDER_THUMB_PROPS_CONTEXT = new InjectionToken("WIREKYT.SLIDER_THUMB_PROPS_CONTEXT");
|
|
15
|
+
function injectSliderThumbPropsContext() {
|
|
16
|
+
const context = inject(SLIDER_THUMB_PROPS_CONTEXT, { optional: true });
|
|
17
|
+
if (!context) {
|
|
18
|
+
throw new Error("SLIDER_THUMB_PROPS_CONTEXT not found: this slider part directive must be used inside a [slider-thumb] directive.");
|
|
19
|
+
}
|
|
20
|
+
return context;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function useSlider(options) {
|
|
24
|
+
const locale = injectLocale();
|
|
25
|
+
const environment = injectEnvironment();
|
|
26
|
+
const field = injectFieldContextOptional();
|
|
27
|
+
const fallbackId = createId();
|
|
28
|
+
return useMachine({
|
|
29
|
+
machine: slider.machine,
|
|
30
|
+
context: () => {
|
|
31
|
+
const props = options.context();
|
|
32
|
+
const merged = {
|
|
33
|
+
dir: locale.dir,
|
|
34
|
+
getRootNode: environment.getRootNode,
|
|
35
|
+
...props,
|
|
36
|
+
id: props.id ?? fallbackId,
|
|
37
|
+
};
|
|
38
|
+
if (field) {
|
|
39
|
+
const fieldIds = field.ids;
|
|
40
|
+
const baseIds = (props.ids ?? {});
|
|
41
|
+
merged.ids = {
|
|
42
|
+
label: fieldIds.label,
|
|
43
|
+
hiddenInput: baseIds.hiddenInput,
|
|
44
|
+
...baseIds,
|
|
45
|
+
};
|
|
46
|
+
const disabled = Boolean(props.disabled) || field.disabled();
|
|
47
|
+
const invalid = Boolean(props.invalid) || field.invalid();
|
|
48
|
+
const readOnly = Boolean(props.readOnly) || field.readOnly();
|
|
49
|
+
merged.disabled = disabled || undefined;
|
|
50
|
+
merged.invalid = invalid || undefined;
|
|
51
|
+
merged.readOnly = readOnly || undefined;
|
|
52
|
+
}
|
|
53
|
+
return merged;
|
|
54
|
+
},
|
|
55
|
+
connect: (service, normalize) => slider.connect(service, normalize),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const arraysShallowEqual = (a, b) => {
|
|
60
|
+
if (a === b)
|
|
61
|
+
return true;
|
|
62
|
+
if (!a || !b)
|
|
63
|
+
return false;
|
|
64
|
+
if (a.length !== b.length)
|
|
65
|
+
return false;
|
|
66
|
+
return a.every((value, index) => Object.is(value, b[index]));
|
|
67
|
+
};
|
|
68
|
+
class SliderRoot {
|
|
69
|
+
id = input(undefined, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
71
|
+
elementIds = input(undefined, { ...(ngDevMode ? { debugName: "elementIds" } : /* istanbul ignore next */ {}), alias: "ids" });
|
|
72
|
+
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
73
|
+
ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
|
|
74
|
+
value = model(undefined, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
76
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
78
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
79
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
80
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
81
|
+
name = input(undefined, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
83
|
+
form = input(undefined, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
85
|
+
min = input(undefined, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
87
|
+
max = input(undefined, /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
89
|
+
step = input(undefined, /* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
91
|
+
largeStep = input(undefined, /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "largeStep" }] : /* istanbul ignore next */ []));
|
|
93
|
+
minStepsBetweenThumbs = input(undefined, /* @ts-ignore */
|
|
94
|
+
...(ngDevMode ? [{ debugName: "minStepsBetweenThumbs" }] : /* istanbul ignore next */ []));
|
|
95
|
+
orientation = input(undefined, /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
97
|
+
origin = input(undefined, /* @ts-ignore */
|
|
98
|
+
...(ngDevMode ? [{ debugName: "origin" }] : /* istanbul ignore next */ []));
|
|
99
|
+
thumbAlignment = input(undefined, /* @ts-ignore */
|
|
100
|
+
...(ngDevMode ? [{ debugName: "thumbAlignment" }] : /* istanbul ignore next */ []));
|
|
101
|
+
thumbSize = input(undefined, /* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [{ debugName: "thumbSize" }] : /* istanbul ignore next */ []));
|
|
103
|
+
thumbCollisionBehavior = input(undefined, /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "thumbCollisionBehavior" }] : /* istanbul ignore next */ []));
|
|
105
|
+
getAriaValueText = input(undefined, /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "getAriaValueText" }] : /* istanbul ignore next */ []));
|
|
107
|
+
valueDetailsChange = output();
|
|
108
|
+
valueChangeEnd = output();
|
|
109
|
+
focusChange = output();
|
|
110
|
+
_disabledFromForm = signal(false, /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "_disabledFromForm" }] : /* istanbul ignore next */ []));
|
|
112
|
+
_pendingInternalWrites = 0;
|
|
113
|
+
_hasExternalBinding = false;
|
|
114
|
+
_hasReceivedFormWrite = false;
|
|
115
|
+
cva = createCvaController({
|
|
116
|
+
value: this.value,
|
|
117
|
+
setDisabled: (disabled) => this._disabledFromForm.set(disabled),
|
|
118
|
+
componentName: "SliderRoot",
|
|
119
|
+
hasExternalModelBinding: () => this._hasExternalBinding,
|
|
120
|
+
});
|
|
121
|
+
machine = useSlider({
|
|
122
|
+
context: () => ({
|
|
123
|
+
id: this.id(),
|
|
124
|
+
ids: this.elementIds(),
|
|
125
|
+
"aria-label": this.ariaLabel(),
|
|
126
|
+
"aria-labelledby": this.ariaLabelledby(),
|
|
127
|
+
value: this.value(),
|
|
128
|
+
defaultValue: this.defaultValue(),
|
|
129
|
+
disabled: this.disabled() || this._disabledFromForm() || undefined,
|
|
130
|
+
readOnly: this.readOnly() || undefined,
|
|
131
|
+
invalid: this.invalid() || undefined,
|
|
132
|
+
name: this.name(),
|
|
133
|
+
form: this.form(),
|
|
134
|
+
min: this.min(),
|
|
135
|
+
max: this.max(),
|
|
136
|
+
step: this.step(),
|
|
137
|
+
largeStep: this.largeStep(),
|
|
138
|
+
minStepsBetweenThumbs: this.minStepsBetweenThumbs(),
|
|
139
|
+
orientation: this.orientation(),
|
|
140
|
+
origin: this.origin(),
|
|
141
|
+
thumbAlignment: this.thumbAlignment(),
|
|
142
|
+
thumbSize: this.thumbSize(),
|
|
143
|
+
thumbCollisionBehavior: this.thumbCollisionBehavior(),
|
|
144
|
+
getAriaValueText: this.getAriaValueText(),
|
|
145
|
+
onValueChange: (details) => {
|
|
146
|
+
if (!arraysShallowEqual(this.value(), details.value)) {
|
|
147
|
+
this._pendingInternalWrites++;
|
|
148
|
+
this.value.set(details.value);
|
|
149
|
+
}
|
|
150
|
+
this.cva.notifyValueChange(details.value);
|
|
151
|
+
this.valueDetailsChange.emit(details);
|
|
152
|
+
},
|
|
153
|
+
onValueChangeEnd: (details) => {
|
|
154
|
+
this.valueChangeEnd.emit(details);
|
|
155
|
+
this.cva.markTouched();
|
|
156
|
+
},
|
|
157
|
+
onFocusChange: (details) => {
|
|
158
|
+
this.focusChange.emit(details);
|
|
159
|
+
if (details.focusedIndex === -1) {
|
|
160
|
+
this.cva.markTouched();
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
164
|
+
});
|
|
165
|
+
state = this.machine.state;
|
|
166
|
+
api = this.machine.api;
|
|
167
|
+
service = this.machine.service;
|
|
168
|
+
send = this.machine.send;
|
|
169
|
+
constructor() {
|
|
170
|
+
let firstRun = true;
|
|
171
|
+
effect(() => {
|
|
172
|
+
void this.value();
|
|
173
|
+
if (firstRun) {
|
|
174
|
+
firstRun = false;
|
|
175
|
+
this._pendingInternalWrites = 0;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (this._pendingInternalWrites > 0) {
|
|
179
|
+
this._pendingInternalWrites--;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this._hasExternalBinding = true;
|
|
183
|
+
});
|
|
184
|
+
bindProps({
|
|
185
|
+
elementRef: inject(ElementRef),
|
|
186
|
+
renderer: inject(Renderer2),
|
|
187
|
+
destroyRef: inject(DestroyRef),
|
|
188
|
+
props: () => this.api().getRootProps(),
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
writeValue(value) {
|
|
192
|
+
const next = value === null ? undefined : value;
|
|
193
|
+
const current = this.value();
|
|
194
|
+
if (!this._hasReceivedFormWrite && current !== undefined) {
|
|
195
|
+
this._hasExternalBinding = true;
|
|
196
|
+
}
|
|
197
|
+
this._hasReceivedFormWrite = true;
|
|
198
|
+
if (!arraysShallowEqual(current, next)) {
|
|
199
|
+
this._pendingInternalWrites++;
|
|
200
|
+
}
|
|
201
|
+
this.cva.writeValue(value);
|
|
202
|
+
}
|
|
203
|
+
registerOnChange(fn) {
|
|
204
|
+
this.cva.registerOnChange(fn);
|
|
205
|
+
}
|
|
206
|
+
registerOnTouched(fn) {
|
|
207
|
+
this.cva.registerOnTouched(fn);
|
|
208
|
+
}
|
|
209
|
+
setDisabledState(disabled) {
|
|
210
|
+
this.cva.setDisabledState(disabled);
|
|
211
|
+
}
|
|
212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
213
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: SliderRoot, isStandalone: true, selector: "[slider-root]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, elementIds: { classPropertyName: "elementIds", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, largeStep: { classPropertyName: "largeStep", publicName: "largeStep", isSignal: true, isRequired: false, transformFunction: null }, minStepsBetweenThumbs: { classPropertyName: "minStepsBetweenThumbs", publicName: "minStepsBetweenThumbs", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: false, transformFunction: null }, thumbAlignment: { classPropertyName: "thumbAlignment", publicName: "thumbAlignment", isSignal: true, isRequired: false, transformFunction: null }, thumbSize: { classPropertyName: "thumbSize", publicName: "thumbSize", isSignal: true, isRequired: false, transformFunction: null }, thumbCollisionBehavior: { classPropertyName: "thumbCollisionBehavior", publicName: "thumbCollisionBehavior", isSignal: true, isRequired: false, transformFunction: null }, getAriaValueText: { classPropertyName: "getAriaValueText", publicName: "getAriaValueText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueDetailsChange: "valueDetailsChange", valueChangeEnd: "valueChangeEnd", focusChange: "focusChange" }, providers: [
|
|
214
|
+
{ provide: SLIDER_CONTEXT, useExisting: forwardRef(() => SliderRoot) },
|
|
215
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SliderRoot), multi: true },
|
|
216
|
+
], exportAs: ["sliderRoot"], ngImport: i0 });
|
|
217
|
+
}
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRoot, decorators: [{
|
|
219
|
+
type: Directive,
|
|
220
|
+
args: [{
|
|
221
|
+
selector: "[slider-root]",
|
|
222
|
+
standalone: true,
|
|
223
|
+
exportAs: "sliderRoot",
|
|
224
|
+
providers: [
|
|
225
|
+
{ provide: SLIDER_CONTEXT, useExisting: forwardRef(() => SliderRoot) },
|
|
226
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SliderRoot), multi: true },
|
|
227
|
+
],
|
|
228
|
+
}]
|
|
229
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], elementIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], largeStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "largeStep", required: false }] }], minStepsBetweenThumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "minStepsBetweenThumbs", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], origin: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: false }] }], thumbAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbAlignment", required: false }] }], thumbSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbSize", required: false }] }], thumbCollisionBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbCollisionBehavior", required: false }] }], getAriaValueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "getAriaValueText", required: false }] }], valueDetailsChange: [{ type: i0.Output, args: ["valueDetailsChange"] }], valueChangeEnd: [{ type: i0.Output, args: ["valueChangeEnd"] }], focusChange: [{ type: i0.Output, args: ["focusChange"] }] } });
|
|
230
|
+
|
|
231
|
+
class SliderRootProvider {
|
|
232
|
+
value = input.required(/* @ts-ignore */
|
|
233
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
234
|
+
get state() {
|
|
235
|
+
return this.value().state;
|
|
236
|
+
}
|
|
237
|
+
get api() {
|
|
238
|
+
return this.value().api;
|
|
239
|
+
}
|
|
240
|
+
get service() {
|
|
241
|
+
return this.value().service;
|
|
242
|
+
}
|
|
243
|
+
get send() {
|
|
244
|
+
return this.value().send;
|
|
245
|
+
}
|
|
246
|
+
constructor() {
|
|
247
|
+
bindProps({
|
|
248
|
+
elementRef: inject(ElementRef),
|
|
249
|
+
renderer: inject(Renderer2),
|
|
250
|
+
destroyRef: inject(DestroyRef),
|
|
251
|
+
props: () => this.value().api().getRootProps(),
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
255
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: SliderRootProvider, isStandalone: true, selector: "[slider-root-provider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: SLIDER_CONTEXT, useExisting: forwardRef(() => SliderRootProvider) }], exportAs: ["sliderRootProvider"], ngImport: i0 });
|
|
256
|
+
}
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRootProvider, decorators: [{
|
|
258
|
+
type: Directive,
|
|
259
|
+
args: [{
|
|
260
|
+
selector: "[slider-root-provider]",
|
|
261
|
+
standalone: true,
|
|
262
|
+
exportAs: "sliderRootProvider",
|
|
263
|
+
providers: [{ provide: SLIDER_CONTEXT, useExisting: forwardRef(() => SliderRootProvider) }],
|
|
264
|
+
}]
|
|
265
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
266
|
+
|
|
267
|
+
class SliderLabel {
|
|
268
|
+
constructor() {
|
|
269
|
+
const context = injectSliderContext();
|
|
270
|
+
bindProps({
|
|
271
|
+
elementRef: inject(ElementRef),
|
|
272
|
+
renderer: inject(Renderer2),
|
|
273
|
+
destroyRef: inject(DestroyRef),
|
|
274
|
+
props: () => context.api().getLabelProps(),
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
278
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderLabel, isStandalone: true, selector: "[slider-label]", exportAs: ["sliderLabel"], ngImport: i0 });
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderLabel, decorators: [{
|
|
281
|
+
type: Directive,
|
|
282
|
+
args: [{
|
|
283
|
+
selector: "[slider-label]",
|
|
284
|
+
standalone: true,
|
|
285
|
+
exportAs: "sliderLabel",
|
|
286
|
+
}]
|
|
287
|
+
}], ctorParameters: () => [] });
|
|
288
|
+
|
|
289
|
+
class SliderValueText {
|
|
290
|
+
context = injectSliderContext();
|
|
291
|
+
value = computed(() => this.context.api().value, /* @ts-ignore */
|
|
292
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
293
|
+
valueAsString = computed(() => this.value().join(", "), /* @ts-ignore */
|
|
294
|
+
...(ngDevMode ? [{ debugName: "valueAsString" }] : /* istanbul ignore next */ []));
|
|
295
|
+
constructor() {
|
|
296
|
+
bindProps({
|
|
297
|
+
elementRef: inject(ElementRef),
|
|
298
|
+
renderer: inject(Renderer2),
|
|
299
|
+
destroyRef: inject(DestroyRef),
|
|
300
|
+
props: () => this.context.api().getValueTextProps(),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderValueText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
304
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderValueText, isStandalone: true, selector: "[slider-value-text]", exportAs: ["sliderValueText"], ngImport: i0 });
|
|
305
|
+
}
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderValueText, decorators: [{
|
|
307
|
+
type: Directive,
|
|
308
|
+
args: [{
|
|
309
|
+
selector: "[slider-value-text]",
|
|
310
|
+
standalone: true,
|
|
311
|
+
exportAs: "sliderValueText",
|
|
312
|
+
}]
|
|
313
|
+
}], ctorParameters: () => [] });
|
|
314
|
+
|
|
315
|
+
class SliderControl {
|
|
316
|
+
constructor() {
|
|
317
|
+
const context = injectSliderContext();
|
|
318
|
+
bindProps({
|
|
319
|
+
elementRef: inject(ElementRef),
|
|
320
|
+
renderer: inject(Renderer2),
|
|
321
|
+
destroyRef: inject(DestroyRef),
|
|
322
|
+
props: () => context.api().getControlProps(),
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
326
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderControl, isStandalone: true, selector: "[slider-control]", exportAs: ["sliderControl"], ngImport: i0 });
|
|
327
|
+
}
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderControl, decorators: [{
|
|
329
|
+
type: Directive,
|
|
330
|
+
args: [{
|
|
331
|
+
selector: "[slider-control]",
|
|
332
|
+
standalone: true,
|
|
333
|
+
exportAs: "sliderControl",
|
|
334
|
+
}]
|
|
335
|
+
}], ctorParameters: () => [] });
|
|
336
|
+
|
|
337
|
+
class SliderTrack {
|
|
338
|
+
constructor() {
|
|
339
|
+
const context = injectSliderContext();
|
|
340
|
+
bindProps({
|
|
341
|
+
elementRef: inject(ElementRef),
|
|
342
|
+
renderer: inject(Renderer2),
|
|
343
|
+
destroyRef: inject(DestroyRef),
|
|
344
|
+
props: () => context.api().getTrackProps(),
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
348
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderTrack, isStandalone: true, selector: "[slider-track]", exportAs: ["sliderTrack"], ngImport: i0 });
|
|
349
|
+
}
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderTrack, decorators: [{
|
|
351
|
+
type: Directive,
|
|
352
|
+
args: [{
|
|
353
|
+
selector: "[slider-track]",
|
|
354
|
+
standalone: true,
|
|
355
|
+
exportAs: "sliderTrack",
|
|
356
|
+
}]
|
|
357
|
+
}], ctorParameters: () => [] });
|
|
358
|
+
|
|
359
|
+
class SliderRange {
|
|
360
|
+
constructor() {
|
|
361
|
+
const context = injectSliderContext();
|
|
362
|
+
bindProps({
|
|
363
|
+
elementRef: inject(ElementRef),
|
|
364
|
+
renderer: inject(Renderer2),
|
|
365
|
+
destroyRef: inject(DestroyRef),
|
|
366
|
+
props: () => context.api().getRangeProps(),
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
370
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderRange, isStandalone: true, selector: "[slider-range]", exportAs: ["sliderRange"], ngImport: i0 });
|
|
371
|
+
}
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderRange, decorators: [{
|
|
373
|
+
type: Directive,
|
|
374
|
+
args: [{
|
|
375
|
+
selector: "[slider-range]",
|
|
376
|
+
standalone: true,
|
|
377
|
+
exportAs: "sliderRange",
|
|
378
|
+
}]
|
|
379
|
+
}], ctorParameters: () => [] });
|
|
380
|
+
|
|
381
|
+
class SliderThumb {
|
|
382
|
+
index = input.required({ ...(ngDevMode ? { debugName: "index" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
383
|
+
name = input(undefined, /* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
385
|
+
thumbProps = computed(() => ({
|
|
386
|
+
index: this.index(),
|
|
387
|
+
name: this.name(),
|
|
388
|
+
}), /* @ts-ignore */
|
|
389
|
+
...(ngDevMode ? [{ debugName: "thumbProps" }] : /* istanbul ignore next */ []));
|
|
390
|
+
constructor() {
|
|
391
|
+
const context = injectSliderContext();
|
|
392
|
+
bindProps({
|
|
393
|
+
elementRef: inject(ElementRef),
|
|
394
|
+
renderer: inject(Renderer2),
|
|
395
|
+
destroyRef: inject(DestroyRef),
|
|
396
|
+
props: () => {
|
|
397
|
+
const api = context.api();
|
|
398
|
+
if (api.value[this.index()] === undefined)
|
|
399
|
+
return {};
|
|
400
|
+
return api.getThumbProps(this.thumbProps());
|
|
401
|
+
},
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
405
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: SliderThumb, isStandalone: true, selector: "[slider-thumb]", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: SLIDER_THUMB_PROPS_CONTEXT, useExisting: forwardRef(() => SliderThumb) }], exportAs: ["sliderThumb"], ngImport: i0 });
|
|
406
|
+
}
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderThumb, decorators: [{
|
|
408
|
+
type: Directive,
|
|
409
|
+
args: [{
|
|
410
|
+
selector: "[slider-thumb]",
|
|
411
|
+
standalone: true,
|
|
412
|
+
exportAs: "sliderThumb",
|
|
413
|
+
providers: [{ provide: SLIDER_THUMB_PROPS_CONTEXT, useExisting: forwardRef(() => SliderThumb) }],
|
|
414
|
+
}]
|
|
415
|
+
}], ctorParameters: () => [], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] } });
|
|
416
|
+
|
|
417
|
+
class SliderHiddenInput {
|
|
418
|
+
constructor() {
|
|
419
|
+
const context = injectSliderContext();
|
|
420
|
+
const thumb = injectSliderThumbPropsContext();
|
|
421
|
+
const elementRef = inject(ElementRef);
|
|
422
|
+
bindProps({
|
|
423
|
+
elementRef,
|
|
424
|
+
renderer: inject(Renderer2),
|
|
425
|
+
destroyRef: inject(DestroyRef),
|
|
426
|
+
props: () => {
|
|
427
|
+
const api = context.api();
|
|
428
|
+
if (api.value[thumb.thumbProps().index] === undefined)
|
|
429
|
+
return {};
|
|
430
|
+
const props = api.getHiddenInputProps(thumb.thumbProps());
|
|
431
|
+
const { defaultValue: _defaultValue, ...rest } = props;
|
|
432
|
+
return rest;
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
effect(() => {
|
|
436
|
+
const index = thumb.thumbProps().index;
|
|
437
|
+
const next = context.api().value[index];
|
|
438
|
+
const value = next === undefined ? "" : String(next);
|
|
439
|
+
if (elementRef.nativeElement.value !== value) {
|
|
440
|
+
elementRef.nativeElement.value = value;
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderHiddenInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
445
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderHiddenInput, isStandalone: true, selector: "[slider-hidden-input]", exportAs: ["sliderHiddenInput"], ngImport: i0 });
|
|
446
|
+
}
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderHiddenInput, decorators: [{
|
|
448
|
+
type: Directive,
|
|
449
|
+
args: [{
|
|
450
|
+
selector: "[slider-hidden-input]",
|
|
451
|
+
standalone: true,
|
|
452
|
+
exportAs: "sliderHiddenInput",
|
|
453
|
+
}]
|
|
454
|
+
}], ctorParameters: () => [] });
|
|
455
|
+
|
|
456
|
+
class SliderDraggingIndicator {
|
|
457
|
+
context = injectSliderContext();
|
|
458
|
+
thumb = injectSliderThumbPropsContext();
|
|
459
|
+
value = computed(() => {
|
|
460
|
+
const api = this.context.api();
|
|
461
|
+
const index = this.thumb.thumbProps().index;
|
|
462
|
+
if (api.value[index] === undefined)
|
|
463
|
+
return undefined;
|
|
464
|
+
return api.getThumbValue(index);
|
|
465
|
+
}, /* @ts-ignore */
|
|
466
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
467
|
+
constructor() {
|
|
468
|
+
bindProps({
|
|
469
|
+
elementRef: inject(ElementRef),
|
|
470
|
+
renderer: inject(Renderer2),
|
|
471
|
+
destroyRef: inject(DestroyRef),
|
|
472
|
+
props: () => {
|
|
473
|
+
const api = this.context.api();
|
|
474
|
+
const index = this.thumb.thumbProps().index;
|
|
475
|
+
if (api.value[index] === undefined)
|
|
476
|
+
return {};
|
|
477
|
+
return api.getDraggingIndicatorProps({ index });
|
|
478
|
+
},
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderDraggingIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
482
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderDraggingIndicator, isStandalone: true, selector: "[slider-dragging-indicator]", exportAs: ["sliderDraggingIndicator"], ngImport: i0 });
|
|
483
|
+
}
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderDraggingIndicator, decorators: [{
|
|
485
|
+
type: Directive,
|
|
486
|
+
args: [{
|
|
487
|
+
selector: "[slider-dragging-indicator]",
|
|
488
|
+
standalone: true,
|
|
489
|
+
exportAs: "sliderDraggingIndicator",
|
|
490
|
+
}]
|
|
491
|
+
}], ctorParameters: () => [] });
|
|
492
|
+
|
|
493
|
+
class SliderMarkerGroup {
|
|
494
|
+
constructor() {
|
|
495
|
+
const context = injectSliderContext();
|
|
496
|
+
bindProps({
|
|
497
|
+
elementRef: inject(ElementRef),
|
|
498
|
+
renderer: inject(Renderer2),
|
|
499
|
+
destroyRef: inject(DestroyRef),
|
|
500
|
+
props: () => context.api().getMarkerGroupProps(),
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderMarkerGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
504
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderMarkerGroup, isStandalone: true, selector: "[slider-marker-group]", exportAs: ["sliderMarkerGroup"], ngImport: i0 });
|
|
505
|
+
}
|
|
506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderMarkerGroup, decorators: [{
|
|
507
|
+
type: Directive,
|
|
508
|
+
args: [{
|
|
509
|
+
selector: "[slider-marker-group]",
|
|
510
|
+
standalone: true,
|
|
511
|
+
exportAs: "sliderMarkerGroup",
|
|
512
|
+
}]
|
|
513
|
+
}], ctorParameters: () => [] });
|
|
514
|
+
|
|
515
|
+
class SliderMarker {
|
|
516
|
+
value = input.required({ ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
517
|
+
constructor() {
|
|
518
|
+
const context = injectSliderContext();
|
|
519
|
+
bindProps({
|
|
520
|
+
elementRef: inject(ElementRef),
|
|
521
|
+
renderer: inject(Renderer2),
|
|
522
|
+
destroyRef: inject(DestroyRef),
|
|
523
|
+
props: () => context.api().getMarkerProps({ value: this.value() }),
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderMarker, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
527
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: SliderMarker, isStandalone: true, selector: "[slider-marker]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["sliderMarker"], ngImport: i0 });
|
|
528
|
+
}
|
|
529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderMarker, decorators: [{
|
|
530
|
+
type: Directive,
|
|
531
|
+
args: [{
|
|
532
|
+
selector: "[slider-marker]",
|
|
533
|
+
standalone: true,
|
|
534
|
+
exportAs: "sliderMarker",
|
|
535
|
+
}]
|
|
536
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
|
|
537
|
+
|
|
538
|
+
class SliderContext {
|
|
539
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
540
|
+
void context;
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
543
|
+
slider = injectSliderContext();
|
|
544
|
+
templateRef = inject(TemplateRef);
|
|
545
|
+
viewContainer = inject(ViewContainerRef);
|
|
546
|
+
constructor() {
|
|
547
|
+
const view = this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
548
|
+
$implicit: this.slider.api,
|
|
549
|
+
api: this.slider.api,
|
|
550
|
+
});
|
|
551
|
+
effect(() => {
|
|
552
|
+
this.slider.api();
|
|
553
|
+
view.detectChanges();
|
|
554
|
+
});
|
|
555
|
+
inject(DestroyRef).onDestroy(() => view.destroy());
|
|
556
|
+
}
|
|
557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
558
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SliderContext, isStandalone: true, selector: "[slider-context]", exportAs: ["sliderContext"], ngImport: i0 });
|
|
559
|
+
}
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SliderContext, decorators: [{
|
|
561
|
+
type: Directive,
|
|
562
|
+
args: [{
|
|
563
|
+
selector: "[slider-context]",
|
|
564
|
+
standalone: true,
|
|
565
|
+
exportAs: "sliderContext",
|
|
566
|
+
}]
|
|
567
|
+
}], ctorParameters: () => [] });
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Generated bundle index. Do not edit.
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
export { SLIDER_CONTEXT, SLIDER_THUMB_PROPS_CONTEXT, SliderContext, SliderControl, SliderDraggingIndicator, SliderHiddenInput, SliderLabel, SliderMarker, SliderMarkerGroup, SliderRange, SliderRoot, SliderRootProvider, SliderThumb, SliderTrack, SliderValueText, injectSliderContext, injectSliderThumbPropsContext, useSlider };
|
|
574
|
+
//# sourceMappingURL=wirekyt-angular-slider.mjs.map
|