@area8975/ui 0.1.1-dev.21 → 0.1.1-dev.23
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/fesm2022/area8975-ui.mjs +87 -11
- package/fesm2022/area8975-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/area8975-ui.d.ts +37 -0
package/package.json
CHANGED
package/types/area8975-ui.d.ts
CHANGED
|
@@ -618,7 +618,19 @@ export type UiPrivacy = typeof UiPrivacies[number];
|
|
|
618
618
|
export declare const UI_PRIVACY: InjectionToken<Signal<"visible" | "discreet" | "hidden">>;
|
|
619
619
|
/** The factory runs in an injection context, so it can return a signal from an app service. */
|
|
620
620
|
export declare function provideUiPrivacy(privacy: () => Signal<UiPrivacy>): Provider;
|
|
621
|
+
/** The fixed mask for private text, e.g. a transaction's description. */
|
|
622
|
+
export declare const PRIVATE_TEXT_MASK = "- - -";
|
|
623
|
+
/** What screen readers hear in place of private text. */
|
|
624
|
+
export declare const PRIVATE_TEXT_LABEL = "text hidden";
|
|
621
625
|
export declare function maskMoney(currency: string, locale: string): string;
|
|
626
|
+
export interface PrivateTextFormatter {
|
|
627
|
+
/** The text, or `PRIVATE_TEXT_MASK`. For visible attributes like `title`. */
|
|
628
|
+
(text: string | null | undefined): string;
|
|
629
|
+
/** The text, or `PRIVATE_TEXT_LABEL`. For `aria-*`, so screen readers don't read out dashes. */
|
|
630
|
+
label: (text: string | null | undefined) => string;
|
|
631
|
+
}
|
|
632
|
+
/** Needs an injection context. Reads `UI_PRIVACY` on every call, so a template or computed calling it follows the mode. */
|
|
633
|
+
export declare function injectPrivateText(): PrivateTextFormatter;
|
|
622
634
|
/** Native type values ui-input supports. File/checkbox/radio/range need their own components. */
|
|
623
635
|
export declare const InputTypes: readonly ["text", "email", "tel", "url", "search", "password", "number", "date", "time", "datetime-local", "month", "week", "color"];
|
|
624
636
|
/** @see {@link InputTypes} */
|
|
@@ -2179,6 +2191,25 @@ export declare class UiPaginationComponent {
|
|
|
2179
2191
|
"page": "pageChange";
|
|
2180
2192
|
}, never, never, true, never>;
|
|
2181
2193
|
}
|
|
2194
|
+
/**
|
|
2195
|
+
* Text that privacy mode masks, e.g. a transaction's description.
|
|
2196
|
+
*/
|
|
2197
|
+
export declare class UiPrivateComponent {
|
|
2198
|
+
private readonly privacy;
|
|
2199
|
+
readonly text: import("@angular/core").InputSignal<string | null | undefined>;
|
|
2200
|
+
protected readonly mask = "- - -";
|
|
2201
|
+
protected readonly label = "text hidden";
|
|
2202
|
+
protected readonly masked: import("@angular/core").Signal<boolean>;
|
|
2203
|
+
readonly generatedClasses: import("@angular/core").Signal<string>;
|
|
2204
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiPrivateComponent, never>;
|
|
2205
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiPrivateComponent, "ui-private", never, {
|
|
2206
|
+
"text": {
|
|
2207
|
+
"alias": "text";
|
|
2208
|
+
"required": true;
|
|
2209
|
+
"isSignal": true;
|
|
2210
|
+
};
|
|
2211
|
+
}, {}, never, never, true, never>;
|
|
2212
|
+
}
|
|
2182
2213
|
/** Same names as badges, so a status reads the same wherever it shows. */
|
|
2183
2214
|
export declare const ProgressIntents: readonly ["primary", "secondary", "success", "warning", "danger"];
|
|
2184
2215
|
/** @see {@link ProgressIntents} */
|
|
@@ -2454,6 +2485,8 @@ export interface TableColumn<Row> {
|
|
|
2454
2485
|
displayType?: TableColumnDisplayType;
|
|
2455
2486
|
/** ISO currency code, used when displayType is 'currency'. Defaults to the currency from `provideUiFormat`. */
|
|
2456
2487
|
currency?: string;
|
|
2488
|
+
/** Masks the cell in privacy mode, e.g. a transaction's description. Currency cells are already masked, icon cells have no text. */
|
|
2489
|
+
sensitive?: boolean;
|
|
2457
2490
|
sortable?: boolean;
|
|
2458
2491
|
filterable?: boolean;
|
|
2459
2492
|
/** when set, the filter renders as a select instead of a free-text contains filter */
|
|
@@ -2562,6 +2595,8 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2562
2595
|
protected readonly hasFilterableColumns: import("@angular/core").Signal<boolean>;
|
|
2563
2596
|
protected readonly activeFilterCount: import("@angular/core").Signal<number>;
|
|
2564
2597
|
protected readonly hasActions: import("@angular/core").Signal<boolean>;
|
|
2598
|
+
private readonly hasSensitiveColumns;
|
|
2599
|
+
protected readonly fixedWidth: import("@angular/core").Signal<number | null>;
|
|
2565
2600
|
protected readonly actionsColumnWidth: import("@angular/core").Signal<number>;
|
|
2566
2601
|
protected readonly totalPages: import("@angular/core").Signal<number>;
|
|
2567
2602
|
protected readonly resultsLabel: import("@angular/core").Signal<string>;
|
|
@@ -2574,6 +2609,7 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2574
2609
|
private readonly cdr;
|
|
2575
2610
|
private readonly registry;
|
|
2576
2611
|
protected readonly uiFormat: import("@area8975/ui").UiFormat;
|
|
2612
|
+
private readonly privateText;
|
|
2577
2613
|
private loadedQuery;
|
|
2578
2614
|
private loadedFilters;
|
|
2579
2615
|
private resizeState;
|
|
@@ -2593,6 +2629,7 @@ export declare class UiTableComponent<Row = unknown> implements OnInit, OnDestro
|
|
|
2593
2629
|
protected filterDataSource(column: TableColumn<Row>): SelectDataSource<TableColumnFilterOption>;
|
|
2594
2630
|
protected selectedFilterOption(column: TableColumn<Row>): TableColumnFilterOption | null;
|
|
2595
2631
|
protected filterOptionLabel(option: TableColumnFilterOption): string;
|
|
2632
|
+
protected readonly sensitiveFilterOptionLabel: (option: TableColumnFilterOption) => string;
|
|
2596
2633
|
protected onFilterSelect(columnId: string, option: TableColumnFilterOption | null): void;
|
|
2597
2634
|
protected clearFilters(): void;
|
|
2598
2635
|
protected toggleSort(column: TableColumn<Row>): void;
|