@bravura/ui 2.4.0 → 2.5.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/CHANGELOG.md +15 -0
- package/alert/alert-container.component.d.ts +3 -1
- package/clip-note/clip-note.component.d.ts +45 -0
- package/clip-note/clip-note.directive.d.ts +69 -0
- package/clip-note/clip-note.module.d.ts +19 -0
- package/clip-note/index.d.ts +5 -0
- package/clip-note/public-api.d.ts +1 -0
- package/discrete-input/discrete-input.component.d.ts +4 -2
- package/esm2020/alert/alert-container.component.mjs +14 -8
- package/esm2020/alert/alert-message.component.mjs +4 -4
- package/esm2020/alert/alert.module.mjs +4 -4
- package/esm2020/behavior/await.directive.mjs +4 -4
- package/esm2020/behavior/behavior.module.mjs +4 -4
- package/esm2020/behavior/sizing-monitor.directive.mjs +3 -3
- package/esm2020/behavior/sizing.directive.mjs +4 -4
- package/esm2020/clip-note/bravura-ui-clip-note.mjs +5 -0
- package/esm2020/clip-note/clip-note.component.mjs +216 -0
- package/esm2020/clip-note/clip-note.directive.mjs +141 -0
- package/esm2020/clip-note/clip-note.module.mjs +32 -0
- package/esm2020/clip-note/public-api.mjs +2 -0
- package/esm2020/common/common.module.mjs +5 -5
- package/esm2020/currency-input/currency-input.directive.mjs +3 -3
- package/esm2020/currency-input/currency-input.module.mjs +4 -4
- package/esm2020/decimal-input/decimal-input.directive.mjs +3 -3
- package/esm2020/decimal-input/decimal-input.module.mjs +4 -4
- package/esm2020/discrete-input/discrete-input.component.mjs +26 -15
- package/esm2020/discrete-input/discrete-input.module.mjs +4 -4
- package/esm2020/file-upload/file-upload.component.mjs +3 -3
- package/esm2020/file-upload/file-upload.module.mjs +4 -4
- package/esm2020/file-upload/file-upload.service.mjs +3 -3
- package/esm2020/form-field/form-field.component.mjs +6 -6
- package/esm2020/form-field/form-field.module.mjs +4 -4
- package/esm2020/icon-font/icon-font.module.mjs +4 -4
- package/esm2020/icon-font/icon.directive.mjs +3 -3
- package/esm2020/panel/panel-section.component.mjs +3 -3
- package/esm2020/panel/panel.component.mjs +4 -4
- package/esm2020/panel/panel.module.mjs +4 -4
- package/esm2020/phone-number/phone-number.directive.mjs +3 -3
- package/esm2020/phone-number/phone-number.module.mjs +4 -4
- package/esm2020/phone-number/phone-number.pipe.mjs +3 -3
- package/esm2020/phone-number/phone-number.validator.mjs +3 -3
- package/esm2020/radio-panel/radio-panel-item.component.mjs +5 -5
- package/esm2020/radio-panel/radio-panel.component.mjs +3 -3
- package/esm2020/radio-panel/radio-panel.module.mjs +4 -4
- package/esm2020/selection-panel/selection-panel-item.component.mjs +4 -4
- package/esm2020/selection-panel/selection-panel.directive.mjs +3 -3
- package/esm2020/selection-panel/selection-panel.module.mjs +4 -4
- package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +3 -3
- package/esm2020/skeletons/skeleton-loader.component.mjs +3 -3
- package/esm2020/skeletons/skeletons.module.mjs +4 -4
- package/esm2020/stepper/stepper.component.mjs +3 -3
- package/esm2020/stepper/stepper.module.mjs +4 -4
- package/esm2020/tooltip/tooltip.component.mjs +3 -3
- package/esm2020/tooltip/tooltip.directive.mjs +3 -3
- package/esm2020/tooltip/tooltip.module.mjs +4 -4
- package/fesm2015/bravura-ui-alert.mjs +20 -14
- package/fesm2015/bravura-ui-alert.mjs.map +1 -1
- package/fesm2015/bravura-ui-behavior.mjs +13 -13
- package/fesm2015/bravura-ui-behavior.mjs.map +1 -1
- package/fesm2015/bravura-ui-clip-note.mjs +393 -0
- package/fesm2015/bravura-ui-clip-note.mjs.map +1 -0
- package/fesm2015/bravura-ui-common.mjs +4 -4
- package/fesm2015/bravura-ui-common.mjs.map +1 -1
- package/fesm2015/bravura-ui-currency-input.mjs +7 -7
- package/fesm2015/bravura-ui-decimal-input.mjs +7 -7
- package/fesm2015/bravura-ui-discrete-input.mjs +29 -18
- package/fesm2015/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2015/bravura-ui-file-upload.mjs +10 -10
- package/fesm2015/bravura-ui-form-field.mjs +9 -9
- package/fesm2015/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2015/bravura-ui-icon-font.mjs +7 -7
- package/fesm2015/bravura-ui-panel.mjs +11 -11
- package/fesm2015/bravura-ui-panel.mjs.map +1 -1
- package/fesm2015/bravura-ui-phone-number.mjs +13 -13
- package/fesm2015/bravura-ui-radio-panel.mjs +11 -11
- package/fesm2015/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2015/bravura-ui-selection-panel.mjs +11 -11
- package/fesm2015/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2015/bravura-ui-skeletons.mjs +10 -10
- package/fesm2015/bravura-ui-stepper.mjs +7 -7
- package/fesm2015/bravura-ui-tooltip.mjs +10 -10
- package/fesm2020/bravura-ui-alert.mjs +20 -14
- package/fesm2020/bravura-ui-alert.mjs.map +1 -1
- package/fesm2020/bravura-ui-behavior.mjs +13 -13
- package/fesm2020/bravura-ui-behavior.mjs.map +1 -1
- package/fesm2020/bravura-ui-clip-note.mjs +388 -0
- package/fesm2020/bravura-ui-clip-note.mjs.map +1 -0
- package/fesm2020/bravura-ui-common.mjs +4 -4
- package/fesm2020/bravura-ui-common.mjs.map +1 -1
- package/fesm2020/bravura-ui-currency-input.mjs +7 -7
- package/fesm2020/bravura-ui-decimal-input.mjs +7 -7
- package/fesm2020/bravura-ui-discrete-input.mjs +29 -18
- package/fesm2020/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2020/bravura-ui-file-upload.mjs +10 -10
- package/fesm2020/bravura-ui-form-field.mjs +9 -9
- package/fesm2020/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2020/bravura-ui-icon-font.mjs +7 -7
- package/fesm2020/bravura-ui-panel.mjs +11 -11
- package/fesm2020/bravura-ui-panel.mjs.map +1 -1
- package/fesm2020/bravura-ui-phone-number.mjs +13 -13
- package/fesm2020/bravura-ui-radio-panel.mjs +11 -11
- package/fesm2020/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2020/bravura-ui-selection-panel.mjs +11 -11
- package/fesm2020/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2020/bravura-ui-skeletons.mjs +10 -10
- package/fesm2020/bravura-ui-stepper.mjs +7 -7
- package/fesm2020/bravura-ui-tooltip.mjs +10 -10
- package/package.json +9 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravura-ui-clip-note.mjs","sources":["../../../projects/ui/clip-note/clip-note.component.ts","../../../projects/ui/clip-note/clip-note.component.html","../../../projects/ui/clip-note/clip-note.directive.ts","../../../projects/ui/clip-note/clip-note.module.ts","../../../projects/ui/clip-note/bravura-ui-clip-note.ts"],"sourcesContent":["import { animate, animateChild, group, query, state, style, transition, trigger } from '@angular/animations';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tEmbeddedViewRef,\n\tEventEmitter,\n\tHost,\n\tOnDestroy,\n\tOnInit,\n\tTemplateRef,\n\tViewChild,\n\tViewContainerRef\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { Subject, takeUntil } from 'rxjs';\n\n@Component({\n\tselector: 'bui-clip-note',\n\ttemplateUrl: './clip-note.component.html',\n\tstyleUrls: ['./clip-note.component.scss'],\n\thost: { class: 'bui-clip-note bui-host' },\n\tanimations: [\n\t\ttrigger('buttonAnimation', [\n\t\t\tstate('*', style({ width: '36px', minWidth: 0, padding: 0 })),\n\t\t\tstate('active', style({})),\n\t\t\ttransition('inactive <=> active', [\n\t\t\t\tgroup([animate('250ms cubic-bezier(.56,.14,.18,.91)'), query('@buttonTextAnimation', animateChild())]),\n\t\t\t\tquery('@buttonIconAnimation', animateChild())\n\t\t\t])\n\t\t]),\n\t\ttrigger('buttonTextAnimation', [\n\t\t\tstate('inactive', style({ opacity: 0, width: 0 })),\n\t\t\tstate('active', style({ opacity: 1 })),\n\t\t\ttransition('inactive => active', animate('250ms cubic-bezier(.88,.15,.63,.61)')),\n\t\t\ttransition('active => inactive', animate('250ms cubic-bezier(.05,.72,.44,.92)'))\n\t\t]),\n\t\ttrigger('buttonIconAnimation', [\n\t\t\tstate('active-ltr', style({ transform: 'rotate(-90deg)' })),\n\t\t\tstate('active-rtl', style({ transform: 'rotate(90deg)' })),\n\t\t\tstate('open-ltr', style({ transform: 'rotate(90deg)' })),\n\t\t\tstate('open-rtl', style({ transform: 'rotate(270deg)' })),\n\t\t\tstate('inactive', style({})),\n\t\t\ttransition('inactive <=> *, * <=> open-ltr, * <=> open-rtl', animate('250ms cubic-bezier(0.25, 0.8, 0.25, 1)'))\n\t\t]),\n\t\ttrigger('panelAnimation', [\n\t\t\tstate('open', style({})),\n\t\t\tstate('closed-rtl', style({ transform: 'scale(0) translate(-80%, -100%)', padding: 0, opacity: 0 })),\n\t\t\tstate('closed-ltr', style({ transform: 'scale(0) translate(80%, -100%)', padding: 0, opacity: 0 })),\n\t\t\ttransition('open <=> *', animate('300ms cubic-bezier(.69,.12,.6,.62)'))\n\t\t])\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ClipNoteComponent implements OnInit, OnDestroy {\n\tbuttonText = '';\n\n\tget buttonState(): string {\n\t\tif (this._hovering || this.panelState === 'open') {\n\t\t\treturn 'active';\n\t\t}\n\t\treturn 'inactive';\n\t}\n\n\tget buttonIconState(): string {\n\t\tif (this.panelState === 'open') {\n\t\t\treturn `open-${this.direction}`;\n\t\t}\n\t\tif (this.buttonState === 'active') {\n\t\t\treturn `active-${this.direction}`;\n\t\t}\n\t\treturn 'inactive';\n\t}\n\n\tpanelState: 'open' | 'closed-ltr' | 'closed-rtl' = 'closed-ltr';\n\n\tdirection = 'ltr';\n\t_contentView?: EmbeddedViewRef<any>;\n\t_content?: string;\n\t_color: ThemePalette;\n\t_buttonAnimating = false;\n\t_icon?: string;\n\t_hasContent = false;\n\n\treadonly opened = new EventEmitter<void>();\n\treadonly closed = new EventEmitter<void>();\n\n\tprivate _hovering = false;\n\tprivate _destroyed$ = new Subject<void>();\n\tprivate _toggleQueue: boolean[] = [];\n\n\t@ViewChild('viewDiv', { static: true, read: ElementRef })\n\tprivate _viewDiv!: ElementRef<HTMLDivElement>;\n\n\t@ViewChild('noteViewRef', { static: true, read: ViewContainerRef })\n\tprivate _noteViewRef!: ViewContainerRef;\n\n\t@ViewChild('fallbackTemplate', { static: true })\n\tprivate _fallbackTemplate!: TemplateRef<any>;\n\n\tconstructor(\n\t\tprivate _cd: ChangeDetectorRef,\n\t\tprivate _dir: Directionality,\n\t\t@Host() private _elemRef: ElementRef<HTMLElement>\n\t) {}\n\n\tngOnInit(): void {\n\t\tconst changeDir = () => {\n\t\t\tthis.direction = this._dir.value;\n\t\t\tthis.panelState = `closed-${this.direction}` as any;\n\t\t\tthis._cd.markForCheck();\n\t\t};\n\t\tthis._dir.change.pipe(takeUntil(this._destroyed$)).subscribe(changeDir);\n\t\tchangeDir();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed$.next();\n\t\tthis._destroyed$.complete();\n\t}\n\n\t_mouseOverButton(hovering: boolean) {\n\t\tif (this._hovering !== hovering) {\n\t\t\tthis._hovering = hovering;\n\t\t\tthis._cd.markForCheck();\n\t\t}\n\t}\n\n\ttoggle() {\n\t\tthis.panelState = this.panelState === `closed-${this.direction}` ? 'open' : (`closed-${this.direction}` as any);\n\t\tthis._cd.markForCheck();\n\t}\n\n\t_scheduleToggle() {\n\t\tif (this._buttonAnimating) {\n\t\t\tthis._toggleQueue.push(true);\n\t\t} else {\n\t\t\tthis.toggle();\n\t\t}\n\t}\n\n\t_checkToggle() {\n\t\tif (this._toggleQueue.pop()) {\n\t\t\tthis.toggle();\n\t\t}\n\t}\n\n\topen() {\n\t\tthis.panelState = 'open';\n\t\tthis._cd.markForCheck();\n\t\tthis._emit();\n\t}\n\n\tclose() {\n\t\tthis.panelState = `closed-${this.direction}` as any;\n\t\tthis._cd.markForCheck();\n\t\tthis._emit();\n\t}\n\n\t_emit() {\n\t\tif (this.panelState === 'open') {\n\t\t\tthis.opened.emit();\n\t\t} else {\n\t\t\tthis.closed.emit();\n\t\t}\n\t}\n\n\t_contentChanged(content?: string | TemplateRef<any>) {\n\t\tlet template: TemplateRef<any>;\n\n\t\tif (content instanceof TemplateRef) {\n\t\t\ttemplate = content;\n\t\t} else {\n\t\t\ttemplate = this._fallbackTemplate;\n\t\t\tthis._content = content;\n\t\t}\n\t\tthis._noteViewRef.clear();\n\t\tconst context = {};\n\t\tthis._contentView = this._noteViewRef.createEmbeddedView(template, context);\n\t\tthis._checkContent(true);\n\t}\n\n\t_checkContent(initial?: boolean) {\n\t\tthis._contentView?.detectChanges();\n\t\tthis._hasContent = !!this._viewDiv.nativeElement.textContent?.trim();\n\t\tconst classList = this._elemRef.nativeElement.classList;\n\t\tconst cls = 'bui-clip-note-hidden';\n\t\tconst cls1 = 'bui-clip-note-reveal';\n\t\tif (this._hasContent) {\n\t\t\tclassList.remove(cls);\n\t\t\tif (!initial && this.panelState !== 'open') {\n\t\t\t\tclassList.add(cls1);\n\t\t\t}\n\t\t\tthis._elemRef.nativeElement.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n\t\t} else {\n\t\t\tclassList.add(cls);\n\t\t\tclassList.remove(cls1);\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\t_assignColor(color: ThemePalette) {\n\t\tthis._color = color;\n\t\tthis._cd.markForCheck();\n\t}\n\n\t_assignButtonText(text: string) {\n\t\tthis.buttonText = text;\n\t\tthis._cd.markForCheck();\n\t}\n\n\t_assignButtonIcon(icon?: string) {\n\t\tthis._icon = icon;\n\t\tthis._cd.markForCheck();\n\t}\n}\n","<div class=\"bui-clip-note-wrapper\">\n\t<div\n\t\tclass=\"bui-clip-note-content bui-border-{{ _color }} mat-elevation-z3\"\n\t\t[@panelAnimation]=\"panelState\"\n\t\t#viewDiv\n\t\t(cdkObserveContent)=\"_checkContent()\"\n\t>\n\t\t<ng-container #noteViewRef></ng-container>\n\t</div>\n\n\t<button\n\t\tmat-raised-button\n\t\tclass=\"bui-clip-note-trigger bui-clip-note-trigger-{{ buttonIconState }}\"\n\t\t[color]=\"_color\"\n\t\t[@buttonAnimation]=\"buttonState\"\n\t\t(mouseenter)=\"_mouseOverButton(true)\"\n\t\t(mouseleave)=\"_mouseOverButton(false)\"\n\t\t(click)=\"_scheduleToggle()\"\n\t>\n\t\t<mat-icon\n\t\t\t[@buttonIconAnimation]=\"_icon ? 'disabled' : buttonIconState\"\n\t\t\t(@buttonIconAnimation.start)=\"_buttonAnimating = true\"\n\t\t\t(@buttonIconAnimation.done)=\"_buttonAnimating = false; _checkToggle()\"\n\t\t\t[buiIcon]=\"_icon || (direction === 'rtl' ? 'chevron_right' : 'chevron_left')\"\n\t\t>\n\t\t</mat-icon>\n\t\t<span [@buttonTextAnimation]=\"buttonState\" class=\"bui-clip-note-button-text\"> {{ buttonText }}</span>\n\t</button>\n</div>\n\n<ng-template #fallbackTemplate>\n\t<div [innerHTML]=\"_content\"></div>\n</ng-template>\n","import {\n\tAfterViewInit,\n\tComponentRef,\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tHost,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tOutput,\n\tTemplateRef,\n\tViewContainerRef\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { ClipNoteComponent } from './clip-note.component';\n\nexport interface ClipNoteDefaultConfig {\n\tcolor: ThemePalette;\n\tcaption: string;\n}\n\n/** Used to provide default config for clip notes. */\nexport const CLIP_NOTE_DEFAULT_CONFIG = new InjectionToken<ClipNoteDefaultConfig>('bui-clip-note.default-config', {\n\tfactory: () => ({ color: 'primary', caption: 'More info' })\n});\n\n/**\n * A clip note consists of a toggle button and a floating 'notepad' element, attached to the top end of the host element's\n * viewable area. The 'notepad' normally collapses away and only reveals itself when the toggle button is active.\n *\n * The toggle button clips on the edge of the host element and expands to display the full caption when hovered. It hides itself\n * automatically when there is no content provided via the `buiClipNote` property of the directive.\n *\n * The clip note component is suitable for large page container elements with visible boundaries. It can present contextual\n * information regarding and in addition to the content displayed in the main view area.\n *\n * The properties `buiClipNoteColor` and `buiClipNoteCaption` customise the appearance of the clip note, the default values of which\n * can optionally be provided by the `ClipNoteModule.forConfig()` method.\n *\n */\n@Directive({\n\tselector: '[buiClipNote]',\n\texportAs: 'buiClipNote'\n})\nexport class ClipNoteDirective implements AfterViewInit {\n\t/**\n\t * Provide content to the clip note's floating notepad element.\n\t * It accepts a `string` of HTML content or a `TemplateRef` object.\n\t */\n\t@Input()\n\tget buiClipNote(): string | TemplateRef<any> | undefined {\n\t\treturn this._content;\n\t}\n\tset buiClipNote(note: string | TemplateRef<any> | undefined) {\n\t\tthis._content = note;\n\t\tif (this._compRef) {\n\t\t\tthis._processContent();\n\t\t}\n\t}\n\n\t/**\n\t * Customise the theme color alias.\n\t * @default 'primary'\n\t */\n\t@Input()\n\tget buiClipNoteColor(): ThemePalette {\n\t\treturn this._color;\n\t}\n\tset buiClipNoteColor(color: ThemePalette) {\n\t\tthis._color = color;\n\t\tif (this._compRef) {\n\t\t\tthis._compRef.instance._assignColor(this._color);\n\t\t}\n\t}\n\n\t/**\n\t * Customise the icon on the toggle button. With this property specified, the animation on the icon\n\t * will not be active.\n\t */\n\t@Input()\n\tget buiClipNoteIcon(): string | undefined {\n\t\treturn this._icon;\n\t}\n\tset buiClipNoteIcon(icon: string | undefined) {\n\t\tthis._icon = icon;\n\t\tif (this._compRef) {\n\t\t\tthis._compRef.instance._assignButtonIcon(this._icon);\n\t\t}\n\t}\n\n\t/**\n\t * The caption of the toggle button when expanded.\n\t */\n\t@Input()\n\tget buiClipNoteCaption(): string {\n\t\treturn this._caption;\n\t}\n\tset buiClipNoteCaption(text: string) {\n\t\tthis._caption = text;\n\t\tif (this._compRef) {\n\t\t\tthis._compRef.instance._assignButtonText(this._caption);\n\t\t}\n\t}\n\n\t/** Emits when the panel opens */\n\t@Output()\n\treadonly buiClipNoteOpened = new EventEmitter<void>();\n\n\t/** Emits when the panel closes */\n\t@Output()\n\treadonly buiClipNoteClosed = new EventEmitter<void>();\n\n\tprivate _content?: string | TemplateRef<any>;\n\tprivate _color: ThemePalette = 'primary';\n\tprivate _compRef!: ComponentRef<ClipNoteComponent>;\n\tprivate _caption: string;\n\tprivate _icon?: string;\n\n\tconstructor(\n\t\t@Host() private _elementRef: ElementRef<HTMLElement>,\n\t\tprivate _vc: ViewContainerRef,\n\t\t@Inject(CLIP_NOTE_DEFAULT_CONFIG) _config: ClipNoteDefaultConfig\n\t) {\n\t\tthis._caption = _config.caption;\n\t\tthis._color = _config.color;\n\t}\n\n\tngAfterViewInit(): void {\n\t\tsetTimeout(() => {\n\t\t\tthis._compRef = this._vc.createComponent(ClipNoteComponent);\n\t\t\tconst childElement: HTMLElement = this._compRef.location.nativeElement;\n\t\t\tconst element = this._elementRef.nativeElement;\n\t\t\telement.style.position = 'relative';\n\t\t\telement.appendChild(childElement);\n\t\t\tthis._compRef.instance._assignColor(this._color);\n\t\t\tthis._compRef.instance._assignButtonText(this._caption);\n\t\t\tthis._compRef.instance._assignButtonIcon(this._icon);\n\t\t\tthis._compRef.instance.opened.subscribe(this.buiClipNoteOpened.next.bind(this.buiClipNoteOpened));\n\t\t\tthis._compRef.instance.closed.subscribe(this.buiClipNoteClosed.next.bind(this.buiClipNoteClosed));\n\t\t\tthis._processContent();\n\t\t});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._compRef.destroy();\n\t}\n\n\t/** Open the note panel */\n\topen() {\n\t\tthis._compRef.instance.open();\n\t}\n\n\t/** Close the note panel */\n\tclose() {\n\t\tthis._compRef.instance.close();\n\t}\n\n\tprivate _processContent() {\n\t\tthis._compRef.instance._contentChanged(this._content);\n\t}\n}\n","import { BidiModule } from '@angular/cdk/bidi';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { BuiCommonModule } from '@bravura/ui/common';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { ClipNoteComponent } from './clip-note.component';\nimport { ClipNoteDefaultConfig, ClipNoteDirective, CLIP_NOTE_DEFAULT_CONFIG } from './clip-note.directive';\n\n@NgModule({\n\tdeclarations: [ClipNoteComponent, ClipNoteDirective],\n\timports: [CommonModule, MatButtonModule, MatIconModule, BidiModule, BuiCommonModule, ObserversModule, IconFontModule],\n\texports: [ClipNoteDirective]\n})\nexport class ClipNoteModule {\n\tstatic forConfig(config: ClipNoteDefaultConfig): ModuleWithProviders<ClipNoteModule> {\n\t\treturn {\n\t\t\tngModule: ClipNoteModule,\n\t\t\tproviders: [{ provide: CLIP_NOTE_DEFAULT_CONFIG, useValue: config }]\n\t\t};\n\t}\n}\n\nexport { ClipNoteDirective };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAwDa,iBAAiB,CAAA;AA8C7B,IAAA,WAAA,CACS,GAAsB,EACtB,IAAoB,EACZ,QAAiC,EAAA;AAFzC,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AACtB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAgB;AACZ,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAyB;AAhDlD,QAAA,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;AAmBhB,QAAA,IAAU,CAAA,UAAA,GAAyC,YAAY,CAAC;AAEhE,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAIlB,QAAA,IAAgB,CAAA,gBAAA,GAAG,KAAK,CAAC;AAEzB,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAEX,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAQ,CAAC;AAClC,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAQ,CAAC;AAEnC,QA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AA;2FAGxG,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,CAAC;oBACrH,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC5B,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -67,10 +67,10 @@ class BuiCommonModule {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
BuiCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
71
|
-
BuiCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
72
|
-
BuiCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
70
|
+
BuiCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BuiCommonModule, deps: [{ token: i1.Directionality }, { token: BuiCommonModule, optional: true, skipSelf: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
71
|
+
BuiCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: BuiCommonModule, imports: [BidiModule], exports: [BidiModule] });
|
|
72
|
+
BuiCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BuiCommonModule, imports: [BidiModule, BidiModule] });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: BuiCommonModule, decorators: [{
|
|
74
74
|
type: NgModule,
|
|
75
75
|
args: [{
|
|
76
76
|
declarations: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-common.mjs","sources":["../../../projects/ui/common/common-utils.ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn Math.round(Math.random() * Math.pow(2, 50)).toString(36);\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n\n/**\n * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.\n *\n * @param {String} text The text to be rendered.\n * @param el the element used to compute the font styles\n *\n * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393\n */\nexport function getTextWidth(text: string, el: HTMLElement = document.body): number {\n\tfunction getCssStyle(element: HTMLElement, prop: string) {\n\t\treturn window.getComputedStyle(element, null).getPropertyValue(prop);\n\t}\n\n\tconst fontWeight = getCssStyle(el, 'font-weight') || 'normal';\n\tconst fontSize = getCssStyle(el, 'font-size') || '16px';\n\tconst fontFamily = getCssStyle(el, 'font-family') || 'Arial';\n\n\tconst font = `${fontWeight} ${fontSize} ${fontFamily}`;\n\n\t// re-use canvas object for better performance\n\tconst canvas = (getTextWidth as any).canvas || ((getTextWidth as any).canvas = document.createElement('canvas'));\n\tconst context = canvas.getContext('2d');\n\tcontext.font = font;\n\tconst metrics = context.measureText(text);\n\treturn Math.round(metrics.width);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAA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C;AACvC,oBAAA,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACnB,IAAI,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AACrD,wBAAA,GAAW,CAAC,KAAK,GAAG,CAAC,CAAC;AACvB,qBAAA;AACD,oBAAA,UAAU,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,iBAAA;AACF,aAAC,CAAC,CAAC;AAEH,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,SAAA;KACD;;
|
|
1
|
+
{"version":3,"file":"bravura-ui-common.mjs","sources":["../../../projects/ui/common/common-utils.ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn Math.round(Math.random() * Math.pow(2, 50)).toString(36);\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n\n/**\n * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.\n *\n * @param {String} text The text to be rendered.\n * @param el the element used to compute the font styles\n *\n * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393\n */\nexport function getTextWidth(text: string, el: HTMLElement = document.body): number {\n\tfunction getCssStyle(element: HTMLElement, prop: string) {\n\t\treturn window.getComputedStyle(element, null).getPropertyValue(prop);\n\t}\n\n\tconst fontWeight = getCssStyle(el, 'font-weight') || 'normal';\n\tconst fontSize = getCssStyle(el, 'font-size') || '16px';\n\tconst fontFamily = getCssStyle(el, 'font-family') || 'Arial';\n\n\tconst font = `${fontWeight} ${fontSize} ${fontFamily}`;\n\n\t// re-use canvas object for better performance\n\tconst canvas = (getTextWidth as any).canvas || ((getTextWidth as any).canvas = document.createElement('canvas'));\n\tconst context = canvas.getContext('2d');\n\tcontext.font = font;\n\tconst metrics = context.measureText(text);\n\treturn Math.round(metrics.width);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAe,EAAA;AAClD,IAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAExC,IAAA,QACC,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,IAAI,IAAI,CAAC;AACd,QAAA,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;AAC5E,QAAA,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,EACxE;AACH,CAAC;AAED;;;;;;;AAOG;AACG,SAAU,YAAY,CAAC,IAAY,EAAE,EAAkB,GAAA,QAAQ,CAAC,IAAI,EAAA;AACzE,IAAA,SAAS,WAAW,CAAC,OAAoB,EAAE,IAAY,EAAA;AACtD,QAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;KACrE;IAED,MAAM,UAAU,GAAG,WAAW,CAAC,EAAE,EAAE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AA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GANL,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,CAAA,EAAA,OAAA,EAAA,CACV,UAAU,CAAA,EAAA,CAAA,CAAA;6GAER,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,EACV,UAAU,CAAA,EAAA,CAAA,CAAA;2FAER,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,OAAO,EAAE,CAAC,UAAU,CAAC;iBACrB,CAAA;;;8BAIE,QAAQ;;8BACR,QAAQ;;8BAER,MAAM;+BAAC,QAAQ,CAAA;;;;AC9BlB;;AAEG;;;;"}
|
|
@@ -224,9 +224,9 @@ class CurrencyInputDirective {
|
|
|
224
224
|
return this._trailing ? `0${decimalStr} ${this._symbol}` : `${this._symbol}0${decimalStr}`;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
CurrencyInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
228
|
-
CurrencyInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
227
|
+
CurrencyInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputDirective, deps: [{ token: i0.ElementRef, self: true }, { token: i0.Renderer2 }, { token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
228
|
+
CurrencyInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: CurrencyInputDirective, selector: "input[buiCurrencyInput],input[currencyCode],input[data-type=currency]", inputs: { allowNegative: "allowNegative", currencyCode: "currencyCode", baseUnitOnly: "baseUnitOnly", format: "format" }, host: { listeners: { "input": "onInput()", "focus": "onFocus()", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CurrencyInputDirective), multi: true }], usesOnChanges: true, ngImport: i0 });
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputDirective, decorators: [{
|
|
230
230
|
type: Directive,
|
|
231
231
|
args: [{
|
|
232
232
|
selector: 'input[buiCurrencyInput],input[currencyCode],input[data-type=currency]',
|
|
@@ -280,10 +280,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
280
280
|
|
|
281
281
|
class CurrencyInputModule {
|
|
282
282
|
}
|
|
283
|
-
CurrencyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
284
|
-
CurrencyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
285
|
-
CurrencyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
283
|
+
CurrencyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
284
|
+
CurrencyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputModule, declarations: [CurrencyInputDirective], imports: [CommonModule], exports: [CurrencyInputDirective] });
|
|
285
|
+
CurrencyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputModule, imports: [CommonModule] });
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: CurrencyInputModule, decorators: [{
|
|
287
287
|
type: NgModule,
|
|
288
288
|
args: [{
|
|
289
289
|
declarations: [CurrencyInputDirective],
|
|
@@ -80,12 +80,12 @@ class DecimalInputDirective {
|
|
|
80
80
|
this._renderer.setProperty(this._el.nativeElement, 'value', newValue);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
DecimalInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
84
|
-
DecimalInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.
|
|
83
|
+
DecimalInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputDirective, deps: [{ token: i0.ElementRef, self: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
+
DecimalInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: DecimalInputDirective, selector: "input[buiDecimalInput]", inputs: { buiDecimalInput: "buiDecimalInput" }, host: { listeners: { "input": "onInput()", "keypress": "onKeypress($event)", "blur": "onblur()" }, properties: { "placeholder": "this.placeholder", "autocomplete": "this.autocomplete", "type": "this.type", "attr.inputmode": "this.inputMode" } }, providers: [
|
|
85
85
|
DecimalPipe,
|
|
86
86
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DecimalInputDirective), multi: true }
|
|
87
87
|
], usesOnChanges: true, ngImport: i0 });
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputDirective, decorators: [{
|
|
89
89
|
type: Directive,
|
|
90
90
|
args: [{
|
|
91
91
|
selector: 'input[buiDecimalInput]',
|
|
@@ -125,10 +125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
125
125
|
|
|
126
126
|
class DecimalInputModule {
|
|
127
127
|
}
|
|
128
|
-
DecimalInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
129
|
-
DecimalInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
130
|
-
DecimalInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
128
|
+
DecimalInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
129
|
+
DecimalInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputModule, declarations: [DecimalInputDirective], imports: [CommonModule], exports: [DecimalInputDirective] });
|
|
130
|
+
DecimalInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputModule, imports: [CommonModule] });
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DecimalInputModule, decorators: [{
|
|
132
132
|
type: NgModule,
|
|
133
133
|
args: [{
|
|
134
134
|
declarations: [DecimalInputDirective],
|
|
@@ -53,6 +53,7 @@ class DiscreteInputComponent extends _DiscreteInputBase {
|
|
|
53
53
|
/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */
|
|
54
54
|
this.separator = ' ';
|
|
55
55
|
/** @ignore */ this.id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;
|
|
56
|
+
this.autocomplete = 'off';
|
|
56
57
|
this._sizeSpec = [];
|
|
57
58
|
this._required = false;
|
|
58
59
|
this._disabled = false;
|
|
@@ -194,8 +195,13 @@ class DiscreteInputComponent extends _DiscreteInputBase {
|
|
|
194
195
|
this.disabled = isDisabled;
|
|
195
196
|
}
|
|
196
197
|
/** @ignore */
|
|
197
|
-
_handleInput(control, index) {
|
|
198
|
+
_handleInput(control, index, event) {
|
|
198
199
|
let v = control.value && control.value[0];
|
|
200
|
+
const rawValue = event.target.value;
|
|
201
|
+
if (rawValue.length > 1) {
|
|
202
|
+
this._replaceText(rawValue, event);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
199
205
|
control.setValue(v);
|
|
200
206
|
const nextElement = this.inputParts.get(index + 1);
|
|
201
207
|
if (!control.errors && nextElement) {
|
|
@@ -256,15 +262,7 @@ class DiscreteInputComponent extends _DiscreteInputBase {
|
|
|
256
262
|
_onPaste(event) {
|
|
257
263
|
var _a;
|
|
258
264
|
let text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
|
|
259
|
-
|
|
260
|
-
if (this.accept) {
|
|
261
|
-
text = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');
|
|
262
|
-
}
|
|
263
|
-
this.value = text;
|
|
264
|
-
this.onChange(this.value);
|
|
265
|
-
}
|
|
266
|
-
event.preventDefault();
|
|
267
|
-
this.onContainerClick();
|
|
265
|
+
this._replaceText(text, event);
|
|
268
266
|
}
|
|
269
267
|
/** @ignore */
|
|
270
268
|
_separatorRequired(index) {
|
|
@@ -283,16 +281,27 @@ class DiscreteInputComponent extends _DiscreteInputBase {
|
|
|
283
281
|
this.updateErrorState();
|
|
284
282
|
}
|
|
285
283
|
}
|
|
284
|
+
_replaceText(text, event) {
|
|
285
|
+
if (text) {
|
|
286
|
+
if (this.accept) {
|
|
287
|
+
text = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');
|
|
288
|
+
}
|
|
289
|
+
this.value = text;
|
|
290
|
+
this.onChange(this.value);
|
|
291
|
+
}
|
|
292
|
+
event.preventDefault();
|
|
293
|
+
this.onContainerClick();
|
|
294
|
+
}
|
|
286
295
|
}
|
|
287
296
|
/** @ignore */
|
|
288
297
|
DiscreteInputComponent.nextId = 0;
|
|
289
|
-
DiscreteInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
290
|
-
DiscreteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
298
|
+
DiscreteInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: MAT_FORM_FIELD, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
299
|
+
DiscreteInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: DiscreteInputComponent, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], autocomplete: "autocomplete", sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] });
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputComponent, decorators: [{
|
|
292
301
|
type: Component,
|
|
293
302
|
args: [{ selector: 'bui-discrete-input', providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], host: {
|
|
294
303
|
class: 'bui-discrete-input bui-host'
|
|
295
|
-
}, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\
|
|
304
|
+
}, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
|
|
296
305
|
}], ctorParameters: function () {
|
|
297
306
|
return [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: i5.MatFormField, decorators: [{
|
|
298
307
|
type: Optional
|
|
@@ -320,6 +329,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
320
329
|
}], inputParts: [{
|
|
321
330
|
type: ViewChildren,
|
|
322
331
|
args: ['part', { read: ElementRef }]
|
|
332
|
+
}], autocomplete: [{
|
|
333
|
+
type: Input
|
|
323
334
|
}], sizeSpec: [{
|
|
324
335
|
type: Input
|
|
325
336
|
}], placeholder: [{
|
|
@@ -334,10 +345,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
334
345
|
|
|
335
346
|
class DiscreteInputModule {
|
|
336
347
|
}
|
|
337
|
-
DiscreteInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
338
|
-
DiscreteInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
339
|
-
DiscreteInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
348
|
+
DiscreteInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
349
|
+
DiscreteInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputModule, declarations: [DiscreteInputComponent], imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule], exports: [DiscreteInputComponent] });
|
|
350
|
+
DiscreteInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputModule, imports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule] });
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DiscreteInputModule, decorators: [{
|
|
341
352
|
type: NgModule,
|
|
342
353
|
args: [{
|
|
343
354
|
declarations: [DiscreteInputComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher, mixinErrorState } from '@angular/material/core';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n// Boilerplate for applying mixins to form field control for error state checking.\n/** @ignore */\nconst _DiscreteInputBase = mixinErrorState(\n\tclass {\n\t\treadonly stateChanges = new Subject<void>();\n\t\tconstructor(\n\t\t\t/** @ignore */ public _defaultErrorStateMatcher: ErrorStateMatcher,\n\t\t\t/** @ignore */ public _parentForm: NgForm,\n\t\t\t/** @ignore */ public _parentFormGroup: FormGroupDirective,\n\t\t\t/** @ignore */ public ngControl: NgControl\n\t\t) {}\n\t}\n);\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t}\n})\nexport class DiscreteInputComponent\n\textends _DiscreteInputBase\n\timplements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy\n{\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges: Subject<void>;\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tsuper(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, control);\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number): void {\n\t\tlet v = control.value && control.value[0];\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\t/** @ignore */\n\tngDoCheck() {\n\t\tif (this.ngControl) {\n\t\t\t// We need to re-evaluate this on every change detection cycle, because there are some\n\t\t\t// error triggers that we can't subscribe to (e.g. parent form submissions). This means\n\t\t\t// that whatever logic is in here has to be super lean or we risk destroying the performance.\n\t\t\tthis.updateErrorState();\n\t\t}\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\tsize=\"1\"\n\t\t\t\tmaxLength=\"1\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DiscreteInputComponent } from './discrete-input.component';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { A11yModule } from '@angular/cdk/a11y';\n\n@NgModule({\n\tdeclarations: [DiscreteInputComponent],\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\n\texports: [DiscreteInputComponent]\n})\nexport class DiscreteInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BA;AACA;AACA,MAAM,kBAAkB,GAAG,eAAe,CACzC,MAAA;AAEC,IAAA,WAAA;AACC,mBAAsB,yBAA4C;AAClE,mBAAsB,WAAmB;AACzC,mBAAsB,gBAAoC;AAC1D,mBAAsB,SAAoB,EAAA;AAHpB,QAAA,IAAyB,CAAA,yBAAA,GAAzB,yBAAyB,CAAmB;AAC5C,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;AACnB,QAAA,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAoB;AACpC,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;AALlC,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;KAMxC;AACJ,CAAA,CACD,CAAC;AAEF;;;;;;;;;;;;;;AAcG;AAUG,MAAO,sBACZ,SAAQ,kBAAkB,CAAA;AAsJ1B,IAAA,WAAA,CACS,aAA2B,EAC3B,WAAoC,EACR,SAAuB,EACvC,OAAkB,EAC1B,WAAmB,EACnB,gBAAoC,EAChD,yBAA4C,EAAA;QAE5C,KAAK,CAAC,yBAAyB,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;AARjE,QAAA,IAAa,CAAA,aAAA,GAAb,aAAa,CAAc;AAC3B,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAyB;;AApI7C,QAAA,IAAI,CAAA,IAAA,GAAmC,MAAM,CAAC;;AAI9C,QAAA,IAAS,CAAA,SA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A;sBADX,KAAK;gBA6BF,WAAW,EAAA,CAAA;sBADd,KAAK;gBAWF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAWF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAYF,KAAK,EAAA,CAAA;sBADR,KAAK;;;MEzLM,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAJhB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACjE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAEpB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHrB,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAG/D,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC;oBAC5E,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBACjC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher, mixinErrorState } from '@angular/material/core';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n// Boilerplate for applying mixins to form field control for error state checking.\n/** @ignore */\nconst _DiscreteInputBase = mixinErrorState(\n\tclass {\n\t\treadonly stateChanges = new Subject<void>();\n\t\tconstructor(\n\t\t\t/** @ignore */ public _defaultErrorStateMatcher: ErrorStateMatcher,\n\t\t\t/** @ignore */ public _parentForm: NgForm,\n\t\t\t/** @ignore */ public _parentFormGroup: FormGroupDirective,\n\t\t\t/** @ignore */ public ngControl: NgControl\n\t\t) {}\n\t}\n);\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t}\n})\nexport class DiscreteInputComponent\n\textends _DiscreteInputBase\n\timplements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy\n{\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges: Subject<void>;\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\t@Input()\n\tautocomplete?: string = 'off';\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tsuper(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, control);\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number, event: Event): void {\n\t\tlet v = control.value && control.value[0];\n\t\tconst rawValue = (event.target as HTMLInputElement).value;\n\t\tif (rawValue.length > 1) {\n\t\t\tthis._replaceText(rawValue, event);\n\t\t\treturn;\n\t\t}\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tthis._replaceText(text, event);\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\t/** @ignore */\n\tngDoCheck() {\n\t\tif (this.ngControl) {\n\t\t\t// We need to re-evaluate this on every change detection cycle, because there are some\n\t\t\t// error triggers that we can't subscribe to (e.g. parent form submissions). This means\n\t\t\t// that whatever logic is in here has to be super lean or we risk destroying the performance.\n\t\t\tthis.updateErrorState();\n\t\t}\n\t}\n\n\tprivate _replaceText(text: string | undefined, event: Event) {\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t<ng-template ngFor [ngForOf]=\"parts.controls\" let-p let-i=\"index\">\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t<span *ngIf=\"_separatorRequired(i)\" class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t</ng-template>\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DiscreteInputComponent } from './discrete-input.component';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { A11yModule } from '@angular/cdk/a11y';\n\n@NgModule({\n\tdeclarations: [DiscreteInputComponent],\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\n\texports: [DiscreteInputComponent]\n})\nexport class DiscreteInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BA;AACA;AACA,MAAM,kBAAkB,GAAG,eAAe,CACzC,MAAA;AAEC,IAAA,WAAA;AACC,mBAAsB,yBAA4C;AAClE,mBAAsB,WAAmB;AACzC,mBAAsB,gBAAoC;AAC1D,mBAAsB,SAAoB,EAAA;AAHpB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AAW,EAAA,CAAA;sBADd,KAAK;gBAWF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAWF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAYF,KAAK,EAAA,CAAA;sBADR,KAAK;;;ME5LM,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAJhB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACjE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAEpB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHrB,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAG/D,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC;oBAC5E,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBACjC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -40,9 +40,9 @@ class FileUploadItem {
|
|
|
40
40
|
*/
|
|
41
41
|
class FileUploadService {
|
|
42
42
|
}
|
|
43
|
-
FileUploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
44
|
-
FileUploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
43
|
+
FileUploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
+
FileUploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadService });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadService, decorators: [{
|
|
46
46
|
type: Injectable
|
|
47
47
|
}] });
|
|
48
48
|
|
|
@@ -383,15 +383,15 @@ class FileUploadComponent {
|
|
|
383
383
|
this._onChange(completedIds);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
387
|
-
FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
386
|
+
FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
387
|
+
FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FileUploadComponent, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.PercentPipe, name: "percent" }], animations: [
|
|
388
388
|
trigger('slideOut', [
|
|
389
389
|
transition('* => *', [
|
|
390
390
|
query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
|
|
391
391
|
])
|
|
392
392
|
])
|
|
393
393
|
] });
|
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
395
395
|
type: Component,
|
|
396
396
|
args: [{ host: {
|
|
397
397
|
class: 'bui-host bui-file-upload',
|
|
@@ -438,22 +438,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
438
438
|
|
|
439
439
|
class FileUploadModule {
|
|
440
440
|
}
|
|
441
|
-
FileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
442
|
-
FileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
441
|
+
FileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
442
|
+
FileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule,
|
|
443
443
|
MatIconModule,
|
|
444
444
|
IconFontModule,
|
|
445
445
|
MatProgressBarModule,
|
|
446
446
|
MatButtonModule,
|
|
447
447
|
MatDividerModule,
|
|
448
448
|
MatTooltipModule], exports: [FileUploadComponent] });
|
|
449
|
-
FileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
449
|
+
FileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadModule, imports: [CommonModule,
|
|
450
450
|
MatIconModule,
|
|
451
451
|
IconFontModule,
|
|
452
452
|
MatProgressBarModule,
|
|
453
453
|
MatButtonModule,
|
|
454
454
|
MatDividerModule,
|
|
455
455
|
MatTooltipModule] });
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FileUploadModule, decorators: [{
|
|
457
457
|
type: NgModule,
|
|
458
458
|
args: [{
|
|
459
459
|
declarations: [FileUploadComponent],
|