@mintplayer/ng-bootstrap 22.19.0 → 22.20.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/_bootstrap.scss +10 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +6 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +36 -56
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +10 -18
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +13 -24
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +6 -15
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +17 -6
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +47 -50
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +19 -55
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +21 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +19 -14
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +15 -12
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +16 -6
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +21 -4
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +26 -10
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -11
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +73 -67
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -16
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +11 -22
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +188 -249
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +64 -146
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +37 -30
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -25
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +150 -83
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +46 -44
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +63 -89
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +6 -14
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +25 -56
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +47 -58
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/package.json +2 -2
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +6 -6
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +9 -3
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +8 -10
- package/types/mintplayer-ng-bootstrap-copy.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +3 -4
- 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-menu.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -4
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +9 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +10 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +65 -31
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +27 -21
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +18 -2
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +2 -2
- package/types/mintplayer-ng-bootstrap-theming.d.ts +86 -54
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +27 -5
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +18 -17
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +3 -4
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +13 -4
|
@@ -1,81 +1,113 @@
|
|
|
1
|
+
import { BsThemeMode, BsEffectiveThemeMode, BsThemeConfig, BsThemeToggleMode } from '@mintplayer/web-components/theming';
|
|
2
|
+
export { BS_THEME_COOKIE_NAME, BS_THEME_DEFAULT_MODES, BS_THEME_DEFAULT_MODE_META, BsEffectiveThemeMode, BsThemeConfig, BsThemeMode, BsThemeToggleMode, ResolveServerThemeOptions, injectThemeAttribute, isValidThemeMode, readDefaultModeMeta, readThemeCookie, resolveMode, resolveServerTheme } from '@mintplayer/web-components/theming';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Signal } from '@angular/core';
|
|
4
|
+
import { Signal, EnvironmentProviders } from '@angular/core';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `'auto'` resolves at runtime via `matchMedia('(prefers-color-scheme: dark)')`.
|
|
8
|
-
* - `'light'` / `'dark'` map directly to Bootstrap's native `data-bs-theme` values.
|
|
9
|
-
* - Any other string (`(string & {})`) is accepted for custom variants — the consumer
|
|
10
|
-
* is expected to ship a matching `[data-bs-theme="…"] { … }` block in their styles.
|
|
11
|
-
* The `(string & {})` trick preserves autocomplete for the known literals while
|
|
12
|
-
* still admitting arbitrary strings without a cast.
|
|
13
|
-
*/
|
|
14
|
-
type BsThemeMode = 'auto' | 'light' | 'dark' | (string & {});
|
|
15
|
-
/**
|
|
16
|
-
* Mode after `'auto'` has been resolved. `'light'` / `'dark'` are the only values
|
|
17
|
-
* `prefers-color-scheme` ever produces; explicit custom variants pass through.
|
|
18
|
-
*/
|
|
19
|
-
type BsEffectiveThemeMode = 'light' | 'dark' | (string & {});
|
|
20
|
-
/**
|
|
21
|
-
* localStorage key used by `BsThemeService` AND the inline pre-boot `<script>`
|
|
22
|
-
* documented for SSR-safe no-flash integration. The two must stay in sync; the
|
|
23
|
-
* key value is duplicated in the script snippet because the script runs before
|
|
24
|
-
* any module loads. See `/additional-samples/theming` for the recipe.
|
|
25
|
-
*/
|
|
26
|
-
declare const BS_THEME_STORAGE_KEY = "bs-theme-mode";
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Owns the user's Bootstrap color-mode choice and keeps `<html data-bs-theme>`
|
|
30
|
-
* in sync with it.
|
|
7
|
+
* Angular's view of the document's Bootstrap colour mode (PRD dark-mode D4).
|
|
31
8
|
*
|
|
32
9
|
* - `mode` is the *authored* value (`'auto' | 'light' | 'dark' | custom`).
|
|
33
|
-
* - `effectiveMode` is the
|
|
34
|
-
* `
|
|
35
|
-
* - `setMode()`
|
|
10
|
+
* - `effectiveMode` is the value on `<html data-bs-theme>`: `'auto'` resolved
|
|
11
|
+
* against `prefers-color-scheme`, everything else passed through.
|
|
12
|
+
* - `setMode()` changes it. Both signals are read-only views.
|
|
36
13
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
14
|
+
* **This service is a pure mirror of the framework-neutral store.** In the
|
|
15
|
+
* browser it holds no state of its own: `mode`/`effectiveMode` are refreshed
|
|
16
|
+
* from `getBsThemeStore().subscribe()`, and `setMode()` forwards to the store's
|
|
17
|
+
* `setMode()` (libs/mintplayer-web-components/theming/src/store.ts), which owns
|
|
18
|
+
* validation, the `bs-theme-mode` cookie, the `data-bs-theme` write, the
|
|
19
|
+
* `prefers-color-scheme` listener and cross-tab sync. So a change made anywhere
|
|
20
|
+
* else (`<mp-theme-toggle>`, another tab, the OS) reaches these signals, and a
|
|
21
|
+
* copy here could never drift. Any behaviour added to the store's `setMode()`
|
|
22
|
+
* must be reflected here, and vice versa; the mirror tests in
|
|
23
|
+
* bs-theme.service.spec.ts pin it.
|
|
42
24
|
*
|
|
43
|
-
* SSR
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
25
|
+
* **Server:** Angular SSR creates a root injector per request, which is the one
|
|
26
|
+
* thing the store cannot do (it is a document singleton and never exists on a
|
|
27
|
+
* server). The service resolves the request's `bs-theme-mode` cookie against the
|
|
28
|
+
* page's `<meta name="bs-theme-default-mode">` with `resolveServerTheme()`,
|
|
29
|
+
* seeds the signals and, for an explicit mode, writes `data-bs-theme` on the
|
|
30
|
+
* server `<html>` synchronously in the constructor, so the first byte of HTML is
|
|
31
|
+
* already themed. Hydration never touches `<html>`, and the browser branch never
|
|
32
|
+
* writes anything itself, so the server's attribute survives client boot.
|
|
33
|
+
* `REQUEST` is `null` during prerender and route extraction: that is treated as
|
|
34
|
+
* "no cookie", and the pre-boot script themes those pages on the client.
|
|
47
35
|
*
|
|
48
36
|
* Usage:
|
|
49
37
|
* ```ts
|
|
50
38
|
* const theme = inject(BsThemeService);
|
|
51
39
|
* theme.setMode('dark'); // explicit
|
|
52
|
-
* theme.setMode('auto'); // follow
|
|
53
|
-
* theme.setMode('sepia'); // custom variant
|
|
54
|
-
* theme.mode(); //
|
|
55
|
-
* theme.effectiveMode(); //
|
|
40
|
+
* theme.setMode('auto'); // follow the OS
|
|
41
|
+
* theme.setMode('sepia'); // custom variant: ship a matching [data-bs-theme=sepia] block
|
|
42
|
+
* theme.mode(); // 'sepia'
|
|
43
|
+
* theme.effectiveMode(); // 'sepia' (auto would resolve to 'light' | 'dark')
|
|
56
44
|
* ```
|
|
57
45
|
*/
|
|
58
46
|
declare class BsThemeService {
|
|
59
47
|
private readonly platformId;
|
|
60
48
|
private readonly _mode;
|
|
61
|
-
private readonly
|
|
62
|
-
/** The mode the user picked. Use `setMode()` to change. */
|
|
49
|
+
private readonly _effectiveMode;
|
|
50
|
+
/** The mode the user picked. Use `setMode()` to change it. */
|
|
63
51
|
readonly mode: Signal<BsThemeMode>;
|
|
64
|
-
/**
|
|
65
|
-
* The mode that's actually applied. `'auto'` is resolved via
|
|
66
|
-
* `prefers-color-scheme`; everything else passes through unchanged.
|
|
67
|
-
*/
|
|
52
|
+
/** The mode applied to `<html data-bs-theme>`. */
|
|
68
53
|
readonly effectiveMode: Signal<BsEffectiveThemeMode>;
|
|
69
54
|
constructor();
|
|
70
55
|
/**
|
|
71
|
-
* Set the user's mode.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
56
|
+
* Set the user's mode. Forwards to the store's `setMode()`
|
|
57
|
+
* (libs/mintplayer-web-components/theming/src/store.ts): an invalid mode is a
|
|
58
|
+
* no-op with a warning, a valid one is persisted to the cookie and applied to
|
|
59
|
+
* `<html>`, and the signals update through the store subscription. Custom
|
|
60
|
+
* variants need a matching `[data-bs-theme="<value>"] { ... }` rule.
|
|
61
|
+
* A no-op on the server, where a mode comes only from the request cookie.
|
|
74
62
|
*/
|
|
75
63
|
setMode(mode: BsThemeMode): void;
|
|
76
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsThemeService, never>;
|
|
77
65
|
static ɵprov: i0.ɵɵInjectableDeclaration<BsThemeService>;
|
|
78
66
|
}
|
|
79
67
|
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Configure the document's theme store (PRD dark-mode D4). The only option is
|
|
70
|
+
* `cookieDomain`, passed through verbatim as the `bs-theme-mode` cookie's
|
|
71
|
+
* `Domain=`, so a theme picked on `www.example.com` also applies on
|
|
72
|
+
* `app.example.com`. The store is configured in the browser only; on a server
|
|
73
|
+
* there is no store to configure.
|
|
74
|
+
*
|
|
75
|
+
* It also constructs `BsThemeService` eagerly on every platform. That is what
|
|
76
|
+
* makes SSR render `<html data-bs-theme>` from the request cookie: the service
|
|
77
|
+
* does that in its constructor, and nothing else is guaranteed to inject it
|
|
78
|
+
* (`<bs-theme-toggle>` talks to the store directly).
|
|
79
|
+
*
|
|
80
|
+
* `defaultMode` is deliberately not an option. It is declared once, in the HTML
|
|
81
|
+
* (`<meta name="bs-theme-default-mode" content="dark">`), because the pre-boot
|
|
82
|
+
* script has to read it before Angular loads.
|
|
83
|
+
*
|
|
84
|
+
* ```ts
|
|
85
|
+
* bootstrapApplication(App, {
|
|
86
|
+
* providers: [provideBsTheme({ cookieDomain: '.example.com' })],
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
declare function provideBsTheme(config?: BsThemeConfig): EnvironmentProviders;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Angular wrapper around `<mp-theme-toggle>` (PRD dark-mode D7): a button that
|
|
94
|
+
* cycles the document's colour mode. The element talks to the theme store
|
|
95
|
+
* directly, so `BsThemeService` signals follow every click with no wiring here.
|
|
96
|
+
*
|
|
97
|
+
* `modes` is the cycle, in order (default `BS_THEME_DEFAULT_MODES`). Localize it
|
|
98
|
+
* by mapping over the default and overriding `label` / `announcement`.
|
|
99
|
+
*
|
|
100
|
+
* A consumer's `aria-*`, `role`, `id` and `tabindex` on `<bs-theme-toggle>`
|
|
101
|
+
* reach the `<mp-theme-toggle>` element through `bsForwardAria`.
|
|
102
|
+
*
|
|
103
|
+
* no-JS: none (control requires script).
|
|
104
|
+
*/
|
|
105
|
+
declare class BsThemeToggleComponent {
|
|
106
|
+
readonly modes: i0.InputSignal<readonly BsThemeToggleMode[]>;
|
|
107
|
+
private readonly toggleRef;
|
|
108
|
+
constructor();
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsThemeToggleComponent, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsThemeToggleComponent, "bs-theme-toggle", never, { "modes": { "alias": "modes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { BsThemeService, BsThemeToggleComponent, provideBsTheme };
|
|
@@ -10,9 +10,11 @@ import { MpTimeline } from '@mintplayer/web-components/timeline';
|
|
|
10
10
|
* `*bsTimelineContent="let item"` binds the item; named context vars expose the
|
|
11
11
|
* resolved layout state.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
interface BsTimelineItemContext {
|
|
14
14
|
$implicit: TimelineItem;
|
|
15
|
+
/** Position in the items array. */
|
|
15
16
|
index: number;
|
|
17
|
+
/** Position in the rendered order (differs from index under reverse). */
|
|
16
18
|
visualIndex: number;
|
|
17
19
|
isFirst: boolean;
|
|
18
20
|
isLast: boolean;
|
|
@@ -20,7 +22,7 @@ declare class BsTimelineItemContext {
|
|
|
20
22
|
side: TimelineSide;
|
|
21
23
|
}
|
|
22
24
|
/** Context for the connector template (the segment trailing this item). */
|
|
23
|
-
|
|
25
|
+
interface BsTimelineConnectorContext {
|
|
24
26
|
/** The item the connector trails. */
|
|
25
27
|
$implicit: TimelineItem;
|
|
26
28
|
/** The next item (undefined for the last). */
|
|
@@ -85,6 +87,12 @@ declare class BsTimelineComponent {
|
|
|
85
87
|
readonly align: _angular_core.InputSignal<TimelineAlign>;
|
|
86
88
|
readonly reverse: _angular_core.InputSignal<boolean>;
|
|
87
89
|
readonly selectable: _angular_core.InputSignal<TimelineSelectable>;
|
|
90
|
+
/**
|
|
91
|
+
* Make the rows keyboard-operable without selection: they become buttons
|
|
92
|
+
* with a roving tab stop, and Enter/Space emit `(itemClick)`. Set this when
|
|
93
|
+
* `(itemClick)` is used without `selectable`, or the click is pointer-only.
|
|
94
|
+
*/
|
|
95
|
+
readonly activatable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
88
96
|
/** Two-way bound array of selected items (identity via `id`). */
|
|
89
97
|
readonly selection: _angular_core.ModelSignal<TimelineItem[]>;
|
|
90
98
|
/** Emitted when a non-disabled item is activated. */
|
|
@@ -97,16 +105,30 @@ declare class BsTimelineComponent {
|
|
|
97
105
|
protected readonly oppositeTpl: _angular_core.Signal<BsTimelineOppositeDirective | undefined>;
|
|
98
106
|
protected readonly connectorTpl: _angular_core.Signal<BsTimelineConnectorDirective | undefined>;
|
|
99
107
|
protected readonly sides: _angular_core.Signal<_mintplayer_web_components_timeline_core.TimelineSide[]>;
|
|
108
|
+
/**
|
|
109
|
+
* The selection most recently reported BY the element. Writing it back would
|
|
110
|
+
* be an echo at best, and at worst lossy: a declarative id-less item has no
|
|
111
|
+
* key the wrapper could send.
|
|
112
|
+
*/
|
|
113
|
+
private selectionFromElement;
|
|
100
114
|
constructor();
|
|
101
|
-
|
|
115
|
+
/**
|
|
116
|
+
* The key the WC gives an item. The items are lowered to attributes, and an
|
|
117
|
+
* attribute is always a string, so a numeric id is keyed as its string form;
|
|
118
|
+
* an id-less item is keyed by its position.
|
|
119
|
+
*/
|
|
120
|
+
private keyFor;
|
|
102
121
|
protected idAttr(item: TimelineItem): string | number | null;
|
|
103
122
|
protected timeAttr(item: TimelineItem): string | null;
|
|
104
123
|
protected ctx(item: TimelineItem, index: number): BsTimelineItemContext;
|
|
105
124
|
protected connectorCtx(item: TimelineItem, index: number): BsTimelineConnectorContext;
|
|
106
125
|
protected onItemClick(event: Event): void;
|
|
107
126
|
protected onSelectionChange(event: Event): void;
|
|
127
|
+
/** Maps the element's selected keys back onto the consumer's own items. */
|
|
128
|
+
private boundItems;
|
|
108
129
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTimelineComponent, never>;
|
|
109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTimelineComponent, "bs-timeline", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "itemClick": "itemClick"; }, ["markerTpl", "titleTpl", "timestampTpl", "contentTpl", "oppositeTpl", "connectorTpl"], ["*"], true, never>;
|
|
130
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTimelineComponent, "bs-timeline", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "activatable": { "alias": "activatable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "itemClick": "itemClick"; }, ["markerTpl", "titleTpl", "timestampTpl", "contentTpl", "oppositeTpl", "connectorTpl"], ["*"], true, never>;
|
|
110
131
|
}
|
|
111
132
|
|
|
112
|
-
export { BsTimelineComponent,
|
|
133
|
+
export { BsTimelineComponent, BsTimelineConnectorDirective, BsTimelineContentDirective, BsTimelineMarkerDirective, BsTimelineOppositeDirective, BsTimelineTimestampDirective, BsTimelineTitleDirective };
|
|
134
|
+
export type { BsTimelineConnectorContext, BsTimelineItemContext };
|
|
@@ -17,7 +17,7 @@ declare class BsTimepickerComponent implements AfterViewInit, ControlValueAccess
|
|
|
17
17
|
disabled: _angular_core.InputSignal<boolean>;
|
|
18
18
|
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
19
19
|
protected readonly effectiveDisabled: _angular_core.WritableSignal<boolean>;
|
|
20
|
-
readonly wcRef: _angular_core.Signal<ElementRef<MpTimepickerElement
|
|
20
|
+
readonly wcRef: _angular_core.Signal<ElementRef<MpTimepickerElement>>;
|
|
21
21
|
private onChange;
|
|
22
22
|
private onTouched;
|
|
23
23
|
private onValidatorChange;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, TemplateRef, Injector, ElementRef } from '@angular/core';
|
|
3
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
4
2
|
import { Position } from '@mintplayer/ng-bootstrap';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
|
|
12
|
-
private
|
|
4
|
+
/** How long the pointer may travel from the trigger into the tooltip before it hides. */
|
|
5
|
+
declare const TOOLTIP_HIDE_DELAY_MS = 150;
|
|
6
|
+
declare class BsTooltipDirective {
|
|
7
|
+
private readonly overlay;
|
|
8
|
+
private readonly overlayStack;
|
|
9
|
+
/** The element the structural directive sits on: the tooltip's trigger. */
|
|
10
|
+
private readonly parent;
|
|
13
11
|
private readonly tooltipId;
|
|
12
|
+
private readonly portal;
|
|
14
13
|
private stackToken;
|
|
15
|
-
|
|
14
|
+
private overlayRef;
|
|
15
|
+
readonly bsTooltip: i0.InputSignal<Position>;
|
|
16
|
+
constructor();
|
|
16
17
|
/**
|
|
17
18
|
* WCAG 1.4.13 "hoverable": the pointer must be able to travel INTO the
|
|
18
19
|
* tooltip (to select/zoom its text) without it vanishing. Hide on a short
|
|
@@ -21,17 +22,17 @@ declare class BsTooltipDirective implements OnDestroy {
|
|
|
21
22
|
private hideTimer;
|
|
22
23
|
private scheduleHide;
|
|
23
24
|
private cancelScheduledHide;
|
|
24
|
-
readonly bsTooltip: i0.InputSignal<Position>;
|
|
25
|
-
private injector;
|
|
26
|
-
private portal;
|
|
27
|
-
private overlayRef;
|
|
28
25
|
onBlur(): void;
|
|
29
26
|
onEscape(): void;
|
|
30
27
|
showTooltip(): void;
|
|
31
28
|
hideTooltip(): void;
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Adds or removes the tooltip's id in the trigger's `aria-describedby` token list, leaving
|
|
31
|
+
* any description the consumer set (a hint, a validation message) in place.
|
|
32
|
+
*/
|
|
33
|
+
private setDescribedBy;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsTooltipDirective, never>;
|
|
34
35
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BsTooltipDirective, "*[bsTooltip]", never, { "bsTooltip": { "alias": "bsTooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
export { BsTooltipDirective };
|
|
38
|
+
export { BsTooltipDirective, TOOLTIP_HIDE_DELAY_MS };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementRef, TemplateRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { TreeSelectProvider, TreeSelectMode, TreeSelectVariant, TreeNode, MpTreeSelect } from '@mintplayer/web-components/tree-select';
|
|
5
5
|
export { InMemoryTreeSelectProvider, NodePage, NodeRequest, TreeNode, TreeSelectChangeEventDetail, TreeSelectMode, TreeSelectProvider, TreeSelectVariant } from '@mintplayer/web-components/tree-select';
|
|
@@ -10,7 +10,7 @@ type Value = TreeNode | TreeNode[] | null;
|
|
|
10
10
|
* with `[(ngModel)]` / `formControlName`. **Requires a `<bs-form>` ancestor**
|
|
11
11
|
* (parity with the legacy searchbox it replaces).
|
|
12
12
|
*/
|
|
13
|
-
declare class BsTreeSelectComponent implements ControlValueAccessor
|
|
13
|
+
declare class BsTreeSelectComponent implements ControlValueAccessor {
|
|
14
14
|
readonly provider: i0.InputSignal<TreeSelectProvider | undefined>;
|
|
15
15
|
readonly mode: i0.InputSignal<TreeSelectMode>;
|
|
16
16
|
readonly variant: i0.InputSignal<TreeSelectVariant>;
|
|
@@ -24,7 +24,7 @@ declare class BsTreeSelectComponent implements ControlValueAccessor, AfterViewIn
|
|
|
24
24
|
readonly opened: i0.OutputEmitterRef<void>;
|
|
25
25
|
readonly closed: i0.OutputEmitterRef<void>;
|
|
26
26
|
readonly cleared: i0.OutputEmitterRef<void>;
|
|
27
|
-
readonly elementRef: i0.Signal<ElementRef<MpTreeSelect
|
|
27
|
+
readonly elementRef: i0.Signal<ElementRef<MpTreeSelect>>;
|
|
28
28
|
private readonly itemTpl;
|
|
29
29
|
private readonly suggestionTpl;
|
|
30
30
|
private readonly buttonTpl;
|
|
@@ -42,7 +42,6 @@ declare class BsTreeSelectComponent implements ControlValueAccessor, AfterViewIn
|
|
|
42
42
|
private onChange;
|
|
43
43
|
private onTouched;
|
|
44
44
|
constructor();
|
|
45
|
-
ngAfterViewInit(): void;
|
|
46
45
|
private bindProp;
|
|
47
46
|
onValueChange(event: Event): void;
|
|
48
47
|
onOpen(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef,
|
|
2
|
+
import { TemplateRef, ElementRef } from '@angular/core';
|
|
3
3
|
import { TreeNode, TreeviewSelectionMode, IconResolver, TreeNodeSelectEventDetail, TreeNodeExpandEventDetail, TreeNodeCollapseEventDetail, MpTreeview } from '@mintplayer/web-components/treeview';
|
|
4
4
|
export { IconResolver, TreeNode, TreeNodeCollapseEventDetail, TreeNodeExpandEventDetail, TreeNodeRenderContext, TreeNodeRenderer, TreeNodeSelectEventDetail, TreeviewSelectionMode } from '@mintplayer/web-components/treeview';
|
|
5
5
|
|
|
@@ -42,7 +42,7 @@ declare class BsTreeviewNodeTemplateDirective {
|
|
|
42
42
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsTreeviewNodeTemplateDirective, "[bsTreeviewNode]", never, {}, {}, never, never, true, never>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
declare class BsTreeviewComponent
|
|
45
|
+
declare class BsTreeviewComponent {
|
|
46
46
|
readonly items: _angular_core.InputSignal<TreeNode[]>;
|
|
47
47
|
readonly expandedIds: _angular_core.ModelSignal<string[]>;
|
|
48
48
|
readonly selectedIds: _angular_core.ModelSignal<string[]>;
|
|
@@ -52,14 +52,14 @@ declare class BsTreeviewComponent implements AfterViewInit {
|
|
|
52
52
|
readonly nodeSelect: _angular_core.OutputEmitterRef<TreeNodeSelectEventDetail>;
|
|
53
53
|
readonly nodeExpand: _angular_core.OutputEmitterRef<TreeNodeExpandEventDetail>;
|
|
54
54
|
readonly nodeCollapse: _angular_core.OutputEmitterRef<TreeNodeCollapseEventDetail>;
|
|
55
|
-
readonly treeviewRef: _angular_core.Signal<ElementRef<MpTreeview
|
|
55
|
+
readonly treeviewRef: _angular_core.Signal<ElementRef<MpTreeview>>;
|
|
56
56
|
readonly nodeTemplate: _angular_core.Signal<BsTreeviewNodeTemplateDirective | undefined>;
|
|
57
57
|
private readonly viewContainerRef;
|
|
58
58
|
private readonly destroyRef;
|
|
59
59
|
private readonly viewCache;
|
|
60
60
|
constructor();
|
|
61
|
-
ngAfterViewInit(): void;
|
|
62
61
|
private buildNodeRenderer;
|
|
62
|
+
private destroyCachedViews;
|
|
63
63
|
onSelect(event: Event): void;
|
|
64
64
|
onExpand(event: Event): void;
|
|
65
65
|
onCollapse(event: Event): void;
|
|
@@ -10,19 +10,28 @@ interface BsUserAgent {
|
|
|
10
10
|
webbrowser?: BsWebbrowser;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* The browser a user-agent string names. Order matters: Opera and Edge also claim Chrome,
|
|
15
|
+
* and Chrome also claims Safari.
|
|
16
|
+
*/
|
|
17
|
+
declare function detectBrowser(userAgent: string): BsWebbrowser | undefined;
|
|
18
|
+
/** The operating system a user-agent string names, when it is one this directive marks. */
|
|
19
|
+
declare function detectOperatingSystem(userAgent: string): BsOperatingSystem | undefined;
|
|
13
20
|
declare class BsUserAgentDirective implements AfterViewInit {
|
|
14
|
-
private
|
|
15
|
-
private destroyRef;
|
|
21
|
+
private readonly isServer;
|
|
22
|
+
private readonly destroyRef;
|
|
23
|
+
/** There is no user agent on the server: nothing is detected, nothing is marked. */
|
|
24
|
+
private get userAgent();
|
|
25
|
+
get os(): BsOperatingSystem | undefined;
|
|
16
26
|
get isAndroid(): boolean;
|
|
17
27
|
get isIos(): boolean;
|
|
18
28
|
get isWindows(): boolean;
|
|
19
29
|
get browserClass(): string | null;
|
|
20
|
-
private getBrowser;
|
|
21
30
|
ngAfterViewInit(): void;
|
|
22
31
|
readonly detected: i0.OutputEmitterRef<BsUserAgent>;
|
|
23
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsUserAgentDirective, never>;
|
|
24
33
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BsUserAgentDirective, "[bsUserAgent]", never, {}, { "detected": "detected"; }, never, never, true, never>;
|
|
25
34
|
}
|
|
26
35
|
|
|
27
|
-
export { BsUserAgentDirective };
|
|
36
|
+
export { BsUserAgentDirective, detectBrowser, detectOperatingSystem };
|
|
28
37
|
export type { BsOperatingSystem, BsUserAgent, BsWebbrowser };
|