primeng
Version:
PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,
521 lines (512 loc) • 28.9 kB
JavaScript
export * from 'primeng/types/compare';
import { isPlatformBrowser } from '@angular/common';
import * as i0 from '@angular/core';
import { InjectionToken, Injectable, inject, ElementRef, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, input, numberAttribute, booleanAttribute, output, signal, NgModule } from '@angular/core';
import { isRTL } from '@primeuix/utils/dom';
import { SharedModule } from 'primeng/api';
import { BaseComponent, PARENT_INSTANCE } from 'primeng/basecomponent';
import * as i1 from 'primeng/bind';
import { Bind, BindModule } from 'primeng/bind';
import { style } from '@primeuix/styles/compare';
import { BaseStyle } from 'primeng/base';
const COMPARE_INSTANCE = new InjectionToken('COMPARE_INSTANCE');
const classes = {
root: 'p-compare p-component',
item: 'p-compare-item',
handle: ({ instance }) => ['p-compare-handle', { 'p-disabled': instance.pcCompare?.disabled() }],
indicator: ({ instance }) => ['p-compare-indicator', { 'p-disabled': instance.pcCompare?.disabled() }],
input: 'p-compare-input'
};
class CompareStyle extends BaseStyle {
name = 'compare';
style = style;
classes = classes;
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareStyle });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareStyle, decorators: [{
type: Injectable
}] });
/**
*
* Compare allows comparing two items side by side with a slider.
*
* [Live Demo](https://www.primeng.org/compare)
*
* @module comparestyle
*
*/
var CompareClasses;
(function (CompareClasses) {
/**
* Class name of the root element
*/
CompareClasses["root"] = "p-compare";
/**
* Class name of the item element
*/
CompareClasses["item"] = "p-compare-item";
/**
* Class name of the handle element
*/
CompareClasses["handle"] = "p-compare-handle";
/**
* Class name of the indicator element
*/
CompareClasses["indicator"] = "p-compare-indicator";
/**
* Class name of the input element
*/
CompareClasses["input"] = "p-compare-input";
})(CompareClasses || (CompareClasses = {}));
/**
* CompareHandle is a helper component for Compare component.
* @group Components
*/
class CompareHandle extends BaseComponent {
componentName = 'CompareHandle';
bindDirectiveInstance = inject(Bind, { self: true });
pcCompare = inject(COMPARE_INSTANCE);
_componentStyle = inject(CompareStyle);
hostEl = inject(ElementRef);
handleStyle = computed(() => this.pcCompare.getHandleStyle(), /* @ts-ignore */
...(ngDevMode ? [{ debugName: "handleStyle" }] : /* istanbul ignore next */ []));
onAfterViewChecked() {
this.bindDirectiveInstance.setAttrs(this.pcCompare.ptms(['handle']));
}
onAfterViewInit() {
this.pcCompare.handleEl = this.hostEl.nativeElement;
}
onPointerDown(event) {
this.pcCompare.onThumbPointerDown(event);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareHandle, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: CompareHandle, isStandalone: true, selector: "p-compare-handle", host: { listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "class": "cx(\"handle\")", "attr.tabindex": "\"-1\"", "attr.data-orientation": "pcCompare.orientation()", "attr.data-disabled": "pcCompare.dataDisabled()", "attr.data-dragging": "pcCompare.dataDragging()", "style": "handleStyle()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: CompareHandle }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareHandle, decorators: [{
type: Component,
args: [{
selector: 'p-compare-handle',
standalone: true,
imports: [BindModule],
template: `<ng-content></ng-content>`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
providers: [{ provide: PARENT_INSTANCE, useExisting: CompareHandle }],
host: {
'[class]': 'cx("handle")',
'[attr.tabindex]': '"-1"',
'[attr.data-orientation]': 'pcCompare.orientation()',
'[attr.data-disabled]': 'pcCompare.dataDisabled()',
'[attr.data-dragging]': 'pcCompare.dataDragging()',
'[style]': 'handleStyle()',
'(pointerdown)': 'onPointerDown($event)'
},
hostDirectives: [Bind]
}]
}] });
/**
* CompareIndicator is a helper component for Compare component.
* @group Components
*/
class CompareIndicator extends BaseComponent {
componentName = 'CompareIndicator';
bindDirectiveInstance = inject(Bind, { self: true });
pcCompare = inject(COMPARE_INSTANCE);
_componentStyle = inject(CompareStyle);
/**
* Used to define a string that labels the input element.
* @group Props
*/
ariaLabel = input(undefined, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
* @group Props
*/
ariaLabelledby = input(undefined, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
onAfterViewChecked() {
this.bindDirectiveInstance.setAttrs(this.pcCompare.ptms(['indicator']));
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareIndicator, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: CompareIndicator, isStandalone: true, selector: "p-compare-indicator", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cx(\"indicator\")", "attr.data-orientation": "pcCompare.orientation()", "attr.data-disabled": "pcCompare.dataDisabled()", "attr.data-dragging": "pcCompare.dataDragging()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: CompareIndicator }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
<input
type="range"
[class]="cx('input')"
[min]="pcCompare.min()"
[max]="pcCompare.max()"
[step]="pcCompare.step()"
[value]="pcCompare.currentValue()"
[disabled]="pcCompare.disabled()"
[attr.aria-orientation]="pcCompare.orientation()"
[attr.aria-valuemin]="pcCompare.min()"
[attr.aria-valuemax]="pcCompare.max()"
[attr.aria-valuenow]="pcCompare.currentValue()"
[attr.aria-label]="ariaLabel()"
[attr.aria-labelledby]="ariaLabelledby()"
(input)="pcCompare.onInputChange($event)"
/>
<ng-content></ng-content>
`, isInline: true, dependencies: [{ kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareIndicator, decorators: [{
type: Component,
args: [{
selector: 'p-compare-indicator',
standalone: true,
imports: [BindModule],
template: `
<input
type="range"
[class]="cx('input')"
[min]="pcCompare.min()"
[max]="pcCompare.max()"
[step]="pcCompare.step()"
[value]="pcCompare.currentValue()"
[disabled]="pcCompare.disabled()"
[attr.aria-orientation]="pcCompare.orientation()"
[attr.aria-valuemin]="pcCompare.min()"
[attr.aria-valuemax]="pcCompare.max()"
[attr.aria-valuenow]="pcCompare.currentValue()"
[attr.aria-label]="ariaLabel()"
[attr.aria-labelledby]="ariaLabelledby()"
(input)="pcCompare.onInputChange($event)"
/>
<ng-content></ng-content>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
providers: [{ provide: PARENT_INSTANCE, useExisting: CompareIndicator }],
host: {
'[class]': 'cx("indicator")',
'[attr.data-orientation]': 'pcCompare.orientation()',
'[attr.data-disabled]': 'pcCompare.dataDisabled()',
'[attr.data-dragging]': 'pcCompare.dataDragging()'
},
hostDirectives: [Bind]
}]
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
/**
* CompareItem is a helper component for Compare component.
* @group Components
*/
class CompareItem extends BaseComponent {
componentName = 'CompareItem';
bindDirectiveInstance = inject(Bind, { self: true });
pcCompare = inject(COMPARE_INSTANCE);
_componentStyle = inject(CompareStyle);
/**
* Position of the item.
* @group Props
*/
position = input('before', /* @ts-ignore */
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
clipPath = computed(() => this.pcCompare.getItemStyle(this.position()).clipPath, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "clipPath" }] : /* istanbul ignore next */ []));
onAfterViewChecked() {
this.bindDirectiveInstance.setAttrs(this.pcCompare.ptms(['item']));
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareItem, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: CompareItem, isStandalone: true, selector: "p-compare-item", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cx(\"item\")", "style.position": "\"absolute\"", "style.inset": "\"0\"", "style.clip-path": "clipPath()", "attr.data-position": "position()", "attr.data-orientation": "pcCompare.orientation()", "attr.data-disabled": "pcCompare.dataDisabled()", "attr.data-dragging": "pcCompare.dataDragging()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: CompareItem }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareItem, decorators: [{
type: Component,
args: [{
selector: 'p-compare-item',
standalone: true,
imports: [BindModule],
template: `<ng-content></ng-content>`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
providers: [{ provide: PARENT_INSTANCE, useExisting: CompareItem }],
host: {
'[class]': 'cx("item")',
'[style.position]': '"absolute"',
'[style.inset]': '"0"',
'[style.clip-path]': 'clipPath()',
'[attr.data-position]': 'position()',
'[attr.data-orientation]': 'pcCompare.orientation()',
'[attr.data-disabled]': 'pcCompare.dataDisabled()',
'[attr.data-dragging]': 'pcCompare.dataDragging()'
},
hostDirectives: [Bind]
}]
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
/**
* Compare allows comparing two items side by side with a slider.
* @group Components
*/
class Compare extends BaseComponent {
componentName = 'Compare';
bindDirectiveInstance = inject(Bind, { self: true });
_componentStyle = inject(CompareStyle);
hostEl = inject(ElementRef);
/**
* Current value of the slider position (0-100).
* @group Props
*/
value = input(undefined, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
/**
* Default value when uncontrolled.
* @group Props
*/
defaultValue = input(50, { ...(ngDevMode ? { debugName: "defaultValue" } : /* istanbul ignore next */ {}), transform: numberAttribute });
/**
* Orientation of the comparison slider.
* @group Props
*/
orientation = input('horizontal', /* @ts-ignore */
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
/**
* Minimum value.
* @group Props
*/
min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
/**
* Maximum value.
* @group Props
*/
max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
/**
* Step increment.
* @group Props
*/
step = input(1, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
/**
* Whether the slider updates on hover.
* @group Props
*/
slideOnHover = input(false, { ...(ngDevMode ? { debugName: "slideOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
/**
* Whether the component is disabled.
* @group Props
*/
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
/**
* Callback to invoke when value changes.
* @param {CompareValueChangeEvent} event - Custom value change event.
* @group Emits
*/
onValueChange = output();
/**
* Callback to invoke when dragging ends.
* @param {CompareValueChangeEvent} event - Custom value change event.
* @group Emits
*/
onValueChangeEnd = output();
isDragging = signal(false, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
dataDisabled = computed(() => (this.disabled() ? '' : null), /* @ts-ignore */
...(ngDevMode ? [{ debugName: "dataDisabled" }] : /* istanbul ignore next */ []));
dataDragging = computed(() => (this.isDragging() ? '' : null), /* @ts-ignore */
...(ngDevMode ? [{ debugName: "dataDragging" }] : /* istanbul ignore next */ []));
isThumbPointerDown = false;
internalValue = signal(50, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []));
currentValue = computed(() => {
const v = this.value();
return v !== undefined ? v : this.internalValue();
}, /* @ts-ignore */
...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
isHorizontal = computed(() => this.orientation() === 'horizontal', /* @ts-ignore */
...(ngDevMode ? [{ debugName: "isHorizontal" }] : /* istanbul ignore next */ []));
dragOffsetPx = 0;
handleEl = null;
onAfterViewChecked() {
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
}
onAfterViewInit() {
if (isPlatformBrowser(this.platformId)) {
this.internalValue.set(this.defaultValue());
}
}
getRootRect(event) {
return this.hostEl.nativeElement.getBoundingClientRect();
}
clamp(value, minValue, maxValue) {
return Math.min(Math.max(value, minValue), maxValue);
}
roundToStep(value) {
const stepVal = this.step();
const minVal = this.min();
if (!stepVal)
return value;
const stepStr = stepVal.toString();
const dotIndex = stepStr.indexOf('.');
const precision = dotIndex >= 0 ? stepStr.length - dotIndex - 1 : 0;
const rounded = Math.round((value - minVal) / stepVal) * stepVal + minVal;
return Number(rounded.toFixed(precision));
}
normalizeValue(value) {
return this.clamp(this.roundToStep(value), this.min(), this.max());
}
getValueFromPointer(event, offsetPx = 0) {
const rect = this.getRootRect(event);
const horizontal = this.isHorizontal();
const size = horizontal ? rect.width : rect.height;
if (!size)
return this.min();
const pointerPosition = horizontal ? event.clientX - rect.left : event.clientY - rect.top;
const position = (pointerPosition - offsetPx) / size;
const clampedPosition = this.clamp(position, 0, 1);
const isRtl = horizontal && isRTL(this.hostEl.nativeElement);
const orientedPosition = horizontal ? (isRtl ? 1 - clampedPosition : clampedPosition) : 1 - clampedPosition;
const value = this.min() + orientedPosition * (this.max() - this.min());
return this.normalizeValue(value);
}
getValuePercent(value) {
const range = this.max() - this.min();
if (!range)
return 0;
return this.clamp(((value - this.min()) / range) * 100, 0, 100);
}
updateValue(nextValue, originalEvent) {
const normalized = this.normalizeValue(nextValue);
this.internalValue.set(normalized);
this.onValueChange.emit({ originalEvent, value: normalized });
}
updateValueFromPointer(event) {
const nextValue = this.getValueFromPointer(event, this.dragOffsetPx);
this.dragOffsetPx = 0;
this.updateValue(nextValue, event);
}
getItemStyle(position) {
const horizontal = this.isHorizontal();
const positionValue = horizontal ? this.currentValue() : 100 - this.currentValue();
const clipPath = horizontal
? position === 'before'
? `inset(0 ${Math.max(0, 100 - positionValue)}% 0 0)`
: `inset(0 0 0 ${Math.max(0, positionValue)}%)`
: position === 'before'
? `inset(0 0 ${Math.max(0, 100 - positionValue)}% 0)`
: `inset(${Math.max(0, positionValue)}% 0 0 0)`;
return { clipPath };
}
getHandleStyle() {
const percent = this.getValuePercent(this.currentValue());
const horizontal = this.isHorizontal();
if (horizontal) {
return { position: 'absolute', insetInlineStart: `${percent}%`, translate: '-50% 0', insetBlockStart: '0' };
}
else {
return { position: 'absolute', bottom: `${percent}%`, translate: '0 50%', insetInlineStart: '0' };
}
}
onRootPointerDown(event) {
if (this.disabled())
return;
if (event.pointerType === 'mouse' && event.button !== 0)
return;
event.preventDefault();
event.currentTarget.setPointerCapture(event.pointerId);
this.isDragging.set(true);
if (this.isThumbPointerDown) {
this.isThumbPointerDown = false;
return;
}
this.dragOffsetPx = 0;
this.updateValueFromPointer(event);
this.cd.markForCheck();
}
onRootPointerMove(event) {
if (this.disabled())
return;
if (this.slideOnHover()) {
this.updateValueFromPointer(event);
this.cd.markForCheck();
return;
}
if (!this.isDragging())
return;
event.preventDefault();
const nextValue = this.getValueFromPointer(event, this.dragOffsetPx);
this.updateValue(nextValue, event);
this.cd.markForCheck();
}
onRootPointerUp(event) {
if (this.disabled())
return;
event.preventDefault();
event.currentTarget.releasePointerCapture(event.pointerId);
this.isDragging.set(false);
this.isThumbPointerDown = false;
this.dragOffsetPx = 0;
this.onValueChangeEnd.emit({ originalEvent: event, value: this.currentValue() });
this.cd.markForCheck();
}
onThumbPointerDown(event) {
if (this.disabled())
return;
if (event.pointerType === 'mouse' && event.button !== 0)
return;
event.preventDefault();
this.hostEl.nativeElement.setPointerCapture(event.pointerId);
const handle = this.handleEl;
if (handle) {
const handleRect = handle.getBoundingClientRect();
const horizontal = this.isHorizontal();
const handleCenter = horizontal ? handleRect.left + handleRect.width / 2 : handleRect.top + handleRect.height / 2;
const pointerAxis = horizontal ? event.clientX : event.clientY;
this.dragOffsetPx = pointerAxis - handleCenter;
}
else {
this.dragOffsetPx = 0;
}
this.isThumbPointerDown = true;
}
onInputChange(event) {
if (this.disabled())
return;
const target = event.target;
const nextValue = this.normalizeValue(Number(target.value));
this.updateValue(nextValue, event);
this.onValueChangeEnd.emit({ originalEvent: event, value: nextValue });
this.cd.markForCheck();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: Compare, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: Compare, isStandalone: true, selector: "p-compare", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", 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 }, slideOnHover: { classPropertyName: "slideOnHover", publicName: "slideOnHover", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChange: "onValueChange", onValueChangeEnd: "onValueChangeEnd" }, host: { listeners: { "pointerdown": "onRootPointerDown($event)", "pointermove": "onRootPointerMove($event)", "pointerup": "onRootPointerUp($event)" }, properties: { "class": "cx(\"root\")", "attr.data-orientation": "orientation()", "attr.data-disabled": "dataDisabled()", "attr.data-dragging": "dataDragging()", "style.display": "\"flex\"", "style.position": "\"relative\"", "style.touch-action": "\"none\"" } }, providers: [CompareStyle, { provide: COMPARE_INSTANCE, useExisting: Compare }, { provide: PARENT_INSTANCE, useExisting: Compare }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: Compare, decorators: [{
type: Component,
args: [{
selector: 'p-compare',
standalone: true,
imports: [SharedModule, BindModule],
template: `<ng-content></ng-content>`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
providers: [CompareStyle, { provide: COMPARE_INSTANCE, useExisting: Compare }, { provide: PARENT_INSTANCE, useExisting: Compare }],
host: {
'[class]': 'cx("root")',
'[attr.data-orientation]': 'orientation()',
'[attr.data-disabled]': 'dataDisabled()',
'[attr.data-dragging]': 'dataDragging()',
'[style.display]': '"flex"',
'[style.position]': '"relative"',
'[style.touch-action]': '"none"',
'(pointerdown)': 'onRootPointerDown($event)',
'(pointermove)': 'onRootPointerMove($event)',
'(pointerup)': 'onRootPointerUp($event)'
},
hostDirectives: [Bind]
}]
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", 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 }] }], slideOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "slideOnHover", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }], onValueChangeEnd: [{ type: i0.Output, args: ["onValueChangeEnd"] }] } });
class CompareModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: CompareModule, imports: [Compare, CompareItem, CompareHandle, CompareIndicator, SharedModule, BindModule], exports: [Compare, CompareItem, CompareHandle, CompareIndicator, SharedModule, BindModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareModule, imports: [Compare, CompareItem, CompareHandle, CompareIndicator, SharedModule, BindModule, SharedModule, BindModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CompareModule, decorators: [{
type: NgModule,
args: [{
imports: [Compare, CompareItem, CompareHandle, CompareIndicator, SharedModule, BindModule],
exports: [Compare, CompareItem, CompareHandle, CompareIndicator, SharedModule, BindModule]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { COMPARE_INSTANCE, Compare, CompareClasses, CompareHandle, CompareIndicator, CompareItem, CompareModule, CompareStyle };
//# sourceMappingURL=primeng-compare.mjs.map