@arsedizioni/ars-utils 22.0.41 → 22.0.42
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.
|
@@ -1043,7 +1043,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1043
1043
|
* • wrap-container basis rewrite (ngx issue 660)
|
|
1044
1044
|
*
|
|
1045
1045
|
* Extensions beyond ngx-layout (documented, opt-in by syntax):
|
|
1046
|
-
* • fxFlex="*" → fills the remaining space like
|
|
1046
|
+
* • fxFlex="*" → fills the remaining space like fxFlex="grow" (1 1 100%)
|
|
1047
1047
|
* • fxFlex="" + a SIBLING with fxFlex="*" → this element gets 0 0 auto
|
|
1048
1048
|
* (static-attribute detection only; property bindings are not seen)
|
|
1049
1049
|
*
|
|
@@ -1187,6 +1187,22 @@ function parentHasStar(el) {
|
|
|
1187
1187
|
return false;
|
|
1188
1188
|
return Array.from(parent.children).some(c => c !== el && (c.getAttribute('fxflex') === '*' || c.getAttribute('fxFlex') === '*'));
|
|
1189
1189
|
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Resolves the non-ngx fxFlex extensions to a value `buildFlexStyles` understands.
|
|
1192
|
+
* • '*' → 'grow' (fill the remaining space → `flex: 1 1 100%`, max-* 100%)
|
|
1193
|
+
* • '' with a `*` sibling → 'none' (`0 0 auto`)
|
|
1194
|
+
* • anything else → returned unchanged
|
|
1195
|
+
* @param raw - The resolved fxFlex value for the active breakpoint.
|
|
1196
|
+
* @param hasStarSibling - Whether a sibling element declares `fxFlex="*"`.
|
|
1197
|
+
* @returns The value to pass to `buildFlexStyles`.
|
|
1198
|
+
*/
|
|
1199
|
+
function resolveFlexInput(raw, hasStarSibling) {
|
|
1200
|
+
if (raw === '*')
|
|
1201
|
+
return 'grow';
|
|
1202
|
+
if (raw === '' && hasStarSibling)
|
|
1203
|
+
return 'none';
|
|
1204
|
+
return raw;
|
|
1205
|
+
}
|
|
1190
1206
|
class FxFlexDirective extends ResponsiveBaseDirective {
|
|
1191
1207
|
constructor() {
|
|
1192
1208
|
super();
|
|
@@ -1232,13 +1248,11 @@ class FxFlexDirective extends ResponsiveBaseDirective {
|
|
|
1232
1248
|
this._applied.clear();
|
|
1233
1249
|
return;
|
|
1234
1250
|
}
|
|
1235
|
-
// Extensions (documented in the header)
|
|
1236
|
-
// fxFlex
|
|
1237
|
-
//
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
else if (raw === '' && this.isBrowser && parentHasStar(el))
|
|
1241
|
-
raw = 'none'; // 0 0 auto
|
|
1251
|
+
// Extensions (documented in the header). `*` fills like fxFlex="grow" (=> flex: 1 1 100%);
|
|
1252
|
+
// a bare fxFlex next to a `*` sibling collapses to `0 0 auto`. The sibling DOM read is
|
|
1253
|
+
// performed lazily, only for the bare-'' case in the browser.
|
|
1254
|
+
const hasStarSibling = raw === '' && this.isBrowser ? parentHasStar(el) : false;
|
|
1255
|
+
raw = resolveFlexInput(raw, hasStarSibling);
|
|
1242
1256
|
// Parent flow: reactive via FxLayoutDirective signals when it is the
|
|
1243
1257
|
// direct parent; getComputedStyle fallback for plain-CSS flex parents.
|
|
1244
1258
|
const { direction, hasWrap } = resolveParentFlow(el, this.parentLayout, this.isBrowser);
|
|
@@ -3489,5 +3503,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
3489
3503
|
* Generated bundle index. Do not edit.
|
|
3490
3504
|
*/
|
|
3491
3505
|
|
|
3492
|
-
export { ALIAS_FAMILIES, ALIAS_INDEX, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, FlexModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
|
|
3506
|
+
export { ALIAS_FAMILIES, ALIAS_INDEX, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, FlexModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
|
|
3493
3507
|
//# sourceMappingURL=arsedizioni-ars-utils-ui.mjs.map
|