@acorex/components 22.4.53 → 22.4.54
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/conversation/README.md +2 -2
- package/fesm2022/{acorex-components-conversation-acorex-components-conversation-CzzR4rLf.mjs → acorex-components-conversation-acorex-components-conversation-Dtregx0j.mjs} +717 -672
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-Dtregx0j.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DXJF8zIY.mjs → acorex-components-conversation-picker-rename-file-dialog.component-Y8CaQkqR.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-DXJF8zIY.mjs.map → acorex-components-conversation-picker-rename-file-dialog.component-Y8CaQkqR.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +4 -4
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +52 -16
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +6 -6
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-text-editor.mjs +8 -4
- package/fesm2022/acorex-components-text-editor.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation.d.ts +17 -17
- package/types/acorex-components-lookup.d.ts +1 -0
- package/types/acorex-components-text-editor.d.ts +3 -1
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CzzR4rLf.mjs.map +0 -1
|
@@ -2920,10 +2920,17 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
2920
2920
|
* Border-box width of the trigger, kept current by a ResizeObserver.
|
|
2921
2921
|
* Reading `origin.offsetWidth` from the template forced a synchronous layout on every
|
|
2922
2922
|
* change-detection pass for every instance, even while the popover was closed.
|
|
2923
|
+
* Stays 0 until a real measurement arrives; the popover must not be given `"0px"`.
|
|
2923
2924
|
*/
|
|
2924
2925
|
this.originWidth = signal(0, /* @ts-ignore */
|
|
2925
2926
|
...(ngDevMode ? [{ debugName: "originWidth" }] : /* istanbul ignore next */ []));
|
|
2926
|
-
this.popoverWidth = computed(() =>
|
|
2927
|
+
this.popoverWidth = computed(() => {
|
|
2928
|
+
if (this.isActionsheetStyle()) {
|
|
2929
|
+
return '100%';
|
|
2930
|
+
}
|
|
2931
|
+
const width = this.originWidth();
|
|
2932
|
+
return width > 0 ? `${width}px` : 'fit-content';
|
|
2933
|
+
}, /* @ts-ignore */
|
|
2927
2934
|
...(ngDevMode ? [{ debugName: "popoverWidth" }] : /* istanbul ignore next */ []));
|
|
2928
2935
|
this.popupRef = viewChild('popup', /* @ts-ignore */
|
|
2929
2936
|
...(ngDevMode ? [{ debugName: "popupRef" }] : /* istanbul ignore next */ []));
|
|
@@ -2988,16 +2995,16 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
2988
2995
|
if (!origin) {
|
|
2989
2996
|
return;
|
|
2990
2997
|
}
|
|
2998
|
+
// Seed immediately. ResizeObserver notifies on a later frame, and the popover
|
|
2999
|
+
// copies its width only when it opens.
|
|
3000
|
+
this.#syncOriginWidth();
|
|
2991
3001
|
if (typeof ResizeObserver === 'undefined') {
|
|
2992
|
-
this.originWidth.set(origin.offsetWidth);
|
|
2993
3002
|
return;
|
|
2994
3003
|
}
|
|
2995
3004
|
const observer = new ResizeObserver((entries) => {
|
|
2996
|
-
|
|
2997
|
-
const box = entry.borderBoxSize?.[0];
|
|
2998
|
-
this.originWidth.set(Math.round(box ? box.inlineSize : entry.target.getBoundingClientRect().width));
|
|
3005
|
+
this.#syncOriginWidth(entries[entries.length - 1]);
|
|
2999
3006
|
});
|
|
3000
|
-
observer.observe(origin);
|
|
3007
|
+
observer.observe(origin, { box: 'border-box' });
|
|
3001
3008
|
onCleanup(() => observer.disconnect());
|
|
3002
3009
|
});
|
|
3003
3010
|
// Keep the popover in sync with the expanded state.
|
|
@@ -3108,6 +3115,31 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3108
3115
|
#syncActionsheetStyle() {
|
|
3109
3116
|
this.isActionsheetStyle.set(this.adaptivityEnabled() && this.#platform.is('SM'));
|
|
3110
3117
|
}
|
|
3118
|
+
/**
|
|
3119
|
+
* Records the trigger's border-box width.
|
|
3120
|
+
* A zero reading is ignored so a not-yet-laid-out observer entry cannot collapse the popup.
|
|
3121
|
+
*/
|
|
3122
|
+
#syncOriginWidth(entry) {
|
|
3123
|
+
const target = entry?.target instanceof HTMLElement ? entry.target : this.originRef()?.nativeElement;
|
|
3124
|
+
if (!target) {
|
|
3125
|
+
return;
|
|
3126
|
+
}
|
|
3127
|
+
const width = this.#measureTriggerWidth(target, entry);
|
|
3128
|
+
if (width > 0) {
|
|
3129
|
+
this.originWidth.set(width);
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
#measureTriggerWidth(origin, entry) {
|
|
3133
|
+
const borderSize = entry?.borderBoxSize?.[0]?.inlineSize ?? 0;
|
|
3134
|
+
const contentWidth = entry?.contentRect?.width ?? 0;
|
|
3135
|
+
const width = borderSize || contentWidth || origin.offsetWidth || origin.getBoundingClientRect().width;
|
|
3136
|
+
return Math.round(width);
|
|
3137
|
+
}
|
|
3138
|
+
/** Measures the trigger, then opens. Width must be current before the next render creates the overlay. */
|
|
3139
|
+
#openPopup() {
|
|
3140
|
+
this.#syncOriginWidth();
|
|
3141
|
+
this.expanded.set(true);
|
|
3142
|
+
}
|
|
3111
3143
|
/** Caps dropdown popup height so auto-flip can place it below or above the trigger without covering it. */
|
|
3112
3144
|
#updatePopupMaxHeight() {
|
|
3113
3145
|
const popup = this.popupRef()?.nativeElement;
|
|
@@ -3147,14 +3179,15 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3147
3179
|
return;
|
|
3148
3180
|
}
|
|
3149
3181
|
if (this.isEditableTrigger()) {
|
|
3150
|
-
this
|
|
3182
|
+
this.#openPopup();
|
|
3151
3183
|
queueMicrotask(() => this.triggerSearchInput()?.nativeElement.focus());
|
|
3152
3184
|
return;
|
|
3153
3185
|
}
|
|
3154
|
-
this.expanded
|
|
3155
|
-
|
|
3186
|
+
if (this.expanded()) {
|
|
3187
|
+
this.expanded.set(false);
|
|
3156
3188
|
return;
|
|
3157
3189
|
}
|
|
3190
|
+
this.#openPopup();
|
|
3158
3191
|
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
3159
3192
|
}
|
|
3160
3193
|
/**
|
|
@@ -3165,10 +3198,11 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3165
3198
|
if (this.disabled() || this.readonly()) {
|
|
3166
3199
|
return;
|
|
3167
3200
|
}
|
|
3168
|
-
this.expanded
|
|
3169
|
-
|
|
3201
|
+
if (this.expanded()) {
|
|
3202
|
+
this.expanded.set(false);
|
|
3170
3203
|
return;
|
|
3171
3204
|
}
|
|
3205
|
+
this.#openPopup();
|
|
3172
3206
|
if (this.isEditableTrigger()) {
|
|
3173
3207
|
queueMicrotask(() => this.triggerSearchInput()?.nativeElement.focus());
|
|
3174
3208
|
return;
|
|
@@ -3202,7 +3236,7 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3202
3236
|
}
|
|
3203
3237
|
if (e.key === 'ArrowDown') {
|
|
3204
3238
|
e.preventDefault();
|
|
3205
|
-
this
|
|
3239
|
+
this.#openPopup();
|
|
3206
3240
|
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
3207
3241
|
return;
|
|
3208
3242
|
}
|
|
@@ -3212,10 +3246,12 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3212
3246
|
}
|
|
3213
3247
|
if (!this.isEditableTrigger() && (e.key === 'Enter' || e.key === ' ')) {
|
|
3214
3248
|
e.preventDefault();
|
|
3215
|
-
this.expanded.update((open) => !open);
|
|
3216
3249
|
if (this.expanded()) {
|
|
3217
|
-
|
|
3250
|
+
this.expanded.set(false);
|
|
3251
|
+
return;
|
|
3218
3252
|
}
|
|
3253
|
+
this.#openPopup();
|
|
3254
|
+
queueMicrotask(() => this.#focusPopupSearchOrList());
|
|
3219
3255
|
}
|
|
3220
3256
|
}
|
|
3221
3257
|
/** Filters the datasource from the actionsheet search field and handles Enter with no matches. */
|
|
@@ -3576,7 +3612,7 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3576
3612
|
if (this.disabled() || this.readonly()) {
|
|
3577
3613
|
return;
|
|
3578
3614
|
}
|
|
3579
|
-
this
|
|
3615
|
+
this.#openPopup();
|
|
3580
3616
|
}
|
|
3581
3617
|
/**
|
|
3582
3618
|
* Handles typing in the editable trigger input.
|
|
@@ -3586,7 +3622,7 @@ class AXLookupComponent extends NXValueComponent {
|
|
|
3586
3622
|
return;
|
|
3587
3623
|
}
|
|
3588
3624
|
this.searchText.set(text);
|
|
3589
|
-
this
|
|
3625
|
+
this.#openPopup();
|
|
3590
3626
|
this.#applyFilterDebounced(text);
|
|
3591
3627
|
}
|
|
3592
3628
|
/** Filters the datasource from the actionsheet search field (reads the input so delayed ngModel cannot block typing). */
|