@spartan-ng/brain 1.0.4 → 1.1.0-alpha.1
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/date-picker/README.md +3 -0
- package/fesm2022/spartan-ng-brain-accordion.mjs +2 -2
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-calendar.mjs +465 -3
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +8 -3
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-date-picker.mjs +166 -0
- package/fesm2022/spartan-ng-brain-date-picker.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-radio-group.mjs +9 -4
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-resizable.mjs +18 -4
- package/fesm2022/spartan-ng-brain-resizable.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +8 -3
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/package.json +5 -1
- package/types/spartan-ng-brain-calendar.d.ts +204 -2
- package/types/spartan-ng-brain-checkbox.d.ts +6 -1
- package/types/spartan-ng-brain-date-picker.d.ts +100 -0
- package/types/spartan-ng-brain-radio-group.d.ts +6 -1
- package/types/spartan-ng-brain-resizable.d.ts +2 -1
- package/types/spartan-ng-brain-switch.d.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-resizable.mjs","sources":["../../../../libs/brain/resizable/src/lib/brn-resizable-panel.ts","../../../../libs/brain/resizable/src/lib/brn-resizable-group.ts","../../../../libs/brain/resizable/src/lib/brn-resizable-handle.ts","../../../../libs/brain/resizable/src/spartan-ng-brain-resizable.ts"],"sourcesContent":["import { BooleanInput, type NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tinject,\n\tinput,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { BrnResizableGroup } from './brn-resizable-group';\n\nlet nextId = 0;\n\n@Directive({\n\tselector: 'brn-resizable-panel, [brnResizablePanel]',\n\texportAs: 'brnResizablePanel',\n\thost: {\n\t\t'[attr.data-panel-group-id]': '_panelGroup.id()',\n\t\t'[attr.data-panel-id]': 'id()',\n\t\t'[attr.data-panel-size]': '_panelSize()',\n\t\t'[id]': 'id()',\n\t\t'[style.flex]': '_flex()',\n\t\t'[style.overflow]': '\"hidden\"',\n\t\t'data-panel': '',\n\t\t'data-slot': 'resizable-panel',\n\t},\n})\nexport class BrnResizablePanel {\n\t/** Unique ID for the panel. */\n\tpublic readonly id = input<string>(`brn-resizable-panel-${++nextId}`);\n\n\t/** Reference to the parent {@link BrnResizableGroup}. */\n\tprotected readonly _panelGroup = inject(BrnResizableGroup);\n\n\t/** Host DOM element reference. */\n\tpublic readonly el = inject(ElementRef<HTMLElement>);\n\n\t/**\n\t * The default size of the panel (percentage of container space).\n\t * - `undefined` → group decides initial size.\n\t * - Number → interpreted as percentage (0–100).\n\t */\n\tpublic readonly defaultSize = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n\t/** The minimum size this panel can shrink to (percentage). */\n\n\tpublic readonly minSize = input<number, NumberInput>(0, { transform: numberAttribute });\n\n\t/**\t The maximum size this panel can grow to (percentage). */\n\tpublic readonly maxSize = input<number, NumberInput>(100, { transform: numberAttribute });\n\n\t/** Whether this panel can be collapsed entirely. */\n\tpublic readonly collapsible = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n\t/** Reactive signal holding the current size of the panel. */\n\tprotected readonly _panelSize = signal<number | undefined>(undefined);\n\n\t/**\n\t * CSS flex style for this panel, derived from its current size.\n\t * Format: `\"flex-grow flex-shrink flex-basis\"`.\n\t *\n\t * Before the group synchronizes the layout, falls back to {@link defaultSize} so the panel\n\t * paints at its intended size on the very first render instead of briefly flexing to an equal\n\t * share (e.g. 50/50) and then snapping to the configured size. Example: `\"25 1 0\"` means\n\t * 25% width (or height in vertical layout).\n\t */\n\tprotected readonly _flex = computed(() => {\n\t\tconst size = this._panelSize() ?? this.defaultSize() ?? 100;\n\t\treturn `${size} 1 0`;\n\t});\n\t/**\n\t * Sets the size of the panel.\n\t * @param size New size (percentage of container space).\n\t */\n\tpublic setSize(size: number) {\n\t\tthis._panelSize.set(size);\n\t}\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport {\n\tafterRenderEffect,\n\tcontentChildren,\n\tDestroyRef,\n\tDirective,\n\tDOCUMENT,\n\tElementRef,\n\tinject,\n\tinput,\n\tmodel,\n\tNgZone,\n\toutput,\n\tuntracked,\n} from '@angular/core';\nimport { BrnResizablePanel } from './brn-resizable-panel';\n\nlet nextId = 0;\n\n@Directive({\n\tselector: 'brn-resizable-group, [brnResizableGroup]',\n\texportAs: 'brnResizableGroup',\n\thost: {\n\t\t'[attr.data-panel-group-direction]': 'direction()',\n\t\t'[attr.data-panel-group-id]': 'id()',\n\t\t'[id]': 'id()',\n\t\t'data-panel-group': '',\n\t\t'data-slot': 'resizable-panel-group',\n\t},\n})\nexport class BrnResizableGroup {\n\t/** The id of the BrnResizableGroup */\n\tpublic readonly id = input<string>(`brn-resizable-group-${++nextId}`);\n\n\t/** Host element reference. */\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\t/** Layout direction, used to mirror horizontal resizing under RTL. */\n\tprivate readonly _dir = inject(Directionality);\n\n\t/** Group orientation */\n\tpublic readonly direction = input<'horizontal' | 'vertical'>('horizontal');\n\n\t/** @internal Access all the panels within the group */\n\tpublic readonly panels = contentChildren(BrnResizablePanel);\n\n\t/** event when resize starts */\n\tpublic readonly dragStart = output<void>();\n\n\t/** event when resize ends */\n\tpublic readonly dragEnd = output<void>();\n\n\t/** Resize panel group to the specified layout ([1 - 100, ...]). */\n\tpublic readonly layout = model<number[]>([]);\n\n\t/** Called when group layout changes */\n\tpublic readonly layoutChanged = output<number[]>();\n\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprivate readonly _zone = inject(NgZone);\n\n\tprivate _resizeRaf: number | null = null;\n\n\tprivate _pendingSizes: number[] | null = null;\n\n\t/** Tears down the in-flight drag (document listeners, queued frame, cursor); null when idle. */\n\tprivate _stopResize: (() => void) | null = null;\n\t/** Panel order and sizes from the last layout applied to the rendered panels. */\n\tprivate _knownPanels: readonly BrnResizablePanel[] = [];\n\tprivate _appliedLayout: number[] = [];\n\n\tconstructor() {\n\t\t// If the group is destroyed mid-drag, the document listeners would otherwise stay attached\n\t\t// (document is never GC'd), pinning this directive and firing against a torn-down view.\n\t\tinject(DestroyRef).onDestroy(() => this._stopResize?.());\n\n\t\tafterRenderEffect(() => {\n\t\t\t// Track both membership and external model updates, but not the writes performed while reconciling them.\n\t\t\tconst panels = this.panels();\n\t\t\tconst layout = this.layout();\n\t\t\tuntracked(() => this._synchronizePanelSizes(panels, layout));\n\t\t});\n\t}\n\n\tprivate _synchronizePanelSizes(panels: readonly BrnResizablePanel[], currentLayout: number[]): void {\n\t\tconst totalPanels = panels.length;\n\n\t\tif (totalPanels === 0) {\n\t\t\tthis._knownPanels = panels;\n\t\t\tthis._appliedLayout = [];\n\t\t\treturn;\n\t\t}\n\n\t\tconst isInitialLayout = this._knownPanels.length === 0;\n\t\tconst hasCompleteExternalLayout =\n\t\t\t!isInitialLayout &&\n\t\t\tcurrentLayout.length === totalPanels &&\n\t\t\t!this._layoutsEqual(currentLayout, this._appliedLayout);\n\n\t\tlet sizes: number[];\n\t\tif (isInitialLayout) {\n\t\t\t// Preserve the existing initialization contract: defaults take precedence over the input layout.\n\t\t\tsizes = panels.map((panel, index) => panel.defaultSize() ?? currentLayout[index] ?? 100 / totalPanels);\n\t\t} else if (hasCompleteExternalLayout) {\n\t\t\t// A complete changed layout is explicit consumer intent for the current panel order.\n\t\t\tsizes = [...currentLayout];\n\t\t} else {\n\t\t\t// Membership changed on its own: reserve new panel sizes, then preserve the relative proportions\n\t\t\t// of known panels within the remaining space.\n\t\t\tconst previousSizes = new Map(this._knownPanels.map((panel, index) => [panel, this._appliedLayout[index]]));\n\t\t\tconst newPanelSizes = new Map(\n\t\t\t\tpanels\n\t\t\t\t\t.filter((panel) => !previousSizes.has(panel))\n\t\t\t\t\t.map((panel) => [panel, panel.defaultSize() ?? 100 / totalPanels]),\n\t\t\t);\n\t\t\tconst newPanelsTotal = Array.from(newPanelSizes.values()).reduce((total, size) => total + size, 0);\n\t\t\tconst previousPanelsTotal = panels.reduce((total, panel) => total + (previousSizes.get(panel) ?? 0), 0);\n\n\t\t\tif (newPanelsTotal <= 100 && previousPanelsTotal > 0) {\n\t\t\t\tconst remainingSize = 100 - newPanelsTotal;\n\t\t\t\tsizes = panels.map(\n\t\t\t\t\t(panel) =>\n\t\t\t\t\t\tnewPanelSizes.get(panel) ?? ((previousSizes.get(panel) ?? 0) / previousPanelsTotal) * remainingSize,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconst rawSizes = panels.map((panel) => newPanelSizes.get(panel) ?? previousSizes.get(panel) ?? 0);\n\t\t\t\tconst totalSize = rawSizes.reduce((total, size) => total + size, 0);\n\t\t\t\tsizes = totalSize > 0 ? rawSizes.map((size) => (size / totalSize) * 100) : rawSizes;\n\t\t\t}\n\t\t}\n\n\t\tpanels.forEach((panel, index) => panel.setSize(sizes[index]));\n\t\tthis._knownPanels = panels;\n\t\tthis._appliedLayout = [...sizes];\n\n\t\tif (!this._layoutsEqual(currentLayout, sizes)) {\n\t\t\tthis._setLayout(sizes);\n\t\t}\n\t}\n\n\tprivate _layoutsEqual(first: readonly number[], second: readonly number[]): boolean {\n\t\treturn first.length === second.length && first.every((size, index) => size === second[index]);\n\t}\n\n\tpublic startResize(handleIndex: number, event: MouseEvent | TouchEvent): void {\n\t\tevent.preventDefault();\n\n\t\t// tear down any in-flight drag before starting a new one\n\t\tthis._stopResize?.();\n\n\t\tconst cursor = this.direction() === 'vertical' ? 'ns-resize' : 'ew-resize';\n\t\tthis._document.body.style.cursor = `${cursor}`;\n\t\tconst sizes = [...this.layout()];\n\t\tthis.dragStart.emit();\n\n\t\tconst startPosition = this._getEventPosition(event);\n\t\tconst startSizes = [...sizes];\n\t\t// Horizontal resizing is mirrored under RTL: the panel order is reversed, so the pixel\n\t\t// delta is inverted in _handleResize to keep the handle tracking the pointer correctly.\n\t\tconst isRtl = this.direction() === 'horizontal' && this._dir.valueSignal() === 'rtl';\n\n\t\tconst handleMove = (moveEvent: MouseEvent | TouchEvent) => {\n\t\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis._handleResize(moveEvent, handleIndex, startPosition, startSizes, isRtl);\n\t\t\t});\n\t\t};\n\n\t\t// Detaches the document listeners, cancels any queued frame and restores the cursor. Stored\n\t\t// on the instance so it runs on normal drag-end and on destroy-during-drag alike.\n\t\tconst cleanup = () => {\n\t\t\tthis._document.removeEventListener('mousemove', handleMove);\n\t\t\tthis._document.removeEventListener('touchmove', handleMove);\n\t\t\tthis._document.removeEventListener('mouseup', handleEnd);\n\t\t\tthis._document.removeEventListener('touchend', handleEnd);\n\t\t\tthis._document.removeEventListener('touchcancel', handleEnd);\n\t\t\tthis._document.body.style.cursor = 'default';\n\n\t\t\tif (this._resizeRaf !== null) {\n\t\t\t\tcancelAnimationFrame(this._resizeRaf);\n\t\t\t\tthis._resizeRaf = null;\n\t\t\t\tthis._pendingSizes = null;\n\t\t\t}\n\n\t\t\tthis._stopResize = null;\n\t\t};\n\n\t\tconst handleEnd = () => {\n\t\t\tthis._zone.run(() => this._endResize());\n\t\t\tcleanup();\n\t\t};\n\n\t\tthis._stopResize = cleanup;\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis._document.addEventListener('mousemove', handleMove);\n\t\t\tthis._document.addEventListener('touchmove', handleMove);\n\t\t\tthis._document.addEventListener('mouseup', handleEnd);\n\t\t\tthis._document.addEventListener('touchend', handleEnd);\n\t\t\t// touch drags can be interrupted by the system (touchcancel) without firing touchend;\n\t\t\t// end the resize on it too so listeners + cursor are not left dangling.\n\t\t\tthis._document.addEventListener('touchcancel', handleEnd);\n\t\t});\n\t}\n\n\tprivate _handleResize(\n\t\tevent: MouseEvent | TouchEvent,\n\t\thandleIndex: number,\n\t\tstartPosition: number,\n\t\tstartSizes: number[],\n\t\tisRtl = false,\n\t): void {\n\t\tconst currentPosition = this._getEventPosition(event);\n\t\tconst delta = (currentPosition - startPosition) * (isRtl ? -1 : 1);\n\t\tconst containerSize = this._getContainerSize();\n\t\tconst deltaPercentage = (delta / containerSize) * 100;\n\n\t\tconst newSizes = [...startSizes];\n\t\tconst panels = this.panels();\n\n\t\tconst leftPanel = panels[handleIndex];\n\t\tconst rightPanel = panels[handleIndex + 1];\n\n\t\tif (!leftPanel || !rightPanel) return;\n\n\t\tconst leftMin = leftPanel.minSize();\n\t\tconst leftMax = leftPanel.maxSize();\n\t\tconst rightMin = rightPanel.minSize();\n\t\tconst rightMax = rightPanel.maxSize();\n\n\t\tlet newLeftSize = startSizes[handleIndex] + deltaPercentage;\n\t\tlet newRightSize = startSizes[handleIndex + 1] - deltaPercentage;\n\n\t\tnewLeftSize = Math.max(leftMin, Math.min(leftMax, newLeftSize));\n\t\tnewRightSize = Math.max(rightMin, Math.min(rightMax, newRightSize));\n\n\t\tconst totalSize = newLeftSize + newRightSize;\n\t\tconst originalTotal = startSizes[handleIndex] + startSizes[handleIndex + 1];\n\n\t\tif (Math.abs(totalSize - originalTotal) < 0.01) {\n\t\t\tnewSizes[handleIndex] = newLeftSize;\n\t\t\tnewSizes[handleIndex + 1] = newRightSize;\n\n\t\t\t// batch update\n\t\t\tthis._queueResize(newSizes);\n\t\t}\n\t}\n\n\tprivate _queueResize(sizes: number[]): void {\n\t\tthis._pendingSizes = sizes;\n\n\t\tif (this._resizeRaf !== null) return;\n\n\t\tthis._resizeRaf = requestAnimationFrame(() => {\n\t\t\tthis._resizeRaf = null;\n\t\t\tif (this._pendingSizes) {\n\t\t\t\tthis._setLayout(this._pendingSizes);\n\t\t\t\tthis.updatePanelStyles();\n\t\t\t\tthis._pendingSizes = null;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _endResize(): void {\n\t\tif (this._resizeRaf !== null) {\n\t\t\tcancelAnimationFrame(this._resizeRaf);\n\t\t\tthis._resizeRaf = null;\n\t\t\tthis._pendingSizes = null;\n\t\t}\n\t\tthis.dragEnd.emit();\n\t}\n\n\tpublic updatePanelStyles(): void {\n\t\tconst panels = this.panels();\n\t\tconst sizes = this.layout();\n\n\t\tpanels.forEach((panel, index) => {\n\t\t\tconst size = sizes[index];\n\t\t\tif (size !== undefined) {\n\t\t\t\tpanel.setSize(size);\n\t\t\t}\n\t\t});\n\t\t// Keyboard resizing writes to the public model directly, so capture the applied value here as well.\n\t\tthis._appliedLayout = [...sizes];\n\t}\n\n\tprivate _getEventPosition(event: MouseEvent | TouchEvent): number {\n\t\tconst layout = this.direction();\n\t\tif (event instanceof MouseEvent) {\n\t\t\treturn layout === 'vertical' ? event.clientY : event.clientX;\n\t\t} else {\n\t\t\tconst touch = event.touches[0];\n\t\t\treturn layout === 'vertical' ? touch.clientY : touch.clientX;\n\t\t}\n\t}\n\n\tprivate _getContainerSize(): number {\n\t\tconst element = this._el.nativeElement as HTMLElement;\n\t\tconst layout = this.direction();\n\t\treturn layout === 'vertical' ? element.offsetHeight : element.offsetWidth;\n\t}\n\n\tpublic collapsePanel(index: number): void {\n\t\tconst panels = this.panels();\n\t\tconst panel = panels[index];\n\n\t\tif (!panel || !panel.collapsible()) return;\n\n\t\tconst sizes = [...this.layout()];\n\t\tconst isCollapsed = sizes[index] === 0;\n\n\t\tif (isCollapsed) {\n\t\t\tconst panelDefaultSize = panel.defaultSize();\n\t\t\tconst defaultSize = panelDefaultSize !== undefined ? panelDefaultSize / panels.length : 100 / panels.length;\n\t\t\tsizes[index] = defaultSize;\n\n\t\t\tconst totalOthers = sizes.reduce((sum, size, i) => (i !== index ? sum + size : sum), 0);\n\t\t\tconst scale = (100 - defaultSize) / totalOthers;\n\n\t\t\tsizes.forEach((size, i) => {\n\t\t\t\tif (i !== index) {\n\t\t\t\t\tsizes[i] = size * scale;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst collapsedSize = sizes[index];\n\t\t\tsizes[index] = 0;\n\n\t\t\tconst totalOthers = sizes.reduce((sum, size, i) => (i !== index ? sum + size : sum), 0);\n\t\t\tconst scale = (totalOthers + collapsedSize) / totalOthers;\n\n\t\t\tsizes.forEach((size, i) => {\n\t\t\t\tif (i !== index) {\n\t\t\t\t\tsizes[i] = size * scale;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._setLayout(sizes);\n\t\tthis.updatePanelStyles();\n\t}\n\n\tprivate _setLayout(sizes: number[]): void {\n\t\tthis._appliedLayout = [...sizes];\n\t\tthis.layout.set(sizes);\n\t\tthis.layoutChanged.emit(sizes);\n\t}\n}\n","import { type BooleanInput } from '@angular/cdk/coercion';\nimport { afterNextRender, booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { BrnResizableGroup } from './brn-resizable-group';\n\n@Directive({\n\tselector: 'brn-resizable-handle, [brnResizeHandle]',\n\texportAs: 'brnResizableHandle',\n\thost: {\n\t\t'[attr.data-layout]': '_layout()',\n\t\t'[attr.tabindex]': 'disabled() ? null : 0',\n\t\t'[attr.role]': '\"separator\"',\n\t\t'[attr.data-panel-group-direction]': '_direction()',\n\t\t'[attr.aria-orientation]': '_layout() === \"vertical\" ? \"horizontal\" : \"vertical\"',\n\t\t'[attr.aria-disabled]': 'disabled()',\n\t\t'(mousedown)': '_handleMouseDown($event)',\n\t\t'(keydown)': '_handleKeyDown($event)',\n\t},\n})\nexport class BrnResizableHandle {\n\t/** Parent resizable group. */\n\tprivate readonly _resizable = inject(BrnResizableGroup);\n\n\t/** Host element reference. */\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\t/** Whether a visual handle is rendered inside the separator. */\n\tpublic readonly withHandle = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/** Whether the handle is disabled (not interactive). */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/** The direction of the resizable group (`horizontal` or `vertical`). */\n\tprotected readonly _direction = this._resizable.direction;\n\n\t/** Computed layout orientation based on the parent group. */\n\tprotected readonly _layout = computed(() => this._resizable?.direction() || 'horizontal');\n\n\t/** Always-current index of this handle relative to panels in the group. */\n\tprivate get _handleIndex(): number {\n\t\treturn this._getHandleIndex();\n\t}\n\n\tconstructor() {\n\t\tafterNextRender(() => {\n\t\t\tthis._el.nativeElement.onpointerdown = (e: PointerEvent) => {\n\t\t\t\tthis._el.nativeElement.setPointerCapture(e.pointerId);\n\t\t\t};\n\n\t\t\tthis._el.nativeElement.onpointerup = (e: PointerEvent) => {\n\t\t\t\tthis._el.nativeElement.releasePointerCapture(e.pointerId);\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate _getHandleIndex(): number {\n\t\tconst host = this._el.nativeElement;\n\t\tconst parent = host.parentElement;\n\t\tif (!parent) return -1;\n\n\t\t// Collect all panels under this group\n\t\tconst panels = Array.from(parent.querySelectorAll('[data-slot=\"resizable-panel\"]'));\n\n\t\t// Find the previous panel (the closest one before this handle)\n\t\tconst prevPanel = host.previousElementSibling;\n\t\tif (!prevPanel) return -1;\n\n\t\t// Return its index among all panels\n\t\treturn panels.indexOf(prevPanel as HTMLElement);\n\t}\n\n\tprotected _handleMouseDown(event: MouseEvent): void {\n\t\tif (this.disabled() || !this._resizable) return;\n\n\t\tthis._resizable.startResize(this._handleIndex, event);\n\t}\n\n\tprotected _handleKeyDown(event: KeyboardEvent): void {\n\t\tif (this.disabled()) return;\n\n\t\tconst panels = this._resizable.panels();\n\t\tconst handleIndex = this._handleIndex;\n\t\tconst layout = this._layout();\n\n\t\tlet delta = 0;\n\t\tconst step = event.shiftKey ? 10 : 1;\n\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tif (layout === 'horizontal') delta = -step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tif (layout === 'horizontal') delta = step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\tif (layout === 'vertical') delta = -step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowDown':\n\t\t\t\tif (layout === 'vertical') delta = step;\n\t\t\t\tbreak;\n\t\t\tcase 'Home':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis._moveToExtreme(true);\n\t\t\t\treturn;\n\t\t\tcase 'End':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis._moveToExtreme(false);\n\t\t\t\treturn;\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif (panels[handleIndex]?.collapsible() || panels[handleIndex + 1]?.collapsible()) {\n\t\t\t\t\tconst collapsibleIndex = panels[handleIndex]?.collapsible() ? handleIndex : handleIndex + 1;\n\t\t\t\t\tthis._resizable.collapsePanel(collapsibleIndex);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\tif (delta !== 0) {\n\t\t\tevent.preventDefault();\n\t\t\tthis._adjustSizes(delta);\n\t\t}\n\t}\n\n\tprivate _getPanelContext() {\n\t\tconst panels = this._resizable.panels();\n\t\tconst li = this._handleIndex;\n\t\tconst ri = li + 1;\n\n\t\tconst left = panels[li];\n\t\tconst right = panels[ri];\n\t\tif (!left || !right) return null;\n\n\t\tconst sizes = [...this._resizable.layout()];\n\n\t\treturn {\n\t\t\tsizes,\n\t\t\tli,\n\t\t\tri,\n\t\t\tleft,\n\t\t\tright,\n\t\t\tleftMin: left.minSize(),\n\t\t\tleftMax: left.maxSize(),\n\t\t\trightMin: right.minSize(),\n\t\t\trightMax: right.maxSize(),\n\t\t};\n\t}\n\n\tprivate _adjustSizes(delta: number): void {\n\t\tconst ctx = this._getPanelContext();\n\t\tif (!ctx) return;\n\n\t\tlet newLeftSize = ctx.sizes[ctx.li] + delta;\n\t\tlet newRightSize = ctx.sizes[ctx.ri] - delta;\n\n\t\tnewLeftSize = Math.max(ctx.leftMin, Math.min(ctx.leftMax, newLeftSize));\n\t\tnewRightSize = Math.max(ctx.rightMin, Math.min(ctx.rightMax, newRightSize));\n\n\t\tconst totalSize = newLeftSize + newRightSize;\n\t\tconst originalTotal = ctx.sizes[ctx.li] + ctx.sizes[ctx.ri];\n\n\t\tif (Math.abs(totalSize - originalTotal) < 0.01) {\n\t\t\tctx.sizes[ctx.li] = newLeftSize;\n\t\t\tctx.sizes[ctx.ri] = newRightSize;\n\n\t\t\tthis._resizable.layout.set(ctx.sizes);\n\t\t\tthis._resizable.updatePanelStyles();\n\t\t}\n\t}\n\n\tprivate _moveToExtreme(toMin: boolean): void {\n\t\tconst ctx = this._getPanelContext();\n\t\tif (!ctx) return;\n\n\t\tconst totalSize = ctx.sizes[ctx.li] + ctx.sizes[ctx.ri];\n\n\t\tif (toMin) {\n\t\t\tctx.sizes[ctx.li] = ctx.leftMin;\n\t\t\tctx.sizes[ctx.ri] = Math.min(totalSize - ctx.leftMin, ctx.rightMax);\n\t\t} else {\n\t\t\tctx.sizes[ctx.li] = Math.min(totalSize - ctx.rightMin, ctx.leftMax);\n\t\t\tctx.sizes[ctx.ri] = ctx.rightMin;\n\t\t}\n\n\t\tthis._resizable.layout.set(ctx.sizes);\n\t\tthis._resizable.updatePanelStyles();\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;AAaA,IAAIA,QAAM,GAAG,CAAC;MAgBD,iBAAiB,CAAA;;IAEb,EAAE,GAAG,KAAK,CAAS,CAAA,oBAAA,EAAuB,EAAEA,QAAM,CAAA,CAAE,yEAAC;;AAGlD,IAAA,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAC;;AAG1C,IAAA,EAAE,GAAG,MAAM,EAAC,UAAuB,EAA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ACV,oBAAA,QAAQ,EAAE,yCAAyC;AACnD,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACL,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,aAAa,EAAE,aAAa;AAC5B,wBAAA,mCAAmC,EAAE,cAAc;AACnD,wBAAA,yBAAyB,EAAE,sDAAsD;AACjF,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,aAAa,EAAE,0BAA0B;AACzC,wBAAA,WAAW,EAAE,wBAAwB;AACrC,qBAAA;AACD,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-resizable.mjs","sources":["../../../../libs/brain/resizable/src/lib/brn-resizable-panel.ts","../../../../libs/brain/resizable/src/lib/brn-resizable-group.ts","../../../../libs/brain/resizable/src/lib/brn-resizable-handle.ts","../../../../libs/brain/resizable/src/spartan-ng-brain-resizable.ts"],"sourcesContent":["import { BooleanInput, type NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tinject,\n\tinput,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { BrnResizableGroup } from './brn-resizable-group';\n\nlet nextId = 0;\n\n@Directive({\n\tselector: 'brn-resizable-panel, [brnResizablePanel]',\n\texportAs: 'brnResizablePanel',\n\thost: {\n\t\t'[attr.data-panel-group-id]': '_panelGroup.id()',\n\t\t'[attr.data-panel-id]': 'id()',\n\t\t'[attr.data-panel-size]': '_panelSize()',\n\t\t'[id]': 'id()',\n\t\t'[style.flex]': '_flex()',\n\t\t'[style.overflow]': '\"hidden\"',\n\t\t'data-panel': '',\n\t\t'data-slot': 'resizable-panel',\n\t},\n})\nexport class BrnResizablePanel {\n\t/** Unique ID for the panel. */\n\tpublic readonly id = input<string>(`brn-resizable-panel-${++nextId}`);\n\n\t/** Reference to the parent {@link BrnResizableGroup}. */\n\tprotected readonly _panelGroup = inject(BrnResizableGroup);\n\n\t/** Host DOM element reference. */\n\tpublic readonly el = inject(ElementRef<HTMLElement>);\n\n\t/**\n\t * The default size of the panel (percentage of container space).\n\t * - `undefined` → group decides initial size.\n\t * - Number → interpreted as percentage (0–100).\n\t */\n\tpublic readonly defaultSize = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n\t/** The minimum size this panel can shrink to (percentage). */\n\n\tpublic readonly minSize = input<number, NumberInput>(0, { transform: numberAttribute });\n\n\t/**\t The maximum size this panel can grow to (percentage). */\n\tpublic readonly maxSize = input<number, NumberInput>(100, { transform: numberAttribute });\n\n\t/** Whether this panel can be collapsed entirely. */\n\tpublic readonly collapsible = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n\t/** Reactive signal holding the current size of the panel. */\n\tprotected readonly _panelSize = signal<number | undefined>(undefined);\n\n\t/**\n\t * CSS flex style for this panel, derived from its current size.\n\t * Format: `\"flex-grow flex-shrink flex-basis\"`.\n\t *\n\t * Before the group synchronizes the layout, falls back to {@link defaultSize} so the panel\n\t * paints at its intended size on the very first render instead of briefly flexing to an equal\n\t * share (e.g. 50/50) and then snapping to the configured size. Example: `\"25 1 0\"` means\n\t * 25% width (or height in vertical layout).\n\t */\n\tprotected readonly _flex = computed(() => {\n\t\tconst size = this._panelSize() ?? this.defaultSize() ?? 100;\n\t\treturn `${size} 1 0`;\n\t});\n\t/**\n\t * Sets the size of the panel.\n\t * @param size New size (percentage of container space).\n\t */\n\tpublic setSize(size: number) {\n\t\tthis._panelSize.set(size);\n\t}\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport {\n\tafterRenderEffect,\n\tcontentChildren,\n\tDestroyRef,\n\tDirective,\n\tDOCUMENT,\n\tElementRef,\n\tinject,\n\tinput,\n\tmodel,\n\tNgZone,\n\toutput,\n\tuntracked,\n} from '@angular/core';\nimport { BrnResizablePanel } from './brn-resizable-panel';\n\nlet nextId = 0;\n\n@Directive({\n\tselector: 'brn-resizable-group, [brnResizableGroup]',\n\texportAs: 'brnResizableGroup',\n\thost: {\n\t\t'[attr.data-panel-group-direction]': 'direction()',\n\t\t'[attr.data-panel-group-id]': 'id()',\n\t\t'[id]': 'id()',\n\t\t'data-panel-group': '',\n\t\t'data-slot': 'resizable-panel-group',\n\t},\n})\nexport class BrnResizableGroup {\n\t/** The id of the BrnResizableGroup */\n\tpublic readonly id = input<string>(`brn-resizable-group-${++nextId}`);\n\n\t/** Host element reference. */\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\t/** Layout direction, used to mirror horizontal resizing under RTL. */\n\tprivate readonly _dir = inject(Directionality);\n\n\t/** Group orientation */\n\tpublic readonly direction = input<'horizontal' | 'vertical'>('horizontal');\n\n\t/** @internal Access all the panels within the group */\n\tpublic readonly panels = contentChildren(BrnResizablePanel);\n\n\t/** event when resize starts */\n\tpublic readonly dragStart = output<void>();\n\n\t/** event when resize ends */\n\tpublic readonly dragEnd = output<void>();\n\n\t/** Resize panel group to the specified layout ([1 - 100, ...]). */\n\tpublic readonly layout = model<number[]>([]);\n\n\t/** Called when group layout changes */\n\tpublic readonly layoutChanged = output<number[]>();\n\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprivate readonly _zone = inject(NgZone);\n\n\tprivate _resizeRaf: number | null = null;\n\n\tprivate _pendingSizes: number[] | null = null;\n\n\t/** Tears down the in-flight drag (document listeners, queued frame, cursor); null when idle. */\n\tprivate _stopResize: (() => void) | null = null;\n\t/** Panel order and sizes from the last layout applied to the rendered panels. */\n\tprivate _knownPanels: readonly BrnResizablePanel[] = [];\n\tprivate _appliedLayout: number[] = [];\n\n\tconstructor() {\n\t\t// If the group is destroyed mid-drag, the document listeners would otherwise stay attached\n\t\t// (document is never GC'd), pinning this directive and firing against a torn-down view.\n\t\tinject(DestroyRef).onDestroy(() => this._stopResize?.());\n\n\t\tafterRenderEffect(() => {\n\t\t\t// Track both membership and external model updates, but not the writes performed while reconciling them.\n\t\t\tconst panels = this.panels();\n\t\t\tconst layout = this.layout();\n\t\t\tuntracked(() => this._synchronizePanelSizes(panels, layout));\n\t\t});\n\t}\n\n\tprivate _synchronizePanelSizes(panels: readonly BrnResizablePanel[], currentLayout: number[]): void {\n\t\tconst totalPanels = panels.length;\n\n\t\tif (totalPanels === 0) {\n\t\t\tthis._knownPanels = panels;\n\t\t\tthis._appliedLayout = [];\n\t\t\treturn;\n\t\t}\n\n\t\tconst isInitialLayout = this._knownPanels.length === 0;\n\t\tconst hasCompleteExternalLayout =\n\t\t\t!isInitialLayout &&\n\t\t\tcurrentLayout.length === totalPanels &&\n\t\t\t!this._layoutsEquivalent(currentLayout, this._appliedLayout);\n\t\tconst membershipChanged = !isInitialLayout && !this._panelsEqual(panels, this._knownPanels);\n\n\t\t// Nothing external changed and the same panels are still mounted: the applied layout is already\n\t\t// correct. Falling through to the proportional-rescale branch would round-trip each size through\n\t\t// x/total*100, which is not bit-identical for fractional layouts; the drift feeds back into the\n\t\t// model and can loop until Angular throws NG0103 in zoneless apps.\n\t\tif (!isInitialLayout && !hasCompleteExternalLayout && !membershipChanged) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet sizes: number[];\n\t\tif (isInitialLayout) {\n\t\t\t// Preserve the existing initialization contract: defaults take precedence over the input layout.\n\t\t\tsizes = panels.map((panel, index) => panel.defaultSize() ?? currentLayout[index] ?? 100 / totalPanels);\n\t\t} else if (hasCompleteExternalLayout) {\n\t\t\t// A complete changed layout is explicit consumer intent for the current panel order.\n\t\t\tsizes = [...currentLayout];\n\t\t} else {\n\t\t\t// Membership changed on its own: reserve new panel sizes, then preserve the relative proportions\n\t\t\t// of known panels within the remaining space.\n\t\t\tconst previousSizes = new Map(this._knownPanels.map((panel, index) => [panel, this._appliedLayout[index]]));\n\t\t\tconst newPanelSizes = new Map(\n\t\t\t\tpanels\n\t\t\t\t\t.filter((panel) => !previousSizes.has(panel))\n\t\t\t\t\t.map((panel) => [panel, panel.defaultSize() ?? 100 / totalPanels]),\n\t\t\t);\n\t\t\tconst newPanelsTotal = Array.from(newPanelSizes.values()).reduce((total, size) => total + size, 0);\n\t\t\tconst previousPanelsTotal = panels.reduce((total, panel) => total + (previousSizes.get(panel) ?? 0), 0);\n\n\t\t\tif (newPanelsTotal <= 100 && previousPanelsTotal > 0) {\n\t\t\t\tconst remainingSize = 100 - newPanelsTotal;\n\t\t\t\tsizes = panels.map(\n\t\t\t\t\t(panel) =>\n\t\t\t\t\t\tnewPanelSizes.get(panel) ?? ((previousSizes.get(panel) ?? 0) / previousPanelsTotal) * remainingSize,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconst rawSizes = panels.map((panel) => newPanelSizes.get(panel) ?? previousSizes.get(panel) ?? 0);\n\t\t\t\tconst totalSize = rawSizes.reduce((total, size) => total + size, 0);\n\t\t\t\tsizes = totalSize > 0 ? rawSizes.map((size) => (size / totalSize) * 100) : rawSizes;\n\t\t\t}\n\t\t}\n\n\t\tpanels.forEach((panel, index) => panel.setSize(sizes[index]));\n\t\tthis._knownPanels = panels;\n\t\tthis._appliedLayout = [...sizes];\n\n\t\tif (!this._layoutsEquivalent(currentLayout, sizes)) {\n\t\t\tthis._setLayout(sizes);\n\t\t}\n\t}\n\n\t// Percentages within this tolerance render identically; treat them as the same layout so\n\t// floating-point drift from a rescale round-trip can't feed back into the model (NG0103).\n\tprivate _layoutsEquivalent(first: readonly number[], second: readonly number[]): boolean {\n\t\tconst epsilon = 1e-9;\n\t\treturn first.length === second.length && first.every((size, index) => Math.abs(size - second[index]) < epsilon);\n\t}\n\n\tprivate _panelsEqual(first: readonly BrnResizablePanel[], second: readonly BrnResizablePanel[]): boolean {\n\t\treturn first.length === second.length && first.every((panel, index) => panel === second[index]);\n\t}\n\n\tpublic startResize(handleIndex: number, event: MouseEvent | TouchEvent): void {\n\t\tevent.preventDefault();\n\n\t\t// tear down any in-flight drag before starting a new one\n\t\tthis._stopResize?.();\n\n\t\tconst cursor = this.direction() === 'vertical' ? 'ns-resize' : 'ew-resize';\n\t\tthis._document.body.style.cursor = `${cursor}`;\n\t\tconst sizes = [...this.layout()];\n\t\tthis.dragStart.emit();\n\n\t\tconst startPosition = this._getEventPosition(event);\n\t\tconst startSizes = [...sizes];\n\t\t// Horizontal resizing is mirrored under RTL: the panel order is reversed, so the pixel\n\t\t// delta is inverted in _handleResize to keep the handle tracking the pointer correctly.\n\t\tconst isRtl = this.direction() === 'horizontal' && this._dir.valueSignal() === 'rtl';\n\n\t\tconst handleMove = (moveEvent: MouseEvent | TouchEvent) => {\n\t\t\tthis._zone.runOutsideAngular(() => {\n\t\t\t\tthis._handleResize(moveEvent, handleIndex, startPosition, startSizes, isRtl);\n\t\t\t});\n\t\t};\n\n\t\t// Detaches the document listeners, cancels any queued frame and restores the cursor. Stored\n\t\t// on the instance so it runs on normal drag-end and on destroy-during-drag alike.\n\t\tconst cleanup = () => {\n\t\t\tthis._document.removeEventListener('mousemove', handleMove);\n\t\t\tthis._document.removeEventListener('touchmove', handleMove);\n\t\t\tthis._document.removeEventListener('mouseup', handleEnd);\n\t\t\tthis._document.removeEventListener('touchend', handleEnd);\n\t\t\tthis._document.removeEventListener('touchcancel', handleEnd);\n\t\t\tthis._document.body.style.cursor = 'default';\n\n\t\t\tif (this._resizeRaf !== null) {\n\t\t\t\tcancelAnimationFrame(this._resizeRaf);\n\t\t\t\tthis._resizeRaf = null;\n\t\t\t\tthis._pendingSizes = null;\n\t\t\t}\n\n\t\t\tthis._stopResize = null;\n\t\t};\n\n\t\tconst handleEnd = () => {\n\t\t\tthis._zone.run(() => this._endResize());\n\t\t\tcleanup();\n\t\t};\n\n\t\tthis._stopResize = cleanup;\n\n\t\tthis._zone.runOutsideAngular(() => {\n\t\t\tthis._document.addEventListener('mousemove', handleMove);\n\t\t\tthis._document.addEventListener('touchmove', handleMove);\n\t\t\tthis._document.addEventListener('mouseup', handleEnd);\n\t\t\tthis._document.addEventListener('touchend', handleEnd);\n\t\t\t// touch drags can be interrupted by the system (touchcancel) without firing touchend;\n\t\t\t// end the resize on it too so listeners + cursor are not left dangling.\n\t\t\tthis._document.addEventListener('touchcancel', handleEnd);\n\t\t});\n\t}\n\n\tprivate _handleResize(\n\t\tevent: MouseEvent | TouchEvent,\n\t\thandleIndex: number,\n\t\tstartPosition: number,\n\t\tstartSizes: number[],\n\t\tisRtl = false,\n\t): void {\n\t\tconst currentPosition = this._getEventPosition(event);\n\t\tconst delta = (currentPosition - startPosition) * (isRtl ? -1 : 1);\n\t\tconst containerSize = this._getContainerSize();\n\t\tconst deltaPercentage = (delta / containerSize) * 100;\n\n\t\tconst newSizes = [...startSizes];\n\t\tconst panels = this.panels();\n\n\t\tconst leftPanel = panels[handleIndex];\n\t\tconst rightPanel = panels[handleIndex + 1];\n\n\t\tif (!leftPanel || !rightPanel) return;\n\n\t\tconst leftMin = leftPanel.minSize();\n\t\tconst leftMax = leftPanel.maxSize();\n\t\tconst rightMin = rightPanel.minSize();\n\t\tconst rightMax = rightPanel.maxSize();\n\n\t\tlet newLeftSize = startSizes[handleIndex] + deltaPercentage;\n\t\tlet newRightSize = startSizes[handleIndex + 1] - deltaPercentage;\n\n\t\tnewLeftSize = Math.max(leftMin, Math.min(leftMax, newLeftSize));\n\t\tnewRightSize = Math.max(rightMin, Math.min(rightMax, newRightSize));\n\n\t\tconst totalSize = newLeftSize + newRightSize;\n\t\tconst originalTotal = startSizes[handleIndex] + startSizes[handleIndex + 1];\n\n\t\tif (Math.abs(totalSize - originalTotal) < 0.01) {\n\t\t\tnewSizes[handleIndex] = newLeftSize;\n\t\t\tnewSizes[handleIndex + 1] = newRightSize;\n\n\t\t\t// batch update\n\t\t\tthis._queueResize(newSizes);\n\t\t}\n\t}\n\n\tprivate _queueResize(sizes: number[]): void {\n\t\tthis._pendingSizes = sizes;\n\n\t\tif (this._resizeRaf !== null) return;\n\n\t\tthis._resizeRaf = requestAnimationFrame(() => {\n\t\t\tthis._resizeRaf = null;\n\t\t\tif (this._pendingSizes) {\n\t\t\t\tthis._setLayout(this._pendingSizes);\n\t\t\t\tthis.updatePanelStyles();\n\t\t\t\tthis._pendingSizes = null;\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _endResize(): void {\n\t\tif (this._resizeRaf !== null) {\n\t\t\tcancelAnimationFrame(this._resizeRaf);\n\t\t\tthis._resizeRaf = null;\n\t\t\tthis._pendingSizes = null;\n\t\t}\n\t\tthis.dragEnd.emit();\n\t}\n\n\tpublic updatePanelStyles(): void {\n\t\tconst panels = this.panels();\n\t\tconst sizes = this.layout();\n\n\t\tpanels.forEach((panel, index) => {\n\t\t\tconst size = sizes[index];\n\t\t\tif (size !== undefined) {\n\t\t\t\tpanel.setSize(size);\n\t\t\t}\n\t\t});\n\t\t// Keyboard resizing writes to the public model directly, so capture the applied value here as well.\n\t\tthis._appliedLayout = [...sizes];\n\t}\n\n\tprivate _getEventPosition(event: MouseEvent | TouchEvent): number {\n\t\tconst layout = this.direction();\n\t\tif (event instanceof MouseEvent) {\n\t\t\treturn layout === 'vertical' ? event.clientY : event.clientX;\n\t\t} else {\n\t\t\tconst touch = event.touches[0];\n\t\t\treturn layout === 'vertical' ? touch.clientY : touch.clientX;\n\t\t}\n\t}\n\n\tprivate _getContainerSize(): number {\n\t\tconst element = this._el.nativeElement as HTMLElement;\n\t\tconst layout = this.direction();\n\t\treturn layout === 'vertical' ? element.offsetHeight : element.offsetWidth;\n\t}\n\n\tpublic collapsePanel(index: number): void {\n\t\tconst panels = this.panels();\n\t\tconst panel = panels[index];\n\n\t\tif (!panel || !panel.collapsible()) return;\n\n\t\tconst sizes = [...this.layout()];\n\t\tconst isCollapsed = sizes[index] === 0;\n\n\t\tif (isCollapsed) {\n\t\t\tconst panelDefaultSize = panel.defaultSize();\n\t\t\tconst defaultSize = panelDefaultSize !== undefined ? panelDefaultSize / panels.length : 100 / panels.length;\n\t\t\tsizes[index] = defaultSize;\n\n\t\t\tconst totalOthers = sizes.reduce((sum, size, i) => (i !== index ? sum + size : sum), 0);\n\t\t\tconst scale = (100 - defaultSize) / totalOthers;\n\n\t\t\tsizes.forEach((size, i) => {\n\t\t\t\tif (i !== index) {\n\t\t\t\t\tsizes[i] = size * scale;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst collapsedSize = sizes[index];\n\t\t\tsizes[index] = 0;\n\n\t\t\tconst totalOthers = sizes.reduce((sum, size, i) => (i !== index ? sum + size : sum), 0);\n\t\t\tconst scale = (totalOthers + collapsedSize) / totalOthers;\n\n\t\t\tsizes.forEach((size, i) => {\n\t\t\t\tif (i !== index) {\n\t\t\t\t\tsizes[i] = size * scale;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._setLayout(sizes);\n\t\tthis.updatePanelStyles();\n\t}\n\n\tprivate _setLayout(sizes: number[]): void {\n\t\tthis._appliedLayout = [...sizes];\n\t\tthis.layout.set(sizes);\n\t\tthis.layoutChanged.emit(sizes);\n\t}\n}\n","import { type BooleanInput } from '@angular/cdk/coercion';\nimport { afterNextRender, booleanAttribute, computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { BrnResizableGroup } from './brn-resizable-group';\n\n@Directive({\n\tselector: 'brn-resizable-handle, [brnResizeHandle]',\n\texportAs: 'brnResizableHandle',\n\thost: {\n\t\t'[attr.data-layout]': '_layout()',\n\t\t'[attr.tabindex]': 'disabled() ? null : 0',\n\t\t'[attr.role]': '\"separator\"',\n\t\t'[attr.data-panel-group-direction]': '_direction()',\n\t\t'[attr.aria-orientation]': '_layout() === \"vertical\" ? \"horizontal\" : \"vertical\"',\n\t\t'[attr.aria-disabled]': 'disabled()',\n\t\t'(mousedown)': '_handleMouseDown($event)',\n\t\t'(keydown)': '_handleKeyDown($event)',\n\t},\n})\nexport class BrnResizableHandle {\n\t/** Parent resizable group. */\n\tprivate readonly _resizable = inject(BrnResizableGroup);\n\n\t/** Host element reference. */\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\t/** Whether a visual handle is rendered inside the separator. */\n\tpublic readonly withHandle = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/** Whether the handle is disabled (not interactive). */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/** The direction of the resizable group (`horizontal` or `vertical`). */\n\tprotected readonly _direction = this._resizable.direction;\n\n\t/** Computed layout orientation based on the parent group. */\n\tprotected readonly _layout = computed(() => this._resizable?.direction() || 'horizontal');\n\n\t/** Always-current index of this handle relative to panels in the group. */\n\tprivate get _handleIndex(): number {\n\t\treturn this._getHandleIndex();\n\t}\n\n\tconstructor() {\n\t\tafterNextRender(() => {\n\t\t\tthis._el.nativeElement.onpointerdown = (e: PointerEvent) => {\n\t\t\t\tthis._el.nativeElement.setPointerCapture(e.pointerId);\n\t\t\t};\n\n\t\t\tthis._el.nativeElement.onpointerup = (e: PointerEvent) => {\n\t\t\t\tthis._el.nativeElement.releasePointerCapture(e.pointerId);\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate _getHandleIndex(): number {\n\t\tconst host = this._el.nativeElement;\n\t\tconst parent = host.parentElement;\n\t\tif (!parent) return -1;\n\n\t\t// Collect all panels under this group\n\t\tconst panels = Array.from(parent.querySelectorAll('[data-slot=\"resizable-panel\"]'));\n\n\t\t// Find the previous panel (the closest one before this handle)\n\t\tconst prevPanel = host.previousElementSibling;\n\t\tif (!prevPanel) return -1;\n\n\t\t// Return its index among all panels\n\t\treturn panels.indexOf(prevPanel as HTMLElement);\n\t}\n\n\tprotected _handleMouseDown(event: MouseEvent): void {\n\t\tif (this.disabled() || !this._resizable) return;\n\n\t\tthis._resizable.startResize(this._handleIndex, event);\n\t}\n\n\tprotected _handleKeyDown(event: KeyboardEvent): void {\n\t\tif (this.disabled()) return;\n\n\t\tconst panels = this._resizable.panels();\n\t\tconst handleIndex = this._handleIndex;\n\t\tconst layout = this._layout();\n\n\t\tlet delta = 0;\n\t\tconst step = event.shiftKey ? 10 : 1;\n\n\t\tswitch (event.key) {\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tif (layout === 'horizontal') delta = -step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tif (layout === 'horizontal') delta = step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\tif (layout === 'vertical') delta = -step;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowDown':\n\t\t\t\tif (layout === 'vertical') delta = step;\n\t\t\t\tbreak;\n\t\t\tcase 'Home':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis._moveToExtreme(true);\n\t\t\t\treturn;\n\t\t\tcase 'End':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis._moveToExtreme(false);\n\t\t\t\treturn;\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif (panels[handleIndex]?.collapsible() || panels[handleIndex + 1]?.collapsible()) {\n\t\t\t\t\tconst collapsibleIndex = panels[handleIndex]?.collapsible() ? handleIndex : handleIndex + 1;\n\t\t\t\t\tthis._resizable.collapsePanel(collapsibleIndex);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\tif (delta !== 0) {\n\t\t\tevent.preventDefault();\n\t\t\tthis._adjustSizes(delta);\n\t\t}\n\t}\n\n\tprivate _getPanelContext() {\n\t\tconst panels = this._resizable.panels();\n\t\tconst li = this._handleIndex;\n\t\tconst ri = li + 1;\n\n\t\tconst left = panels[li];\n\t\tconst right = panels[ri];\n\t\tif (!left || !right) return null;\n\n\t\tconst sizes = [...this._resizable.layout()];\n\n\t\treturn {\n\t\t\tsizes,\n\t\t\tli,\n\t\t\tri,\n\t\t\tleft,\n\t\t\tright,\n\t\t\tleftMin: left.minSize(),\n\t\t\tleftMax: left.maxSize(),\n\t\t\trightMin: right.minSize(),\n\t\t\trightMax: right.maxSize(),\n\t\t};\n\t}\n\n\tprivate _adjustSizes(delta: number): void {\n\t\tconst ctx = this._getPanelContext();\n\t\tif (!ctx) return;\n\n\t\tlet newLeftSize = ctx.sizes[ctx.li] + delta;\n\t\tlet newRightSize = ctx.sizes[ctx.ri] - delta;\n\n\t\tnewLeftSize = Math.max(ctx.leftMin, Math.min(ctx.leftMax, newLeftSize));\n\t\tnewRightSize = Math.max(ctx.rightMin, Math.min(ctx.rightMax, newRightSize));\n\n\t\tconst totalSize = newLeftSize + newRightSize;\n\t\tconst originalTotal = ctx.sizes[ctx.li] + ctx.sizes[ctx.ri];\n\n\t\tif (Math.abs(totalSize - originalTotal) < 0.01) {\n\t\t\tctx.sizes[ctx.li] = newLeftSize;\n\t\t\tctx.sizes[ctx.ri] = newRightSize;\n\n\t\t\tthis._resizable.layout.set(ctx.sizes);\n\t\t\tthis._resizable.updatePanelStyles();\n\t\t}\n\t}\n\n\tprivate _moveToExtreme(toMin: boolean): void {\n\t\tconst ctx = this._getPanelContext();\n\t\tif (!ctx) return;\n\n\t\tconst totalSize = ctx.sizes[ctx.li] + ctx.sizes[ctx.ri];\n\n\t\tif (toMin) {\n\t\t\tctx.sizes[ctx.li] = ctx.leftMin;\n\t\t\tctx.sizes[ctx.ri] = Math.min(totalSize - ctx.leftMin, ctx.rightMax);\n\t\t} else {\n\t\t\tctx.sizes[ctx.li] = Math.min(totalSize - ctx.rightMin, ctx.leftMax);\n\t\t\tctx.sizes[ctx.ri] = ctx.rightMin;\n\t\t}\n\n\t\tthis._resizable.layout.set(ctx.sizes);\n\t\tthis._resizable.updatePanelStyles();\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;AAaA,IAAIA,QAAM,GAAG,CAAC;MAgBD,iBAAiB,CAAA;;IAEb,EAAE,GAAG,KAAK,CAAS,CAAA,oBAAA,EAAuB,EAAEA,QAAM,CAAA,CAAE,yEAAC;;AAGlD,IAAA,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAC;;AAG1C,IAAA,EAAE,GAAG,MAAM,EAAC,UAAuB,EAAC;AAEpD;;;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AAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,WAAA,EAAA,0BAAA,EAAA,SAAA,EAAA,wBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,eAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,eAAA,EAAA,iCAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,4DAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,yCAAyC;AACnD,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACL,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,aAAa,EAAE,aAAa;AAC5B,wBAAA,mCAAmC,EAAE,cAAc;AACnD,wBAAA,yBAAyB,EAAE,sDAAsD;AACjF,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,aAAa,EAAE,0BAA0B;AACzC,wBAAA,WAAW,EAAE,wBAAwB;AACrC,qBAAA;AACD,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -48,6 +48,11 @@ class BrnSwitch {
|
|
|
48
48
|
* CSS classes applied to inner button element.
|
|
49
49
|
*/
|
|
50
50
|
class = input(null, ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
51
|
+
/**
|
|
52
|
+
* Styles applied to the host element. Bound via `[style]` so they apply through the CSSOM and are
|
|
53
|
+
* not blocked by a strict Content-Security-Policy.
|
|
54
|
+
*/
|
|
55
|
+
hostStyles = input('display: contents', ...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
|
|
51
56
|
/**
|
|
52
57
|
* Size of the switch.
|
|
53
58
|
* Drives the size-keyed registry style rules via the `data-size` attribute.
|
|
@@ -223,7 +228,7 @@ class BrnSwitch {
|
|
|
223
228
|
this._cdr.markForCheck();
|
|
224
229
|
}
|
|
225
230
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
226
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnSwitch, isStandalone: true, selector: "brn-switch", inputs: { checkedInput: { classPropertyName: "checkedInput", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", touched: "touched" }, host: { properties: { "style": "
|
|
231
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnSwitch, isStandalone: true, selector: "brn-switch", inputs: { checkedInput: { classPropertyName: "checkedInput", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, hostStyles: { classPropertyName: "hostStyles", publicName: "hostStyles", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", touched: "touched" }, host: { properties: { "style": "hostStyles()", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.aria-invalid": "_invalid?.() ? \"true\" : null", "attr.data-dirty": "_dirty?.() ? \"true\": null", "attr.data-touched": "_touched?.() ? \"true\" : null", "attr.data-matches-spartan-invalid": "_spartanInvalid?.() ? \"true\" : null", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_SWITCH_VALUE_ACCESSOR, provideBrnLabelable(BrnSwitch)], viewQueries: [{ propertyName: "switch", first: true, predicate: ["switch"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0, template: `
|
|
227
232
|
<button
|
|
228
233
|
#switch
|
|
229
234
|
role="switch"
|
|
@@ -261,7 +266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
261
266
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
262
267
|
hostDirectives: [BrnFieldControl],
|
|
263
268
|
host: {
|
|
264
|
-
'[style]': '
|
|
269
|
+
'[style]': 'hostStyles()',
|
|
265
270
|
'[attr.id]': '_state().id',
|
|
266
271
|
'[attr.name]': '_state().name',
|
|
267
272
|
'[attr.aria-labelledby]': 'null',
|
|
@@ -306,7 +311,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
306
311
|
</button>
|
|
307
312
|
`,
|
|
308
313
|
}]
|
|
309
|
-
}], ctorParameters: () => [], propDecorators: { checkedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], touched: [{ type: i0.Output, args: ["touched"] }], switch: [{ type: i0.ViewChild, args: ['switch', { isSignal: true }] }] } });
|
|
314
|
+
}], ctorParameters: () => [], propDecorators: { checkedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], hostStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostStyles", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], touched: [{ type: i0.Output, args: ["touched"] }], switch: [{ type: i0.ViewChild, args: ['switch', { isSignal: true }] }] } });
|
|
310
315
|
|
|
311
316
|
class BrnSwitchThumb {
|
|
312
317
|
_switch = inject(BrnSwitch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-switch.mjs","sources":["../../../../libs/brain/switch/src/lib/brn-switch.ts","../../../../libs/brain/switch/src/lib/brn-switch-thumb.ts","../../../../libs/brain/switch/src/index.ts","../../../../libs/brain/switch/src/spartan-ng-brain-switch.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tnumberAttribute,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_SWITCH_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSwitch),\n\tmulti: true,\n};\n\nexport type BrnSwitchSize = 'default' | 'sm';\n\nconst CONTAINER_POST_FIX = '-switch';\n\nlet uniqueIdCounter = 0;\n\n@Component({\n\tselector: 'brn-switch',\n\tproviders: [BRN_SWITCH_VALUE_ACCESSOR, provideBrnLabelable(BrnSwitch)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\": null',\n\t\t'[attr.data-touched]': '_touched?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': '_spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#switch\n\t\t\trole=\"switch\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.data-size]=\"size()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[id]=\"getSwitchButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getSwitchButtonId(_state().name) ?? ''\"\n\t\t\t[value]=\"checked() ? 'on' : 'off'\"\n\t\t\t[attr.aria-checked]=\"checked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.aria-invalid]=\"_invalid?.() ? 'true' : null\"\n\t\t\t[attr.data-dirty]=\"_dirty?.() ? 'true' : null\"\n\t\t\t[attr.data-touched]=\"_touched?.() ? 'true' : null\"\n\t\t\t[attr.data-matches-spartan-invalid]=\"_spartanInvalid?.() ? 'true' : null\"\n\t\t\t[attr.data-state]=\"checked() ? 'checked' : 'unchecked'\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"tabIndex()\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content select=\"brn-switch-thumb\" />\n\t\t</button>\n\t`,\n})\nexport class BrnSwitch implements AfterContentInit, OnDestroy, ControlValueAccessor {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Whether switch is checked/toggled on.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checkedInput = input<boolean, BooleanInput>(false, { alias: 'checked', transform: booleanAttribute });\n\tpublic readonly checked = linkedSignal(this.checkedInput);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Unique identifier for switch component.\n\t * When provided, inner button gets ID without '-switch' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for switch.\n\t * When provided, inner button gets name without '-switch' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Size of the switch.\n\t * Drives the size-keyed registry style rules via the `data-size` attribute.\n\t * @default 'default'\n\t */\n\tpublic readonly size = input<BrnSwitchSize>('default');\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this switch for accessibility.\n\t * Auto-set when switch is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this switch for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether switch is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether switch is disabled.\n\t * Disabled switches cannot be toggled and indicate disabled state with data attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/**\n\t * Keyboard tab order for switch.\n\t * @default 0\n\t */\n\tpublic readonly tabIndex = input<number, NumberInput>(0, { transform: numberAttribute });\n\n\t/**\n\t * Event emitted when switch is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tpublic readonly switch = viewChild.required<ElementRef<HTMLInputElement>>('switch');\n\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tpublic readonly controlState = this._fieldControl?.controlState;\n\n\tprotected readonly _invalid = this._fieldControl?.invalid;\n\tprotected readonly _touched = this._fieldControl?.touched;\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _spartanInvalid = this._fieldControl?.spartanInvalid;\n\n\tpublic readonly labelableId = computed(() => this.getSwitchButtonId(this._state().id));\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst switchButtonId = this.getSwitchButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${switchButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles switch between checked/unchecked states.\n\t * Does nothing if switch is disabled.\n\t */\n\tprotected toggle(): void {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tthis.checked.update((checked) => !checked);\n\t\tthis._onChange(this.checked());\n\t\tthis.checkedChange.emit(this.checked());\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (!this.switch()) return;\n\t\tthis.switch().nativeElement.value = this.checked() ? 'on' : 'off';\n\t\tthis.switch().nativeElement.dispatchEvent(new Event('change'));\n\t}\n\n\tpublic ngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-switch' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getSwitchButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checked state\n\t */\n\tpublic writeValue(value: boolean): void {\n\t\tthis.checked.set(Boolean(value));\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tpublic registerOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether switch should be disabled\n\t */\n\tpublic setDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { BrnSwitch } from './brn-switch';\n\n@Component({\n\tselector: 'brn-switch-thumb',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\trole: 'presentation',\n\t\t'[attr.data-state]': \"_switch.checked() ? 'checked' : 'unchecked'\",\n\t\t'(click)': '$event.preventDefault()',\n\t},\n\ttemplate: '',\n})\nexport class BrnSwitchThumb {\n\tprotected readonly _switch = inject(BrnSwitch);\n}\n","import { BrnSwitch } from './lib/brn-switch';\nimport { BrnSwitchThumb } from './lib/brn-switch-thumb';\n\nexport * from './lib/brn-switch';\nexport * from './lib/brn-switch-thumb';\n\nexport const BrnSwitchImports = [BrnSwitch, BrnSwitchThumb] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA,KAAK,EAAE,IAAI;;AAKZ,MAAM,kBAAkB,GAAG,SAAS;AAEpC,IAAI,eAAe,GAAG,CAAC;MAqDV,SAAS,CAAA;AACJ,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAC7B,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACnD,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5B,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEzD,IAAA,aAAa,GAAG,MAAM,CAAC,KAAK,oFAAC;AAC7B,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,+EAAC;AAE3C;;;AAGG;AACa,IAAA,YAAY,GAAG,KAAK,CAAwB,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,cAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,KAAK,EAAE,SAAS,EAA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EAAE,yBAAyB;AACpC,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACZ,iBAAA;;;MCNY,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;;ACN1D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-switch.mjs","sources":["../../../../libs/brain/switch/src/lib/brn-switch.ts","../../../../libs/brain/switch/src/lib/brn-switch-thumb.ts","../../../../libs/brain/switch/src/index.ts","../../../../libs/brain/switch/src/spartan-ng-brain-switch.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tnumberAttribute,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_SWITCH_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSwitch),\n\tmulti: true,\n};\n\nexport type BrnSwitchSize = 'default' | 'sm';\n\nconst CONTAINER_POST_FIX = '-switch';\n\nlet uniqueIdCounter = 0;\n\n@Component({\n\tselector: 'brn-switch',\n\tproviders: [BRN_SWITCH_VALUE_ACCESSOR, provideBrnLabelable(BrnSwitch)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': 'hostStyles()',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\": null',\n\t\t'[attr.data-touched]': '_touched?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': '_spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#switch\n\t\t\trole=\"switch\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.data-size]=\"size()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[id]=\"getSwitchButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getSwitchButtonId(_state().name) ?? ''\"\n\t\t\t[value]=\"checked() ? 'on' : 'off'\"\n\t\t\t[attr.aria-checked]=\"checked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.aria-invalid]=\"_invalid?.() ? 'true' : null\"\n\t\t\t[attr.data-dirty]=\"_dirty?.() ? 'true' : null\"\n\t\t\t[attr.data-touched]=\"_touched?.() ? 'true' : null\"\n\t\t\t[attr.data-matches-spartan-invalid]=\"_spartanInvalid?.() ? 'true' : null\"\n\t\t\t[attr.data-state]=\"checked() ? 'checked' : 'unchecked'\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"tabIndex()\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content select=\"brn-switch-thumb\" />\n\t\t</button>\n\t`,\n})\nexport class BrnSwitch implements AfterContentInit, OnDestroy, ControlValueAccessor {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Whether switch is checked/toggled on.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checkedInput = input<boolean, BooleanInput>(false, { alias: 'checked', transform: booleanAttribute });\n\tpublic readonly checked = linkedSignal(this.checkedInput);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Unique identifier for switch component.\n\t * When provided, inner button gets ID without '-switch' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for switch.\n\t * When provided, inner button gets name without '-switch' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Styles applied to the host element. Bound via `[style]` so they apply through the CSSOM and are\n\t * not blocked by a strict Content-Security-Policy.\n\t */\n\tpublic readonly hostStyles = input<string>('display: contents');\n\n\t/**\n\t * Size of the switch.\n\t * Drives the size-keyed registry style rules via the `data-size` attribute.\n\t * @default 'default'\n\t */\n\tpublic readonly size = input<BrnSwitchSize>('default');\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this switch for accessibility.\n\t * Auto-set when switch is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this switch for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether switch is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether switch is disabled.\n\t * Disabled switches cannot be toggled and indicate disabled state with data attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/**\n\t * Keyboard tab order for switch.\n\t * @default 0\n\t */\n\tpublic readonly tabIndex = input<number, NumberInput>(0, { transform: numberAttribute });\n\n\t/**\n\t * Event emitted when switch is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tpublic readonly switch = viewChild.required<ElementRef<HTMLInputElement>>('switch');\n\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tpublic readonly controlState = this._fieldControl?.controlState;\n\n\tprotected readonly _invalid = this._fieldControl?.invalid;\n\tprotected readonly _touched = this._fieldControl?.touched;\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _spartanInvalid = this._fieldControl?.spartanInvalid;\n\n\tpublic readonly labelableId = computed(() => this.getSwitchButtonId(this._state().id));\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst switchButtonId = this.getSwitchButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${switchButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles switch between checked/unchecked states.\n\t * Does nothing if switch is disabled.\n\t */\n\tprotected toggle(): void {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tthis.checked.update((checked) => !checked);\n\t\tthis._onChange(this.checked());\n\t\tthis.checkedChange.emit(this.checked());\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (!this.switch()) return;\n\t\tthis.switch().nativeElement.value = this.checked() ? 'on' : 'off';\n\t\tthis.switch().nativeElement.dispatchEvent(new Event('change'));\n\t}\n\n\tpublic ngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-switch' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getSwitchButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checked state\n\t */\n\tpublic writeValue(value: boolean): void {\n\t\tthis.checked.set(Boolean(value));\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tpublic registerOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether switch should be disabled\n\t */\n\tpublic setDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { BrnSwitch } from './brn-switch';\n\n@Component({\n\tselector: 'brn-switch-thumb',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\trole: 'presentation',\n\t\t'[attr.data-state]': \"_switch.checked() ? 'checked' : 'unchecked'\",\n\t\t'(click)': '$event.preventDefault()',\n\t},\n\ttemplate: '',\n})\nexport class BrnSwitchThumb {\n\tprotected readonly _switch = inject(BrnSwitch);\n}\n","import { BrnSwitch } from './lib/brn-switch';\nimport { BrnSwitchThumb } from './lib/brn-switch-thumb';\n\nexport * from './lib/brn-switch';\nexport * from './lib/brn-switch-thumb';\n\nexport const BrnSwitchImports = [BrnSwitch, BrnSwitchThumb] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA,KAAK,EAAE,IAAI;;AAKZ,MAAM,kBAAkB,GAAG,SAAS;AAEpC,IAAI,eAAe,GAAG,CAAC;MAqDV,SAAS,CAAA;AACJ,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAC7B,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAA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A,CAAA;AACD,iBAAA;o1CAuG0E,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MCvLtE,cAAc,CAAA;AACP,IAAA,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC;2HADlC,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,mQAFhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEA,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACL,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,mBAAmB,EAAE,6CAA6C;AAClE,wBAAA,SAAS,EAAE,yBAAyB;AACpC,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACZ,iBAAA;;;MCNY,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;;ACN1D;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spartan-ng/brain",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-alpha.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/spartan-ng/spartan.git"
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
"types": "./types/spartan-ng-brain-core.d.ts",
|
|
61
61
|
"default": "./fesm2022/spartan-ng-brain-core.mjs"
|
|
62
62
|
},
|
|
63
|
+
"./date-picker": {
|
|
64
|
+
"types": "./types/spartan-ng-brain-date-picker.d.ts",
|
|
65
|
+
"default": "./fesm2022/spartan-ng-brain-date-picker.mjs"
|
|
66
|
+
},
|
|
63
67
|
"./date-time": {
|
|
64
68
|
"types": "./types/spartan-ng-brain-date-time.d.ts",
|
|
65
69
|
"default": "./fesm2022/spartan-ng-brain-date-time.mjs"
|
|
@@ -488,7 +488,209 @@ declare class BrnCalendarRange<T> implements BrnCalendarBase<T> {
|
|
|
488
488
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnCalendarRange<any>, "[brnCalendarRange]", never, { "highlightDays": { "alias": "highlightDays"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dateDisabled": { "alias": "dateDisabled"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "defaultFocusedDate": { "alias": "defaultFocusedDate"; "required": false; "isSignal": true; }; "startDate": { "alias": "startDate"; "required": false; "isSignal": true; }; "endDate": { "alias": "endDate"; "required": false; "isSignal": true; }; }, { "startDate": "startDateChange"; "endDate": "endDateChange"; }, ["header"], never, true, never>;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
|
|
491
|
+
/** The available views of the month/year selector. */
|
|
492
|
+
type BrnMonthYearCalendarView = 'year' | 'month';
|
|
493
|
+
/** A focusable cell (month or year button) registered with the month/year selector. */
|
|
494
|
+
interface BrnMonthYearCalendarCell<T> {
|
|
495
|
+
/** The date represented by the cell. */
|
|
496
|
+
value: Signal<T>;
|
|
497
|
+
/** Focus the cell. */
|
|
498
|
+
focus(): void;
|
|
499
|
+
}
|
|
500
|
+
interface BrnMonthYearCalendarBase<T> {
|
|
501
|
+
/** The current view of the month/year selector. */
|
|
502
|
+
view: WritableSignal<BrnMonthYearCalendarView>;
|
|
503
|
+
/** The currently focused date. */
|
|
504
|
+
focusedDate: WritableSignal<T>;
|
|
505
|
+
/** Whether the month/year selector is disabled. */
|
|
506
|
+
disabled: Signal<boolean>;
|
|
507
|
+
/** The header directive, used to label the grid. */
|
|
508
|
+
header: Signal<BrnMonthYearCalendarHeader | undefined>;
|
|
509
|
+
/** The 12 months of the focused year. */
|
|
510
|
+
months: Signal<T[]>;
|
|
511
|
+
/** The years of the current page. */
|
|
512
|
+
years: Signal<T[]>;
|
|
513
|
+
/** The first and last year of the current page. */
|
|
514
|
+
yearRange: Signal<{
|
|
515
|
+
start: number;
|
|
516
|
+
end: number;
|
|
517
|
+
}>;
|
|
518
|
+
/** Select a month, updating the value. */
|
|
519
|
+
selectMonth: (date: T) => void;
|
|
520
|
+
/** Select a year, moving to the month view. */
|
|
521
|
+
selectYear: (date: T) => void;
|
|
522
|
+
/** Whether the given month is selected. */
|
|
523
|
+
isMonthSelected: (date: T) => boolean;
|
|
524
|
+
/** Whether the given year is selected. */
|
|
525
|
+
isYearSelected: (date: T) => boolean;
|
|
526
|
+
/** Whether the given month is today's month. */
|
|
527
|
+
isMonthToday: (date: T) => boolean;
|
|
528
|
+
/** Whether the given year is the current year. */
|
|
529
|
+
isYearToday: (date: T) => boolean;
|
|
530
|
+
/** Whether the given month is disabled. */
|
|
531
|
+
isMonthDisabled: (date: T) => boolean;
|
|
532
|
+
/** Whether the given year is disabled. */
|
|
533
|
+
isYearDisabled: (date: T) => boolean;
|
|
534
|
+
/** Move focus to the given month, adjusting the year if needed. */
|
|
535
|
+
setFocusedMonth: (date: T) => void;
|
|
536
|
+
/** Move focus to the given year, paging if needed. */
|
|
537
|
+
setFocusedYear: (date: T) => void;
|
|
538
|
+
/** Navigate to the previous year or page of years. */
|
|
539
|
+
goToPrevious: () => void;
|
|
540
|
+
/** Navigate to the next year or page of years. */
|
|
541
|
+
goToNext: () => void;
|
|
542
|
+
/** Whether navigating to the previous page/year is disabled. */
|
|
543
|
+
isPreviousDisabled: () => boolean;
|
|
544
|
+
/** Whether navigating to the next page/year is disabled. */
|
|
545
|
+
isNextDisabled: () => boolean;
|
|
546
|
+
registerCell(cell: BrnMonthYearCalendarCell<T>): void;
|
|
547
|
+
unregisterCell(cell: BrnMonthYearCalendarCell<T>): void;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class BrnMonthYearCalendarHeader {
|
|
551
|
+
/** The unique id for the header */
|
|
552
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
553
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<unknown>;
|
|
554
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarHeader, never>;
|
|
555
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarHeader, "button[brnMonthYearCalendarHeader]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
declare class BrnMonthYearCalendar<T> implements BrnMonthYearCalendarBase<T> {
|
|
559
|
+
/** Access the date adapter */
|
|
560
|
+
protected readonly _dateAdapter: _spartan_ng_brain_date_time.BrnDateAdapter<T>;
|
|
561
|
+
/** Access the change detector */
|
|
562
|
+
private readonly _changeDetector;
|
|
563
|
+
/** Access the injector */
|
|
564
|
+
private readonly _injector;
|
|
565
|
+
/** The minimum date that can be selected. */
|
|
566
|
+
readonly min: _angular_core.InputSignal<T | undefined>;
|
|
567
|
+
/** The maximum date that can be selected. */
|
|
568
|
+
readonly max: _angular_core.InputSignal<T | undefined>;
|
|
569
|
+
/** Whether the month/year selector is disabled. */
|
|
570
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
571
|
+
/** The selected month. Represented by the first day of the month. */
|
|
572
|
+
readonly date: _angular_core.ModelSignal<T | undefined>;
|
|
573
|
+
/** The default focused date. */
|
|
574
|
+
readonly defaultFocusedDate: _angular_core.InputSignal<T | undefined>;
|
|
575
|
+
/** The current view. The year view is shown first. */
|
|
576
|
+
readonly viewInput: _angular_core.InputSignal<BrnMonthYearCalendarView>;
|
|
577
|
+
/** The current view mutable. The year view is shown first. */
|
|
578
|
+
readonly view: _angular_core.WritableSignal<BrnMonthYearCalendarView>;
|
|
579
|
+
/** @internal Access the header */
|
|
580
|
+
readonly header: _angular_core.Signal<BrnMonthYearCalendarHeader | undefined>;
|
|
581
|
+
/** The focused date. */
|
|
582
|
+
readonly focusedDate: _angular_core.WritableSignal<T>;
|
|
583
|
+
private readonly _cells;
|
|
584
|
+
/** The 12 months of the currently focused year. */
|
|
585
|
+
readonly months: _angular_core.Signal<T[]>;
|
|
586
|
+
/** The first and last year of the current page. */
|
|
587
|
+
readonly yearRange: _angular_core.Signal<{
|
|
588
|
+
start: number;
|
|
589
|
+
end: number;
|
|
590
|
+
}>;
|
|
591
|
+
/** The years of the current page. */
|
|
592
|
+
readonly years: _angular_core.Signal<T[]>;
|
|
593
|
+
/** @internal Constrain a date to the min and max boundaries. */
|
|
594
|
+
constrainDate(date: T): T;
|
|
595
|
+
selectMonth(date: T): void;
|
|
596
|
+
selectYear(date: T): void;
|
|
597
|
+
isMonthSelected(date: T): boolean;
|
|
598
|
+
isYearSelected(date: T): boolean;
|
|
599
|
+
isMonthToday(date: T): boolean;
|
|
600
|
+
isYearToday(date: T): boolean;
|
|
601
|
+
isMonthDisabled(date: T): boolean;
|
|
602
|
+
isYearDisabled(date: T): boolean;
|
|
603
|
+
setFocusedMonth(date: T): void;
|
|
604
|
+
setFocusedYear(date: T): void;
|
|
605
|
+
goToPrevious(): void;
|
|
606
|
+
goToNext(): void;
|
|
607
|
+
isPreviousDisabled(): boolean;
|
|
608
|
+
isNextDisabled(): boolean;
|
|
609
|
+
private _focusCell;
|
|
610
|
+
registerCell(cell: BrnMonthYearCalendarCell<T>): void;
|
|
611
|
+
unregisterCell(cell: BrnMonthYearCalendarCell<T>): void;
|
|
612
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendar<any>, never>;
|
|
613
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendar<any>, "[brnMonthYearCalendar]", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "defaultFocusedDate": { "alias": "defaultFocusedDate"; "required": false; "isSignal": true; }; "viewInput": { "alias": "view"; "required": false; "isSignal": true; }; }, { "date": "dateChange"; }, ["header"], never, true, never>;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
declare class BrnMonthYearCalendarGrid<T> {
|
|
617
|
+
/** Access the month/year selector */
|
|
618
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<T>;
|
|
619
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarGrid<any>, never>;
|
|
620
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarGrid<any>, "[brnMonthYearCalendarGrid]", never, {}, {}, never, never, true, never>;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
declare class BrnMonthYearCalendarMonthButton<T> {
|
|
624
|
+
/** Access the date adapter */
|
|
625
|
+
protected readonly _dateAdapter: _spartan_ng_brain_date_time.BrnDateAdapter<T>;
|
|
626
|
+
/** Access the month/year selector */
|
|
627
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<T>;
|
|
628
|
+
/** Access the element ref */
|
|
629
|
+
private readonly _elementRef;
|
|
630
|
+
private readonly _destroyRef;
|
|
631
|
+
/** The month this cell represents. */
|
|
632
|
+
readonly date: _angular_core.InputSignal<T>;
|
|
633
|
+
/** Expose the value for the month/year selector's focus tracking. */
|
|
634
|
+
readonly value: _angular_core.InputSignal<T>;
|
|
635
|
+
readonly selected: _angular_core.Signal<boolean>;
|
|
636
|
+
readonly today: _angular_core.Signal<boolean>;
|
|
637
|
+
readonly disabled: _angular_core.Signal<boolean>;
|
|
638
|
+
readonly focusable: _angular_core.Signal<boolean>;
|
|
639
|
+
constructor();
|
|
640
|
+
protected focusOffset(event: Event, offset: number): void;
|
|
641
|
+
protected focusMonth(event: Event, month: number): void;
|
|
642
|
+
protected focusYearOffset(event: Event, offset: number): void;
|
|
643
|
+
protected getDirection(): 'ltr' | 'rtl';
|
|
644
|
+
focus(): void;
|
|
645
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarMonthButton<any>, never>;
|
|
646
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarMonthButton<any>, "button[brnMonthYearCalendarMonthButton]", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
declare class BrnMonthYearCalendarNextButton {
|
|
650
|
+
/** Access the month/year selector */
|
|
651
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<unknown>;
|
|
652
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
653
|
+
protected readonly _label: _angular_core.Signal<"Go to the next year" | "Go to the next years">;
|
|
654
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarNextButton, never>;
|
|
655
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarNextButton, "button[brnMonthYearCalendarNextButton]", never, {}, {}, never, never, true, never>;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
declare class BrnMonthYearCalendarPreviousButton {
|
|
659
|
+
/** Access the month/year selector */
|
|
660
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<unknown>;
|
|
661
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
662
|
+
protected readonly _label: _angular_core.Signal<"Go to the previous year" | "Go to the previous years">;
|
|
663
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarPreviousButton, never>;
|
|
664
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarPreviousButton, "button[brnMonthYearCalendarPreviousButton]", never, {}, {}, never, never, true, never>;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare class BrnMonthYearCalendarYearButton<T> {
|
|
668
|
+
/** Access the date adapter */
|
|
669
|
+
protected readonly _dateAdapter: _spartan_ng_brain_date_time.BrnDateAdapter<T>;
|
|
670
|
+
/** Access the month/year selector */
|
|
671
|
+
protected readonly _monthYear: BrnMonthYearCalendarBase<T>;
|
|
672
|
+
/** Access the element ref */
|
|
673
|
+
private readonly _elementRef;
|
|
674
|
+
private readonly _destroyRef;
|
|
675
|
+
/** The year this cell represents. */
|
|
676
|
+
readonly date: _angular_core.InputSignal<T>;
|
|
677
|
+
/** Expose the value for the month/year selector's focus tracking. */
|
|
678
|
+
readonly value: _angular_core.InputSignal<T>;
|
|
679
|
+
readonly selected: _angular_core.Signal<boolean>;
|
|
680
|
+
readonly today: _angular_core.Signal<boolean>;
|
|
681
|
+
readonly disabled: _angular_core.Signal<boolean>;
|
|
682
|
+
readonly focusable: _angular_core.Signal<boolean>;
|
|
683
|
+
protected readonly _yearsPerPage = 12;
|
|
684
|
+
constructor();
|
|
685
|
+
protected focusOffset(event: Event, offset: number): void;
|
|
686
|
+
protected focusYear(event: Event, year: number): void;
|
|
687
|
+
protected getDirection(): 'ltr' | 'rtl';
|
|
688
|
+
focus(): void;
|
|
689
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnMonthYearCalendarYearButton<any>, never>;
|
|
690
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnMonthYearCalendarYearButton<any>, "button[brnMonthYearCalendarYearButton]", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
declare const BrnCalendarImports: readonly [typeof BrnCalendarCellButton, typeof BrnCalendarGrid, typeof BrnCalendarHeader, typeof BrnCalendarNextButton, typeof BrnCalendarPreviousButton, typeof BrnCalendarWeek, typeof BrnCalendarWeekday, typeof BrnCalendar, typeof BrnCalendarCell, typeof BrnCalendarMulti, typeof BrnCalendarRange, typeof BrnCalendarMonthSelect, typeof BrnCalendarYearSelect, typeof BrnMonthYearCalendar, typeof BrnMonthYearCalendarGrid, typeof BrnMonthYearCalendarHeader, typeof BrnMonthYearCalendarMonthButton, typeof BrnMonthYearCalendarNextButton, typeof BrnMonthYearCalendarPreviousButton, typeof BrnMonthYearCalendarYearButton];
|
|
492
694
|
|
|
493
|
-
export { BrnCalendar, BrnCalendarCell, BrnCalendarCellButton, BrnCalendarGrid, BrnCalendarHeader, BrnCalendarI18nService, BrnCalendarI18nToken, BrnCalendarImports, BrnCalendarMonthSelect, BrnCalendarMulti, BrnCalendarNextButton, BrnCalendarPreviousButton, BrnCalendarRange, BrnCalendarToken, BrnCalendarWeek, BrnCalendarWeekday, BrnCalendarYearSelect, injectBrnCalendar, injectBrnCalendarI18n, provideBrnCalendar, provideBrnCalendarI18n };
|
|
695
|
+
export { BrnCalendar, BrnCalendarCell, BrnCalendarCellButton, BrnCalendarGrid, BrnCalendarHeader, BrnCalendarI18nService, BrnCalendarI18nToken, BrnCalendarImports, BrnCalendarMonthSelect, BrnCalendarMulti, BrnCalendarNextButton, BrnCalendarPreviousButton, BrnCalendarRange, BrnCalendarToken, BrnCalendarWeek, BrnCalendarWeekday, BrnCalendarYearSelect, BrnMonthYearCalendar, BrnMonthYearCalendarGrid, BrnMonthYearCalendarHeader, BrnMonthYearCalendarMonthButton, BrnMonthYearCalendarNextButton, BrnMonthYearCalendarPreviousButton, BrnMonthYearCalendarYearButton, injectBrnCalendar, injectBrnCalendarI18n, provideBrnCalendar, provideBrnCalendarI18n };
|
|
494
696
|
export type { BrnCalendarBase, BrnCalendarI18n, MonthLabels, Weekday };
|