@tectra-ng/core 0.4.4 → 0.4.5
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 +4 -4
- package/fesm2022/tectra-ng-core-config.mjs +71 -5
- package/fesm2022/tectra-ng-core-config.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-i18n-ua.mjs +1 -0
- package/fesm2022/tectra-ng-core-i18n-ua.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-i18n.mjs +38 -13
- package/fesm2022/tectra-ng-core-i18n.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-overlay.mjs +60 -2
- package/fesm2022/tectra-ng-core-overlay.mjs.map +1 -1
- package/fesm2022/tectra-ng-core-utils.mjs +92 -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 +29 -4
- package/types/tectra-ng-core-config.d.ts.map +1 -1
- package/types/tectra-ng-core-i18n-types.d.ts +2 -0
- package/types/tectra-ng-core-i18n-types.d.ts.map +1 -1
- package/types/tectra-ng-core-i18n.d.ts +20 -3
- package/types/tectra-ng-core-i18n.d.ts.map +1 -1
- package/types/tectra-ng-core-overlay.d.ts +42 -0
- package/types/tectra-ng-core-overlay.d.ts.map +1 -1
- package/types/tectra-ng-core-utils.d.ts +25 -0
- package/types/tectra-ng-core-utils.d.ts.map +1 -1
- package/types/tectra-ng-core.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"description": "tectra core for Angular: provideTectra, overlay, accessibility helpers, forms, locale and styles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@angular/core": "^22.2.0",
|
|
28
28
|
"@angular/forms": "^22.2.0",
|
|
29
29
|
"rxjs": "^7.8.0",
|
|
30
|
-
"@tectra-ng/themes": "^0.4.
|
|
30
|
+
"@tectra-ng/themes": "^0.4.5"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { EnvironmentProviders, InjectionToken, Signal } from "@angular/core";
|
|
3
|
-
import { TectraDeepPartial, TectraPreset, TectraPresetSource, TectraStyle } from "@tectra-ng/themes";
|
|
3
|
+
import { TectraCssOptions, 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 {
|
|
@@ -36,7 +36,7 @@ export type TxGlobalPassThrough = Record<string, Record<string, TxPassThroughVal
|
|
|
36
36
|
export type TxThemeMode = 'light' | 'dark';
|
|
37
37
|
/** Text of a validation error, or a function that builds it from the error value. */
|
|
38
38
|
export type TxValidationMessage = string | ((error: unknown) => string);
|
|
39
|
-
/** Validation error texts by error key. */
|
|
39
|
+
/** Validation error texts by error key; `'*'` is the text for keys that have neither an own nor a built-in text. */
|
|
40
40
|
export type TxValidationMessages = Record<string, TxValidationMessage>;
|
|
41
41
|
/** Space in px that overlays leave free at the top and bottom of the viewport, for fixed bars. */
|
|
42
42
|
export interface TxViewportInsets {
|
|
@@ -52,8 +52,11 @@ export interface TxOverlayConfig {
|
|
|
52
52
|
}
|
|
53
53
|
/** Overrides merged into the preset with `definePreset`, or a function that builds them from the preset. */
|
|
54
54
|
export type TxPresetOverrides = TectraDeepPartial<TectraPreset> | ((preset: TectraPreset) => TectraDeepPartial<TectraPreset>);
|
|
55
|
-
/**
|
|
56
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Config passed to `provideTectra`: theme, locale, ripple, pass-through and validation texts; `palettes`, `units` and
|
|
57
|
+
* `rootFontSize` set how the CSS variables are written.
|
|
58
|
+
*/
|
|
59
|
+
export interface TectraConfig extends TectraCssOptions {
|
|
57
60
|
/** Theme preset to apply. */
|
|
58
61
|
preset: TectraPreset;
|
|
59
62
|
/** The app's own changes to the preset; applied at start and again after every `TxThemeService.updateTheme`. */
|
|
@@ -80,6 +83,11 @@ export interface TectraConfig {
|
|
|
80
83
|
locales?: TxLocaleDefinition[];
|
|
81
84
|
/** Texts that override the ones of the current locale. */
|
|
82
85
|
translations?: Partial<TxTranslations>;
|
|
86
|
+
/**
|
|
87
|
+
* Local storage key that remembers the locale chosen with `TxLocaleService.setLocale` and restores it before the
|
|
88
|
+
* first render; nothing is read on the server.
|
|
89
|
+
*/
|
|
90
|
+
localeStorageKey?: string;
|
|
83
91
|
/** App-wide settings of overlays. */
|
|
84
92
|
overlay?: TxOverlayConfig;
|
|
85
93
|
/** Validation error texts by error key, shown by form field components. */
|
|
@@ -146,6 +154,7 @@ export declare class TxThemeService {
|
|
|
146
154
|
private readSaved;
|
|
147
155
|
private save;
|
|
148
156
|
private writeGroup;
|
|
157
|
+
private cssOptions;
|
|
149
158
|
private styleElement;
|
|
150
159
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxThemeService, never>;
|
|
151
160
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
@@ -169,5 +178,21 @@ export declare class TxLocaleRegistry {
|
|
|
169
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxLocaleRegistry, never>;
|
|
170
179
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
171
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Remembers the chosen locale code in local storage under the `localeStorageKey` of the config. Without the key it
|
|
183
|
+
* keeps nothing; on the server it reads and writes nothing.
|
|
184
|
+
*/
|
|
185
|
+
export declare class TxLocaleStorage {
|
|
186
|
+
private readonly document;
|
|
187
|
+
private readonly browser;
|
|
188
|
+
private readonly key;
|
|
189
|
+
/** The remembered locale code; `null` when nothing is kept, no key is set or on the server. */
|
|
190
|
+
read(): string | null;
|
|
191
|
+
/** Remembers a locale code; does nothing without a key or on the server. */
|
|
192
|
+
write(code: string): void;
|
|
193
|
+
private storage;
|
|
194
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxLocaleStorage, never>;
|
|
195
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
196
|
+
}
|
|
172
197
|
export type { TxLocaleCode, TxLocaleDefinition, TxTranslations };
|
|
173
198
|
//# sourceMappingURL=tectra-ng-core-config.d.ts.map
|
|
@@ -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;;;YAIP,oBAAoB,kBAAkB,kBAAkB,QAAQ,iBAAiB,kBAAkB;;
|
|
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","../../../../packages/core/config/src/locale-storage.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;;;;;iBAM9F,qBAAqB;;EAEpC,QAAQ;;EAER,kBAAkB;;EAElB;;EAEA,SAAS;;EAET,OAAO;;EAEP;;EAEA;;EAEA;;EAEA,KAAK;;EAEL,YAAY;;EAEZ,SAAS,eAAe;;EAExB,UAAU;;EAEV,eAAe,QAAQ;;;;;EAKvB;;EAEA,UAAU;;EAEV,qBAAqB;;;wBC9DP,cAAc,QAAQ,eAAe;;;;;wBCMrC,eAAe,OAAO,8BAA8B;;wBAiBpD,kBAAkB,sBAAsB,WACtD,mBACA,UAAU,WACV,OAAO,OAAO,cAAc,OAAO,yBACnC,cAAc,OAAO,oCACpB,OAAO,sBAAsB;;qBChCnB,eAAa,eAAA;;YCed,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;UAIA;SAnJG,MAAA,GAAA,qBAAA;;;;wBA+JG,aAAa,UAAU,wBAAwB,QAAQ,IAAI;;qBC7L9D,mBAAmB,SAAS,qBAAqB,QAAQ;;qBAMzD;mBACM;;EAGjB,IAAI,eAAe;;EAKnB,OAAO,SAAS;;;;;EAUV,KAAK,eAAe,QAAQ;SAnBvB,MAAA,GAAA,qBAAA;;;;;;;qBCDA;mBACM;mBACA;mBACA;;EAGjB;;EAcA,MAAM;UAYE;SAhCG,MAAA,GAAA,qBAAA"}
|
|
@@ -50,6 +50,8 @@ export interface TxTranslations {
|
|
|
50
50
|
showPassword: string;
|
|
51
51
|
/** Label of the button that hides the password. */
|
|
52
52
|
hidePassword: string;
|
|
53
|
+
/** Accessible name of an icon-only button that generates a password. */
|
|
54
|
+
generatePassword: string;
|
|
53
55
|
/** Accessible name of one cell of the one-time code input; takes `{index}` and `{length}`. */
|
|
54
56
|
otpCell: string;
|
|
55
57
|
/** Accessible name of the increase button of the number input. */
|
|
@@ -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;;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AEA;;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;;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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TxLocaleCode, TxLocaleDefinition, TxTranslations } from "@tectra-ng/core/config";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Signal } from "@angular/core";
|
|
3
|
+
import { EnvironmentProviders, Signal } from "@angular/core";
|
|
4
4
|
/** Built-in English (US) locale, the fallback for every other locale. */
|
|
5
5
|
export declare const TX_LOCALE_US: TxLocaleDefinition;
|
|
6
6
|
/** Values for the `{name}` placeholders of a message. */
|
|
@@ -21,17 +21,25 @@ export interface TxFormatBytesOptions {
|
|
|
21
21
|
* `1.5 kB`, `5 MB`. Bytes use the full unit name, so the plural form follows the locale (`1 byte`, `124 bytes`).
|
|
22
22
|
*/
|
|
23
23
|
export declare function formatBytes(bytes: number, options?: TxFormatBytesOptions): string;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Holds the current locale and translates, formats numbers and dates for it; the `locale` config option sets the start
|
|
26
|
+
* locale, and a locale remembered under `localeStorageKey` takes its place.
|
|
27
|
+
*/
|
|
25
28
|
export declare class TxLocaleService {
|
|
26
29
|
private config;
|
|
27
30
|
private registry;
|
|
31
|
+
private storage;
|
|
32
|
+
private readonly start;
|
|
28
33
|
/** The current locale definition. */
|
|
29
34
|
readonly locale: import("@angular/core").WritableSignal<TxLocaleDefinition>;
|
|
30
35
|
/** Translations of the current locale with the `translations` overrides of the config on top. */
|
|
31
36
|
readonly translations: import("@angular/core").Signal<TxTranslations>;
|
|
32
37
|
constructor();
|
|
33
38
|
private request;
|
|
34
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Switches the locale by code or definition; a code that is not registered yet is loaded first, and `us` is used if
|
|
41
|
+
* it fails. The code of the applied locale is remembered under `localeStorageKey`.
|
|
42
|
+
*/
|
|
35
43
|
setLocale(locale: TxLocaleCode | TxLocaleDefinition): Promise<void>;
|
|
36
44
|
/** Returns the text of a translation key with its parameters filled in. */
|
|
37
45
|
translate(key: keyof TxTranslations, params?: TxMessageParams): string;
|
|
@@ -45,10 +53,19 @@ export declare class TxLocaleService {
|
|
|
45
53
|
monthNames(style?: 'long' | 'short'): string[];
|
|
46
54
|
/** The seven weekday names in the current locale, starting at its first day of the week. */
|
|
47
55
|
weekdayNames(style?: 'long' | 'short' | 'narrow'): string[];
|
|
56
|
+
private apply;
|
|
57
|
+
private startLocale;
|
|
48
58
|
private resolve;
|
|
49
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxLocaleService, never>;
|
|
50
60
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
51
61
|
}
|
|
52
62
|
/** Returns the translations of the current locale as a signal; call it in an injection context. */
|
|
53
63
|
export declare function injectTranslations(): Signal<TxTranslations>;
|
|
64
|
+
/** Called with the code and the definition of the current locale; runs in an injection context, so it may `inject()`. */
|
|
65
|
+
export type TxLocaleListener = (code: string, locale: TxLocaleDefinition) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Mirrors the tectra locale into the app: calls the listener once the app has started (with the start locale, a
|
|
68
|
+
* remembered one included) and again after every change, e.g. to switch the app's own translation library.
|
|
69
|
+
*/
|
|
70
|
+
export declare function provideTxLocaleSync(listener: TxLocaleListener): EnvironmentProviders;
|
|
54
71
|
//# sourceMappingURL=tectra-ng-core-i18n.d.ts.map
|
|
@@ -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/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
|
|
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","../../../../packages/core/i18n/src/locale-sync.ts"],"mappings":";;;;qBAGa,cAAc;;YCCf,kBAAkB;;wBAGd,cAAc,kBAAkB,SAAQ,iBAAsB;;iBCN7D;;EAEf;;EAEA;;EAEA;;;;;;wBASc,YAAY,eAAe,UAAS;;;;;qBCEvC;UACH;UACA;UACA;mBACS;;WAGR,gCAAM,eAAA;;WAEN,sCAAY,OAAA;;UASb;;;;;EAMF,UAAU,QAAQ,eAAe,qBAAqB;;EAQ5D,UAAU,WAAW,gBAAgB,SAAQ;;EAK7C,OAAO,kBAAkB,SAAQ;;EAKjC,aAAa,eAAe,UAAU,KAAK;;EAK3C,WAAW,OAAO,eAAe,UAAU,KAAK;;EAKhD,WAAW;;EAMX,aAAa;UAMC;UAaN;UAQA;SArFG,MAAA,GAAA,qBAAA;;;;wBCbG,sBAAsB,OAAO;;YCUjC,oBAAoB,cAAc,QAAQ;;;;;wBAMtC,oBAAoB,UAAU,mBAAmB"}
|
|
@@ -127,6 +127,11 @@ export declare function toPlacement(side: TxPlacementSide, align: TxPlacementAli
|
|
|
127
127
|
* preference with the fallbacks after it.
|
|
128
128
|
*/
|
|
129
129
|
export declare function txPositions(placement?: TxPlacement, offset?: number): ConnectedPosition[];
|
|
130
|
+
/**
|
|
131
|
+
* Connected positions for the panel of a field, with an offset in px (default 4): below the field aligned to its
|
|
132
|
+
* start, then to its end, then the same above it, so a panel wider than its field lines up with one of its edges.
|
|
133
|
+
*/
|
|
134
|
+
export declare function txFieldPositions(offset?: number): ConnectedPosition[];
|
|
130
135
|
/** Placement a connected position stands for; `null` for a position not made by `txPositions`. */
|
|
131
136
|
export declare function placementFromPosition(position: ConnectedPosition): TxPlacement | null;
|
|
132
137
|
/**
|
|
@@ -341,5 +346,42 @@ export declare class TxOverlayStack {
|
|
|
341
346
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxOverlayStack, never>;
|
|
342
347
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
343
348
|
}
|
|
349
|
+
/** How `TxPanelWidth` sizes the panel of a field. */
|
|
350
|
+
export interface TxPanelWidthOptions {
|
|
351
|
+
/**
|
|
352
|
+
* CSS length the panel grows up to with its content (a token such as `var(--tx-select-overlay-max-width)`);
|
|
353
|
+
* a field wider than it gives the panel the width of the field. Without it the panel grows up to the viewport.
|
|
354
|
+
*/
|
|
355
|
+
maxWidth?: string;
|
|
356
|
+
/** Makes the panel at least as wide as its origin (default `true`). */
|
|
357
|
+
matchOrigin?: boolean;
|
|
358
|
+
/** Sizes the panel by its content and keeps the width it has once it opens, so it never jumps while open (default `true`). */
|
|
359
|
+
fitContent?: boolean;
|
|
360
|
+
/** Free space kept between the panel and each side of the viewport, in px (default 8). */
|
|
361
|
+
margin?: number;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Width of the panel of a field-like overlay: at least the width of the field, growing with its content up to a
|
|
365
|
+
* cap, never wider than the viewport minus its margins, and kept while the panel stays open. Bind `style()` on
|
|
366
|
+
* the panel element, call `open(origin)` when the panel opens and `lock(panel)` once it is laid out.
|
|
367
|
+
*/
|
|
368
|
+
export declare class TxPanelWidth {
|
|
369
|
+
private readonly box;
|
|
370
|
+
private readonly maxWidth;
|
|
371
|
+
private readonly matchOrigin;
|
|
372
|
+
private readonly fitContent;
|
|
373
|
+
private readonly margin;
|
|
374
|
+
/** Signal with the inline styles of the panel element; empty until the panel opens. */
|
|
375
|
+
readonly style: import("@angular/core").Signal<Record<string, string>>;
|
|
376
|
+
constructor(options?: TxPanelWidthOptions);
|
|
377
|
+
/** Measures the origin and the viewport when the panel opens; the panel sizes itself by its content again. */
|
|
378
|
+
open(origin: Element): void;
|
|
379
|
+
/**
|
|
380
|
+
* Keeps the width the panel has now until it opens again, widened by the hidden part of the elements matching
|
|
381
|
+
* `overflowing` (labels cut with an ellipsis that a virtual list leaves out of the content width) within the
|
|
382
|
+
* cap.
|
|
383
|
+
*/
|
|
384
|
+
lock(panel: HTMLElement | null | undefined, overflowing?: string): void;
|
|
385
|
+
}
|
|
344
386
|
export {};
|
|
345
387
|
//# 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","../../../../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;;EAEf;;EAEA;;;iBAIe;;EAEf;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;;wBC/Hc,eAAe,WAAW;EAAgB,MAAM;EAAiB,OAAO;;;wBAMxE,YAAY,MAAM,iBAAiB,OAAO,mBAAmB;;;;;wBAiC7D,YAAY,YAAW,aAA8B,kBAAa;;
|
|
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","../../../../packages/core/overlay/src/panel-width.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;;EAEf;;EAEA;;;iBAIe;;EAEf;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA;;EAEA;;;wBC/Hc,eAAe,WAAW;EAAgB,MAAM;EAAiB,OAAO;;;wBAMxE,YAAY,MAAM,iBAAiB,OAAO,mBAAmB;;;;;wBAiC7D,YAAY,YAAW,aAA8B,kBAAa;;;;;wBAUlE,iBAAiB,kBAAa;;wBAK9B,sBAAsB,UAAU,oBAAoB;;;;;wBASpD,cAAc,WAAW,aAAa,QAAQ,eAAe;;KAUxE,QAAQ,KAAK;;wBAWF,aAAa,UAAU,mBAAmB,QAAQ,OAAO,MAAM,eAAe,QAAQ;;;;;wBAUtF,YAAY,WAAW,qBAAqB,QAAQ,OAAO,MAAM,eAAe,QAAQ,kBAAkB;;iBAMzG;;EAEf;;EAEA,QAAQ;;EAER,MAAM;;EAEN,SAAS;;EAET;;;;;;wBAkBc,iBAAiB,WAAW,qBAAqB,MAAM,cAAc;;;;;;wBAyBrE,aAAa,OAAO,4BAA4B,OAAO;;;;;qBCvI1D;UACH;UACA;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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;;;;iBCbI;;;;;EAKf;;EAEA;;EAEA;;EAEA;;;;;;;qBAsBW;mBACM;mBACA;mBACA;mBACA;mBACA;;WAGR,+BAAK,OAAA;EAqBF,YAAA,UAAS;;EAQrB,KAAK,QAAQ;;;;;;EAcb,KAAK,OAAO,gCAAgC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
2
3
|
/**
|
|
3
4
|
* Plays the CSS animations of its element again whenever the bound key changes, without re-creating the
|
|
4
5
|
* element (a one-item `@for` would warn with NG0956). The animation stays driven by CSS, so `animation-play-state`
|
|
@@ -20,6 +21,11 @@ export declare class TxAnimationReplay {
|
|
|
20
21
|
};
|
|
21
22
|
}, {}, never, never, true, never>;
|
|
22
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Writes text to the clipboard: the Clipboard API in a secure context, a hidden selection with the copy command
|
|
26
|
+
* elsewhere or when the API refuses. Resolves to `true` when the text was copied, always `false` on the server.
|
|
27
|
+
*/
|
|
28
|
+
export declare function writeToClipboard(text: string, document?: Document | undefined): Promise<boolean>;
|
|
23
29
|
/** Reads a value by field name, with dots for nested fields; `undefined` when a step is missing. */
|
|
24
30
|
export declare function resolveField(row: unknown, field: string | undefined): unknown;
|
|
25
31
|
/** How a filter value is compared with a cell: text, number, list, range and date comparisons. */
|
|
@@ -85,4 +91,23 @@ export declare function txSwapMotion(effect: TxSwapEffect, direction: 1 | -1, ax
|
|
|
85
91
|
export declare function txCanAnimate(element: Element | null | undefined): element is HTMLElement;
|
|
86
92
|
/** Reads a CSS time custom property of an element in ms, or returns the fallback when it is not a number. */
|
|
87
93
|
export declare function txCssTime(element: Element, property: string, fallback: number): number;
|
|
94
|
+
/** How often a `TxTimeSource` signal changes: at each whole second or at each whole minute. */
|
|
95
|
+
export type TxTimeStep = 'second' | 'minute';
|
|
96
|
+
/** Milliseconds of each `TxTimeStep`. */
|
|
97
|
+
export declare const TX_TIME_STEP_MS: Readonly<Record<TxTimeStep, number>>;
|
|
98
|
+
/**
|
|
99
|
+
* The one time source of an app: `Date.now()` as a signal, from a single browser timer per step that every clock of the kit
|
|
100
|
+
* and `TxClock` share, so they all tick together at the start of each second or minute. No timer runs on the server.
|
|
101
|
+
*/
|
|
102
|
+
export declare class TxTimeSource {
|
|
103
|
+
private readonly browser;
|
|
104
|
+
private readonly sources;
|
|
105
|
+
private readonly timers;
|
|
106
|
+
constructor();
|
|
107
|
+
/** Signal of `Date.now()`, updated at the start of every second (default) or minute in the browser; the timer of a step starts on its first call. */
|
|
108
|
+
every(step?: TxTimeStep): Signal<number>;
|
|
109
|
+
private schedule;
|
|
110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxTimeSource, never>;
|
|
111
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
112
|
+
}
|
|
88
113
|
//# sourceMappingURL=tectra-ng-core-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
1
|
+
{"version":3,"file":"tectra-ng-core-utils.d.ts","names":[],"sources":["../../../../packages/core/utils/src/animation-replay.ts","../../../../packages/core/utils/src/clipboard.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","../../../../packages/core/utils/src/time-source.ts"],"mappings":";;;;;;;qBAQa;mBACM;UACT;UACA;;WAGC,6BAAG;;SAND,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAiB;MAAA;MAAA;MAAA;;;;;;;;wBCJR,iBAAiB,cAAc,WAAU,uBAA6C;;wBCH5F,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;;YChFlD;;qBAGC,iBAAiB,SAAS,OAAO;;;;;qBAOjC;mBACM;mBACA;mBACA;;;EAUjB,MAAM,OAAM,aAAwB;UAa5B;SA1BG,MAAA,GAAA,qBAAA"}
|