@ngneers/controls 0.0.1-pre4 → 0.0.1-pre6
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/ngneers-controls-accordion.mjs +32 -32
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -1
- package/fesm2022/ngneers-controls-api-ng.mjs +19 -19
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -1
- package/fesm2022/ngneers-controls-api-resize.mjs +706 -0
- package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
- package/fesm2022/ngneers-controls-avatar.mjs +13 -13
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -1
- package/fesm2022/ngneers-controls-base.mjs +89 -64
- package/fesm2022/ngneers-controls-base.mjs.map +1 -1
- package/fesm2022/ngneers-controls-breadcrumb.mjs +18 -18
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngneers-controls-button-group.mjs +8 -8
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -1
- package/fesm2022/ngneers-controls-button.mjs +16 -10
- package/fesm2022/ngneers-controls-button.mjs.map +1 -1
- package/fesm2022/{ngneers-controls-calendar-time-C7UnIFzU.mjs → ngneers-controls-calendar-time-Bzlv9Vkn.mjs} +9 -9
- package/fesm2022/{ngneers-controls-calendar-time-C7UnIFzU.mjs.map → ngneers-controls-calendar-time-Bzlv9Vkn.mjs.map} +1 -1
- package/fesm2022/ngneers-controls-calendar.mjs +54 -54
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -1
- package/fesm2022/ngneers-controls-checkbox.mjs +9 -9
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -1
- package/fesm2022/ngneers-controls-chip.mjs +6 -6
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -1
- package/fesm2022/ngneers-controls-defer.mjs +10 -10
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -1
- package/fesm2022/ngneers-controls-dialog.mjs +37 -39
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -1
- package/fesm2022/ngneers-controls-directives.mjs +45 -39
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -1
- package/fesm2022/ngneers-controls-drawer.mjs +28 -28
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -1
- package/fesm2022/ngneers-controls-edit-inplace.mjs +15 -15
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -1
- package/fesm2022/ngneers-controls-filter.mjs +192 -44
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -1
- package/fesm2022/{ngneers-controls-i18n-de-CdTPeBiR.mjs → ngneers-controls-i18n-de-CF0xTWEX.mjs} +9 -5
- package/fesm2022/ngneers-controls-i18n-de-CF0xTWEX.mjs.map +1 -0
- package/fesm2022/{ngneers-controls-i18n-en-Cfp2pOLY.mjs → ngneers-controls-i18n-en-8B7xAjH2.mjs} +9 -5
- package/fesm2022/ngneers-controls-i18n-en-8B7xAjH2.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n.mjs +5 -5
- package/fesm2022/ngneers-controls-i18n.mjs.map +1 -1
- package/fesm2022/ngneers-controls-icon.mjs +10 -10
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
- package/fesm2022/ngneers-controls-inplace.mjs +18 -18
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input-field.mjs +15 -15
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input-mask.mjs +8 -8
- package/fesm2022/ngneers-controls-input-mask.mjs.map +1 -1
- package/fesm2022/ngneers-controls-input.mjs +7 -6
- package/fesm2022/ngneers-controls-input.mjs.map +1 -1
- package/fesm2022/ngneers-controls-item-view.mjs +33 -33
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -1
- package/fesm2022/ngneers-controls-list-box.mjs +31 -31
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
- package/fesm2022/ngneers-controls-menu.mjs +32 -32
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -1
- package/fesm2022/ngneers-controls-message.mjs +4 -4
- package/fesm2022/ngneers-controls-message.mjs.map +1 -1
- package/fesm2022/ngneers-controls-paginator.mjs +12 -12
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -1
- package/fesm2022/ngneers-controls-popover.mjs +13 -13
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -1
- package/fesm2022/ngneers-controls-progress.mjs +16 -16
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -1
- package/fesm2022/ngneers-controls-scroller.mjs +74 -39
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select-button.mjs +6 -6
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select.mjs +46 -46
- package/fesm2022/ngneers-controls-select.mjs.map +1 -1
- package/fesm2022/ngneers-controls-slider.mjs +12 -12
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -1
- package/fesm2022/ngneers-controls-spinner.mjs +7 -7
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -1
- package/fesm2022/ngneers-controls-splitter.mjs +141 -328
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -1
- package/fesm2022/ngneers-controls-switch.mjs +3 -3
- package/fesm2022/ngneers-controls-table.mjs +1520 -80
- package/fesm2022/ngneers-controls-table.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tabs.mjs +40 -39
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tag.mjs +4 -4
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -1
- package/fesm2022/ngneers-controls-toast.mjs +18 -18
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -1
- package/fesm2022/ngneers-controls-toggle-button.mjs +9 -9
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -1
- package/fesm2022/ngneers-controls-tooltip.mjs +37 -45
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -1
- package/fesm2022/ngneers-controls-utils-ng.mjs +9 -9
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -1
- package/package.json +14 -10
- package/types/ngneers-controls-api-ng.d.ts +2 -2
- package/types/ngneers-controls-api-resize.d.ts +318 -0
- package/types/ngneers-controls-base.d.ts +8 -0
- package/types/ngneers-controls-breadcrumb.d.ts +1 -1
- package/types/ngneers-controls-button.d.ts +13 -8
- package/types/ngneers-controls-calendar.d.ts +5 -1
- package/types/ngneers-controls-checkbox.d.ts +1 -1
- package/types/ngneers-controls-directives.d.ts +7 -1
- package/types/ngneers-controls-drawer.d.ts +4 -0
- package/types/ngneers-controls-edit-inplace.d.ts +4 -0
- package/types/ngneers-controls-filter.d.ts +53 -4
- package/types/ngneers-controls-i18n.d.ts +4 -0
- package/types/ngneers-controls-icon.d.ts +1 -1
- package/types/ngneers-controls-input-field.d.ts +4 -0
- package/types/ngneers-controls-input.d.ts +1 -1
- package/types/ngneers-controls-list-box.d.ts +5 -1
- package/types/ngneers-controls-menu.d.ts +1 -1
- package/types/ngneers-controls-paginator.d.ts +4 -0
- package/types/ngneers-controls-popover.d.ts +1 -1
- package/types/ngneers-controls-scroller.d.ts +12 -2
- package/types/ngneers-controls-select.d.ts +6 -2
- package/types/ngneers-controls-spinner.d.ts +1 -1
- package/types/ngneers-controls-splitter.d.ts +29 -59
- package/types/ngneers-controls-table.d.ts +392 -24
- package/types/ngneers-controls-toast.d.ts +1 -1
- package/types/ngneers-controls-tooltip.d.ts +1 -7
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs.map +0 -1
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngneers-controls-api-resize.mjs","sources":["../../src/api/resize/utils.ts","../../src/api/resize/resize-engine.ts","../../src/api/resize/ngneers-controls-api-resize.ts"],"sourcesContent":["import type {\n ExpandedResizeLimit,\n ExpandedResizeSize,\n ResizeLimit,\n ResizeLimitUnit,\n ResizeSize,\n ResizeSizeUnit,\n} from './types';\n\n// --- Size parsing ---\n\nexport function isResizeSize(value: unknown): value is ResizeSize {\n if (typeof value !== 'string') return false;\n const m = value.match(/^(.+)(px|fr|%)$/);\n if (!m || !m[1]) return false;\n if (isNaN(parseFloat(m[1]))) return false;\n return true;\n}\n\nexport function getResizeSizeUnit(value: ResizeSize): ResizeSizeUnit {\n if (value.endsWith('px')) return 'px';\n if (value.endsWith('fr')) return 'fr';\n return '%';\n}\n\nexport function getResizeSizeValue(value: ResizeSize): number {\n const unit = getResizeSizeUnit(value);\n return parseFloat(value.slice(0, -unit.length));\n}\n\nexport function expandResizeSize(value: ResizeSize): ExpandedResizeSize {\n return {\n value: getResizeSizeValue(value),\n unit: getResizeSizeUnit(value),\n };\n}\n\nexport function collapseResizeSize(size: ExpandedResizeSize): ResizeSize {\n return `${size.value}${size.unit}`;\n}\n\n// --- Limit parsing ---\n\nexport function isResizeLimit(value: unknown): value is ResizeLimit {\n if (typeof value !== 'string') return false;\n const m = value.match(/^(.+)(px|%)$/);\n if (!m || !m[1]) return false;\n if (isNaN(parseFloat(m[1]))) return false;\n return true;\n}\n\nexport function getResizeLimitUnit(value: ResizeLimit): ResizeLimitUnit {\n return value.endsWith('px') ? 'px' : '%';\n}\n\nexport function getResizeLimitValue(value: ResizeLimit): number {\n return value.endsWith('px') ? parseFloat(value.slice(0, -2)) : parseFloat(value.slice(0, -1));\n}\n\nexport function getResizeLimitInPx(value: ResizeLimit, containerSize: number): number {\n const unit = getResizeLimitUnit(value);\n const sizeValue = getResizeLimitValue(value);\n return unit === 'px' ? sizeValue : (sizeValue / 100) * containerSize;\n}\n\nexport function expandResizeLimit(value: ResizeLimit): ExpandedResizeLimit {\n return {\n value: getResizeLimitValue(value),\n unit: getResizeLimitUnit(value),\n };\n}\n\nexport function collapseResizeLimit(size: ExpandedResizeLimit): ResizeLimit {\n return `${size.value}${size.unit}`;\n}\n\n// --- Pixel resolution ---\n\n/**\n * Resolves a size to its pixel equivalent given the current fraction factors and container size.\n */\nexport function resolveSizeToPx(\n size: ExpandedResizeSize,\n pxPerFr: number,\n containerSize: number\n): number {\n switch (size.unit) {\n case 'px':\n return size.value;\n case 'fr':\n return pxPerFr * size.value;\n case '%':\n return (size.value / 100) * containerSize;\n }\n}\n\n/**\n * Converts a pixel delta to the appropriate value delta for the given unit.\n */\nexport function pxDeltaToUnitDelta(\n pxDelta: number,\n unit: ResizeSizeUnit,\n frPerPx: number,\n percentPerPx: number\n): number {\n switch (unit) {\n case 'px':\n return pxDelta;\n case 'fr':\n return pxDelta * frPerPx;\n case '%':\n return pxDelta * percentPerPx;\n }\n}\n","import { afterRenderEffect, computed, signal, type Signal, untracked } from '@angular/core';\r\n\r\nimport {\r\n expandResizeLimit,\r\n expandResizeSize,\r\n getResizeLimitInPx,\r\n getResizeLimitUnit,\r\n getResizeLimitValue,\r\n pxDeltaToUnitDelta,\r\n resolveSizeToPx,\r\n} from './utils';\r\n\r\nimport type {\r\n ExpandedResizeLimit,\r\n ResizableItem,\r\n ResizeDragContext,\r\n ResizeDragContextItem,\r\n ResizeEngineConfig,\r\n ResizeFractionFactors,\r\n ResizeSize,\r\n} from './types';\r\n\r\nconst LAST_CALC_SIZE_SYMBOL = Symbol('lastCalcSize');\r\n\r\n/**\r\n * A generic, control-agnostic resize engine for CSS grid layouts.\r\n *\r\n * Handles drag-based resizing of a list of {@link ResizableItem}s with support for:\r\n * - **Size units**: `px`, `fr`, `%`\r\n * - **Distribution modes**:\r\n * - `adjacent` — transfers space between the two items neighbouring the divider (zero-sum).\r\n * - `proportional` — only the dragged item changes to `px`; other items keep their `fr`/`%`\r\n * units and CSS grid redistributes the remaining space. Optionally locks the resized item\r\n * to `px` via {@link ResizeEngineConfig.lockSizes}.\r\n * - `push` — the dragged item grows/shrinks independently; the container total changes\r\n * (requires `containerConstrained = false`).\r\n * - **Commit modes** (for `adjacent`/`push`): `preserve`, `bakeAll`, `bakeAffected`\r\n * - **Min-size floor** ({@link ResizeEngineConfig.minItemSizePx}): an absolute `px` floor\r\n * enforced even when a relative min-size resolves smaller. In `proportional` mode, emitted\r\n * as CSS `minmax(floor, size)` so the grid natively prevents columns from shrinking below it.\r\n *\r\n * Consumers (splitter, table) provide items and configuration via signals.\r\n * The engine outputs a ready-to-use `grid-template-columns`/`grid-template-rows` string\r\n * via {@link gridTemplateSizes}.\r\n */\r\nexport class ResizeEngine {\r\n private readonly items: Signal<readonly ResizableItem[]>;\r\n private readonly containerSize: Signal<number>;\r\n private readonly gapSizes: Signal<readonly number[]>;\r\n private readonly distributionMode: ResizeEngineConfig['distributionMode'];\r\n private readonly containerConstrained: ResizeEngineConfig['containerConstrained'];\r\n private readonly lockSizes: Signal<boolean>;\r\n private readonly minItemSizePx: number;\r\n private readonly resolveItemSizes?: () => number[];\r\n\r\n constructor(config: ResizeEngineConfig) {\r\n this.items = config.items;\r\n this.containerSize = config.containerSize;\r\n this.gapSizes = config.gapSizes;\r\n this.distributionMode = config.distributionMode;\r\n this.containerConstrained = config.containerConstrained;\r\n this.lockSizes = config.lockSizes ?? signal(false);\r\n this.minItemSizePx = config.minItemSizePx ?? 0;\r\n this.resolveItemSizes = config.resolveItemSizes;\r\n\r\n // Signal fires when any item size is not calculated (external change detected)\r\n const hasUncalculatedSizes = computed(\r\n () => this.items().some(item => !this.isItemSizeCalculated(item)),\r\n { equal: (_, b) => b === false }\r\n ) as Signal<void>;\r\n\r\n // Ensure min/max limits are respected on external changes and container resize\r\n afterRenderEffect(() => {\r\n hasUncalculatedSizes();\r\n this.containerSize();\r\n untracked(() => {\r\n // Skip during active drag — sizes are managed by the drag handler\r\n if (this.dragContext()) return;\r\n this.ensureMinMaxSizes();\r\n });\r\n });\r\n }\r\n\r\n // --- Public signals ---\r\n\r\n /** The active drag state, or `null` when idle. */\r\n public readonly dragContext = signal<ResizeDragContext | null>(null);\r\n\r\n /** Whether a drag operation is currently in progress. */\r\n public readonly isDragging = computed(() => this.dragContext() !== null);\r\n\r\n /**\r\n * Whether any completed (non-cancelled) drag has occurred in this engine's lifetime.\r\n *\r\n * Used by `push` mode to defer resolving `fr`/`%` → `px` until the first drag.\r\n * Before the first drag, original units are preserved so CSS grid can distribute\r\n * space without rounding-induced overflow.\r\n */\r\n public readonly hasBeenResized = signal(false);\r\n\r\n /**\r\n * CSS grid template string with item sizes interleaved with gap sizes.\r\n *\r\n * Example output: `\"100px 4px minmax(50px, 2fr) 4px minmax(50px, 1fr)\"`.\r\n *\r\n * **Output strategy per distribution mode:**\r\n * - `adjacent` — resolves all sizes to `px`. CSS grid cannot constrain adjacent\r\n * resizing correctly with `fr` units.\r\n * - `proportional` — keeps `fr`/`%` as-is, wrapped in `minmax(floor, size)` when\r\n * {@link minItemSizePx} > 0. This lets CSS grid redistribute remaining space\r\n * while enforcing the minimum floor natively. Locked (`px`) columns pass through.\r\n * - `push` — keeps original units until the first completed drag, then resolves\r\n * everything to `px` so the total can exceed the container and trigger scrolling.\r\n */\r\n public readonly gridTemplateSizes = computed(() => {\r\n const items = this.items();\r\n const gaps = this.gapSizes();\r\n\r\n if (items.length === 0) return 'none';\r\n\r\n const containerSize = this.containerSize();\r\n const constrained = this.containerConstrained();\r\n const mode = this.distributionMode();\r\n\r\n // Resolve strategy:\r\n // - adjacent (constrained): resolve ALL to px — CSS grid can't constrain adjacent resizing with fr.\r\n // - push (unconstrained): keep original units until first movement bakes to px, then resolve for scrolling.\r\n // - proportional: NEVER resolve fr→px. Use minmax(floor, size) so CSS grid handles min widths\r\n // natively, both during and after drag. This allows columns that still have room to shrink\r\n // while already-at-minimum columns stay at the floor.\r\n const shouldResolve =\r\n containerSize > 0 &&\r\n ((constrained && mode === 'adjacent') || (!constrained && this.hasBeenResized()));\r\n const useMinmax = mode === 'proportional' && this.minItemSizePx > 0;\r\n const frFactors = shouldResolve ? this.getCurrentFractionFactors() : null;\r\n\r\n const result: string[] = [];\r\n for (let i = 0; i < items.length; i++) {\r\n const size = items[i]!.size();\r\n const expanded = expandResizeSize(size);\r\n if (shouldResolve && expanded.unit !== 'px') {\r\n result.push(`${resolveSizeToPx(expanded, frFactors!.pxPerFr, containerSize)}px`);\r\n } else if (useMinmax && expanded.unit !== 'px') {\r\n result.push(`minmax(${this.minItemSizePx}px, ${size})`);\r\n } else {\r\n result.push(size);\r\n }\r\n if (i < gaps.length) {\r\n result.push(`${gaps[i] || 0}px`);\r\n }\r\n }\r\n return result.join(' ');\r\n });\r\n\r\n /**\r\n * The total gap size in pixels.\r\n */\r\n public readonly totalGapSize = computed(() =>\r\n this.gapSizes().reduce((acc, size) => acc + size, 0)\r\n );\r\n\r\n /**\r\n * Aggregated item sizes by unit.\r\n */\r\n private readonly totalItemSizes = computed(() =>\r\n this.items().reduce(\r\n (acc, item) => {\r\n const { unit, value } = expandResizeSize(item.size());\r\n acc[unit] += value;\r\n return acc;\r\n },\r\n { px: 0, fr: 0, '%': 0 }\r\n )\r\n );\r\n\r\n /**\r\n * Minimum total size of all items combined (as a CSS calc expression).\r\n */\r\n public readonly minTotalSize = computed(() => this.computeLimitTotalSize('minSize'));\r\n\r\n /**\r\n * Maximum total size of all items combined (as a CSS calc expression).\r\n */\r\n public readonly maxTotalSize = computed(() => this.computeLimitTotalSize('maxSize'));\r\n\r\n // --- Drag operations ---\r\n\r\n /**\r\n * Begins a drag at the given divider. Original sizes are saved for reverting\r\n * on no-op clicks or cancellation. In push mode, baking to `px` is deferred\r\n * to the first {@link drag} call to avoid a visual shift on mousedown.\r\n */\r\n public startDrag(dividerIndex: number, startPositionPx: number): void {\r\n const items = this.items();\r\n if (dividerIndex < 0 || items.length < 2 || dividerIndex >= items.length) return;\r\n\r\n const preBakeSizes = items.map(item => item.size());\r\n\r\n this.dragContext.set({\r\n dividerIndex,\r\n startPosition: startPositionPx,\r\n preBakeSizes,\r\n items: items.map(item => this.createContextItem(item)),\r\n fractionFactors: this.getCurrentFractionFactors(),\r\n percentPerPx: this.getCurrentPercentPerPx(),\r\n baked: this.containerConstrained(),\r\n });\r\n }\r\n\r\n /** Updates item sizes during an active drag based on the current pointer position. */\r\n public drag(dividerIndex: number, currentPositionPx: number): void {\r\n const ctx = this.dragContext();\r\n if (!ctx || ctx.dividerIndex !== dividerIndex) return;\r\n\r\n // In push mode, bake all items to px on the first movement so non-dragged\r\n // items keep their absolute widths. Deferred from startDrag to avoid a\r\n // visual column shift on mousedown (CSS Grid fr→px rounding mismatch).\r\n if (!ctx.baked) {\r\n this.bakeAllItemsToPx();\r\n ctx.items = this.items().map(item => this.createContextItem(item));\r\n ctx.fractionFactors = this.getCurrentFractionFactors();\r\n ctx.percentPerPx = this.getCurrentPercentPerPx();\r\n ctx.baked = true;\r\n }\r\n\r\n const pxDelta = currentPositionPx - ctx.startPosition;\r\n this.applyDelta(dividerIndex, pxDelta, ctx.items, ctx.fractionFactors, ctx.percentPerPx);\r\n }\r\n\r\n /**\r\n * Ends a drag. If cancelled or no movement occurred, sizes revert to their\r\n * pre-drag values (including undoing any push-mode baking). Otherwise,\r\n * post-drag finalization runs (commit mode or proportional locking).\r\n */\r\n public endDrag(dividerIndex: number, cancel: boolean): void {\r\n const ctx = this.dragContext();\r\n if (!ctx || ctx.dividerIndex !== dividerIndex) return;\r\n const hasMoved = ctx.items.some(ci => {\r\n const current = expandResizeSize(ci.item.size());\r\n return current.value !== ci.startSize.value || current.unit !== ci.startSize.unit;\r\n });\r\n\r\n if (cancel || !hasMoved) {\r\n // Reset to pre-bake sizes (restores original fr/% units on no-op clicks)\r\n ctx.items.forEach((ci, i) => ci.item.size.set(ctx.preBakeSizes[i]!));\r\n } else {\r\n this.finalizeResize(ctx);\r\n this.hasBeenResized.set(true);\r\n }\r\n\r\n this.dragContext.set(null);\r\n }\r\n\r\n /**\r\n * Applies a single instantaneous move (e.g. keyboard step) at the given divider.\r\n * Requires that the relevant items already have engine-calculated sizes.\r\n */\r\n public moveDivider(dividerIndex: number, pxDelta: number): void {\r\n const items = this.items();\r\n if (dividerIndex < 0 || items.length < 2 || dividerIndex >= items.length) return;\r\n\r\n // Check that relevant items have calculated sizes\r\n if (!this.isItemSizeCalculated(items[dividerIndex]!)) return;\r\n if (dividerIndex < items.length - 1 && !this.isItemSizeCalculated(items[dividerIndex + 1]!))\r\n return;\r\n\r\n const contextItems = items.map(item => this.createContextItem(item));\r\n this.applyDelta(\r\n dividerIndex,\r\n pxDelta,\r\n contextItems,\r\n this.getCurrentFractionFactors(),\r\n this.getCurrentPercentPerPx()\r\n );\r\n }\r\n\r\n /**\r\n * Clamps all items to their min/max constraints, respecting {@link minItemSizePx}.\r\n *\r\n * Called automatically via `afterRenderEffect` when item sizes change externally\r\n * or the container resizes. Skipped during an active drag (sizes are managed\r\n * by the drag handler). For `fr`-sized items, clamping is done iteratively\r\n * with redistribution to maintain total fraction balance.\r\n */\r\n public ensureMinMaxSizes(): void {\r\n const items = this.items();\r\n if (items.length === 0) return;\r\n\r\n const containerSize = this.containerSize();\r\n const itemSizes = items.map(item => {\r\n const expanded = expandResizeSize(item.size());\r\n return {\r\n item,\r\n size: { unit: expanded.unit, value: expanded.value },\r\n minSizePx: Math.max(this.minItemSizePx, getResizeLimitInPx(item.minSize(), containerSize)),\r\n maxSizePx: getResizeLimitInPx(item.maxSize(), containerSize),\r\n };\r\n });\r\n\r\n // Clamp px and % items\r\n for (const entry of itemSizes) {\r\n if (entry.size.unit === 'px') {\r\n entry.size.value = clamp(entry.size.value, entry.minSizePx, entry.maxSizePx);\r\n } else if (entry.size.unit === '%') {\r\n const pxValue = (entry.size.value / 100) * containerSize;\r\n if (pxValue < entry.minSizePx) {\r\n entry.size.value = (entry.minSizePx / containerSize) * 100;\r\n } else if (pxValue > entry.maxSizePx) {\r\n entry.size.value = (entry.maxSizePx / containerSize) * 100;\r\n }\r\n }\r\n }\r\n\r\n // Calculate fraction factors for fr-sized items\r\n const totalPx = itemSizes.reduce(\r\n (acc, { size }) => (size.unit === 'px' ? acc + size.value : acc),\r\n 0\r\n );\r\n const totalPercent = itemSizes.reduce(\r\n (acc, { size }) => (size.unit === '%' ? acc + size.value : acc),\r\n 0\r\n );\r\n const totalFr = itemSizes.reduce(\r\n (acc, { size }) => (size.unit === 'fr' ? acc + size.value : acc),\r\n 0\r\n );\r\n\r\n const frArea =\r\n containerSize - this.totalGapSize() - totalPx - (totalPercent / 100) * containerSize;\r\n const frPerPx = totalFr / (frArea || 1);\r\n const pxPerFr = (frArea || 1) / (totalFr || 1);\r\n\r\n // Iteratively clamp fr-sized items and redistribute\r\n let frPanelsWithoutClamping = itemSizes.filter(p => p.size.unit === 'fr');\r\n let frToDistribute: number | undefined = undefined;\r\n while (frPanelsWithoutClamping.length > 0 && frToDistribute !== 0) {\r\n const frToAddPerPanel = frToDistribute ? frToDistribute / frPanelsWithoutClamping.length : 0;\r\n const next: typeof itemSizes = [];\r\n let currentTotalFrSize = totalFr;\r\n for (const p of frPanelsWithoutClamping) {\r\n const minSizeFr = p.minSizePx * frPerPx;\r\n const maxSizeFr = p.maxSizePx * frPerPx;\r\n p.size.value += frToAddPerPanel;\r\n if (p.size.value < minSizeFr) {\r\n currentTotalFrSize = currentTotalFrSize - p.size.value + minSizeFr;\r\n p.size.value = minSizeFr;\r\n } else if (p.size.value > maxSizeFr) {\r\n currentTotalFrSize = currentTotalFrSize - p.size.value + maxSizeFr;\r\n p.size.value = maxSizeFr;\r\n } else {\r\n next.push(p);\r\n }\r\n }\r\n frToDistribute = totalFr - currentTotalFrSize;\r\n if (Math.abs(frToDistribute * pxPerFr) < 1) {\r\n frToDistribute = 0;\r\n }\r\n frPanelsWithoutClamping = next;\r\n }\r\n\r\n // Write back\r\n for (const { item, size } of itemSizes) {\r\n this.setItemSize(item, `${size.value}${size.unit}`);\r\n }\r\n }\r\n\r\n // --- Item size tracking ---\r\n\r\n /**\r\n * Sets the item's size and marks it as engine-calculated via an internal symbol.\r\n * This mark is used by {@link isItemSizeCalculated} to detect external size changes.\r\n */\r\n public setItemSize(item: ResizableItem, size: ResizeSize): void {\r\n item.size.set(size);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (item as any)[LAST_CALC_SIZE_SYMBOL] = size;\r\n }\r\n\r\n /**\r\n * Returns `true` if the item's current size matches the last value written by the engine.\r\n * Returns `false` if the size was changed externally (e.g. by an input binding or state restore).\r\n */\r\n public isItemSizeCalculated(item: ResizableItem): boolean {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return (item as any)[LAST_CALC_SIZE_SYMBOL] === item.size();\r\n }\r\n\r\n // --- Private: delta application ---\r\n\r\n /**\r\n * Routes a px delta to the appropriate distribution strategy.\r\n *\r\n * For last-item edge resizing (dividerIndex === items.length - 1), the delta is\r\n * remapped to the previous divider with negated direction. This allows the last\r\n * column's handle in push mode to resize it directly.\r\n */\r\n private applyDelta(\r\n dividerIndex: number,\r\n pxDelta: number,\r\n items: ResizeDragContextItem[],\r\n fractionFactors: ResizeFractionFactors,\r\n percentPerPx: number\r\n ): void {\r\n const mode = this.distributionMode();\r\n\r\n // Right-edge resize of the last item: remap to the previous divider with negated delta.\r\n const isLastItemEdge = dividerIndex === items.length - 1;\r\n const effectiveDividerIndex = isLastItemEdge ? dividerIndex - 1 : dividerIndex;\r\n const effectiveDelta = isLastItemEdge ? -pxDelta : pxDelta;\r\n\r\n if (mode === 'push' && !this.containerConstrained()) {\r\n this.applyPushDelta(dividerIndex, pxDelta, items, fractionFactors, percentPerPx);\r\n } else if (mode === 'proportional') {\r\n this.applyProportionalDelta(effectiveDividerIndex, effectiveDelta, items, fractionFactors);\r\n } else {\r\n this.applyAdjacentDelta(\r\n effectiveDividerIndex,\r\n effectiveDelta,\r\n items,\r\n fractionFactors,\r\n percentPerPx\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Adjacent mode: transfers the delta between the two items neighbouring the divider.\r\n *\r\n * Grows the left item and shrinks the right item (or vice versa). When an item\r\n * hits its min/max constraint, the unapplied remainder cascades to the next item\r\n * in that direction. A second pass resolves any asymmetry between left and right.\r\n * The total container width is always preserved (zero-sum).\r\n */\r\n private applyAdjacentDelta(\r\n dividerIndex: number,\r\n pxDelta: number,\r\n items: ResizeDragContextItem[],\r\n fractionFactors: ResizeFractionFactors,\r\n percentPerPx: number\r\n ): void {\r\n const containerSize = this.containerSize();\r\n const appliedPanelDeltas: number[] = Array(items.length).fill(0);\r\n\r\n const recursion = (pxDelta: number, itemIndex: number, itemIndexIncrement: number): number => {\r\n if (itemIndex >= items.length || itemIndex < 0) return 0;\r\n const ci = items[itemIndex]!;\r\n\r\n const startPx = resolveSizeToPx(ci.startSize, fractionFactors.pxPerFr, containerSize);\r\n const newPx = startPx + pxDelta;\r\n const limitPx = getLimitPxForDelta(ci, pxDelta, containerSize, this.minItemSizePx);\r\n const unappliedDelta =\r\n pxDelta < 0\r\n ? limitPx > newPx\r\n ? -(limitPx - newPx)\r\n : 0\r\n : limitPx < newPx\r\n ? newPx - limitPx\r\n : 0;\r\n\r\n const appliedDelta = pxDelta - unappliedDelta;\r\n appliedPanelDeltas[itemIndex] = appliedDelta;\r\n\r\n return unappliedDelta === 0\r\n ? pxDelta\r\n : appliedDelta +\r\n recursion(unappliedDelta, itemIndex + itemIndexIncrement, itemIndexIncrement);\r\n };\r\n\r\n let appliedLeft = recursion(pxDelta, dividerIndex, -1);\r\n let appliedRight = -recursion(-pxDelta, dividerIndex + 1, 1);\r\n\r\n if (appliedLeft !== pxDelta || appliedRight !== pxDelta) {\r\n const resolvedDelta =\r\n pxDelta < 0 ? Math.max(appliedLeft, appliedRight) : Math.min(appliedLeft, appliedRight);\r\n appliedPanelDeltas.fill(0);\r\n appliedLeft = recursion(resolvedDelta, dividerIndex, -1);\r\n appliedRight = -recursion(-resolvedDelta, dividerIndex + 1, 1);\r\n\r\n if (appliedLeft !== resolvedDelta || appliedRight !== resolvedDelta) {\r\n return;\r\n }\r\n }\r\n\r\n this.commitItemDeltas(items, appliedPanelDeltas, fractionFactors, percentPerPx);\r\n }\r\n\r\n /**\r\n * Proportional mode: only the item at `dividerIndex` changes size (set to absolute `px`).\r\n * All other items keep their original units (`fr`, `%`), and CSS grid's `minmax(floor, size)`\r\n * naturally redistributes the remaining space — columns with room shrink while those\r\n * already at the floor stay put.\r\n *\r\n * Growth is capped so the total never overflows the container: each other `fr` column\r\n * needs at least {@link minItemSizePx}, and locked `px` columns keep their size.\r\n *\r\n * After the drag ends, {@link applyProportionalLocking} determines whether the\r\n * resized column stays as `px` (locked) or is converted back to `fr` (dynamic).\r\n */\r\n private applyProportionalDelta(\r\n dividerIndex: number,\r\n pxDelta: number,\r\n items: ResizeDragContextItem[],\r\n fractionFactors: ResizeFractionFactors\r\n ): void {\r\n const containerSize = this.containerSize();\r\n const floor = this.minItemSizePx;\r\n const item = items[dividerIndex]!;\r\n const startPx = resolveSizeToPx(item.startSize, fractionFactors.pxPerFr, containerSize);\r\n\r\n // Clamp to own min/max\r\n let newPx = clampToLimits(startPx + pxDelta, item, containerSize, floor);\r\n\r\n // Cap so the total doesn't overflow. With minmax(floor, Xfr), each other\r\n // column needs at least `floor` px. Locked px columns keep their size.\r\n if (floor > 0) {\r\n const totalGaps = this.totalGapSize();\r\n let otherLockedPx = 0;\r\n let otherFrCount = 0;\r\n for (let i = 0; i < items.length; i++) {\r\n if (i === dividerIndex) continue;\r\n const { unit, value } = expandResizeSize(items[i]!.item.size());\r\n if (unit === 'px') {\r\n otherLockedPx += value;\r\n } else {\r\n otherFrCount++;\r\n }\r\n }\r\n newPx = Math.min(newPx, containerSize - totalGaps - otherLockedPx - otherFrCount * floor);\r\n }\r\n\r\n this.setItemSize(item.item, `${Math.max(0, newPx)}px`);\r\n }\r\n\r\n /**\r\n * Push mode: only the dragged item changes size. All other items stay at their\r\n * baked `px` values (set during {@link startDrag}). The container total changes,\r\n * causing horizontal overflow/scrolling. Only valid when `containerConstrained` is `false`.\r\n */\r\n private applyPushDelta(\r\n dividerIndex: number,\r\n pxDelta: number,\r\n items: ResizeDragContextItem[],\r\n fractionFactors: ResizeFractionFactors,\r\n percentPerPx: number\r\n ): void {\r\n const containerSize = this.containerSize();\r\n const appliedPanelDeltas: number[] = Array(items.length).fill(0);\r\n const item = items[dividerIndex]!;\r\n const startPx = resolveSizeToPx(item.startSize, fractionFactors.pxPerFr, containerSize);\r\n\r\n appliedPanelDeltas[dividerIndex] =\r\n clampToLimits(startPx + pxDelta, item, containerSize, this.minItemSizePx) - startPx;\r\n\r\n this.commitItemDeltas(items, appliedPanelDeltas, fractionFactors, percentPerPx);\r\n }\r\n\r\n // --- Private: post-drag finalization ---\r\n\r\n /**\r\n * Post-drag finalization. Behaviour depends on {@link lockSizes} and the distribution mode.\r\n *\r\n * When `lockSizes` is `false`:\r\n * - `adjacent` / `push` — no-op; items keep their original units.\r\n * - `proportional` — the resized column is converted back to `fr` so it stays dynamic.\r\n *\r\n * When `lockSizes` is `true`:\r\n * - `adjacent` / `push` — items whose size changed are converted to absolute `px`.\r\n * - `proportional` — no-op; the resized column is already `px` from the drag.\r\n */\r\n private finalizeResize(ctx: ResizeDragContext): void {\r\n const lock = this.lockSizes();\r\n\r\n if (this.distributionMode() === 'proportional') {\r\n if (!lock) this.unlockProportionalColumn(ctx);\r\n return;\r\n }\r\n\r\n // Adjacent / push: lock affected items to px when enabled\r\n if (!lock) return;\r\n\r\n const containerSize = this.containerSize();\r\n const fractionFactors = this.getCurrentFractionFactors();\r\n\r\n for (const ci of ctx.items) {\r\n const currentSize = expandResizeSize(ci.item.size());\r\n const sizeChanged =\r\n currentSize.value !== ci.startSize.value || currentSize.unit !== ci.startSize.unit;\r\n if (sizeChanged) {\r\n const pxValue = resolveSizeToPx(currentSize, fractionFactors.pxPerFr, containerSize);\r\n this.setItemSize(ci.item, `${Math.max(0, pxValue)}px`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Converts the resized column back to `fr` after a proportional drag so it\r\n * continues to flex with the container. Computes a new `fr` value that would\r\n * resolve to the same pixel width given the current container and other `fr` columns.\r\n */\r\n private unlockProportionalColumn(ctx: ResizeDragContext): void {\r\n const items = ctx.items;\r\n const containerSize = this.containerSize();\r\n const resizedItem = items[ctx.dividerIndex]!;\r\n const resizedPx = expandResizeSize(resizedItem.item.size()).value;\r\n\r\n // Sum up all other fr values (from pre-bake, since they weren't changed)\r\n let otherFrTotal = 0;\r\n let otherPxTotal = 0;\r\n for (let i = 0; i < items.length; i++) {\r\n if (i === ctx.dividerIndex) continue;\r\n const preBake = expandResizeSize(ctx.preBakeSizes[i]!);\r\n if (preBake.unit === 'fr') {\r\n otherFrTotal += preBake.value;\r\n } else if (preBake.unit === 'px') {\r\n otherPxTotal += preBake.value;\r\n }\r\n }\r\n\r\n const availableForFr = containerSize - this.totalGapSize() - otherPxTotal;\r\n\r\n if (otherFrTotal > 0 && availableForFr > resizedPx) {\r\n // Solve: newFr / otherFrTotal = resizedPx / (availableForFr - resizedPx)\r\n const newFr = (resizedPx * otherFrTotal) / (availableForFr - resizedPx);\r\n this.setItemSize(resizedItem.item, `${Math.max(0, +newFr.toFixed(4))}fr`);\r\n }\r\n // If we can't compute a valid fr (edge case), leave as px\r\n }\r\n\r\n // --- Private: helpers ---\r\n\r\n private createContextItem(item: ResizableItem): ResizeDragContextItem {\r\n return {\r\n item,\r\n startSize: expandResizeSize(item.size()),\r\n minSize: expandResizeLimit(item.minSize()),\r\n maxSize: expandResizeLimit(item.maxSize()),\r\n };\r\n }\r\n\r\n private getCurrentFractionFactors(): ResizeFractionFactors {\r\n const totals = this.totalItemSizes();\r\n const cs = this.containerSize();\r\n const percentPx = (totals['%'] / 100) * cs;\r\n const frArea = cs - this.totalGapSize() - totals.px - percentPx || 1;\r\n const totalFr = totals.fr || 1;\r\n return {\r\n frPerPx: totalFr / frArea,\r\n pxPerFr: frArea / totalFr,\r\n };\r\n }\r\n\r\n private getCurrentPercentPerPx(): number {\r\n return 100 / (this.containerSize() || 1);\r\n }\r\n\r\n /**\r\n * Bakes all non-px items to absolute px values. Used by push mode on first drag movement.\r\n * Prefers DOM-measured sizes (via {@link resolveItemSizes}) over JS-computed conversions\r\n * to avoid sub-pixel mismatches with CSS Grid's internal track sizing.\r\n */\r\n private bakeAllItemsToPx(): void {\r\n const items = this.items();\r\n const measured = this.resolveItemSizes?.();\r\n\r\n if (measured && measured.length === items.length) {\r\n for (let i = 0; i < items.length; i++) {\r\n this.setItemSize(items[i]!, `${measured[i]!}px`);\r\n }\r\n } else {\r\n const frFactors = this.getCurrentFractionFactors();\r\n const containerSize = this.containerSize();\r\n for (const item of items) {\r\n const size = expandResizeSize(item.size());\r\n if (size.unit !== 'px') {\r\n this.setItemSize(item, `${resolveSizeToPx(size, frFactors.pxPerFr, containerSize)}px`);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Writes computed px deltas back to items, converting to each item's original unit.\r\n */\r\n private commitItemDeltas(\r\n items: ResizeDragContextItem[],\r\n appliedPanelDeltas: number[],\r\n fractionFactors: ResizeFractionFactors,\r\n percentPerPx: number\r\n ): void {\r\n items.forEach((ci, i) => {\r\n const pxDelta = appliedPanelDeltas[i] || 0;\r\n const unitDelta = pxDeltaToUnitDelta(\r\n pxDelta,\r\n ci.startSize.unit,\r\n fractionFactors.frPerPx,\r\n percentPerPx\r\n );\r\n const newValue = ci.startSize.value + unitDelta;\r\n this.setItemSize(ci.item, `${Math.max(0, newValue)}${ci.startSize.unit}`);\r\n });\r\n }\r\n\r\n /**\r\n * Builds a CSS `calc()` expression summing all items' min or max limits.\r\n * Items already in `px` contribute their current size; `fr`/`%` items contribute\r\n * their `minSize`/`maxSize` limit. Used by {@link minTotalSize} and {@link maxTotalSize}.\r\n */\r\n private computeLimitTotalSize(limitProp: 'minSize' | 'maxSize'): string {\r\n const { px, '%': pc } = this.items().reduce(\r\n (acc, item) => {\r\n const { unit, value } = expandResizeSize(item.size());\r\n if (unit === 'px') {\r\n acc.px += value;\r\n } else {\r\n const limitStr = item[limitProp]();\r\n acc[getResizeLimitUnit(limitStr)] += getResizeLimitValue(limitStr);\r\n }\r\n return acc;\r\n },\r\n { px: 0, '%': 0 }\r\n );\r\n return `calc(${px + this.totalGapSize()}px + ${pc}%)`;\r\n }\r\n}\r\n\r\n// --- Module-level helpers ---\r\n\r\n/** Clamps a value between min and max. */\r\nfunction clamp(value: number, min: number, max: number): number {\r\n return Math.max(min, Math.min(max, value));\r\n}\r\n\r\n/** Resolves an expanded limit to px. */\r\nfunction limitToPx(limit: ExpandedResizeLimit, containerSize: number): number {\r\n return limit.unit === 'px' ? limit.value : (limit.value / 100) * containerSize;\r\n}\r\n\r\n/**\r\n * Resolves a min limit to px, enforcing the given absolute floor.\r\n * Even if a relative limit (e.g. `5%`) resolves to less than the floor, the floor wins.\r\n */\r\nfunction minLimitToPx(limit: ExpandedResizeLimit, containerSize: number, floorPx: number): number {\r\n return Math.max(floorPx, limitToPx(limit, containerSize));\r\n}\r\n\r\n/** Clamps a px value to the item's min/max limits (with floor on min). */\r\nfunction clampToLimits(\r\n px: number,\r\n ci: ResizeDragContextItem,\r\n containerSize: number,\r\n floorPx: number\r\n): number {\r\n return clamp(\r\n px,\r\n minLimitToPx(ci.minSize, containerSize, floorPx),\r\n limitToPx(ci.maxSize, containerSize)\r\n );\r\n}\r\n\r\n/**\r\n * Returns the relevant limit (min or max) in px for the direction of a delta.\r\n * Negative delta → min limit (with floor), positive delta → max limit.\r\n */\r\nfunction getLimitPxForDelta(\r\n ci: ResizeDragContextItem,\r\n pxDelta: number,\r\n containerSize: number,\r\n floorPx: number\r\n): number {\r\n return pxDelta < 0\r\n ? minLimitToPx(ci.minSize, containerSize, floorPx)\r\n : limitToPx(ci.maxSize, containerSize);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AASA;AAEM,SAAU,YAAY,CAAC,KAAc,EAAA;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;IAC3C,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACxC,IAAA,IAAI,CAAC,CAAC,IAAI,CAAC,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,aAAa,CACpB,EAAU,EACV,EAAyB,EACzB,aAAqB,EACrB,OAAe,EAAA;IAEf,OAAO,KAAK,CACV,EAAE,EACF,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAChD,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CACrC;AACH;AAEA;;;AAGG;AACH,SAAS,kBAAkB,CACzB,EAAyB,EACzB,OAAe,EACf,aAAqB,EACrB,OAAe,EAAA;IAEf,OAAO,OAAO,GAAG;UACb,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO;UAC/C,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC;AAC1C;;ACpwBA;;AAEG;;;;"}
|
|
@@ -12,33 +12,33 @@ class NgnAvatar extends NgnBase {
|
|
|
12
12
|
* The initials to display when no image is available.
|
|
13
13
|
* Max 4 characters.
|
|
14
14
|
*/
|
|
15
|
-
initials = input(...(ngDevMode ? [undefined, { debugName: "initials" }] : []));
|
|
15
|
+
initials = input(...(ngDevMode ? [undefined, { debugName: "initials" }] : /* istanbul ignore next */ []));
|
|
16
16
|
/**
|
|
17
17
|
* The background color of the avatar, if the initials are used.
|
|
18
18
|
*/
|
|
19
|
-
bgColor = input(...(ngDevMode ? [undefined, { debugName: "bgColor" }] : []));
|
|
19
|
+
bgColor = input(...(ngDevMode ? [undefined, { debugName: "bgColor" }] : /* istanbul ignore next */ []));
|
|
20
20
|
/**
|
|
21
21
|
* The image URL to display in the avatar.
|
|
22
22
|
*/
|
|
23
|
-
image = input(...(ngDevMode ? [undefined, { debugName: "image" }] : []));
|
|
23
|
+
image = input(...(ngDevMode ? [undefined, { debugName: "image" }] : /* istanbul ignore next */ []));
|
|
24
24
|
/**
|
|
25
25
|
* The alt text for the image.
|
|
26
26
|
*/
|
|
27
|
-
alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : []));
|
|
27
|
+
alt = input(...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
28
28
|
/**
|
|
29
29
|
* The size of the avatar in pixels.
|
|
30
30
|
* @default 48
|
|
31
31
|
*/
|
|
32
|
-
size = input(48, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
33
|
-
imageLoadFailed = linkedSignal(() => !!this.image() && false, ...(ngDevMode ? [{ debugName: "imageLoadFailed" }] : []));
|
|
34
|
-
initialsLimited = computed(() => this.initials()?.slice(0, 4), ...(ngDevMode ? [{ debugName: "initialsLimited" }] : []));
|
|
32
|
+
size = input(48, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
33
|
+
imageLoadFailed = linkedSignal(() => !!this.image() && false, ...(ngDevMode ? [{ debugName: "imageLoadFailed" }] : /* istanbul ignore next */ []));
|
|
34
|
+
initialsLimited = computed(() => this.initials()?.slice(0, 4), ...(ngDevMode ? [{ debugName: "initialsLimited" }] : /* istanbul ignore next */ []));
|
|
35
35
|
constructor() {
|
|
36
36
|
super();
|
|
37
37
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.2", type: NgnAvatar, isStandalone: true, selector: "ngn-avatar", inputs: { initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--size.px": "size()", "style.--color": "bgColor()" } }, providers: [provideSelf(NgnAvatar)], usesInheritance: true, ngImport: i0, template: "<ng-content>\r\n @if (!image() || imageLoadFailed()) {\r\n <span\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'initials'\"\r\n [style.--letterCount]=\"initialsLimited()?.length || 1\"\r\n >\r\n {{ initialsLimited() }}\r\n </span>\r\n } @else {\r\n <img\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'image'\"\r\n [src]=\"image()\"\r\n [alt]=\"alt() ?? ''\"\r\n (error)=\"imageLoadFailed.set(true)\"\r\n />\r\n }\r\n</ng-content>\r\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnAvatar, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
43
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ngn-avatar', imports: [NgnPt], host: {
|
|
44
44
|
'[style.--size.px]': 'size()',
|
|
@@ -54,10 +54,10 @@ class NgnAvatarGroup extends NgnBase {
|
|
|
54
54
|
constructor() {
|
|
55
55
|
super();
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
58
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnAvatarGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: NgnAvatarGroup, isStandalone: true, selector: "ngn-avatar-group", providers: [provideSelf(NgnAvatarGroup)], usesInheritance: true, ngImport: i0, template: "<div [ptInt]=\"this\" [ptClass]=\"'root'\">\r\n <ng-content></ng-content>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnAvatarGroup, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
62
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ngn-avatar-group', imports: [NgnPt], providers: [provideSelf(NgnAvatarGroup)], template: "<div [ptInt]=\"this\" [ptClass]=\"'root'\">\r\n <ng-content></ng-content>\r\n</div>\r\n" }]
|
|
63
63
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngneers-controls-avatar.mjs","sources":["../../src/avatar/avatar.ts","../../src/avatar/avatar.html","../../src/avatar/avatar-group.ts","../../src/avatar/avatar-group.html","../../src/avatar/ngneers-controls-avatar.ts"],"sourcesContent":["import { Component, computed, input, linkedSignal, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\r\nimport { avatarControlTemplate } from '@ngneers/controls-themes/templates/avatar';\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-avatar',\r\n templateUrl: './avatar.html',\r\n imports: [NgnPt],\r\n host: {\r\n '[style.--size.px]': 'size()',\r\n '[style.--color]': 'bgColor()',\r\n },\r\n providers: [provideSelf(NgnAvatar)],\r\n})\r\nexport class NgnAvatar extends NgnBase<'avatar'> {\r\n protected readonly theme = this.injectThemeTemplate(avatarControlTemplate, 'root');\r\n\r\n /**\r\n * The initials to display when no image is available.\r\n * Max 4 characters.\r\n */\r\n public readonly initials = input<string>();\r\n /**\r\n * The background color of the avatar, if the initials are used.\r\n */\r\n public readonly bgColor = input<string>();\r\n /**\r\n * The image URL to display in the avatar.\r\n */\r\n public readonly image = input<string>();\r\n /**\r\n * The alt text for the image.\r\n */\r\n public readonly alt = input<string>();\r\n /**\r\n * The size of the avatar in pixels.\r\n * @default 48\r\n */\r\n public readonly size = input<number>(48);\r\n\r\n protected readonly imageLoadFailed = linkedSignal<boolean>(() => !!this.image() && false);\r\n protected readonly initialsLimited = computed(() => this.initials()?.slice(0, 4));\r\n\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","<ng-content>\r\n @if (!image() || imageLoadFailed()) {\r\n <span\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'initials'\"\r\n [style.--letterCount]=\"initialsLimited()?.length || 1\"\r\n >\r\n {{ initialsLimited() }}\r\n </span>\r\n } @else {\r\n <img\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'image'\"\r\n [src]=\"image()\"\r\n [alt]=\"alt() ?? ''\"\r\n (error)=\"imageLoadFailed.set(true)\"\r\n />\r\n }\r\n</ng-content>\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\r\nimport { avatarGroupControlTemplate } from '@ngneers/controls-themes/templates/avatar';\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-avatar-group',\r\n templateUrl: './avatar-group.html',\r\n imports: [NgnPt],\r\n providers: [provideSelf(NgnAvatarGroup)],\r\n})\r\nexport class NgnAvatarGroup extends NgnBase<'avatarGroup'> {\r\n protected readonly theme = this.injectThemeTemplate(avatarGroupControlTemplate);\r\n\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","<div [ptInt]=\"this\" [ptClass]=\"'root'\">\r\n <ng-content></ng-content>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;AAEG;AAYG,MAAO,SAAU,SAAQ,OAAiB,CAAA;IAC3B,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,CAAC;AAElF;;;AAGG;IACa,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ngneers-controls-avatar.mjs","sources":["../../src/avatar/avatar.ts","../../src/avatar/avatar.html","../../src/avatar/avatar-group.ts","../../src/avatar/avatar-group.html","../../src/avatar/ngneers-controls-avatar.ts"],"sourcesContent":["import { Component, computed, input, linkedSignal, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\r\nimport { avatarControlTemplate } from '@ngneers/controls-themes/templates/avatar';\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-avatar',\r\n templateUrl: './avatar.html',\r\n imports: [NgnPt],\r\n host: {\r\n '[style.--size.px]': 'size()',\r\n '[style.--color]': 'bgColor()',\r\n },\r\n providers: [provideSelf(NgnAvatar)],\r\n})\r\nexport class NgnAvatar extends NgnBase<'avatar'> {\r\n protected readonly theme = this.injectThemeTemplate(avatarControlTemplate, 'root');\r\n\r\n /**\r\n * The initials to display when no image is available.\r\n * Max 4 characters.\r\n */\r\n public readonly initials = input<string>();\r\n /**\r\n * The background color of the avatar, if the initials are used.\r\n */\r\n public readonly bgColor = input<string>();\r\n /**\r\n * The image URL to display in the avatar.\r\n */\r\n public readonly image = input<string>();\r\n /**\r\n * The alt text for the image.\r\n */\r\n public readonly alt = input<string>();\r\n /**\r\n * The size of the avatar in pixels.\r\n * @default 48\r\n */\r\n public readonly size = input<number>(48);\r\n\r\n protected readonly imageLoadFailed = linkedSignal<boolean>(() => !!this.image() && false);\r\n protected readonly initialsLimited = computed(() => this.initials()?.slice(0, 4));\r\n\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","<ng-content>\r\n @if (!image() || imageLoadFailed()) {\r\n <span\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'initials'\"\r\n [style.--letterCount]=\"initialsLimited()?.length || 1\"\r\n >\r\n {{ initialsLimited() }}\r\n </span>\r\n } @else {\r\n <img\r\n [ptInt]=\"this\"\r\n [ptClass]=\"'image'\"\r\n [src]=\"image()\"\r\n [alt]=\"alt() ?? ''\"\r\n (error)=\"imageLoadFailed.set(true)\"\r\n />\r\n }\r\n</ng-content>\r\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\r\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\r\nimport { avatarGroupControlTemplate } from '@ngneers/controls-themes/templates/avatar';\r\n\r\n/**\r\n * @category control\r\n */\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n selector: 'ngn-avatar-group',\r\n templateUrl: './avatar-group.html',\r\n imports: [NgnPt],\r\n providers: [provideSelf(NgnAvatarGroup)],\r\n})\r\nexport class NgnAvatarGroup extends NgnBase<'avatarGroup'> {\r\n protected readonly theme = this.injectThemeTemplate(avatarGroupControlTemplate);\r\n\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","<div [ptInt]=\"this\" [ptClass]=\"'root'\">\r\n <ng-content></ng-content>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;AAEG;AAYG,MAAO,SAAU,SAAQ,OAAiB,CAAA;IAC3B,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,CAAC;AAElF;;;AAGG;IACa,QAAQ,G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ul ignore next */ []));
|
|
20
20
|
_appliedPts = computed(() => {
|
|
21
21
|
const pt = this.pt()?.pt();
|
|
22
22
|
if (!pt) {
|
|
@@ -27,13 +27,13 @@ class NgnPtEngine {
|
|
|
27
27
|
const classPt = getPropertyIfExists(pt, ptClass);
|
|
28
28
|
return classPt;
|
|
29
29
|
});
|
|
30
|
-
}, ...(ngDevMode ? [{ debugName: "_appliedPts" }] : []));
|
|
30
|
+
}, ...(ngDevMode ? [{ debugName: "_appliedPts" }] : /* istanbul ignore next */ []));
|
|
31
31
|
constructor(pt, ptClass) {
|
|
32
32
|
const sigPt = typeof pt === 'function' ? pt : signal(pt);
|
|
33
33
|
const sigPtClass = typeof ptClass === 'function' ? ptClass : signal(ptClass);
|
|
34
34
|
this.pt = sigPt;
|
|
35
35
|
this.ptClass = sigPtClass;
|
|
36
|
-
const classes = computed(() => this.classes().map(c => c.class), ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
36
|
+
const classes = computed(() => this.classes().map(c => c.class), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
37
37
|
classSignal(this._elementRef.nativeElement, classes);
|
|
38
38
|
effectWithPrevious(this._appliedPts, (current, previous) => {
|
|
39
39
|
if (previous) {
|
|
@@ -112,13 +112,13 @@ class NgnPtEngine {
|
|
|
112
112
|
|
|
113
113
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
114
114
|
class NgnPt {
|
|
115
|
-
ptInt = input.required(...(ngDevMode ? [{ debugName: "ptInt" }] : []));
|
|
116
|
-
ptClass = input.required(...(ngDevMode ? [{ debugName: "ptClass" }] : []));
|
|
115
|
+
ptInt = input.required(...(ngDevMode ? [{ debugName: "ptInt" }] : /* istanbul ignore next */ []));
|
|
116
|
+
ptClass = input.required(...(ngDevMode ? [{ debugName: "ptClass" }] : /* istanbul ignore next */ []));
|
|
117
117
|
_engine = new NgnPtEngine(this.ptInt, this.ptClass);
|
|
118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
119
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnPt, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.2", type: NgnPt, isStandalone: true, selector: "[ptInt]", inputs: { ptInt: { classPropertyName: "ptInt", publicName: "ptInt", isSignal: true, isRequired: true, transformFunction: null }, ptClass: { classPropertyName: "ptClass", publicName: "ptClass", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnPt, decorators: [{
|
|
122
122
|
type: Directive,
|
|
123
123
|
args: [{ selector: '[ptInt]' }]
|
|
124
124
|
}], propDecorators: { ptInt: [{ type: i0.Input, args: [{ isSignal: true, alias: "ptInt", required: true }] }], ptClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "ptClass", required: true }] }] } });
|
|
@@ -148,7 +148,7 @@ function getNearestNgnInstance(element, kind) {
|
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
150
|
function getNearestNgnInstanceSig(element, kind) {
|
|
151
|
-
const sig = signal(null, ...(ngDevMode ? [{ debugName: "sig" }] : []));
|
|
151
|
+
const sig = signal(null, ...(ngDevMode ? [{ debugName: "sig" }] : /* istanbul ignore next */ []));
|
|
152
152
|
afterNextRender(() => {
|
|
153
153
|
sig.set(getNearestNgnInstance(element, kind));
|
|
154
154
|
});
|
|
@@ -167,8 +167,8 @@ function provideSelf(control) {
|
|
|
167
167
|
return { provide: NGN_CONTROL, useExisting: forwardRef(() => control) };
|
|
168
168
|
}
|
|
169
169
|
class NgnBase {
|
|
170
|
-
_defaultKind = signal(undefined, ...(ngDevMode ? [{ debugName: "_defaultKind" }] : []));
|
|
171
|
-
_defaultColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_defaultColor" }] : []));
|
|
170
|
+
_defaultKind = signal(undefined, ...(ngDevMode ? [{ debugName: "_defaultKind" }] : /* istanbul ignore next */ []));
|
|
171
|
+
_defaultColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_defaultColor" }] : /* istanbul ignore next */ []));
|
|
172
172
|
/**
|
|
173
173
|
* The element reference for the host element.
|
|
174
174
|
*/
|
|
@@ -182,23 +182,23 @@ class NgnBase {
|
|
|
182
182
|
* The base styles of the control will still be applied.
|
|
183
183
|
* @default false
|
|
184
184
|
*/
|
|
185
|
-
unstyled = input(false, { ...(ngDevMode ? { debugName: "unstyled" } : {}), transform: booleanAttribute });
|
|
185
|
+
unstyled = input(false, { ...(ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
186
186
|
/**
|
|
187
187
|
* Some controls support custom kinds for styling purposes.
|
|
188
188
|
* The available kinds depend on the control and the theme used.
|
|
189
189
|
*
|
|
190
190
|
* TODO: link to custom types documentation
|
|
191
191
|
*/
|
|
192
|
-
kind = input(undefined, ...(ngDevMode ? [{ debugName: "kind" }] : []));
|
|
193
|
-
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
194
|
-
appliedKind = computed(() => this.kind() ?? this._defaultKind(), ...(ngDevMode ? [{ debugName: "appliedKind" }] : []));
|
|
195
|
-
appliedColor = computed(() => this.color() ?? this._defaultColor(), ...(ngDevMode ? [{ debugName: "appliedColor" }] : []));
|
|
192
|
+
kind = input(undefined, ...(ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []));
|
|
193
|
+
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
194
|
+
appliedKind = computed(() => this.kind() ?? this._defaultKind(), ...(ngDevMode ? [{ debugName: "appliedKind" }] : /* istanbul ignore next */ []));
|
|
195
|
+
appliedColor = computed(() => this.color() ?? this._defaultColor(), ...(ngDevMode ? [{ debugName: "appliedColor" }] : /* istanbul ignore next */ []));
|
|
196
196
|
/**
|
|
197
197
|
* Custom passthrough attributes to apply to the control's theme classes and its dependencies.
|
|
198
198
|
* This allows for fine-grained customization of attributes, styles and more.
|
|
199
199
|
*/
|
|
200
|
-
pt = input(...(ngDevMode ? [undefined, { debugName: "pt" }] : []));
|
|
201
|
-
_childNgnControls = viewChildren(NGN_CONTROL, ...(ngDevMode ? [{ debugName: "_childNgnControls" }] : []));
|
|
200
|
+
pt = input(...(ngDevMode ? [undefined, { debugName: "pt" }] : /* istanbul ignore next */ []));
|
|
201
|
+
_childNgnControls = viewChildren(NGN_CONTROL, ...(ngDevMode ? [{ debugName: "_childNgnControls" }] : /* istanbul ignore next */ []));
|
|
202
202
|
_afterLeaveCbs = [];
|
|
203
203
|
constructor() {
|
|
204
204
|
setNgnInstance(this.element.nativeElement, this);
|
|
@@ -226,40 +226,65 @@ class NgnBase {
|
|
|
226
226
|
this.afterLeaveInternal();
|
|
227
227
|
}
|
|
228
228
|
else {
|
|
229
|
-
|
|
230
|
-
* Recursively searches for a leave animation on the element and its parents.
|
|
231
|
-
* @param element The element to search for leave animations.
|
|
232
|
-
* @returns The leave animation if found, otherwise null.
|
|
233
|
-
*/
|
|
234
|
-
function findLeaveAnimationRecursive(element) {
|
|
235
|
-
const animations = element.getAnimations();
|
|
236
|
-
const leaveAnimation = animations.find(a => a instanceof CSSAnimation && a.animationName.endsWith('-leave'));
|
|
237
|
-
if (leaveAnimation) {
|
|
238
|
-
return leaveAnimation;
|
|
239
|
-
}
|
|
240
|
-
if (element.parentElement) {
|
|
241
|
-
return findLeaveAnimationRecursive(element.parentElement);
|
|
242
|
-
}
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
requestAnimationFrame(() => {
|
|
246
|
-
const leaveAnimation = findLeaveAnimationRecursive(this.element.nativeElement);
|
|
247
|
-
if (!leaveAnimation) {
|
|
248
|
-
this.afterLeaveInternal();
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
leaveAnimation.finished
|
|
252
|
-
.catch(() => {
|
|
253
|
-
// ignore errors from animations being cancelled
|
|
254
|
-
})
|
|
255
|
-
.finally(() => {
|
|
256
|
-
this.afterLeaveInternal();
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
});
|
|
229
|
+
NgnBase._enqueueLeaveCheck(this.element.nativeElement, () => this.afterLeaveInternal());
|
|
260
230
|
}
|
|
261
231
|
});
|
|
262
232
|
}
|
|
233
|
+
// --- Batched leave animation checking ---
|
|
234
|
+
// Collects all destroyed components in the same frame into one queue,
|
|
235
|
+
// then processes them in a single rAF to avoid layout thrashing from
|
|
236
|
+
// interleaved getAnimations() calls and DOM mutations.
|
|
237
|
+
static _leaveQueue = [];
|
|
238
|
+
static _leaveRafScheduled = false;
|
|
239
|
+
static _enqueueLeaveCheck(element, callback) {
|
|
240
|
+
NgnBase._leaveQueue.push({ element, callback });
|
|
241
|
+
if (!NgnBase._leaveRafScheduled) {
|
|
242
|
+
NgnBase._leaveRafScheduled = true;
|
|
243
|
+
requestAnimationFrame(() => NgnBase._processLeaveQueue());
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
static _processLeaveQueue() {
|
|
247
|
+
const queue = NgnBase._leaveQueue;
|
|
248
|
+
NgnBase._leaveQueue = [];
|
|
249
|
+
NgnBase._leaveRafScheduled = false;
|
|
250
|
+
// Phase 1: Read all animations (batched queries — no interleaved mutations)
|
|
251
|
+
const results = [];
|
|
252
|
+
for (const { element, callback } of queue) {
|
|
253
|
+
results.push({
|
|
254
|
+
animation: NgnBase._findLeaveAnimation(element),
|
|
255
|
+
callback,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
// Phase 2: Process results (no more style queries needed)
|
|
259
|
+
for (const { animation, callback } of results) {
|
|
260
|
+
if (!animation) {
|
|
261
|
+
callback();
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
animation.finished
|
|
265
|
+
.catch(() => {
|
|
266
|
+
// ignore errors from animations being cancelled
|
|
267
|
+
})
|
|
268
|
+
.finally(() => {
|
|
269
|
+
callback();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Recursively searches for a leave animation on the element and its parents.
|
|
276
|
+
*/
|
|
277
|
+
static _findLeaveAnimation(element) {
|
|
278
|
+
const animations = element.getAnimations();
|
|
279
|
+
const leaveAnimation = animations.find(a => a instanceof CSSAnimation && a.animationName.endsWith('-leave'));
|
|
280
|
+
if (leaveAnimation) {
|
|
281
|
+
return leaveAnimation;
|
|
282
|
+
}
|
|
283
|
+
if (element.parentElement) {
|
|
284
|
+
return NgnBase._findLeaveAnimation(element.parentElement);
|
|
285
|
+
}
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
263
288
|
afterLeaveInternal() {
|
|
264
289
|
/**
|
|
265
290
|
* After the control is hidden/removed from the DOM,
|
|
@@ -341,10 +366,10 @@ class NgnBase {
|
|
|
341
366
|
togglePrefixedThemeClass(prefix, signal(), false);
|
|
342
367
|
});
|
|
343
368
|
}
|
|
344
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
345
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
370
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.2", type: NgnBase, isStandalone: true, inputs: { unstyled: { classPropertyName: "unstyled", publicName: "unstyled", isSignal: true, isRequired: false, transformFunction: null }, kind: { classPropertyName: "kind", publicName: "kind", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, pt: { classPropertyName: "pt", publicName: "pt", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ngn-control ngn-control-initializing" }, viewQueries: [{ propertyName: "_childNgnControls", predicate: NGN_CONTROL, descendants: true, isSignal: true }], ngImport: i0 });
|
|
346
371
|
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: NgnBase, decorators: [{
|
|
348
373
|
type: Directive,
|
|
349
374
|
args: [{
|
|
350
375
|
host: { class: 'ngn-control ngn-control-initializing' },
|
|
@@ -355,37 +380,37 @@ class ValueControlBase extends NgnBase {
|
|
|
355
380
|
/**
|
|
356
381
|
* The label for the control.
|
|
357
382
|
*/
|
|
358
|
-
label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
383
|
+
label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
359
384
|
/**
|
|
360
385
|
* Sets the `aria-labelledby` attribute on the control.
|
|
361
386
|
* @default null
|
|
362
387
|
*/
|
|
363
|
-
labelledBy = input(null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : []));
|
|
388
|
+
labelledBy = input(null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
364
389
|
/**
|
|
365
390
|
* The ID for the control
|
|
366
391
|
* @default generateElementId()
|
|
367
392
|
*/
|
|
368
|
-
inputId = input(generateElementId(), ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
393
|
+
inputId = input(generateElementId(), ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
369
394
|
/**
|
|
370
395
|
* Explicitly apply invalid state styling
|
|
371
396
|
* @default false
|
|
372
397
|
*/
|
|
373
|
-
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : {}), transform: booleanAttribute });
|
|
398
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
374
399
|
/**
|
|
375
400
|
* The value of the control.
|
|
376
401
|
*/
|
|
377
|
-
value = model(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
402
|
+
value = model(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
378
403
|
/**
|
|
379
404
|
* Set the disabled state of the control.
|
|
380
405
|
*/
|
|
381
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
382
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
383
|
-
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
384
|
-
dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : {}), transform: booleanAttribute });
|
|
385
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
386
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
406
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
407
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
408
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
409
|
+
dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ValueControlBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
411
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.2", type: ValueControlBase, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelledBy: { classPropertyName: "labelledBy", publicName: "labelledBy", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, usesInheritance: true, ngImport: i0 });
|
|
387
412
|
}
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: ValueControlBase, decorators: [{
|
|
389
414
|
type: Directive
|
|
390
415
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelledBy", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }] } });
|
|
391
416
|
|