@frame-ui-ng/components 0.4.0-beta.0 → 0.4.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/confirm-popover/src/styles/confirm-popover.css +20 -0
- package/drag-drop/src/styles/_vars.css +28 -0
- package/drag-drop/src/styles/drag-drop.css +132 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs +26 -21
- package/fesm2022/frame-ui-ng-components-accordion.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-alert.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-avatar.mjs +7 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-badge.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs +13 -6
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-button-group.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-button.mjs +5 -0
- package/fesm2022/frame-ui-ng-components-button.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-calendar.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-card.mjs +15 -15
- package/fesm2022/frame-ui-ng-components-card.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-carousel.mjs +33 -16
- package/fesm2022/frame-ui-ng-components-carousel.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-checkbox.mjs +7 -9
- package/fesm2022/frame-ui-ng-components-checkbox.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-collapsible.mjs +24 -23
- package/fesm2022/frame-ui-ng-components-collapsible.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-combobox.mjs +66 -18
- package/fesm2022/frame-ui-ng-components-combobox.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-command.mjs +47 -16
- package/fesm2022/frame-ui-ng-components-command.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-confirm-modal.mjs +3 -0
- package/fesm2022/frame-ui-ng-components-confirm-modal.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-confirm-popover.mjs +423 -0
- package/fesm2022/frame-ui-ng-components-confirm-popover.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs +71 -45
- package/fesm2022/frame-ui-ng-components-context-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-date-picker.mjs +3 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-drag-drop.mjs +293 -0
- package/fesm2022/frame-ui-ng-components-drag-drop.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs +73 -36
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-empty.mjs +6 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-field.mjs +21 -12
- package/fesm2022/frame-ui-ng-components-field.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-forms.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-hover-card.mjs +49 -43
- package/fesm2022/frame-ui-ng-components-hover-card.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-input-otp.mjs +5 -0
- package/fesm2022/frame-ui-ng-components-input-otp.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-input.mjs +13 -0
- package/fesm2022/frame-ui-ng-components-input.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-item.mjs +10 -0
- package/fesm2022/frame-ui-ng-components-item.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-menubar.mjs +15 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-modal.mjs +128 -114
- package/fesm2022/frame-ui-ng-components-modal.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs +14 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-pagination.mjs +8 -0
- package/fesm2022/frame-ui-ng-components-pagination.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-popover.mjs +63 -51
- package/fesm2022/frame-ui-ng-components-popover.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-progress.mjs +2 -0
- package/fesm2022/frame-ui-ng-components-progress.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-radio-group.mjs +5 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-resizable.mjs +6 -0
- package/fesm2022/frame-ui-ng-components-resizable.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-select.mjs +62 -14
- package/fesm2022/frame-ui-ng-components-select.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-separator.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-sheet.mjs +99 -88
- package/fesm2022/frame-ui-ng-components-sheet.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-sidebar.mjs +27 -12
- package/fesm2022/frame-ui-ng-components-sidebar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-skeleton.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-slider.mjs +29 -16
- package/fesm2022/frame-ui-ng-components-slider.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-spinner.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-switch.mjs +6 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-table.mjs +76 -50
- package/fesm2022/frame-ui-ng-components-table.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-tabs.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-textarea.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-toast.mjs +2 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-toggle.mjs +23 -16
- package/fesm2022/frame-ui-ng-components-toggle.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-tooltip.mjs +30 -25
- package/fesm2022/frame-ui-ng-components-tooltip.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs +26 -8
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components.mjs +1387 -552
- package/fesm2022/frame-ui-ng-components.mjs.map +1 -1
- package/package.json +10 -2
- package/popover/src/styles/popover.css +106 -101
- package/src/styles/components.css +6 -4
- package/styles/components.css +6 -4
- package/styles.css +6 -4
- package/types/frame-ui-ng-components-accordion.d.ts +11 -4
- package/types/frame-ui-ng-components-alert.d.ts +4 -0
- package/types/frame-ui-ng-components-avatar.d.ts +7 -0
- package/types/frame-ui-ng-components-badge.d.ts +4 -0
- package/types/frame-ui-ng-components-breadcrumb.d.ts +7 -0
- package/types/frame-ui-ng-components-button-group.d.ts +1 -0
- package/types/frame-ui-ng-components-button.d.ts +5 -0
- package/types/frame-ui-ng-components-calendar.d.ts +1 -0
- package/types/frame-ui-ng-components-card.d.ts +8 -3
- package/types/frame-ui-ng-components-carousel.d.ts +11 -2
- package/types/frame-ui-ng-components-checkbox.d.ts +3 -2
- package/types/frame-ui-ng-components-collapsible.d.ts +9 -4
- package/types/frame-ui-ng-components-combobox.d.ts +32 -3
- package/types/frame-ui-ng-components-command.d.ts +26 -4
- package/types/frame-ui-ng-components-confirm-modal.d.ts +2 -0
- package/types/frame-ui-ng-components-confirm-popover.d.ts +87 -0
- package/types/frame-ui-ng-components-context-menu.d.ts +29 -10
- package/types/frame-ui-ng-components-date-picker.d.ts +1 -0
- package/types/frame-ui-ng-components-drag-drop.d.ts +103 -0
- package/types/frame-ui-ng-components-dropdown-menu.d.ts +32 -9
- package/types/frame-ui-ng-components-empty.d.ts +6 -0
- package/types/frame-ui-ng-components-field.d.ts +9 -0
- package/types/frame-ui-ng-components-forms.d.ts +1 -0
- package/types/frame-ui-ng-components-hover-card.d.ts +8 -2
- package/types/frame-ui-ng-components-input-otp.d.ts +4 -0
- package/types/frame-ui-ng-components-input.d.ts +13 -0
- package/types/frame-ui-ng-components-item.d.ts +10 -0
- package/types/frame-ui-ng-components-menubar.d.ts +15 -0
- package/types/frame-ui-ng-components-modal.d.ts +12 -0
- package/types/frame-ui-ng-components-navigation-menu.d.ts +14 -0
- package/types/frame-ui-ng-components-pagination.d.ts +8 -0
- package/types/frame-ui-ng-components-popover.d.ts +14 -2
- package/types/frame-ui-ng-components-progress.d.ts +2 -0
- package/types/frame-ui-ng-components-radio-group.d.ts +5 -0
- package/types/frame-ui-ng-components-resizable.d.ts +3 -0
- package/types/frame-ui-ng-components-select.d.ts +23 -2
- package/types/frame-ui-ng-components-separator.d.ts +1 -0
- package/types/frame-ui-ng-components-sheet.d.ts +11 -0
- package/types/frame-ui-ng-components-sidebar.d.ts +21 -0
- package/types/frame-ui-ng-components-skeleton.d.ts +1 -0
- package/types/frame-ui-ng-components-slider.d.ts +5 -2
- package/types/frame-ui-ng-components-spinner.d.ts +1 -0
- package/types/frame-ui-ng-components-switch.d.ts +6 -0
- package/types/frame-ui-ng-components-table.d.ts +26 -0
- package/types/frame-ui-ng-components-tabs.d.ts +4 -0
- package/types/frame-ui-ng-components-textarea.d.ts +1 -0
- package/types/frame-ui-ng-components-toast.d.ts +2 -0
- package/types/frame-ui-ng-components-toggle.d.ts +8 -2
- package/types/frame-ui-ng-components-tooltip.d.ts +6 -2
- package/types/frame-ui-ng-components-virtual-scroll.d.ts +11 -2
- package/types/frame-ui-ng-components.d.ts +492 -76
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-ui-ng-components-slider.mjs","sources":["../../../projects/components/slider/src/slider.ts","../../../projects/components/slider/slider.module.ts","../../../projects/components/slider/frame-ui-ng-components-slider.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n booleanAttribute,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\nimport { FrControlValueAccessor, provideDsValueAccessor } from '@frame-ui-ng/components/forms';\r\nimport { clampNumber, coerceNumber } from '@frame-ui-ng/components/utils';\r\n\r\nexport const FR_SLIDER_ORIENTATIONS = ['horizontal', 'vertical'] as const;\r\n\r\nexport type FrSliderOrientation = (typeof FR_SLIDER_ORIENTATIONS)[number];\r\nexport type FrSliderValue = number | number[];\r\n\r\nfunction coerceOrientation(value: unknown): FrSliderOrientation {\r\n return value === 'vertical' ? 'vertical' : 'horizontal';\r\n}\r\n\r\nfunction coerceValue(value: FrSliderValue | null | undefined): number[] {\r\n if (Array.isArray(value)) {\r\n return value.map((item) => coerceNumber(item, 0));\r\n }\r\n\r\n if (value === null || value === undefined) {\r\n return [0];\r\n }\r\n\r\n return [coerceNumber(value, 0)];\r\n}\r\n\r\n@Component({\r\n selector: 'frame-slider',\r\n exportAs: 'frSlider',\r\n providers: [provideDsValueAccessor(FrSlider)],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'frame-slider',\r\n '[attr.data-orientation]': 'orientation()',\r\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-invalid]': 'invalid() ? \"\" : null',\r\n '[attr.data-inverted]': 'inverted() ? \"\" : null',\r\n '[style.--frame-slider-start-percent]': 'rangeStartPercent() + \"%\"',\r\n '[style.--frame-slider-end-percent]': 'rangeEndPercent() + \"%\"',\r\n '(pointerdown)': 'handlePointerDown($event)',\r\n },\r\n template: `\r\n <span class=\"frame-slider__track\">\r\n <span class=\"frame-slider__range\"></span>\r\n </span>\r\n\r\n @for (thumb of values(); track $index) {\r\n <input\r\n class=\"frame-slider__native\"\r\n type=\"range\"\r\n [attr.aria-label]=\"thumbLabel($index)\"\r\n [attr.aria-valuetext]=\"valueText(thumb)\"\r\n [disabled]=\"disabled()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [step]=\"step()\"\r\n [value]=\"thumb\"\r\n (blur)=\"markTouched()\"\r\n (input)=\"handleNativeInput($index, $any($event.target).value)\"\r\n />\r\n <span\r\n class=\"frame-slider__thumb\"\r\n [attr.data-active]=\"activeThumb() === $index ? '' : null\"\r\n [style.--frame-slider-thumb-percent]=\"percentForValue(thumb) + '%'\"\r\n ></span>\r\n }\r\n `,\r\n})\r\nexport class FrSlider extends FrControlValueAccessor<FrSliderValue | null> {\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly document = inject(DOCUMENT);\r\n private controlledByInput = false;\r\n\r\n readonly min = input(0, { transform: numberAttribute });\r\n readonly max = input(100, { transform: numberAttribute });\r\n readonly step = input(1, { transform: numberAttribute });\r\n readonly minStepsBetweenThumbs = input(0, { transform: numberAttribute });\r\n readonly orientation = input<FrSliderOrientation, unknown>('horizontal', { transform: coerceOrientation });\r\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\r\n readonly invalidInput = input(false, { alias: 'invalid', transform: booleanAttribute });\r\n readonly inverted = input(false, { transform: booleanAttribute });\r\n readonly defaultValue = input<FrSliderValue>(0);\r\n readonly valueInput = input<FrSliderValue | null>(null, { alias: 'value' });\r\n readonly ariaLabel = input('Slider thumb', { alias: 'aria-label' });\r\n readonly formatValue = input<((value: number) => string) | null>(null);\r\n\r\n readonly valueChange = output<FrSliderValue>();\r\n\r\n protected readonly values = signal<number[]>([0]);\r\n protected readonly activeThumb = signal<number | null>(null);\r\n protected readonly disabled = computed(() => this.disabledInput() || this.formDisabled());\r\n protected readonly invalid = computed(() => this.invalidInput() || this.formInvalid());\r\n protected readonly rangeStartPercent = computed(() => {\r\n const values = this.values();\r\n return values.length > 1 ? this.percentForValue(values[0]) : 0;\r\n });\r\n protected readonly rangeEndPercent = computed(() => {\r\n const values = this.values();\r\n return this.percentForValue(values.at(-1) ?? this.min());\r\n });\r\n\r\n constructor() {\r\n super();\r\n\r\n effect(() => {\r\n const controlledValue = this.valueInput();\r\n\r\n if (controlledValue !== null) {\r\n this.controlledByInput = true;\r\n this.values.set(this.normalizeValues(coerceValue(controlledValue)));\r\n return;\r\n }\r\n\r\n if (!this.controlledByInput) {\r\n this.values.set(this.normalizeValues(coerceValue(this.defaultValue())));\r\n }\r\n });\r\n }\r\n\r\n protected setViewValue(value: FrSliderValue | null): void {\r\n if (value === null || value === undefined) {\r\n this.values.set(this.normalizeValues(coerceValue(this.defaultValue())));\r\n return;\r\n }\r\n\r\n this.values.set(this.normalizeValues(coerceValue(value)));\r\n }\r\n\r\n protected handleNativeInput(index: number, rawValue: string): void {\r\n this.commitThumbValue(index, Number(rawValue));\r\n }\r\n\r\n protected markTouched(): void {\r\n this.markAsTouched();\r\n }\r\n\r\n protected handlePointerDown(event: PointerEvent): void {\r\n if (this.disabled() || event.button !== 0) {\r\n return;\r\n }\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target?.classList.contains('frame-slider__native')) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n const index = this.closestThumbIndex(this.valueFromPointer(event));\r\n this.activeThumb.set(index);\r\n this.commitThumbValue(index, this.valueFromPointer(event));\r\n\r\n const move = (moveEvent: PointerEvent) => {\r\n moveEvent.preventDefault();\r\n this.commitThumbValue(index, this.valueFromPointer(moveEvent));\r\n };\r\n\r\n const up = () => {\r\n this.document.removeEventListener('pointermove', move);\r\n this.document.removeEventListener('pointerup', up);\r\n this.activeThumb.set(null);\r\n this.markTouched();\r\n };\r\n\r\n this.document.addEventListener('pointermove', move);\r\n this.document.addEventListener('pointerup', up, { once: true });\r\n }\r\n\r\n protected thumbLabel(index: number): string {\r\n const count = this.values().length;\r\n\r\n if (count === 1) {\r\n return this.ariaLabel();\r\n }\r\n\r\n if (index === 0) {\r\n return `${this.ariaLabel()} minimum`;\r\n }\r\n\r\n if (index === count - 1) {\r\n return `${this.ariaLabel()} maximum`;\r\n }\r\n\r\n return `${this.ariaLabel()} ${index + 1}`;\r\n }\r\n\r\n protected valueText(value: number): string {\r\n return this.formatValue()?.(value) ?? String(value);\r\n }\r\n\r\n protected percentForValue(value: number): number {\r\n const min = this.min();\r\n const max = this.max();\r\n const range = max - min;\r\n\r\n if (range <= 0) {\r\n return 0;\r\n }\r\n\r\n return ((value - min) / range) * 100;\r\n }\r\n\r\n private commitThumbValue(index: number, rawValue: number): void {\r\n const next = [...this.values()];\r\n next[index] = rawValue;\r\n const normalized = this.normalizeValues(next, index);\r\n this.values.set(normalized);\r\n\r\n const emitted = this.toExternalValue(normalized);\r\n this.notifyValueChange(emitted);\r\n this.valueChange.emit(emitted);\r\n }\r\n\r\n private normalizeValues(values: number[], activeIndex = -1): number[] {\r\n const min = Math.min(this.min(), this.max());\r\n const max = Math.max(this.min(), this.max());\r\n const step = Math.max(this.step(), 0.000001);\r\n const minDistance = Math.max(this.minStepsBetweenThumbs(), 0) * step;\r\n const normalized = values.length ? values : [min];\r\n\r\n return normalized.map((value, index) => {\r\n const previous = index > 0 ? normalized[index - 1] + minDistance : min;\r\n const next = index < normalized.length - 1 ? normalized[index + 1] - minDistance : max;\r\n const lower = activeIndex === index ? previous : min;\r\n const upper = activeIndex === index ? next : max;\r\n return this.snap(clampNumber(value, lower, upper), min, step);\r\n });\r\n }\r\n\r\n private snap(value: number, min: number, step: number): number {\r\n const decimals = String(step).split('.')[1]?.length ?? 0;\r\n return Number((Math.round((value - min) / step) * step + min).toFixed(decimals));\r\n }\r\n\r\n private toExternalValue(values: number[]): FrSliderValue {\r\n return values.length === 1 ? values[0] : values;\r\n }\r\n\r\n private valueFromPointer(event: PointerEvent): number {\r\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\r\n const horizontal = this.orientation() === 'horizontal';\r\n const size = horizontal ? rect.width : rect.height;\r\n const offset = horizontal ? event.clientX - rect.left : rect.bottom - event.clientY;\r\n const direction = horizontal && this.isRtl() ? -1 : 1;\r\n let percent = size > 0 ? offset / size : 0;\r\n\r\n if (direction === -1) {\r\n percent = 1 - percent;\r\n }\r\n\r\n if (this.inverted()) {\r\n percent = 1 - percent;\r\n }\r\n\r\n return this.min() + clampNumber(percent, 0, 1) * (this.max() - this.min());\r\n }\r\n\r\n private closestThumbIndex(value: number): number {\r\n return this.values().reduce((closestIndex, thumb, index, values) => {\r\n const currentDistance = Math.abs(value - thumb);\r\n const closestDistance = Math.abs(value - values[closestIndex]);\r\n return currentDistance < closestDistance ? index : closestIndex;\r\n }, 0);\r\n }\r\n\r\n private isRtl(): boolean {\r\n return getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\n\nimport { FrSlider } from './src/slider';\n\n@NgModule({\n imports: [FrSlider],\n exports: [FrSlider],\n})\nexport class FrSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU;AAK/D,SAAS,iBAAiB,CAAC,KAAc,EAAA;IACvC,OAAO,KAAK,KAAK,UAAU,GAAG,UAAU,GAAG,YAAY;AACzD;AAEA,SAAS,WAAW,CAAC,KAAuC,EAAA;AAC1D,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACxB,QAAA,OAAO,KAAK,CAAC,GAA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AAA,SAAS,EAAE,CAAC,sBAAsB,CAAA,QAAA,CAAU,CAAC;oBAC7C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,cAAc;AACrB,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,sBAAsB,EAAE,wBAAwB;AAChD,wBAAA,qBAAqB,EAAE,uBAAuB;AAC9C,wBAAA,sBAAsB,EAAE,wBAAwB;AAChD,wBAAA,sCAAsC,EAAE,2BAA2B;AACnE,wBAAA,oCAAoC,EAAE,yBAAyB;AAC/D,wBAAA,eAAe,EAAE,2BAA2B;AAC7C,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA;AACF,iBAAA;;;MCxEY,cAAc,CAAA;wGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAd,cAAc,EAAA,OAAA,EAAA,CAHf,QAAQ,CAAA,EAAA,OAAA,EAAA,CACR,QAAQ,CAAA,EAAA,CAAA;yGAEP,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,QAAQ,CAAC;oBACnB,OAAO,EAAE,CAAC,QAAQ,CAAC;AACpB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"frame-ui-ng-components-slider.mjs","sources":["../../../projects/components/slider/src/slider.ts","../../../projects/components/slider/slider.module.ts","../../../projects/components/slider/frame-ui-ng-components-slider.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DoCheck,\r\n ElementRef,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n numberAttribute,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\nimport { FrControlValueAccessor, provideDsValueAccessor } from '@frame-ui-ng/components/forms';\r\nimport { clampNumber, coerceNumber } from '@frame-ui-ng/components/utils';\r\n\r\nexport const FR_SLIDER_ORIENTATIONS = ['horizontal', 'vertical'] as const;\r\n\r\nexport type FrSliderOrientation = (typeof FR_SLIDER_ORIENTATIONS)[number];\r\nexport type FrSliderValue = number | number[];\r\n\r\nfunction coerceOrientation(value: unknown): FrSliderOrientation {\r\n return value === 'vertical' ? 'vertical' : 'horizontal';\r\n}\r\n\r\nfunction coerceValue(value: FrSliderValue | null | undefined): number[] {\r\n if (Array.isArray(value)) {\r\n return value.map((item) => coerceNumber(item, 0));\r\n }\r\n\r\n if (value === null || value === undefined) {\r\n return [0];\r\n }\r\n\r\n return [coerceNumber(value, 0)];\r\n}\r\n\r\n/** Slider control with single and range value support. */\r\n@Component({\r\n selector: 'frame-slider',\r\n exportAs: 'frSlider',\r\n providers: [provideDsValueAccessor(FrSlider)],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'frame-slider',\r\n '[attr.data-orientation]': 'orientation()',\r\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-invalid]': 'invalid() ? \"\" : null',\r\n '[attr.data-inverted]': 'inverted() ? \"\" : null',\r\n '[style.--frame-slider-start-percent]': 'rangeStartPercent() + \"%\"',\r\n '[style.--frame-slider-end-percent]': 'rangeEndPercent() + \"%\"',\r\n '(pointerdown)': 'handlePointerDown($event)',\r\n },\r\n template: `\r\n <span class=\"frame-slider__track\">\r\n <span class=\"frame-slider__range\"></span>\r\n </span>\r\n\r\n @for (thumb of values(); track $index) {\r\n <input\r\n class=\"frame-slider__native\"\r\n type=\"range\"\r\n [attr.aria-label]=\"thumbLabel($index)\"\r\n [attr.aria-valuetext]=\"valueText(thumb)\"\r\n [disabled]=\"disabled()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [step]=\"step()\"\r\n [value]=\"thumb\"\r\n (blur)=\"markTouched()\"\r\n (input)=\"handleNativeInput($index, $any($event.target).value)\"\r\n />\r\n <span\r\n class=\"frame-slider__thumb\"\r\n [attr.data-active]=\"activeThumb() === $index ? '' : null\"\r\n [style.--frame-slider-thumb-percent]=\"percentForValue(thumb) + '%'\"\r\n ></span>\r\n }\r\n `,\r\n})\r\nexport class FrSlider extends FrControlValueAccessor<FrSliderValue | null> implements DoCheck {\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly document = inject(DOCUMENT);\r\n private controlledByInput = false;\r\n private lastInputKey = '';\r\n\r\n readonly min = input(0, { transform: numberAttribute });\r\n readonly max = input(100, { transform: numberAttribute });\r\n readonly step = input(1, { transform: numberAttribute });\r\n readonly minStepsBetweenThumbs = input(0, { transform: numberAttribute });\r\n readonly orientation = input<FrSliderOrientation, unknown>('horizontal', { transform: coerceOrientation });\r\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\r\n readonly invalidInput = input(false, { alias: 'invalid', transform: booleanAttribute });\r\n readonly inverted = input(false, { transform: booleanAttribute });\r\n readonly defaultValue = input<FrSliderValue>(0);\r\n readonly valueInput = input<FrSliderValue | null>(null, { alias: 'value' });\r\n readonly ariaLabel = input('Slider thumb', { alias: 'aria-label' });\r\n readonly formatValue = input<((value: number) => string) | null>(null);\r\n\r\n readonly valueChange = output<FrSliderValue>();\r\n\r\n protected readonly values = signal<number[]>([0]);\r\n protected readonly activeThumb = signal<number | null>(null);\r\n protected readonly disabled = computed(() => this.disabledInput() || this.formDisabled());\r\n protected readonly invalid = computed(() => this.invalidInput() || this.formInvalid());\r\n protected readonly rangeStartPercent = computed(() => {\r\n const values = this.values();\r\n return values.length > 1 ? this.percentForValue(values[0]) : 0;\r\n });\r\n protected readonly rangeEndPercent = computed(() => {\r\n const values = this.values();\r\n return this.percentForValue(values.at(-1) ?? this.min());\r\n });\r\n\r\n ngDoCheck(): void {\r\n const inputKey = [\r\n this.valueInput(),\r\n this.defaultValue(),\r\n this.min(),\r\n this.max(),\r\n this.step(),\r\n this.minStepsBetweenThumbs(),\r\n ].map((value) => (Array.isArray(value) ? value.join(',') : String(value))).join('|');\r\n\r\n if (inputKey === this.lastInputKey) {\r\n return;\r\n }\r\n\r\n this.lastInputKey = inputKey;\r\n\r\n const controlledValue = this.valueInput();\r\n if (controlledValue !== null) {\r\n this.controlledByInput = true;\r\n this.values.set(this.normalizeValues(coerceValue(controlledValue)));\r\n return;\r\n }\r\n\r\n if (!this.controlledByInput) {\r\n this.values.set(this.normalizeValues(coerceValue(this.defaultValue())));\r\n }\r\n }\r\n\r\n protected setViewValue(value: FrSliderValue | null): void {\r\n if (value === null || value === undefined) {\r\n this.values.set(this.normalizeValues(coerceValue(this.defaultValue())));\r\n return;\r\n }\r\n\r\n this.values.set(this.normalizeValues(coerceValue(value)));\r\n }\r\n\r\n protected handleNativeInput(index: number, rawValue: string): void {\r\n this.commitThumbValue(index, Number(rawValue));\r\n }\r\n\r\n protected markTouched(): void {\r\n this.markAsTouched();\r\n }\r\n\r\n protected handlePointerDown(event: PointerEvent): void {\r\n if (this.disabled() || event.button !== 0) {\r\n return;\r\n }\r\n\r\n const target = event.target as HTMLElement | null;\r\n if (target?.classList.contains('frame-slider__native')) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n const index = this.closestThumbIndex(this.valueFromPointer(event));\r\n this.activeThumb.set(index);\r\n this.commitThumbValue(index, this.valueFromPointer(event));\r\n\r\n const move = (moveEvent: PointerEvent) => {\r\n moveEvent.preventDefault();\r\n this.commitThumbValue(index, this.valueFromPointer(moveEvent));\r\n };\r\n\r\n const up = () => {\r\n this.document.removeEventListener('pointermove', move);\r\n this.document.removeEventListener('pointerup', up);\r\n this.activeThumb.set(null);\r\n this.markTouched();\r\n };\r\n\r\n this.document.addEventListener('pointermove', move);\r\n this.document.addEventListener('pointerup', up, { once: true });\r\n }\r\n\r\n protected thumbLabel(index: number): string {\r\n const count = this.values().length;\r\n\r\n if (count === 1) {\r\n return this.ariaLabel();\r\n }\r\n\r\n if (index === 0) {\r\n return `${this.ariaLabel()} minimum`;\r\n }\r\n\r\n if (index === count - 1) {\r\n return `${this.ariaLabel()} maximum`;\r\n }\r\n\r\n return `${this.ariaLabel()} ${index + 1}`;\r\n }\r\n\r\n protected valueText(value: number): string {\r\n return this.formatValue()?.(value) ?? String(value);\r\n }\r\n\r\n protected percentForValue(value: number): number {\r\n const min = this.min();\r\n const max = this.max();\r\n const range = max - min;\r\n\r\n if (range <= 0) {\r\n return 0;\r\n }\r\n\r\n return ((value - min) / range) * 100;\r\n }\r\n\r\n private commitThumbValue(index: number, rawValue: number): void {\r\n const next = [...this.values()];\r\n next[index] = rawValue;\r\n const normalized = this.normalizeValues(next, index);\r\n this.values.set(normalized);\r\n\r\n const emitted = this.toExternalValue(normalized);\r\n this.notifyValueChange(emitted);\r\n this.valueChange.emit(emitted);\r\n }\r\n\r\n private normalizeValues(values: number[], activeIndex = -1): number[] {\r\n const min = Math.min(this.min(), this.max());\r\n const max = Math.max(this.min(), this.max());\r\n const step = Math.max(this.step(), 0.000001);\r\n const minDistance = Math.max(this.minStepsBetweenThumbs(), 0) * step;\r\n const normalized = values.length ? values : [min];\r\n\r\n // Only the active thumb is bounded by neighbors; passive thumbs keep their full range.\r\n return normalized.map((value, index) => {\r\n const previous = index > 0 ? normalized[index - 1] + minDistance : min;\r\n const next = index < normalized.length - 1 ? normalized[index + 1] - minDistance : max;\r\n const lower = activeIndex === index ? previous : min;\r\n const upper = activeIndex === index ? next : max;\r\n return this.snap(clampNumber(value, lower, upper), min, step);\r\n });\r\n }\r\n\r\n private snap(value: number, min: number, step: number): number {\r\n const decimals = String(step).split('.')[1]?.length ?? 0;\r\n return Number((Math.round((value - min) / step) * step + min).toFixed(decimals));\r\n }\r\n\r\n private toExternalValue(values: number[]): FrSliderValue {\r\n return values.length === 1 ? values[0] : values;\r\n }\r\n\r\n private valueFromPointer(event: PointerEvent): number {\r\n const rect = this.elementRef.nativeElement.getBoundingClientRect();\r\n const horizontal = this.orientation() === 'horizontal';\r\n const size = horizontal ? rect.width : rect.height;\r\n const offset = horizontal ? event.clientX - rect.left : rect.bottom - event.clientY;\r\n const direction = horizontal && this.isRtl() ? -1 : 1;\r\n let percent = size > 0 ? offset / size : 0;\r\n\r\n // Convert visual position into logical value direction for RTL and inverted sliders.\r\n if (direction === -1) {\r\n percent = 1 - percent;\r\n }\r\n\r\n if (this.inverted()) {\r\n percent = 1 - percent;\r\n }\r\n\r\n return this.min() + clampNumber(percent, 0, 1) * (this.max() - this.min());\r\n }\r\n\r\n private closestThumbIndex(value: number): number {\r\n return this.values().reduce((closestIndex, thumb, index, values) => {\r\n const currentDistance = Math.abs(value - thumb);\r\n const closestDistance = Math.abs(value - values[closestIndex]);\r\n return currentDistance < closestDistance ? index : closestIndex;\r\n }, 0);\r\n }\r\n\r\n private isRtl(): boolean {\r\n return getComputedStyle(this.elementRef.nativeElement).direction === 'rtl';\r\n }\r\n}\r\n\r\n","import { NgModule } from '@angular/core';\n\nimport { FrSlider } from './src/slider';\n\n@NgModule({\n imports: [FrSlider],\n exports: [FrSlider],\n})\nexport class FrSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU;AAK/D,SAAS,iBAAiB,CAAC,KAAc,EAAA;IACvC,OAAO,KAAK,KAAK,UAAU,GAAG,UAAU,GAAG,YAAY;AACzD;AAEA,SAAS,WAAW,CAAC,KAAuC,EAAA;AAC1D,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACxB,QAAA,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACnD;IAEA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAA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AQ,CAAC;AACpB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, booleanAttribute, Directive, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
const FR_SPINNER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
5
|
+
/** Spinner indicator with size variants. */
|
|
5
6
|
class FrSpinner {
|
|
6
7
|
customSize = input(null, { ...(ngDevMode ? { debugName: "customSize" } : /* istanbul ignore next */ {}), alias: 'sizeValue' });
|
|
7
8
|
decorative = input(false, { ...(ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-ui-ng-components-spinner.mjs","sources":["../../../projects/components/spinner/src/spinner.ts","../../../projects/components/spinner/spinner.module.ts","../../../projects/components/spinner/frame-ui-ng-components-spinner.ts"],"sourcesContent":["import { Directive, booleanAttribute, input } from '@angular/core';\n\nexport const FR_SPINNER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\n\nexport type FrSpinnerSize = (typeof FR_SPINNER_SIZES)[number];\n\n@Directive({\n selector: '[frSpinner], frame-spinner',\n exportAs: 'frSpinner',\n host: {\n class: 'frame-spinner',\n '[attr.data-size]': 'size()',\n '[attr.role]': 'decorative() ? null : \"status\"',\n '[attr.aria-hidden]': 'decorative() ? \"true\" : null',\n '[attr.aria-label]': 'decorative() ? null : label()',\n '[style.--frame-spinner-size]': 'customSize()',\n '[style.--frame-spinner-duration]': 'duration()',\n '[style.--frame-spinner-stroke]': 'stroke()',\n },\n})\nexport class FrSpinner {\n readonly customSize = input<string | null>(null, { alias: 'sizeValue' });\n readonly decorative = input(false, { transform: booleanAttribute });\n readonly duration = input<string | null>(null);\n readonly label = input('Loading');\n readonly size = input<FrSpinnerSize>('md');\n readonly stroke = input<string | null>(null);\n}\n\n","import { NgModule } from '@angular/core';\n\nimport { FrSpinner } from './src/spinner';\n\n@NgModule({\n imports: [FrSpinner],\n exports: [FrSpinner],\n})\nexport class FrSpinnerModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAEO,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"frame-ui-ng-components-spinner.mjs","sources":["../../../projects/components/spinner/src/spinner.ts","../../../projects/components/spinner/spinner.module.ts","../../../projects/components/spinner/frame-ui-ng-components-spinner.ts"],"sourcesContent":["import { Directive, booleanAttribute, input } from '@angular/core';\r\n\r\nexport const FR_SPINNER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'] as const;\r\n\r\nexport type FrSpinnerSize = (typeof FR_SPINNER_SIZES)[number];\r\n\r\n/** Spinner indicator with size variants. */\r\n@Directive({\r\n selector: '[frSpinner], frame-spinner',\r\n exportAs: 'frSpinner',\r\n host: {\r\n class: 'frame-spinner',\r\n '[attr.data-size]': 'size()',\r\n '[attr.role]': 'decorative() ? null : \"status\"',\r\n '[attr.aria-hidden]': 'decorative() ? \"true\" : null',\r\n '[attr.aria-label]': 'decorative() ? null : label()',\r\n '[style.--frame-spinner-size]': 'customSize()',\r\n '[style.--frame-spinner-duration]': 'duration()',\r\n '[style.--frame-spinner-stroke]': 'stroke()',\r\n },\r\n})\r\nexport class FrSpinner {\r\n readonly customSize = input<string | null>(null, { alias: 'sizeValue' });\r\n readonly decorative = input(false, { transform: booleanAttribute });\r\n readonly duration = input<string | null>(null);\r\n readonly label = input('Loading');\r\n readonly size = input<FrSpinnerSize>('md');\r\n readonly stroke = input<string | null>(null);\r\n}\r\n\r\n\r\n","import { NgModule } from '@angular/core';\n\nimport { FrSpinner } from './src/spinner';\n\n@NgModule({\n imports: [FrSpinner],\n exports: [FrSpinner],\n})\nexport class FrSpinnerModule {}\n\n","/**\n * Generated bundle index. Do not edit.\n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AA,QAAA,EAAA,CAAA;yGAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,SAAS,CAAA,EAAA,OAAA,EAAA,CACT,SAAS,CAAA,EAAA,CAAA;yGAER,eAAe,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,OAAO,EAAE,CAAC,SAAS,CAAC;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, Directive, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
const FR_SWITCH_SIZES = ['sm', 'default'];
|
|
5
|
+
/** Switch input styled as a FrameUI control. */
|
|
5
6
|
class FrSwitch {
|
|
6
7
|
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7
8
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -18,6 +19,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
18
19
|
},
|
|
19
20
|
}]
|
|
20
21
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
22
|
+
/** Field slot for switch. */
|
|
21
23
|
class FrSwitchField {
|
|
22
24
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitchField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
23
25
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrSwitchField, isStandalone: true, selector: "[frSwitchField], frame-switch-field", host: { classAttribute: "frame-switch-field" }, ngImport: i0 });
|
|
@@ -31,6 +33,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
31
33
|
},
|
|
32
34
|
}]
|
|
33
35
|
}] });
|
|
36
|
+
/** Content slot for switch. */
|
|
34
37
|
class FrSwitchContent {
|
|
35
38
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitchContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
39
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrSwitchContent, isStandalone: true, selector: "[frSwitchContent], frame-switch-content", host: { classAttribute: "frame-switch-content" }, ngImport: i0 });
|
|
@@ -44,6 +47,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
44
47
|
},
|
|
45
48
|
}]
|
|
46
49
|
}] });
|
|
50
|
+
/** Label slot for switch. */
|
|
47
51
|
class FrSwitchLabel {
|
|
48
52
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitchLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
49
53
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrSwitchLabel, isStandalone: true, selector: "[frSwitchLabel], frame-switch-label", host: { classAttribute: "frame-switch-label" }, ngImport: i0 });
|
|
@@ -57,6 +61,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
57
61
|
},
|
|
58
62
|
}]
|
|
59
63
|
}] });
|
|
64
|
+
/** Description slot for switch. */
|
|
60
65
|
class FrSwitchDescription {
|
|
61
66
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitchDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
62
67
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrSwitchDescription, isStandalone: true, selector: "[frSwitchDescription], frame-switch-description", host: { classAttribute: "frame-switch-description" }, ngImport: i0 });
|
|
@@ -70,6 +75,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
70
75
|
},
|
|
71
76
|
}]
|
|
72
77
|
}] });
|
|
78
|
+
/** Error slot for switch. */
|
|
73
79
|
class FrSwitchError {
|
|
74
80
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrSwitchError, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
75
81
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrSwitchError, isStandalone: true, selector: "[frSwitchError], frame-switch-error", host: { attributes: { "aria-live": "polite" }, classAttribute: "frame-switch-error" }, ngImport: i0 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-ui-ng-components-switch.mjs","sources":["../../../projects/components/switch/src/switch.ts","../../../projects/components/switch/switch.module.ts","../../../projects/components/switch/frame-ui-ng-components-switch.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\n\nexport const FR_SWITCH_SIZES = ['sm', 'default'] as const;\nexport type FrSwitchSize = (typeof FR_SWITCH_SIZES)[number];\n\n@Directive({\n selector: 'input[type=checkbox][frSwitch]',\n host: {\n class: 'frame-switch',\n '[attr.data-size]': 'size()',\n role: 'switch',\n },\n})\nexport class FrSwitch {\n readonly size = input<FrSwitchSize>('default');\n}\n\n@Directive({\n selector: '[frSwitchField], frame-switch-field',\n host: {\n class: 'frame-switch-field',\n },\n})\nexport class FrSwitchField {}\n\n@Directive({\n selector: '[frSwitchContent], frame-switch-content',\n host: {\n class: 'frame-switch-content',\n },\n})\nexport class FrSwitchContent {}\n\n@Directive({\n selector: '[frSwitchLabel], frame-switch-label',\n host: {\n class: 'frame-switch-label',\n },\n})\nexport class FrSwitchLabel {}\n\n@Directive({\n selector: '[frSwitchDescription], frame-switch-description',\n host: {\n class: 'frame-switch-description',\n },\n})\nexport class FrSwitchDescription {}\n\n@Directive({\n selector: '[frSwitchError], frame-switch-error',\n host: {\n class: 'frame-switch-error',\n 'aria-live': 'polite',\n },\n})\nexport class FrSwitchError {}\n","import { NgModule } from '@angular/core';\nimport {\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n} from './src/switch';\n\n@NgModule({\n imports: [\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n ],\n exports: [\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n ],\n})\nexport class FrSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAEa,eAAe,GAAG,CAAC,IAAI,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"frame-ui-ng-components-switch.mjs","sources":["../../../projects/components/switch/src/switch.ts","../../../projects/components/switch/switch.module.ts","../../../projects/components/switch/frame-ui-ng-components-switch.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\r\n\r\nexport const FR_SWITCH_SIZES = ['sm', 'default'] as const;\r\nexport type FrSwitchSize = (typeof FR_SWITCH_SIZES)[number];\r\n\r\n/** Switch input styled as a FrameUI control. */\r\n@Directive({\r\n selector: 'input[type=checkbox][frSwitch]',\r\n host: {\r\n class: 'frame-switch',\r\n '[attr.data-size]': 'size()',\r\n role: 'switch',\r\n },\r\n})\r\nexport class FrSwitch {\r\n readonly size = input<FrSwitchSize>('default');\r\n}\r\n\r\n/** Field slot for switch. */\r\n@Directive({\r\n selector: '[frSwitchField], frame-switch-field',\r\n host: {\r\n class: 'frame-switch-field',\r\n },\r\n})\r\nexport class FrSwitchField {}\r\n\r\n/** Content slot for switch. */\r\n@Directive({\r\n selector: '[frSwitchContent], frame-switch-content',\r\n host: {\r\n class: 'frame-switch-content',\r\n },\r\n})\r\nexport class FrSwitchContent {}\r\n\r\n/** Label slot for switch. */\r\n@Directive({\r\n selector: '[frSwitchLabel], frame-switch-label',\r\n host: {\r\n class: 'frame-switch-label',\r\n },\r\n})\r\nexport class FrSwitchLabel {}\r\n\r\n/** Description slot for switch. */\r\n@Directive({\r\n selector: '[frSwitchDescription], frame-switch-description',\r\n host: {\r\n class: 'frame-switch-description',\r\n },\r\n})\r\nexport class FrSwitchDescription {}\r\n\r\n/** Error slot for switch. */\r\n@Directive({\r\n selector: '[frSwitchError], frame-switch-error',\r\n host: {\r\n class: 'frame-switch-error',\r\n 'aria-live': 'polite',\r\n },\r\n})\r\nexport class FrSwitchError {}\r\n\r\n","import { NgModule } from '@angular/core';\nimport {\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n} from './src/switch';\n\n@NgModule({\n imports: [\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n ],\n exports: [\n FrSwitch,\n FrSwitchContent,\n FrSwitchDescription,\n FrSwitchError,\n FrSwitchField,\n FrSwitchLabel,\n ],\n})\nexport class FrSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAEa,eAAe,GAAG,CAAC,IAAI,EAAE,SAAS;AAG/C;MASa,QAAQ,CAAA;AACV,IAAA,IAAI,GAAG,KAAK,CAAe,SAAS,2EAAC;wGADnC,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,MAA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;wBACb,aAAa;wBACb,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,QAAQ;wBACR,eAAe;wBACf,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,aAAa;AACd,qBAAA;AACF,iBAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -5,6 +5,7 @@ import { CdkTable, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOut
|
|
|
5
5
|
|
|
6
6
|
const FR_TABLE_DENSITIES = ['sm', 'md', 'lg'];
|
|
7
7
|
const FR_TABLE_VARIANTS = ['default', 'outline', 'card'];
|
|
8
|
+
/** CDK table wrapper with FrameUI density and variant styling. */
|
|
8
9
|
class FrTable extends CdkTable {
|
|
9
10
|
density = input('md', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
10
11
|
hover = input(true, { ...(ngDevMode ? { debugName: "hover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -24,31 +25,31 @@ class FrTable extends CdkTable {
|
|
|
24
25
|
provide: STICKY_POSITIONING_LISTENER,
|
|
25
26
|
useValue: null,
|
|
26
27
|
},
|
|
27
|
-
], exportAs: ["frTable"], usesInheritance: true, ngImport: i0, template: `
|
|
28
|
-
<ng-content select="caption" />
|
|
29
|
-
<ng-content select="colgroup, col" />
|
|
30
|
-
|
|
31
|
-
@if (_isServer) {
|
|
32
|
-
<ng-content />
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@if (_isNativeHtmlTable) {
|
|
36
|
-
<thead role="rowgroup" frTableHeader>
|
|
37
|
-
<ng-container headerRowOutlet />
|
|
38
|
-
</thead>
|
|
39
|
-
<tbody role="rowgroup" frTableBody>
|
|
40
|
-
<ng-container rowOutlet />
|
|
41
|
-
<ng-container noDataRowOutlet />
|
|
42
|
-
</tbody>
|
|
43
|
-
<tfoot role="rowgroup" frTableFooter>
|
|
44
|
-
<ng-container footerRowOutlet />
|
|
45
|
-
</tfoot>
|
|
46
|
-
} @else {
|
|
47
|
-
<ng-container headerRowOutlet />
|
|
48
|
-
<ng-container rowOutlet />
|
|
49
|
-
<ng-container noDataRowOutlet />
|
|
50
|
-
<ng-container footerRowOutlet />
|
|
51
|
-
}
|
|
28
|
+
], exportAs: ["frTable"], usesInheritance: true, ngImport: i0, template: `
|
|
29
|
+
<ng-content select="caption" />
|
|
30
|
+
<ng-content select="colgroup, col" />
|
|
31
|
+
|
|
32
|
+
@if (_isServer) {
|
|
33
|
+
<ng-content />
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@if (_isNativeHtmlTable) {
|
|
37
|
+
<thead role="rowgroup" frTableHeader>
|
|
38
|
+
<ng-container headerRowOutlet />
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody role="rowgroup" frTableBody>
|
|
41
|
+
<ng-container rowOutlet />
|
|
42
|
+
<ng-container noDataRowOutlet />
|
|
43
|
+
</tbody>
|
|
44
|
+
<tfoot role="rowgroup" frTableFooter>
|
|
45
|
+
<ng-container footerRowOutlet />
|
|
46
|
+
</tfoot>
|
|
47
|
+
} @else {
|
|
48
|
+
<ng-container headerRowOutlet />
|
|
49
|
+
<ng-container rowOutlet />
|
|
50
|
+
<ng-container noDataRowOutlet />
|
|
51
|
+
<ng-container footerRowOutlet />
|
|
52
|
+
}
|
|
52
53
|
`, isInline: true, dependencies: [{ kind: "directive", type: DataRowOutlet, selector: "[rowOutlet]" }, { kind: "directive", type: FooterRowOutlet, selector: "[footerRowOutlet]" }, { kind: "directive", type: HeaderRowOutlet, selector: "[headerRowOutlet]" }, { kind: "directive", type: NoDataRowOutlet, selector: "[noDataRowOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
53
54
|
}
|
|
54
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTable, decorators: [{
|
|
@@ -86,34 +87,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
86
87
|
],
|
|
87
88
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
88
89
|
encapsulation: ViewEncapsulation.None,
|
|
89
|
-
template: `
|
|
90
|
-
<ng-content select="caption" />
|
|
91
|
-
<ng-content select="colgroup, col" />
|
|
92
|
-
|
|
93
|
-
@if (_isServer) {
|
|
94
|
-
<ng-content />
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@if (_isNativeHtmlTable) {
|
|
98
|
-
<thead role="rowgroup" frTableHeader>
|
|
99
|
-
<ng-container headerRowOutlet />
|
|
100
|
-
</thead>
|
|
101
|
-
<tbody role="rowgroup" frTableBody>
|
|
102
|
-
<ng-container rowOutlet />
|
|
103
|
-
<ng-container noDataRowOutlet />
|
|
104
|
-
</tbody>
|
|
105
|
-
<tfoot role="rowgroup" frTableFooter>
|
|
106
|
-
<ng-container footerRowOutlet />
|
|
107
|
-
</tfoot>
|
|
108
|
-
} @else {
|
|
109
|
-
<ng-container headerRowOutlet />
|
|
110
|
-
<ng-container rowOutlet />
|
|
111
|
-
<ng-container noDataRowOutlet />
|
|
112
|
-
<ng-container footerRowOutlet />
|
|
113
|
-
}
|
|
90
|
+
template: `
|
|
91
|
+
<ng-content select="caption" />
|
|
92
|
+
<ng-content select="colgroup, col" />
|
|
93
|
+
|
|
94
|
+
@if (_isServer) {
|
|
95
|
+
<ng-content />
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@if (_isNativeHtmlTable) {
|
|
99
|
+
<thead role="rowgroup" frTableHeader>
|
|
100
|
+
<ng-container headerRowOutlet />
|
|
101
|
+
</thead>
|
|
102
|
+
<tbody role="rowgroup" frTableBody>
|
|
103
|
+
<ng-container rowOutlet />
|
|
104
|
+
<ng-container noDataRowOutlet />
|
|
105
|
+
</tbody>
|
|
106
|
+
<tfoot role="rowgroup" frTableFooter>
|
|
107
|
+
<ng-container footerRowOutlet />
|
|
108
|
+
</tfoot>
|
|
109
|
+
} @else {
|
|
110
|
+
<ng-container headerRowOutlet />
|
|
111
|
+
<ng-container rowOutlet />
|
|
112
|
+
<ng-container noDataRowOutlet />
|
|
113
|
+
<ng-container footerRowOutlet />
|
|
114
|
+
}
|
|
114
115
|
`,
|
|
115
116
|
}]
|
|
116
117
|
}], propDecorators: { density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "hover", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
118
|
+
/** Scrollable container for tables. */
|
|
117
119
|
class FrTableContainer {
|
|
118
120
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
121
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableContainer, isStandalone: true, selector: "[frTableContainer], frame-table-container", host: { classAttribute: "frame-table-container" }, ngImport: i0 });
|
|
@@ -127,6 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
127
129
|
},
|
|
128
130
|
}]
|
|
129
131
|
}] });
|
|
132
|
+
/** Caption slot for table. */
|
|
130
133
|
class FrTableCaption {
|
|
131
134
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableCaption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
132
135
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableCaption, isStandalone: true, selector: "[frTableCaption], frame-table-caption, caption[frTableCaption]", host: { classAttribute: "frame-table__caption" }, ngImport: i0 });
|
|
@@ -140,6 +143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
140
143
|
},
|
|
141
144
|
}]
|
|
142
145
|
}] });
|
|
146
|
+
/** Header slot for table. */
|
|
143
147
|
class FrTableHeader {
|
|
144
148
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
145
149
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableHeader, isStandalone: true, selector: "[frTableHeader], frame-table-header, thead[frTableHeader]", host: { classAttribute: "frame-table__header" }, ngImport: i0 });
|
|
@@ -153,6 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
153
157
|
},
|
|
154
158
|
}]
|
|
155
159
|
}] });
|
|
160
|
+
/** Body slot for table. */
|
|
156
161
|
class FrTableBody {
|
|
157
162
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
158
163
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableBody, isStandalone: true, selector: "[frTableBody], frame-table-body, tbody[frTableBody]", host: { classAttribute: "frame-table__body" }, ngImport: i0 });
|
|
@@ -166,6 +171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
166
171
|
},
|
|
167
172
|
}]
|
|
168
173
|
}] });
|
|
174
|
+
/** Footer slot for table. */
|
|
169
175
|
class FrTableFooter {
|
|
170
176
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
171
177
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableFooter, isStandalone: true, selector: "[frTableFooter], frame-table-footer, tfoot[frTableFooter]", host: { classAttribute: "frame-table__footer" }, ngImport: i0 });
|
|
@@ -179,6 +185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
179
185
|
},
|
|
180
186
|
}]
|
|
181
187
|
}] });
|
|
188
|
+
/** Column definition bridge to CDK table. */
|
|
182
189
|
class FrColumnDef {
|
|
183
190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
184
191
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrColumnDef, isStandalone: true, selector: "[frColumnDef]", hostDirectives: [{ directive: i1.CdkColumnDef, inputs: ["cdkColumnDef", "frColumnDef", "sticky", "sticky", "stickyEnd", "stickyEnd"] }], ngImport: i0 });
|
|
@@ -195,6 +202,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
195
202
|
],
|
|
196
203
|
}]
|
|
197
204
|
}] });
|
|
205
|
+
/** Header cell template definition for CDK table. */
|
|
198
206
|
class FrHeaderCellDef {
|
|
199
207
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrHeaderCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
200
208
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrHeaderCellDef, isStandalone: true, selector: "[frHeaderCellDef]", hostDirectives: [{ directive: i1.CdkHeaderCellDef }], ngImport: i0 });
|
|
@@ -206,6 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
206
214
|
hostDirectives: [CdkHeaderCellDef],
|
|
207
215
|
}]
|
|
208
216
|
}] });
|
|
217
|
+
/** Body cell template definition for CDK table. */
|
|
209
218
|
class FrCellDef {
|
|
210
219
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
211
220
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCellDef, isStandalone: true, selector: "[frCellDef]", hostDirectives: [{ directive: i1.CdkCellDef }], ngImport: i0 });
|
|
@@ -217,6 +226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
217
226
|
hostDirectives: [CdkCellDef],
|
|
218
227
|
}]
|
|
219
228
|
}] });
|
|
229
|
+
/** Footer cell template definition for CDK table. */
|
|
220
230
|
class FrFooterCellDef {
|
|
221
231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrFooterCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
222
232
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrFooterCellDef, isStandalone: true, selector: "[frFooterCellDef]", hostDirectives: [{ directive: i1.CdkFooterCellDef }], ngImport: i0 });
|
|
@@ -228,6 +238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
228
238
|
hostDirectives: [CdkFooterCellDef],
|
|
229
239
|
}]
|
|
230
240
|
}] });
|
|
241
|
+
/** Header cell host for table columns. */
|
|
231
242
|
class FrHeaderCell {
|
|
232
243
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
233
244
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrHeaderCell, isStandalone: true, selector: "th[frHeaderCell], frame-header-cell", host: { classAttribute: "frame-table__head" }, ngImport: i0 });
|
|
@@ -241,6 +252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
241
252
|
},
|
|
242
253
|
}]
|
|
243
254
|
}] });
|
|
255
|
+
/** Body cell host for table rows. */
|
|
244
256
|
class FrCell {
|
|
245
257
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
246
258
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrCell, isStandalone: true, selector: "td[frCell], frame-cell", host: { classAttribute: "frame-table__cell" }, ngImport: i0 });
|
|
@@ -254,6 +266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
254
266
|
},
|
|
255
267
|
}]
|
|
256
268
|
}] });
|
|
269
|
+
/** Footer cell host for table summaries. */
|
|
257
270
|
class FrFooterCell {
|
|
258
271
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrFooterCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
259
272
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrFooterCell, isStandalone: true, selector: "td[frFooterCell], frame-footer-cell", host: { classAttribute: "frame-table__cell frame-table__footer-cell" }, ngImport: i0 });
|
|
@@ -267,6 +280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
267
280
|
},
|
|
268
281
|
}]
|
|
269
282
|
}] });
|
|
283
|
+
/** Header row rendered by CDK table. */
|
|
270
284
|
class FrHeaderRow extends CdkHeaderRow {
|
|
271
285
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
272
286
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.16", type: FrHeaderRow, isStandalone: true, selector: "tr[frHeaderRow], frame-header-row", host: { attributes: { "role": "row" }, classAttribute: "cdk-header-row frame-table__row frame-table__header-row" }, providers: [
|
|
@@ -296,6 +310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
296
310
|
template: CDK_ROW_TEMPLATE,
|
|
297
311
|
}]
|
|
298
312
|
}] });
|
|
313
|
+
/** Body row rendered by CDK table. */
|
|
299
314
|
class FrRow extends CdkRow {
|
|
300
315
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrRow, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
301
316
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.16", type: FrRow, isStandalone: true, selector: "tr[frRow], frame-row", host: { attributes: { "role": "row" }, classAttribute: "cdk-row frame-table__row" }, providers: [
|
|
@@ -325,6 +340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
325
340
|
template: CDK_ROW_TEMPLATE,
|
|
326
341
|
}]
|
|
327
342
|
}] });
|
|
343
|
+
/** Footer row rendered by CDK table. */
|
|
328
344
|
class FrFooterRow extends CdkFooterRow {
|
|
329
345
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
330
346
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.16", type: FrFooterRow, isStandalone: true, selector: "tr[frFooterRow], frame-footer-row", host: { attributes: { "role": "row" }, classAttribute: "cdk-footer-row frame-table__row frame-table__footer-row" }, providers: [
|
|
@@ -354,6 +370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
354
370
|
template: CDK_ROW_TEMPLATE,
|
|
355
371
|
}]
|
|
356
372
|
}] });
|
|
373
|
+
/** Header row definition bridge to CDK table. */
|
|
357
374
|
class FrHeaderRowDef {
|
|
358
375
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrHeaderRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
359
376
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrHeaderRowDef, isStandalone: true, selector: "[frHeaderRowDef]", hostDirectives: [{ directive: i1.CdkHeaderRowDef, inputs: ["cdkHeaderRowDef", "frHeaderRowDef", "cdkHeaderRowDefSticky", "frHeaderRowDefSticky"] }], ngImport: i0 });
|
|
@@ -370,6 +387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
370
387
|
],
|
|
371
388
|
}]
|
|
372
389
|
}] });
|
|
390
|
+
/** Body row definition bridge to CDK table. */
|
|
373
391
|
class FrRowDef {
|
|
374
392
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
375
393
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrRowDef, isStandalone: true, selector: "[frRowDef]", hostDirectives: [{ directive: i1.CdkRowDef, inputs: ["cdkRowDefColumns", "frRowDefColumns", "cdkRowDefWhen", "frRowDefWhen"] }], ngImport: i0 });
|
|
@@ -386,6 +404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
386
404
|
],
|
|
387
405
|
}]
|
|
388
406
|
}] });
|
|
407
|
+
/** Footer row definition bridge to CDK table. */
|
|
389
408
|
class FrFooterRowDef {
|
|
390
409
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrFooterRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
391
410
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrFooterRowDef, isStandalone: true, selector: "[frFooterRowDef]", hostDirectives: [{ directive: i1.CdkFooterRowDef, inputs: ["cdkFooterRowDef", "frFooterRowDef", "cdkFooterRowDefSticky", "frFooterRowDefSticky"] }], ngImport: i0 });
|
|
@@ -402,6 +421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
402
421
|
],
|
|
403
422
|
}]
|
|
404
423
|
}] });
|
|
424
|
+
/** Fallback row rendered when table data is empty. */
|
|
405
425
|
class FrNoDataRow {
|
|
406
426
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrNoDataRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
407
427
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrNoDataRow, isStandalone: true, selector: "ng-template[frNoDataRow]", hostDirectives: [{ directive: i1.CdkNoDataRow }], ngImport: i0 });
|
|
@@ -413,6 +433,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
413
433
|
hostDirectives: [CdkNoDataRow],
|
|
414
434
|
}]
|
|
415
435
|
}] });
|
|
436
|
+
/** Numeric alignment helper for table cells. */
|
|
416
437
|
class FrTableNumeric {
|
|
417
438
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableNumeric, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
418
439
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableNumeric, isStandalone: true, selector: "[frTableNumeric]", host: { classAttribute: "frame-table__numeric" }, ngImport: i0 });
|
|
@@ -426,6 +447,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
426
447
|
},
|
|
427
448
|
}]
|
|
428
449
|
}] });
|
|
450
|
+
/** Muted text helper for table content. */
|
|
429
451
|
class FrTableMuted {
|
|
430
452
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableMuted, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
431
453
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableMuted, isStandalone: true, selector: "[frTableMuted]", host: { classAttribute: "frame-table__muted" }, ngImport: i0 });
|
|
@@ -439,6 +461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
439
461
|
},
|
|
440
462
|
}]
|
|
441
463
|
}] });
|
|
464
|
+
/** Virtualized table viewport helper. */
|
|
442
465
|
class FrTableVirtual {
|
|
443
466
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableVirtual, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
444
467
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableVirtual, isStandalone: true, selector: "[frTableVirtual], frame-table-virtual", host: { classAttribute: "frame-table-virtual" }, ngImport: i0 });
|
|
@@ -452,6 +475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
452
475
|
},
|
|
453
476
|
}]
|
|
454
477
|
}] });
|
|
478
|
+
/** Header slot for table virtual. */
|
|
455
479
|
class FrTableVirtualHeader {
|
|
456
480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableVirtualHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
457
481
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableVirtualHeader, isStandalone: true, selector: "[frTableVirtualHeader], frame-table-virtual-header", host: { classAttribute: "frame-table-virtual__header" }, ngImport: i0 });
|
|
@@ -465,6 +489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
465
489
|
},
|
|
466
490
|
}]
|
|
467
491
|
}] });
|
|
492
|
+
/** Virtualized table row helper. */
|
|
468
493
|
class FrTableVirtualRow {
|
|
469
494
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableVirtualRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
470
495
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableVirtualRow, isStandalone: true, selector: "[frTableVirtualRow], frame-table-virtual-row", host: { classAttribute: "frame-table-virtual__row" }, ngImport: i0 });
|
|
@@ -478,6 +503,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
478
503
|
},
|
|
479
504
|
}]
|
|
480
505
|
}] });
|
|
506
|
+
/** Virtualized table cell helper. */
|
|
481
507
|
class FrTableVirtualCell {
|
|
482
508
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrTableVirtualCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
483
509
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrTableVirtualCell, isStandalone: true, selector: "[frTableVirtualCell], frame-table-virtual-cell", host: { classAttribute: "frame-table-virtual__cell" }, ngImport: i0 });
|