@mintplayer/ng-bootstrap 21.0.0 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +33 -46
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +12 -30
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +6 -18
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +31 -65
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +200 -132
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +14 -17
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +231 -347
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +43 -39
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +7 -35
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +46 -86
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +7 -6
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +32 -74
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +6 -7
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +18 -18
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +20 -22
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +16 -10
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +8 -28
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +204 -265
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +8 -21
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +43 -38
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +59 -120
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +11 -25
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +8 -28
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +67 -103
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +34 -63
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +19 -47
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +35 -41
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +205 -779
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +34 -39
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +74 -100
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +37 -79
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +78 -45
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +16 -26
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +14 -40
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +8 -32
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +70 -76
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +11 -11
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +53 -99
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +7 -38
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +23 -49
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +33 -38
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +45 -98
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +12 -24
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +21 -43
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +29 -49
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +5 -5
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +11 -15
- package/types/mintplayer-ng-bootstrap-alert.d.ts +4 -9
- package/types/mintplayer-ng-bootstrap-badge.d.ts +5 -9
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +14 -22
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +41 -35
- package/types/mintplayer-ng-bootstrap-close.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +4 -5
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +70 -97
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +11 -11
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +6 -13
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +14 -20
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +1 -3
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -26
- package/types/mintplayer-ng-bootstrap-let.d.ts +0 -2
- package/types/mintplayer-ng-bootstrap-markdown.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +3 -6
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +6 -6
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +5 -11
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +74 -80
- package/types/mintplayer-ng-bootstrap-navigation-lock.d.ts +2 -4
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +12 -14
- package/types/mintplayer-ng-bootstrap-ordinal-number.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +17 -31
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +3 -8
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +5 -11
- package/types/mintplayer-ng-bootstrap-popover.d.ts +15 -23
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +19 -22
- package/types/mintplayer-ng-bootstrap-range.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-rating.d.ts +8 -14
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +7 -11
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +132 -220
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +14 -15
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +20 -27
- package/types/mintplayer-ng-bootstrap-select.d.ts +13 -23
- package/types/mintplayer-ng-bootstrap-select2.d.ts +16 -14
- package/types/mintplayer-ng-bootstrap-shell.d.ts +6 -12
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +7 -12
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +8 -16
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +21 -27
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +29 -37
- package/types/mintplayer-ng-bootstrap-table.d.ts +6 -13
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +7 -14
- package/types/mintplayer-ng-bootstrap-toast.d.ts +5 -10
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +22 -36
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +4 -7
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +10 -15
- package/types/mintplayer-ng-bootstrap-trust-html.d.ts +0 -2
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +14 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select/src/component/select.component.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/component/select.component.html","../../../../libs/mintplayer-ng-bootstrap/select/src/value-accessors/select-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/select.module.ts","../../../../libs/mintplayer-ng-bootstrap/select/mintplayer-ng-bootstrap-select.ts"],"sourcesContent":["import { Component, ElementRef, Input, OnInit, Renderer2, ViewChild } from '@angular/core';\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { BsSelectSize } from '../types/select-size';\n\n@Component({\n selector: 'bs-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n standalone: false,\n})\nexport class BsSelectComponent implements OnInit {\n constructor(private renderer: Renderer2) {\n this.sizeClass$ = this.size$.pipe(map((size) => {\n switch (size) {\n case 'sm':\n case 'lg':\n return `form-select-${size}`;\n default:\n return null;\n }\n }));\n\n this.multipleValue$ = this.multiple$.pipe(map((multiple) => {\n if (multiple) {\n return true;\n } else {\n return null;\n }\n }));\n }\n\n // For debugging purposes\n @Input() public identifier = 0;\n\n @ViewChild('selectBox') selectBox!: ElementRef<HTMLSelectElement>; \n\n ngOnInit(): void {}\n\n //#region Size\n size$ = new BehaviorSubject<BsSelectSize>('md');\n public get size() {\n return this.size$.value;\n }\n @Input() public set size(value: BsSelectSize) {\n this.size$.next(value);\n }\n //#endregion\n\n //#region Multiple\n multiple$ = new BehaviorSubject<boolean>(false);\n public get multiple() {\n return this.multiple$.value;\n }\n @Input() public set multiple(value: boolean) {\n this.multiple$.next(value);\n }\n //#endregion\n\n //#region NumberVisible\n numberVisible$ = new BehaviorSubject<number | null>(null);\n public get numberVisible() {\n return this.numberVisible$.value;\n }\n @Input() public set numberVisible(value: number | null) {\n this.numberVisible$.next(value);\n }\n //#endregion\n\n //#region Disabled\n public get disabled() {\n return this.selectBox!.nativeElement.disabled;\n }\n @Input() public set disabled(value: boolean) {\n if (this.selectBox) {\n this.renderer.setProperty(this.selectBox.nativeElement, 'disabled', value);\n }\n }\n //#endregion\n\n sizeClass$: Observable<string | null>;\n multipleValue$: Observable<boolean | null>;\n}\n","<select class=\"form-select\" #selectBox [class]=\"sizeClass$ | async\" [attr.multiple]=\"multipleValue$ | async\" [attr.size]=\"numberVisible$ | async\" aria-label=\"Default select example\">\n <ng-content></ng-content>\n</select>","import { Directive, ElementRef, forwardRef, Host, HostListener, Input, OnDestroy, Optional, Renderer2 } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { BsSelectComponent } from \"../component/select.component\";\n\n@Directive({\n selector: 'bs-select',\n standalone: false,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsSelectValueAccessor),\n multi: true,\n }],\n})\nexport class BsSelectValueAccessor implements ControlValueAccessor {\n constructor(private _renderer: Renderer2, private _elementRef: ElementRef, private selectBox: BsSelectComponent) {}\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n registerOnChange(fn: (p: any) => {}) {\n this.onChange = (valueString: string) => {\n // View -> Model\n this.value = this.getOptionValue(valueString);\n fn(this.value);\n // fn(valueString);\n };\n }\n setDisabledState(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n protected setProperty(key: string, value: any): void {\n // if (this._elementRef) {\n // this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n // }\n if (this.selectBox.selectBox) {\n this._renderer.setProperty(this.selectBox.selectBox.nativeElement, key, value);\n }\n }\n\n @HostListener('change', ['$event']) hostOnChange(event: Event) {\n this.onChange((<any>event.target).value);\n }\n\n @HostListener('blur', ['$event']) hostBlur(ev: Event) {\n this.onTouched();\n }\n\n value: any;\n optionMap = new Map<string, any>();\n idCounter = 0;\n\n private compareWithFunction: (value1: any, value2: any) => boolean = Object.is;\n @Input() set compareWith(value: (value1: any, value2: any) => boolean) {\n if (typeof value !== 'function') {\n throw new Error('compareWith must be a function');\n }\n this.compareWithFunction = value;\n }\n\n buildValueString(id: string | null, value: any) {\n if (id == null) {\n return `${value}`;\n }\n\n if (value && (typeof value === 'object')) {\n value = 'Object';\n }\n\n return `${id}: ${value}`.slice(0, 50);\n }\n\n extractId(valueString: string) {\n return valueString.split(':')[0];\n }\n\n writeValue(value: any) {\n this.value = value;\n // console.log(`WriteValue ${this.selectBox.identifier}`, value);\n\n const id = this.getOptionId(value);\n const valueString = this.buildValueString(id, value);\n this.setProperty('value', valueString);\n }\n\n registerOption() {\n return (this.idCounter++).toString();\n }\n\n getOptionId(value: any) {\n for (const id of Array.from(this.optionMap.keys())) {\n if (this.compareWithFunction(this.optionMap.get(id), value)) {\n return id;\n }\n }\n\n // This shouldn't happen\n // debugger;\n \n return null;\n }\n\n getOptionValue(valueString: string) {\n const id = this.extractId(valueString);\n return this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n }\n}\n\n@Directive({\n selector: 'option',\n standalone: false,\n})\nexport class BsSelectOption implements OnDestroy {\n constructor(private element: ElementRef, private renderer: Renderer2, @Optional() @Host() private select: BsSelectValueAccessor) {\n if (this.select) {\n this.id = this.select.registerOption();\n }\n }\n \n id!: string;\n\n @Input('ngValue') set ngValue(value: any) {\n if (this.select) {\n this.select.optionMap.set(this.id, value);\n this.setElementValue(this.select.buildValueString(this.id, value));\n // console.log('ngValue', this.select.value);\n this.select.writeValue(this.select.value);\n }\n }\n\n @Input('value') set value(value: any) {\n this.setElementValue(value);\n if (this.select) {\n this.select.writeValue(this.select.value);\n }\n }\n\n setElementValue(value: string) {\n // console.log('setElementValue', value);\n // const nativeSelect = this.select['selectBox'].selectBox;\n // if (nativeSelect) {\n // this.renderer.setProperty(nativeSelect.nativeElement, 'value', value);\n // }\n this.renderer.setProperty(this.element.nativeElement, 'value', value);\n }\n\n ngOnDestroy() {\n if (this.select) {\n this.select.optionMap.delete(this.id);\n this.select.writeValue(this.select.value);\n }\n }\n}\n\n// @Directive({\n// selector: 'bs-select',\n// providers: [{\n// provide: NG_VALUE_ACCESSOR,\n// useExisting: forwardRef(() => BsSelectValueAccessor),\n// multi: true,\n// }],\n// })\n// export class BsSelectValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {\n// constructor(private host: BsSelectComponent) {}\n\n// destroyed$ = new Subject();\n\n// onValueChange?: (value: any) => void;\n// onTouched?: () => void;\n\n// //#region Lifecycle hooks\n// ngAfterViewInit() {\n// fromEvent(this.host.selectBox.nativeElement, 'change')\n// .pipe(takeUntil(this.destroyed$))\n// .subscribe((ev) => {\n// if (this.onValueChange) {\n// const val = (<HTMLSelectElement>ev.target).value;\n// console.log('selected', val);\n// this.onValueChange(val);\n// }\n// });\n// }\n\n// ngOnDestroy() {\n// this.destroyed$.next(true);\n// }\n// //#endregion\n\n// @Input('ngValue') set ngValue(value: any) {\n// if (this.host) {\n// this.host.opt\n// }\n// }\n\n// //#region OptionId mapping\n// private compareWithFunction: (value1: any, value2: any) => boolean = Object.is;\n// private optionMap = new Map<string, any>();\n// @Input() public set compareWith(fn: (value1: any, value2: any) => boolean) {\n// if (typeof fn !== 'function') {\n// throw new Error('compareWith must be a function');\n// }\n// this.compareWithFunction = fn;\n// }\n\n// private getOptionId(value: any) {\n// for (const id of Array.from(this.optionMap.keys())) {\n// if (this.compareWith(this.optionMap.get(id), value)) {\n// return id;\n// }\n// }\n// return null;\n// }\n\n// private getOptionValue(valueString: string) {\n// const id = this.extractId(valueString);\n// return this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n// }\n\n// private extractId(valueString: string) {\n// return valueString.split(':')[0];\n// }\n// //#endregion\n\n// //#region ControlValueAccessor implementation\n// registerOnChange(fn: (_: any) => void) {\n// this.onValueChange = (valueString: string) => {\n// this.value = this.getOptionValue(valueString);\n// fn(this.value);\n// };\n// }\n \n// registerOnTouched(fn: () => void) {\n// this.onTouched = fn;\n// }\n\n// value: any;\n// writeValue(value: any) {\n// this.value = value;\n// if (this.host.selectBox) {\n// // this.host.selectBox.nativeElement.selectedIndex = this.host.selectBox.nativeElement.options.item();\n// }\n// }\n\n// setDisabledState(isDisabled: boolean) {\n// if (this.host.selectBox) {\n// this.host.selectBox.nativeElement.disabled = isDisabled;\n// }\n// }\n// //#endregion\n\n// }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BsSelectComponent } from './component/select.component';\nimport { BsSelectValueAccessor, BsSelectOption } from './value-accessors/select-value-accessor';\n\n@NgModule({\n declarations: [\n BsSelectComponent,\n BsSelectValueAccessor,\n BsSelectOption\n ],\n imports: [CommonModule],\n exports: [\n BsSelectComponent,\n BsSelectValueAccessor,\n BsSelectOption\n ],\n})\nexport class BsSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsSelectComponent"],"mappings":";;;;;;;MAUa,iBAAiB,CAAA;AAC5B,IAAA,WAAA,CAAoB,QAAmB,EAAA;QAAnB,IAAA,CAAA,QAAQ,GAAR,QAAQ;;QAqBZ,IAAA,CAAA,UAAU,GAAG,CAAC;;AAO9B,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,eAAe,CAAe,IAAI,CAAC;;;AAU/C,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;;;AAU/C,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC;AA/CvD,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,KAAI;YAC7C,QAAQ,IAAI;AACV,gBAAA,KAAK,IAAI;AACT,gBAAA,KAAK,IAAI;oBACP,OAAO,CAAA,YAAA,EAAe,IAAI,CAAA,CAAE;AAC9B,gBAAA;AACE,oBAAA,OAAO,IAAI;;QAEjB,CAAC,CAAC,CAAC;AAEH,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAI;YACzD,IAAI,QAAQ,EAAE;AACZ,gBAAA,OAAO,IAAI;YACb;iBAAO;AACL,gBAAA,OAAO,IAAI;YACb;QACF,CAAC,CAAC,CAAC;IACL;AAOA,IAAA,QAAQ,KAAU;AAIlB,IAAA,IAAW,IAAI,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK;IACzB;IACA,IAAoB,IAAI,CAAC,KAAmB,EAAA;AAC1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S;;sBASf,KAAK;uBAAC,OAAO;;;MClHH,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAXvB,iBAAiB;YACjB,qBAAqB;YACrB,cAAc,CAAA,EAAA,OAAA,EAAA,CAEN,YAAY,CAAA,EAAA,OAAA,EAAA,CAEpB,iBAAiB;YACjB,qBAAqB;YACrB,cAAc,CAAA,EAAA,CAAA,CAAA;AAGL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPf,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAOX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select/src/component/select.component.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/component/select.component.html","../../../../libs/mintplayer-ng-bootstrap/select/src/value-accessors/select-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/select/src/select.module.ts","../../../../libs/mintplayer-ng-bootstrap/select/mintplayer-ng-bootstrap-select.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, Renderer2, ViewChild } from '@angular/core';\nimport { BsSelectSize } from '../types/select-size';\n\n@Component({\n selector: 'bs-select',\n templateUrl: './select.component.html',\n styleUrls: ['./select.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsSelectComponent {\n private renderer = inject(Renderer2);\n\n constructor() {\n effect(() => {\n const disabled = this.disabled();\n if (this.selectBox) {\n this.renderer.setProperty(this.selectBox.nativeElement, 'disabled', disabled);\n }\n });\n }\n\n // For debugging purposes\n identifier = input(0);\n\n @ViewChild('selectBox') selectBox!: ElementRef<HTMLSelectElement>;\n\n size = input<BsSelectSize>('md');\n multiple = input<boolean>(false);\n numberVisible = input<number | null>(null);\n disabled = input<boolean>(false);\n\n sizeClass = computed(() => {\n const size = this.size();\n switch (size) {\n case 'sm':\n case 'lg':\n return `form-select-${size}`;\n default:\n return null;\n }\n });\n\n multipleValue = computed(() => {\n if (this.multiple()) {\n return true;\n } else {\n return null;\n }\n });\n}\n","<select class=\"form-select\" #selectBox [class]=\"sizeClass()\" [attr.multiple]=\"multipleValue()\" [attr.size]=\"numberVisible()\" aria-label=\"Default select example\">\n <ng-content></ng-content>\n</select>\n","import { Directive, ElementRef, forwardRef, Host, HostListener, inject, Input, OnDestroy, Optional, Renderer2 } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { BsSelectComponent } from \"../component/select.component\";\n\n@Directive({\n selector: 'bs-select',\n standalone: false,\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsSelectValueAccessor),\n multi: true,\n }],\n})\nexport class BsSelectValueAccessor implements ControlValueAccessor {\n private _renderer = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private selectBox = inject(BsSelectComponent);\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n registerOnChange(fn: (p: any) => {}) {\n this.onChange = (valueString: string) => {\n // View -> Model\n this.value = this.getOptionValue(valueString);\n fn(this.value);\n // fn(valueString);\n };\n }\n setDisabledState(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n protected setProperty(key: string, value: any): void {\n // if (this._elementRef) {\n // this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n // }\n if (this.selectBox.selectBox) {\n this._renderer.setProperty(this.selectBox.selectBox.nativeElement, key, value);\n }\n }\n\n @HostListener('change', ['$event']) hostOnChange(event: Event) {\n this.onChange((<any>event.target).value);\n }\n\n @HostListener('blur', ['$event']) hostBlur(ev: Event) {\n this.onTouched();\n }\n\n value: any;\n optionMap = new Map<string, any>();\n idCounter = 0;\n\n private compareWithFunction: (value1: any, value2: any) => boolean = Object.is;\n @Input() set compareWith(value: (value1: any, value2: any) => boolean) {\n if (typeof value !== 'function') {\n throw new Error('compareWith must be a function');\n }\n this.compareWithFunction = value;\n }\n\n buildValueString(id: string | null, value: any) {\n if (id == null) {\n return `${value}`;\n }\n\n if (value && (typeof value === 'object')) {\n value = 'Object';\n }\n\n return `${id}: ${value}`.slice(0, 50);\n }\n\n extractId(valueString: string) {\n return valueString.split(':')[0];\n }\n\n writeValue(value: any) {\n this.value = value;\n // console.log(`WriteValue ${this.selectBox.identifier}`, value);\n\n const id = this.getOptionId(value);\n const valueString = this.buildValueString(id, value);\n this.setProperty('value', valueString);\n }\n\n registerOption() {\n return (this.idCounter++).toString();\n }\n\n getOptionId(value: any) {\n for (const id of Array.from(this.optionMap.keys())) {\n if (this.compareWithFunction(this.optionMap.get(id), value)) {\n return id;\n }\n }\n\n // This shouldn't happen\n // debugger;\n \n return null;\n }\n\n getOptionValue(valueString: string) {\n const id = this.extractId(valueString);\n return this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n }\n}\n\n@Directive({\n selector: 'option',\n standalone: false,\n})\nexport class BsSelectOption implements OnDestroy {\n private element = inject(ElementRef);\n private renderer = inject(Renderer2);\n private select = inject(BsSelectValueAccessor, { optional: true, host: true });\n\n constructor() {\n if (this.select) {\n this.id = this.select.registerOption();\n }\n }\n \n id!: string;\n\n @Input('ngValue') set ngValue(value: any) {\n if (this.select) {\n this.select.optionMap.set(this.id, value);\n this.setElementValue(this.select.buildValueString(this.id, value));\n // console.log('ngValue', this.select.value);\n this.select.writeValue(this.select.value);\n }\n }\n\n @Input('value') set value(value: any) {\n this.setElementValue(value);\n if (this.select) {\n this.select.writeValue(this.select.value);\n }\n }\n\n setElementValue(value: string) {\n // console.log('setElementValue', value);\n // const nativeSelect = this.select['selectBox'].selectBox;\n // if (nativeSelect) {\n // this.renderer.setProperty(nativeSelect.nativeElement, 'value', value);\n // }\n this.renderer.setProperty(this.element.nativeElement, 'value', value);\n }\n\n ngOnDestroy() {\n if (this.select) {\n this.select.optionMap.delete(this.id);\n this.select.writeValue(this.select.value);\n }\n }\n}\n\n// @Directive({\n// selector: 'bs-select',\n// providers: [{\n// provide: NG_VALUE_ACCESSOR,\n// useExisting: forwardRef(() => BsSelectValueAccessor),\n// multi: true,\n// }],\n// })\n// export class BsSelectValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {\n// constructor(private host: BsSelectComponent) {}\n\n// destroyed$ = new Subject();\n\n// onValueChange?: (value: any) => void;\n// onTouched?: () => void;\n\n// //#region Lifecycle hooks\n// ngAfterViewInit() {\n// fromEvent(this.host.selectBox.nativeElement, 'change')\n// .pipe(takeUntil(this.destroyed$))\n// .subscribe((ev) => {\n// if (this.onValueChange) {\n// const val = (<HTMLSelectElement>ev.target).value;\n// console.log('selected', val);\n// this.onValueChange(val);\n// }\n// });\n// }\n\n// ngOnDestroy() {\n// this.destroyed$.next(true);\n// }\n// //#endregion\n\n// @Input('ngValue') set ngValue(value: any) {\n// if (this.host) {\n// this.host.opt\n// }\n// }\n\n// //#region OptionId mapping\n// private compareWithFunction: (value1: any, value2: any) => boolean = Object.is;\n// private optionMap = new Map<string, any>();\n// @Input() public set compareWith(fn: (value1: any, value2: any) => boolean) {\n// if (typeof fn !== 'function') {\n// throw new Error('compareWith must be a function');\n// }\n// this.compareWithFunction = fn;\n// }\n\n// private getOptionId(value: any) {\n// for (const id of Array.from(this.optionMap.keys())) {\n// if (this.compareWith(this.optionMap.get(id), value)) {\n// return id;\n// }\n// }\n// return null;\n// }\n\n// private getOptionValue(valueString: string) {\n// const id = this.extractId(valueString);\n// return this.optionMap.has(id) ? this.optionMap.get(id) : valueString;\n// }\n\n// private extractId(valueString: string) {\n// return valueString.split(':')[0];\n// }\n// //#endregion\n\n// //#region ControlValueAccessor implementation\n// registerOnChange(fn: (_: any) => void) {\n// this.onValueChange = (valueString: string) => {\n// this.value = this.getOptionValue(valueString);\n// fn(this.value);\n// };\n// }\n \n// registerOnTouched(fn: () => void) {\n// this.onTouched = fn;\n// }\n\n// value: any;\n// writeValue(value: any) {\n// this.value = value;\n// if (this.host.selectBox) {\n// // this.host.selectBox.nativeElement.selectedIndex = this.host.selectBox.nativeElement.options.item();\n// }\n// }\n\n// setDisabledState(isDisabled: boolean) {\n// if (this.host.selectBox) {\n// this.host.selectBox.nativeElement.disabled = isDisabled;\n// }\n// }\n// //#endregion\n\n// }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BsSelectComponent } from './component/select.component';\nimport { BsSelectValueAccessor, BsSelectOption } from './value-accessors/select-value-accessor';\n\n@NgModule({\n declarations: [\n BsSelectComponent,\n BsSelectValueAccessor,\n BsSelectOption\n ],\n imports: [CommonModule],\n exports: [\n BsSelectComponent,\n BsSelectValueAccessor,\n BsSelectOption\n ],\n})\nexport class BsSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAUa,iBAAiB,CAAA;AAG5B,IAAA,WAAA,GAAA;AAFQ,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CA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E,KAAK;uBAAC,SAAS;;sBASf,KAAK;uBAAC,OAAO;;;MCxHH,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAXvB,iBAAiB;YACjB,qBAAqB;YACrB,cAAc,CAAA,EAAA,OAAA,EAAA,CAEN,YAAY,CAAA,EAAA,OAAA,EAAA,CAEpB,iBAAiB;YACjB,qBAAqB;YACrB,cAAc,CAAA,EAAA,CAAA,CAAA;AAGL,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPf,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAOX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,qBAAqB;wBACrB;AACD,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { signal, model, output, effect, HostListener, HostBinding, ViewChild, ChangeDetectionStrategy, Component, inject, TemplateRef, untracked, isSignal, Input, Directive, NgModule } from '@angular/core';
|
|
4
3
|
import * as i1 from '@angular/common';
|
|
5
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
6
5
|
import * as i2 from '@angular/forms';
|
|
@@ -16,56 +15,63 @@ import { BsInListPipe } from '@mintplayer/ng-bootstrap/in-list';
|
|
|
16
15
|
|
|
17
16
|
class BsSelect2Component {
|
|
18
17
|
constructor() {
|
|
19
|
-
this.isOpen = false;
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.searchterm = '';
|
|
23
|
-
this.
|
|
24
|
-
this.provideSuggestions = new EventEmitter();
|
|
25
|
-
this.selectedItems = [];
|
|
18
|
+
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
19
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
20
|
+
this.suggestions = model([], ...(ngDevMode ? [{ debugName: "suggestions" }] : []));
|
|
21
|
+
this.searchterm = model('', ...(ngDevMode ? [{ debugName: "searchterm" }] : []));
|
|
22
|
+
this.provideSuggestions = output();
|
|
26
23
|
this.isFocused = false;
|
|
24
|
+
this.selectedItems = model([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
27
25
|
this.charWidth = 10;
|
|
28
|
-
this.searchWidth = 20;
|
|
26
|
+
this.searchWidth = signal(20, ...(ngDevMode ? [{ debugName: "searchWidth" }] : []));
|
|
27
|
+
effect(() => {
|
|
28
|
+
const suggestions = this.suggestions();
|
|
29
|
+
if (suggestions) {
|
|
30
|
+
this.isLoading.set(false);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
29
33
|
}
|
|
30
34
|
onProvideSuggestions(value) {
|
|
31
|
-
this.
|
|
35
|
+
this.searchterm.set(value);
|
|
36
|
+
this.searchWidth.set(this.charWidth * (value.length + 2));
|
|
32
37
|
if (value === '') {
|
|
33
|
-
this.isOpen
|
|
34
|
-
this.suggestions$.next([]);
|
|
38
|
+
this.isOpen.set(false);
|
|
35
39
|
}
|
|
36
40
|
else {
|
|
37
|
-
this.isLoading
|
|
38
|
-
this.isOpen
|
|
41
|
+
this.isLoading.set(true);
|
|
42
|
+
this.isOpen.set(true);
|
|
39
43
|
this.provideSuggestions.emit(value);
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
onSuggestionClicked(suggestion) {
|
|
43
|
-
this.searchterm
|
|
44
|
-
this.isOpen
|
|
45
|
-
const
|
|
47
|
+
this.searchterm.set('');
|
|
48
|
+
this.isOpen.set(false);
|
|
49
|
+
const currentItems = this.selectedItems();
|
|
50
|
+
const existing = currentItems.find((value, index) => value.id === suggestion.id);
|
|
46
51
|
if (existing === undefined) {
|
|
47
|
-
this.selectedItems.
|
|
52
|
+
this.selectedItems.set([...currentItems, suggestion]);
|
|
48
53
|
}
|
|
49
54
|
else {
|
|
50
|
-
this.selectedItems.
|
|
55
|
+
this.selectedItems.set(currentItems.filter(item => item.id !== suggestion.id));
|
|
51
56
|
}
|
|
52
57
|
this.searchBox.nativeElement.focus();
|
|
53
58
|
}
|
|
54
59
|
onRemoveItem(item, event) {
|
|
55
60
|
event.stopPropagation();
|
|
56
|
-
this.selectedItems
|
|
61
|
+
const currentItems = this.selectedItems();
|
|
62
|
+
this.selectedItems.set(currentItems.filter(i => i.id !== item.id));
|
|
57
63
|
this.focus();
|
|
58
64
|
}
|
|
59
65
|
focus() {
|
|
60
66
|
this.searchBox.nativeElement.focus();
|
|
61
67
|
}
|
|
62
68
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSelect2Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
63
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsSelect2Component, isStandalone: false, selector: "bs-select2", inputs: { searchterm: "searchterm",
|
|
69
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BsSelect2Component, isStandalone: false, selector: "bs-select2", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, searchterm: { classPropertyName: "searchterm", publicName: "searchterm", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { suggestions: "suggestionsChange", searchterm: "searchtermChange", provideSuggestions: "provideSuggestions", selectedItems: "selectedItemsChange" }, host: { listeners: { "click": "focus()" }, properties: { "class.focus": "this.isFocused" } }, viewQueries: [{ propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, static: true }, { propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }, { propertyName: "itemsBox", first: true, predicate: ["itemsBox"], descendants: true }], ngImport: i0, template: "<bs-has-overlay></bs-has-overlay>\n<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" #itemsBox class=\"items-box text-wrap\">\n @for (item of selectedItems(); track item) {\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { $implicit: item, select2: this }\"></ng-container>\n }\n\n <input type=\"text\" autocomplete=\"off\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth()\"\n #searchBox />\n <bs-dropdown-menu *bsDropdownMenu [maxHeight]=\"200\">\n @for (suggestion of suggestions(); track $index) {\n <bs-dropdown-item (click)=\"onSuggestionClicked(suggestion)\" [isSelected]=\"selectedItems() | bsInList:suggestion.id\">\n <ng-container *ngTemplateOutlet=\"suggestionTemplate ?? defaultSuggestionTemplate; context: { $implicit: suggestion, select2: this }\"></ng-container>\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n\n<ng-template #defaultItemTemplate let-item let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n\n<ng-template #defaultSuggestionTemplate let-suggestion let-select2=\"select2\">\n {{ suggestion.text }}\n</ng-template>\n", styles: [".items-box{min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen"], outputs: ["isOpenChange"] }, { kind: "directive", type: i3.BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "component", type: i4.BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "component", type: i5.BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["maxHeight"] }, { kind: "component", type: i5.BsDropdownItemComponent, selector: "bs-dropdown-item", inputs: ["isSelected", "disabled"] }, { kind: "pipe", type: i6.BsInListPipe, name: "bsInList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
64
70
|
}
|
|
65
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSelect2Component, decorators: [{
|
|
66
72
|
type: Component,
|
|
67
|
-
args: [{ selector: 'bs-select2', standalone: false,
|
|
68
|
-
}], propDecorators: { defaultItemTemplate: [{
|
|
73
|
+
args: [{ selector: 'bs-select2', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-has-overlay></bs-has-overlay>\n<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" #itemsBox class=\"items-box text-wrap\">\n @for (item of selectedItems(); track item) {\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { $implicit: item, select2: this }\"></ng-container>\n }\n\n <input type=\"text\" autocomplete=\"off\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth()\"\n #searchBox />\n <bs-dropdown-menu *bsDropdownMenu [maxHeight]=\"200\">\n @for (suggestion of suggestions(); track $index) {\n <bs-dropdown-item (click)=\"onSuggestionClicked(suggestion)\" [isSelected]=\"selectedItems() | bsInList:suggestion.id\">\n <ng-container *ngTemplateOutlet=\"suggestionTemplate ?? defaultSuggestionTemplate; context: { $implicit: suggestion, select2: this }\"></ng-container>\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n\n<ng-template #defaultItemTemplate let-item let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n\n<ng-template #defaultSuggestionTemplate let-suggestion let-select2=\"select2\">\n {{ suggestion.text }}\n</ng-template>\n", styles: [".items-box{min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"] }]
|
|
74
|
+
}], ctorParameters: () => [], propDecorators: { suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }, { type: i0.Output, args: ["suggestionsChange"] }], defaultItemTemplate: [{
|
|
69
75
|
type: ViewChild,
|
|
70
76
|
args: ['defaultItemTemplate', { static: true }]
|
|
71
77
|
}], searchBox: [{
|
|
@@ -74,34 +80,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
74
80
|
}], itemsBox: [{
|
|
75
81
|
type: ViewChild,
|
|
76
82
|
args: ['itemsBox']
|
|
77
|
-
}], searchterm: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], suggestions: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], provideSuggestions: [{
|
|
82
|
-
type: Output
|
|
83
|
-
}], selectedItems: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}], isFocused: [{
|
|
83
|
+
}], searchterm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchterm", required: false }] }, { type: i0.Output, args: ["searchtermChange"] }], provideSuggestions: [{ type: i0.Output, args: ["provideSuggestions"] }], isFocused: [{
|
|
86
84
|
type: HostBinding,
|
|
87
85
|
args: ['class.focus']
|
|
88
|
-
}], focus: [{
|
|
86
|
+
}], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }, { type: i0.Output, args: ["selectedItemsChange"] }], focus: [{
|
|
89
87
|
type: HostListener,
|
|
90
88
|
args: ['click']
|
|
91
89
|
}] } });
|
|
92
90
|
|
|
93
91
|
class BsItemTemplateDirective {
|
|
94
|
-
constructor(
|
|
95
|
-
this.select2component =
|
|
96
|
-
this.
|
|
92
|
+
constructor() {
|
|
93
|
+
this.select2component = inject(BsSelect2Component);
|
|
94
|
+
this.templateRef = inject(TemplateRef);
|
|
95
|
+
this.select2component.itemTemplate = this.templateRef;
|
|
96
|
+
// Sync changes from component back to source signal
|
|
97
|
+
effect(() => {
|
|
98
|
+
const componentValue = this.select2component.selectedItems();
|
|
99
|
+
if (this.sourceSignal) {
|
|
100
|
+
const sourceValue = untracked(() => this.sourceSignal());
|
|
101
|
+
if (componentValue !== sourceValue) {
|
|
102
|
+
this.sourceSignal.set(componentValue);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
// Sync changes from source signal to component
|
|
107
|
+
effect(() => {
|
|
108
|
+
if (this.sourceSignal) {
|
|
109
|
+
const sourceValue = this.sourceSignal();
|
|
110
|
+
if (sourceValue !== this.lastSourceValue) {
|
|
111
|
+
this.lastSourceValue = sourceValue;
|
|
112
|
+
const componentValue = untracked(() => this.select2component.selectedItems());
|
|
113
|
+
if (sourceValue !== componentValue) {
|
|
114
|
+
this.select2component.selectedItems.set(sourceValue);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
97
119
|
}
|
|
98
120
|
static ngTemplateContextGuard(dir, ctx) {
|
|
99
121
|
return true;
|
|
100
122
|
}
|
|
101
123
|
set bsItemTemplateOf(value) {
|
|
102
|
-
|
|
124
|
+
if (isSignal(value)) {
|
|
125
|
+
// Store the signal reference for two-way binding
|
|
126
|
+
this.sourceSignal = value;
|
|
127
|
+
this.lastSourceValue = value();
|
|
128
|
+
this.select2component.selectedItems.set(value());
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
// Plain array - one-way binding (backward compatible)
|
|
132
|
+
this.sourceSignal = undefined;
|
|
133
|
+
this.select2component.selectedItems.set(value);
|
|
134
|
+
}
|
|
103
135
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsItemTemplateDirective, deps: [
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsItemTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
105
137
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsItemTemplateDirective, isStandalone: false, selector: "[bsItemTemplate]", inputs: { bsItemTemplateOf: "bsItemTemplateOf" }, ngImport: i0 }); }
|
|
106
138
|
}
|
|
107
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsItemTemplateDirective, decorators: [{
|
|
@@ -110,7 +142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
110
142
|
selector: '[bsItemTemplate]',
|
|
111
143
|
standalone: false,
|
|
112
144
|
}]
|
|
113
|
-
}], ctorParameters: () => [
|
|
145
|
+
}], ctorParameters: () => [], propDecorators: { bsItemTemplateOf: [{
|
|
114
146
|
type: Input
|
|
115
147
|
}] } });
|
|
116
148
|
class BsItemTemplateContext {
|
|
@@ -121,17 +153,18 @@ class BsItemTemplateContext {
|
|
|
121
153
|
}
|
|
122
154
|
|
|
123
155
|
class BsSuggestionTemplateDirective {
|
|
124
|
-
constructor(
|
|
125
|
-
this.select2component =
|
|
156
|
+
constructor() {
|
|
157
|
+
this.select2component = inject(BsSelect2Component);
|
|
158
|
+
const templateRef = inject(TemplateRef);
|
|
126
159
|
this.select2component.suggestionTemplate = templateRef;
|
|
127
160
|
}
|
|
128
161
|
static ngTemplateContextGuard(dir, ctx) {
|
|
129
162
|
return true;
|
|
130
163
|
}
|
|
131
164
|
set bsSuggestionTemplateOf(value) {
|
|
132
|
-
this.select2component.suggestions
|
|
165
|
+
this.select2component.suggestions.set(value);
|
|
133
166
|
}
|
|
134
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSuggestionTemplateDirective, deps: [
|
|
167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSuggestionTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
135
168
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsSuggestionTemplateDirective, isStandalone: false, selector: "[bsSuggestionTemplate]", inputs: { bsSuggestionTemplateOf: "bsSuggestionTemplateOf" }, ngImport: i0 }); }
|
|
136
169
|
}
|
|
137
170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSuggestionTemplateDirective, decorators: [{
|
|
@@ -140,7 +173,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
140
173
|
selector: '[bsSuggestionTemplate]',
|
|
141
174
|
standalone: false,
|
|
142
175
|
}]
|
|
143
|
-
}], ctorParameters: () => [
|
|
176
|
+
}], ctorParameters: () => [], propDecorators: { bsSuggestionTemplateOf: [{
|
|
144
177
|
type: Input
|
|
145
178
|
}] } });
|
|
146
179
|
class BsSuggestionTemplateContext {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-select2.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select2/src/component/select2.component.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/component/select2.component.html","../../../../libs/mintplayer-ng-bootstrap/select2/src/directive/item-template/item-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/directive/suggestion-template/suggestion-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/select2.module.ts","../../../../libs/mintplayer-ng-bootstrap/select2/mintplayer-ng-bootstrap-select2.ts"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\nimport { BehaviorSubject } from 'rxjs';\n\n@Component({\n selector: 'bs-select2',\n templateUrl: './select2.component.html',\n styleUrls: ['./select2.component.scss'],\n standalone: false,\n})\nexport class BsSelect2Component<T extends HasId<U>, U> {\n\n isOpen = false;\n \n suggestions$ = new BehaviorSubject<T[]>([]);\n isLoading$ = new BehaviorSubject<boolean>(false);\n\n @ViewChild('defaultItemTemplate', { static: true }) defaultItemTemplate!: TemplateRef<any>;\n @ViewChild('searchBox') searchBox!: ElementRef<HTMLInputElement>;\n @ViewChild('itemsBox') itemsBox!: ElementRef<HTMLDivElement>;\n @Input() searchterm = '';\n @Input() public suggestions: T[] = [];\n @Output() public provideSuggestions = new EventEmitter<string>();\n @Input() selectedItems: T[] = [];\n @HostBinding('class.focus') isFocused = false;\n\n private charWidth = 10;\n searchWidth = 20;\n itemTemplate?: TemplateRef<T>;\n suggestionTemplate?: TemplateRef<T>;\n\n onProvideSuggestions(value: string) {\n this.searchWidth = this.charWidth * (this.searchterm.length + 2);\n if (value === '') {\n this.isOpen = false;\n this.suggestions$.next([]);\n } else {\n this.isLoading$.next(true);\n this.isOpen = true;\n this.provideSuggestions.emit(value);\n }\n }\n onSuggestionClicked(suggestion: T) {\n this.searchterm = '';\n this.isOpen = false;\n\n const existing = this.selectedItems.find((value, index) => value.id === suggestion.id);\n if (existing === undefined) {\n this.selectedItems.push(suggestion);\n } else {\n this.selectedItems.splice(this.selectedItems.indexOf(existing), 1);\n }\n\n this.searchBox.nativeElement.focus();\n }\n onRemoveItem(item: T, event: MouseEvent) {\n event.stopPropagation();\n this.selectedItems.splice(this.selectedItems.indexOf(item), 1);\n this.focus();\n }\n\n @HostListener('click')\n public focus() {\n this.searchBox.nativeElement.focus();\n }\n \n}\n","<!-- <bs-dropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" #itemsBox class=\"items-box text-wrap\"></bs-dropdown> -->\n<bs-has-overlay></bs-has-overlay>\n<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" #itemsBox class=\"items-box text-wrap\">\n @for (item of selectedItems; track item) {\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { $implicit: item, select2: this }\"></ng-container>\n }\n\n <input type=\"text\" autocomplete=\"off\"\n [(ngModel)]=\"searchterm\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth\"\n #searchBox />\n <bs-dropdown-menu *bsDropdownMenu [maxHeight]=\"200\">\n @for (suggestion of suggestions; track $index) {\n <bs-dropdown-item (click)=\"onSuggestionClicked(suggestion)\" [isSelected]=\"selectedItems | bsInList:suggestion.id\">\n <ng-container *ngTemplateOutlet=\"suggestionTemplate ?? defaultSuggestionTemplate; context: { $implicit: suggestion, select2: this }\"></ng-container>\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n\n<ng-template #defaultItemTemplate let-item let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">×</span>\n {{ item.text }}\n </span>\n</ng-template>\n\n<ng-template #defaultSuggestionTemplate let-suggestion let-select2=\"select2\">\n {{ suggestion.text }}\n</ng-template>","import { Directive, Input, TemplateRef } from '@angular/core';\nimport { BsSelect2Component } from '../../component/select2.component';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\n\n@Directive({\n selector: '[bsItemTemplate]',\n standalone: false,\n})\nexport class BsItemTemplateDirective<T extends HasId<U>, U> {\n constructor(private select2component: BsSelect2Component<T, U>, templateRef: TemplateRef<T>) {\n this.select2component.itemTemplate = templateRef;\n }\n\n public static ngTemplateContextGuard<T extends HasId<U>, U>(dir: BsItemTemplateDirective<T, U>, ctx: any): ctx is BsItemTemplateContext<Exclude<T, false | 0 | '' | null | undefined>, U> {\n return true;\n }\n\n @Input() set bsItemTemplateOf(value: T[]) {\n this.select2component.selectedItems = value;\n }\n}\n\nexport class BsItemTemplateContext<T extends HasId<U>, U> {\n $implicit: T = null!;\n select2: BsSelect2Component<T, U> = null!;\n}","import { Directive, Input, TemplateRef } from '@angular/core';\nimport { BsSelect2Component } from '../../component/select2.component';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\n\n@Directive({\n selector: '[bsSuggestionTemplate]',\n standalone: false,\n})\nexport class BsSuggestionTemplateDirective<T extends HasId<U>, U> {\n constructor(private select2component: BsSelect2Component<T, U>, templateRef: TemplateRef<T>) {\n this.select2component.suggestionTemplate = templateRef;\n }\n\n public static ngTemplateContextGuard<T extends HasId<U>, U>(dir: BsSuggestionTemplateDirective<T, U>, ctx: any): ctx is BsSuggestionTemplateContext<Exclude<T, false | 0 | '' | null | undefined>, U> {\n return true;\n }\n\n @Input() set bsSuggestionTemplateOf(value: T[]) {\n this.select2component.suggestions = value;\n }\n}\n\nexport class BsSuggestionTemplateContext<T extends HasId<U>, U> {\n $implicit: T = null!;\n select2: BsSelect2Component<T, U> = null!;\n}","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsInListPipe } from '@mintplayer/ng-bootstrap/in-list';\nimport { BsDropdownModule } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuModule } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsSelect2Component } from './component/select2.component';\nimport { BsItemTemplateDirective } from './directive/item-template/item-template.directive';\nimport { BsSuggestionTemplateDirective } from './directive/suggestion-template/suggestion-template.directive';\n\n@NgModule({\n declarations: [\n BsSelect2Component,\n BsItemTemplateDirective,\n BsSuggestionTemplateDirective,\n ],\n imports: [\n NgTemplateOutlet,\n FormsModule,\n BsDropdownModule,\n BsDropdownMenuModule,\n BsHasOverlayComponent,\n BsInListPipe,\n ],\n exports: [\n BsSelect2Component,\n BsItemTemplateDirective,\n BsSuggestionTemplateDirective,\n ],\n})\nexport class BsSelect2Module {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsSelect2Component"],"mappings":";;;;;;;;;;;;;;;;MAUa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;QAQE,IAAA,CAAA,MAAM,GAAG,KAAK;AAEd,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC;AAC3C,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC;QAKvC,IAAA,CAAA,UAAU,GAAG,EAAE;QACR,IAAA,CAAA,WAAW,GAAQ,EAAE;AACpB,QAAA,IAAA,CAAA,kBAAkB,GAAG,IAAI,YAAY,EAAU;QACvD,IAAA,CAAA,aAAa,GAAQ,EAAE;QACJ,IAAA,CAAA,SAAS,GAAG,KAAK;QAErC,IAAA,CAAA,SAAS,GAAG,EAAE;QACtB,IAAA,CAAA,WAAW,GAAG,EAAE;AAuCjB,IAAA;AAnCC,IAAA,oBAAoB,CAAC,KAAa,EAAA;AAChC,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,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ChB,oBAAoB;YACpB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FASZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBApB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,uBAAuB;wBACvB,6BAA6B;AAC9B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,gBAAgB;wBAChB,WAAW;wBACX,gBAAgB;wBAChB,oBAAoB;wBACpB,qBAAqB;wBACrB,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,uBAAuB;wBACvB,6BAA6B;AAC9B,qBAAA;AACF,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-select2.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/select2/src/component/select2.component.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/component/select2.component.html","../../../../libs/mintplayer-ng-bootstrap/select2/src/directive/item-template/item-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/directive/suggestion-template/suggestion-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/select2/src/select2.module.ts","../../../../libs/mintplayer-ng-bootstrap/select2/mintplayer-ng-bootstrap-select2.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, ElementRef, HostBinding, HostListener, input, model, output, signal, TemplateRef, ViewChild } from '@angular/core';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\n\n@Component({\n selector: 'bs-select2',\n templateUrl: './select2.component.html',\n styleUrls: ['./select2.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsSelect2Component<T extends HasId<U>, U> {\n\n isOpen = signal(false);\n isLoading = signal<boolean>(false);\n\n suggestions = model<T[]>([]);\n\n @ViewChild('defaultItemTemplate', { static: true }) defaultItemTemplate!: TemplateRef<any>;\n @ViewChild('searchBox') searchBox!: ElementRef<HTMLInputElement>;\n @ViewChild('itemsBox') itemsBox!: ElementRef<HTMLDivElement>;\n searchterm = model('');\n provideSuggestions = output<string>();\n @HostBinding('class.focus') isFocused = false;\n\n selectedItems = model<T[]>([]);\n\n private charWidth = 10;\n searchWidth = signal(20);\n itemTemplate?: TemplateRef<T>;\n suggestionTemplate?: TemplateRef<T>;\n\n constructor() {\n effect(() => {\n const suggestions = this.suggestions();\n if (suggestions) {\n this.isLoading.set(false);\n }\n });\n }\n\n onProvideSuggestions(value: string) {\n this.searchterm.set(value);\n this.searchWidth.set(this.charWidth * (value.length + 2));\n if (value === '') {\n this.isOpen.set(false);\n } else {\n this.isLoading.set(true);\n this.isOpen.set(true);\n this.provideSuggestions.emit(value);\n }\n }\n\n onSuggestionClicked(suggestion: T) {\n this.searchterm.set('');\n this.isOpen.set(false);\n\n const currentItems = this.selectedItems();\n const existing = currentItems.find((value, index) => value.id === suggestion.id);\n if (existing === undefined) {\n this.selectedItems.set([...currentItems, suggestion]);\n } else {\n this.selectedItems.set(currentItems.filter(item => item.id !== suggestion.id));\n }\n\n this.searchBox.nativeElement.focus();\n }\n\n onRemoveItem(item: T, event: MouseEvent) {\n event.stopPropagation();\n const currentItems = this.selectedItems();\n this.selectedItems.set(currentItems.filter(i => i.id !== item.id));\n this.focus();\n }\n\n @HostListener('click')\n public focus() {\n this.searchBox.nativeElement.focus();\n }\n}\n","<bs-has-overlay></bs-has-overlay>\n<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\" #itemsBox class=\"items-box text-wrap\">\n @for (item of selectedItems(); track item) {\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { $implicit: item, select2: this }\"></ng-container>\n }\n\n <input type=\"text\" autocomplete=\"off\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth()\"\n #searchBox />\n <bs-dropdown-menu *bsDropdownMenu [maxHeight]=\"200\">\n @for (suggestion of suggestions(); track $index) {\n <bs-dropdown-item (click)=\"onSuggestionClicked(suggestion)\" [isSelected]=\"selectedItems() | bsInList:suggestion.id\">\n <ng-container *ngTemplateOutlet=\"suggestionTemplate ?? defaultSuggestionTemplate; context: { $implicit: suggestion, select2: this }\"></ng-container>\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n\n<ng-template #defaultItemTemplate let-item let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">×</span>\n {{ item.text }}\n </span>\n</ng-template>\n\n<ng-template #defaultSuggestionTemplate let-suggestion let-select2=\"select2\">\n {{ suggestion.text }}\n</ng-template>\n","import { Directive, effect, inject, Input, isSignal, TemplateRef, untracked, WritableSignal } from '@angular/core';\nimport { BsSelect2Component } from '../../component/select2.component';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\n\n@Directive({\n selector: '[bsItemTemplate]',\n standalone: false,\n})\nexport class BsItemTemplateDirective<T extends HasId<U>, U> {\n private select2component = inject<BsSelect2Component<T, U>>(BsSelect2Component);\n private templateRef = inject<TemplateRef<T>>(TemplateRef);\n private sourceSignal?: WritableSignal<T[]>;\n private lastSourceValue?: T[];\n\n constructor() {\n this.select2component.itemTemplate = this.templateRef;\n\n // Sync changes from component back to source signal\n effect(() => {\n const componentValue = this.select2component.selectedItems();\n if (this.sourceSignal) {\n const sourceValue = untracked(() => this.sourceSignal!());\n if (componentValue !== sourceValue) {\n this.sourceSignal.set(componentValue);\n }\n }\n });\n\n // Sync changes from source signal to component\n effect(() => {\n if (this.sourceSignal) {\n const sourceValue = this.sourceSignal();\n if (sourceValue !== this.lastSourceValue) {\n this.lastSourceValue = sourceValue;\n const componentValue = untracked(() => this.select2component.selectedItems());\n if (sourceValue !== componentValue) {\n this.select2component.selectedItems.set(sourceValue);\n }\n }\n }\n });\n }\n\n public static ngTemplateContextGuard<T extends HasId<U>, U>(dir: BsItemTemplateDirective<T, U>, ctx: any): ctx is BsItemTemplateContext<Exclude<T, false | 0 | '' | null | undefined>, U> {\n return true;\n }\n\n @Input() set bsItemTemplateOf(value: T[] | WritableSignal<T[]>) {\n if (isSignal(value)) {\n // Store the signal reference for two-way binding\n this.sourceSignal = value as WritableSignal<T[]>;\n this.lastSourceValue = value();\n this.select2component.selectedItems.set(value());\n } else {\n // Plain array - one-way binding (backward compatible)\n this.sourceSignal = undefined;\n this.select2component.selectedItems.set(value as T[]);\n }\n }\n}\n\nexport class BsItemTemplateContext<T extends HasId<U>, U> {\n $implicit: T = null!;\n select2: BsSelect2Component<T, U> = null!;\n}","import { Directive, inject, Input, TemplateRef } from '@angular/core';\nimport { BsSelect2Component } from '../../component/select2.component';\nimport { HasId } from '@mintplayer/ng-bootstrap/has-id';\n\n@Directive({\n selector: '[bsSuggestionTemplate]',\n standalone: false,\n})\nexport class BsSuggestionTemplateDirective<T extends HasId<U>, U> {\n private select2component = inject<BsSelect2Component<T, U>>(BsSelect2Component);\n\n constructor() {\n const templateRef = inject<TemplateRef<T>>(TemplateRef);\n this.select2component.suggestionTemplate = templateRef;\n }\n\n public static ngTemplateContextGuard<T extends HasId<U>, U>(dir: BsSuggestionTemplateDirective<T, U>, ctx: any): ctx is BsSuggestionTemplateContext<Exclude<T, false | 0 | '' | null | undefined>, U> {\n return true;\n }\n\n @Input() set bsSuggestionTemplateOf(value: T[]) {\n this.select2component.suggestions.set(value);\n }\n}\n\nexport class BsSuggestionTemplateContext<T extends HasId<U>, U> {\n $implicit: T = null!;\n select2: BsSelect2Component<T, U> = null!;\n}","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsInListPipe } from '@mintplayer/ng-bootstrap/in-list';\nimport { BsDropdownModule } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuModule } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsSelect2Component } from './component/select2.component';\nimport { BsItemTemplateDirective } from './directive/item-template/item-template.directive';\nimport { BsSuggestionTemplateDirective } from './directive/suggestion-template/suggestion-template.directive';\n\n@NgModule({\n declarations: [\n BsSelect2Component,\n BsItemTemplateDirective,\n BsSuggestionTemplateDirective,\n ],\n imports: [\n NgTemplateOutlet,\n FormsModule,\n BsDropdownModule,\n BsDropdownMenuModule,\n BsHasOverlayComponent,\n BsInListPipe,\n ],\n exports: [\n BsSelect2Component,\n BsItemTemplateDirective,\n BsSuggestionTemplateDirective,\n ],\n})\nexport class BsSelect2Module {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAUa,kBAAkB,CAAA;AAqB7B,IAAA,WAAA,GAAA;AAnBA,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,kDAAC;AACtB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAU,KAAK,qDAAC;AAElC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAM,EAAE,uDAAC;AAK5B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,sDAAC;QACtB,IAAA,CAAA,kBAAkB,GAAG,MAAM,EAAU;QACT,IAAA,CAAA,SAAS,GAAG,KAAK;AAE7C,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAM,EAAE,yDAAC;QAEtB,IAAA,CAAA,SAAS,GAAG,EAAE;AACtB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;QAKtB,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE;YACtC,IAAI,WAAW,EAAE;AACf,gBAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;YAC3B;AACF,QAAA,CAAC,CAAC;IACJ;A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AY,aAGZ,kBAAkB;YAClB,uBAAuB;YACvB,6BAA6B,CAAA,EAAA,CAAA,CAAA;AAGpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAZxB,WAAW;YACX,gBAAgB;YAChB,oBAAoB;YACpB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FASZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBApB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,uBAAuB;wBACvB,6BAA6B;AAC9B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,gBAAgB;wBAChB,WAAW;wBACX,gBAAgB;wBAChB,oBAAoB;wBACpB,qBAAqB;wBACrB,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,uBAAuB;wBACvB,6BAA6B;AAC9B,qBAAA;AACF,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -1,53 +1,43 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, computed, ViewChild, ChangeDetectionStrategy, Component, inject, TemplateRef, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { BehaviorSubject, map } from 'rxjs';
|
|
6
5
|
|
|
7
6
|
class BsShellComponent {
|
|
8
7
|
constructor() {
|
|
9
8
|
this.sidebarTemplate = null;
|
|
10
|
-
this.state
|
|
11
|
-
this.breakpoint
|
|
12
|
-
this.stateClass
|
|
9
|
+
this.state = input('auto', ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
10
|
+
this.breakpoint = input('md', ...(ngDevMode ? [{ debugName: "breakpoint" }] : []));
|
|
11
|
+
this.stateClass = computed(() => {
|
|
12
|
+
const state = this.state();
|
|
13
13
|
if (state === 'auto')
|
|
14
14
|
return null;
|
|
15
15
|
else
|
|
16
16
|
return state;
|
|
17
|
-
}));
|
|
18
|
-
this.breakpointClass
|
|
19
|
-
}
|
|
20
|
-
set state(value) {
|
|
21
|
-
this.state$.next(value);
|
|
22
|
-
}
|
|
23
|
-
set breakpoint(value) {
|
|
24
|
-
this.breakpoint$.next(value);
|
|
17
|
+
}, ...(ngDevMode ? [{ debugName: "stateClass" }] : []));
|
|
18
|
+
this.breakpointClass = computed(() => `shell-${this.breakpoint()}`, ...(ngDevMode ? [{ debugName: "breakpointClass" }] : []));
|
|
25
19
|
}
|
|
26
20
|
setSize(size) {
|
|
27
21
|
this.rootElement.nativeElement.style.setProperty('--size', size);
|
|
28
22
|
}
|
|
29
23
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: BsShellComponent, isStandalone: false, selector: "bs-shell", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "rootElement", first: true, predicate: ["root"], descendants: true }], ngImport: i0, template: "<div class=\"sidebar-root\" [class]=\"[stateClass(), breakpointClass()]\" #root>\n <div class=\"sidebar position-fixed pe-none\">\n <div class=\"sidebar-body d-flex flex-column pe-all\">\n <ng-container *ngTemplateOutlet=\"sidebarTemplate\"></ng-container>\n </div>\n </div>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".pe-all{pointer-events:all!important}.sidebar-root{--size: 15rem;transition:margin-left .3s ease-in-out}.sidebar-root .sidebar{top:0;bottom:0;left:0;width:var(--size);z-index:500;transition:margin-left .3s,width .3s}.sidebar-root .sidebar .sidebar-body{background:#333}.sidebar-root.shell-xs.show{margin-left:0}.sidebar-root.shell-xs.show .sidebar{width:100%;margin-left:0}.sidebar-root.shell-xs.show{margin-left:var(--size)}.sidebar-root.shell-xs.show .sidebar{width:var(--size);margin-left:0}.sidebar-root.shell-xs.hide .sidebar{width:100%;margin-left:-100%}.sidebar-root.shell-xs.hide{margin-left:0}.sidebar-root.shell-xs.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}.sidebar-root.shell-xs:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xs:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}.sidebar-root.shell-xs:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xs:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}@media(max-width:575.98px){.sidebar-root.shell-sm.show{margin-left:0}.sidebar-root.shell-sm.show .sidebar{width:100%;margin-left:0}}@media(min-width:576px){.sidebar-root.shell-sm.show{margin-left:var(--size)}.sidebar-root.shell-sm.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:575.98px){.sidebar-root.shell-sm.hide{margin-left:0}.sidebar-root.shell-sm.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:576px){.sidebar-root.shell-sm.hide{margin-left:0}.sidebar-root.shell-sm.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:575.98px){.sidebar-root.shell-sm:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-sm:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:576px){.sidebar-root.shell-sm:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-sm:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:767.98px){.sidebar-root.shell-md.show{margin-left:0}.sidebar-root.shell-md.show .sidebar{width:100%;margin-left:0}}@media(min-width:768px){.sidebar-root.shell-md.show{margin-left:var(--size)}.sidebar-root.shell-md.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:767.98px){.sidebar-root.shell-md.hide{margin-left:0}.sidebar-root.shell-md.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:768px){.sidebar-root.shell-md.hide{margin-left:0}.sidebar-root.shell-md.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:767.98px){.sidebar-root.shell-md:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-md:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:768px){.sidebar-root.shell-md:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-md:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:991.98px){.sidebar-root.shell-lg.show{margin-left:0}.sidebar-root.shell-lg.show .sidebar{width:100%;margin-left:0}}@media(min-width:992px){.sidebar-root.shell-lg.show{margin-left:var(--size)}.sidebar-root.shell-lg.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:991.98px){.sidebar-root.shell-lg.hide{margin-left:0}.sidebar-root.shell-lg.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:992px){.sidebar-root.shell-lg.hide{margin-left:0}.sidebar-root.shell-lg.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:991.98px){.sidebar-root.shell-lg:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-lg:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:992px){.sidebar-root.shell-lg:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-lg:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:1199.98px){.sidebar-root.shell-xl.show{margin-left:0}.sidebar-root.shell-xl.show .sidebar{width:100%;margin-left:0}}@media(min-width:1200px){.sidebar-root.shell-xl.show{margin-left:var(--size)}.sidebar-root.shell-xl.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:1199.98px){.sidebar-root.shell-xl.hide{margin-left:0}.sidebar-root.shell-xl.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:1200px){.sidebar-root.shell-xl.hide{margin-left:0}.sidebar-root.shell-xl.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:1199.98px){.sidebar-root.shell-xl:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xl:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:1200px){.sidebar-root.shell-xl:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xl:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:1399.98px){.sidebar-root.shell-xxl.show{margin-left:0}.sidebar-root.shell-xxl.show .sidebar{width:100%;margin-left:0}}@media(min-width:1400px){.sidebar-root.shell-xxl.show{margin-left:var(--size)}.sidebar-root.shell-xxl.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:1399.98px){.sidebar-root.shell-xxl.hide{margin-left:0}.sidebar-root.shell-xxl.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:1400px){.sidebar-root.shell-xxl.hide{margin-left:0}.sidebar-root.shell-xxl.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:1399.98px){.sidebar-root.shell-xxl:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xxl:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:1400px){.sidebar-root.shell-xxl:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xxl:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31
25
|
}
|
|
32
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellComponent, decorators: [{
|
|
33
27
|
type: Component,
|
|
34
|
-
args: [{ selector: 'bs-shell', standalone: false, template: "<div class=\"sidebar-root\" [class]=\"[stateClass
|
|
35
|
-
}],
|
|
28
|
+
args: [{ selector: 'bs-shell', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"sidebar-root\" [class]=\"[stateClass(), breakpointClass()]\" #root>\n <div class=\"sidebar position-fixed pe-none\">\n <div class=\"sidebar-body d-flex flex-column pe-all\">\n <ng-container *ngTemplateOutlet=\"sidebarTemplate\"></ng-container>\n </div>\n </div>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".pe-all{pointer-events:all!important}.sidebar-root{--size: 15rem;transition:margin-left .3s ease-in-out}.sidebar-root .sidebar{top:0;bottom:0;left:0;width:var(--size);z-index:500;transition:margin-left .3s,width .3s}.sidebar-root .sidebar .sidebar-body{background:#333}.sidebar-root.shell-xs.show{margin-left:0}.sidebar-root.shell-xs.show .sidebar{width:100%;margin-left:0}.sidebar-root.shell-xs.show{margin-left:var(--size)}.sidebar-root.shell-xs.show .sidebar{width:var(--size);margin-left:0}.sidebar-root.shell-xs.hide .sidebar{width:100%;margin-left:-100%}.sidebar-root.shell-xs.hide{margin-left:0}.sidebar-root.shell-xs.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}.sidebar-root.shell-xs:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xs:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}.sidebar-root.shell-xs:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xs:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}@media(max-width:575.98px){.sidebar-root.shell-sm.show{margin-left:0}.sidebar-root.shell-sm.show .sidebar{width:100%;margin-left:0}}@media(min-width:576px){.sidebar-root.shell-sm.show{margin-left:var(--size)}.sidebar-root.shell-sm.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:575.98px){.sidebar-root.shell-sm.hide{margin-left:0}.sidebar-root.shell-sm.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:576px){.sidebar-root.shell-sm.hide{margin-left:0}.sidebar-root.shell-sm.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:575.98px){.sidebar-root.shell-sm:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-sm:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:576px){.sidebar-root.shell-sm:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-sm:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:767.98px){.sidebar-root.shell-md.show{margin-left:0}.sidebar-root.shell-md.show .sidebar{width:100%;margin-left:0}}@media(min-width:768px){.sidebar-root.shell-md.show{margin-left:var(--size)}.sidebar-root.shell-md.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:767.98px){.sidebar-root.shell-md.hide{margin-left:0}.sidebar-root.shell-md.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:768px){.sidebar-root.shell-md.hide{margin-left:0}.sidebar-root.shell-md.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:767.98px){.sidebar-root.shell-md:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-md:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:768px){.sidebar-root.shell-md:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-md:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:991.98px){.sidebar-root.shell-lg.show{margin-left:0}.sidebar-root.shell-lg.show .sidebar{width:100%;margin-left:0}}@media(min-width:992px){.sidebar-root.shell-lg.show{margin-left:var(--size)}.sidebar-root.shell-lg.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:991.98px){.sidebar-root.shell-lg.hide{margin-left:0}.sidebar-root.shell-lg.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:992px){.sidebar-root.shell-lg.hide{margin-left:0}.sidebar-root.shell-lg.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:991.98px){.sidebar-root.shell-lg:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-lg:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:992px){.sidebar-root.shell-lg:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-lg:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:1199.98px){.sidebar-root.shell-xl.show{margin-left:0}.sidebar-root.shell-xl.show .sidebar{width:100%;margin-left:0}}@media(min-width:1200px){.sidebar-root.shell-xl.show{margin-left:var(--size)}.sidebar-root.shell-xl.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:1199.98px){.sidebar-root.shell-xl.hide{margin-left:0}.sidebar-root.shell-xl.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:1200px){.sidebar-root.shell-xl.hide{margin-left:0}.sidebar-root.shell-xl.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:1199.98px){.sidebar-root.shell-xl:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xl:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:1200px){.sidebar-root.shell-xl:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xl:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}@media(max-width:1399.98px){.sidebar-root.shell-xxl.show{margin-left:0}.sidebar-root.shell-xxl.show .sidebar{width:100%;margin-left:0}}@media(min-width:1400px){.sidebar-root.shell-xxl.show{margin-left:var(--size)}.sidebar-root.shell-xxl.show .sidebar{width:var(--size);margin-left:0}}@media(max-width:1399.98px){.sidebar-root.shell-xxl.hide{margin-left:0}.sidebar-root.shell-xxl.hide .sidebar{width:100%;margin-left:-100%}}@media(min-width:1400px){.sidebar-root.shell-xxl.hide{margin-left:0}.sidebar-root.shell-xxl.hide .sidebar{width:var(--size);margin-left:calc(-1 * var(--size))}}@media(max-width:1399.98px){.sidebar-root.shell-xxl:not(.show):not(.hide){margin-left:0}.sidebar-root.shell-xxl:not(.show):not(.hide) .sidebar{width:100%;margin-left:-100%}}@media(min-width:1400px){.sidebar-root.shell-xxl:not(.show):not(.hide){margin-left:var(--size)}.sidebar-root.shell-xxl:not(.show):not(.hide) .sidebar{width:var(--size);margin-left:0}}\n"] }]
|
|
29
|
+
}], propDecorators: { rootElement: [{
|
|
36
30
|
type: ViewChild,
|
|
37
31
|
args: ['root']
|
|
38
|
-
}], state: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}], breakpoint: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}] } });
|
|
32
|
+
}], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }] } });
|
|
43
33
|
|
|
44
34
|
class BsShellSidebarDirective {
|
|
45
|
-
constructor(
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
constructor() {
|
|
36
|
+
const shell = inject(BsShellComponent);
|
|
37
|
+
const template = inject(TemplateRef);
|
|
48
38
|
shell.sidebarTemplate = template;
|
|
49
39
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellSidebarDirective, deps: [
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellSidebarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
51
41
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsShellSidebarDirective, isStandalone: false, selector: "[bsShellSidebar]", ngImport: i0 }); }
|
|
52
42
|
}
|
|
53
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellSidebarDirective, decorators: [{
|
|
@@ -56,7 +46,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
56
46
|
selector: '[bsShellSidebar]',
|
|
57
47
|
standalone: false,
|
|
58
48
|
}]
|
|
59
|
-
}], ctorParameters: () => [
|
|
49
|
+
}], ctorParameters: () => [] });
|
|
60
50
|
|
|
61
51
|
class BsShellModule {
|
|
62
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsShellModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-shell.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/shell/src/shell/shell.component.ts","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell/shell.component.html","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell-sidebar/shell-sidebar.directive.ts","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell.module.ts","../../../../libs/mintplayer-ng-bootstrap/shell/mintplayer-ng-bootstrap-shell.ts"],"sourcesContent":["import { Component, ElementRef,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-shell.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/shell/src/shell/shell.component.ts","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell/shell.component.html","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell-sidebar/shell-sidebar.directive.ts","../../../../libs/mintplayer-ng-bootstrap/shell/src/shell.module.ts","../../../../libs/mintplayer-ng-bootstrap/shell/mintplayer-ng-bootstrap-shell.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, ElementRef, input, TemplateRef, ViewChild } from '@angular/core';\nimport { BsShellState } from '../shell-state';\nimport { Breakpoint } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-shell',\n templateUrl: './shell.component.html',\n styleUrl: './shell.component.scss',\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsShellComponent {\n\n sidebarTemplate: TemplateRef<any> | null = null;\n @ViewChild('root') rootElement!: ElementRef<HTMLDivElement>;\n\n state = input<BsShellState>('auto');\n breakpoint = input<Breakpoint>('md');\n\n stateClass = computed(() => {\n const state = this.state();\n if (state === 'auto') return null;\n else return state;\n });\n\n breakpointClass = computed(() => `shell-${this.breakpoint()}`);\n\n public setSize(size: string) {\n this.rootElement.nativeElement.style.setProperty('--size', size);\n }\n}\n","<div class=\"sidebar-root\" [class]=\"[stateClass(), breakpointClass()]\" #root>\n <div class=\"sidebar position-fixed pe-none\">\n <div class=\"sidebar-body d-flex flex-column pe-all\">\n <ng-container *ngTemplateOutlet=\"sidebarTemplate\"></ng-container>\n </div>\n </div>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsShellComponent } from '../shell/shell.component';\n\n@Directive({\n selector: '[bsShellSidebar]',\n standalone: false,\n})\nexport class BsShellSidebarDirective {\n constructor() {\n const shell = inject(BsShellComponent);\n const template = inject(TemplateRef);\n shell.sidebarTemplate = template;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BsShellComponent } from './shell/shell.component';\nimport { BsShellSidebarDirective } from './shell-sidebar/shell-sidebar.directive';\n\n\n\n@NgModule({\n declarations: [BsShellComponent, BsShellSidebarDirective],\n imports: [CommonModule],\n exports: [BsShellComponent, BsShellSidebarDirective]\n})\nexport class BsShellModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;QASE,IAAA,CAAA,eAAe,GAA4B,IAAI;AAG/C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAe,MAAM,iDAAC;AACnC,QAAA,IAAA,CA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