primeng 22.1.3 → 22.1.4
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/fesm2022/primeng-base.mjs +6 -1
- package/fesm2022/primeng-basecomponent.mjs +19 -10
- package/fesm2022/primeng-config.mjs +4 -2
- package/fesm2022/primeng-confirmpopup.mjs +4 -4
- package/fesm2022/primeng-datepicker.mjs +31 -4
- package/fesm2022/primeng-drawer.mjs +1 -3
- package/fesm2022/primeng-fieldset.mjs +0 -2
- package/fesm2022/primeng-panel.mjs +0 -2
- package/fesm2022/primeng-scroller.mjs +19 -4
- package/fesm2022/primeng-select.mjs +13 -11
- package/fesm2022/primeng-table.mjs +10 -10
- package/fesm2022/primeng-treeselect.mjs +27 -0
- package/package.json +3 -3
- package/types/primeng-base.d.ts +1 -0
- package/types/primeng-basecomponent.d.ts +2 -0
- package/types/primeng-config.d.ts +7 -2
- package/types/primeng-confirmpopup.d.ts +2 -2
- package/types/primeng-datepicker.d.ts +9 -0
- package/types/primeng-scroller.d.ts +4 -3
- package/types/primeng-select.d.ts +3 -3
- package/types/primeng-table.d.ts +3 -3
- package/types/primeng-treeselect.d.ts +9 -2
- package/types/primeng-types-treeselect.d.ts +15 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Injectable, inject } from "@angular/core";
|
|
3
|
-
import { style } from "@primeuix/styles/base";
|
|
3
|
+
import { preflight, style } from "@primeuix/styles/base";
|
|
4
4
|
import { escapeAttribute, escapeStyleText, minifyCSS, resolve, toAttributes } from "@primeuix/utils";
|
|
5
5
|
import { STYLE_ID_ATTRIBUTE, StyleScope, UseStyle } from "primeng/usestyle";
|
|
6
6
|
var base_default = {
|
|
@@ -60,6 +60,11 @@ var BaseStyle = class BaseStyle {
|
|
|
60
60
|
loadStyle = (options = {}, style = "") => this.load(this.style, options, (computedStyle = "") => this.#scope.theme.transformCSS(options.name || this.name, `${computedStyle}${this.#scope.resolvers.css`${style}`}`));
|
|
61
61
|
loadBaseCSS = (options = {}) => this.load(css, options, (computedStyle) => this.#scope.scopeCSS(computedStyle));
|
|
62
62
|
loadBaseStyle = (options = {}, style$1 = "") => this.load(style, options, (computedStyle = "") => this.#scope.theme.transformCSS(options.name || this.name, `${computedStyle}${this.#scope.resolvers.css`${style$1}`}`));
|
|
63
|
+
loadPreflight = (options = {}) => this.load(preflight, {
|
|
64
|
+
...options,
|
|
65
|
+
name: "preflight-style",
|
|
66
|
+
raw: true
|
|
67
|
+
}, (computedStyle) => this.#scope.scopeCSS(computedStyle));
|
|
63
68
|
getCommonTheme = (params) => this.#scope.theme.getCommon(this.name, params);
|
|
64
69
|
getComponentTheme = (params) => this.#scope.theme.getComponent(this.name, params);
|
|
65
70
|
getPresetTheme = (preset, selector, params) => this.#scope.theme.getCustomPreset(this.name, preset, selector, params);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DOCUMENT, isPlatformServer } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { ChangeDetectorRef, Directive, ElementRef, Injectable, InjectionToken, Injector, PLATFORM_ID, Renderer2, computed, effect, inject, input, isSignal, signal } from "@angular/core";
|
|
4
|
+
import { PREFLIGHT_LAYER, composeLayerOrder } from "@primeuix/styled";
|
|
4
5
|
import { cn, getKeyValue, isArray, isFunction, isNotEmpty, isString, mergeProps, resolve, toFlatCase } from "@primeuix/utils";
|
|
5
6
|
import { Base, BaseStyle } from "primeng/base";
|
|
6
7
|
import { PrimeNG } from "primeng/config";
|
|
@@ -79,6 +80,7 @@ var BaseComponent = class BaseComponent {
|
|
|
79
80
|
directivePT = signal(void 0, ...ngDevMode ? [{ debugName: "directivePT" }] : /* istanbul ignore next */ []);
|
|
80
81
|
directiveUnstyled = signal(void 0, ...ngDevMode ? [{ debugName: "directiveUnstyled" }] : /* istanbul ignore next */ []);
|
|
81
82
|
$unstyled = computed(() => this.unstyled() ?? this.directiveUnstyled() ?? this.config?.unstyled() ?? false, ...ngDevMode ? [{ debugName: "$unstyled" }] : /* istanbul ignore next */ []);
|
|
83
|
+
$preflight = computed(() => !this.$unstyled() && this.config?.preflight() === true, ...ngDevMode ? [{ debugName: "$preflight" }] : /* istanbul ignore next */ []);
|
|
82
84
|
$pt = computed(() => resolve(this.pt() || this.directivePT(), this.$params), ...ngDevMode ? [{ debugName: "$pt" }] : /* istanbul ignore next */ []);
|
|
83
85
|
get $globalPT() {
|
|
84
86
|
return this._getPT(this.config?.pt(), void 0, (value) => resolve(value, this.$params));
|
|
@@ -225,6 +227,10 @@ var BaseComponent = class BaseComponent {
|
|
|
225
227
|
this._loadGlobalStyles();
|
|
226
228
|
this.$base.setLoadedStyleName("base");
|
|
227
229
|
}
|
|
230
|
+
if (this.$preflight() && !this.$base.isStyleNameLoaded("preflight")) {
|
|
231
|
+
this.baseStyle.loadPreflight(this.$styleOptions);
|
|
232
|
+
this.$base.setLoadedStyleName("preflight");
|
|
233
|
+
}
|
|
228
234
|
this._loadThemeStyles();
|
|
229
235
|
}
|
|
230
236
|
_loadStyles() {
|
|
@@ -246,7 +252,19 @@ var BaseComponent = class BaseComponent {
|
|
|
246
252
|
}
|
|
247
253
|
}
|
|
248
254
|
_loadThemeStyles() {
|
|
249
|
-
if (this.$unstyled()
|
|
255
|
+
if (this.$unstyled()) return;
|
|
256
|
+
if (this.config?.theme() !== "none") this._loadThemeSheets();
|
|
257
|
+
if (!this.$theme.isStyleNameLoaded("layer-order")) {
|
|
258
|
+
const layerOrder = composeLayerOrder(this.$preflight() ? PREFLIGHT_LAYER : void 0, this.$style?.getLayerOrderThemeCSS?.());
|
|
259
|
+
this.baseStyle.load(layerOrder, {
|
|
260
|
+
name: "layer-order",
|
|
261
|
+
first: true,
|
|
262
|
+
...this.$styleOptions
|
|
263
|
+
});
|
|
264
|
+
this.$theme.setLoadedStyleName("layer-order");
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
_loadThemeSheets() {
|
|
250
268
|
if (!this.$theme.isStyleNameLoaded("common")) {
|
|
251
269
|
const { primitive, semantic, global, style } = this.$style?.getCommonTheme?.() || {};
|
|
252
270
|
this.baseStyle.load(primitive?.css, {
|
|
@@ -287,15 +305,6 @@ var BaseComponent = class BaseComponent {
|
|
|
287
305
|
}, style);
|
|
288
306
|
this.$theme.setLoadedStyleName(this.$style?.name);
|
|
289
307
|
}
|
|
290
|
-
if (!this.$theme.isStyleNameLoaded("layer-order")) {
|
|
291
|
-
const layerOrder = this.$style?.getLayerOrderThemeCSS?.();
|
|
292
|
-
this.baseStyle.load(layerOrder, {
|
|
293
|
-
name: "layer-order",
|
|
294
|
-
first: true,
|
|
295
|
-
...this.$styleOptions
|
|
296
|
-
});
|
|
297
|
-
this.$theme.setLoadedStyleName("layer-order");
|
|
298
|
-
}
|
|
299
308
|
}
|
|
300
309
|
_loadScopedThemeStyles(preset) {
|
|
301
310
|
if (this.config?.theme()?.options?.cssVariables === false && this.$style?.name) {
|
|
@@ -118,6 +118,7 @@ var PrimeNG = class PrimeNG extends ThemeProvider {
|
|
|
118
118
|
overlayOptions = {};
|
|
119
119
|
csp = signal({ nonce: void 0 }, ...ngDevMode ? [{ debugName: "csp" }] : /* istanbul ignore next */ []);
|
|
120
120
|
unstyled = signal(void 0, ...ngDevMode ? [{ debugName: "unstyled" }] : /* istanbul ignore next */ []);
|
|
121
|
+
preflight = signal(false, ...ngDevMode ? [{ debugName: "preflight" }] : /* istanbul ignore next */ []);
|
|
121
122
|
pt = signal(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
122
123
|
ptOptions = signal(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
123
124
|
filterMatchModeOptions = {
|
|
@@ -359,7 +360,7 @@ var PrimeNG = class PrimeNG extends ThemeProvider {
|
|
|
359
360
|
this.translationSource.next(this.translation);
|
|
360
361
|
}
|
|
361
362
|
setConfig(config) {
|
|
362
|
-
const { csp, ripple, inputVariant, theme, overlayOptions, translation, filterMatchModeOptions, overlayAppendTo, zIndex, ptOptions, pt, unstyled } = config || {};
|
|
363
|
+
const { csp, ripple, inputVariant, theme, overlayOptions, translation, filterMatchModeOptions, overlayAppendTo, zIndex, ptOptions, pt, unstyled, preflight } = config || {};
|
|
363
364
|
if (csp) this.csp.set(csp);
|
|
364
365
|
if (overlayAppendTo) this.overlayAppendTo.set(overlayAppendTo);
|
|
365
366
|
if (ripple) this.ripple.set(ripple);
|
|
@@ -371,6 +372,7 @@ var PrimeNG = class PrimeNG extends ThemeProvider {
|
|
|
371
372
|
if (pt) this.pt.set(pt);
|
|
372
373
|
if (ptOptions) this.ptOptions.set(ptOptions);
|
|
373
374
|
if (unstyled) this.unstyled.set(unstyled);
|
|
375
|
+
if (preflight !== void 0) this.preflight.set(preflight);
|
|
374
376
|
if (theme) this.setThemeConfig({
|
|
375
377
|
theme,
|
|
376
378
|
csp
|
|
@@ -403,7 +405,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
403
405
|
}]
|
|
404
406
|
});
|
|
405
407
|
const PRIME_NG_CONFIG = new InjectionToken("PRIME_NG_CONFIG");
|
|
406
|
-
const RELEASE_DATE = "2026-10-
|
|
408
|
+
const RELEASE_DATE = "2026-10-22";
|
|
407
409
|
const isFeature = (value) => Array.isArray(value?.ɵproviders);
|
|
408
410
|
function providePrimeNG(...features) {
|
|
409
411
|
const configs = features.filter((feature) => !isFeature(feature));
|
|
@@ -2,7 +2,7 @@ import { NgTemplateOutlet } from "@angular/common";
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, Injectable, InjectionToken, NgModule, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, inject, input, numberAttribute, signal, untracked, viewChild } from "@angular/core";
|
|
4
4
|
import { absolutePosition, addClass, appendChild, findSingle, focus, getOffset, isIOS, isTouchDevice } from "@primeuix/utils";
|
|
5
|
-
import { ConfirmationService, OverlayService, SharedModule, TranslationKeys } from "primeng/api";
|
|
5
|
+
import { ConfirmEventType, ConfirmationService, OverlayService, SharedModule, TranslationKeys } from "primeng/api";
|
|
6
6
|
import { BaseComponent, PARENT_INSTANCE } from "primeng/basecomponent";
|
|
7
7
|
import * as i1 from "primeng/bind";
|
|
8
8
|
import { Bind } from "primeng/bind";
|
|
@@ -176,7 +176,7 @@ var ConfirmPopup = class ConfirmPopup extends BaseComponent {
|
|
|
176
176
|
}
|
|
177
177
|
onEscapeKeydown(event) {
|
|
178
178
|
const confirmation = this.confirmation();
|
|
179
|
-
if (confirmation && confirmation.closeOnEscape !== false) this.onReject();
|
|
179
|
+
if (confirmation && confirmation.closeOnEscape !== false) this.onReject(ConfirmEventType.CANCEL);
|
|
180
180
|
}
|
|
181
181
|
onBeforeEnter(event) {
|
|
182
182
|
const focusValue = this.confirmation()?.defaultFocus ?? this.defaultFocus();
|
|
@@ -245,8 +245,8 @@ var ConfirmPopup = class ConfirmPopup extends BaseComponent {
|
|
|
245
245
|
this.hide();
|
|
246
246
|
focus(this.confirmation()?.target);
|
|
247
247
|
}
|
|
248
|
-
onReject() {
|
|
249
|
-
this.confirmation()?.rejectEvent?.emit();
|
|
248
|
+
onReject(type = ConfirmEventType.REJECT) {
|
|
249
|
+
this.confirmation()?.rejectEvent?.emit(type);
|
|
250
250
|
this.hide();
|
|
251
251
|
focus(this.confirmation()?.target);
|
|
252
252
|
}
|
|
@@ -542,6 +542,15 @@ var DatePicker = class DatePicker extends BaseInput {
|
|
|
542
542
|
selected: !!this.isSelected(date)
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
+
getDayPTOptions(date) {
|
|
546
|
+
return { context: {
|
|
547
|
+
date,
|
|
548
|
+
today: !!date.today,
|
|
549
|
+
otherMonth: !!date.otherMonth,
|
|
550
|
+
selected: !!this.isSelected(date),
|
|
551
|
+
disabled: !date.selectable
|
|
552
|
+
} };
|
|
553
|
+
}
|
|
545
554
|
dayClass(date) {
|
|
546
555
|
return this.pcn(this._componentStyle.classes.day({
|
|
547
556
|
instance: this,
|
|
@@ -742,6 +751,9 @@ var DatePicker = class DatePicker extends BaseInput {
|
|
|
742
751
|
year: this.currentYear
|
|
743
752
|
});
|
|
744
753
|
this.createMonths(this.currentMonth, this.currentYear);
|
|
754
|
+
setTimeout(() => {
|
|
755
|
+
this.updateFocus();
|
|
756
|
+
}, 1);
|
|
745
757
|
}
|
|
746
758
|
}
|
|
747
759
|
navForward(event) {
|
|
@@ -774,6 +786,9 @@ var DatePicker = class DatePicker extends BaseInput {
|
|
|
774
786
|
year: this.currentYear
|
|
775
787
|
});
|
|
776
788
|
this.createMonths(this.currentMonth, this.currentYear);
|
|
789
|
+
setTimeout(() => {
|
|
790
|
+
this.updateFocus();
|
|
791
|
+
}, 1);
|
|
777
792
|
}
|
|
778
793
|
}
|
|
779
794
|
decrementYear() {
|
|
@@ -3161,7 +3176,13 @@ var DatePicker = class DatePicker extends BaseInput {
|
|
|
3161
3176
|
</td>
|
|
3162
3177
|
}
|
|
3163
3178
|
@for (date of week; track date.day) {
|
|
3164
|
-
<td
|
|
3179
|
+
<td
|
|
3180
|
+
[attr.aria-label]="getDateCellAriaLabel(date)"
|
|
3181
|
+
[attr.aria-selected]="isSelected(date) ? 'true' : null"
|
|
3182
|
+
[attr.aria-disabled]="!date.selectable ? 'true' : null"
|
|
3183
|
+
[class]="cx('dayCell', { date })"
|
|
3184
|
+
[pBind]="ptm('dayCell', getDayPTOptions(date))"
|
|
3185
|
+
>
|
|
3165
3186
|
@if (date.otherMonth ? showOtherMonths() : true) {
|
|
3166
3187
|
<span
|
|
3167
3188
|
[class]="dayClass(date)"
|
|
@@ -3172,7 +3193,7 @@ var DatePicker = class DatePicker extends BaseInput {
|
|
|
3172
3193
|
[attr.data-date]="formatDateKey(formatDateMetaToDate(date))"
|
|
3173
3194
|
(keydown)="onDateCellKeydown($event, date, i)"
|
|
3174
3195
|
pRipple
|
|
3175
|
-
[pBind]="ptm('day')"
|
|
3196
|
+
[pBind]="ptm('day', getDayPTOptions(date))"
|
|
3176
3197
|
>
|
|
3177
3198
|
@if (!dateTemplate() && (date.selectable || !disabledDateTemplate())) {
|
|
3178
3199
|
{{ date.day }}
|
|
@@ -3886,7 +3907,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3886
3907
|
</td>
|
|
3887
3908
|
}
|
|
3888
3909
|
@for (date of week; track date.day) {
|
|
3889
|
-
<td
|
|
3910
|
+
<td
|
|
3911
|
+
[attr.aria-label]="getDateCellAriaLabel(date)"
|
|
3912
|
+
[attr.aria-selected]="isSelected(date) ? 'true' : null"
|
|
3913
|
+
[attr.aria-disabled]="!date.selectable ? 'true' : null"
|
|
3914
|
+
[class]="cx('dayCell', { date })"
|
|
3915
|
+
[pBind]="ptm('dayCell', getDayPTOptions(date))"
|
|
3916
|
+
>
|
|
3890
3917
|
@if (date.otherMonth ? showOtherMonths() : true) {
|
|
3891
3918
|
<span
|
|
3892
3919
|
[class]="dayClass(date)"
|
|
@@ -3897,7 +3924,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3897
3924
|
[attr.data-date]="formatDateKey(formatDateMetaToDate(date))"
|
|
3898
3925
|
(keydown)="onDateCellKeydown($event, date, i)"
|
|
3899
3926
|
pRipple
|
|
3900
|
-
[pBind]="ptm('day')"
|
|
3927
|
+
[pBind]="ptm('day', getDayPTOptions(date))"
|
|
3901
3928
|
>
|
|
3902
3929
|
@if (!dateTemplate() && (date.selectable || !disabledDateTemplate())) {
|
|
3903
3930
|
{{ date.day }}
|
|
@@ -290,9 +290,7 @@ var Drawer = class Drawer extends BaseComponent {
|
|
|
290
290
|
event.preventDefault();
|
|
291
291
|
}
|
|
292
292
|
enableModality() {
|
|
293
|
-
const
|
|
294
|
-
const activeDrawersLength = activeDrawers.length;
|
|
295
|
-
const zIndex = activeDrawersLength == 1 ? String(parseInt(this.container.style.zIndex) - 1) : String(parseInt(activeDrawers[activeDrawersLength - 1].style.zIndex) - 1);
|
|
293
|
+
const zIndex = String(parseInt(this.container.style.zIndex) - 1);
|
|
296
294
|
if (!this.mask) {
|
|
297
295
|
this.mask = this.renderer.createElement("div");
|
|
298
296
|
if (this.mask) {
|
|
@@ -143,11 +143,9 @@ var Fieldset = class Fieldset extends BaseComponent {
|
|
|
143
143
|
}
|
|
144
144
|
expand() {
|
|
145
145
|
this.collapsed.set(false);
|
|
146
|
-
this.updateTabIndex();
|
|
147
146
|
}
|
|
148
147
|
collapse() {
|
|
149
148
|
this.collapsed.set(true);
|
|
150
|
-
this.updateTabIndex();
|
|
151
149
|
}
|
|
152
150
|
getBlockableElement() {
|
|
153
151
|
return this.el.nativeElement.children[0];
|
|
@@ -154,11 +154,9 @@ var Panel = class Panel extends BaseComponent {
|
|
|
154
154
|
}
|
|
155
155
|
expand() {
|
|
156
156
|
this.collapsed.set(false);
|
|
157
|
-
this.updateTabIndex();
|
|
158
157
|
}
|
|
159
158
|
collapse() {
|
|
160
159
|
this.collapsed.set(true);
|
|
161
|
-
this.updateTabIndex();
|
|
162
160
|
}
|
|
163
161
|
getBlockableElement() {
|
|
164
162
|
return this.el.nativeElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { ChangeDetectionStrategy, Component, Injectable, InjectionToken, NgModule, ViewEncapsulation, computed, contentChild, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { Spinner } from "@primeicons/angular/spinner";
|
|
4
5
|
import { findSingle, getHeight, getWidth, isTouchDevice, isVisible } from "@primeuix/utils";
|
|
5
6
|
import { BaseComponent, PARENT_INSTANCE } from "primeng/basecomponent";
|
|
6
7
|
import * as i1 from "primeng/bind";
|
|
7
8
|
import { Bind } from "primeng/bind";
|
|
8
|
-
import { Spinner } from "@primeicons/angular/spinner";
|
|
9
9
|
import { BaseStyle } from "primeng/base";
|
|
10
10
|
export * from "primeng/types/scroller";
|
|
11
11
|
const css = `
|
|
@@ -289,6 +289,10 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
289
289
|
if (opts?.contentStyle !== void 0) this.contentStyle = opts.contentStyle;
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
|
+
effect((onCleanup) => {
|
|
293
|
+
const element = this.elementViewChild()?.nativeElement;
|
|
294
|
+
if (element && isPlatformBrowser(this.platformId)) onCleanup(this.renderer.listen(element, "scroll", (event) => this.onElementScroll(event)));
|
|
295
|
+
});
|
|
292
296
|
}
|
|
293
297
|
_loaderIconContext = computed(() => ({ options: { styleClass: this.pcn("p-virtualscroller-loading-icon") } }), ...ngDevMode ? [{ debugName: "_loaderIconContext" }] : /* istanbul ignore next */ []);
|
|
294
298
|
get loaderIconContext() {
|
|
@@ -517,6 +521,7 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
517
521
|
calculateAutoSize() {
|
|
518
522
|
if (this._autoSize() && !this.d_loading) Promise.resolve().then(() => {
|
|
519
523
|
if (this.contentEl) {
|
|
524
|
+
const { scrollTop, scrollLeft } = this.elementViewChild().nativeElement;
|
|
520
525
|
this.contentEl.style.minHeight = this.contentEl.style.minWidth = "auto";
|
|
521
526
|
this.contentEl.style.position = "relative";
|
|
522
527
|
this.elementViewChild().nativeElement.style.contain = "none";
|
|
@@ -529,6 +534,10 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
529
534
|
this.contentEl.style.minHeight = this.contentEl.style.minWidth = "";
|
|
530
535
|
this.contentEl.style.position = "";
|
|
531
536
|
this.elementViewChild().nativeElement.style.contain = "";
|
|
537
|
+
if (this.elementViewChild().nativeElement.scrollTop !== scrollTop || this.elementViewChild().nativeElement.scrollLeft !== scrollLeft) this.scrollTo({
|
|
538
|
+
top: scrollTop,
|
|
539
|
+
left: scrollLeft
|
|
540
|
+
});
|
|
532
541
|
}
|
|
533
542
|
});
|
|
534
543
|
}
|
|
@@ -700,6 +709,7 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
700
709
|
this.lazyLoadState = lazyLoadState;
|
|
701
710
|
}
|
|
702
711
|
}
|
|
712
|
+
return isRangeChanged;
|
|
703
713
|
}
|
|
704
714
|
onContainerScroll(event) {
|
|
705
715
|
this.handleEvents("onScroll", { originalEvent: event });
|
|
@@ -720,7 +730,12 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
720
730
|
}
|
|
721
731
|
this.cd.detectChanges();
|
|
722
732
|
}, this._delay());
|
|
723
|
-
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
return !this.d_loading && this.onScrollChange(event);
|
|
736
|
+
}
|
|
737
|
+
onElementScroll(event) {
|
|
738
|
+
if (this.onContainerScroll(event) || this.options()?.onScroll) this.cd.markForCheck();
|
|
724
739
|
}
|
|
725
740
|
bindResizeListener() {
|
|
726
741
|
if (isPlatformBrowser(this.platformId)) {
|
|
@@ -1088,7 +1103,7 @@ var Scroller = class Scroller extends BaseComponent {
|
|
|
1088
1103
|
ngImport: i0,
|
|
1089
1104
|
template: `
|
|
1090
1105
|
@if (!_disabled()) {
|
|
1091
|
-
<div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [style]="_style()" [class]="cn(cx('root'), _styleClass())"
|
|
1106
|
+
<div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [style]="_style()" [class]="cn(cx('root'), _styleClass())" [pBind]="ptm('root')">
|
|
1092
1107
|
@if (contentTemplate()) {
|
|
1093
1108
|
<ng-container *ngTemplateOutlet="contentTemplate(); context: getContentTemplateContext()"></ng-container>
|
|
1094
1109
|
} @else {
|
|
@@ -1169,7 +1184,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1169
1184
|
standalone: true,
|
|
1170
1185
|
template: `
|
|
1171
1186
|
@if (!_disabled()) {
|
|
1172
|
-
<div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [style]="_style()" [class]="cn(cx('root'), _styleClass())"
|
|
1187
|
+
<div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [style]="_style()" [class]="cn(cx('root'), _styleClass())" [pBind]="ptm('root')">
|
|
1173
1188
|
@if (contentTemplate()) {
|
|
1174
1189
|
<ng-container *ngTemplateOutlet="contentTemplate(); context: getContentTemplateContext()"></ng-container>
|
|
1175
1190
|
} @else {
|
|
@@ -884,7 +884,7 @@ var Select = class Select extends BaseInput {
|
|
|
884
884
|
const inputId = this.inputId();
|
|
885
885
|
if (!inputId || this.editable()) return;
|
|
886
886
|
const label = (getShadowRoot(this.el.nativeElement) ?? this.document).querySelector(`label[for="${inputId}"]`);
|
|
887
|
-
if (label) onCleanup(this.renderer.listen(label, "click", () => focus(this.focusInputViewChild()?.nativeElement)));
|
|
887
|
+
if (label) onCleanup(this.renderer.listen(label, "click", () => !this.$disabled() && focus(this.focusInputViewChild()?.nativeElement)));
|
|
888
888
|
});
|
|
889
889
|
effect(() => {
|
|
890
890
|
const options = this.visibleOptions();
|
|
@@ -1002,9 +1002,6 @@ var Select = class Select extends BaseInput {
|
|
|
1002
1002
|
this.writeModelValue(value);
|
|
1003
1003
|
this.selectedOptionUpdated = true;
|
|
1004
1004
|
}
|
|
1005
|
-
allowModelChange() {
|
|
1006
|
-
return !!this.modelValue() && !this.placeholder() && (this.modelValue() === void 0 || this.modelValue() === null) && !this.editable() && this._options() && this._options().length;
|
|
1007
|
-
}
|
|
1008
1005
|
isSelected(option) {
|
|
1009
1006
|
if (this.multiple()) {
|
|
1010
1007
|
const currentValue = this.modelValue();
|
|
@@ -1120,9 +1117,12 @@ var Select = class Select extends BaseInput {
|
|
|
1120
1117
|
if (this._options() && this._options().length) {
|
|
1121
1118
|
if (this.virtualScroll()) {
|
|
1122
1119
|
const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
|
|
1123
|
-
if (selectedIndex !== -1)
|
|
1124
|
-
this.
|
|
1125
|
-
|
|
1120
|
+
if (selectedIndex !== -1) {
|
|
1121
|
+
if (this.scrollToSelectedTimeout) clearTimeout(this.scrollToSelectedTimeout);
|
|
1122
|
+
this.scrollToSelectedTimeout = setTimeout(() => {
|
|
1123
|
+
this.scroller()?.scrollToIndex(selectedIndex);
|
|
1124
|
+
}, 10);
|
|
1125
|
+
}
|
|
1126
1126
|
} else {
|
|
1127
1127
|
let selectedListItem = findSingle(this.itemsWrapper, "[data-p-selected=\"true\"]");
|
|
1128
1128
|
if (selectedListItem) selectedListItem.scrollIntoView({
|
|
@@ -1222,6 +1222,9 @@ var Select = class Select extends BaseInput {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
this.clicked.set(false);
|
|
1224
1224
|
}
|
|
1225
|
+
onFilterTemplateKeyDown(event) {
|
|
1226
|
+
if (this.filterTemplate() && event.target instanceof HTMLInputElement) this.onFilterKeyDown(event);
|
|
1227
|
+
}
|
|
1225
1228
|
onFilterKeyDown(event) {
|
|
1226
1229
|
if (event.isComposing || event.keyCode === 229) return;
|
|
1227
1230
|
switch (event.code) {
|
|
@@ -1276,6 +1279,7 @@ var Select = class Select extends BaseInput {
|
|
|
1276
1279
|
}
|
|
1277
1280
|
}
|
|
1278
1281
|
scrollInView(index = -1) {
|
|
1282
|
+
if (this.scrollInViewTimeout) clearTimeout(this.scrollInViewTimeout);
|
|
1279
1283
|
this.scrollInViewTimeout = setTimeout(() => {
|
|
1280
1284
|
const id = index !== -1 ? `${this.$id()}_${index}` : this.focusedOptionId();
|
|
1281
1285
|
const element = this.itemsViewChild()?.nativeElement ? findSingle(this.itemsViewChild().nativeElement, `li[id="${id}"]`) : null;
|
|
@@ -1432,7 +1436,6 @@ var Select = class Select extends BaseInput {
|
|
|
1432
1436
|
this.onOptionSelect(event, option);
|
|
1433
1437
|
}
|
|
1434
1438
|
if (this.overlayVisible()) this.hide(this.filter());
|
|
1435
|
-
if (consumedByOverlay) event.stopPropagation();
|
|
1436
1439
|
}
|
|
1437
1440
|
}
|
|
1438
1441
|
}
|
|
@@ -1529,7 +1532,6 @@ var Select = class Select extends BaseInput {
|
|
|
1529
1532
|
writeControlValue(value, setModelValue) {
|
|
1530
1533
|
if (this.filter()) this.resetFilter();
|
|
1531
1534
|
this.value = value;
|
|
1532
|
-
if (this.allowModelChange()) this.onModelChange(value);
|
|
1533
1535
|
setModelValue(this.value);
|
|
1534
1536
|
this.updateEditableLabel();
|
|
1535
1537
|
}
|
|
@@ -2263,7 +2265,7 @@ var Select = class Select extends BaseInput {
|
|
|
2263
2265
|
</span>
|
|
2264
2266
|
<ng-container *ngTemplateOutlet="headerTemplate(); context: { class: cx('header') }"></ng-container>
|
|
2265
2267
|
@if (filter()) {
|
|
2266
|
-
<div [class]="cx('header')" (click)="$event.stopPropagation()" [pBind]="ptm('header')">
|
|
2268
|
+
<div [class]="cx('header')" (click)="$event.stopPropagation()" (keydown)="onFilterTemplateKeyDown($event)" [pBind]="ptm('header')">
|
|
2267
2269
|
@if (filterTemplate()) {
|
|
2268
2270
|
<ng-container *ngTemplateOutlet="filterTemplate(); context: filterTemplateContext()"></ng-container>
|
|
2269
2271
|
} @else {
|
|
@@ -2781,7 +2783,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2781
2783
|
</span>
|
|
2782
2784
|
<ng-container *ngTemplateOutlet="headerTemplate(); context: { class: cx('header') }"></ng-container>
|
|
2783
2785
|
@if (filter()) {
|
|
2784
|
-
<div [class]="cx('header')" (click)="$event.stopPropagation()" [pBind]="ptm('header')">
|
|
2786
|
+
<div [class]="cx('header')" (click)="$event.stopPropagation()" (keydown)="onFilterTemplateKeyDown($event)" [pBind]="ptm('header')">
|
|
2785
2787
|
@if (filterTemplate()) {
|
|
2786
2788
|
<ng-container *ngTemplateOutlet="filterTemplate(); context: filterTemplateContext()"></ng-container>
|
|
2787
2789
|
} @else {
|
|
@@ -1605,7 +1605,7 @@ var Table = class Table extends BaseComponent {
|
|
|
1605
1605
|
this.first.set(0);
|
|
1606
1606
|
if (this.scrollable()) this.resetScrollTop();
|
|
1607
1607
|
}
|
|
1608
|
-
this.sortSingle();
|
|
1608
|
+
this.sortSingle(this.resetPageOnSort());
|
|
1609
1609
|
}
|
|
1610
1610
|
if (this.sortMode() === "multiple") {
|
|
1611
1611
|
let metaKey = originalEvent.metaKey || originalEvent.ctrlKey;
|
|
@@ -1631,12 +1631,12 @@ var Table = class Table extends BaseComponent {
|
|
|
1631
1631
|
order: this.defaultSortOrder()
|
|
1632
1632
|
});
|
|
1633
1633
|
}
|
|
1634
|
-
this.sortMultiple();
|
|
1634
|
+
this.sortMultiple(this.resetPageOnSort());
|
|
1635
1635
|
}
|
|
1636
1636
|
if (this.isStateful()) this.saveState();
|
|
1637
1637
|
this.anchorRowIndex = null;
|
|
1638
1638
|
}
|
|
1639
|
-
sortSingle() {
|
|
1639
|
+
sortSingle(resetPage = true) {
|
|
1640
1640
|
let field = this.sortField || this.groupRowsBy();
|
|
1641
1641
|
let order = this.sortField ? this.sortOrder : this.groupRowsByOrder();
|
|
1642
1642
|
if (this.groupRowsBy() && this.sortField && this.groupRowsBy() !== this.sortField) {
|
|
@@ -1644,7 +1644,7 @@ var Table = class Table extends BaseComponent {
|
|
|
1644
1644
|
field: this.sortField,
|
|
1645
1645
|
order: this.sortOrder
|
|
1646
1646
|
}];
|
|
1647
|
-
this.sortMultiple();
|
|
1647
|
+
this.sortMultiple(resetPage);
|
|
1648
1648
|
return;
|
|
1649
1649
|
}
|
|
1650
1650
|
if (field && order) {
|
|
@@ -1671,7 +1671,7 @@ var Table = class Table extends BaseComponent {
|
|
|
1671
1671
|
});
|
|
1672
1672
|
this.value = [...this.value];
|
|
1673
1673
|
}
|
|
1674
|
-
if (this.hasFilter()) this._filter();
|
|
1674
|
+
if (this.hasFilter()) this._filter(resetPage);
|
|
1675
1675
|
}
|
|
1676
1676
|
let sortMeta = {
|
|
1677
1677
|
field,
|
|
@@ -1681,7 +1681,7 @@ var Table = class Table extends BaseComponent {
|
|
|
1681
1681
|
this.tableService.onSort(sortMeta);
|
|
1682
1682
|
}
|
|
1683
1683
|
}
|
|
1684
|
-
sortMultiple() {
|
|
1684
|
+
sortMultiple(resetPage = true) {
|
|
1685
1685
|
if (this.groupRowsBy()) {
|
|
1686
1686
|
if (!this.multiSortMeta) this.multiSortMeta = [this.getGroupRowsMeta()];
|
|
1687
1687
|
else if (this.multiSortMeta[0].field !== this.groupRowsBy()) this.multiSortMeta = [this.getGroupRowsMeta(), ...this.multiSortMeta];
|
|
@@ -1698,7 +1698,7 @@ var Table = class Table extends BaseComponent {
|
|
|
1698
1698
|
this.value.sort((data1, data2) => this.multisortField(data1, data2, this.multiSortMeta, 0));
|
|
1699
1699
|
this.value = [...this.value];
|
|
1700
1700
|
}
|
|
1701
|
-
if (this.hasFilter()) this._filter();
|
|
1701
|
+
if (this.hasFilter()) this._filter(resetPage);
|
|
1702
1702
|
}
|
|
1703
1703
|
this.onSort.emit({ multisortmeta: this.multiSortMeta });
|
|
1704
1704
|
this.tableService.onSort(this.multiSortMeta);
|
|
@@ -2091,8 +2091,8 @@ var Table = class Table extends BaseComponent {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
return true;
|
|
2093
2093
|
}
|
|
2094
|
-
_filter() {
|
|
2095
|
-
if (!this.restoringFilter) this.first.set(0);
|
|
2094
|
+
_filter(resetPage = true) {
|
|
2095
|
+
if (!this.restoringFilter && resetPage) this.first.set(0);
|
|
2096
2096
|
if (this.lazy()) this.onLazyLoad.emit(this.createLazyLoadMetadata());
|
|
2097
2097
|
else {
|
|
2098
2098
|
if (!this.value) return;
|
|
@@ -2143,7 +2143,7 @@ var Table = class Table extends BaseComponent {
|
|
|
2143
2143
|
if (this.isStateful() && !this.restoringFilter) this.saveState();
|
|
2144
2144
|
if (this.restoringFilter) this.restoringFilter = false;
|
|
2145
2145
|
this.cd.markForCheck();
|
|
2146
|
-
if (this.scrollable()) this.resetScrollTop();
|
|
2146
|
+
if (this.scrollable() && resetPage) this.resetScrollTop();
|
|
2147
2147
|
}
|
|
2148
2148
|
executeLocalFilter(field, rowData, filterMeta) {
|
|
2149
2149
|
let filterValue = filterMeta.value;
|
|
@@ -254,6 +254,10 @@ var TreeSelect = class TreeSelect extends BaseEditableHolder {
|
|
|
254
254
|
...ngDevMode ? { debugName: "itemLoadingIconTemplate" } : /* istanbul ignore next */ {},
|
|
255
255
|
descendants: false
|
|
256
256
|
});
|
|
257
|
+
nodeTemplate = contentChild("node", {
|
|
258
|
+
...ngDevMode ? { debugName: "nodeTemplate" } : /* istanbul ignore next */ {},
|
|
259
|
+
descendants: false
|
|
260
|
+
});
|
|
257
261
|
focused = signal(false, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
258
262
|
overlayVisible = signal(false, ...ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []);
|
|
259
263
|
_value = signal(void 0, ...ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []);
|
|
@@ -916,6 +920,12 @@ var TreeSelect = class TreeSelect extends BaseEditableHolder {
|
|
|
916
920
|
first: true,
|
|
917
921
|
predicate: ["itemloadingicon"],
|
|
918
922
|
isSignal: true
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
propertyName: "nodeTemplate",
|
|
926
|
+
first: true,
|
|
927
|
+
predicate: ["node"],
|
|
928
|
+
isSignal: true
|
|
919
929
|
}
|
|
920
930
|
],
|
|
921
931
|
viewQueries: [
|
|
@@ -1099,6 +1109,11 @@ var TreeSelect = class TreeSelect extends BaseEditableHolder {
|
|
|
1099
1109
|
<ng-container *ngTemplateOutlet="emptyTemplate()"></ng-container>
|
|
1100
1110
|
</ng-template>
|
|
1101
1111
|
}
|
|
1112
|
+
@if (nodeTemplate()) {
|
|
1113
|
+
<ng-template #node let-node>
|
|
1114
|
+
<ng-container *ngTemplateOutlet="nodeTemplate(); context: { $implicit: node }"></ng-container>
|
|
1115
|
+
</ng-template>
|
|
1116
|
+
}
|
|
1102
1117
|
@if (itemTogglerIconTemplate()) {
|
|
1103
1118
|
<ng-template #togglericon let-expanded>
|
|
1104
1119
|
<ng-container *ngTemplateOutlet="itemTogglerIconTemplate(); context: { $implicit: expanded }"></ng-container>
|
|
@@ -1447,6 +1462,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1447
1462
|
<ng-container *ngTemplateOutlet="emptyTemplate()"></ng-container>
|
|
1448
1463
|
</ng-template>
|
|
1449
1464
|
}
|
|
1465
|
+
@if (nodeTemplate()) {
|
|
1466
|
+
<ng-template #node let-node>
|
|
1467
|
+
<ng-container *ngTemplateOutlet="nodeTemplate(); context: { $implicit: node }"></ng-container>
|
|
1468
|
+
</ng-template>
|
|
1469
|
+
}
|
|
1450
1470
|
@if (itemTogglerIconTemplate()) {
|
|
1451
1471
|
<ng-template #togglericon let-expanded>
|
|
1452
1472
|
<ng-container *ngTemplateOutlet="itemTogglerIconTemplate(); context: { $implicit: expanded }"></ng-container>
|
|
@@ -1964,6 +1984,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1964
1984
|
descendants: false,
|
|
1965
1985
|
isSignal: true
|
|
1966
1986
|
}]
|
|
1987
|
+
}],
|
|
1988
|
+
nodeTemplate: [{
|
|
1989
|
+
type: i0.ContentChild,
|
|
1990
|
+
args: ["node", {
|
|
1991
|
+
descendants: false,
|
|
1992
|
+
isSignal: true
|
|
1993
|
+
}]
|
|
1967
1994
|
}]
|
|
1968
1995
|
}
|
|
1969
1996
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primeng",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.4",
|
|
4
4
|
"author": "PrimeTek Informatics",
|
|
5
5
|
"description": "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, which has 370+ ready to use UI blocks to build spectacular applications in no time.",
|
|
6
6
|
"homepage": "https://primeng.dev",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@primeicons/angular": "^8.0.0",
|
|
40
40
|
"@primeui/license-manager": "^1.0.0",
|
|
41
|
-
"@primeuix/styled": "^1.
|
|
41
|
+
"@primeuix/styled": "^1.2.0",
|
|
42
42
|
"@primeuix/utils": "^0.8.3",
|
|
43
|
-
"@primeuix/styles": "^3.0
|
|
43
|
+
"@primeuix/styles": "^3.1.0",
|
|
44
44
|
"@primeuix/motion": "^1.0.0",
|
|
45
45
|
"tslib": "^2.3.0"
|
|
46
46
|
},
|
package/types/primeng-base.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class BaseStyle {
|
|
|
21
21
|
loadStyle: (options?: any, style?: string) => {} | undefined;
|
|
22
22
|
loadBaseCSS: (options?: {}) => {} | undefined;
|
|
23
23
|
loadBaseStyle: (options?: any, style?: string) => {} | undefined;
|
|
24
|
+
loadPreflight: (options?: {}) => {} | undefined;
|
|
24
25
|
getCommonTheme: (params?: any) => {
|
|
25
26
|
primitive: {
|
|
26
27
|
css: string | undefined;
|
|
@@ -66,6 +66,7 @@ export declare class BaseComponent<PT = any> implements Lifecycle {
|
|
|
66
66
|
directivePT: import("@angular/core").WritableSignal<any>;
|
|
67
67
|
directiveUnstyled: import("@angular/core").WritableSignal<boolean | undefined>;
|
|
68
68
|
$unstyled: import("@angular/core").Signal<boolean>;
|
|
69
|
+
$preflight: import("@angular/core").Signal<boolean>;
|
|
69
70
|
$pt: import("@angular/core").Signal<any>;
|
|
70
71
|
get $globalPT(): any;
|
|
71
72
|
get $defaultPT(): any;
|
|
@@ -150,6 +151,7 @@ export declare class BaseComponent<PT = any> implements Lifecycle {
|
|
|
150
151
|
private _loadGlobalStyles;
|
|
151
152
|
private _loadCoreStyles;
|
|
152
153
|
private _loadThemeStyles;
|
|
154
|
+
private _loadThemeSheets;
|
|
153
155
|
private _loadScopedThemeStyles;
|
|
154
156
|
private _unloadScopedThemeStyles;
|
|
155
157
|
private _themeChangeListener;
|
|
@@ -13,8 +13,8 @@ import { CarouselContentPassThrough, CarouselIndicatorPassThrough, CarouselIndic
|
|
|
13
13
|
import { CascadeSelectPassThrough } from "primeng/types/cascadeselect";
|
|
14
14
|
import { CheckboxPassThrough } from "primeng/types/checkbox";
|
|
15
15
|
import { ChipPassThrough } from "primeng/types/chip";
|
|
16
|
-
import { CommandMenuPassThrough } from "primeng/types/commandmenu";
|
|
17
16
|
import { ColorPickerPassThrough } from "primeng/types/colorpicker";
|
|
17
|
+
import { CommandMenuPassThrough } from "primeng/types/commandmenu";
|
|
18
18
|
import { ConfirmDialogPassThrough } from "primeng/types/confirmdialog";
|
|
19
19
|
import { ConfirmPopupPassThrough } from "primeng/types/confirmpopup";
|
|
20
20
|
import { DialogPassThrough } from "primeng/types/dialog";
|
|
@@ -33,9 +33,9 @@ import { IftaLabelPassThrough } from "primeng/types/iftalabel";
|
|
|
33
33
|
import { ImagePassThrough } from "primeng/types/image";
|
|
34
34
|
import { ImageComparePassThrough } from "primeng/types/imagecompare";
|
|
35
35
|
import { InplacePassThrough } from "primeng/types/inplace";
|
|
36
|
+
import { InputColorAreaBackgroundPassThrough, InputColorAreaHandlePassThrough, InputColorAreaPassThrough, InputColorEyeDropperPassThrough, InputColorPassThrough, InputColorSliderHandlePassThrough, InputColorSliderPassThrough, InputColorSliderTrackPassThrough, InputColorSwatchBackgroundPassThrough, InputColorSwatchPassThrough, InputColorTransparencyGridPassThrough } from "primeng/types/inputcolor";
|
|
36
37
|
import { InputGroupPassThrough } from "primeng/types/inputgroup";
|
|
37
38
|
import { InputGroupAddonPassThrough } from "primeng/types/inputgroupaddon";
|
|
38
|
-
import { InputColorAreaBackgroundPassThrough, InputColorAreaHandlePassThrough, InputColorAreaPassThrough, InputColorEyeDropperPassThrough, InputColorPassThrough, InputColorSliderHandlePassThrough, InputColorSliderPassThrough, InputColorSliderTrackPassThrough, InputColorSwatchBackgroundPassThrough, InputColorSwatchPassThrough, InputColorTransparencyGridPassThrough } from "primeng/types/inputcolor";
|
|
39
39
|
import { InputIconPassThrough } from "primeng/types/inputicon";
|
|
40
40
|
import { InputMaskPassThrough } from "primeng/types/inputmask";
|
|
41
41
|
import { InputNumberPassThrough } from "primeng/types/inputnumber";
|
|
@@ -248,6 +248,10 @@ export type PrimeNGConfigType = {
|
|
|
248
248
|
overlayOptions?: OverlayOptions;
|
|
249
249
|
translation?: Translation;
|
|
250
250
|
unstyled?: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* @experimental
|
|
253
|
+
*/
|
|
254
|
+
preflight?: boolean;
|
|
251
255
|
zIndex?: ZIndex | null | undefined;
|
|
252
256
|
pt?: GlobalPassThrough | null | undefined;
|
|
253
257
|
ptOptions?: PassThroughOptions | null | undefined;
|
|
@@ -284,6 +288,7 @@ export declare class PrimeNG extends ThemeProvider {
|
|
|
284
288
|
nonce: string | undefined;
|
|
285
289
|
}>;
|
|
286
290
|
unstyled: import("@angular/core").WritableSignal<boolean | undefined>;
|
|
291
|
+
preflight: import("@angular/core").WritableSignal<boolean>;
|
|
287
292
|
pt: import("@angular/core").WritableSignal<import("primeng/config").GlobalPassThrough | null | undefined>;
|
|
288
293
|
ptOptions: import("@angular/core").WritableSignal<import("primeng/api").PassThroughOptions | null | undefined>;
|
|
289
294
|
filterMatchModeOptions: {
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import { ElementRef, TemplateRef } from "@angular/core";
|
|
4
4
|
import { MotionEvent, MotionOptions } from "@primeuix/motion";
|
|
5
5
|
import * as i2 from "primeng/api";
|
|
6
|
-
import { Confirmation, OverlayService } from "primeng/api";
|
|
6
|
+
import { ConfirmEventType, Confirmation, OverlayService } from "primeng/api";
|
|
7
7
|
import { BaseComponent } from "primeng/basecomponent";
|
|
8
8
|
import * as i1 from "primeng/bind";
|
|
9
9
|
import { Bind } from "primeng/bind";
|
|
@@ -178,7 +178,7 @@ export declare class ConfirmPopup extends BaseComponent<ConfirmPopupPassThrough>
|
|
|
178
178
|
restoreAppend(): void;
|
|
179
179
|
hide(): void;
|
|
180
180
|
onAccept(): void;
|
|
181
|
-
onReject(): void;
|
|
181
|
+
onReject(type?: ConfirmEventType): void;
|
|
182
182
|
onOverlayClick(event: MouseEvent): void;
|
|
183
183
|
bindListeners(): void;
|
|
184
184
|
unbindListeners(): void;
|
|
@@ -788,6 +788,15 @@ export declare class DatePicker extends BaseInput<DatePickerPassThrough, Date |
|
|
|
788
788
|
constructor();
|
|
789
789
|
inputFieldValue: import("@angular/core").WritableSignal<string | null>;
|
|
790
790
|
getDateTemplateContext(date: DatePickerDateMeta): DatePickerDateTemplateContext;
|
|
791
|
+
getDayPTOptions(date: DatePickerDateMeta): {
|
|
792
|
+
context: {
|
|
793
|
+
date: DatePickerDateMeta;
|
|
794
|
+
today: boolean;
|
|
795
|
+
otherMonth: boolean;
|
|
796
|
+
selected: boolean;
|
|
797
|
+
disabled: boolean;
|
|
798
|
+
};
|
|
799
|
+
};
|
|
791
800
|
dayClass(date: any): string;
|
|
792
801
|
getPrevButtonStyle(index: number): {
|
|
793
802
|
visibility: string;
|
|
@@ -6,8 +6,8 @@ import { BaseComponent } from "primeng/basecomponent";
|
|
|
6
6
|
import * as i1 from "primeng/bind";
|
|
7
7
|
import { Bind } from "primeng/bind";
|
|
8
8
|
import { VoidListener } from "primeng/ts-helpers";
|
|
9
|
-
import { BaseStyle } from "primeng/base";
|
|
10
9
|
import { CSSProperties } from "primeng/types/shared";
|
|
10
|
+
import { BaseStyle } from "primeng/base";
|
|
11
11
|
export * from "primeng/types/scroller";
|
|
12
12
|
export declare class ScrollerStyle extends BaseStyle {
|
|
13
13
|
name: string;
|
|
@@ -356,8 +356,9 @@ export declare class Scroller extends BaseComponent<VirtualScrollerPassThrough>
|
|
|
356
356
|
isRangeChanged: boolean;
|
|
357
357
|
scrollPos: any;
|
|
358
358
|
};
|
|
359
|
-
onScrollChange(event: Event):
|
|
360
|
-
onContainerScroll(event: Event):
|
|
359
|
+
onScrollChange(event: Event): boolean;
|
|
360
|
+
onContainerScroll(event: Event): boolean;
|
|
361
|
+
onElementScroll(event: Event): void;
|
|
361
362
|
bindResizeListener(): void;
|
|
362
363
|
unbindResizeListener(): void;
|
|
363
364
|
onWindowResize(): void;
|
|
@@ -328,7 +328,7 @@ export declare class Select extends BaseInput<SelectPassThrough, any> implements
|
|
|
328
328
|
*/
|
|
329
329
|
emptySelectionMessage: import("@angular/core").InputSignal<string | undefined>;
|
|
330
330
|
/**
|
|
331
|
-
* Defines if data is loaded and interacted with in lazy manner.
|
|
331
|
+
* Defines if data is loaded and interacted with in lazy manner. Only effective when virtualScroll is enabled.
|
|
332
332
|
* @group Props
|
|
333
333
|
*/
|
|
334
334
|
lazy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -487,7 +487,7 @@ export declare class Select extends BaseInput<SelectPassThrough, any> implements
|
|
|
487
487
|
*/
|
|
488
488
|
onClear: import("@angular/core").OutputEmitterRef<Event>;
|
|
489
489
|
/**
|
|
490
|
-
* Callback to invoke in lazy mode to load new data.
|
|
490
|
+
* Callback to invoke in lazy mode to load new data. Only emitted when virtualScroll is enabled.
|
|
491
491
|
* @param {SelectLazyLoadEvent} event - Lazy load event.
|
|
492
492
|
* @group Emits
|
|
493
493
|
*/
|
|
@@ -671,7 +671,6 @@ export declare class Select extends BaseInput<SelectPassThrough, any> implements
|
|
|
671
671
|
onOptionSelectMultiple(event: any, option: any, preventChange?: boolean): void;
|
|
672
672
|
onOptionMouseEnter(event: any, index: any): void;
|
|
673
673
|
updateModel(value: any, _event?: any): void;
|
|
674
|
-
allowModelChange(): number | false | null;
|
|
675
674
|
isSelected(option: any): boolean;
|
|
676
675
|
private isOptionValueEqualsModelValue;
|
|
677
676
|
onAfterViewInit(): void;
|
|
@@ -711,6 +710,7 @@ export declare class Select extends BaseInput<SelectPassThrough, any> implements
|
|
|
711
710
|
onInputFocus(event: Event): void;
|
|
712
711
|
onInputBlur(event: Event): void;
|
|
713
712
|
onKeyDown(event: KeyboardEvent, search?: boolean): void;
|
|
713
|
+
onFilterTemplateKeyDown(event: KeyboardEvent): void;
|
|
714
714
|
onFilterKeyDown(event: any): void;
|
|
715
715
|
onFilterBlur(event: any): void;
|
|
716
716
|
onArrowDownKey(event: KeyboardEvent): void;
|
package/types/primeng-table.d.ts
CHANGED
|
@@ -1092,8 +1092,8 @@ export declare class Table<RowData = any> extends BaseComponent<TablePassThrough
|
|
|
1092
1092
|
updateSelectionKeys(): void;
|
|
1093
1093
|
onPageChange(event: TablePageEvent | PaginatorState): void;
|
|
1094
1094
|
sort(event: any): void;
|
|
1095
|
-
sortSingle(): void;
|
|
1096
|
-
sortMultiple(): void;
|
|
1095
|
+
sortSingle(resetPage?: boolean): void;
|
|
1096
|
+
sortMultiple(resetPage?: boolean): void;
|
|
1097
1097
|
multisortField(data1: any, data2: any, multiSortMeta: SortMeta[], index: number): any;
|
|
1098
1098
|
compareValuesOnSort(value1: any, value2: any, order: any): number;
|
|
1099
1099
|
getSortMeta(field: string): SortMeta | null;
|
|
@@ -1119,7 +1119,7 @@ export declare class Table<RowData = any> extends BaseComponent<TablePassThrough
|
|
|
1119
1119
|
filter(value: any, field: string, matchMode: string): void;
|
|
1120
1120
|
filterGlobal(value: any, matchMode: string): void;
|
|
1121
1121
|
isFilterBlank(filter: any): boolean;
|
|
1122
|
-
_filter(): void;
|
|
1122
|
+
_filter(resetPage?: boolean): void;
|
|
1123
1123
|
executeLocalFilter(field: string, rowData: any, filterMeta: FilterMetadata): boolean;
|
|
1124
1124
|
hasFilter(): boolean;
|
|
1125
1125
|
createLazyLoadMetadata(): any;
|
|
@@ -11,7 +11,7 @@ import { Overlay } from "primeng/overlay";
|
|
|
11
11
|
import { Tree, TreeFilterEvent, TreeNodeSelectEvent, TreeNodeUnSelectEvent } from "primeng/tree";
|
|
12
12
|
import { Nullable } from "primeng/ts-helpers";
|
|
13
13
|
import { AppendTo, CSSProperties, InputSize, InputVariant } from "primeng/types/shared";
|
|
14
|
-
import { TreeSelectDisplay, TreeSelectHeaderTemplateContext, TreeSelectItemCheckboxIconTemplateContext, TreeSelectItemTogglerIconTemplateContext, TreeSelectLoadingMode, TreeSelectNodeCollapseEvent, TreeSelectNodeExpandEvent, TreeSelectPassThrough, TreeSelectSelectionMode, TreeSelectValueTemplateContext } from "primeng/types/treeselect";
|
|
14
|
+
import { TreeSelectDisplay, TreeSelectHeaderTemplateContext, TreeSelectItemCheckboxIconTemplateContext, TreeSelectItemTogglerIconTemplateContext, TreeSelectLoadingMode, TreeSelectNodeCollapseEvent, TreeSelectNodeExpandEvent, TreeSelectNodeTemplateContext, TreeSelectPassThrough, TreeSelectSelectionMode, TreeSelectValueTemplateContext } from "primeng/types/treeselect";
|
|
15
15
|
import { BaseStyle } from "primeng/base";
|
|
16
16
|
export * from "primeng/types/treeselect";
|
|
17
17
|
export declare class TreeSelectStyle extends BaseStyle {
|
|
@@ -463,6 +463,13 @@ export declare class TreeSelect extends BaseEditableHolder<TreeSelectPassThrough
|
|
|
463
463
|
* @group Templates
|
|
464
464
|
*/
|
|
465
465
|
itemLoadingIconTemplate: import("@angular/core").Signal<TemplateRef<void> | undefined>;
|
|
466
|
+
/**
|
|
467
|
+
* Custom node template.
|
|
468
|
+
* @param {TreeSelectNodeTemplateContext} context - node context.
|
|
469
|
+
* @see {@link TreeSelectNodeTemplateContext}
|
|
470
|
+
* @group Templates
|
|
471
|
+
*/
|
|
472
|
+
nodeTemplate: import("@angular/core").Signal<TemplateRef<TreeSelectNodeTemplateContext> | undefined>;
|
|
466
473
|
focused: import("@angular/core").WritableSignal<boolean>;
|
|
467
474
|
overlayVisible: import("@angular/core").WritableSignal<boolean>;
|
|
468
475
|
_value: import("@angular/core").WritableSignal<any>;
|
|
@@ -752,7 +759,7 @@ export declare class TreeSelect extends BaseEditableHolder<TreeSelectPassThrough
|
|
|
752
759
|
"onBlur": "onBlur";
|
|
753
760
|
"onNodeUnselect": "onNodeUnselect";
|
|
754
761
|
"onNodeSelect": "onNodeSelect";
|
|
755
|
-
}, ["valueTemplate", "headerTemplate", "emptyTemplate", "footerTemplate", "clearIconTemplate", "triggerIconTemplate", "dropdownIconTemplate", "filterIconTemplate", "closeIconTemplate", "itemTogglerIconTemplate", "itemCheckboxIconTemplate", "itemLoadingIconTemplate"], never, true, [{
|
|
762
|
+
}, ["valueTemplate", "headerTemplate", "emptyTemplate", "footerTemplate", "clearIconTemplate", "triggerIconTemplate", "dropdownIconTemplate", "filterIconTemplate", "closeIconTemplate", "itemTogglerIconTemplate", "itemCheckboxIconTemplate", "itemLoadingIconTemplate", "nodeTemplate"], never, true, [{
|
|
756
763
|
directive: typeof i1.Bind;
|
|
757
764
|
inputs: {};
|
|
758
765
|
outputs: {};
|
|
@@ -201,6 +201,16 @@ export interface TreeSelectItemCheckboxIconTemplateContext {
|
|
|
201
201
|
*/
|
|
202
202
|
partialSelected: boolean;
|
|
203
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Custom node template context.
|
|
206
|
+
* @group Interface
|
|
207
|
+
*/
|
|
208
|
+
export interface TreeSelectNodeTemplateContext {
|
|
209
|
+
/**
|
|
210
|
+
* Node instance.
|
|
211
|
+
*/
|
|
212
|
+
$implicit: TreeNode;
|
|
213
|
+
}
|
|
204
214
|
/**
|
|
205
215
|
* Defines valid templates in TreeSelect.
|
|
206
216
|
* @group Templates
|
|
@@ -259,4 +269,9 @@ export interface TreeSelectTemplates {
|
|
|
259
269
|
* Custom item loading icon template.
|
|
260
270
|
*/
|
|
261
271
|
itemloadingicon(): TemplateRef<void>;
|
|
272
|
+
/**
|
|
273
|
+
* Custom node template.
|
|
274
|
+
* @param {TreeSelectNodeTemplateContext} context - node context.
|
|
275
|
+
*/
|
|
276
|
+
node(context: TreeSelectNodeTemplateContext): TemplateRef<TreeSelectNodeTemplateContext>;
|
|
262
277
|
}
|