@praxisui/dynamic-fields 10.0.0-rc.18 → 10.0.0-rc.20
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-15T03:52:00.118Z",
|
|
4
4
|
"packageName": "@praxisui/dynamic-fields",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.20",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 76,
|
|
@@ -42601,10 +42601,25 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
42601
42601
|
return getErrorStateMatcherForField(this.metadata());
|
|
42602
42602
|
}
|
|
42603
42603
|
shouldPropagateRangeGroupChanges() {
|
|
42604
|
-
if (this.
|
|
42605
|
-
return
|
|
42604
|
+
if (this.hasPartialRangeGroupValue()) {
|
|
42605
|
+
return false;
|
|
42606
|
+
}
|
|
42607
|
+
if (this.inlineQuickPresetsApplyMode() === 'confirm') {
|
|
42608
|
+
return !this.overlayOpen;
|
|
42609
|
+
}
|
|
42610
|
+
return true;
|
|
42611
|
+
}
|
|
42612
|
+
propagateRangeValue() {
|
|
42613
|
+
if (this.inlineQuickPresetsApplyMode() === 'confirm' || this.hasPartialRangeGroupValue()) {
|
|
42614
|
+
return;
|
|
42606
42615
|
}
|
|
42607
|
-
|
|
42616
|
+
super.propagateRangeValue();
|
|
42617
|
+
}
|
|
42618
|
+
hasPartialRangeGroupValue() {
|
|
42619
|
+
const { start, end } = this.rangeGroup.getRawValue();
|
|
42620
|
+
const hasStart = !!this.coerceDate(start);
|
|
42621
|
+
const hasEnd = !!this.coerceDate(end);
|
|
42622
|
+
return hasStart !== hasEnd;
|
|
42608
42623
|
}
|
|
42609
42624
|
showInlineQuickPresets() {
|
|
42610
42625
|
if (this.presentationMode) {
|
|
@@ -42915,7 +42930,7 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
42915
42930
|
picker?._model?.updateSelection?.(selection, this);
|
|
42916
42931
|
const content = picker?._componentRef?.instance;
|
|
42917
42932
|
content?._model?.updateSelection?.(selection, this);
|
|
42918
|
-
if (content?._calendar) {
|
|
42933
|
+
if (content?._calendar && startDate) {
|
|
42919
42934
|
content._calendar.activeDate = startDate;
|
|
42920
42935
|
}
|
|
42921
42936
|
content?._changeDetectorRef?.markForCheck?.();
|
|
@@ -43031,7 +43046,8 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43031
43046
|
this.syncAutoApplyCalendarBinding();
|
|
43032
43047
|
}
|
|
43033
43048
|
onOverlayClosed() {
|
|
43034
|
-
const shouldRollback = this.
|
|
43049
|
+
const shouldRollback = !this.overlayCommittedInSession &&
|
|
43050
|
+
(this.inlineQuickPresetsApplyMode() === 'confirm' || this.hasPartialRangeGroupValue());
|
|
43035
43051
|
if (shouldRollback) {
|
|
43036
43052
|
this.restoreBaselineSelection();
|
|
43037
43053
|
}
|
|
@@ -43044,14 +43060,24 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43044
43060
|
this.scheduleInlineResize();
|
|
43045
43061
|
}
|
|
43046
43062
|
onOverlayApplyAction() {
|
|
43047
|
-
if (this.
|
|
43063
|
+
if (this.isInteractionBlocked()) {
|
|
43048
43064
|
return;
|
|
43049
43065
|
}
|
|
43066
|
+
if (!this.draftPresetRange) {
|
|
43067
|
+
this.syncDraftFromPendingCalendarSelection();
|
|
43068
|
+
}
|
|
43050
43069
|
const presetId = this.draftPresetId || undefined;
|
|
43051
43070
|
const resolved = presetId ? this.resolvePresetById(presetId) : null;
|
|
43052
43071
|
const committed = this.draftPresetRange ?? this.currentRangeGroupValue();
|
|
43072
|
+
const start = this.coerceDate(committed.startDate);
|
|
43073
|
+
const end = this.coerceDate(committed.endDate);
|
|
43074
|
+
if (!start || !end) {
|
|
43075
|
+
return;
|
|
43076
|
+
}
|
|
43053
43077
|
const value = {
|
|
43054
43078
|
...committed,
|
|
43079
|
+
startDate: start,
|
|
43080
|
+
endDate: end,
|
|
43055
43081
|
preset: presetId,
|
|
43056
43082
|
label: resolved?.label,
|
|
43057
43083
|
};
|
|
@@ -43064,10 +43090,8 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43064
43090
|
}, 0);
|
|
43065
43091
|
}
|
|
43066
43092
|
onOverlayCancelAction() {
|
|
43067
|
-
if (this.inlineQuickPresetsApplyMode() !== 'confirm') {
|
|
43068
|
-
return;
|
|
43069
|
-
}
|
|
43070
43093
|
this.overlayCommittedInSession = false;
|
|
43094
|
+
this.draftPresetId = null;
|
|
43071
43095
|
this.draftPresetRange = null;
|
|
43072
43096
|
this.restoreBaselineSelection();
|
|
43073
43097
|
}
|
|
@@ -43154,14 +43178,22 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43154
43178
|
}
|
|
43155
43179
|
restoreBaselineSelection() {
|
|
43156
43180
|
const baseline = this.overlayBaseline;
|
|
43181
|
+
const start = this.coerceDate(baseline?.startDate);
|
|
43182
|
+
const end = this.coerceDate(baseline?.endDate);
|
|
43157
43183
|
this.rangeGroup.setValue({
|
|
43158
|
-
start
|
|
43159
|
-
end
|
|
43184
|
+
start,
|
|
43185
|
+
end,
|
|
43160
43186
|
}, { emitEvent: false });
|
|
43187
|
+
this.syncPickerSelectionModel(start, end);
|
|
43161
43188
|
}
|
|
43162
43189
|
displayRangeValue() {
|
|
43163
|
-
if (this.
|
|
43164
|
-
|
|
43190
|
+
if (this.overlayOpen) {
|
|
43191
|
+
const draft = this.currentRangeGroupValue();
|
|
43192
|
+
if (this.inlineQuickPresetsApplyMode() === 'confirm' ||
|
|
43193
|
+
draft.startDate !== null ||
|
|
43194
|
+
draft.endDate !== null) {
|
|
43195
|
+
return draft;
|
|
43196
|
+
}
|
|
43165
43197
|
}
|
|
43166
43198
|
return this.normalizeDateRangeValue(this.control().value);
|
|
43167
43199
|
}
|
|
@@ -43459,7 +43491,7 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43459
43491
|
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
43460
43492
|
const candidate = nodes[i];
|
|
43461
43493
|
const content = candidate.closest('.mat-datepicker-content-container');
|
|
43462
|
-
const hasInlineActions = candidate.querySelector('.pdx-inline-date-range-overlay-buttons') !== null
|
|
43494
|
+
const hasInlineActions = candidate.querySelector('.pdx-inline-date-range-overlay-buttons') !== null ||
|
|
43463
43495
|
!!content?.querySelector('.pdx-inline-date-range-overlay-presets');
|
|
43464
43496
|
if (hasInlineActions) {
|
|
43465
43497
|
return candidate;
|
|
@@ -43534,7 +43566,7 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43534
43566
|
}
|
|
43535
43567
|
syncAutoApplyCalendarBinding() {
|
|
43536
43568
|
this.unbindAutoApplyCalendarBinding();
|
|
43537
|
-
if (
|
|
43569
|
+
if (typeof document === 'undefined') {
|
|
43538
43570
|
return;
|
|
43539
43571
|
}
|
|
43540
43572
|
const clickHandler = (event) => this.onAutoApplyCalendarInteraction(event);
|
|
@@ -43549,8 +43581,34 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43549
43581
|
this.autoApplyCalendarClickTeardown = null;
|
|
43550
43582
|
}
|
|
43551
43583
|
}
|
|
43584
|
+
syncDraftFromPendingCalendarSelection() {
|
|
43585
|
+
const picker = this.pickerRef;
|
|
43586
|
+
const pendingModel = picker?._componentRef?.instance?._model;
|
|
43587
|
+
if (!pendingModel || !('selection' in pendingModel)) {
|
|
43588
|
+
return null;
|
|
43589
|
+
}
|
|
43590
|
+
const selection = pendingModel.selection;
|
|
43591
|
+
const start = this.coerceDate(selection?.start);
|
|
43592
|
+
const end = this.coerceDate(selection?.end);
|
|
43593
|
+
const current = this.rangeGroup.getRawValue();
|
|
43594
|
+
const currentStart = this.coerceDate(current.start);
|
|
43595
|
+
const currentEnd = this.coerceDate(current.end);
|
|
43596
|
+
if (!start && !end && (currentStart || currentEnd)) {
|
|
43597
|
+
return { start: currentStart, end: currentEnd };
|
|
43598
|
+
}
|
|
43599
|
+
if (!this.isSameDate(currentStart, start) || !this.isSameDate(currentEnd, end)) {
|
|
43600
|
+
this.draftPresetId = null;
|
|
43601
|
+
this.draftPresetRange = null;
|
|
43602
|
+
this.rangeGroup.setValue({
|
|
43603
|
+
start,
|
|
43604
|
+
end,
|
|
43605
|
+
}, { emitEvent: false });
|
|
43606
|
+
this.cdr.markForCheck();
|
|
43607
|
+
}
|
|
43608
|
+
return { start, end };
|
|
43609
|
+
}
|
|
43552
43610
|
onAutoApplyCalendarInteraction(event) {
|
|
43553
|
-
if (!this.overlayOpen
|
|
43611
|
+
if (!this.overlayOpen) {
|
|
43554
43612
|
return;
|
|
43555
43613
|
}
|
|
43556
43614
|
const target = event.target;
|
|
@@ -43567,18 +43625,38 @@ class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
43567
43625
|
if (typeof window === 'undefined') {
|
|
43568
43626
|
return;
|
|
43569
43627
|
}
|
|
43570
|
-
// Material clones the model when actions are present;
|
|
43628
|
+
// Material clones the model when actions are present; sync draft selection and only auto-apply once both bounds are chosen.
|
|
43571
43629
|
window.setTimeout(() => {
|
|
43572
|
-
if (!this.overlayOpen
|
|
43630
|
+
if (!this.overlayOpen) {
|
|
43573
43631
|
return;
|
|
43574
43632
|
}
|
|
43575
43633
|
const picker = this.pickerRef;
|
|
43576
|
-
|
|
43577
|
-
|
|
43578
|
-
|
|
43579
|
-
|
|
43580
|
-
|
|
43581
|
-
|
|
43634
|
+
const syncedPending = this.syncDraftFromPendingCalendarSelection();
|
|
43635
|
+
if (this.inlineQuickPresetsApplyMode() === 'auto') {
|
|
43636
|
+
if (syncedPending !== null) {
|
|
43637
|
+
if (syncedPending.start && syncedPending.end) {
|
|
43638
|
+
picker?._applyPendingSelection?.();
|
|
43639
|
+
this.commitDateRangeValue({
|
|
43640
|
+
startDate: syncedPending.start,
|
|
43641
|
+
endDate: syncedPending.end,
|
|
43642
|
+
});
|
|
43643
|
+
picker?.close?.();
|
|
43644
|
+
}
|
|
43645
|
+
}
|
|
43646
|
+
else if (!this.hasPartialRangeGroupValue()) {
|
|
43647
|
+
const committedBefore = this.control().value;
|
|
43648
|
+
const hasPartialCommitted = Boolean(this.coerceDate(committedBefore?.startDate)) !==
|
|
43649
|
+
Boolean(this.coerceDate(committedBefore?.endDate));
|
|
43650
|
+
if (!hasPartialCommitted) {
|
|
43651
|
+
picker?._applyPendingSelection?.();
|
|
43652
|
+
const committed = this.control().value;
|
|
43653
|
+
const start = this.coerceDate(committed?.startDate);
|
|
43654
|
+
const end = this.coerceDate(committed?.endDate);
|
|
43655
|
+
if (start && end) {
|
|
43656
|
+
picker?.close?.();
|
|
43657
|
+
}
|
|
43658
|
+
}
|
|
43659
|
+
}
|
|
43582
43660
|
}
|
|
43583
43661
|
this.scheduleInlineResize();
|
|
43584
43662
|
}, 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-fields",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.20",
|
|
4
4
|
"description": "Angular Material-based dynamic form fields for Praxis UI with lazy loading and metadata-driven rendering.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"@angular/platform-browser": "^21.0.0",
|
|
12
12
|
"@angular/router": "^21.0.0",
|
|
13
13
|
"rxjs": "^7.8.0",
|
|
14
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
15
|
-
"@praxisui/dialog": "^10.0.0-rc.
|
|
16
|
-
"@praxisui/cron-builder": "^10.0.0-rc.
|
|
14
|
+
"@praxisui/core": "^10.0.0-rc.20",
|
|
15
|
+
"@praxisui/dialog": "^10.0.0-rc.20",
|
|
16
|
+
"@praxisui/cron-builder": "^10.0.0-rc.20"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"libphonenumber-js": "^1.12.41",
|
|
@@ -2303,7 +2303,7 @@ declare class MaterialDateRangeComponent extends SimpleBaseInputComponent implem
|
|
|
2303
2303
|
ngOnInit(): void;
|
|
2304
2304
|
protected shouldPropagateRangeGroupChanges(): boolean;
|
|
2305
2305
|
protected focusEndDateInput(event: Event): void;
|
|
2306
|
-
|
|
2306
|
+
protected propagateRangeValue(): void;
|
|
2307
2307
|
private isEmptyRangeValue;
|
|
2308
2308
|
private areDatesEqual;
|
|
2309
2309
|
validateField(): Promise<ValidationErrors | null>;
|
|
@@ -4801,6 +4801,8 @@ declare class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
4801
4801
|
panelClasses(): string[];
|
|
4802
4802
|
errorStateMatcher(): _angular_material_core.ErrorStateMatcher;
|
|
4803
4803
|
protected shouldPropagateRangeGroupChanges(): boolean;
|
|
4804
|
+
protected propagateRangeValue(): void;
|
|
4805
|
+
private hasPartialRangeGroupValue;
|
|
4804
4806
|
showInlineQuickPresets(): boolean;
|
|
4805
4807
|
inlineQuickPresets(): InlineDateQuickPreset[];
|
|
4806
4808
|
private buildInlineQuickPresets;
|
|
@@ -4902,6 +4904,7 @@ declare class InlineDateRangeComponent extends MaterialDateRangeComponent {
|
|
|
4902
4904
|
private resolveDocumentDirection;
|
|
4903
4905
|
private syncAutoApplyCalendarBinding;
|
|
4904
4906
|
private unbindAutoApplyCalendarBinding;
|
|
4907
|
+
private syncDraftFromPendingCalendarSelection;
|
|
4905
4908
|
private onAutoApplyCalendarInteraction;
|
|
4906
4909
|
private overlayDensityPanelClass;
|
|
4907
4910
|
private resolveDensityProfile;
|