@tectra-ng/core 0.4.1 → 0.4.3
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 +3 -3
- package/fesm2022/tectra-ng-core-config.mjs +80 -9
- package/fesm2022/tectra-ng-core-config.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-i18n-ua.mjs +9 -0
- package/fesm2022/tectra-ng-core-i18n-ua.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-i18n.mjs +29 -1
- package/fesm2022/tectra-ng-core-i18n.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-overlay.mjs +132 -2
- package/fesm2022/tectra-ng-core-overlay.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-utils.mjs +172 -2
- package/fesm2022/tectra-ng-core-utils.mjs.map +1 -1
- package/fesm2022/tectra-ng-core.mjs +1 -1
- package/package.json +2 -2
- package/types/tectra-ng-core-config.d.ts +37 -5
- package/types/tectra-ng-core-config.d.ts.map +1 -1
- package/types/tectra-ng-core-i18n-types.d.ts +18 -0
- package/types/tectra-ng-core-i18n-types.d.ts.map +1 -1
- package/types/tectra-ng-core-i18n.d.ts +14 -0
- package/types/tectra-ng-core-i18n.d.ts.map +1 -1
- package/types/tectra-ng-core-overlay.d.ts +61 -2
- package/types/tectra-ng-core-overlay.d.ts.map +1 -1
- package/types/tectra-ng-core-utils.d.ts +58 -0
- package/types/tectra-ng-core-utils.d.ts.map +1 -1
- package/types/tectra-ng-core.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
|
|
3
|
-
import { TectraPreset } from "@tectra-ng/themes";
|
|
3
|
+
import { TectraDeepPartial, TectraPreset, TectraPresetSource, TectraStyle } from "@tectra-ng/themes";
|
|
4
4
|
import { TxLocaleCode, TxLocaleDefinition, TxTranslations } from "@tectra-ng/core/i18n/types";
|
|
5
5
|
/** Extra class and inline styles for one part of a component. */
|
|
6
6
|
export interface TxPassThroughPart {
|
|
@@ -50,10 +50,18 @@ export interface TxOverlayConfig {
|
|
|
50
50
|
/** Space overlays keep free at the viewport edges. */
|
|
51
51
|
viewportInsets?: TxViewportInsets;
|
|
52
52
|
}
|
|
53
|
+
/** Overrides merged into the preset with `definePreset`, or a function that builds them from the preset. */
|
|
54
|
+
export type TxPresetOverrides = TectraDeepPartial<TectraPreset> | ((preset: TectraPreset) => TectraDeepPartial<TectraPreset>);
|
|
53
55
|
/** Config passed to `provideTectra`: theme, locale, ripple, pass-through and validation texts. */
|
|
54
56
|
export interface TectraConfig {
|
|
55
57
|
/** Theme preset to apply. */
|
|
56
58
|
preset: TectraPreset;
|
|
59
|
+
/** The app's own changes to the preset; applied at start and again after every `TxThemeService.updateTheme`. */
|
|
60
|
+
presetOverrides?: TxPresetOverrides;
|
|
61
|
+
/** Local storage key that remembers the style, primary, surface, ripple and color scheme and restores them before the first render. */
|
|
62
|
+
storageKey?: string;
|
|
63
|
+
/** Styles a remembered choice may name; the style of `preset` is always known. */
|
|
64
|
+
styles?: TectraStyle[];
|
|
57
65
|
/** Initial color scheme (default `light`). */
|
|
58
66
|
mode?: TxThemeMode;
|
|
59
67
|
/** Extra CSS selector that also turns on dark tokens, e.g. `.app-dark`. */
|
|
@@ -77,7 +85,7 @@ export interface TectraConfig {
|
|
|
77
85
|
/** Validation error texts by error key, shown by form field components. */
|
|
78
86
|
validationMessages?: TxValidationMessages;
|
|
79
87
|
}
|
|
80
|
-
/** Registers the tectra config in the app: applies the preset
|
|
88
|
+
/** Registers the tectra config in the app: applies the preset, the color scheme and a remembered theme choice and registers locales. */
|
|
81
89
|
export declare function provideTectra(config: TectraConfig): EnvironmentProviders;
|
|
82
90
|
/**
|
|
83
91
|
* Signal that tells whether a component is unstyled: its own `unstyled` input, else the global config, else
|
|
@@ -90,6 +98,8 @@ export declare function injectPassThrough<TPart extends string, TInstance>(compo
|
|
|
90
98
|
export declare const TECTRA_CONFIG: InjectionToken<TectraConfig>;
|
|
91
99
|
/** Component token groups by name, each an object of tokens. */
|
|
92
100
|
export type TxComponentTokenGroups = Readonly<Record<string, object>>;
|
|
101
|
+
/** What `updateTheme` changes: the style object, the primary color and the surface palette; parts left out stay as they are. */
|
|
102
|
+
export type TxThemeChoice = Partial<TectraPresetSource>;
|
|
93
103
|
/** Applies the preset and color scheme to the document and writes the CSS variables of component tokens. */
|
|
94
104
|
export declare class TxThemeService {
|
|
95
105
|
private document;
|
|
@@ -101,20 +111,42 @@ export declare class TxThemeService {
|
|
|
101
111
|
readonly mode: import("@angular/core").WritableSignal<TxThemeMode>;
|
|
102
112
|
/** Whether the click ripple effect is on. */
|
|
103
113
|
readonly ripple: import("@angular/core").WritableSignal<boolean>;
|
|
114
|
+
/** Style object of the applied preset; the default style when the preset was not built by `createTectraPreset`. */
|
|
115
|
+
readonly style: import("@angular/core").Signal<TectraStyle>;
|
|
116
|
+
/** Primary color of the applied preset (default `blue`). */
|
|
117
|
+
readonly primary: import("@angular/core").Signal<import("@tectra-ng/themes").TectraPrimary>;
|
|
118
|
+
/** Surface palette of the applied preset (default `ink`). */
|
|
119
|
+
readonly surface: import("@angular/core").Signal<"ink" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "soho" | "viva" | "ocean" | "mauve" | "olive" | "mist" | "taupe">;
|
|
120
|
+
/**
|
|
121
|
+
* Applies the config of `provideTectra`: the preset with `presetOverrides`, the color scheme, the ripple and the choice
|
|
122
|
+
* remembered under `storageKey`. `provideTectra` calls it before the first render.
|
|
123
|
+
*/
|
|
124
|
+
applyConfig(): void;
|
|
104
125
|
/** Writes the CSS variables of a preset and rewrites the registered component tokens with its overrides. */
|
|
105
126
|
applyPreset(preset: TectraPreset): void;
|
|
127
|
+
/**
|
|
128
|
+
* Rebuilds the preset with `createTectraPreset` from a new style, primary color or surface palette, applies the
|
|
129
|
+
* `presetOverrides` of the config on top and remembers the choice under `storageKey`.
|
|
130
|
+
*/
|
|
131
|
+
updateTheme(choice: TxThemeChoice): void;
|
|
106
132
|
/** Registers component token groups and writes their CSS variables; groups already registered are skipped. */
|
|
107
133
|
registerTokens(groups: TxComponentTokenGroups): void;
|
|
108
134
|
/** Names of the registered component token groups. */
|
|
109
135
|
registeredTokens(): string[];
|
|
110
|
-
/** Turns the click ripple effect on or off
|
|
136
|
+
/** Turns the click ripple effect on or off and remembers it under `storageKey`. */
|
|
111
137
|
setRipple(enabled: boolean): void;
|
|
112
|
-
/** Sets the color scheme on the `<html>` element
|
|
138
|
+
/** Sets the color scheme on the `<html>` element and remembers it under `storageKey`. */
|
|
113
139
|
setMode(mode: TxThemeMode): void;
|
|
114
140
|
/** Switches between light and dark. */
|
|
115
141
|
toggleMode(): void;
|
|
142
|
+
private restoredPreset;
|
|
143
|
+
private withOverrides;
|
|
144
|
+
private writeMode;
|
|
145
|
+
private storage;
|
|
146
|
+
private readSaved;
|
|
147
|
+
private save;
|
|
116
148
|
private writeGroup;
|
|
117
|
-
private
|
|
149
|
+
private styleElement;
|
|
118
150
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxThemeService, never>;
|
|
119
151
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
120
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-core-config.d.ts","names":[],"sources":["../../../../packages/core/config/src/pass-through.interface.ts","../../../../packages/core/config/src/tectra-config.interface.ts","../../../../packages/core/config/src/provide-tectra.ts","../../../../packages/core/config/src/component-config.ts","../../../../packages/core/config/src/tectra-config.token.ts","../../../../packages/core/config/src/theme.service.ts","../../../../packages/core/config/src/locale-registry.ts"],"mappings":";;;;;iBACiB;;EAEf;;EAEA,QAAQ;;;iBAIO,qBAAqB;;EAEpC,UAAU;;;YAIA,mBAAmB,aAC3B,sBACE,SAAS,qBAAqB,eAAe;;YAGvC,cAAc,sBAAsB,qBAAqB,QAAQ,OAAO,OAAO,mBAAmB;;YAGlG,sBAAsB,wBAAwB,QAAQ,OAAO,OAAO;;iBAG/D;;EAEf;;;;;EAKA;;;YAIU,sBAAsB,eAAe,eAAe;;YC9BpD;;YAGA,iCAAiC;;YAEjC,uBAAuB,eAAe;;iBAGjC;;EAEf;;EAEA;;;iBAIe;;EAEf,iBAAiB;;;
|
|
1
|
+
{"version":3,"file":"tectra-ng-core-config.d.ts","names":[],"sources":["../../../../packages/core/config/src/pass-through.interface.ts","../../../../packages/core/config/src/tectra-config.interface.ts","../../../../packages/core/config/src/provide-tectra.ts","../../../../packages/core/config/src/component-config.ts","../../../../packages/core/config/src/tectra-config.token.ts","../../../../packages/core/config/src/theme.service.ts","../../../../packages/core/config/src/locale-registry.ts"],"mappings":";;;;;iBACiB;;EAEf;;EAEA,QAAQ;;;iBAIO,qBAAqB;;EAEpC,UAAU;;;YAIA,mBAAmB,aAC3B,sBACE,SAAS,qBAAqB,eAAe;;YAGvC,cAAc,sBAAsB,qBAAqB,QAAQ,OAAO,OAAO,mBAAmB;;YAGlG,sBAAsB,wBAAwB,QAAQ,OAAO,OAAO;;iBAG/D;;EAEf;;;;;EAKA;;;YAIU,sBAAsB,eAAe,eAAe;;YC9BpD;;YAGA,iCAAiC;;YAEjC,uBAAuB,eAAe;;iBAGjC;;EAEf;;EAEA;;;iBAIe;;EAEf,iBAAiB;;;YAIP,oBAAoB,kBAAkB,kBAAkB,QAAQ,iBAAiB,kBAAkB;;iBAG9F;;EAEf,QAAQ;;EAER,kBAAkB;;EAElB;;EAEA,SAAS;;EAET,OAAO;;EAEP;;EAEA;;EAEA;;EAEA,KAAK;;EAEL,YAAY;;EAEZ,SAAS,eAAe;;EAExB,UAAU;;EAEV,eAAe,QAAQ;;EAEvB,UAAU;;EAEV,qBAAqB;;;wBCvDP,cAAc,QAAQ,eAAe;;;;;wBCOrC,eAAe,OAAO,8BAA8B;;wBAiBpD,kBAAkB,sBAAsB,WACtD,mBACA,UAAU,WACV,OAAO,OAAO,cAAc,OAAO,yBACnC,cAAc,OAAO,oCACpB,OAAO,sBAAsB;;qBChCnB,eAAa,eAAA;;YCcd,yBAAyB,SAAS;;YAGlC,gBAAgB,QAAQ;;qBAYvB;UACH;UACA;mBACS;;WAGR,gCAAM,eAAA;;WAEN,8BAAI,eAAA;;WAEJ,gCAAM;;WAEN,+BAAK,OAAA;;WAEL,iCAAO,mCAAA;;WAEP,iCAAO;;;;;EAMhB;;EAYA,YAAY,QAAQ;;;;;EAcpB,YAAY,QAAQ;;EAOpB,eAAe,QAAQ;;EAUvB;;EAKA,UAAU;;EAMV,QAAQ,MAAM;;EAMd;UAIQ;UASA;UAKA;UAKA;UAQA;UAYA;UAaA;UAKA;SA/IG,MAAA,GAAA,qBAAA;;;;wBA2JG,aAAa,UAAU,wBAAwB,QAAQ,IAAI;;qBCxL9D,mBAAmB,SAAS,qBAAqB,QAAQ;;qBAMzD;mBACM;;EAGjB,IAAI,eAAe;;EAKnB,OAAO,SAAS;;;;;EAUV,KAAK,eAAe,QAAQ;SAnBvB,MAAA,GAAA,qBAAA"}
|
|
@@ -666,6 +666,14 @@ export interface TxTranslations {
|
|
|
666
666
|
language: string;
|
|
667
667
|
/** Label of the theme row of topbar preferences. */
|
|
668
668
|
theme: string;
|
|
669
|
+
/** Label of the primary color swatches of the theme configurator. */
|
|
670
|
+
themePrimary: string;
|
|
671
|
+
/** Label of the surface palette swatches of the theme configurator. */
|
|
672
|
+
themeSurface: string;
|
|
673
|
+
/** Label of the style buttons of the theme configurator. */
|
|
674
|
+
themeStyle: string;
|
|
675
|
+
/** Label of the ripple switch of the theme configurator. */
|
|
676
|
+
themeRipple: string;
|
|
669
677
|
/** Accessible name of the button that opens the navigation menu. */
|
|
670
678
|
openMenu: string;
|
|
671
679
|
/** Accessible name of the button that closes the navigation menu. */
|
|
@@ -864,6 +872,16 @@ export interface TxTranslations {
|
|
|
864
872
|
chartZoomHint: string;
|
|
865
873
|
/** Keyboard and pointer hint of the Gantt chart. */
|
|
866
874
|
chartGanttHint: string;
|
|
875
|
+
/** Label of the tasks a Gantt task waits for, in its tooltip and accessible name. */
|
|
876
|
+
chartDependsOn: string;
|
|
877
|
+
/** Label of the tasks that wait for a Gantt task, in its tooltip and accessible name. */
|
|
878
|
+
chartRequiredBy: string;
|
|
879
|
+
/** Name of a start-to-start Gantt dependency. */
|
|
880
|
+
chartStartToStart: string;
|
|
881
|
+
/** Name of a finish-to-finish Gantt dependency. */
|
|
882
|
+
chartFinishToFinish: string;
|
|
883
|
+
/** Name of a start-to-finish Gantt dependency. */
|
|
884
|
+
chartStartToFinish: string;
|
|
867
885
|
/** Screen reader text of the gauge value; takes `{value}`, `{min}` and `{max}`. */
|
|
868
886
|
chartGaugeValue: string;
|
|
869
887
|
/** Chart type name of the pie chart. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-core-i18n-types.d.ts","names":[],"sources":["../../../../packages/core/i18n/types/src/translations.types.ts"],"mappings":"AACA;iBAAiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA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;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;;YAIJ"}
|
|
@@ -7,6 +7,20 @@ export declare const TX_LOCALE_US: TxLocaleDefinition;
|
|
|
7
7
|
export type TxMessageParams = Record<string, string | number>;
|
|
8
8
|
/** Fills `{name}` placeholders and ICU `{count, plural, one {…} other {…}}` forms of a message, with `#` as the count. */
|
|
9
9
|
export declare function formatMessage(template: string, params?: TxMessageParams, intl?: string): string;
|
|
10
|
+
/** Options of `formatBytes`. */
|
|
11
|
+
export interface TxFormatBytesOptions {
|
|
12
|
+
/** Locale of the number and the unit names (default `en-US`). */
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** Maximum digits after the point for sizes of a kilobyte and more (default 1). */
|
|
15
|
+
decimals?: number;
|
|
16
|
+
/** Size of a unit: `1024` (default) or `1000`. */
|
|
17
|
+
base?: 1000 | 1024;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Formats a byte count in the largest unit that fits, with `Intl.NumberFormat` unit names of the locale: `512 bytes`,
|
|
21
|
+
* `1.5 kB`, `5 MB`. Bytes use the full unit name, so the plural form follows the locale (`1 byte`, `124 bytes`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatBytes(bytes: number, options?: TxFormatBytesOptions): string;
|
|
10
24
|
/** Holds the current locale and translates, formats numbers and dates for it; the `locale` config option sets the start locale. */
|
|
11
25
|
export declare class TxLocaleService {
|
|
12
26
|
private config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-core-i18n.d.ts","names":[],"sources":["../../../../packages/core/i18n/src/locales.ts","../../../../packages/core/i18n/src/format-message.ts","../../../../packages/core/i18n/src/locale.service.ts","../../../../packages/core/i18n/src/translations.ts"],"mappings":";;;;qBAGa,cAAc;;YCCf,kBAAkB;;wBAGd,cAAc,kBAAkB,SAAQ,iBAAsB;;
|
|
1
|
+
{"version":3,"file":"tectra-ng-core-i18n.d.ts","names":[],"sources":["../../../../packages/core/i18n/src/locales.ts","../../../../packages/core/i18n/src/format-message.ts","../../../../packages/core/i18n/src/format-bytes.ts","../../../../packages/core/i18n/src/locale.service.ts","../../../../packages/core/i18n/src/translations.ts"],"mappings":";;;;qBAGa,cAAc;;YCCf,kBAAkB;;wBAGd,cAAc,kBAAkB,SAAQ,iBAAsB;;iBCN7D;;EAEf;;EAEA;;EAEA;;;;;;wBASc,YAAY,eAAe,UAAS;;qBCTvC;UACH;UACA;;WAGC,gCAAM,eAAA;;WAEN,sCAAY,OAAA;;UASb;;EAGF,UAAU,QAAQ,eAAe,qBAAqB;;EAa5D,UAAU,WAAW,gBAAgB,SAAQ;;EAK7C,OAAO,kBAAkB,SAAQ;;EAKjC,aAAa,eAAe,UAAU,KAAK;;EAK3C,WAAW,OAAO,eAAe,UAAU,KAAK;;EAKhD,WAAW;;EAMX,aAAa;UAML;SAhEG,MAAA,GAAA,qBAAA;;;;wBCFG,sBAAsB,OAAO"}
|
|
@@ -50,6 +50,12 @@ export interface TxOverlayOptions<TContext = unknown> {
|
|
|
50
50
|
motion?: TxOverlayMotion;
|
|
51
51
|
/** CSS class or classes added to the overlay pane. */
|
|
52
52
|
panelClass?: string | string[];
|
|
53
|
+
/**
|
|
54
|
+
* Smallest distance in px from the overlay edge to its arrow centre, or a function that measures it on the
|
|
55
|
+
* pane (see `txArrowInset`); a `-start` / `-end` overlay moves outward so that the arrow still points at the
|
|
56
|
+
* origin centre.
|
|
57
|
+
*/
|
|
58
|
+
arrowInset?: number | ((pane: HTMLElement) => number);
|
|
53
59
|
}
|
|
54
60
|
/** Handle of an open overlay. */
|
|
55
61
|
export interface TxOverlayRef<TInstance = unknown> {
|
|
@@ -137,14 +143,39 @@ export declare function fitsInBounds(position: ConnectedPosition, origin: TxBox,
|
|
|
137
143
|
* or none does.
|
|
138
144
|
*/
|
|
139
145
|
export declare function orderByRoom(positions: ConnectedPosition[], origin: TxBox, size: TxOverlaySize, bounds: TxOverlayBounds): ConnectedPosition[];
|
|
146
|
+
/** What `txArrowPositions` needs: the arrow inset, the origin, the overlay size and the room around them. */
|
|
147
|
+
export interface TxArrowRoom {
|
|
148
|
+
/** Smallest distance in px from an overlay edge to the arrow centre (see `txArrowInset`). */
|
|
149
|
+
inset: number;
|
|
150
|
+
/** Position and size of the origin element, in px. */
|
|
151
|
+
origin: TxOverlayBox;
|
|
152
|
+
/** Size of the overlay pane, in px. */
|
|
153
|
+
pane: TxOverlaySize;
|
|
154
|
+
/** Edges the overlay must stay inside; a move never pushes it past them. */
|
|
155
|
+
bounds?: TxOverlayBounds;
|
|
156
|
+
/** Whether the overlay is laid out right to left. */
|
|
157
|
+
rtl?: boolean;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Moves `-start` and `-end` positions outward when the arrow, kept `inset` px away from the overlay edge,
|
|
161
|
+
* would miss the origin centre, so that it still points at it; other positions stay as they are.
|
|
162
|
+
*/
|
|
163
|
+
export declare function txArrowPositions(positions: ConnectedPosition[], room: TxArrowRoom): ConnectedPosition[];
|
|
164
|
+
/**
|
|
165
|
+
* Smallest distance in px from an overlay edge to the centre of its arrow that keeps the arrow off the
|
|
166
|
+
* rounded corner: the corner radius of the panel (plus its border when the arrow is drawn inside it) and the
|
|
167
|
+
* width of the arrow; 0 without an arrow.
|
|
168
|
+
*/
|
|
169
|
+
export declare function txArrowInset(panel: Element | null | undefined, arrow: Element | null | undefined): number;
|
|
140
170
|
/**
|
|
141
171
|
* Opens a template or a component in an overlay next to an origin element, with flipping, scroll handling and
|
|
142
|
-
* open and close animation.
|
|
172
|
+
* open and close animation; the overlay is transient: it closes when a modal dialog opens.
|
|
143
173
|
*/
|
|
144
174
|
export declare class TxOverlay {
|
|
145
175
|
private injector;
|
|
146
176
|
private document;
|
|
147
177
|
private overlayInsets;
|
|
178
|
+
private stack;
|
|
148
179
|
/** Opens the content in an overlay and returns its handle. */
|
|
149
180
|
open<TInstance = unknown, TContext = unknown>(content: TemplateRef<TContext> | Type<TInstance>, options: TxOverlayOptions<TContext>): TxOverlayRef<TInstance>;
|
|
150
181
|
private attach;
|
|
@@ -262,12 +293,18 @@ interface ScrollTrack {
|
|
|
262
293
|
* a function that stops it (also called when the overlay detaches).
|
|
263
294
|
*/
|
|
264
295
|
export declare function txAnchorPane(overlayRef: OverlayRef, origin: Element, chrome?: TxOverlayInsets, margin?: number): () => void;
|
|
265
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* Applies `txAnchorPane` to a `cdkConnectedOverlay`, so it follows its origin on scroll; when the overlay
|
|
298
|
+
* handles `(detach)`, it also closes as a transient overlay once a modal dialog opens.
|
|
299
|
+
*/
|
|
266
300
|
export declare class TxOverlayAnchor {
|
|
267
301
|
private connectedOverlay;
|
|
268
302
|
private chrome;
|
|
303
|
+
private stack;
|
|
269
304
|
private release;
|
|
305
|
+
private forget;
|
|
270
306
|
constructor();
|
|
307
|
+
private watchAsTransient;
|
|
271
308
|
private originElement;
|
|
272
309
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxOverlayAnchor, never>;
|
|
273
310
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxOverlayAnchor, "[cdkConnectedOverlay][txOverlayAnchor]", never, {}, {}, never, never, true, never>;
|
|
@@ -282,5 +319,27 @@ export declare function txLayoutRect(element: Element): TxOverlayBox;
|
|
|
282
319
|
export declare function txHostGap(host: HTMLElement, pane: HTMLElement): TxOverlayShift;
|
|
283
320
|
/** Shift that keeps an overlay inside the viewport across its placement side, in px; zero when it already fits. */
|
|
284
321
|
export declare function txCrossShift(pane: HTMLElement, margin: number): TxOverlayShift;
|
|
322
|
+
/**
|
|
323
|
+
* Keeps the overlays in one stacking order: every overlay sits in the browser top layer in the order it
|
|
324
|
+
* opened, a modal layer closes the transient overlays (popovers, menus, dropdown panels, tooltips) when it
|
|
325
|
+
* opens, and the elements kept on top (toasts) move back above it.
|
|
326
|
+
*/
|
|
327
|
+
export declare class TxOverlayStack {
|
|
328
|
+
private readonly transient;
|
|
329
|
+
private readonly onTop;
|
|
330
|
+
/** Registers the close function of an open transient overlay; returns a function that removes it. */
|
|
331
|
+
addTransient(close: () => void): () => void;
|
|
332
|
+
/**
|
|
333
|
+
* Shows the element in the top layer and keeps it above every modal layer opened later; returns a function
|
|
334
|
+
* that stops it. Does nothing where the browser has no popover support.
|
|
335
|
+
*/
|
|
336
|
+
keepOnTop(element: HTMLElement): () => void;
|
|
337
|
+
/** Closes every open transient overlay; a modal layer calls it before it opens. */
|
|
338
|
+
closeTransient(): void;
|
|
339
|
+
/** Moves the elements kept on top above the newest top-layer element; a modal layer calls it once it is shown. */
|
|
340
|
+
raise(): void;
|
|
341
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxOverlayStack, never>;
|
|
342
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
343
|
+
}
|
|
285
344
|
export {};
|
|
286
345
|
//# sourceMappingURL=tectra-ng-core-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-core-overlay.d.ts","names":[],"sources":["../../../../packages/core/overlay/src/overlay.types.ts","../../../../packages/core/overlay/src/placements.ts","../../../../packages/core/overlay/src/overlay.service.ts","../../../../packages/core/overlay/src/overlay-motion.ts","../../../../packages/core/overlay/src/overlay-insets.service.ts","../../../../packages/core/overlay/src/overlay-inset.directive.ts","../../../../packages/core/overlay/src/overlay-room.ts","../../../../packages/core/overlay/src/overlay-scroll.ts","../../../../packages/core/overlay/src/overlay-anchor.ts","../../../../packages/core/overlay/src/overlay-viewport.ts"],"mappings":";;;;;YAIY;;YAEA;;YAEA;;YAeA;;YAEA;;YAEA;;YAEA;;iBAGK,iBAAiB;;EAEhC,QAAQ;;EAER,mBAAmB;;EAEnB,WAAW;;EAEX,UAAU;;EAEV,YAAY;;EAEZ;;EAEA;;EAEA,QAAQ;;EAER,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;EAET;;;
|
|
1
|
+
{"version":3,"file":"tectra-ng-core-overlay.d.ts","names":[],"sources":["../../../../packages/core/overlay/src/overlay.types.ts","../../../../packages/core/overlay/src/placements.ts","../../../../packages/core/overlay/src/overlay.service.ts","../../../../packages/core/overlay/src/overlay-motion.ts","../../../../packages/core/overlay/src/overlay-insets.service.ts","../../../../packages/core/overlay/src/overlay-inset.directive.ts","../../../../packages/core/overlay/src/overlay-room.ts","../../../../packages/core/overlay/src/overlay-scroll.ts","../../../../packages/core/overlay/src/overlay-anchor.ts","../../../../packages/core/overlay/src/overlay-viewport.ts","../../../../packages/core/overlay/src/overlay-stack.ts"],"mappings":";;;;;YAIY;;YAEA;;YAEA;;YAeA;;YAEA;;YAEA;;YAEA;;iBAGK,iBAAiB;;EAEhC,QAAQ;;EAER,mBAAmB;;EAEnB,WAAW;;EAEX,UAAU;;EAEV,YAAY;;EAEZ;;EAEA;;EAEA,QAAQ;;EAER,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;EAET;;;;;;EAMA,wBAAwB,MAAM;;;iBAIf,aAAa;;WAEnB,WAAW,OAAO;;WAElB,QAAQ,WAAW;;WAEnB,UAAU;;WAEV,SAAS;;EAElB,MAAM,SAAS;;EAEf;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;;iBAIe;;E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UAAU;;;;;wBAiBnC,YAAY,QAAQ,SAAS,eAAe,iBAAiB,OAAO;;qBCvGvE;UACH;mBACS;SAFN,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;qBCGA;mBAQQ;mBACA;UARX;;WAEC,mCAAS,eAAA;;WAET,wCAAc,8CAAA;EAGJ,YAAA,WAAW,qBACX;;EAOnB,KAAK,QAAQ;;EAOb,KAAK,QAAQ;;;;;EASb,IAAI,QAAQ,SAAS,OAAO,gCAAgC,SAAS,iCAAiC,UAAU;;EAgBhH,OAAO,QAAQ,sBAAsB,QAAQ,SAAS,OAAO,gCAAgC,SAAS,iCAAiC,UAAU;;;YCpDvI;;YAEA,iCAAiC;EAAW,QAAQ;EAAS,MAAM;MAAiB;;;;;wBAWhF,eAAe,MAAM,gBAAgB;;wBAOrC,gBAAgB,MAAM;;;;;wBAQtB,iBAAiB,UAAU,WAAW;;wBCCtC,eAAe,QAAQ,UAAU;;wBAkCjC,YAAY,QAAQ,UAAU;;UAKpC;;EAER,QAAQ;;EAER,MAAM;;;;;;wBA0BQ,aAAa,YAAY,YAAY,QAAQ,SAAS,SAAS,iBAAiB;;;;;qBAuLnF;UACH;UACA;UACA;UACA;UACA;;UAsBA;UAUA;SArCG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;;;wBC1RG,cAAc,UAAU,WAAW;;wBAanC,eAAe,UAAU,WAAW;;wBAUpC,aAAa,SAAS,UAAU;;wBAOhC,UAAU,MAAM,aAAa,MAAM,cAAc;;wBAqBjD,aAAa,MAAM,aAAa,iBAAiB;;;;;;qBCtCpD;mBACM;mBACA;;EAGjB,aAAa;;;;;EASb,UAAU,SAAS;;EAenB;;EAMA;SAnCW,MAAA,GAAA,qBAAA"}
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Plays the CSS animations of its element again whenever the bound key changes, without re-creating the
|
|
4
|
+
* element (a one-item `@for` would warn with NG0956). The animation stays driven by CSS, so `animation-play-state`
|
|
5
|
+
* keeps working. The first value only starts the animation as usual.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TxAnimationReplay {
|
|
8
|
+
private readonly element;
|
|
9
|
+
private started;
|
|
10
|
+
private last;
|
|
11
|
+
/** The key; a new value restarts the animations of the element. */
|
|
12
|
+
readonly key: import("@angular/core").InputSignal<unknown>;
|
|
13
|
+
constructor();
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxAnimationReplay, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TxAnimationReplay, "[txAnimationReplay]", never, {
|
|
16
|
+
"key": {
|
|
17
|
+
"alias": "txAnimationReplay";
|
|
18
|
+
"required": false;
|
|
19
|
+
"isSignal": true;
|
|
20
|
+
};
|
|
21
|
+
}, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
/** Reads a value by field name, with dots for nested fields; `undefined` when a step is missing. */
|
|
24
|
+
export declare function resolveField(row: unknown, field: string | undefined): unknown;
|
|
25
|
+
/** How a filter value is compared with a cell: text, number, list, range and date comparisons. */
|
|
26
|
+
export type TxFilterMatchMode = 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter';
|
|
27
|
+
/** One condition of a column filter: a value and how to compare it. */
|
|
28
|
+
export interface TxFilterRule {
|
|
29
|
+
/** Value to compare with; an empty value is ignored. */
|
|
30
|
+
value: unknown;
|
|
31
|
+
/** How the cell value is compared with the filter value. */
|
|
32
|
+
matchMode: TxFilterMatchMode;
|
|
33
|
+
}
|
|
34
|
+
/** Whether a filter value is set: not empty, not blank text and not an empty list. */
|
|
35
|
+
export declare function isFilled(value: unknown): boolean;
|
|
36
|
+
/** Whether a cell value passes one filter rule; an empty rule passes everything. */
|
|
37
|
+
export declare function matchesRule(value: unknown, rule: TxFilterRule, locale?: string): boolean;
|
|
1
38
|
/**
|
|
2
39
|
* Input transform for a boolean that may be unset: `undefined` and `null` stay `undefined`, other values go
|
|
3
40
|
* through `booleanAttribute`.
|
|
@@ -5,6 +42,27 @@
|
|
|
5
42
|
export declare function optionalBoolean(value: unknown): boolean | undefined;
|
|
6
43
|
/** Input transform for a number that may be unset: empty and non-numeric values become `undefined`. */
|
|
7
44
|
export declare function optionalNumber(value: unknown): number | undefined;
|
|
45
|
+
/** Page parameters of a paginated request or response: one-based page, page size and totals. */
|
|
46
|
+
export interface TxPaginationParams {
|
|
47
|
+
/** One-based page number. */
|
|
48
|
+
page: number;
|
|
49
|
+
/** Page size. */
|
|
50
|
+
limit?: number;
|
|
51
|
+
/** Extra field some backends send next to `limit`; the kit does not read it. */
|
|
52
|
+
qtt?: number;
|
|
53
|
+
/** Total number of records. */
|
|
54
|
+
total?: number;
|
|
55
|
+
/** Extra field some backends send next to `total`; the kit does not read it. */
|
|
56
|
+
count?: number;
|
|
57
|
+
}
|
|
58
|
+
/** Number of pages needed for the given record count and page size; `0` when there are no records. */
|
|
59
|
+
export declare function pageCountOf(totalRecords: number, rows: number): number;
|
|
60
|
+
/** Converts the index of the first row into a zero-based page number. */
|
|
61
|
+
export declare function firstToPage(first: number, rows: number): number;
|
|
62
|
+
/** Converts a zero-based page number into the index of the first row of that page. */
|
|
63
|
+
export declare function pageToFirst(page: number, rows: number): number;
|
|
64
|
+
/** Zero-based page numbers to show as links, keeping the current page centred within `linkSize` links. */
|
|
65
|
+
export declare function pageLinksOf(page: number, pageCount: number, linkSize: number): number[];
|
|
8
66
|
/** Animation used when one view swaps for another. */
|
|
9
67
|
export type TxSwapEffect = 'slide' | 'fade' | 'zoom' | 'blur' | 'flip' | 'none';
|
|
10
68
|
/** Direction of a swap animation: horizontal (`x`) or vertical (`y`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-core-utils.d.ts","names":[],"sources":["../../../../packages/core/utils/src/optional-boolean.ts","../../../../packages/core/utils/src/optional-number.ts","../../../../packages/core/utils/src/swap-motion.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tectra-ng-core-utils.d.ts","names":[],"sources":["../../../../packages/core/utils/src/animation-replay.ts","../../../../packages/core/utils/src/filter-match.ts","../../../../packages/core/utils/src/optional-boolean.ts","../../../../packages/core/utils/src/optional-number.ts","../../../../packages/core/utils/src/pagination.ts","../../../../packages/core/utils/src/swap-motion.ts"],"mappings":";;;;;;qBAQa;mBACM;UACT;UACA;;WAGC,6BAAG;;SAND,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAiB;MAAA;MAAA;MAAA;;;;;wBCPd,aAAa,cAAc;;YAM/B;;iBAmBK;;EAEf;;EAEA,WAAW;;;wBAIG,SAAS;;wBAuCT,YAAY,gBAAgB,MAAM,cAAc;;;;;wBCnEhD,gBAAgB;;wBCHhB,eAAe;;iBCFd;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;wBAIc,YAAY,sBAAsB;;wBAMlC,YAAY,eAAe;;wBAK3B,YAAY,cAAc;;wBAK1B,YAAY,cAAc,mBAAmB;;YC9BjD;;YAGA;;iBAGK;;EAEf,OAAO;;EAEP,OAAO;;EAEP;;;wBAMc,aAAa,QAAQ,cAAc,mBAAmB,OAAM,aAAmB;;;;;wBAyD/E,aAAa,SAAS,6BAA6B,WAAW;;wBAQ9D,UAAU,SAAS,SAAS,kBAAkB"}
|