primeng 19.0.0-rc.1 → 19.0.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/accordion/accordion.d.ts +7 -7
- package/autocomplete/autocomplete.d.ts +21 -8
- package/badge/badge.d.ts +1 -3
- package/basecomponent/basecomponent.d.ts +2 -5
- package/blockui/blockui.d.ts +10 -5
- package/breadcrumb/breadcrumb.d.ts +9 -6
- package/button/button.d.ts +10 -4
- package/calendar/calendar.d.ts +29 -15
- package/card/card.d.ts +12 -5
- package/carousel/carousel.d.ts +10 -4
- package/cascadeselect/cascadeselect.d.ts +18 -8
- package/checkbox/checkbox.d.ts +8 -4
- package/chip/chip.d.ts +9 -7
- package/config/themeprovider.d.ts +6 -0
- package/confirmdialog/confirmdialog.d.ts +15 -5
- package/confirmpopup/confirmpopup.d.ts +11 -5
- package/contextmenu/contextmenu.d.ts +10 -6
- package/datepicker/datepicker.d.ts +25 -11
- package/dialog/dialog.d.ts +15 -4
- package/divider/divider.d.ts +1 -1
- package/dock/dock.d.ts +7 -4
- package/drawer/drawer.d.ts +18 -10
- package/dropdown/dropdown.d.ts +4 -3
- package/dynamicdialog/dynamicdialog.d.ts +3 -2
- package/editor/editor.d.ts +7 -3
- package/fesm2022/primeng-accordion.mjs +56 -41
- package/fesm2022/primeng-accordion.mjs.map +1 -1
- package/fesm2022/primeng-autocomplete.mjs +153 -92
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-badge.mjs +39 -32
- package/fesm2022/primeng-badge.mjs.map +1 -1
- package/fesm2022/primeng-basecomponent.mjs +2 -25
- package/fesm2022/primeng-basecomponent.mjs.map +1 -1
- package/fesm2022/primeng-blockui.mjs +38 -18
- package/fesm2022/primeng-blockui.mjs.map +1 -1
- package/fesm2022/primeng-breadcrumb.mjs +49 -31
- package/fesm2022/primeng-breadcrumb.mjs.map +1 -1
- package/fesm2022/primeng-button.mjs +55 -28
- package/fesm2022/primeng-button.mjs.map +1 -1
- package/fesm2022/primeng-calendar.mjs +202 -137
- package/fesm2022/primeng-calendar.mjs.map +1 -1
- package/fesm2022/primeng-card.mjs +95 -45
- package/fesm2022/primeng-card.mjs.map +1 -1
- package/fesm2022/primeng-carousel.mjs +74 -42
- package/fesm2022/primeng-carousel.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +99 -61
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-checkbox.mjs +31 -12
- package/fesm2022/primeng-checkbox.mjs.map +1 -1
- package/fesm2022/primeng-chip.mjs +117 -96
- package/fesm2022/primeng-chip.mjs.map +1 -1
- package/fesm2022/primeng-config.mjs +13 -11
- package/fesm2022/primeng-config.mjs.map +1 -1
- package/fesm2022/primeng-confirmdialog.mjs +104 -60
- package/fesm2022/primeng-confirmdialog.mjs.map +1 -1
- package/fesm2022/primeng-confirmpopup.mjs +57 -29
- package/fesm2022/primeng-confirmpopup.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +52 -21
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-datepicker.mjs +198 -156
- package/fesm2022/primeng-datepicker.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +97 -50
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-divider.mjs +2 -4
- package/fesm2022/primeng-divider.mjs.map +1 -1
- package/fesm2022/primeng-dock.mjs +29 -10
- package/fesm2022/primeng-dock.mjs.map +1 -1
- package/fesm2022/primeng-drawer.mjs +112 -70
- package/fesm2022/primeng-drawer.mjs.map +1 -1
- package/fesm2022/primeng-dropdown.mjs +14 -6
- package/fesm2022/primeng-dropdown.mjs.map +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs +25 -21
- package/fesm2022/primeng-dynamicdialog.mjs.map +1 -1
- package/fesm2022/primeng-editor.mjs +26 -10
- package/fesm2022/primeng-editor.mjs.map +1 -1
- package/fesm2022/primeng-fieldset.mjs +61 -33
- package/fesm2022/primeng-fieldset.mjs.map +1 -1
- package/fesm2022/primeng-fileupload.mjs +138 -87
- package/fesm2022/primeng-fileupload.mjs.map +1 -1
- package/fesm2022/primeng-galleria.mjs +22 -13
- package/fesm2022/primeng-galleria.mjs.map +1 -1
- package/fesm2022/primeng-image.mjs +113 -66
- package/fesm2022/primeng-image.mjs.map +1 -1
- package/fesm2022/primeng-imagecompare.mjs +30 -10
- package/fesm2022/primeng-imagecompare.mjs.map +1 -1
- package/fesm2022/primeng-inplace.mjs +51 -26
- package/fesm2022/primeng-inplace.mjs.map +1 -1
- package/fesm2022/primeng-inputmask.mjs +31 -15
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +54 -45
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputotp.mjs +30 -11
- package/fesm2022/primeng-inputotp.mjs.map +1 -1
- package/fesm2022/primeng-listbox.mjs +137 -78
- package/fesm2022/primeng-listbox.mjs.map +1 -1
- package/fesm2022/primeng-megamenu.mjs +105 -59
- package/fesm2022/primeng-megamenu.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +26 -26
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-menubar.mjs +69 -34
- package/fesm2022/primeng-menubar.mjs.map +1 -1
- package/fesm2022/primeng-message.mjs +49 -25
- package/fesm2022/primeng-message.mjs.map +1 -1
- package/fesm2022/primeng-messages.mjs +12 -3
- package/fesm2022/primeng-messages.mjs.map +1 -1
- package/fesm2022/primeng-metergroup.mjs +62 -30
- package/fesm2022/primeng-metergroup.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +246 -155
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-orderlist.mjs +123 -68
- package/fesm2022/primeng-orderlist.mjs.map +1 -1
- package/fesm2022/primeng-organizationchart.mjs +31 -15
- package/fesm2022/primeng-organizationchart.mjs.map +1 -1
- package/fesm2022/primeng-overlay.mjs +26 -6
- package/fesm2022/primeng-overlay.mjs.map +1 -1
- package/fesm2022/primeng-overlaypanel.mjs +29 -9
- package/fesm2022/primeng-overlaypanel.mjs.map +1 -1
- package/fesm2022/primeng-paginator.mjs +92 -60
- package/fesm2022/primeng-paginator.mjs.map +1 -1
- package/fesm2022/primeng-panel.mjs +159 -98
- package/fesm2022/primeng-panel.mjs.map +1 -1
- package/fesm2022/primeng-panelmenu.mjs +55 -32
- package/fesm2022/primeng-panelmenu.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +88 -49
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-picklist.mjs +360 -228
- package/fesm2022/primeng-picklist.mjs.map +1 -1
- package/fesm2022/primeng-popover.mjs +23 -7
- package/fesm2022/primeng-popover.mjs.map +1 -1
- package/fesm2022/primeng-progressbar.mjs +26 -8
- package/fesm2022/primeng-progressbar.mjs.map +1 -1
- package/fesm2022/primeng-rating.mjs +44 -20
- package/fesm2022/primeng-rating.mjs.map +1 -1
- package/fesm2022/primeng-scroller.mjs +47 -37
- package/fesm2022/primeng-scroller.mjs.map +1 -1
- package/fesm2022/primeng-scrollpanel.mjs +28 -9
- package/fesm2022/primeng-scrollpanel.mjs.map +1 -1
- package/fesm2022/primeng-scrolltop.mjs +16 -9
- package/fesm2022/primeng-scrolltop.mjs.map +1 -1
- package/fesm2022/primeng-select.mjs +198 -119
- package/fesm2022/primeng-select.mjs.map +1 -1
- package/fesm2022/primeng-selectbutton.mjs +25 -9
- package/fesm2022/primeng-selectbutton.mjs.map +1 -1
- package/fesm2022/primeng-sidebar.mjs +81 -58
- package/fesm2022/primeng-sidebar.mjs.map +1 -1
- package/fesm2022/primeng-speeddial.mjs +54 -29
- package/fesm2022/primeng-speeddial.mjs.map +1 -1
- package/fesm2022/primeng-splitbutton.mjs +41 -18
- package/fesm2022/primeng-splitbutton.mjs.map +1 -1
- package/fesm2022/primeng-splitter.mjs +4 -4
- package/fesm2022/primeng-splitter.mjs.map +1 -1
- package/fesm2022/primeng-stepper.mjs +33 -19
- package/fesm2022/primeng-stepper.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +115 -103
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-tabmenu.mjs +54 -27
- package/fesm2022/primeng-tabmenu.mjs.map +1 -1
- package/fesm2022/primeng-tabs.mjs +27 -19
- package/fesm2022/primeng-tabs.mjs.map +1 -1
- package/fesm2022/primeng-tabview.mjs +106 -54
- package/fesm2022/primeng-tabview.mjs.map +1 -1
- package/fesm2022/primeng-tag.mjs +68 -44
- package/fesm2022/primeng-tag.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +44 -21
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-timeline.mjs +40 -16
- package/fesm2022/primeng-timeline.mjs.map +1 -1
- package/fesm2022/primeng-toast.mjs +30 -7
- package/fesm2022/primeng-toast.mjs.map +1 -1
- package/fesm2022/primeng-togglebutton.mjs +44 -28
- package/fesm2022/primeng-togglebutton.mjs.map +1 -1
- package/fesm2022/primeng-toggleswitch.mjs +28 -9
- package/fesm2022/primeng-toggleswitch.mjs.map +1 -1
- package/fesm2022/primeng-toolbar.mjs +46 -20
- package/fesm2022/primeng-toolbar.mjs.map +1 -1
- package/fesm2022/primeng-tooltip.mjs +32 -69
- package/fesm2022/primeng-tooltip.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +117 -98
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +154 -85
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs +31 -14
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/fesm2022/primeng-usestyle.mjs +1 -1
- package/fesm2022/primeng-usestyle.mjs.map +1 -1
- package/fieldset/fieldset.d.ts +12 -6
- package/fileupload/fileupload.d.ts +19 -8
- package/galleria/galleria.d.ts +3 -2
- package/image/image.d.ts +18 -7
- package/imagecompare/imagecompare.d.ts +7 -2
- package/inplace/inplace.d.ts +12 -6
- package/inputmask/inputmask.d.ts +8 -4
- package/inputnumber/inputnumber.d.ts +11 -6
- package/inputotp/inputotp.d.ts +7 -2
- package/listbox/listbox.d.ts +17 -4
- package/megamenu/megamenu.d.ts +16 -7
- package/menu/menu.d.ts +6 -6
- package/menubar/menubar.d.ts +13 -6
- package/message/message.d.ts +10 -4
- package/messages/messages.d.ts +4 -3
- package/metergroup/metergroup.d.ts +11 -3
- package/multiselect/multiselect.d.ts +36 -17
- package/orderlist/orderlist.d.ts +23 -11
- package/organizationchart/organizationchart.d.ts +6 -4
- package/overlay/overlay.d.ts +6 -3
- package/overlaypanel/overlaypanel.d.ts +6 -3
- package/package.json +157 -157
- package/paginator/paginator.d.ts +15 -8
- package/panel/panel.d.ts +14 -5
- package/panelmenu/panelmenu.d.ts +8 -4
- package/password/password.d.ts +15 -7
- package/picklist/picklist.d.ts +23 -3
- package/popover/popover.d.ts +7 -4
- package/progressbar/progressbar.d.ts +7 -3
- package/rating/rating.d.ts +11 -5
- package/scroller/scroller.d.ts +9 -4
- package/scrollpanel/scrollpanel.d.ts +7 -3
- package/scrolltop/scrolltop.d.ts +7 -4
- package/select/select.d.ts +31 -13
- package/selectbutton/selectbutton.d.ts +7 -3
- package/sidebar/sidebar.d.ts +9 -2
- package/speeddial/speeddial.d.ts +9 -4
- package/splitbutton/splitbutton.d.ts +9 -5
- package/splitter/splitter.d.ts +4 -4
- package/stepper/stepper.d.ts +8 -3
- package/table/table.d.ts +2 -2
- package/tabmenu/tabmenu.d.ts +12 -7
- package/tabs/tablist.d.ts +6 -2
- package/tabview/tabview.d.ts +16 -7
- package/tag/tag.d.ts +8 -9
- package/tieredmenu/tieredmenu.d.ts +10 -6
- package/timeline/timeline.d.ts +7 -2
- package/toast/toast.d.ts +7 -3
- package/togglebutton/togglebutton.d.ts +8 -3
- package/toggleswitch/toggleswitch.d.ts +6 -2
- package/toolbar/toolbar.d.ts +9 -4
- package/tooltip/tooltip.d.ts +2 -1
- package/tree/tree.d.ts +23 -10
- package/treeselect/treeselect.d.ts +26 -12
- package/treetable/treetable.d.ts +6 -4
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as i1 from '@angular/common';
|
2
2
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable, inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, NgModule } from '@angular/core';
|
5
|
-
import { SharedModule } from 'primeng/api';
|
4
|
+
import { Injectable, inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, ContentChildren, NgModule } from '@angular/core';
|
5
|
+
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
6
6
|
import { BaseComponent } from 'primeng/basecomponent';
|
7
7
|
import { BaseStyle } from 'primeng/base';
|
8
8
|
|
@@ -169,6 +169,9 @@ class ImageCompare extends BaseComponent {
|
|
169
169
|
* @group Templates
|
170
170
|
*/
|
171
171
|
rightTemplate;
|
172
|
+
_leftTemplate;
|
173
|
+
_rightTemplate;
|
174
|
+
templates;
|
172
175
|
_componentStyle = inject(ImageCompareStyle);
|
173
176
|
mutationObserver;
|
174
177
|
ngOnInit() {
|
@@ -176,6 +179,18 @@ class ImageCompare extends BaseComponent {
|
|
176
179
|
this.updateDirection();
|
177
180
|
this.observeDirectionChanges();
|
178
181
|
}
|
182
|
+
ngAfterContentInit() {
|
183
|
+
this.templates?.forEach((item) => {
|
184
|
+
switch (item.getType()) {
|
185
|
+
case 'left':
|
186
|
+
this._leftTemplate = item.template;
|
187
|
+
break;
|
188
|
+
case 'right':
|
189
|
+
this._rightTemplate = item.template;
|
190
|
+
break;
|
191
|
+
}
|
192
|
+
});
|
193
|
+
}
|
179
194
|
onSlide(event) {
|
180
195
|
const value = event.target.value;
|
181
196
|
const image = event.target.previousElementSibling;
|
@@ -207,12 +222,14 @@ class ImageCompare extends BaseComponent {
|
|
207
222
|
}
|
208
223
|
static ɵfac = /*@__PURE__*/ (() => { let ɵImageCompare_BaseFactory; return function ImageCompare_Factory(__ngFactoryType__) { return (ɵImageCompare_BaseFactory || (ɵImageCompare_BaseFactory = i0.ɵɵgetInheritedFactory(ImageCompare)))(__ngFactoryType__ || ImageCompare); }; })();
|
209
224
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ImageCompare, selectors: [["p-imageCompare"], ["p-imagecompare"], ["p-image-compare"]], contentQueries: function ImageCompare_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
210
|
-
i0.ɵɵcontentQuery(dirIndex, _c0,
|
211
|
-
i0.ɵɵcontentQuery(dirIndex, _c1,
|
225
|
+
i0.ɵɵcontentQuery(dirIndex, _c0, 4);
|
226
|
+
i0.ɵɵcontentQuery(dirIndex, _c1, 4);
|
227
|
+
i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
|
212
228
|
} if (rf & 2) {
|
213
229
|
let _t;
|
214
230
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.leftTemplate = _t.first);
|
215
231
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rightTemplate = _t.first);
|
232
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
|
216
233
|
} }, hostAttrs: [1, "p-imagecompare"], hostVars: 3, hostBindings: function ImageCompare_HostBindings(rf, ctx) { if (rf & 2) {
|
217
234
|
i0.ɵɵattribute("tabindex", ctx.tabindex)("aria-labelledby", ctx.ariaLabelledby)("aria-label", ctx.ariaLabel);
|
218
235
|
} }, inputs: { tabindex: "tabindex", ariaLabelledby: "ariaLabelledby", ariaLabel: "ariaLabel" }, features: [i0.ɵɵProvidersFeature([ImageCompareStyle]), i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[4, "ngTemplateOutlet"], ["type", "range", "min", "0", "max", "100", "value", "50", 3, "input"]], template: function ImageCompare_Template(rf, ctx) { if (rf & 1) {
|
@@ -221,9 +238,9 @@ class ImageCompare extends BaseComponent {
|
|
221
238
|
i0.ɵɵlistener("input", function ImageCompare_Template_input_input_2_listener($event) { return ctx.onSlide($event); });
|
222
239
|
i0.ɵɵelementEnd();
|
223
240
|
} if (rf & 2) {
|
224
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx.leftTemplate);
|
241
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx.leftTemplate || ctx._leftTemplate);
|
225
242
|
i0.ɵɵadvance();
|
226
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx.rightTemplate);
|
243
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx.rightTemplate || ctx._rightTemplate);
|
227
244
|
i0.ɵɵadvance();
|
228
245
|
i0.ɵɵclassMap(ctx.cx("slider"));
|
229
246
|
} }, dependencies: [CommonModule, i1.NgTemplateOutlet, SharedModule], encapsulation: 2, changeDetection: 0 });
|
@@ -235,8 +252,8 @@ class ImageCompare extends BaseComponent {
|
|
235
252
|
standalone: true,
|
236
253
|
imports: [CommonModule, SharedModule],
|
237
254
|
template: `
|
238
|
-
<ng-template *ngTemplateOutlet="leftTemplate"></ng-template>
|
239
|
-
<ng-template *ngTemplateOutlet="rightTemplate"></ng-template>
|
255
|
+
<ng-template *ngTemplateOutlet="leftTemplate || _leftTemplate"></ng-template>
|
256
|
+
<ng-template *ngTemplateOutlet="rightTemplate || _rightTemplate"></ng-template>
|
240
257
|
|
241
258
|
<input type="range" min="0" max="100" value="50" (input)="onSlide($event)" [class]="cx('slider')" />
|
242
259
|
`,
|
@@ -258,10 +275,13 @@ class ImageCompare extends BaseComponent {
|
|
258
275
|
type: Input
|
259
276
|
}], leftTemplate: [{
|
260
277
|
type: ContentChild,
|
261
|
-
args: ['left']
|
278
|
+
args: ['left', { descendants: false }]
|
262
279
|
}], rightTemplate: [{
|
263
280
|
type: ContentChild,
|
264
|
-
args: ['right']
|
281
|
+
args: ['right', { descendants: false }]
|
282
|
+
}], templates: [{
|
283
|
+
type: ContentChildren,
|
284
|
+
args: [PrimeTemplate]
|
265
285
|
}] }); })();
|
266
286
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ImageCompare, { className: "ImageCompare", filePath: "imagecompare.ts", lineNumber: 31 }); })();
|
267
287
|
class ImageCompareModule {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"primeng-imagecompare.mjs","sources":["../../src/imagecompare/style/imagecomparestyle.ts","../../src/imagecompare/imagecompare.ts","../../src/imagecompare/primeng-imagecompare.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-imagecompare {\n position: relative;\n overflow: hidden;\n width: 100%;\n aspect-ratio: 16 / 9;\n}\n\n.p-imagecompare img {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.p-imagecompare img + img {\n clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);\n}\n\n.p-imagecompare:dir(rtl) img + img {\n clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);\n}\n\n.p-imagecompare-slider {\n position: relative;\n -webkit-appearance: none;\n width: calc(100% + ${dt('imagecompare.handle.size')});\n height: 100%;\n margin-inline-start: calc(-1 * calc(${dt('imagecompare.handle.size')} / 2));\n background-color: transparent;\n outline: none;\n transition: all ${dt('imagecompare.handle.transition.duration')};\n}\n\n.p-imagecompare-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: ${dt('imagecompare.handle.size')};\n width: ${dt('imagecompare.handle.size')};\n background: ${dt('imagecompare.handle.background')};\n border: ${dt('imagecompare.handle.border.width')} solid ${dt('imagecompare.handle.border.color')};\n border-radius: ${dt('imagecompare.handle.border.radius')};\n background-size: contain;\n cursor: ew-resize;\n transition: all ${dt('imagecompare.handle.transition.duration')};\n}\n\n.p-imagecompare-slider::-moz-range-thumb {\n height: ${dt('imagecompare.handle.size')};\n width: ${dt('imagecompare.handle.size')};\n background: ${dt('imagecompare.handle.background')};\n border: ${dt('imagecompare.handle.border.width')} ${dt('imagecompare.handle.border.style')} ${dt('imagecompare.handle.border.color')};\n border-radius: ${dt('imagecompare.handle.border.radius')};\n background-size: contain;\n cursor: ew-resize;\n}\n\n.p-imagecompare-slider:focus-visible::-webkit-slider-thumb {\n box-shadow: ${dt('imagecompare.handle.focus.ring.shadow')};\n outline: ${dt('imagecompare.handle.focus.ring.width')} ${dt('imagecompare.handle.focus.ring.style')} ${dt('imagecompare.handle.focus.ring.color')};\n outline-offset: ${dt('imagecompare.handle.focus.ring.offset')};\n}\n\n.p-imagecompare-slider:focus-visible::-moz-range-thumb {\n box-shadow: ${dt('imagecompare.handle.focus.ring.shadow')};\n outline: ${dt('imagecompare.handle.focus.ring.width')} ${dt('imagecompare.handle.focus.ring.style')} ${dt('imagecompare.handle.focus.ring.color')};\n outline-offset: ${dt('imagecompare.handle.focus.ring.offset')};\n}\n\n.p-imagecompare-slider:hover {\n width: calc(100% + ${dt('imagecompare.handle.hover.size')});\n margin-inline-start: calc(-1 * calc(${dt('imagecompare.handle.hover.size')} / 2));\n}\n\n.p-imagecompare-slider:hover::-webkit-slider-thumb {\n background: ${dt('imagecompare.handle.hover.background')};\n border-color: ${dt('imagecompare.handle.hover.border.color')};\n height: ${dt('imagecompare.handle.hover.size')};\n width: ${dt('imagecompare.handle.hover.size')};\n}\n\n.p-imagecompare-slider:hover::-moz-range-thumb {\n background: ${dt('imagecompare.handle.hover.background')};\n border-color: ${dt('imagecompare.handle.hover.border.color')};\n height: ${dt('imagecompare.handle.hover.size')};\n width: ${dt('imagecompare.handle.hover.size')};\n}\n`;\n\nconst classes = {\n root: 'p-imagecompare',\n slider: 'p-imagecompare-slider'\n};\n\n@Injectable()\nexport class ImageCompareStyle extends BaseStyle {\n name = 'imagecompare';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * ImageCompare compares two images side by side with a slider.\n *\n * [Live Demo](https://www.primeng.org/imagecompare/)\n *\n * @module imagecomparestyle\n *\n */\nexport enum ImageCompareClasses {\n /**\n * Class name of the root element\n */\n root = 'p-imagecompare',\n /**\n * Class name of the slider element\n */\n slider = 'p-imagecompare-slider'\n}\nexport interface ImageCompareStyle extends BaseStyle {}\n","import { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, inject, Input, NgModule, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ImageCompareStyle } from './style/imagecomparestyle';\n\n/**\n * Compare two images side by side with a slider.\n * @group Components\n */\n@Component({\n selector: 'p-imageCompare, p-imagecompare, p-image-compare',\n standalone: true,\n imports: [CommonModule, SharedModule],\n template: `\n <ng-template *ngTemplateOutlet=\"leftTemplate\"></ng-template>\n <ng-template *ngTemplateOutlet=\"rightTemplate\"></ng-template>\n\n <input type=\"range\" min=\"0\" max=\"100\" value=\"50\" (input)=\"onSlide($event)\" [class]=\"cx('slider')\" />\n `,\n host: {\n class: 'p-imagecompare',\n '[attr.tabindex]': 'tabindex',\n '[attr.aria-labelledby]': 'ariaLabelledby',\n '[attr.aria-label]': 'ariaLabel'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ImageCompareStyle]\n})\nexport class ImageCompare extends BaseComponent implements AfterContentInit {\n isRTL: boolean = false;\n\n /**\n * Index of the element in tabbing order.\n * @defaultValue 0\n * @group Props\n */\n @Input() tabindex: number | undefined;\n /**\n * Defines a string value that labels an interactive element.\n * @group Props\n */\n @Input() ariaLabelledby: string | undefined;\n /**\n * Identifier of the underlying input element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n\n /**\n * Template for the left side.\n * @group Templates\n */\n @ContentChild('left') leftTemplate: TemplateRef<any>;\n\n /**\n * Template for the right side.\n * @group Templates\n */\n @ContentChild('right') rightTemplate: TemplateRef<any>;\n\n _componentStyle = inject(ImageCompareStyle);\n\n mutationObserver: MutationObserver;\n\n ngOnInit() {\n super.ngOnInit();\n this.updateDirection();\n this.observeDirectionChanges();\n }\n\n onSlide(event) {\n const value = event.target.value;\n const image = event.target.previousElementSibling;\n\n if (this.isRTL) {\n image.style.clipPath = `polygon(${100 - value}% 0, 100% 0, 100% 100%, ${100 - value}% 100%)`;\n } else {\n image.style.clipPath = `polygon(0 0, ${value}% 0, ${value}% 100%, 0 100%)`;\n }\n }\n\n updateDirection() {\n this.isRTL = !!this.el.nativeElement.closest('[dir=\"rtl\"]');\n }\n\n observeDirectionChanges() {\n if (isPlatformBrowser(this.platformId)) {\n const targetNode = document?.documentElement;\n const config = { attributes: true, attributeFilter: ['dir'] };\n\n this.mutationObserver = new MutationObserver(() => {\n this.updateDirection();\n });\n\n this.mutationObserver.observe(targetNode, config);\n }\n }\n\n ngOnDestroy() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n\n super.ngOnDestroy();\n }\n}\n\n@NgModule({\n imports: [ImageCompare, SharedModule],\n exports: [ImageCompare, SharedModule]\n})\nexport class ImageCompareModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;yBAyBD,EAAE,CAAC,0BAA0B,CAAC,CAAA;;0CAEb,EAAE,CAAC,0BAA0B,CAAC,CAAA;;;sBAGlD,EAAE,CAAC,yCAAyC,CAAC,CAAA;;;;;cAKrD,EAAE,CAAC,0BAA0B,CAAC,CAAA;aAC/B,EAAE,CAAC,0BAA0B,CAAC,CAAA;kBACzB,EAAE,CAAC,gCAAgC,CAAC,CAAA;AACxC,YAAA,EAAA,EAAE,CAAC,kCAAkC,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAA;qBAC/E,EAAE,CAAC,mCAAmC,CAAC,C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AA,CAAA;kBAAhB;YAKQ,cAAc,EAAA,CAAA;kBAAtB;YAKQ,SAAS,EAAA,CAAA;kBAAjB;YAMqB,YAAY,EAAA,CAAA;kBAAjC,YAAY;mBAAC,MAAM;YAMG,aAAa,EAAA,CAAA;kBAAnC,YAAY;mBAAC,OAAO;;kFA9BZ,YAAY,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,GAAA;MAmFZ,kBAAkB,CAAA;4GAAlB,kBAAkB,GAAA,CAAA,EAAA;4DAAlB,kBAAkB,EAAA,CAAA;gEAHjB,YAAY,EAAE,YAAY,EACZ,YAAY,CAAA,EAAA,CAAA;;iFAE3B,kBAAkB,EAAA,CAAA;cAJ9B,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,gBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACvC,aAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,kBAAkB,cAnFlB,YAAY,EAgFG,YAAY,CAhF3B,EAAA,OAAA,EAAA,CAAA,YAAY,EAiFG,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;AC/GxC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"primeng-imagecompare.mjs","sources":["../../src/imagecompare/style/imagecomparestyle.ts","../../src/imagecompare/imagecompare.ts","../../src/imagecompare/primeng-imagecompare.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-imagecompare {\n position: relative;\n overflow: hidden;\n width: 100%;\n aspect-ratio: 16 / 9;\n}\n\n.p-imagecompare img {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.p-imagecompare img + img {\n clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);\n}\n\n.p-imagecompare:dir(rtl) img + img {\n clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);\n}\n\n.p-imagecompare-slider {\n position: relative;\n -webkit-appearance: none;\n width: calc(100% + ${dt('imagecompare.handle.size')});\n height: 100%;\n margin-inline-start: calc(-1 * calc(${dt('imagecompare.handle.size')} / 2));\n background-color: transparent;\n outline: none;\n transition: all ${dt('imagecompare.handle.transition.duration')};\n}\n\n.p-imagecompare-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: ${dt('imagecompare.handle.size')};\n width: ${dt('imagecompare.handle.size')};\n background: ${dt('imagecompare.handle.background')};\n border: ${dt('imagecompare.handle.border.width')} solid ${dt('imagecompare.handle.border.color')};\n border-radius: ${dt('imagecompare.handle.border.radius')};\n background-size: contain;\n cursor: ew-resize;\n transition: all ${dt('imagecompare.handle.transition.duration')};\n}\n\n.p-imagecompare-slider::-moz-range-thumb {\n height: ${dt('imagecompare.handle.size')};\n width: ${dt('imagecompare.handle.size')};\n background: ${dt('imagecompare.handle.background')};\n border: ${dt('imagecompare.handle.border.width')} ${dt('imagecompare.handle.border.style')} ${dt('imagecompare.handle.border.color')};\n border-radius: ${dt('imagecompare.handle.border.radius')};\n background-size: contain;\n cursor: ew-resize;\n}\n\n.p-imagecompare-slider:focus-visible::-webkit-slider-thumb {\n box-shadow: ${dt('imagecompare.handle.focus.ring.shadow')};\n outline: ${dt('imagecompare.handle.focus.ring.width')} ${dt('imagecompare.handle.focus.ring.style')} ${dt('imagecompare.handle.focus.ring.color')};\n outline-offset: ${dt('imagecompare.handle.focus.ring.offset')};\n}\n\n.p-imagecompare-slider:focus-visible::-moz-range-thumb {\n box-shadow: ${dt('imagecompare.handle.focus.ring.shadow')};\n outline: ${dt('imagecompare.handle.focus.ring.width')} ${dt('imagecompare.handle.focus.ring.style')} ${dt('imagecompare.handle.focus.ring.color')};\n outline-offset: ${dt('imagecompare.handle.focus.ring.offset')};\n}\n\n.p-imagecompare-slider:hover {\n width: calc(100% + ${dt('imagecompare.handle.hover.size')});\n margin-inline-start: calc(-1 * calc(${dt('imagecompare.handle.hover.size')} / 2));\n}\n\n.p-imagecompare-slider:hover::-webkit-slider-thumb {\n background: ${dt('imagecompare.handle.hover.background')};\n border-color: ${dt('imagecompare.handle.hover.border.color')};\n height: ${dt('imagecompare.handle.hover.size')};\n width: ${dt('imagecompare.handle.hover.size')};\n}\n\n.p-imagecompare-slider:hover::-moz-range-thumb {\n background: ${dt('imagecompare.handle.hover.background')};\n border-color: ${dt('imagecompare.handle.hover.border.color')};\n height: ${dt('imagecompare.handle.hover.size')};\n width: ${dt('imagecompare.handle.hover.size')};\n}\n`;\n\nconst classes = {\n root: 'p-imagecompare',\n slider: 'p-imagecompare-slider'\n};\n\n@Injectable()\nexport class ImageCompareStyle extends BaseStyle {\n name = 'imagecompare';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * ImageCompare compares two images side by side with a slider.\n *\n * [Live Demo](https://www.primeng.org/imagecompare/)\n *\n * @module imagecomparestyle\n *\n */\nexport enum ImageCompareClasses {\n /**\n * Class name of the root element\n */\n root = 'p-imagecompare',\n /**\n * Class name of the slider element\n */\n slider = 'p-imagecompare-slider'\n}\nexport interface ImageCompareStyle extends BaseStyle {}\n","import { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, NgModule, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ImageCompareStyle } from './style/imagecomparestyle';\n\n/**\n * Compare two images side by side with a slider.\n * @group Components\n */\n@Component({\n selector: 'p-imageCompare, p-imagecompare, p-image-compare',\n standalone: true,\n imports: [CommonModule, SharedModule],\n template: `\n <ng-template *ngTemplateOutlet=\"leftTemplate || _leftTemplate\"></ng-template>\n <ng-template *ngTemplateOutlet=\"rightTemplate || _rightTemplate\"></ng-template>\n\n <input type=\"range\" min=\"0\" max=\"100\" value=\"50\" (input)=\"onSlide($event)\" [class]=\"cx('slider')\" />\n `,\n host: {\n class: 'p-imagecompare',\n '[attr.tabindex]': 'tabindex',\n '[attr.aria-labelledby]': 'ariaLabelledby',\n '[attr.aria-label]': 'ariaLabel'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ImageCompareStyle]\n})\nexport class ImageCompare extends BaseComponent implements AfterContentInit {\n isRTL: boolean = false;\n\n /**\n * Index of the element in tabbing order.\n * @defaultValue 0\n * @group Props\n */\n @Input() tabindex: number | undefined;\n /**\n * Defines a string value that labels an interactive element.\n * @group Props\n */\n @Input() ariaLabelledby: string | undefined;\n /**\n * Identifier of the underlying input element.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n\n /**\n * Template for the left side.\n * @group Templates\n */\n @ContentChild('left', { descendants: false }) leftTemplate: TemplateRef<any>;\n\n /**\n * Template for the right side.\n * @group Templates\n */\n @ContentChild('right', { descendants: false }) rightTemplate: TemplateRef<any>;\n\n _leftTemplate: TemplateRef<any> | undefined;\n\n _rightTemplate: TemplateRef<any> | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n _componentStyle = inject(ImageCompareStyle);\n\n mutationObserver: MutationObserver;\n\n ngOnInit() {\n super.ngOnInit();\n this.updateDirection();\n this.observeDirectionChanges();\n }\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'left':\n this._leftTemplate = item.template;\n break;\n case 'right':\n this._rightTemplate = item.template;\n break;\n }\n });\n }\n\n onSlide(event) {\n const value = event.target.value;\n const image = event.target.previousElementSibling;\n\n if (this.isRTL) {\n image.style.clipPath = `polygon(${100 - value}% 0, 100% 0, 100% 100%, ${100 - value}% 100%)`;\n } else {\n image.style.clipPath = `polygon(0 0, ${value}% 0, ${value}% 100%, 0 100%)`;\n }\n }\n\n updateDirection() {\n this.isRTL = !!this.el.nativeElement.closest('[dir=\"rtl\"]');\n }\n\n observeDirectionChanges() {\n if (isPlatformBrowser(this.platformId)) {\n const targetNode = document?.documentElement;\n const config = { attributes: true, attributeFilter: ['dir'] };\n\n this.mutationObserver = new MutationObserver(() => {\n this.updateDirection();\n });\n\n this.mutationObserver.observe(targetNode, config);\n }\n }\n\n ngOnDestroy() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n }\n\n super.ngOnDestroy();\n }\n}\n\n@NgModule({\n imports: [ImageCompare, SharedModule],\n exports: [ImageCompare, SharedModule]\n})\nexport class ImageCompareModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;yBAyBD,EAAE,CAAC,0BAA0B,CAAC,CAAA;;0CAEb,EAAE,CAAC,0BAA0B,CAAC,CAAA;;;sBAGlD,EAAE,CAAC,yCAAyC,CAAC,CAAA;;;;;cAKrD,EAAE,CAAC,0BAA0B,CAAC,CAAA;aAC/B,EAAE,CAAC,0BAA0B,CAAC,CAAA;kBACzB,EAAE,CAAC,gCAAgC,CAAC,CAAA;AACxC,YAAA,EAAA,EAAE,CAAC,kCAAkC,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAA;qBAC/E,EAAE,CAAC,mCAAmC,CAAC,CAAA;;;sBAGtC,EAAE,CAAC,yCAAyC,CAAC,CAAA;;;;cAIrD,EAAE,CAAC,0BAA0B,CAAC,CAAA;aAC/B,EAAE,CAAC,0BAA0B,CAAC,CAAA;kBACzB,EAAE,CAAC,gCAAgC,CAAC,CAAA;AACxC,YAAA,EAAA,EAAE,CAAC,kCAAkC,CAAC,CAAA,CAAA,EAAI,EAAE,CAAC,kCAAkC,CAAC,CAAI,CAAA,EAAA,EAAE,CAAC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;;;;"}
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import * as i1 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable, Component, EventEmitter, inject, booleanAttribute, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, NgModule } from '@angular/core';
|
5
|
-
import { SharedModule } from 'primeng/api';
|
4
|
+
import { Injectable, Component, EventEmitter, inject, booleanAttribute, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, ContentChildren, NgModule } from '@angular/core';
|
5
|
+
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
6
6
|
import { BaseComponent } from 'primeng/basecomponent';
|
7
7
|
import * as i2 from 'primeng/button';
|
8
8
|
import { ButtonModule } from 'primeng/button';
|
9
9
|
import { TimesIcon } from 'primeng/icons';
|
10
10
|
import { BaseStyle } from 'primeng/base';
|
11
|
+
import { Ripple } from 'primeng/ripple';
|
11
12
|
|
12
13
|
const theme = ({ dt }) => `
|
13
14
|
.p-inplace-display {
|
@@ -98,7 +99,7 @@ function Inplace_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
98
99
|
const ctx_r1 = i0.ɵɵnextContext();
|
99
100
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c7, ctx_r1.disabled));
|
100
101
|
i0.ɵɵadvance(2);
|
101
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.displayTemplate);
|
102
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.displayTemplate || ctx_r1._displayTemplate);
|
102
103
|
} }
|
103
104
|
function Inplace_div_2_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
104
105
|
i0.ɵɵelementContainer(0);
|
@@ -131,9 +132,9 @@ function Inplace_div_2_ng_container_3_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
131
132
|
i0.ɵɵproperty("ngClass", "p-button-icon-only");
|
132
133
|
i0.ɵɵattribute("aria-label", ctx_r1.closeAriaLabel);
|
133
134
|
i0.ɵɵadvance();
|
134
|
-
i0.ɵɵproperty("ngIf", !ctx_r1.
|
135
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.closeIconTemplate && !ctx_r1._closeIconTemplate);
|
135
136
|
i0.ɵɵadvance();
|
136
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.
|
137
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.closeIconTemplate || ctx_r1._closeIconTemplate);
|
137
138
|
} }
|
138
139
|
function Inplace_div_2_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
139
140
|
i0.ɵɵelementContainerStart(0);
|
@@ -154,7 +155,7 @@ function Inplace_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
154
155
|
} if (rf & 2) {
|
155
156
|
const ctx_r1 = i0.ɵɵnextContext();
|
156
157
|
i0.ɵɵadvance(2);
|
157
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.contentTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c8, ctx_r1.onDeactivateClick.bind(ctx_r1)));
|
158
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.contentTemplate || ctx_r1._contentTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c8, ctx_r1.onDeactivateClick.bind(ctx_r1)));
|
158
159
|
i0.ɵɵadvance();
|
159
160
|
i0.ɵɵproperty("ngIf", ctx_r1.closable);
|
160
161
|
} }
|
@@ -174,7 +175,7 @@ class InplaceDisplay {
|
|
174
175
|
template: '<ng-content></ng-content>'
|
175
176
|
}]
|
176
177
|
}], null, null); })();
|
177
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InplaceDisplay, { className: "InplaceDisplay", filePath: "inplace.ts", lineNumber:
|
178
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InplaceDisplay, { className: "InplaceDisplay", filePath: "inplace.ts", lineNumber: 16 }); })();
|
178
179
|
class InplaceContent {
|
179
180
|
static ɵfac = function InplaceContent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InplaceContent)(); };
|
180
181
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InplaceContent, selectors: [["p-inplacecontent"], ["p-inplaceContent"]], ngContentSelectors: _c0, decls: 1, vars: 0, template: function InplaceContent_Template(rf, ctx) { if (rf & 1) {
|
@@ -191,7 +192,7 @@ class InplaceContent {
|
|
191
192
|
template: '<ng-content></ng-content>'
|
192
193
|
}]
|
193
194
|
}], null, null); })();
|
194
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InplaceContent, { className: "InplaceContent", filePath: "inplace.ts", lineNumber:
|
195
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InplaceContent, { className: "InplaceContent", filePath: "inplace.ts", lineNumber: 24 }); })();
|
195
196
|
/**
|
196
197
|
* Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.
|
197
198
|
* @group Components
|
@@ -250,21 +251,21 @@ class Inplace extends BaseComponent {
|
|
250
251
|
*/
|
251
252
|
onDeactivate = new EventEmitter();
|
252
253
|
hover;
|
253
|
-
displayTemplate;
|
254
254
|
/**
|
255
255
|
* Display template of the element.
|
256
256
|
* @group Templates
|
257
257
|
*/
|
258
|
-
|
258
|
+
displayTemplate;
|
259
259
|
/**
|
260
260
|
* Content template of the element.
|
261
261
|
* @group Templates
|
262
262
|
*/
|
263
|
-
|
263
|
+
contentTemplate;
|
264
264
|
/**
|
265
265
|
* Close icon template of the element.
|
266
266
|
* @group Templates
|
267
267
|
*/
|
268
|
+
closeIconTemplate;
|
268
269
|
_componentStyle = inject(InplaceStyle);
|
269
270
|
onActivateClick(event) {
|
270
271
|
if (!this.preventClick)
|
@@ -305,16 +306,37 @@ class Inplace extends BaseComponent {
|
|
305
306
|
event.preventDefault();
|
306
307
|
}
|
307
308
|
}
|
309
|
+
templates;
|
310
|
+
_displayTemplate;
|
311
|
+
_closeIconTemplate;
|
312
|
+
_contentTemplate;
|
313
|
+
ngAfterContentInit() {
|
314
|
+
this.templates?.forEach((item) => {
|
315
|
+
switch (item.getType()) {
|
316
|
+
case 'display':
|
317
|
+
this._displayTemplate = item.template;
|
318
|
+
break;
|
319
|
+
case 'closeicon':
|
320
|
+
this._closeIconTemplate = item.template;
|
321
|
+
break;
|
322
|
+
case 'content':
|
323
|
+
this._contentTemplate = item.template;
|
324
|
+
break;
|
325
|
+
}
|
326
|
+
});
|
327
|
+
}
|
308
328
|
static ɵfac = /*@__PURE__*/ (() => { let ɵInplace_BaseFactory; return function Inplace_Factory(__ngFactoryType__) { return (ɵInplace_BaseFactory || (ɵInplace_BaseFactory = i0.ɵɵgetInheritedFactory(Inplace)))(__ngFactoryType__ || Inplace); }; })();
|
309
329
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Inplace, selectors: [["p-inplace"]], contentQueries: function Inplace_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
310
|
-
i0.ɵɵcontentQuery(dirIndex, _c1,
|
311
|
-
i0.ɵɵcontentQuery(dirIndex, _c2,
|
312
|
-
i0.ɵɵcontentQuery(dirIndex, _c3,
|
330
|
+
i0.ɵɵcontentQuery(dirIndex, _c1, 4);
|
331
|
+
i0.ɵɵcontentQuery(dirIndex, _c2, 4);
|
332
|
+
i0.ɵɵcontentQuery(dirIndex, _c3, 4);
|
333
|
+
i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
|
313
334
|
} if (rf & 2) {
|
314
335
|
let _t;
|
315
336
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.displayTemplate = _t.first);
|
316
337
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.contentTemplate = _t.first);
|
317
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.
|
338
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.closeIconTemplate = _t.first);
|
339
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
|
318
340
|
} }, inputs: { active: [2, "active", "active", booleanAttribute], closable: [2, "closable", "closable", booleanAttribute], disabled: [2, "disabled", "disabled", booleanAttribute], preventClick: [2, "preventClick", "preventClick", booleanAttribute], style: "style", styleClass: "styleClass", closeIcon: "closeIcon", closeAriaLabel: "closeAriaLabel" }, outputs: { onActivate: "onActivate", onDeactivate: "onDeactivate" }, features: [i0.ɵɵProvidersFeature([InplaceStyle]), i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c5, decls: 3, vars: 9, consts: [[3, "ngClass", "ngStyle"], ["class", "p-inplace-display", "tabindex", "0", "role", "button", 3, "ngClass", "click", "keydown", 4, "ngIf"], ["class", "p-inplace-content", 4, "ngIf"], ["tabindex", "0", "role", "button", 1, "p-inplace-display", 3, "click", "keydown", "ngClass"], [4, "ngTemplateOutlet"], [1, "p-inplace-content"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [4, "ngIf"], ["type", "button", "pButton", "", "pRipple", "", 3, "icon", "click", 4, "ngIf"], ["type", "button", "pButton", "", "pRipple", "", 3, "ngClass", "click", 4, "ngIf"], ["type", "button", "pButton", "", "pRipple", "", 3, "click", "icon"], ["type", "button", "pButton", "", "pRipple", "", 3, "click", "ngClass"]], template: function Inplace_Template(rf, ctx) { if (rf & 1) {
|
319
341
|
i0.ɵɵprojectionDef(_c4);
|
320
342
|
i0.ɵɵelementStart(0, "div", 0);
|
@@ -328,29 +350,29 @@ class Inplace extends BaseComponent {
|
|
328
350
|
i0.ɵɵproperty("ngIf", !ctx.active);
|
329
351
|
i0.ɵɵadvance();
|
330
352
|
i0.ɵɵproperty("ngIf", ctx.active);
|
331
|
-
} }, dependencies: [CommonModule, i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, ButtonModule, i2.ButtonDirective, TimesIcon, SharedModule], encapsulation: 2, changeDetection: 0 });
|
353
|
+
} }, dependencies: [CommonModule, i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, ButtonModule, i2.ButtonDirective, TimesIcon, SharedModule, Ripple], encapsulation: 2, changeDetection: 0 });
|
332
354
|
}
|
333
355
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Inplace, [{
|
334
356
|
type: Component,
|
335
357
|
args: [{
|
336
358
|
selector: 'p-inplace',
|
337
359
|
standalone: true,
|
338
|
-
imports: [CommonModule, ButtonModule, TimesIcon, SharedModule],
|
360
|
+
imports: [CommonModule, ButtonModule, TimesIcon, SharedModule, Ripple],
|
339
361
|
template: `
|
340
362
|
<div [ngClass]="{ 'p-inplace p-component': true, 'p-inplace-closable': closable }" [ngStyle]="style" [class]="styleClass" [attr.aria-live]="'polite'">
|
341
363
|
<div class="p-inplace-display" (click)="onActivateClick($event)" tabindex="0" role="button" (keydown)="onKeydown($event)" [ngClass]="{ 'p-disabled': disabled }" *ngIf="!active">
|
342
364
|
<ng-content select="[pInplaceDisplay]"></ng-content>
|
343
|
-
<ng-container *ngTemplateOutlet="displayTemplate"></ng-container>
|
365
|
+
<ng-container *ngTemplateOutlet="displayTemplate || _displayTemplate"></ng-container>
|
344
366
|
</div>
|
345
367
|
<div class="p-inplace-content" *ngIf="active">
|
346
368
|
<ng-content select="[pInplaceContent]"></ng-content>
|
347
|
-
<ng-container *ngTemplateOutlet="contentTemplate; context: { closeCallback: onDeactivateClick.bind(this) }"></ng-container>
|
369
|
+
<ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate; context: { closeCallback: onDeactivateClick.bind(this) }"></ng-container>
|
348
370
|
|
349
371
|
<ng-container *ngIf="closable">
|
350
372
|
<button *ngIf="closeIcon" type="button" [icon]="closeIcon" pButton pRipple (click)="onDeactivateClick($event)" [attr.aria-label]="closeAriaLabel"></button>
|
351
373
|
<button *ngIf="!closeIcon" type="button" pButton pRipple [ngClass]="'p-button-icon-only'" (click)="onDeactivateClick($event)" [attr.aria-label]="closeAriaLabel">
|
352
|
-
<TimesIcon *ngIf="!
|
353
|
-
<ng-template *ngTemplateOutlet="
|
374
|
+
<TimesIcon *ngIf="!closeIconTemplate && !_closeIconTemplate" />
|
375
|
+
<ng-template *ngTemplateOutlet="closeIconTemplate || _closeIconTemplate"></ng-template>
|
354
376
|
</button>
|
355
377
|
</ng-container>
|
356
378
|
</div>
|
@@ -386,15 +408,18 @@ class Inplace extends BaseComponent {
|
|
386
408
|
type: Output
|
387
409
|
}], displayTemplate: [{
|
388
410
|
type: ContentChild,
|
389
|
-
args: ['display']
|
411
|
+
args: ['display', { descendants: false }]
|
390
412
|
}], contentTemplate: [{
|
391
413
|
type: ContentChild,
|
392
|
-
args: ['content']
|
393
|
-
}],
|
414
|
+
args: ['content', { descendants: false }]
|
415
|
+
}], closeIconTemplate: [{
|
394
416
|
type: ContentChild,
|
395
|
-
args: ['closeicon']
|
417
|
+
args: ['closeicon', { descendants: false }]
|
418
|
+
}], templates: [{
|
419
|
+
type: ContentChildren,
|
420
|
+
args: [PrimeTemplate]
|
396
421
|
}] }); })();
|
397
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Inplace, { className: "Inplace", filePath: "inplace.ts", lineNumber:
|
422
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Inplace, { className: "Inplace", filePath: "inplace.ts", lineNumber: 57 }); })();
|
398
423
|
class InplaceModule {
|
399
424
|
static ɵfac = function InplaceModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InplaceModule)(); };
|
400
425
|
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: InplaceModule });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"primeng-inplace.mjs","sources":["../../src/inplace/style/inplacestyle.ts","../../src/inplace/inplace.ts","../../src/inplace/primeng-inplace.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-inplace-display {\n display: inline-block;\n cursor: pointer;\n border: 1px solid transparent;\n padding: ${dt('inplace.padding')};\n border-radius: ${dt('inplace.border.radius')};\n transition: background ${dt('inplace.transition.duration')}, color ${dt('inplace.transition.duration')}, outline-color ${dt('inplace.transition.duration')}, box-shadow ${dt('inplace.transition.duration')};\n outline-color: transparent;\n}\n\n.p-inplace-display:not(.p-disabled):hover {\n background: ${dt('inplace.display.hover.background')};\n color: ${dt('inplace.display.hover.color')};\n}\n\n.p-inplace-display:focus-visible {\n box-shadow: ${dt('inplace.focus.ring.shadow')};\n outline: ${dt('inplace.focus.ring.width')} ${dt('inplace.focus.ring.style')} ${dt('inplace.focus.ring.color')};\n outline-offset: ${dt('inplace.focus.ring.offset')};\n}\n\n.p-inplace-content {\n display: block;\n}\n`;\n\nconst classes = {\n root: 'p-inplace p-component',\n display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],\n content: 'p-inplace-content'\n};\n\n@Injectable()\nexport class InplaceStyle extends BaseStyle {\n name = 'inplace';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.\n *\n * [Live Demo](https://www.primeng.org/inplace)\n *\n * @module inplacestyle\n *\n */\nexport enum InplaceClasses {\n /**\n * Class name of the root element\n */\n root = 'p-inplace',\n /**\n * Class name of the display element\n */\n display = 'p-inplace-display',\n /**\n * Class name of the content element\n */\n content = 'p-inplace-content'\n}\n\nexport interface InplaceStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, ContentChild, EventEmitter, inject, Input, NgModule, Output, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ButtonModule } from 'primeng/button';\nimport { TimesIcon } from 'primeng/icons';\nimport { InplaceStyle } from './style/inplacestyle';\n\n@Component({\n selector: 'p-inplacedisplay, p-inplaceDisplay',\n standalone: true,\n imports: [CommonModule],\n template: '<ng-content></ng-content>'\n})\nexport class InplaceDisplay {}\n\n@Component({\n selector: 'p-inplacecontent, p-inplaceContent',\n standalone: true,\n imports: [CommonModule],\n template: '<ng-content></ng-content>'\n})\nexport class InplaceContent {}\n/**\n * Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.\n * @group Components\n */\n@Component({\n selector: 'p-inplace',\n standalone: true,\n imports: [CommonModule, ButtonModule, TimesIcon, SharedModule],\n template: `\n <div [ngClass]=\"{ 'p-inplace p-component': true, 'p-inplace-closable': closable }\" [ngStyle]=\"style\" [class]=\"styleClass\" [attr.aria-live]=\"'polite'\">\n <div class=\"p-inplace-display\" (click)=\"onActivateClick($event)\" tabindex=\"0\" role=\"button\" (keydown)=\"onKeydown($event)\" [ngClass]=\"{ 'p-disabled': disabled }\" *ngIf=\"!active\">\n <ng-content select=\"[pInplaceDisplay]\"></ng-content>\n <ng-container *ngTemplateOutlet=\"displayTemplate\"></ng-container>\n </div>\n <div class=\"p-inplace-content\" *ngIf=\"active\">\n <ng-content select=\"[pInplaceContent]\"></ng-content>\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: { closeCallback: onDeactivateClick.bind(this) }\"></ng-container>\n\n <ng-container *ngIf=\"closable\">\n <button *ngIf=\"closeIcon\" type=\"button\" [icon]=\"closeIcon\" pButton pRipple (click)=\"onDeactivateClick($event)\" [attr.aria-label]=\"closeAriaLabel\"></button>\n <button *ngIf=\"!closeIcon\" type=\"button\" pButton pRipple [ngClass]=\"'p-button-icon-only'\" (click)=\"onDeactivateClick($event)\" [attr.aria-label]=\"closeAriaLabel\">\n <TimesIcon *ngIf=\"!closeicon\" />\n <ng-template *ngTemplateOutlet=\"closeicon\"></ng-template>\n </button>\n </ng-container>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [InplaceStyle]\n})\nexport class Inplace extends BaseComponent {\n /**\n * Whether the content is displayed or not.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) active: boolean | undefined = false;\n /**\n * Displays a button to switch back to display mode.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) closable: boolean | undefined = false;\n /**\n * When present, it specifies that the element should be disabled.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) disabled: boolean | undefined = false;\n /**\n * Allows to prevent clicking.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) preventClick: boolean | undefined;\n /**\n * Inline style of the element.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Icon to display in the close button.\n * @group Props\n */\n @Input() closeIcon: string | undefined;\n /**\n * Establishes a string value that labels the close button.\n * @group Props\n */\n @Input() closeAriaLabel: string | undefined;\n /**\n * Callback to invoke when inplace is opened.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onActivate: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when inplace is closed.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onDeactivate: EventEmitter<Event> = new EventEmitter<Event>();\n\n hover!: boolean;\n\n @ContentChild('display') displayTemplate: TemplateRef<any> | undefined;\n /**\n * Display template of the element.\n * @group Templates\n */\n @ContentChild('content') contentTemplate: TemplateRef<any> | undefined;\n /**\n * Content template of the element.\n * @group Templates\n */\n @ContentChild('closeicon') closeicon: TemplateRef<any> | undefined;\n /**\n * Close icon template of the element.\n * @group Templates\n */\n\n _componentStyle = inject(InplaceStyle);\n\n onActivateClick(event: MouseEvent) {\n if (!this.preventClick) this.activate(event);\n }\n\n onDeactivateClick(event: MouseEvent) {\n if (!this.preventClick) this.deactivate(event);\n }\n /**\n * Activates the content.\n * @param {Event} event - Browser event.\n * @group Method\n */\n activate(event?: Event) {\n if (!this.disabled) {\n this.active = true;\n this.onActivate.emit(event);\n this.cd.markForCheck();\n }\n }\n /**\n * Deactivates the content.\n * @param {Event} event - Browser event.\n * @group Method\n */\n deactivate(event?: Event) {\n if (!this.disabled) {\n this.active = false;\n this.hover = false;\n this.onDeactivate.emit(event);\n this.cd.markForCheck();\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.code === 'Enter') {\n this.activate(event);\n event.preventDefault();\n }\n }\n}\n\n@NgModule({\n imports: [Inplace, InplaceContent, InplaceDisplay, SharedModule],\n exports: [Inplace, InplaceContent, InplaceDisplay, SharedModule]\n})\nexport class InplaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;eAKX,EAAE,CAAC,iBAAiB,CAAC,CAAA;qBACf,EAAE,CAAC,uBAAuB,CAAC,CAAA;AACnB,2BAAA,EAAA,EAAE,CAAC,6BAA6B,CAAC,CAAW,QAAA,EAAA,EAAE,CAAC,6BAA6B,CAAC,CAAmB,gBAAA,EAAA,EAAE,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,CAAC,6BAA6B,CAAC,CAAA;;;;;kBAK7L,EAAE,CAAC,kCAAkC,CAAC,CAAA;aAC3C,EAAE,CAAC,6BAA6B,CAAC,CAAA;;;;kBAI5B,EAAE,CAAC,2BAA2B,CAAC,CAAA;AAClC,aAAA,EAAA,EAAE,CAAC,0BAA0B,CAAC,CAAA,CAAA,EAAI,EAAE,CAAC,0BAA0B,CAAC,CAAI,CAAA,EAAA,EAAE,CAAC,0BAA0B,CAAC,CAAA;sBAC3F,EAAE,CAAC,2BAA2B,CAAC,CAAA;;;;;;CAMpD;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,uBAAuB;AAC7B,IAAA,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,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":3,"file":"primeng-inplace.mjs","sources":["../../src/inplace/style/inplacestyle.ts","../../src/inplace/inplace.ts","../../src/inplace/primeng-inplace.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = ({ dt }) => `\n.p-inplace-display {\n display: inline-block;\n cursor: pointer;\n border: 1px solid transparent;\n padding: ${dt('inplace.padding')};\n border-radius: ${dt('inplace.border.radius')};\n transition: background ${dt('inplace.transition.duration')}, color ${dt('inplace.transition.duration')}, outline-color ${dt('inplace.transition.duration')}, box-shadow ${dt('inplace.transition.duration')};\n outline-color: transparent;\n}\n\n.p-inplace-display:not(.p-disabled):hover {\n background: ${dt('inplace.display.hover.background')};\n color: ${dt('inplace.display.hover.color')};\n}\n\n.p-inplace-display:focus-visible {\n box-shadow: ${dt('inplace.focus.ring.shadow')};\n outline: ${dt('inplace.focus.ring.width')} ${dt('inplace.focus.ring.style')} ${dt('inplace.focus.ring.color')};\n outline-offset: ${dt('inplace.focus.ring.offset')};\n}\n\n.p-inplace-content {\n display: block;\n}\n`;\n\nconst classes = {\n root: 'p-inplace p-component',\n display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],\n content: 'p-inplace-content'\n};\n\n@Injectable()\nexport class InplaceStyle extends BaseStyle {\n name = 'inplace';\n\n theme = theme;\n\n classes = classes;\n}\n\n/**\n *\n * Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.\n *\n * [Live Demo](https://www.primeng.org/inplace)\n *\n * @module inplacestyle\n *\n */\nexport enum InplaceClasses {\n /**\n * Class name of the root element\n */\n root = 'p-inplace',\n /**\n * Class name of the display element\n */\n display = 'p-inplace-display',\n /**\n * Class name of the content element\n */\n content = 'p-inplace-content'\n}\n\nexport interface InplaceStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, EventEmitter, inject, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { ButtonModule } from 'primeng/button';\nimport { TimesIcon } from 'primeng/icons';\nimport { InplaceStyle } from './style/inplacestyle';\nimport { Ripple } from 'primeng/ripple';\n\n@Component({\n selector: 'p-inplacedisplay, p-inplaceDisplay',\n standalone: true,\n imports: [CommonModule],\n template: '<ng-content></ng-content>'\n})\nexport class InplaceDisplay {}\n\n@Component({\n selector: 'p-inplacecontent, p-inplaceContent',\n standalone: true,\n imports: [CommonModule],\n template: '<ng-content></ng-content>'\n})\nexport class InplaceContent {}\n/**\n * Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.\n * @group Components\n */\n@Component({\n selector: 'p-inplace',\n standalone: true,\n imports: [CommonModule, ButtonModule, TimesIcon, SharedModule, Ripple],\n template: `\n <div [ngClass]=\"{ 'p-inplace p-component': true, 'p-inplace-closable': closable }\" [ngStyle]=\"style\" [class]=\"styleClass\" [attr.aria-live]=\"'polite'\">\n <div class=\"p-inplace-display\" (click)=\"onActivateClick($event)\" tabindex=\"0\" role=\"button\" (keydown)=\"onKeydown($event)\" [ngClass]=\"{ 'p-disabled': disabled }\" *ngIf=\"!active\">\n <ng-content select=\"[pInplaceDisplay]\"></ng-content>\n <ng-container *ngTemplateOutlet=\"displayTemplate || _displayTemplate\"></ng-container>\n </div>\n <div class=\"p-inplace-content\" *ngIf=\"active\">\n <ng-content select=\"[pInplaceContent]\"></ng-content>\n <ng-container *ngTemplateOutlet=\"contentTemplate || _contentTemplate; context: { closeCallback: onDeactivateClick.bind(this) }\"></ng-container>\n\n <ng-container *ngIf=\"closable\">\n <button *ngIf=\"closeIcon\" type=\"button\" [icon]=\"closeIcon\" pButton pRipple (click)=\"onDeactivateClick($event)\" [attr.aria-label]=\"closeAriaLabel\"></button>\n <button *ngIf=\"!closeIcon\" type=\"button\" pButton pRipple [ngClass]=\"'p-button-icon-only'\" (click)=\"onDeactivateClick($event)\" [attr.aria-label]=\"closeAriaLabel\">\n <TimesIcon *ngIf=\"!closeIconTemplate && !_closeIconTemplate\" />\n <ng-template *ngTemplateOutlet=\"closeIconTemplate || _closeIconTemplate\"></ng-template>\n </button>\n </ng-container>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [InplaceStyle]\n})\nexport class Inplace extends BaseComponent implements AfterContentInit {\n /**\n * Whether the content is displayed or not.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) active: boolean | undefined = false;\n /**\n * Displays a button to switch back to display mode.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) closable: boolean | undefined = false;\n /**\n * When present, it specifies that the element should be disabled.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) disabled: boolean | undefined = false;\n /**\n * Allows to prevent clicking.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) preventClick: boolean | undefined;\n /**\n * Inline style of the element.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Icon to display in the close button.\n * @group Props\n */\n @Input() closeIcon: string | undefined;\n /**\n * Establishes a string value that labels the close button.\n * @group Props\n */\n @Input() closeAriaLabel: string | undefined;\n /**\n * Callback to invoke when inplace is opened.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onActivate: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when inplace is closed.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onDeactivate: EventEmitter<Event> = new EventEmitter<Event>();\n\n hover!: boolean;\n /**\n * Display template of the element.\n * @group Templates\n */\n @ContentChild('display', { descendants: false }) displayTemplate: TemplateRef<any> | undefined;\n /**\n * Content template of the element.\n * @group Templates\n */\n @ContentChild('content', { descendants: false }) contentTemplate: TemplateRef<any> | undefined;\n /**\n * Close icon template of the element.\n * @group Templates\n */\n @ContentChild('closeicon', { descendants: false }) closeIconTemplate: TemplateRef<any> | undefined;\n\n _componentStyle = inject(InplaceStyle);\n\n onActivateClick(event: MouseEvent) {\n if (!this.preventClick) this.activate(event);\n }\n\n onDeactivateClick(event: MouseEvent) {\n if (!this.preventClick) this.deactivate(event);\n }\n /**\n * Activates the content.\n * @param {Event} event - Browser event.\n * @group Method\n */\n activate(event?: Event) {\n if (!this.disabled) {\n this.active = true;\n this.onActivate.emit(event);\n this.cd.markForCheck();\n }\n }\n /**\n * Deactivates the content.\n * @param {Event} event - Browser event.\n * @group Method\n */\n deactivate(event?: Event) {\n if (!this.disabled) {\n this.active = false;\n this.hover = false;\n this.onDeactivate.emit(event);\n this.cd.markForCheck();\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.code === 'Enter') {\n this.activate(event);\n event.preventDefault();\n }\n }\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n _displayTemplate: TemplateRef<any> | undefined;\n\n _closeIconTemplate: TemplateRef<any> | undefined;\n\n _contentTemplate: TemplateRef<any> | undefined;\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'display':\n this._displayTemplate = item.template;\n break;\n\n case 'closeicon':\n this._closeIconTemplate = item.template;\n break;\n\n case 'content':\n this._contentTemplate = item.template;\n break;\n }\n });\n }\n}\n\n@NgModule({\n imports: [Inplace, InplaceContent, InplaceDisplay, SharedModule],\n exports: [Inplace, InplaceContent, InplaceDisplay, SharedModule]\n})\nexport class InplaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;;;;;eAKX,EAAE,CAAC,iBAAiB,CAAC,CAAA;qBACf,EAAE,CAAC,uBAAuB,CAAC,CAAA;AACnB,2BAAA,EAAA,EAAE,CAAC,6BAA6B,CAAC,CAAW,QAAA,EAAA,EAAE,CAAC,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d,cAAc,EAuL4B,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACtMnE;;AAEG;;;;"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as i1 from '@angular/common';
|
2
2
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable, forwardRef, EventEmitter, inject, booleanAttribute, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, ViewChild, NgModule } from '@angular/core';
|
4
|
+
import { Injectable, forwardRef, EventEmitter, inject, booleanAttribute, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ContentChild, ContentChildren, ViewChild, NgModule } from '@angular/core';
|
5
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
6
6
|
import { getUserAgent, isClient } from '@primeuix/utils';
|
7
|
-
import { SharedModule } from 'primeng/api';
|
7
|
+
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
8
8
|
import { AutoFocus } from 'primeng/autofocus';
|
9
9
|
import { BaseComponent } from 'primeng/basecomponent';
|
10
10
|
import { TimesIcon } from 'primeng/icons';
|
@@ -16,7 +16,7 @@ p-inputmask {
|
|
16
16
|
position: relative;
|
17
17
|
}
|
18
18
|
|
19
|
-
.p-icon
|
19
|
+
.p-inputmask-clear-icon {
|
20
20
|
position: absolute;
|
21
21
|
top: 50%;
|
22
22
|
margin-top: -0.5rem;
|
@@ -122,7 +122,7 @@ function InputMask_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
122
122
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
123
123
|
i0.ɵɵattribute("data-pc-section", "clearIcon");
|
124
124
|
i0.ɵɵadvance();
|
125
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.
|
125
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.clearIconTemplate || ctx_r2._clearIconTemplate);
|
126
126
|
} }
|
127
127
|
function InputMask_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
128
128
|
i0.ɵɵelementContainerStart(0);
|
@@ -131,9 +131,9 @@ function InputMask_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
131
131
|
} if (rf & 2) {
|
132
132
|
const ctx_r2 = i0.ɵɵnextContext();
|
133
133
|
i0.ɵɵadvance();
|
134
|
-
i0.ɵɵproperty("ngIf", !ctx_r2.
|
134
|
+
i0.ɵɵproperty("ngIf", !ctx_r2.clearIconTemplate && !ctx_r2._clearIconTemplate);
|
135
135
|
i0.ɵɵadvance();
|
136
|
-
i0.ɵɵproperty("ngIf", ctx_r2.
|
136
|
+
i0.ɵɵproperty("ngIf", ctx_r2.clearIconTemplate || ctx_r2._clearIconTemplate);
|
137
137
|
} }
|
138
138
|
const INPUTMASK_VALUE_ACCESSOR = {
|
139
139
|
provide: NG_VALUE_ACCESSOR,
|
@@ -330,7 +330,8 @@ class InputMask extends BaseComponent {
|
|
330
330
|
* Template of the clear icon.
|
331
331
|
* @group Templates
|
332
332
|
*/
|
333
|
-
|
333
|
+
clearIconTemplate;
|
334
|
+
templates;
|
334
335
|
inputViewChild;
|
335
336
|
value;
|
336
337
|
_mask;
|
@@ -363,6 +364,16 @@ class InputMask extends BaseComponent {
|
|
363
364
|
}
|
364
365
|
this.initMask();
|
365
366
|
}
|
367
|
+
_clearIconTemplate;
|
368
|
+
ngAfterContentInit() {
|
369
|
+
this.templates.forEach((item) => {
|
370
|
+
switch (item.getType()) {
|
371
|
+
case 'clearicon':
|
372
|
+
this._clearIconTemplate = item.template;
|
373
|
+
break;
|
374
|
+
}
|
375
|
+
});
|
376
|
+
}
|
366
377
|
initMask() {
|
367
378
|
this.tests = [];
|
368
379
|
this.partialPosition = this.mask.length;
|
@@ -797,10 +808,12 @@ class InputMask extends BaseComponent {
|
|
797
808
|
}
|
798
809
|
static ɵfac = /*@__PURE__*/ (() => { let ɵInputMask_BaseFactory; return function InputMask_Factory(__ngFactoryType__) { return (ɵInputMask_BaseFactory || (ɵInputMask_BaseFactory = i0.ɵɵgetInheritedFactory(InputMask)))(__ngFactoryType__ || InputMask); }; })();
|
799
810
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InputMask, selectors: [["p-inputmask"], ["p-inputMask"], ["p-input-mask"]], contentQueries: function InputMask_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
800
|
-
i0.ɵɵcontentQuery(dirIndex, _c0,
|
811
|
+
i0.ɵɵcontentQuery(dirIndex, _c0, 4);
|
812
|
+
i0.ɵɵcontentQuery(dirIndex, PrimeTemplate, 4);
|
801
813
|
} if (rf & 2) {
|
802
814
|
let _t;
|
803
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.
|
815
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.clearIconTemplate = _t.first);
|
816
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
|
804
817
|
} }, viewQuery: function InputMask_Query(rf, ctx) { if (rf & 1) {
|
805
818
|
i0.ɵɵviewQuery(_c1, 7);
|
806
819
|
} if (rf & 2) {
|
@@ -860,9 +873,9 @@ class InputMask extends BaseComponent {
|
|
860
873
|
[attr.data-pc-section]="'root'"
|
861
874
|
/>
|
862
875
|
<ng-container *ngIf="value != null && filled && showClear && !disabled">
|
863
|
-
<TimesIcon *ngIf="!
|
864
|
-
<span *ngIf="
|
865
|
-
<ng-template *ngTemplateOutlet="
|
876
|
+
<TimesIcon *ngIf="!clearIconTemplate && !_clearIconTemplate" [styleClass]="'p-inputmask-clear-icon'" (click)="clear()" [attr.data-pc-section]="'clearIcon'" />
|
877
|
+
<span *ngIf="clearIconTemplate || _clearIconTemplate" class="p-inputmask-clear-icon" (click)="clear()" [attr.data-pc-section]="'clearIcon'">
|
878
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate || _clearIconTemplate"></ng-template>
|
866
879
|
</span>
|
867
880
|
</ng-container>
|
868
881
|
`,
|
@@ -947,14 +960,17 @@ class InputMask extends BaseComponent {
|
|
947
960
|
type: Output
|
948
961
|
}], onClear: [{
|
949
962
|
type: Output
|
950
|
-
}],
|
963
|
+
}], clearIconTemplate: [{
|
951
964
|
type: ContentChild,
|
952
|
-
args: ['clearicon']
|
965
|
+
args: ['clearicon', { descendants: false }]
|
966
|
+
}], templates: [{
|
967
|
+
type: ContentChildren,
|
968
|
+
args: [PrimeTemplate]
|
953
969
|
}], inputViewChild: [{
|
954
970
|
type: ViewChild,
|
955
971
|
args: ['input', { static: true }]
|
956
972
|
}] }); })();
|
957
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputMask, { className: "InputMask", filePath: "inputmask.ts", lineNumber:
|
973
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InputMask, { className: "InputMask", filePath: "inputmask.ts", lineNumber: 118 }); })();
|
958
974
|
class InputMaskModule {
|
959
975
|
static ɵfac = function InputMaskModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputMaskModule)(); };
|
960
976
|
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: InputMaskModule });
|