@mintplayer/ng-bootstrap 22.30.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 +9 -3
- 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 +3 -1
- 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-datatable.d.ts +4 -2
- 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-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/host-props.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/ssr.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/core.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/trusted-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => (this.applied = applyPropBag(this.renderer, this.element, this.applied, this.mpProps() ?? {})));\n }\n}\n\n/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */\nexport function applyPropBag(renderer: Renderer2, element: Element, previous: PropBag, next: PropBag): PropBag {\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => renderer.removeAttribute(element, name));\n Object.entries(next)\n .filter(([, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => renderer.setAttribute(element, name, value === true ? '' : String(value)));\n return next;\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { installLightStyles, writeScopedStyleTag } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * In the browser it also repairs the event-replay body shift (below) — every\n * front calls this first thing, so the repair runs before any front's\n * projected children are hydrated.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText);\n } else {\n repairEventReplayBodyPaths(inject(DOCUMENT));\n installLightStyles(key, cssText);\n }\n}\n\n/**\n * Angular SSR defect (platform-server 22): `_annotateForHydration` records the\n * hydration paths, and only THEN `insertEventRecordScript` adds the replay\n * `<script>` right after `#ng-event-dispatch-contract` in `<body>`. A node\n * whose path is body-relative — any projected node a front renders outside\n * its own host (an accordion tab's body inside the accordion's `<details>`, a\n * tab page's body inside the tab control's panel) — is then looked up one\n * sibling off, and hydration throws \"Cannot read properties of null\n * (reading 'nextSibling')\". The replay script has already run by the time any\n * component is constructed, so removing its element restores the body the\n * paths were computed against. Idempotent; a no-op without event replay.\n */\nexport function repairEventReplayBodyPaths(doc: Document): void {\n const replay = doc.getElementById('ng-event-dispatch-contract')?.nextSibling;\n if (replay instanceof HTMLScriptElement && replay.textContent?.startsWith('window.__jsaction_bootstrap(')) replay.remove();\n}\n","import { effect, ElementRef, inject, Renderer2 } from '@angular/core';\nimport { applyPropBag, type PropBag } from './props.directive';\n\n/**\n * Apply a core's attribute bag to the component's own host element: the host\n * twin of `[mpProps]`, for a compiled template whose root is marked `mp-host`\n * (the root element IS the host, so the template holds only its children).\n *\n * Diffs like `[mpProps]` and writes through `Renderer2`, so the attributes are\n * in the server-rendered HTML. `class` is merged token by token, never\n * written as an attribute: the consumer's own classes on the host survive.\n *\n * constructor() { useHostProps(() => this.view().root); }\n */\nexport function useHostProps(bag: () => PropBag | null | undefined): void {\n const element = inject(ElementRef).nativeElement as Element;\n const renderer = inject(Renderer2);\n let applied: PropBag = {};\n let classes: string[] = [];\n effect(() => {\n const { class: className, ...rest } = bag() ?? {};\n const next = typeof className === 'string' ? className.split(/\\s+/).filter(Boolean) : [];\n classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));\n next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));\n classes = next;\n applied = applyPropBag(renderer, element, applied, rest);\n });\n}\n","import { InjectionToken, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { DEFAULT_PREFETCH_TIMEOUT } from '@mintplayer/ui-core/transfer-state';\n\nexport interface MachineSsrOptions {\n /**\n * How long a server render waits for one component's prefetch (a `[fetch]`\n * datatable's first page with a `stateKey`), ms. On expiry the component\n * renders its loading state and the browser fetches. Default 3000 (#448 D6).\n */\n readonly prefetchTimeout?: number;\n}\n\nexport const MACHINE_SSR_OPTIONS = new InjectionToken<MachineSsrOptions>('mp-machine-ssr-options', {\n factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),\n});\n\n/** App-level settings for components that load data during a server render. */\nexport function provideMachineSsr(options: MachineSsrOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: MACHINE_SSR_OPTIONS, useValue: { prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT, ...options } }]);\n}\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n makeStateKey,\n PendingTasks,\n PLATFORM_ID,\n signal,\n TransferState,\n untracked,\n type Provider,\n type Signal,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreRuntime, type ComponentCore, type CoreBag, type CoreContext, type ViewArgs } from '@mintplayer/ui-core/component';\nimport { runPrefetch } from '@mintplayer/ui-core/transfer-state';\nimport { useHostProps } from './host-props';\nimport { MACHINE_SSR_OPTIONS } from './ssr';\n\nconst tokens = new WeakMap<CoreContext<unknown>, InjectionToken<Signal<unknown>>>();\n\n/** The Angular token for a core context: one per context object. */\nexport function coreContextToken<T>(context: CoreContext<T>): InjectionToken<Signal<T>> {\n let token = tokens.get(context as CoreContext<unknown>);\n if (!token) {\n token = new InjectionToken<Signal<unknown>>(`mp-core-context:${context.name}`);\n tokens.set(context as CoreContext<unknown>, token);\n }\n return token as InjectionToken<Signal<T>>;\n}\n\n/** Provides `context` to the component's content, read from the component's `useCore().provided`. */\nexport function provideCoreContext<T>(context: CoreContext<T>, component: Type<{ readonly provided: Signal<T> }>): Provider {\n return { provide: coreContextToken(context), useFactory: () => inject(component).provided };\n}\n\nexport interface UseCoreOptions<I, P> {\n readonly inputs: () => I;\n /** Prefix of the deterministic id, e.g. `bs-navbar`. */\n readonly idPrefix: string;\n /** The outputs by name; `api.emit` calls their `emit`. */\n readonly outputs?: Readonly<Record<string, { emit(detail: never): void }>>;\n /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */\n readonly hostBag?: (props: P) => CoreBag | null | undefined;\n /** Two-way inputs (`model()`), by name; written back when the core changes the state of the same name. */\n readonly models?: Readonly<Record<string, { set(value: never): void }>>;\n}\n\nexport interface CoreHandle<P, PC> {\n /** The template's props. */\n readonly props: Signal<P>;\n /** The value this component provides to its content. */\n readonly provided: Signal<PC>;\n /** Runs a core method; does nothing before the first client render. */\n call(name: string, args: unknown[]): unknown;\n}\n\n/**\n * Host a `ComponentCore` in a generated Angular component (PRD #437 D10).\n * Call it in a field initializer. The template's root is the host element\n * where `hostBag` is given, else the host's first element child.\n */\nexport function useCore<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: UseCoreOptions<I, P>): CoreHandle<P, PC> {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;\n const id = inject(BsIdService).next(options.idPrefix);\n // Read once: a host attribute is static content, and Angular does not observe it.\n const label = element.getAttribute('aria-label');\n const hydrated = signal(false);\n // The state is seeded at its first read, in the first change detection: the\n // template's bindings have set the inputs by then. In the constructor they\n // have not, and the server would render a bound model input's default.\n const written = signal<S | null>(null);\n const server = isPlatformServer(inject(PLATFORM_ID));\n const transfer = core.transferKey ? inject(TransferState) : null;\n /** Server only: starts the prefetch with the first inputs that name one (a `transferKey`), however late they arrive. */\n let prefetchOnce: ((inputs: I) => void) | null = null;\n /** Client only: the transferred seed is still unread, because no inputs have named its key yet. */\n let transferArmed = !server && !!transfer;\n let seeded: S | null = null;\n const seed = (): S => {\n if (seeded) return seeded;\n const inputs = untracked(options.inputs);\n // The baseline the state was seeded from: inputs that change before attaching\n // (a form control writing its value) reach inputsChanged on attach.\n runtime.inputs(inputs);\n return (seeded = core.state ? core.state(inputs, server ? undefined : takeTransferred(inputs)) : ({} as S));\n };\n /**\n * The server's prefetched seed for these inputs, read once: a later instance with the same query fetches fresh (#448).\n * Inputs without a key (a `fetch` the consumer sets after an async step) leave it armed for the next delivery.\n */\n const takeTransferred = (inputs: I): unknown => {\n const key = transferArmed && transfer ? core.transferKey?.(inputs) : undefined;\n if (!transfer || !key) return undefined;\n transferArmed = false;\n const stateKey = makeStateKey<unknown>(key);\n if (!transfer.hasKey(stateKey)) return undefined;\n const value = transfer.get(stateKey, undefined);\n transfer.remove(stateKey);\n return value;\n };\n if (server && transfer && core.prefetch) {\n // Outside the state computed, which must not write signals: the first change\n // detection seeds the loading snapshot, this replaces it before serialization.\n const pendingTasks = inject(PendingTasks);\n const ssr = inject(MACHINE_SSR_OPTIONS);\n const abort = new AbortController();\n inject(DestroyRef).onDestroy(() => abort.abort());\n prefetchOnce = (inputs) => {\n void pendingTasks.run(async () => {\n const result = await runPrefetch(core, inputs, { timeout: ssr.prefetchTimeout, signal: abort.signal });\n if (!result || abort.signal.aborted) return;\n transfer.set(makeStateKey<unknown>(result.key), result.seed);\n written.set(core.state!(inputs, result.seed));\n });\n };\n }\n const state = computed(() => written() ?? seed());\n\n const args = computed<ViewArgs<I, S, C, E>>(() => ({\n inputs: options.inputs(),\n state: state(),\n id,\n hydrated: hydrated(),\n context: (consumed ? consumed() : core.consume?.defaultValue) as C,\n label,\n api: () => runtime.api,\n }));\n const props = computed(() => core.view(args()));\n const provided = computed(() => core.provide?.(args()) as PC);\n\n const hostBag = options.hostBag ?? core.host?.bind(core);\n if (hostBag) useHostProps(() => hostBag(props()));\n\n const runtime = coreRuntime(core, {\n inputs: () => untracked(options.inputs),\n state: () => untracked(state),\n setState: (next) => written.set(next),\n emit: (name, detail) => options.outputs?.[name]?.emit(detail as never),\n models: Object.keys(options.models ?? {}) as never,\n writeModel: (name, value) => options.models?.[name]?.set(value as never),\n });\n afterNextRender(() => {\n hydrated.set(true);\n const root = options.hostBag ? element : (element.firstElementChild as HTMLElement | null);\n if (root) runtime.attachTo(root);\n });\n effect(() => {\n const inputs = options.inputs();\n untracked(() => {\n // A seed whose key the first inputs did not name: applied before the inputs reach the core,\n // so its inputsChanged sees the seeded page as the answer rather than reloading it.\n if (transferArmed && core.adopt) {\n const late = takeTransferred(inputs);\n if (late !== undefined) written.set(core.adopt(state(), inputs, late));\n }\n runtime.inputs(inputs);\n // Armed until the inputs name a prefetch: a `fetch` or `stateKey` can arrive after the first delivery.\n if (prefetchOnce && core.transferKey?.(inputs)) {\n const start = prefetchOnce;\n prefetchOnce = null;\n start(inputs);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => runtime.dispose());\n\n return { props, provided, call: (name, callArgs) => runtime.call(name, callArgs) };\n}\n","import { DestroyRef, Directive, effect, EmbeddedViewRef, inject, input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * Render an `<ng-template>` into another element, the compiled form of a view's\n * `<teleport :to>`. The twin of React's `createPortal`, Vue's `<Teleport>` and\n * Lit's `teleport()`. The view lives in this container, so change detection and\n * destruction follow the component, but its root nodes are moved into `to`, as\n * CDK's DomPortalOutlet does. Nothing renders while `to` is null, which is the\n * server's case. A core hands a target whose identity never changes (the\n * dock's per-pane hosts), so the content's state survives wherever the core\n * moves that target.\n *\n * <ng-template [mpTeleport]=\"view.paneHosts[pane]\">...</ng-template>\n */\n@Directive({ selector: '[mpTeleport]' })\nexport class MpTeleportDirective {\n readonly mpTeleport = input<Element | null | undefined>(null);\n\n private readonly template = inject(TemplateRef);\n private readonly container = inject(ViewContainerRef);\n private view: EmbeddedViewRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const to = this.mpTeleport() ?? null;\n if (!to) {\n this.container.clear();\n this.view = null;\n return;\n }\n this.view ??= this.container.createEmbeddedView(this.template);\n // The view's nodes render in place first; detectChanges fills them before they move.\n this.view.detectChanges();\n this.view.rootNodes.filter((node: Node) => node.parentNode !== to).forEach((node: Node) => to.appendChild(node));\n });\n inject(DestroyRef).onDestroy(() => this.container.clear());\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Marks core-produced markup as trusted for `[innerHTML]`: the compiled form of\n * a view's `v-html`. The view contract is that `v-html` only ever carries markup\n * the core produced (flag and file-type SVGs, highlighted code rows), which the\n * React, Vue and Lit fronts insert as-is. Angular's sanitiser would instead drop\n * every `<svg>` — an empty flag, an icon-less file manager — so the Angular front\n * trusts it the same way.\n *\n * <span [innerHTML]=\"view.flagHtml | mpTrustedHtml\"></span>\n */\n@Pipe({ name: 'mpTrustedHtml' })\nexport class MpTrustedHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n transform(html: string | null | undefined): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html ?? '');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ;8EAAC;AACvC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtE,IAAA,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,IAAA,OAAO,KAAK,CAAC,UAAU,EAAE;AAC3B;;ACZA;;;;AAIG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAEzG,SAAS,SAAS,CAAC,IAAY,EAAA;AAC7B,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACnD;AAEA;;;;;;;;;;;AAWG;MAEU,gBAAgB,CAAA;AAO3B,IAAA,WAAA,GAAA;QANS,IAAA,CAAA,OAAO,GAAG,KAAK,CAA6B,IAAI;oFAAC;AAEzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAAwB;AACrD,QAAA,IAAA,CAAA,QAAQ,GAAG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c,EAAE;;;ACXvC;;;;;;;;;AASG;MAEU,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AAKlD,IAAA;AAHC,IAAA,SAAS,CAAC,IAA+B,EAAA;QACvC,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3D;8GALW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,IAAI;mBAAC,EAAE,IAAI,EAAE,eAAe,EAAE;;;ACb/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/host-props.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/ssr.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/core.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/trusted-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => (this.applied = applyPropBag(this.renderer, this.element, this.applied, this.mpProps() ?? {})));\n }\n}\n\n/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */\nexport function applyPropBag(renderer: Renderer2, element: Element, previous: PropBag, next: PropBag): PropBag {\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => renderer.removeAttribute(element, name));\n Object.entries(next)\n .filter(([, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => renderer.setAttribute(element, name, value === true ? '' : String(value)));\n return next;\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { bootstrapInstallOptions, type BootstrapPart } from '@mintplayer/ui-core/bootstrap';\nimport { installLightStyles, writeScopedStyleTag, type InstallOptions } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * In the browser it also repairs the event-replay body shift (below) — every\n * front calls this first thing, so the repair runs before any front's\n * projected children are hydrated.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string, options: InstallOptions = {}): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText, options);\n } else {\n repairEventReplayBodyPaths(inject(DOCUMENT));\n installLightStyles(key, cssText, options);\n }\n}\n\n/**\n * Install Bootstrap parts (`@mintplayer/ui-core/bootstrap`, #452) from an\n * Angular front, the same way as {@link useScopedStyles}: once per page, and\n * written into the server `DOCUMENT` during SSR. A component passes the scoped\n * parts its markup uses; a page that renders raw Bootstrap markup passes the\n * `…Page` variants, which replace a scoped copy under the same key. Call from\n * the constructor (an injection context).\n */\nexport function useBootstrap(...parts: readonly BootstrapPart[]): void {\n parts.forEach((part) => useScopedStyles(part.key, part.css, bootstrapInstallOptions(part)));\n}\n\n/**\n * Angular SSR defect (platform-server 22): `_annotateForHydration` records the\n * hydration paths, and only THEN `insertEventRecordScript` adds the replay\n * `<script>` right after `#ng-event-dispatch-contract` in `<body>`. A node\n * whose path is body-relative — any projected node a front renders outside\n * its own host (an accordion tab's body inside the accordion's `<details>`, a\n * tab page's body inside the tab control's panel) — is then looked up one\n * sibling off, and hydration throws \"Cannot read properties of null\n * (reading 'nextSibling')\". The replay script has already run by the time any\n * component is constructed, so removing its element restores the body the\n * paths were computed against. Idempotent; a no-op without event replay.\n */\nexport function repairEventReplayBodyPaths(doc: Document): void {\n const replay = doc.getElementById('ng-event-dispatch-contract')?.nextSibling;\n if (replay instanceof HTMLScriptElement && replay.textContent?.startsWith('window.__jsaction_bootstrap(')) replay.remove();\n}\n","import { effect, ElementRef, inject, Renderer2 } from '@angular/core';\nimport { applyPropBag, type PropBag } from './props.directive';\n\n/**\n * Apply a core's attribute bag to the component's own host element: the host\n * twin of `[mpProps]`, for a compiled template whose root is marked `mp-host`\n * (the root element IS the host, so the template holds only its children).\n *\n * Diffs like `[mpProps]` and writes through `Renderer2`, so the attributes are\n * in the server-rendered HTML. `class` is merged token by token, never\n * written as an attribute: the consumer's own classes on the host survive.\n *\n * constructor() { useHostProps(() => this.view().root); }\n */\nexport function useHostProps(bag: () => PropBag | null | undefined): void {\n const element = inject(ElementRef).nativeElement as Element;\n const renderer = inject(Renderer2);\n let applied: PropBag = {};\n let classes: string[] = [];\n effect(() => {\n const { class: className, ...rest } = bag() ?? {};\n const next = typeof className === 'string' ? className.split(/\\s+/).filter(Boolean) : [];\n classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));\n next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));\n classes = next;\n applied = applyPropBag(renderer, element, applied, rest);\n });\n}\n","import { InjectionToken, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { DEFAULT_PREFETCH_TIMEOUT } from '@mintplayer/ui-core/transfer-state';\n\nexport interface MachineSsrOptions {\n /**\n * How long a server render waits for one component's prefetch (a `[fetch]`\n * datatable's first page with a `stateKey`), ms. On expiry the component\n * renders its loading state and the browser fetches. Default 3000 (#448 D6).\n */\n readonly prefetchTimeout?: number;\n}\n\nexport const MACHINE_SSR_OPTIONS = new InjectionToken<MachineSsrOptions>('mp-machine-ssr-options', {\n factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),\n});\n\n/** App-level settings for components that load data during a server render. */\nexport function provideMachineSsr(options: MachineSsrOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: MACHINE_SSR_OPTIONS, useValue: { prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT, ...options } }]);\n}\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n makeStateKey,\n PendingTasks,\n PLATFORM_ID,\n signal,\n TransferState,\n untracked,\n type Provider,\n type Signal,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreRuntime, type ComponentCore, type CoreBag, type CoreContext, type ViewArgs } from '@mintplayer/ui-core/component';\nimport { runPrefetch } from '@mintplayer/ui-core/transfer-state';\nimport { useHostProps } from './host-props';\nimport { MACHINE_SSR_OPTIONS } from './ssr';\n\nconst tokens = new WeakMap<CoreContext<unknown>, InjectionToken<Signal<unknown>>>();\n\n/** The Angular token for a core context: one per context object. */\nexport function coreContextToken<T>(context: CoreContext<T>): InjectionToken<Signal<T>> {\n let token = tokens.get(context as CoreContext<unknown>);\n if (!token) {\n token = new InjectionToken<Signal<unknown>>(`mp-core-context:${context.name}`);\n tokens.set(context as CoreContext<unknown>, token);\n }\n return token as InjectionToken<Signal<T>>;\n}\n\n/** Provides `context` to the component's content, read from the component's `useCore().provided`. */\nexport function provideCoreContext<T>(context: CoreContext<T>, component: Type<{ readonly provided: Signal<T> }>): Provider {\n return { provide: coreContextToken(context), useFactory: () => inject(component).provided };\n}\n\nexport interface UseCoreOptions<I, P> {\n readonly inputs: () => I;\n /** Prefix of the deterministic id, e.g. `bs-navbar`. */\n readonly idPrefix: string;\n /** The outputs by name; `api.emit` calls their `emit`. */\n readonly outputs?: Readonly<Record<string, { emit(detail: never): void }>>;\n /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */\n readonly hostBag?: (props: P) => CoreBag | null | undefined;\n /** Two-way inputs (`model()`), by name; written back when the core changes the state of the same name. */\n readonly models?: Readonly<Record<string, { set(value: never): void }>>;\n}\n\nexport interface CoreHandle<P, PC> {\n /** The template's props. */\n readonly props: Signal<P>;\n /** The value this component provides to its content. */\n readonly provided: Signal<PC>;\n /** Runs a core method; does nothing before the first client render. */\n call(name: string, args: unknown[]): unknown;\n}\n\n/**\n * Host a `ComponentCore` in a generated Angular component (PRD #437 D10).\n * Call it in a field initializer. The template's root is the host element\n * where `hostBag` is given, else the host's first element child.\n */\nexport function useCore<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: UseCoreOptions<I, P>): CoreHandle<P, PC> {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;\n const id = inject(BsIdService).next(options.idPrefix);\n // Read once: a host attribute is static content, and Angular does not observe it.\n const label = element.getAttribute('aria-label');\n const hydrated = signal(false);\n // The state is seeded at its first read, in the first change detection: the\n // template's bindings have set the inputs by then. In the constructor they\n // have not, and the server would render a bound model input's default.\n const written = signal<S | null>(null);\n const server = isPlatformServer(inject(PLATFORM_ID));\n const transfer = core.transferKey ? inject(TransferState) : null;\n /** Server only: starts the prefetch with the first inputs that name one (a `transferKey`), however late they arrive. */\n let prefetchOnce: ((inputs: I) => void) | null = null;\n /** Client only: the transferred seed is still unread, because no inputs have named its key yet. */\n let transferArmed = !server && !!transfer;\n let seeded: S | null = null;\n const seed = (): S => {\n if (seeded) return seeded;\n const inputs = untracked(options.inputs);\n // The baseline the state was seeded from: inputs that change before attaching\n // (a form control writing its value) reach inputsChanged on attach.\n runtime.inputs(inputs);\n return (seeded = core.state ? core.state(inputs, server ? undefined : takeTransferred(inputs)) : ({} as S));\n };\n /**\n * The server's prefetched seed for these inputs, read once: a later instance with the same query fetches fresh (#448).\n * Inputs without a key (a `fetch` the consumer sets after an async step) leave it armed for the next delivery.\n */\n const takeTransferred = (inputs: I): unknown => {\n const key = transferArmed && transfer ? core.transferKey?.(inputs) : undefined;\n if (!transfer || !key) return undefined;\n transferArmed = false;\n const stateKey = makeStateKey<unknown>(key);\n if (!transfer.hasKey(stateKey)) return undefined;\n const value = transfer.get(stateKey, undefined);\n transfer.remove(stateKey);\n return value;\n };\n if (server && transfer && core.prefetch) {\n // Outside the state computed, which must not write signals: the first change\n // detection seeds the loading snapshot, this replaces it before serialization.\n const pendingTasks = inject(PendingTasks);\n const ssr = inject(MACHINE_SSR_OPTIONS);\n const abort = new AbortController();\n inject(DestroyRef).onDestroy(() => abort.abort());\n prefetchOnce = (inputs) => {\n void pendingTasks.run(async () => {\n const result = await runPrefetch(core, inputs, { timeout: ssr.prefetchTimeout, signal: abort.signal });\n if (!result || abort.signal.aborted) return;\n transfer.set(makeStateKey<unknown>(result.key), result.seed);\n written.set(core.state!(inputs, result.seed));\n });\n };\n }\n const state = computed(() => written() ?? seed());\n\n const args = computed<ViewArgs<I, S, C, E>>(() => ({\n inputs: options.inputs(),\n state: state(),\n id,\n hydrated: hydrated(),\n context: (consumed ? consumed() : core.consume?.defaultValue) as C,\n label,\n api: () => runtime.api,\n }));\n const props = computed(() => core.view(args()));\n const provided = computed(() => core.provide?.(args()) as PC);\n\n const hostBag = options.hostBag ?? core.host?.bind(core);\n if (hostBag) useHostProps(() => hostBag(props()));\n\n const runtime = coreRuntime(core, {\n inputs: () => untracked(options.inputs),\n state: () => untracked(state),\n setState: (next) => written.set(next),\n emit: (name, detail) => options.outputs?.[name]?.emit(detail as never),\n models: Object.keys(options.models ?? {}) as never,\n writeModel: (name, value) => options.models?.[name]?.set(value as never),\n });\n afterNextRender(() => {\n hydrated.set(true);\n const root = options.hostBag ? element : (element.firstElementChild as HTMLElement | null);\n if (root) runtime.attachTo(root);\n });\n effect(() => {\n const inputs = options.inputs();\n untracked(() => {\n // A seed whose key the first inputs did not name: applied before the inputs reach the core,\n // so its inputsChanged sees the seeded page as the answer rather than reloading it.\n if (transferArmed && core.adopt) {\n const late = takeTransferred(inputs);\n if (late !== undefined) written.set(core.adopt(state(), inputs, late));\n }\n runtime.inputs(inputs);\n // Armed until the inputs name a prefetch: a `fetch` or `stateKey` can arrive after the first delivery.\n if (prefetchOnce && core.transferKey?.(inputs)) {\n const start = prefetchOnce;\n prefetchOnce = null;\n start(inputs);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => runtime.dispose());\n\n return { props, provided, call: (name, callArgs) => runtime.call(name, callArgs) };\n}\n","import { DestroyRef, Directive, effect, EmbeddedViewRef, inject, input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * Render an `<ng-template>` into another element, the compiled form of a view's\n * `<teleport :to>`. The twin of React's `createPortal`, Vue's `<Teleport>` and\n * Lit's `teleport()`. The view lives in this container, so change detection and\n * destruction follow the component, but its root nodes are moved into `to`, as\n * CDK's DomPortalOutlet does. Nothing renders while `to` is null, which is the\n * server's case. A core hands a target whose identity never changes (the\n * dock's per-pane hosts), so the content's state survives wherever the core\n * moves that target.\n *\n * <ng-template [mpTeleport]=\"view.paneHosts[pane]\">...</ng-template>\n */\n@Directive({ selector: '[mpTeleport]' })\nexport class MpTeleportDirective {\n readonly mpTeleport = input<Element | null | undefined>(null);\n\n private readonly template = inject(TemplateRef);\n private readonly container = inject(ViewContainerRef);\n private view: EmbeddedViewRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const to = this.mpTeleport() ?? null;\n if (!to) {\n this.container.clear();\n this.view = null;\n return;\n }\n this.view ??= this.container.createEmbeddedView(this.template);\n // The view's nodes render in place first; detectChanges fills them before they move.\n this.view.detectChanges();\n this.view.rootNodes.filter((node: Node) => node.parentNode !== to).forEach((node: Node) => to.appendChild(node));\n });\n inject(DestroyRef).onDestroy(() => this.container.clear());\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Marks core-produced markup as trusted for `[innerHTML]`: the compiled form of\n * a view's `v-html`. The view contract is that `v-html` only ever carries markup\n * the core produced (flag and file-type SVGs, highlighted code rows), which the\n * React, Vue and Lit fronts insert as-is. Angular's sanitiser would instead drop\n * every `<svg>` — an empty flag, an icon-less file manager — so the Angular front\n * trusts it the same way.\n *\n * <span [innerHTML]=\"view.flagHtml | mpTrustedHtml\"></span>\n */\n@Pipe({ name: 'mpTrustedHtml' })\nexport class MpTrustedHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n transform(html: string | null | undefined): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html ?? '');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ;8EAAC;AACvC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtE,IAAA,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,IAAA,OAAO,KAAK,CAAC,UAAU,EAAE;AAC3B;;ACZA;;;;AAIG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,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CAAA;kBAD7B,IAAI;mBAAC,EAAE,IAAI,EAAE,eAAe,EAAE;;;ACb/B;;AAEG;;;;"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, signal, Injectable, inject, Injector, ChangeDetectionStrategy, Component, ApplicationRef, model, input, effect, TemplateRef, Directive, ElementRef, afterNextRender } from '@angular/core';
|
|
3
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';
|
|
5
|
+
import { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';
|
|
3
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
7
|
import { FadeInOutAnimation, EnterFromTopAnimation } from '@mintplayer/ng-animations';
|
|
5
8
|
import { BsOverlayFocusDirective, BsOverlayStackService, BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
@@ -37,14 +40,16 @@ class BsModalComponent {
|
|
|
37
40
|
...(ngDevMode ? [{ debugName: "scrollable" }] : /* istanbul ignore next */ []));
|
|
38
41
|
this.context = inject(BsModalContextService);
|
|
39
42
|
this.injector = inject(Injector);
|
|
43
|
+
// #452: the modal and transitions partials ship with this component, scoped to the elements it stamps (data-mps="modal").
|
|
44
|
+
useBootstrap(bootstrapModal, bootstrapTransitions);
|
|
40
45
|
}
|
|
41
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsModalComponent, isStandalone: true, selector: "bs-modal-content", providers: [BsModalContextService], ngImport: i0, template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: ["
|
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsModalComponent, isStandalone: true, selector: "bs-modal-content", providers: [BsModalContextService], ngImport: i0, template: "@if (isOpen()) {\n <div data-mps=\"modal\" class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div data-mps=\"modal\" class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div data-mps=\"modal\" class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div data-mps=\"modal\" [@fadeInOut]>\n <div data-mps=\"modal\" class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: [".modal-dialog-scrollable .modal-content>::ng-deep *{display:contents}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsOverlayFocusDirective, selector: "[bsOverlayFocus]", inputs: ["bsOverlayFocus", "initialFocus", "returnFocus"], exportAs: ["bsOverlayFocus"] }], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
43
48
|
}
|
|
44
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalComponent, decorators: [{
|
|
45
50
|
type: Component,
|
|
46
|
-
args: [{ selector: 'bs-modal-content', imports: [NgTemplateOutlet, BsOverlayFocusDirective], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: ChangeDetectionStrategy.OnPush, providers: [BsModalContextService], template: "@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: ["
|
|
47
|
-
}] });
|
|
51
|
+
args: [{ selector: 'bs-modal-content', imports: [NgTemplateOutlet, BsOverlayFocusDirective], animations: [FadeInOutAnimation, EnterFromTopAnimation], changeDetection: ChangeDetectionStrategy.OnPush, providers: [BsModalContextService], template: "@if (isOpen()) {\n <div data-mps=\"modal\" class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div data-mps=\"modal\" class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div data-mps=\"modal\" class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div data-mps=\"modal\" [@fadeInOut]>\n <div data-mps=\"modal\" class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\n </div>\n}\n", styles: [".modal-dialog-scrollable .modal-content>::ng-deep *{display:contents}\n"] }]
|
|
52
|
+
}], ctorParameters: () => [] });
|
|
48
53
|
|
|
49
54
|
const PORTAL_FACTORY = new InjectionToken('ModalPortalFactory');
|
|
50
55
|
|
|
@@ -176,6 +181,8 @@ class BsModalHeaderDirective {
|
|
|
176
181
|
this.el = inject(ElementRef);
|
|
177
182
|
this.ids = inject(BsIdService);
|
|
178
183
|
this.context = inject(BsModalContextService, { optional: true });
|
|
184
|
+
// #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps="modal").
|
|
185
|
+
useBootstrap(bootstrapModal);
|
|
179
186
|
// After first render, all sibling host bindings + static attrs on this element
|
|
180
187
|
// have applied. Read an existing id if the consumer set one, otherwise generate
|
|
181
188
|
// and assign — then publish it to the modal context for aria-labelledby.
|
|
@@ -189,13 +196,14 @@ class BsModalHeaderDirective {
|
|
|
189
196
|
});
|
|
190
197
|
}
|
|
191
198
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
192
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalHeaderDirective, isStandalone: true, selector: "[bsModalHeader]", host: { properties: { "class.modal-header": "true" } }, ngImport: i0 }); }
|
|
199
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalHeaderDirective, isStandalone: true, selector: "[bsModalHeader]", host: { properties: { "attr.data-mps": "\"modal\"", "class.modal-header": "true" } }, ngImport: i0 }); }
|
|
193
200
|
}
|
|
194
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalHeaderDirective, decorators: [{
|
|
195
202
|
type: Directive,
|
|
196
203
|
args: [{
|
|
197
204
|
selector: '[bsModalHeader]',
|
|
198
205
|
host: {
|
|
206
|
+
'[attr.data-mps]': '"modal"',
|
|
199
207
|
'[class.modal-header]': 'true',
|
|
200
208
|
},
|
|
201
209
|
}]
|
|
@@ -206,6 +214,8 @@ class BsModalBodyDirective {
|
|
|
206
214
|
this.el = inject(ElementRef);
|
|
207
215
|
this.ids = inject(BsIdService);
|
|
208
216
|
this.context = inject(BsModalContextService, { optional: true });
|
|
217
|
+
// #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps="modal").
|
|
218
|
+
useBootstrap(bootstrapModal);
|
|
209
219
|
afterNextRender(() => {
|
|
210
220
|
let id = this.el.nativeElement.id;
|
|
211
221
|
if (!id) {
|
|
@@ -216,31 +226,37 @@ class BsModalBodyDirective {
|
|
|
216
226
|
});
|
|
217
227
|
}
|
|
218
228
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
219
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalBodyDirective, isStandalone: true, selector: "[bsModalBody]", host: { properties: { "class.modal-body": "true" } }, ngImport: i0 }); }
|
|
229
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalBodyDirective, isStandalone: true, selector: "[bsModalBody]", host: { properties: { "attr.data-mps": "\"modal\"", "class.modal-body": "true" } }, ngImport: i0 }); }
|
|
220
230
|
}
|
|
221
231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalBodyDirective, decorators: [{
|
|
222
232
|
type: Directive,
|
|
223
233
|
args: [{
|
|
224
234
|
selector: '[bsModalBody]',
|
|
225
235
|
host: {
|
|
236
|
+
'[attr.data-mps]': '"modal"',
|
|
226
237
|
'[class.modal-body]': 'true',
|
|
227
238
|
},
|
|
228
239
|
}]
|
|
229
240
|
}], ctorParameters: () => [] });
|
|
230
241
|
|
|
231
242
|
class BsModalFooterDirective {
|
|
243
|
+
constructor() {
|
|
244
|
+
// #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps="modal").
|
|
245
|
+
useBootstrap(bootstrapModal);
|
|
246
|
+
}
|
|
232
247
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
233
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalFooterDirective, isStandalone: true, selector: "[bsModalFooter]", host: { properties: { "class.modal-footer": "true" } }, ngImport: i0 }); }
|
|
248
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsModalFooterDirective, isStandalone: true, selector: "[bsModalFooter]", host: { properties: { "attr.data-mps": "\"modal\"", "class.modal-footer": "true" } }, ngImport: i0 }); }
|
|
234
249
|
}
|
|
235
250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsModalFooterDirective, decorators: [{
|
|
236
251
|
type: Directive,
|
|
237
252
|
args: [{
|
|
238
253
|
selector: '[bsModalFooter]',
|
|
239
254
|
host: {
|
|
255
|
+
'[attr.data-mps]': '"modal"',
|
|
240
256
|
'[class.modal-footer]': 'true',
|
|
241
257
|
},
|
|
242
258
|
}]
|
|
243
|
-
}] });
|
|
259
|
+
}], ctorParameters: () => [] });
|
|
244
260
|
|
|
245
261
|
class BsModalCloseDirective {
|
|
246
262
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-modal.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/modal/src/providers/modal-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/services/modal-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal/modal.component.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal/modal.component.html","../../../../libs/mintplayer-ng-bootstrap/modal/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal-host/modal-host.component.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal-host/modal-host.component.html","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal/modal.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-header/modal-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-body/modal-body.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-footer/modal-footer.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-close/modal-close.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/mintplayer-ng-bootstrap-modal.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const MODAL_CONTENT = new InjectionToken<TemplateRef<any>>('ModalContent');","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsModalComponent (the dialog renderer)\n * and the bsModalHeader / bsModalBody directives applied to the user's template.\n * Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsModalContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { Component, inject, Injector, signal, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EnterFromTopAnimation, FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { MODAL_CONTENT } from '../../providers/modal-content.provider';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Component({\n selector: 'bs-modal-content',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n imports: [NgTemplateOutlet, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation, EnterFromTopAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsModalContextService],\n})\nexport class BsModalComponent {\n\n template = inject<TemplateRef<any>>(MODAL_CONTENT);\n isOpen = signal(false);\n scrollable = signal(false);\n\n context = inject(BsModalContextService);\n injector = inject(Injector);\n}\n","@if (isOpen()) {\n <div class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div [@fadeInOut]>\n <div class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\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>>('ModalPortalFactory');","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { AfterViewInit, ApplicationRef, Component, ComponentRef, effect, inject, Injector, input, model, OnDestroy, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { MODAL_CONTENT } from '../../providers/modal-content.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\nimport { BsModalComponent } from '../modal/modal.component';\n\n/** Time the modal's leave animation is given before its overlay is disposed. */\nexport const MODAL_LEAVE_MS = 500;\n\n@Component({\n selector: 'bs-modal',\n templateUrl: './modal-host.component.html',\n styleUrls: ['./modal-host.component.scss'],\n imports: [BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsModalComponent, null, injector);\n }\n }],\n host: {\n '(document:keydown)': 'onKeyDown($event)',\n },\n})\nexport class BsModalHostComponent implements AfterViewInit, OnDestroy {\n private overlay = inject(Overlay);\n private appRef = inject(ApplicationRef);\n private parentInjector = inject(Injector);\n private portalFactory = inject<(injector: Injector) => ComponentPortal<BsModalComponent>>(PORTAL_FACTORY);\n private overlayStack = inject(BsOverlayStackService);\n private stackToken: symbol | null = null;\n\n overlayRef!: OverlayRef;\n componentInstance?: ComponentRef<BsModalComponent>;\n template!: TemplateRef<any>;\n\n //#region isOpen\n readonly isOpen = model<boolean>(false);\n //#endregion\n readonly closeOnEscape = input(true);\n readonly scrollable = input(false);\n\n constructor() {\n effect(() => {\n const value = this.isOpen();\n if (this.componentInstance) {\n this.componentInstance.instance.isOpen.set(value);\n }\n\n if (value && this.stackToken === null) {\n this.stackToken = this.overlayStack.push();\n } else if (!value && this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n });\n\n effect(() => {\n const scrollable = this.scrollable();\n if (this.componentInstance) {\n this.componentInstance.instance.scrollable.set(scrollable);\n }\n });\n }\n\n ngAfterViewInit() {\n const injector = Injector.create({\n providers: [\n { provide: MODAL_CONTENT, useValue: this.template }\n ],\n parent: this.parentInjector\n });\n const portal = this.portalFactory(injector);\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .global().centerHorizontally().bottom('0').top('0').left('0').right('0'),\n width: '100%',\n hasBackdrop: false\n });\n this.componentInstance = this.overlayRef.attach<BsModalComponent>(portal);\n this.componentInstance.instance.isOpen.set(this.isOpen());\n this.componentInstance.instance.scrollable.set(this.scrollable());\n }\n\n /**\n * Plays the modal's leave animation, then disposes the overlay. The close is written to the\n * modal directly: this host's sync effect is destroyed with it and would never deliver it.\n * If the application is torn down first, the pending dispose is cancelled and runs at once.\n */\n ngOnDestroy() {\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n if (!this.overlayRef) return;\n const overlayRef = this.overlayRef;\n this.componentInstance?.instance.isOpen.set(false);\n const dispose = () => {\n clearTimeout(timer);\n unregister();\n overlayRef.dispose();\n };\n const timer = setTimeout(dispose, MODAL_LEAVE_MS);\n const unregister = this.appRef.onDestroy(dispose);\n }\n\n onKeyDown(event: Event) {\n const ev = event as KeyboardEvent;\n if (this.isOpen() && this.closeOnEscape() && ev.code === 'Escape') {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.isOpen.set(false);\n }\n }\n }\n}","<bs-has-overlay></bs-has-overlay>","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsModalHostComponent } from '../../components/modal-host/modal-host.component';\n\n@Directive({\n selector: '[bsModal]',\n})\nexport class BsModalDirective {\n\n constructor() {\n const template = inject(TemplateRef);\n const host = inject(BsModalHostComponent);\n host.template = template;\n }\n\n}\n","import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Directive({\n selector: '[bsModalHeader]',\n host: {\n '[class.modal-header]': 'true',\n },\n})\nexport class BsModalHeaderDirective {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsModalContextService, { optional: true });\n\n constructor() {\n // After first render, all sibling host bindings + static attrs on this element\n // have applied. Read an existing id if the consumer set one, otherwise generate\n // and assign — then publish it to the modal context for aria-labelledby.\n afterNextRender(() => {\n let id = this.el.nativeElement.id;\n if (!id) {\n id = this.ids.next('bs-modal-header');\n this.el.nativeElement.id = id;\n }\n this.context?.headerId.set(id);\n });\n }\n}\n","import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Directive({\n selector: '[bsModalBody]',\n host: {\n '[class.modal-body]': 'true',\n },\n})\nexport class BsModalBodyDirective {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsModalContextService, { optional: true });\n\n constructor() {\n afterNextRender(() => {\n let id = this.el.nativeElement.id;\n if (!id) {\n id = this.ids.next('bs-modal-body');\n this.el.nativeElement.id = id;\n }\n this.context?.bodyId.set(id);\n });\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[bsModalFooter]',\n host: {\n '[class.modal-footer]': 'true',\n },\n})\nexport class BsModalFooterDirective {\n}\n","import { Directive, inject } from '@angular/core';\nimport { BsModalHostComponent } from '../../components/modal-host/modal-host.component';\n\n@Directive({\n selector: '[bsModalClose]',\n host: {\n '[attr.aria-label]': '\"Close\"',\n '(click)': 'onClick()',\n },\n})\nexport class BsModalCloseDirective {\n private host = inject(BsModalHostComponent);\n\n onClick() {\n this.host.isOpen.set(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,aAAa,GAAG,IAAI,cAAc,CAAmB,cAAc,CAAC;;ACAjF;;;;AAIG;MAEU,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI;mFAAC;AAC9C,IAAA;8GAHY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArB,qBAAqB,EAAA,CAAA,CA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AAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-modal.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/modal/src/providers/modal-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/services/modal-context.service.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal/modal.component.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal/modal.component.html","../../../../libs/mintplayer-ng-bootstrap/modal/src/providers/portal-factory.provider.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal-host/modal-host.component.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/components/modal-host/modal-host.component.html","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal/modal.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-header/modal-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-body/modal-body.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-footer/modal-footer.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/src/directives/modal-close/modal-close.directive.ts","../../../../libs/mintplayer-ng-bootstrap/modal/mintplayer-ng-bootstrap-modal.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const MODAL_CONTENT = new InjectionToken<TemplateRef<any>>('ModalContent');","import { Injectable, signal } from '@angular/core';\n\n/**\n * Component-scoped state shared between BsModalComponent (the dialog renderer)\n * and the bsModalHeader / bsModalBody directives applied to the user's template.\n * Provides the ids for aria-labelledby and aria-describedby.\n */\n@Injectable()\nexport class BsModalContextService {\n readonly headerId = signal<string | null>(null);\n readonly bodyId = signal<string | null>(null);\n}\n","import { Component, inject, Injector, signal, TemplateRef, ChangeDetectionStrategy } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';\nimport { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { EnterFromTopAnimation, FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { BsOverlayFocusDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { MODAL_CONTENT } from '../../providers/modal-content.provider';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Component({\n selector: 'bs-modal-content',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n imports: [NgTemplateOutlet, BsOverlayFocusDirective],\n animations: [FadeInOutAnimation, EnterFromTopAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [BsModalContextService],\n})\nexport class BsModalComponent {\n constructor() {\n // #452: the modal and transitions partials ship with this component, scoped to the elements it stamps (data-mps=\"modal\").\n useBootstrap(bootstrapModal, bootstrapTransitions);\n }\n\n\n template = inject<TemplateRef<any>>(MODAL_CONTENT);\n isOpen = signal(false);\n scrollable = signal(false);\n\n context = inject(BsModalContextService);\n injector = inject(Injector);\n}\n","@if (isOpen()) {\n <div data-mps=\"modal\" class=\"modal d-block\"\n [@fadeInOut]\n [@enterFromTop]\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"context.headerId()\"\n [attr.aria-describedby]=\"context.bodyId()\"\n [bsOverlayFocus]=\"true\"\n tabindex=\"-1\">\n <div data-mps=\"modal\" class=\"modal-dialog\" [class.modal-dialog-scrollable]=\"scrollable()\">\n <div data-mps=\"modal\" class=\"modal-content\">\n <ng-container *ngTemplateOutlet=\"template; injector: injector\"></ng-container>\n </div>\n </div>\n </div>\n\n <div data-mps=\"modal\" [@fadeInOut]>\n <div data-mps=\"modal\" class=\"modal-backdrop fade\" [class.show]=\"isOpen()\" aria-hidden=\"true\"></div>\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>>('ModalPortalFactory');","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { AfterViewInit, ApplicationRef, Component, ComponentRef, effect, inject, Injector, input, model, OnDestroy, TemplateRef, ChangeDetectionStrategy} from '@angular/core';\nimport { BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { MODAL_CONTENT } from '../../providers/modal-content.provider';\nimport { PORTAL_FACTORY } from '../../providers/portal-factory.provider';\nimport { BsModalComponent } from '../modal/modal.component';\n\n/** Time the modal's leave animation is given before its overlay is disposed. */\nexport const MODAL_LEAVE_MS = 500;\n\n@Component({\n selector: 'bs-modal',\n templateUrl: './modal-host.component.html',\n styleUrls: ['./modal-host.component.scss'],\n imports: [BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: PORTAL_FACTORY,\n useValue: (injector: Injector) => {\n return new ComponentPortal(BsModalComponent, null, injector);\n }\n }],\n host: {\n '(document:keydown)': 'onKeyDown($event)',\n },\n})\nexport class BsModalHostComponent implements AfterViewInit, OnDestroy {\n private overlay = inject(Overlay);\n private appRef = inject(ApplicationRef);\n private parentInjector = inject(Injector);\n private portalFactory = inject<(injector: Injector) => ComponentPortal<BsModalComponent>>(PORTAL_FACTORY);\n private overlayStack = inject(BsOverlayStackService);\n private stackToken: symbol | null = null;\n\n overlayRef!: OverlayRef;\n componentInstance?: ComponentRef<BsModalComponent>;\n template!: TemplateRef<any>;\n\n //#region isOpen\n readonly isOpen = model<boolean>(false);\n //#endregion\n readonly closeOnEscape = input(true);\n readonly scrollable = input(false);\n\n constructor() {\n effect(() => {\n const value = this.isOpen();\n if (this.componentInstance) {\n this.componentInstance.instance.isOpen.set(value);\n }\n\n if (value && this.stackToken === null) {\n this.stackToken = this.overlayStack.push();\n } else if (!value && this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n });\n\n effect(() => {\n const scrollable = this.scrollable();\n if (this.componentInstance) {\n this.componentInstance.instance.scrollable.set(scrollable);\n }\n });\n }\n\n ngAfterViewInit() {\n const injector = Injector.create({\n providers: [\n { provide: MODAL_CONTENT, useValue: this.template }\n ],\n parent: this.parentInjector\n });\n const portal = this.portalFactory(injector);\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .global().centerHorizontally().bottom('0').top('0').left('0').right('0'),\n width: '100%',\n hasBackdrop: false\n });\n this.componentInstance = this.overlayRef.attach<BsModalComponent>(portal);\n this.componentInstance.instance.isOpen.set(this.isOpen());\n this.componentInstance.instance.scrollable.set(this.scrollable());\n }\n\n /**\n * Plays the modal's leave animation, then disposes the overlay. The close is written to the\n * modal directly: this host's sync effect is destroyed with it and would never deliver it.\n * If the application is torn down first, the pending dispose is cancelled and runs at once.\n */\n ngOnDestroy() {\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n if (!this.overlayRef) return;\n const overlayRef = this.overlayRef;\n this.componentInstance?.instance.isOpen.set(false);\n const dispose = () => {\n clearTimeout(timer);\n unregister();\n overlayRef.dispose();\n };\n const timer = setTimeout(dispose, MODAL_LEAVE_MS);\n const unregister = this.appRef.onDestroy(dispose);\n }\n\n onKeyDown(event: Event) {\n const ev = event as KeyboardEvent;\n if (this.isOpen() && this.closeOnEscape() && ev.code === 'Escape') {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.isOpen.set(false);\n }\n }\n }\n}","<bs-has-overlay></bs-has-overlay>","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsModalHostComponent } from '../../components/modal-host/modal-host.component';\n\n@Directive({\n selector: '[bsModal]',\n})\nexport class BsModalDirective {\n\n constructor() {\n const template = inject(TemplateRef);\n const host = inject(BsModalHostComponent);\n host.template = template;\n }\n\n}\n","import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Directive({\n selector: '[bsModalHeader]',\n host: {\n '[attr.data-mps]': '\"modal\"',\n '[class.modal-header]': 'true',\n },\n})\nexport class BsModalHeaderDirective {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsModalContextService, { optional: true });\n\n constructor() {\n // #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps=\"modal\").\n useBootstrap(bootstrapModal);\n // After first render, all sibling host bindings + static attrs on this element\n // have applied. Read an existing id if the consumer set one, otherwise generate\n // and assign — then publish it to the modal context for aria-labelledby.\n afterNextRender(() => {\n let id = this.el.nativeElement.id;\n if (!id) {\n id = this.ids.next('bs-modal-header');\n this.el.nativeElement.id = id;\n }\n this.context?.headerId.set(id);\n });\n }\n}\n","import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsModalContextService } from '../../services/modal-context.service';\n\n@Directive({\n selector: '[bsModalBody]',\n host: {\n '[attr.data-mps]': '\"modal\"',\n '[class.modal-body]': 'true',\n },\n})\nexport class BsModalBodyDirective {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n private context = inject(BsModalContextService, { optional: true });\n\n constructor() {\n // #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps=\"modal\").\n useBootstrap(bootstrapModal);\n afterNextRender(() => {\n let id = this.el.nativeElement.id;\n if (!id) {\n id = this.ids.next('bs-modal-body');\n this.el.nativeElement.id = id;\n }\n this.context?.bodyId.set(id);\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapModal } from '@mintplayer/ui-core/bootstrap/modal';\n\n@Directive({\n selector: '[bsModalFooter]',\n host: {\n '[attr.data-mps]': '\"modal\"',\n '[class.modal-footer]': 'true',\n },\n})\nexport class BsModalFooterDirective {\n constructor() {\n // #452: the modal partial ships with this component, scoped to the elements it stamps (data-mps=\"modal\").\n useBootstrap(bootstrapModal);\n }\n\n}\n","import { Directive, inject } from '@angular/core';\nimport { BsModalHostComponent } from '../../components/modal-host/modal-host.component';\n\n@Directive({\n selector: '[bsModalClose]',\n host: {\n '[attr.aria-label]': '\"Close\"',\n '(click)': 'onClick()',\n },\n})\nexport class BsModalCloseDirective {\n private host = inject(BsModalHostComponent);\n\n onClick() {\n this.host.isOpen.set(false);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAEO,MAAM,aAAa,GAAG,IAAI,cAAc,CAAmB,cAAc,CAAC;;ACAjF;;;;AAIG;MAEU,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;QAEW,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI;qFAAC;QACtC,IAAA,CAAA,MAAM,G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,UAAA,EAAA,CAAA;kBAPlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,SAAS;AAC5B,wBAAA,sBAAsB,EAAE,MAAM;AAC/B,qBAAA;AACF,iBAAA;;;MCAY,qBAAqB,CAAA;AAPlC,IAAA,WAAA,GAAA;AAQU,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAK5C,IAAA;IAHC,OAAO,GAAA;QACL,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IAC7B;8GALW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, booleanAttribute, ChangeDetectionStrategy, Component, Renderer2, Directive } from '@angular/core';
|
|
3
|
+
import { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { navCore, navScopedStyles, navItemCore, NAV_LINK_CLASS } from '@mintplayer/ui-core/nav';
|
|
5
|
+
import { bootstrapNav } from '@mintplayer/ui-core/bootstrap/nav';
|
|
6
|
+
|
|
7
|
+
// GENERATED from the nav manifest (nav) by @mintplayer/nx-component-compiler. Do not edit.
|
|
8
|
+
/**
|
|
9
|
+
* Bootstrap's nav: a list of `bs-nav-item`s, plain or as tabs, pills or underline (#452).
|
|
10
|
+
*
|
|
11
|
+
* It ships the nav part, so a page that renders one needs no install of its own.
|
|
12
|
+
*/
|
|
13
|
+
class BsNavComponent {
|
|
14
|
+
#core;
|
|
15
|
+
constructor() {
|
|
16
|
+
/** The host element. */
|
|
17
|
+
this.elementRef = inject(ElementRef);
|
|
18
|
+
this.variant = input(null, /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.fill = input(false, { ...(ngDevMode ? { debugName: "fill" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
21
|
+
this.justified = input(false, { ...(ngDevMode ? { debugName: "justified" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22
|
+
this.cardHeader = input(false, { ...(ngDevMode ? { debugName: "cardHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
23
|
+
this.#core = useCore(navCore, { inputs: () => ({ variant: this.variant(), fill: this.fill(), justified: this.justified(), cardHeader: this.cardHeader() }), idPrefix: 'bs-nav', hostBag: (props) => ({ ...props.root, 'data-mps': 'nav', role: 'list' }) });
|
|
24
|
+
/** The template's props. */
|
|
25
|
+
this.props = this.#core.props;
|
|
26
|
+
useScopedStyles(bootstrapNav.key, bootstrapNav.css, { order: bootstrapNav.order });
|
|
27
|
+
useScopedStyles('nav', navScopedStyles);
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavComponent, isStandalone: true, selector: "bs-nav", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, justified: { classPropertyName: "justified", publicName: "justified", isSignal: true, isRequired: false, transformFunction: null }, cardHeader: { classPropertyName: "cardHeader", publicName: "cardHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'bs-nav', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
|
|
35
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], justified: [{ type: i0.Input, args: [{ isSignal: true, alias: "justified", required: false }] }], cardHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardHeader", required: false }] }] } });
|
|
36
|
+
|
|
37
|
+
// GENERATED from the nav manifest (nav-item) by @mintplayer/nx-component-compiler. Do not edit.
|
|
38
|
+
/** One nav entry around a consumer link, which becomes its `.nav-link`; `class="active"` marks the current one. */
|
|
39
|
+
class BsNavItemComponent {
|
|
40
|
+
#core;
|
|
41
|
+
constructor() {
|
|
42
|
+
/** The host element. */
|
|
43
|
+
this.elementRef = inject(ElementRef);
|
|
44
|
+
this.#core = useCore(navItemCore, { inputs: () => ({}), idPrefix: 'bs-nav-item', hostBag: (props) => ({ ...props.root, 'data-mps': 'nav', role: 'listitem' }) });
|
|
45
|
+
/** The template's props. */
|
|
46
|
+
this.props = this.#core.props;
|
|
47
|
+
useScopedStyles(bootstrapNav.key, bootstrapNav.css, { order: bootstrapNav.order });
|
|
48
|
+
useScopedStyles('nav', navScopedStyles);
|
|
49
|
+
}
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: BsNavItemComponent, isStandalone: true, selector: "bs-nav-item", ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavItemComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'bs-nav-item', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
|
|
56
|
+
}], ctorParameters: () => [] });
|
|
57
|
+
|
|
58
|
+
// GENERATED from the nav manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Makes a `bs-nav-item`'s link a `.nav-link` of the nav scope, so the nav part
|
|
62
|
+
* (`.nav-link:where([data-mps])`) styles it: the consumer writes a plain
|
|
63
|
+
* `<a routerLink>`. It runs in the constructor, so the server HTML carries both.
|
|
64
|
+
*
|
|
65
|
+
* Angular selectors cannot say `bs-nav-item > a` (a combinator parses as `a`),
|
|
66
|
+
* so it matches every anchor and button of a template that imports it and
|
|
67
|
+
* acts only inside a nav item.
|
|
68
|
+
*/
|
|
69
|
+
class BsNavLinkDirective {
|
|
70
|
+
constructor() {
|
|
71
|
+
if (!inject(BsNavItemComponent, { optional: true }))
|
|
72
|
+
return;
|
|
73
|
+
const link = inject(ElementRef).nativeElement;
|
|
74
|
+
const renderer = inject(Renderer2);
|
|
75
|
+
renderer.addClass(link, NAV_LINK_CLASS);
|
|
76
|
+
renderer.setAttribute(link, 'data-mps', 'nav');
|
|
77
|
+
}
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
79
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsNavLinkDirective, isStandalone: true, selector: "a, button", ngImport: i0 }); }
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavLinkDirective, decorators: [{
|
|
82
|
+
type: Directive,
|
|
83
|
+
args: [{ selector: 'a, button' }]
|
|
84
|
+
}], ctorParameters: () => [] });
|
|
85
|
+
|
|
86
|
+
// The nav components are generated from @mintplayer/ui-core/nav (PRD #437 D10).
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generated bundle index. Do not edit.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
export { BsNavComponent, BsNavItemComponent, BsNavLinkDirective };
|
|
93
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-nav.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-nav.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/nav/src/generated/nav.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/nav/src/generated/nav.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/nav/src/generated/nav-item.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/nav/src/generated/nav-item.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/nav/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/nav/src/nav-link.directive.ts","../../../../libs/mintplayer-ng-bootstrap/nav/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/nav/mintplayer-ng-bootstrap-nav.ts"],"sourcesContent":["// GENERATED from the nav manifest (nav) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input } from '@angular/core';\nimport { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { navCore, type NavInputs, navScopedStyles } from '@mintplayer/ui-core/nav';\nimport { bootstrapNav } from '@mintplayer/ui-core/bootstrap/nav';\n\n/**\n * Bootstrap's nav: a list of `bs-nav-item`s, plain or as tabs, pills or underline (#452).\n *\n * It ships the nav part, so a page that renders one needs no install of its own.\n */\n@Component({\n selector: 'bs-nav',\n templateUrl: './nav.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsNavComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly variant = input<NavInputs['variant']>(null);\n readonly fill = input<NavInputs['fill'], unknown>(false, { transform: booleanAttribute });\n readonly justified = input<NavInputs['justified'], unknown>(false, { transform: booleanAttribute });\n readonly cardHeader = input<NavInputs['cardHeader'], unknown>(false, { transform: booleanAttribute });\n\n readonly #core = useCore(navCore, { inputs: () => ({ variant: this.variant(), fill: this.fill(), justified: this.justified(), cardHeader: this.cardHeader() }), idPrefix: 'bs-nav', hostBag: (props) => ({ ...props.root, 'data-mps': 'nav', role: 'list' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapNav.key, bootstrapNav.css, { order: bootstrapNav.order }); useScopedStyles('nav', navScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the nav manifest (nav-item) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, inject } from '@angular/core';\nimport { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { navItemCore, navScopedStyles } from '@mintplayer/ui-core/nav';\nimport { bootstrapNav } from '@mintplayer/ui-core/bootstrap/nav';\n\n/** One nav entry around a consumer link, which becomes its `.nav-link`; `class=\"active\"` marks the current one. */\n@Component({\n selector: 'bs-nav-item',\n templateUrl: './nav-item.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsNavItemComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly #core = useCore(navItemCore, { inputs: () => ({ }), idPrefix: 'bs-nav-item', hostBag: (props) => ({ ...props.root, 'data-mps': 'nav', role: 'listitem' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapNav.key, bootstrapNav.css, { order: bootstrapNav.order }); useScopedStyles('nav', navScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/nav/src/templates/nav-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the nav manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsNavComponent } from './nav.component.generated';\nexport { BsNavItemComponent } from './nav-item.component.generated';\n","import { Directive, ElementRef, Renderer2, inject } from '@angular/core';\nimport { NAV_LINK_CLASS } from '@mintplayer/ui-core/nav';\nimport { BsNavItemComponent } from './generated';\n\n/**\n * Makes a `bs-nav-item`'s link a `.nav-link` of the nav scope, so the nav part\n * (`.nav-link:where([data-mps])`) styles it: the consumer writes a plain\n * `<a routerLink>`. It runs in the constructor, so the server HTML carries both.\n *\n * Angular selectors cannot say `bs-nav-item > a` (a combinator parses as `a`),\n * so it matches every anchor and button of a template that imports it and\n * acts only inside a nav item.\n */\n@Directive({ selector: 'a, button' })\nexport class BsNavLinkDirective {\n constructor() {\n if (!inject(BsNavItemComponent, { optional: true })) return;\n const link = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const renderer = inject(Renderer2);\n renderer.addClass(link, NAV_LINK_CLASS);\n renderer.setAttribute(link, 'data-mps', 'nav');\n }\n}\n","// The nav components are generated from @mintplayer/ui-core/nav (PRD #437 D10).\nexport * from './generated';\nexport * from './nav-link.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAMA;;;;AAIG;MAOU,cAAc,CAAA;AAShB,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AAXS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;QAExD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAuB,IAAI;oFAAC;QAC3C,IAAA,CAAA,IAAI,GAAG,KAAK,CAA6B,KAAK,4EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAChF,IAAA,CAAA,SAAS,GAAG,KAAK,CAAkC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAC1F,IAAA,CAAA,UAAU,GAAG,KAAK,CAAmC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE5F,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAA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AAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;QACvC,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC;IAChD;8GAPW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;mBAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;ACbpC;;ACAA;;AAEG;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { model, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { bootstrapNavbar } from '@mintplayer/ui-core/bootstrap/navbar';
|
|
3
5
|
|
|
4
6
|
class BsNavbarTogglerComponent {
|
|
5
7
|
constructor() {
|
|
@@ -11,6 +13,8 @@ class BsNavbarTogglerComponent {
|
|
|
11
13
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
12
14
|
this.controls = input(null, /* @ts-ignore */
|
|
13
15
|
...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
16
|
+
// #452: the navbar partial ships with this component, scoped to the elements it stamps (data-mps="navbar").
|
|
17
|
+
useBootstrap(bootstrapNavbar);
|
|
14
18
|
}
|
|
15
19
|
toggleState() {
|
|
16
20
|
if (this.toggleOnClick()) {
|
|
@@ -18,12 +22,12 @@ class BsNavbarTogglerComponent {
|
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarTogglerComponent, isStandalone: true, selector: "bs-navbar-toggler", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, toggleOnClick: { classPropertyName: "toggleOnClick", publicName: "toggleOnClick", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { state: "stateChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"navbar-toggler float-start\"\n [class.open]=\"state()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"state()\"\n [attr.aria-controls]=\"controls()\"\n (click)=\"toggleState()\">\n <div></div>\n <div></div>\n <div></div>\n</button>\n", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none;background:transparent;cursor:pointer}.navbar-toggler>div{width:25px;height:2px;background:var(--bs-secondary-color);margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){-webkit-transform:rotate(-45deg) translate(-7px,5px);transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){-webkit-transform:rotate(45deg) translate(-6px,-4px);transform:rotate(45deg) translate(-6px,-4px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsNavbarTogglerComponent, isStandalone: true, selector: "bs-navbar-toggler", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, toggleOnClick: { classPropertyName: "toggleOnClick", publicName: "toggleOnClick", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { state: "stateChange" }, ngImport: i0, template: "<button data-mps=\"navbar\"\n type=\"button\"\n class=\"navbar-toggler float-start\"\n [class.open]=\"state()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"state()\"\n [attr.aria-controls]=\"controls()\"\n (click)=\"toggleState()\">\n <div data-mps=\"navbar\"></div>\n <div data-mps=\"navbar\"></div>\n <div data-mps=\"navbar\"></div>\n</button>\n", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none;background:transparent;cursor:pointer}.navbar-toggler>div{width:25px;height:2px;background:var(--bs-secondary-color);margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){-webkit-transform:rotate(-45deg) translate(-7px,5px);transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){-webkit-transform:rotate(45deg) translate(-6px,-4px);transform:rotate(45deg) translate(-6px,-4px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
22
26
|
}
|
|
23
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsNavbarTogglerComponent, decorators: [{
|
|
24
28
|
type: Component,
|
|
25
|
-
args: [{ selector: 'bs-navbar-toggler', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"navbar-toggler float-start\"\n [class.open]=\"state()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"state()\"\n [attr.aria-controls]=\"controls()\"\n (click)=\"toggleState()\">\n <div></div>\n <div></div>\n <div></div>\n</button>\n", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none;background:transparent;cursor:pointer}.navbar-toggler>div{width:25px;height:2px;background:var(--bs-secondary-color);margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){-webkit-transform:rotate(-45deg) translate(-7px,5px);transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){-webkit-transform:rotate(45deg) translate(-6px,-4px);transform:rotate(45deg) translate(-6px,-4px)}\n"] }]
|
|
26
|
-
}], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }, { type: i0.Output, args: ["stateChange"] }], toggleOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleOnClick", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }] } });
|
|
29
|
+
args: [{ selector: 'bs-navbar-toggler', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button data-mps=\"navbar\"\n type=\"button\"\n class=\"navbar-toggler float-start\"\n [class.open]=\"state()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"state()\"\n [attr.aria-controls]=\"controls()\"\n (click)=\"toggleState()\">\n <div data-mps=\"navbar\"></div>\n <div data-mps=\"navbar\"></div>\n <div data-mps=\"navbar\"></div>\n</button>\n", styles: [":host{align-self:start;top:0;right:0}.navbar-toggler{padding:.75rem 1rem;border:none;background:transparent;cursor:pointer}.navbar-toggler>div{width:25px;height:2px;background:var(--bs-secondary-color);margin:6px 0;transition:.4s}.navbar-toggler.open>div:nth-of-type(1){-webkit-transform:rotate(-45deg) translate(-7px,5px);transform:rotate(-45deg) translate(-7px,5px)}.navbar-toggler.open>div:nth-of-type(2){opacity:0}.navbar-toggler.open>div:nth-of-type(3){-webkit-transform:rotate(45deg) translate(-6px,-4px);transform:rotate(45deg) translate(-6px,-4px)}\n"] }]
|
|
30
|
+
}], ctorParameters: () => [], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }, { type: i0.Output, args: ["stateChange"] }], toggleOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleOnClick", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }] } });
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* Generated bundle index. Do not edit.
|