@mintplayer/ng-bootstrap 22.31.0 → 22.32.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/README.md +12 -11
- package/_bootstrap.scss +2 -4
- package/a11y/forms/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +2 -109
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -5
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +74 -83
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +9 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -4
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +2 -0
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +6 -2
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +7 -2
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +40 -12
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +23 -6
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +16 -4
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +23 -7
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +93 -0
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +43 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -6
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +22 -16
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +22 -7
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +13 -6
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +9 -5
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -0
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +19 -9
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -14
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +5 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +7 -3
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/nav/package.json +4 -0
- package/package.json +11 -8
- package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -62
- package/types/mintplayer-ng-bootstrap-alert.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-badge.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-card.d.ts +14 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-close.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
- package/types/mintplayer-ng-bootstrap-form.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +15 -8
- package/types/mintplayer-ng-bootstrap-machine.d.ts +13 -2
- package/types/mintplayer-ng-bootstrap-modal.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +17 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +10 -10
- package/types/mintplayer-ng-bootstrap-popover.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +2 -0
- package/types/mintplayer-ng-bootstrap-radio.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-range.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-toast.d.ts +2 -0
- package/container/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
- package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-phone-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/phone-input/src/value-accessor/phone-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/phone-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/mintplayer-ng-bootstrap-phone-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsPhoneInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-phone-input` (a host directive of the\n * generated component, see `phone-input.angular.ts`). A bound form control\n * drives the E.164 value through `viewValue`; every change the user makes\n * (typing, paste, a country pick, rules that load and re-derive the E.164)\n * reaches the form through the component's `value` model, which a form write\n * never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsPhoneInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsPhoneInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the value: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsPhoneInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value || null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-phone-input` host moves into the number field, not the\n * country picker (D13), so a directive that focuses the element it sits on\n * reaches the field.\n */\n@Directive({})\nexport class BsPhoneInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const tel = () => host.querySelector<HTMLInputElement>('input[type=tel]');\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = tel();\n if (input) input.focus(options);\n else queueMicrotask(() => tel()?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport type { PhoneInputInputs } from '@mintplayer/ui-core/phone-input';\nimport { BsPhoneInputFocusDirective, BsPhoneInputValueAccessor } from './value-accessor/phone-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-phone-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the number field's ARIA and\n * message.\n */\n\nexport const hostDirectives = [\n BsPhoneInputValueAccessor,\n BsPhoneInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => PhoneInputInputs): () => PhoneInputInputs {\n const accessor = inject(BsPhoneInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<PhoneInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the phone-input manifest (phone-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, MpTrustedHtmlPipe, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type PhoneChangeEventDetail, phoneInputCore, type PhoneInputInputs, type PhoneInputMethods, phoneInputScopedStyles } from '@mintplayer/ui-core/phone-input';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../phone-input.angular';\n\n/**\n * A phone-number field (#437): country picker with flags, dial code, and a number input that formats as\n * the user types. `value` is two-way E.164 (`+32470123456`); `country` is two-way too.\n *\n * With JavaScript off it is a plain country select and tel input; the typed text submits under `name`.\n * An `aria-label` on the component names the number input; `countryLabel` names the picker.\n */\n@Component({\n selector: 'bs-phone-input',\n templateUrl: './phone-input.view.generated.html',\n imports: [MpPropsDirective, MpTrustedHtmlPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsPhoneInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<PhoneInputInputs['value']>(null);\n readonly country = model<PhoneInputInputs['country']>(null);\n readonly defaultCountry = input<PhoneInputInputs['defaultCountry']>();\n readonly locale = input<PhoneInputInputs['locale']>();\n readonly preferredCountries = input<PhoneInputInputs['preferredCountries']>(null);\n readonly allowedCountries = input<PhoneInputInputs['allowedCountries']>(null);\n readonly disabled = input<PhoneInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<PhoneInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<PhoneInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<PhoneInputInputs['errorText']>();\n readonly placeholder = input<PhoneInputInputs['placeholder']>();\n readonly autocomplete = input<PhoneInputInputs['autocomplete']>('tel-national');\n readonly name = input<PhoneInputInputs['name']>();\n readonly inputLabel = input<PhoneInputInputs['inputLabel']>();\n readonly countryLabel = input<PhoneInputInputs['countryLabel']>();\n /** The E.164 value changed (null while empty). */\n readonly valuechange = output<string | null>();\n /** The user picked a country, or typed a `+XX` that switched it. */\n readonly countrychange = output<string>();\n /** Every edit, pick and rules load: the value with its parts and validity. */\n readonly phonechange = output<PhoneChangeEventDetail>();\n\n readonly #core = useCore(phoneInputCore, { inputs: ext_extendInputs(() => ({ value: this.value(), country: this.country(), defaultCountry: this.defaultCountry(), locale: this.locale(), preferredCountries: this.preferredCountries(), allowedCountries: this.allowedCountries(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), placeholder: this.placeholder(), autocomplete: this.autocomplete(), name: this.name(), inputLabel: this.inputLabel(), countryLabel: this.countryLabel() })), idPrefix: 'bs-phone-input', outputs: { valueChange: this.valuechange, countryChange: this.countrychange, phoneChange: this.phonechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'phone-input' }), models: { value: this.value, country: this.country } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('phone-input', phoneInputScopedStyles);\n }\n\n /** Moves focus into the number field, not the country picker. */\n focusInput(...args: Parameters<PhoneInputMethods['focusInput']>): ReturnType<PhoneInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<PhoneInputMethods['focusInput']>;\n }\n\n /** Settles once the flags and the rules in flight have been applied. */\n whenReady(...args: Parameters<PhoneInputMethods['whenReady']>): ReturnType<PhoneInputMethods['whenReady']> {\n return this.#core.call('whenReady', args) as ReturnType<PhoneInputMethods['whenReady']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/phone-input/src/templates/phone-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"phone-input\" [mpProps]=\"p_view.group\">\n <select data-mps=\"phone-input\" [mpProps]=\"p_view.select\">\n @if (p_view.rich) {\n <button data-mps=\"phone-input\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @for (o of p_view.options; track o.key) {\n <option data-mps=\"phone-input\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flagBox\" [innerHTML]=\"o.flag | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.richLabel\">\n {{ o.name }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.listOnly\">\n {{ o.dial }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.closedOnly\">\n {{ o.iso }}\n </span>\n } @else {\n {{ o.label }}\n }\n </option>\n }\n </select>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.addon\">\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flag\" [innerHTML]=\"p_view.flagHtml | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.dial\">\n {{ p_view.dialText }}\n </span>\n </span>\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.input\">\n</div>\n@if (p_view.hidden) {\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.hidden\">\n}\n@if (p_view.showFeedback) {\n <div data-mps=\"phone-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the phone-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsPhoneInputComponent } from './phone-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsPhoneInputValueAccessor","i1.BsPhoneInputFocusDirective","ext_hostDirectives"],"mappings":";;;;;;;;AAIA;;;;;;;AAOG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAgB,IAAI;sFAAC;QACvC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAmC,MAAM,SAAS;AAClE,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA4BxC,IAAA;IA1BC,QAAQ,GAAA;;AAEN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC7E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;gBAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtB,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,C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AA,ED5BY,gBAAgB,sEAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAA,eAAA,EAC7B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,6tDAAA,EAAA;;;AElBpC;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-phone-input.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/phone-input/src/value-accessor/phone-input-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/phone-input.angular.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/phone-input.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/phone-input/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/phone-input/mintplayer-ng-bootstrap-phone-input.ts"],"sourcesContent":["import { DestroyRef, Directive, ElementRef, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsPhoneInputComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-phone-input` (a host directive of the\n * generated component, see `phone-input.angular.ts`). A bound form control\n * drives the E.164 value through `viewValue`; every change the user makes\n * (typing, paste, a country pick, rules that load and re-derive the E.164)\n * reaches the form through the component's `value` model, which a form write\n * never touches.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsPhoneInputValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsPhoneInputValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the value: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<string | null>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: string | null) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const sub = this.injector.get(BsPhoneInputComponent).value.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: string | null | undefined): void {\n this.viewValue.set(value || null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n\n/**\n * `focus()` on the `bs-phone-input` host moves into the number field, not the\n * country picker (D13), so a directive that focuses the element it sits on\n * reaches the field.\n */\n@Directive({})\nexport class BsPhoneInputFocusDirective {\n constructor() {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const tel = () => host.querySelector<HTMLInputElement>('input[type=tel]');\n Object.defineProperty(host, 'focus', {\n // Before the first render there is no input yet; try again once it exists.\n value: (options?: FocusOptions) => {\n const input = tel();\n if (input) input.focus(options);\n else queueMicrotask(() => tel()?.focus(options));\n },\n configurable: true,\n writable: true,\n });\n }\n}\n","import { computed, inject } from '@angular/core';\nimport { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';\nimport type { PhoneInputInputs } from '@mintplayer/ui-core/phone-input';\nimport { BsPhoneInputFocusDirective, BsPhoneInputValueAccessor } from './value-accessor/phone-input-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-phone-input` (PRD #437 D10 escape\n * hatch): Angular forms, and host focus. A bound form control drives the value\n * and the disabled state, and its validity reaches the number field's ARIA and\n * message.\n */\n\nexport const hostDirectives = [\n BsPhoneInputValueAccessor,\n BsPhoneInputFocusDirective,\n { directive: BsControlValidityDirective, inputs: ['errorMessages'] },\n];\n\nexport function extendInputs(inputs: () => PhoneInputInputs): () => PhoneInputInputs {\n const accessor = inject(BsPhoneInputValueAccessor, { self: true });\n const validity = inject(BsControlValidityDirective, { self: true });\n return computed<PhoneInputInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n invalid: value.invalid || validity.invalid(),\n required: value.required || validity.required(),\n errorText: value.errorText ?? validity.errorText(),\n };\n });\n}\n","// GENERATED from the phone-input manifest (phone-input) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, output } from '@angular/core';\nimport { MpPropsDirective, MpTrustedHtmlPipe, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type PhoneChangeEventDetail, phoneInputCore, type PhoneInputInputs, type PhoneInputMethods, phoneInputScopedStyles } from '@mintplayer/ui-core/phone-input';\nimport { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../phone-input.angular';\n\n/**\n * A phone-number field (#437): country picker with flags, dial code, and a number input that formats as\n * the user types. `value` is two-way E.164 (`+32470123456`); `country` is two-way too.\n *\n * With JavaScript off it is a plain country select and tel input; the typed text submits under `name`.\n * An `aria-label` on the component names the number input; `countryLabel` names the picker.\n */\n@Component({\n selector: 'bs-phone-input',\n templateUrl: './phone-input.view.generated.html',\n imports: [MpPropsDirective, MpTrustedHtmlPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsPhoneInputComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model<PhoneInputInputs['value']>(null);\n readonly country = model<PhoneInputInputs['country']>(null);\n readonly defaultCountry = input<PhoneInputInputs['defaultCountry']>();\n readonly locale = input<PhoneInputInputs['locale']>();\n readonly preferredCountries = input<PhoneInputInputs['preferredCountries']>(null);\n readonly allowedCountries = input<PhoneInputInputs['allowedCountries']>(null);\n readonly disabled = input<PhoneInputInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly required = input<PhoneInputInputs['required'], unknown>(false, { transform: booleanAttribute });\n readonly invalid = input<PhoneInputInputs['invalid'], unknown>(false, { transform: booleanAttribute });\n readonly errorText = input<PhoneInputInputs['errorText']>();\n readonly placeholder = input<PhoneInputInputs['placeholder']>();\n readonly autocomplete = input<PhoneInputInputs['autocomplete']>('tel-national');\n readonly name = input<PhoneInputInputs['name']>();\n readonly inputLabel = input<PhoneInputInputs['inputLabel']>();\n readonly countryLabel = input<PhoneInputInputs['countryLabel']>();\n /** The E.164 value changed (null while empty). */\n readonly valuechange = output<string | null>();\n /** The user picked a country, or typed a `+XX` that switched it. */\n readonly countrychange = output<string>();\n /** Every edit, pick and rules load: the value with its parts and validity. */\n readonly phonechange = output<PhoneChangeEventDetail>();\n\n readonly #core = useCore(phoneInputCore, { inputs: ext_extendInputs(() => ({ value: this.value(), country: this.country(), defaultCountry: this.defaultCountry(), locale: this.locale(), preferredCountries: this.preferredCountries(), allowedCountries: this.allowedCountries(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), placeholder: this.placeholder(), autocomplete: this.autocomplete(), name: this.name(), inputLabel: this.inputLabel(), countryLabel: this.countryLabel() })), idPrefix: 'bs-phone-input', outputs: { valueChange: this.valuechange, countryChange: this.countrychange, phoneChange: this.phonechange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'phone-input' }), models: { value: this.value, country: this.country } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order }); useScopedStyles('phone-input', phoneInputScopedStyles);\n }\n\n /** Moves focus into the number field, not the country picker. */\n focusInput(...args: Parameters<PhoneInputMethods['focusInput']>): ReturnType<PhoneInputMethods['focusInput']> {\n return this.#core.call('focusInput', args) as ReturnType<PhoneInputMethods['focusInput']>;\n }\n\n /** Settles once the flags and the rules in flight have been applied. */\n whenReady(...args: Parameters<PhoneInputMethods['whenReady']>): ReturnType<PhoneInputMethods['whenReady']> {\n return this.#core.call('whenReady', args) as ReturnType<PhoneInputMethods['whenReady']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/phone-input/src/templates/phone-input.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"phone-input\" [mpProps]=\"p_view.group\">\n <select data-mps=\"phone-input\" [mpProps]=\"p_view.select\">\n @if (p_view.rich) {\n <button data-mps=\"phone-input\" type=\"button\">\n <selectedcontent></selectedcontent>\n </button>\n }\n @for (o of p_view.options; track o.key) {\n <option data-mps=\"phone-input\" [mpProps]=\"o.bag\">\n @if (p_view.rich) {\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flagBox\" [innerHTML]=\"o.flag | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.richLabel\">\n {{ o.name }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.listOnly\">\n {{ o.dial }}\n </span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.closedOnly\">\n {{ o.iso }}\n </span>\n } @else {\n {{ o.label }}\n }\n </option>\n }\n </select>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.addon\">\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.flag\" [innerHTML]=\"p_view.flagHtml | mpTrustedHtml\"></span>\n <span data-mps=\"phone-input\" [mpProps]=\"p_view.dial\">\n {{ p_view.dialText }}\n </span>\n </span>\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.input\">\n</div>\n@if (p_view.hidden) {\n <input data-mps=\"phone-input\" [mpProps]=\"p_view.hidden\">\n}\n@if (p_view.showFeedback) {\n <div data-mps=\"phone-input\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n","// GENERATED from the phone-input manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsPhoneInputComponent } from './phone-input.component.generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsPhoneInputValueAccessor","i1.BsPhoneInputFocusDirective","ext_hostDirectives"],"mappings":";;;;;;;;;AAIA;;;;;;;AAOG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAgB,IAAI;sFAAC;QACvC,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAmC,MAAM,SAAS;AAClE,QAAA,IAAA,CAAA,SAAS,GAAe,MAAM,SAAS;AA4BxC,IAAA;IA1BC,QAAQ,GAAA;;AAEN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YAC7E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;gBAAE;AACjD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;AACzB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACtB,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,UAAU,CAAC,SAAS,C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AAA,CAAA,eAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrBlC,6tDA4CA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED3BY,gBAAgB,sEAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,gBAAgB,EAAA,OAAA,EAEjB,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAA,eAAA,EAC7B,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/BC,cAAkB,EAAA,QAAA,EAAA,6tDAAA,EAAA;;;AEnBpC;;ACAA;;AAEG;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, model, input, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
2
|
+
import { inject, model, input, effect, ChangeDetectionStrategy, Component, computed, Directive } from '@angular/core';
|
|
3
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapPlaceholders } from '@mintplayer/ui-core/bootstrap/placeholders';
|
|
3
5
|
import { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';
|
|
4
6
|
|
|
5
7
|
class BsPlaceholderComponent {
|
|
@@ -10,6 +12,8 @@ class BsPlaceholderComponent {
|
|
|
10
12
|
this.loadingCompleteText = input('Loading complete', /* @ts-ignore */
|
|
11
13
|
...(ngDevMode ? [{ debugName: "loadingCompleteText" }] : /* istanbul ignore next */ []));
|
|
12
14
|
this.wasLoading = false;
|
|
15
|
+
// #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps="placeholder").
|
|
16
|
+
useBootstrap(bootstrapPlaceholders);
|
|
13
17
|
effect(() => {
|
|
14
18
|
const isLoading = this.isLoading();
|
|
15
19
|
if (this.wasLoading && !isLoading) {
|
|
@@ -19,40 +23,42 @@ class BsPlaceholderComponent {
|
|
|
19
23
|
});
|
|
20
24
|
}
|
|
21
25
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsPlaceholderComponent, isStandalone: true, selector: "bs-placeholder", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingCompleteText: { classPropertyName: "loadingCompleteText", publicName: "loadingCompleteText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange" }, host: { properties: { "attr.aria-busy": "isLoading() ? \"true\" : null" } }, ngImport: i0, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{
|
|
26
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsPlaceholderComponent, isStandalone: true, selector: "bs-placeholder", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingCompleteText: { classPropertyName: "loadingCompleteText", publicName: "loadingCompleteText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange" }, host: { properties: { "attr.aria-busy": "isLoading() ? \"true\" : null" } }, ngImport: i0, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div data-mps=\"placeholder\" class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23
27
|
}
|
|
24
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderComponent, decorators: [{
|
|
25
29
|
type: Component,
|
|
26
30
|
args: [{ selector: 'bs-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
27
31
|
'[attr.aria-busy]': 'isLoading() ? "true" : null',
|
|
28
|
-
}, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{
|
|
32
|
+
}, template: "<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel \u2014 never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div data-mps=\"placeholder\" class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .placeholder{min-height:calc(1em - 1px)!important}\n"] }]
|
|
29
33
|
}], ctorParameters: () => [], propDecorators: { isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }, { type: i0.Output, args: ["isLoadingChange"] }], loadingCompleteText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingCompleteText", required: false }] }] } });
|
|
30
34
|
|
|
31
35
|
class BsPlaceholderFieldDirective {
|
|
32
36
|
constructor() {
|
|
33
37
|
this.placeholder = inject(BsPlaceholderComponent);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
// Derived, not copied from an effect into plain fields: a host binding re-renders
|
|
39
|
+
// only when a signal it reads changes (zoneless).
|
|
40
|
+
this.isLoading = computed(() => this.placeholder.isLoading(), /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.marginBottom = computed(() => (this.isLoading() ? -1 : 0), /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "marginBottom" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.html = computed(() => (this.isLoading() ? ' ' : undefined), /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "html" }] : /* istanbul ignore next */ []));
|
|
46
|
+
// #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps="placeholder").
|
|
47
|
+
useBootstrap(bootstrapPlaceholders);
|
|
43
48
|
}
|
|
44
49
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
45
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPlaceholderFieldDirective, isStandalone: true, selector: "[bsPlaceholderField]", host: { properties: { "attr.innerHtml": "html", "style.min-width.px": "80", "style.margin-bottom.px": "marginBottom", "class.placeholder": "
|
|
50
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPlaceholderFieldDirective, isStandalone: true, selector: "[bsPlaceholderField]", host: { properties: { "attr.data-mps": "\"placeholder\"", "attr.innerHtml": "html()", "style.min-width.px": "80", "style.margin-bottom.px": "marginBottom()", "class.placeholder": "isLoading()" } }, ngImport: i0 }); }
|
|
46
51
|
}
|
|
47
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPlaceholderFieldDirective, decorators: [{
|
|
48
53
|
type: Directive,
|
|
49
54
|
args: [{
|
|
50
55
|
selector: '[bsPlaceholderField]',
|
|
51
56
|
host: {
|
|
52
|
-
'[attr.
|
|
57
|
+
'[attr.data-mps]': '"placeholder"',
|
|
58
|
+
'[attr.innerHtml]': 'html()',
|
|
53
59
|
'[style.min-width.px]': '80',
|
|
54
|
-
'[style.margin-bottom.px]': 'marginBottom',
|
|
55
|
-
'[class.placeholder]': '
|
|
60
|
+
'[style.margin-bottom.px]': 'marginBottom()',
|
|
61
|
+
'[class.placeholder]': 'isLoading()',
|
|
56
62
|
},
|
|
57
63
|
}]
|
|
58
64
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-placeholder.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder/placeholder.component.ts","../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder/placeholder.component.html","../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder-field/placeholder-field.directive.ts","../../../../libs/mintplayer-ng-bootstrap/placeholder/mintplayer-ng-bootstrap-placeholder.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, inject, input, model } from '@angular/core';\nimport { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';\n\n@Component({\n selector: 'bs-placeholder',\n templateUrl: './placeholder.component.html',\n styleUrls: ['./placeholder.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-busy]': 'isLoading() ? \"true\" : null',\n },\n})\nexport class BsPlaceholderComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n isLoading = model<boolean>(false);\n loadingCompleteText = input<string>('Loading complete');\n\n private wasLoading = false;\n\n constructor() {\n effect(() => {\n const isLoading = this.isLoading();\n if (this.wasLoading && !isLoading) {\n this.announcer.announce(this.loadingCompleteText());\n }\n this.wasLoading = isLoading;\n });\n }\n}\n","<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel — never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>","import {
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-placeholder.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder/placeholder.component.ts","../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder/placeholder.component.html","../../../../libs/mintplayer-ng-bootstrap/placeholder/src/placeholder-field/placeholder-field.directive.ts","../../../../libs/mintplayer-ng-bootstrap/placeholder/mintplayer-ng-bootstrap-placeholder.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, inject, input, model } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPlaceholders } from '@mintplayer/ui-core/bootstrap/placeholders';\nimport { BsLiveAnnouncerService } from '@mintplayer/ng-bootstrap/a11y';\n\n@Component({\n selector: 'bs-placeholder',\n templateUrl: './placeholder.component.html',\n styleUrls: ['./placeholder.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-busy]': 'isLoading() ? \"true\" : null',\n },\n})\nexport class BsPlaceholderComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n isLoading = model<boolean>(false);\n loadingCompleteText = input<string>('Loading complete');\n\n private wasLoading = false;\n\n constructor() {\n // #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps=\"placeholder\").\n useBootstrap(bootstrapPlaceholders);\n effect(() => {\n const isLoading = this.isLoading();\n if (this.wasLoading && !isLoading) {\n this.announcer.announce(this.loadingCompleteText());\n }\n this.wasLoading = isLoading;\n });\n }\n}\n","<!-- The skeleton is pure decoration: aria-hidden keeps SRs from reading\n shimmering placeholder bars as content. aria-busy on the host (plus the\n announcer's completion message) is the semantic channel — never a\n subtree-wide aria-live, which would announce every skeleton mutation. -->\n<div data-mps=\"placeholder\" class=\"placeholder-glow\" aria-hidden=\"true\">\n <ng-content></ng-content>\n</div>","import { computed, Directive, inject } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPlaceholders } from '@mintplayer/ui-core/bootstrap/placeholders';\nimport { BsPlaceholderComponent } from '../placeholder/placeholder.component';\n\n@Directive({\n selector: '[bsPlaceholderField]',\n host: {\n '[attr.data-mps]': '\"placeholder\"',\n '[attr.innerHtml]': 'html()',\n '[style.min-width.px]': '80',\n '[style.margin-bottom.px]': 'marginBottom()',\n '[class.placeholder]': 'isLoading()',\n },\n})\nexport class BsPlaceholderFieldDirective {\n private placeholder = inject(BsPlaceholderComponent);\n\n constructor() {\n // #452: the placeholders partial ships with this component, scoped to the elements it stamps (data-mps=\"placeholder\").\n useBootstrap(bootstrapPlaceholders);\n }\n\n // Derived, not copied from an effect into plain fields: a host binding re-renders\n // only when a signal it reads changes (zoneless).\n protected readonly isLoading = computed(() => this.placeholder.isLoading());\n protected readonly marginBottom = computed(() => (this.isLoading() ? -1 : 0));\n protected readonly html = computed(() => (this.isLoading() ? ' ' : undefined));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAca,sBAAsB,CAAA;AAQjC,IAAA,WAAA,GAAA;AAPQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAElD,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK;sFAAC;QACjC,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAS,kBAAkB;gGAAC;QAE/C,IAAA,CAAA,UAAU,GAAG,KAAK;;QAIxB,YAAY,CAA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SAAS,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;yFAAC;AAC1D,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,GAAG,SAAS,CAAC;iFAAC;;QAPjF,YAAY,CAAC,qBAAqB,CAAC;IACrC;8GANW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,wBAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAVvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,eAAe;AAClC,wBAAA,kBAAkB,EAAE,QAAQ;AAC5B,wBAAA,sBAAsB,EAAE,IAAI;AAC5B,wBAAA,0BAA0B,EAAE,gBAAgB;AAC5C,wBAAA,qBAAqB,EAAE,aAAa;AACrC,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, signal, Injectable, inject, Injector, input, computed, ChangeDetectionStrategy, Component, TemplateRef, ElementRef, effect, Directive } from '@angular/core';
|
|
4
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
5
|
+
import { bootstrapPopover } from '@mintplayer/ui-core/bootstrap/popover';
|
|
6
|
+
import { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';
|
|
4
7
|
import { FadeInOutAnimation } from '@mintplayer/ng-animations';
|
|
5
8
|
import { BsOverlayFocusDirective, BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';
|
|
6
9
|
import { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';
|
|
@@ -52,16 +55,18 @@ class BsPopoverComponent {
|
|
|
52
55
|
...(ngDevMode ? [{ debugName: "marginClass" }] : /* istanbul ignore next */ []));
|
|
53
56
|
this.positionClass = computed(() => `bs-popover-${this.position()}`, /* @ts-ignore */
|
|
54
57
|
...(ngDevMode ? [{ debugName: "positionClass" }] : /* istanbul ignore next */ []));
|
|
58
|
+
// #452: the popover and transitions partials ship with this component, scoped to the elements it stamps (data-mps="popover").
|
|
59
|
+
useBootstrap(bootstrapPopover, bootstrapTransitions);
|
|
55
60
|
}
|
|
56
61
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsPopoverComponent, isStandalone: true, selector: "bs-popover", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.position-relative": "true" } }, providers: [BsPopoverContextService], ngImport: i0, template: "@if (isVisible()) {\n <div class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n", styles: ["
|
|
62
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsPopoverComponent, isStandalone: true, selector: "bs-popover", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, isVisible: { classPropertyName: "isVisible", publicName: "isVisible", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.position-relative": "true" } }, providers: [BsPopoverContextService], ngImport: i0, template: "@if (isVisible()) {\n <div data-mps=\"popover\" class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div data-mps=\"popover\" class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n", styles: [".popover.bs-popover-top>.popover-arrow,.popover.bs-popover-bottom>.popover-arrow{left:50%;transform:translate(-50%)}.popover.bs-popover-start>.popover-arrow,.popover.bs-popover-end>.popover-arrow{top:50%;transform:translateY(-50%)}.popover:not(.show){pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "directive", type: BsOverlayFocusDirective, selector: "[bsOverlayFocus]", inputs: ["bsOverlayFocus", "initialFocus", "returnFocus"], exportAs: ["bsOverlayFocus"] }], animations: [FadeInOutAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
58
63
|
}
|
|
59
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverComponent, decorators: [{
|
|
60
65
|
type: Component,
|
|
61
66
|
args: [{ selector: 'bs-popover', imports: [NgTemplateOutlet, BsHasOverlayComponent, BsOverlayFocusDirective], animations: [FadeInOutAnimation], changeDetection: ChangeDetectionStrategy.OnPush, providers: [BsPopoverContextService], host: {
|
|
62
67
|
'[class.position-relative]': 'true',
|
|
63
|
-
}, template: "@if (isVisible()) {\n <div class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n", styles: ["
|
|
64
|
-
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: false }] }] } });
|
|
68
|
+
}, template: "@if (isVisible()) {\n <div data-mps=\"popover\" class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div data-mps=\"popover\" class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n", styles: [".popover.bs-popover-top>.popover-arrow,.popover.bs-popover-bottom>.popover-arrow{left:50%;transform:translate(-50%)}.popover.bs-popover-start>.popover-arrow,.popover.bs-popover-end>.popover-arrow{top:50%;transform:translateY(-50%)}.popover:not(.show){pointer-events:none}\n"] }]
|
|
69
|
+
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], isVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVisible", required: false }] }] } });
|
|
65
70
|
|
|
66
71
|
const PORTAL_FACTORY = new InjectionToken('PopoverPortalFactory');
|
|
67
72
|
|
|
@@ -240,32 +245,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
240
245
|
}], ctorParameters: () => [], propDecorators: { bsPopover: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsPopover", required: false }] }], updatePosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "updatePosition", required: false }] }] } });
|
|
241
246
|
|
|
242
247
|
class BsPopoverBodyDirective {
|
|
248
|
+
constructor() {
|
|
249
|
+
// #452: the popover partial ships with this component, scoped to the elements it stamps (data-mps="popover").
|
|
250
|
+
useBootstrap(bootstrapPopover);
|
|
251
|
+
}
|
|
243
252
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
244
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPopoverBodyDirective, isStandalone: true, selector: "[bsPopoverBody]", host: { properties: { "class.popover-body": "true" } }, ngImport: i0 }); }
|
|
253
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPopoverBodyDirective, isStandalone: true, selector: "[bsPopoverBody]", host: { properties: { "attr.data-mps": "\"popover\"", "class.popover-body": "true" } }, ngImport: i0 }); }
|
|
245
254
|
}
|
|
246
255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverBodyDirective, decorators: [{
|
|
247
256
|
type: Directive,
|
|
248
257
|
args: [{
|
|
249
258
|
selector: '[bsPopoverBody]',
|
|
250
259
|
host: {
|
|
260
|
+
'[attr.data-mps]': '"popover"',
|
|
251
261
|
'[class.popover-body]': 'true',
|
|
252
262
|
},
|
|
253
263
|
}]
|
|
254
|
-
}] });
|
|
264
|
+
}], ctorParameters: () => [] });
|
|
255
265
|
|
|
256
266
|
class BsPopoverHeaderDirective {
|
|
267
|
+
constructor() {
|
|
268
|
+
// #452: the popover partial ships with this component, scoped to the elements it stamps (data-mps="popover").
|
|
269
|
+
useBootstrap(bootstrapPopover);
|
|
270
|
+
}
|
|
257
271
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
258
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPopoverHeaderDirective, isStandalone: true, selector: "[bsPopoverHeader]", host: { properties: { "class.popover-header": "true" } }, ngImport: i0 }); }
|
|
272
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsPopoverHeaderDirective, isStandalone: true, selector: "[bsPopoverHeader]", host: { properties: { "attr.data-mps": "\"popover\"", "class.popover-header": "true" } }, ngImport: i0 }); }
|
|
259
273
|
}
|
|
260
274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsPopoverHeaderDirective, decorators: [{
|
|
261
275
|
type: Directive,
|
|
262
276
|
args: [{
|
|
263
277
|
selector: '[bsPopoverHeader]',
|
|
264
278
|
host: {
|
|
279
|
+
'[attr.data-mps]': '"popover"',
|
|
265
280
|
'[class.popover-header]': 'true',
|
|
266
281
|
},
|
|
267
282
|
}]
|
|
268
|
-
}] });
|
|
283
|
+
}], ctorParameters: () => [] });
|
|
269
284
|
|
|
270
285
|
/**
|
|
271
286
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-popover.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/popover-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/popover-id.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/services/popover-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/component/popover.component.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/component/popover.component.html","../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover/popover.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover-body/popover-body.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover-header/popover-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/mintplayer-ng-bootstrap-popover.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const POPOVER_CONTENT = new InjectionToken<TemplateRef<any>>('PopoverContent');","import { InjectionToken } from '@angular/core';\n\n/** The dom id assigned to the rendered popover dialog so the trigger can point at it via aria-controls. */\nexport const POPOVER_ID = new InjectionToken<string>('POPOVER_ID');\n","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsPopoverComponent (the dialog renderer)\n * and the bsPopoverHeader / bsPopoverBody directives applied to the user's\n * template. Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsPopoverContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, Injector, input, TemplateRef } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { POPOVER_CONTENT } from '../providers/popover-content.provider';\nimport { POPOVER_ID } from '../providers/popover-id.provider';\nimport { BsPopoverContextService } from '../services/popover-context.service';\n\n@Component({\n selector: 'bs-popover',\n templateUrl: './popover.component.html',\n styleUrls: ['./popover.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsPopoverContextService],\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsPopoverComponent {\n template = inject<TemplateRef<any>>(POPOVER_CONTENT);\n popoverId = inject(POPOVER_ID);\n context = inject(BsPopoverContextService);\n injector = inject(Injector);\n\n position = input<Position>('bottom');\n isVisible = input<boolean>(false);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'top': return 'mb-2';\n case 'start': return 'me-2';\n case 'end': return 'ms-2';\n default: return 'mt-2';\n }\n });\n\n positionClass = computed(() => `bs-popover-${this.position()}`);\n}\n","@if (isVisible()) {\n <div class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n","import { ComponentPortal } from \"@angular/cdk/portal\";\nimport { InjectionToken, Injector } from \"@angular/core\";\n\nexport const PORTAL_FACTORY = new InjectionToken<(injector: Injector) => ComponentPortal<any>>('PopoverPortalFactory');","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { AfterViewInit, ComponentRef, Directive, ElementRef, Host, inject, Injector, input, OnDestroy, signal, SkipSelf, TemplateRef, computed, effect } from '@angular/core';\nimport { BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsPopoverComponent } from '../../component/popover.component';\nimport { POPOVER_CONTENT } from '../../providers/popover-content.provider';\nimport { POPOVER_ID } from '../../providers/popover-id.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\n\n@Directive({\n selector: '*[bsPopover]',\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsPopoverComponent, null, injector);\n }\n }],\n host: {\n '(document:keydown.escape)': 'onEscape()',\n },\n})\nexport class BsPopoverDirective implements AfterViewInit, OnDestroy {\n\n private overlay = inject(Overlay);\n private templateRef = inject(TemplateRef<any>);\n private parentInjector = inject(Injector);\n private portalFactory = inject(PORTAL_FACTORY);\n private parent = inject(ElementRef, { host: true, skipSelf: true });\n private ids = inject(BsIdService);\n private overlayStack = inject(BsOverlayStackService);\n private readonly popoverId = this.ids.next('bs-popover');\n private stackToken: symbol | null = null;\n\n bsPopover = input<Position>('bottom');\n updatePosition = input(false);\n\n private localInjector: Injector | null = null;\n private portal: ComponentPortal<any> | null = null;\n private overlayRef: OverlayRef | null = null;\n private component: ComponentRef<BsPopoverComponent> | null = null;\n isVisible = signal<boolean>(false);\n\n connectedPosition = computed<ConnectedPosition>(() => {\n const position = this.bsPopover();\n switch (position) {\n case 'top':\n return {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\"\n };\n case 'start':\n return {\n originX: \"start\",\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n };\n case 'end':\n return {\n originX: \"end\",\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\"\n };\n default:\n return {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\"\n };\n }\n });\n\n constructor() {\n effect(() => {\n const position = this.bsPopover();\n if (this.component) {\n this.component.setInput('position', position);\n }\n });\n\n effect(() => {\n const isVisible = this.isVisible();\n if (this.component) {\n this.component.setInput('isVisible', isVisible);\n }\n this.parent.nativeElement.setAttribute('aria-expanded', isVisible ? 'true' : 'false');\n\n if (isVisible && this.stackToken === null) {\n this.stackToken = this.overlayStack.push();\n } else if (!isVisible && this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n });\n\n effect(() => {\n const connectedPosition = this.connectedPosition();\n if (this.overlayRef) {\n setTimeout(() => {\n this.overlayRef?.updatePositionStrategy(this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([connectedPosition]));\n }, 20);\n }\n });\n }\n\n ngAfterViewInit() {\n const connectedPosition = this.connectedPosition();\n this.localInjector = Injector.create({\n providers: [\n { provide: POPOVER_CONTENT, useValue: this.templateRef },\n { provide: POPOVER_ID, useValue: this.popoverId },\n ],\n parent: this.parentInjector\n });\n this.portal = this.portalFactory(this.localInjector);\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([connectedPosition]),\n });\n this.component = this.overlayRef.attach<BsPopoverComponent>(this.portal);\n this.component.setInput('position', this.bsPopover());\n\n // Trigger ARIA: identifies the trigger as a disclosure that opens a dialog.\n this.parent.nativeElement.setAttribute('aria-haspopup', 'dialog');\n this.parent.nativeElement.setAttribute('aria-controls', this.popoverId);\n this.parent.nativeElement.setAttribute('aria-expanded', 'false');\n\n /* addEventListener rather than the .onclick property — the property write\n silently CLOBBERED any click handler the consumer had on their trigger. */\n const toggle = () => {\n if (this.updatePosition()) {\n this.overlayRef?.updatePosition();\n }\n this.isVisible.set(!this.isVisible());\n };\n this.parent.nativeElement.addEventListener('click', toggle);\n\n // A popover trigger on a non-focusable element (span, div, icon) could not\n // be opened by keyboard at all. Make it a real button-like control; native\n // buttons/links are left exactly as they are.\n const el = this.parent.nativeElement as HTMLElement;\n const nativelyFocusable = el.matches('button, a[href], input, select, textarea, [tabindex]');\n if (!nativelyFocusable) {\n el.setAttribute('tabindex', '0');\n if (!el.hasAttribute('role')) el.setAttribute('role', 'button');\n el.addEventListener('keydown', (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' || ev.key === ' ') {\n ev.preventDefault();\n toggle();\n }\n });\n }\n }\n\n onEscape() {\n if (this.isVisible() && this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.isVisible.set(false);\n }\n }\n\n ngOnDestroy() {\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[bsPopoverBody]',\n host: {\n '[class.popover-body]': 'true',\n },\n})\nexport class BsPopoverBodyDirective {\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[bsPopoverHeader]',\n host: {\n '[class.popover-header]': 'true',\n },\n})\nexport class BsPopoverHeaderDirective {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;ACArF;AACO,MAAM,UAAU,GAAG,IAAI,cAAc,CAAS,YAAY,CAAC;;ACDlE;;;;AAIG;MAEU,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI;mFAAC;AAC9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AA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,sBAAsB,EAAE,MAAM;AAC/B,qBAAA;AACF,iBAAA;;;MCCY,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACJ,wBAAA,wBAAwB,EAAE,MAAM;AACjC,qBAAA;AACF,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-popover.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/popover-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/popover-id.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/services/popover-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/component/popover.component.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/component/popover.component.html","../../../../libs/mintplayer-ng-bootstrap/popover/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover/popover.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover-body/popover-body.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/src/directives/popover-header/popover-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/popover/mintplayer-ng-bootstrap-popover.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const POPOVER_CONTENT = new InjectionToken<TemplateRef<any>>('PopoverContent');","import { InjectionToken } from '@angular/core';\n\n/** The dom id assigned to the rendered popover dialog so the trigger can point at it via aria-controls. */\nexport const POPOVER_ID = new InjectionToken<string>('POPOVER_ID');\n","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsPopoverComponent (the dialog renderer)\n * and the bsPopoverHeader / bsPopoverBody directives applied to the user's\n * template. Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsPopoverContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, Injector, input, TemplateRef } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPopover } from '@mintplayer/ui-core/bootstrap/popover';\nimport { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { POPOVER_CONTENT } from '../providers/popover-content.provider';\nimport { POPOVER_ID } from '../providers/popover-id.provider';\nimport { BsPopoverContextService } from '../services/popover-context.service';\n\n@Component({\n selector: 'bs-popover',\n templateUrl: './popover.component.html',\n styleUrls: ['./popover.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsPopoverContextService],\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsPopoverComponent {\n constructor() {\n // #452: the popover and transitions partials ship with this component, scoped to the elements it stamps (data-mps=\"popover\").\n useBootstrap(bootstrapPopover, bootstrapTransitions);\n }\n\n template = inject<TemplateRef<any>>(POPOVER_CONTENT);\n popoverId = inject(POPOVER_ID);\n context = inject(BsPopoverContextService);\n injector = inject(Injector);\n\n position = input<Position>('bottom');\n isVisible = input<boolean>(false);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'top': return 'mb-2';\n case 'start': return 'me-2';\n case 'end': return 'ms-2';\n default: return 'mt-2';\n }\n });\n\n positionClass = computed(() => `bs-popover-${this.position()}`);\n}\n","@if (isVisible()) {\n <div data-mps=\"popover\" class=\"popover position-relative fade show\"\n role=\"dialog\"\n [bsOverlayFocus]=\"isVisible()\"\n tabindex=\"-1\"\n [id]=\"popoverId\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [class]=\"[marginClass(), positionClass()]\"\n [@fadeInOut]>\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n <div data-mps=\"popover\" class=\"popover-arrow position-absolute\" aria-hidden=\"true\"></div>\n <bs-has-overlay></bs-has-overlay>\n </div>\n}\n","import { ComponentPortal } from \"@angular/cdk/portal\";\nimport { InjectionToken, Injector } from \"@angular/core\";\n\nexport const PORTAL_FACTORY = new InjectionToken<(injector: Injector) => ComponentPortal<any>>('PopoverPortalFactory');","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { AfterViewInit, ComponentRef, Directive, ElementRef, Host, inject, Injector, input, OnDestroy, signal, SkipSelf, TemplateRef, computed, effect } from '@angular/core';\nimport { BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsPopoverComponent } from '../../component/popover.component';\nimport { POPOVER_CONTENT } from '../../providers/popover-content.provider';\nimport { POPOVER_ID } from '../../providers/popover-id.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\n\n@Directive({\n selector: '*[bsPopover]',\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsPopoverComponent, null, injector);\n }\n }],\n host: {\n '(document:keydown.escape)': 'onEscape()',\n },\n})\nexport class BsPopoverDirective implements AfterViewInit, OnDestroy {\n\n private overlay = inject(Overlay);\n private templateRef = inject(TemplateRef<any>);\n private parentInjector = inject(Injector);\n private portalFactory = inject(PORTAL_FACTORY);\n private parent = inject(ElementRef, { host: true, skipSelf: true });\n private ids = inject(BsIdService);\n private overlayStack = inject(BsOverlayStackService);\n private readonly popoverId = this.ids.next('bs-popover');\n private stackToken: symbol | null = null;\n\n bsPopover = input<Position>('bottom');\n updatePosition = input(false);\n\n private localInjector: Injector | null = null;\n private portal: ComponentPortal<any> | null = null;\n private overlayRef: OverlayRef | null = null;\n private component: ComponentRef<BsPopoverComponent> | null = null;\n isVisible = signal<boolean>(false);\n\n connectedPosition = computed<ConnectedPosition>(() => {\n const position = this.bsPopover();\n switch (position) {\n case 'top':\n return {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\"\n };\n case 'start':\n return {\n originX: \"start\",\n originY: \"center\",\n overlayX: \"end\",\n overlayY: \"center\",\n };\n case 'end':\n return {\n originX: \"end\",\n originY: \"center\",\n overlayX: \"start\",\n overlayY: \"center\"\n };\n default:\n return {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\"\n };\n }\n });\n\n constructor() {\n effect(() => {\n const position = this.bsPopover();\n if (this.component) {\n this.component.setInput('position', position);\n }\n });\n\n effect(() => {\n const isVisible = this.isVisible();\n if (this.component) {\n this.component.setInput('isVisible', isVisible);\n }\n this.parent.nativeElement.setAttribute('aria-expanded', isVisible ? 'true' : 'false');\n\n if (isVisible && this.stackToken === null) {\n this.stackToken = this.overlayStack.push();\n } else if (!isVisible && this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n });\n\n effect(() => {\n const connectedPosition = this.connectedPosition();\n if (this.overlayRef) {\n setTimeout(() => {\n this.overlayRef?.updatePositionStrategy(this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([connectedPosition]));\n }, 20);\n }\n });\n }\n\n ngAfterViewInit() {\n const connectedPosition = this.connectedPosition();\n this.localInjector = Injector.create({\n providers: [\n { provide: POPOVER_CONTENT, useValue: this.templateRef },\n { provide: POPOVER_ID, useValue: this.popoverId },\n ],\n parent: this.parentInjector\n });\n this.portal = this.portalFactory(this.localInjector);\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([connectedPosition]),\n });\n this.component = this.overlayRef.attach<BsPopoverComponent>(this.portal);\n this.component.setInput('position', this.bsPopover());\n\n // Trigger ARIA: identifies the trigger as a disclosure that opens a dialog.\n this.parent.nativeElement.setAttribute('aria-haspopup', 'dialog');\n this.parent.nativeElement.setAttribute('aria-controls', this.popoverId);\n this.parent.nativeElement.setAttribute('aria-expanded', 'false');\n\n /* addEventListener rather than the .onclick property — the property write\n silently CLOBBERED any click handler the consumer had on their trigger. */\n const toggle = () => {\n if (this.updatePosition()) {\n this.overlayRef?.updatePosition();\n }\n this.isVisible.set(!this.isVisible());\n };\n this.parent.nativeElement.addEventListener('click', toggle);\n\n // A popover trigger on a non-focusable element (span, div, icon) could not\n // be opened by keyboard at all. Make it a real button-like control; native\n // buttons/links are left exactly as they are.\n const el = this.parent.nativeElement as HTMLElement;\n const nativelyFocusable = el.matches('button, a[href], input, select, textarea, [tabindex]');\n if (!nativelyFocusable) {\n el.setAttribute('tabindex', '0');\n if (!el.hasAttribute('role')) el.setAttribute('role', 'button');\n el.addEventListener('keydown', (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' || ev.key === ' ') {\n ev.preventDefault();\n toggle();\n }\n });\n }\n }\n\n onEscape() {\n if (this.isVisible() && this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.isVisible.set(false);\n }\n }\n\n ngOnDestroy() {\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n if (this.overlayRef) {\n this.overlayRef.detach();\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPopover } from '@mintplayer/ui-core/bootstrap/popover';\n\n@Directive({\n selector: '[bsPopoverBody]',\n host: {\n '[attr.data-mps]': '\"popover\"',\n '[class.popover-body]': 'true',\n },\n})\nexport class BsPopoverBodyDirective {\n constructor() {\n // #452: the popover partial ships with this component, scoped to the elements it stamps (data-mps=\"popover\").\n useBootstrap(bootstrapPopover);\n }\n\n}\n","import { Directive } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapPopover } from '@mintplayer/ui-core/bootstrap/popover';\n\n@Directive({\n selector: '[bsPopoverHeader]',\n host: {\n '[attr.data-mps]': '\"popover\"',\n '[class.popover-header]': 'true',\n },\n})\nexport class BsPopoverHeaderDirective {\n constructor() {\n // #452: the popover partial ships with this component, scoped to the elements it stamps (data-mps=\"popover\").\n useBootstrap(bootstrapPopover);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;ACArF;AACO,MAAM,UAAU,GAAG,IAAI,cAAc,CAAS,YAAY,CAAC;;ACDlE;;;;AAIG;MAEU,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI;mFAAC;AAC9C,IAAA;8GAHY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CA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A,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,sBAAsB,EAAE,MAAM;AAC/B,qBAAA;AACF,iBAAA;;;MCCY,wBAAwB,CAAA;AACnC,IAAA,WAAA,GAAA;;QAEE,YAAY,CAAC,gBAAgB,CAAC;IAChC;8GAJW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,aAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,wBAAwB,EAAE,MAAM;AACjC,qBAAA;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
3
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapProgress } from '@mintplayer/ui-core/bootstrap/progress';
|
|
3
5
|
import { Color } from '@mintplayer/ng-bootstrap';
|
|
4
6
|
|
|
5
7
|
class BsProgressComponent {
|
|
@@ -10,9 +12,11 @@ class BsProgressComponent {
|
|
|
10
12
|
...(ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []));
|
|
11
13
|
this.ariaLabel = input('Loading', /* @ts-ignore */
|
|
12
14
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
15
|
+
// #452: the progress partial ships with this component, scoped to the elements it stamps (data-mps="progress").
|
|
16
|
+
useBootstrap(bootstrapProgress);
|
|
13
17
|
}
|
|
14
18
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsProgressComponent, isStandalone: true, selector: "bs-progress", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, isIndeterminate: { classPropertyName: "isIndeterminate", publicName: "isIndeterminate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.height.px": "height()", "class.d-block": "true", "class.overflow-hidden": "true" } }, ngImport: i0, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: ["
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsProgressComponent, isStandalone: true, selector: "bs-progress", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, isIndeterminate: { classPropertyName: "isIndeterminate", publicName: "isIndeterminate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.height.px": "height()", "class.d-block": "true", "class.overflow-hidden": "true" } }, ngImport: i0, template: "<div data-mps=\"progress\" class=\"progress\">\n @if (isIndeterminate()) {\n <div data-mps=\"progress\" class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: [".progress-bar-infinite{animation:progress-infinite 1.5s infinite}@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16
20
|
}
|
|
17
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsProgressComponent, decorators: [{
|
|
18
22
|
type: Component,
|
|
@@ -20,8 +24,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
20
24
|
'[style.height.px]': 'height()',
|
|
21
25
|
'[class.d-block]': 'true',
|
|
22
26
|
'[class.overflow-hidden]': 'true',
|
|
23
|
-
}, template: "<div class=\"progress\">\n @if (isIndeterminate()) {\n <div class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: ["
|
|
24
|
-
}], propDecorators: { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIndeterminate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
27
|
+
}, template: "<div data-mps=\"progress\" class=\"progress\">\n @if (isIndeterminate()) {\n <div data-mps=\"progress\" class=\"progress-bar progress-bar-infinite bg-primary\" role=\"progressbar\" [attr.aria-label]=\"ariaLabel()\"></div>\n } @else {\n <ng-content></ng-content>\n }\n</div>\n", styles: [".progress-bar-infinite{animation:progress-infinite 1.5s infinite}@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}\n"] }]
|
|
28
|
+
}], ctorParameters: () => [], propDecorators: { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], isIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIndeterminate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
25
29
|
|
|
26
30
|
class BsProgressBarComponent {
|
|
27
31
|
constructor() {
|
|
@@ -57,13 +61,16 @@ class BsProgressBarComponent {
|
|
|
57
61
|
return `bg-${name}`;
|
|
58
62
|
}, /* @ts-ignore */
|
|
59
63
|
...(ngDevMode ? [{ debugName: "colorClassComputed" }] : /* istanbul ignore next */ []));
|
|
64
|
+
// #452: the progress partial ships with this component, scoped to the elements it stamps (data-mps="progress").
|
|
65
|
+
useBootstrap(bootstrapProgress);
|
|
60
66
|
}
|
|
61
67
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
62
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsProgressBarComponent, isStandalone: true, selector: "bs-progress-bar", inputs: { minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: false, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.progress-bar": "true", "class.progress-bar-striped": "striped()", "class.progress-bar-animated": "animated()", "class": "colorClassComputed()", "style.width": "width()", "attr.role": "\"progressbar\"", "attr.aria-valuenow": "value()", "attr.aria-valuemin": "minimum()", "attr.aria-valuemax": "maximum()", "attr.aria-label": "ariaLabel()", "attr.aria-valuetext": "valueText()" } }, ngImport: i0, template: "", styles: ["
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsProgressBarComponent, isStandalone: true, selector: "bs-progress-bar", inputs: { minimum: { classPropertyName: "minimum", publicName: "minimum", isSignal: true, isRequired: false, transformFunction: null }, maximum: { classPropertyName: "maximum", publicName: "maximum", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, animated: { classPropertyName: "animated", publicName: "animated", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, valueText: { classPropertyName: "valueText", publicName: "valueText", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-mps": "\"progress\"", "class.progress-bar": "true", "class.progress-bar-striped": "striped()", "class.progress-bar-animated": "animated()", "class": "colorClassComputed()", "style.width": "width()", "attr.role": "\"progressbar\"", "attr.aria-valuenow": "value()", "attr.aria-valuemin": "minimum()", "attr.aria-valuemax": "maximum()", "attr.aria-label": "ariaLabel()", "attr.aria-valuetext": "valueText()" } }, ngImport: i0, template: "", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
63
69
|
}
|
|
64
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsProgressBarComponent, decorators: [{
|
|
65
71
|
type: Component,
|
|
66
72
|
args: [{ selector: 'bs-progress-bar', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
73
|
+
'[attr.data-mps]': '"progress"',
|
|
67
74
|
'[class.progress-bar]': 'true',
|
|
68
75
|
'[class.progress-bar-striped]': 'striped()',
|
|
69
76
|
'[class.progress-bar-animated]': 'animated()',
|
|
@@ -75,8 +82,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
75
82
|
'[attr.aria-valuemax]': 'maximum()',
|
|
76
83
|
'[attr.aria-label]': 'ariaLabel()',
|
|
77
84
|
'[attr.aria-valuetext]': 'valueText()',
|
|
78
|
-
}, template: ""
|
|
79
|
-
}], propDecorators: { minimum: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimum", required: false }] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], valueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueText", required: false }] }] } });
|
|
85
|
+
}, template: "" }]
|
|
86
|
+
}], ctorParameters: () => [], propDecorators: { minimum: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimum", required: false }] }], maximum: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximum", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], valueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueText", required: false }] }] } });
|
|
80
87
|
|
|
81
88
|
/**
|
|
82
89
|
* Generated bundle index. Do not edit.
|