shirkasoft-ui-components 1.3.15 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +447 -71
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +163 -102
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/package.json +33 -3
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-button.d.ts +1 -1
- package/types/shirkasoft-ui-components-config.d.ts +368 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
- package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
- package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
- package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
- package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
- package/types/shirkasoft-ui-components-knob.d.ts +28 -7
- package/types/shirkasoft-ui-components-modal.d.ts +11 -7
- package/types/shirkasoft-ui-components-notification.d.ts +2 -1
- package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
- package/types/shirkasoft-ui-components-select.d.ts +24 -8
- package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
- package/types/shirkasoft-ui-components-table.d.ts +91 -80
- package/types/shirkasoft-ui-components-tag.d.ts +1 -1
- package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
- package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
- package/types/shirkasoft-ui-components-theme.d.ts +88 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
- package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
- package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
- package/types/shirkasoft-ui-components-utils.d.ts +16 -6
- package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import
|
|
2
|
+
import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
|
|
3
3
|
import { TagSeverity } from 'shirkasoft-ui-components/tag';
|
|
4
4
|
|
|
5
5
|
/** Match modes available in the column filter menu. */
|
|
@@ -76,24 +76,13 @@ interface Column {
|
|
|
76
76
|
*/
|
|
77
77
|
template?: 'text' | 'tag' | 'progress' | 'boolean' | 'date' | 'currency';
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* `(
|
|
79
|
+
* Date pattern for `template: 'date'` ('dd/MM/yyyy', 'MMM d, y', 'yyyy-MM-dd HH:mm'…)
|
|
80
|
+
* or an Angular named format ('shortDate', 'mediumDate', 'longDate', 'fullDate',
|
|
81
|
+
* 'short', 'medium', 'long', 'full').
|
|
82
|
+
* Default: the `dates.format` option (automatic by locale: 'dd/MM/yyyy' for 'es').
|
|
83
83
|
*/
|
|
84
|
-
required?: boolean | ((row: any) => boolean);
|
|
85
|
-
/** Text shown in an empty required cell (default "Falta <header>"). */
|
|
86
|
-
missingMessage?: string;
|
|
87
|
-
/**
|
|
88
|
-
* How a missing value of this column is shown: `'error'` (red, mandatory)
|
|
89
|
-
* or `'warning'` (amber, informative). Defaults to the table's `missingAsError`.
|
|
90
|
-
*/
|
|
91
|
-
missingSeverity?: MissingSeverity;
|
|
92
|
-
/** Custom rule to decide whether the value is missing (default: empty value). */
|
|
93
|
-
isMissing?: (row: any) => boolean;
|
|
94
|
-
/** Angular date format for `template: 'date'` (default `'dd/MM/yyyy'`). */
|
|
95
84
|
dateFormat?: string;
|
|
96
|
-
/** ISO currency code for `template: 'currency'` (
|
|
85
|
+
/** ISO currency code for `template: 'currency'`. Default: the `numbers.currency` option ('USD'). */
|
|
97
86
|
currency?: string;
|
|
98
87
|
/** Image (avatar, flag...) rendered before the text of the cell. */
|
|
99
88
|
image?: (row: any) => string | undefined;
|
|
@@ -146,23 +135,38 @@ interface FilterChangeEvent {
|
|
|
146
135
|
[key: string]: ColumnFilterState;
|
|
147
136
|
};
|
|
148
137
|
}
|
|
149
|
-
/** Severity of a
|
|
150
|
-
type
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
138
|
+
/** Severity of a row problem: informational (blue), warning (amber) or blocking (red). */
|
|
139
|
+
type RowSeverity = 'low' | 'moderate' | 'critical';
|
|
140
|
+
/**
|
|
141
|
+
* Rule applied to one field of the payload. The key of the
|
|
142
|
+
* `rowValidations` map is the field (dot paths allowed), so the rule only
|
|
143
|
+
* needs to say when the value is a problem and how severe it is.
|
|
144
|
+
*/
|
|
145
|
+
interface RowValidation {
|
|
146
|
+
/**
|
|
147
|
+
* Condition over the field value and the whole row. Return `true` when the
|
|
148
|
+
* row has a problem in that field.
|
|
149
|
+
*
|
|
150
|
+
* @example (value) => value == null || Number(value) <= 0
|
|
151
|
+
* @example (value, row) => !row.factura_id && !value
|
|
152
|
+
*/
|
|
153
|
+
condition: (value: any, row: any) => boolean;
|
|
154
|
+
/** Color of the row: `low` blue, `moderate` amber, `critical` red. The worst one wins. */
|
|
155
|
+
severity: RowSeverity;
|
|
156
|
+
/**
|
|
157
|
+
* Message of the violation: a translation key (Transloco) or literal text.
|
|
158
|
+
* When the key isn't translated, the literal is used as is.
|
|
159
|
+
*/
|
|
160
|
+
message?: string;
|
|
161
|
+
/** Values interpolated into `message` (`{{name}}`), resolved per row. */
|
|
162
|
+
messageParams?: (value: any, row: any) => Record<string, unknown>;
|
|
156
163
|
}
|
|
157
|
-
/** A
|
|
158
|
-
interface
|
|
164
|
+
/** A violation found by `rowValidations`, with its message already translated. */
|
|
165
|
+
interface RowViolation {
|
|
166
|
+
/** Field of the payload that failed (the key of `rowValidations`). */
|
|
159
167
|
field: string;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
required: true | ((row: any) => boolean);
|
|
163
|
-
isMissing?: (row: any) => boolean;
|
|
164
|
-
/** The required column. */
|
|
165
|
-
column: Column;
|
|
168
|
+
severity: RowSeverity;
|
|
169
|
+
message?: string;
|
|
166
170
|
}
|
|
167
171
|
/** Internal filter kind (`exact` is a `text` filter). */
|
|
168
172
|
type FilterKind = 'text' | 'numeric' | 'date' | 'select' | 'multiselect' | 'boolean' | 'range';
|
|
@@ -176,17 +180,21 @@ declare class TableComponent {
|
|
|
176
180
|
protected readonly uid: string;
|
|
177
181
|
private cdr;
|
|
178
182
|
private transloco;
|
|
183
|
+
/** Library-wide options: default date pattern, locale and currency of the cells. */
|
|
184
|
+
private readonly config;
|
|
179
185
|
private destroyRef;
|
|
180
186
|
private injector;
|
|
181
|
-
/** Maps icon names to
|
|
182
|
-
protected getIcon: (name: any) =>
|
|
187
|
+
/** Maps icon names to SVG data, falling back to a plus icon. */
|
|
188
|
+
protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
|
|
183
189
|
/** Icons used directly by the template (not part of the central map). */
|
|
184
190
|
protected readonly icons: {
|
|
185
|
-
clear:
|
|
186
|
-
yes:
|
|
187
|
-
no:
|
|
188
|
-
trash:
|
|
189
|
-
|
|
191
|
+
clear: shirkasoft_ui_components_icons.IconNode;
|
|
192
|
+
yes: shirkasoft_ui_components_icons.IconNode;
|
|
193
|
+
no: shirkasoft_ui_components_icons.IconNode;
|
|
194
|
+
trash: shirkasoft_ui_components_icons.IconNode;
|
|
195
|
+
low: shirkasoft_ui_components_icons.IconNode;
|
|
196
|
+
moderate: shirkasoft_ui_components_icons.IconNode;
|
|
197
|
+
critical: shirkasoft_ui_components_icons.IconNode;
|
|
190
198
|
};
|
|
191
199
|
/**
|
|
192
200
|
* Minimum width applied to each column (except `actions`, which keeps its
|
|
@@ -259,15 +267,12 @@ declare class TableComponent {
|
|
|
259
267
|
*/
|
|
260
268
|
resizableColumns: _angular_core.InputSignal<boolean>;
|
|
261
269
|
/**
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Default severity of missing cells: errors (red) when true, warnings
|
|
268
|
-
* (amber) when false. Each column can override it with `missingSeverity`.
|
|
270
|
+
* Rules to flag rows with problems, keyed by field of the payload. Each rule
|
|
271
|
+
* applies a condition to the value of that field and paints the whole row:
|
|
272
|
+
* `low` blue, `moderate` amber, `critical` red. When a row has several
|
|
273
|
+
* issues the worst severity wins. See `RowValidation`.
|
|
269
274
|
*/
|
|
270
|
-
|
|
275
|
+
rowValidations: _angular_core.InputSignal<Record<string, RowValidation>>;
|
|
271
276
|
/**
|
|
272
277
|
* Column widths (px) keyed by field. Two-way bindable via
|
|
273
278
|
* `[(columnWidths)]` to restore/save them yourself.
|
|
@@ -297,6 +302,12 @@ declare class TableComponent {
|
|
|
297
302
|
dataKey: _angular_core.InputSignal<string>;
|
|
298
303
|
/** Optional predicate to disable the checkbox of specific rows. */
|
|
299
304
|
isRowSelectable: _angular_core.InputSignal<((row: any) => boolean) | undefined>;
|
|
305
|
+
/**
|
|
306
|
+
* With `selectable`, clicking anywhere on a row toggles its selection (not
|
|
307
|
+
* only the checkbox). Clicks on buttons, links and form controls inside the
|
|
308
|
+
* row (row actions, custom templates) are ignored.
|
|
309
|
+
*/
|
|
310
|
+
selectOnRowClick: _angular_core.InputSignal<boolean>;
|
|
300
311
|
/** Actions shown in the header while at least one row is selected. */
|
|
301
312
|
bulkActions: _angular_core.InputSignal<BulkAction[]>;
|
|
302
313
|
/** Selected rows. Supports two-way binding via `[(selection)]`. */
|
|
@@ -374,39 +385,33 @@ declare class TableComponent {
|
|
|
374
385
|
visibleBulkActions: _angular_core.Signal<BulkAction[]>;
|
|
375
386
|
/** Number of rendered columns, including the selection column. */
|
|
376
387
|
totalColspan: _angular_core.Signal<number>;
|
|
377
|
-
/**
|
|
378
|
-
private
|
|
379
|
-
/**
|
|
380
|
-
private
|
|
381
|
-
/**
|
|
382
|
-
private
|
|
383
|
-
/**
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
private requirementMissing;
|
|
388
|
-
/** Missing requirements of each displayed row (cached per render). */
|
|
389
|
-
private missingByRow;
|
|
390
|
-
/** Required columns that are empty in the row. */
|
|
391
|
-
missingFields(row: any): MissingRequirement[];
|
|
392
|
-
/** Whether a cell is a required column without value. */
|
|
393
|
-
isCellMissing(col: Column, row: any): boolean;
|
|
388
|
+
/** Rank used to pick the worst severity of a row. */
|
|
389
|
+
private readonly severityRank;
|
|
390
|
+
/** Violations of each displayed row (cached per render, re-evaluated on i18n changes). */
|
|
391
|
+
private violationsByRow;
|
|
392
|
+
/** Evaluates the rules against a row and returns its violations (messages already translated). */
|
|
393
|
+
private collectViolations;
|
|
394
|
+
/** Message of a rule: translated when `message` is a registered key, literal otherwise. */
|
|
395
|
+
private resolveViolationMessage;
|
|
396
|
+
/** Violations of a row (empty when it has no issues). */
|
|
397
|
+
rowViolationsOf(row: any): RowViolation[];
|
|
394
398
|
/**
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
* be used before adding the row.
|
|
399
|
+
* Highest severity of a row: `'critical'` > `'moderate'` > `'low'`, or `null`
|
|
400
|
+
* when the row has no issues.
|
|
398
401
|
*/
|
|
399
|
-
|
|
402
|
+
rowSeverity(row: any): RowSeverity | null;
|
|
400
403
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
404
|
+
* Checks any object (e.g. the payload of a modal) against `rowValidations`,
|
|
405
|
+
* returning its violations (empty = no issues). The row doesn't need to be
|
|
406
|
+
* displayed, so it can be used before adding it.
|
|
403
407
|
*/
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
|
|
407
|
-
/** Icon of
|
|
408
|
-
protected
|
|
409
|
-
|
|
408
|
+
validateRow(row: any): RowViolation[];
|
|
409
|
+
/** Tooltip of a row: its violation messages, one per line. */
|
|
410
|
+
protected rowValidationTitle(row: any): string | null;
|
|
411
|
+
/** Icon of the severity indicator shown in the actions cell. */
|
|
412
|
+
protected rowValidationIcon(row: any): any;
|
|
413
|
+
/** Accessible label of the severity indicator (the messages, or the severity). */
|
|
414
|
+
protected rowValidationLabel(row: any): string;
|
|
410
415
|
/** Total records: server-provided in server mode, locally computed otherwise. */
|
|
411
416
|
effectiveTotalRecords: _angular_core.Signal<number>;
|
|
412
417
|
/**
|
|
@@ -490,6 +495,8 @@ declare class TableComponent {
|
|
|
490
495
|
isRowSelected(row: any): boolean;
|
|
491
496
|
/** Selects/deselects a single row. */
|
|
492
497
|
toggleRowSelection(row: any): void;
|
|
498
|
+
/** Row click: toggles the selection when `selectOnRowClick` is on. */
|
|
499
|
+
onRowClick(event: MouseEvent, row: any): void;
|
|
493
500
|
/**
|
|
494
501
|
* Header checkbox: selects every selectable row of the current page or,
|
|
495
502
|
* when all of them are already selected, removes them from the selection.
|
|
@@ -636,10 +643,14 @@ declare class TableComponent {
|
|
|
636
643
|
/** Resets the table to the first page. */
|
|
637
644
|
reset(): void;
|
|
638
645
|
/** Resolves the row action label, static or per-row function. */
|
|
646
|
+
/** Text of a `template: 'date'` cell (column pattern, else the `dates.*` options). */
|
|
647
|
+
formatDateCell(value: unknown, col: Column): string;
|
|
648
|
+
/** Text of a `template: 'currency'` cell (column currency, else the `numbers.*` options). */
|
|
649
|
+
formatCurrencyCell(value: unknown, col: Column): string;
|
|
639
650
|
getRowActionLabel(action: RowAction, rowData: any): string;
|
|
640
651
|
/**
|
|
641
|
-
* Resolves the row action icon:
|
|
642
|
-
* the
|
|
652
|
+
* Resolves the row action icon: `IconNode` data, a function returning the
|
|
653
|
+
* icon for the row, or a raw string resolved by the central icon map.
|
|
643
654
|
*/
|
|
644
655
|
getRowActionIconName(action: RowAction, rowData: any): any;
|
|
645
656
|
/** Resolves the CSS class of a row action, static or per-row function. */
|
|
@@ -699,8 +710,8 @@ declare class TableComponent {
|
|
|
699
710
|
/** Closes the column filter menu with Escape. */
|
|
700
711
|
onEscape(): void;
|
|
701
712
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
702
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "shk-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rowsPerPage": { "alias": "rowsPerPage"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showActionRow": { "alias": "showActionRow"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "defaultSortField": { "alias": "defaultSortField"; "required": false; "isSignal": true; }; "defaultSortOrder": { "alias": "defaultSortOrder"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "serverSide": { "alias": "serverSide"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "activeFilter": { "alias": "activeFilter"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "resizableColumns": { "alias": "resizableColumns"; "required": false; "isSignal": true; }; "
|
|
713
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "shk-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rowsPerPage": { "alias": "rowsPerPage"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showActionRow": { "alias": "showActionRow"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "defaultSortField": { "alias": "defaultSortField"; "required": false; "isSignal": true; }; "defaultSortOrder": { "alias": "defaultSortOrder"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "globalFilterFields": { "alias": "globalFilterFields"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "serverSide": { "alias": "serverSide"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "activeFilter": { "alias": "activeFilter"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "resizableColumns": { "alias": "resizableColumns"; "required": false; "isSignal": true; }; "rowValidations": { "alias": "rowValidations"; "required": false; "isSignal": true; }; "columnWidths": { "alias": "columnWidths"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "stateStorage": { "alias": "stateStorage"; "required": false; "isSignal": true; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showPageReport": { "alias": "showPageReport"; "required": false; "isSignal": true; }; "showRowsPerPage": { "alias": "showRowsPerPage"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "isRowSelectable": { "alias": "isRowSelectable"; "required": false; "isSignal": true; }; "selectOnRowClick": { "alias": "selectOnRowClick"; "required": false; "isSignal": true; }; "bulkActions": { "alias": "bulkActions"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; }, { "columnWidths": "columnWidthsChange"; "selection": "selectionChange"; "refresh": "refresh"; "pageChange": "pageChange"; "filterChange": "filterChange"; "searchChange": "searchChange"; "filterClick": "filterClick"; "columnResize": "columnResize"; }, never, never, true, never>;
|
|
703
714
|
}
|
|
704
715
|
|
|
705
716
|
export { TableComponent };
|
|
706
|
-
export type { BulkAction, Column, ColumnFilterState, ColumnFilterType, FilterChangeEvent, FilterMatchMode, FilterOperator, FilterOption, FilterRule,
|
|
717
|
+
export type { BulkAction, Column, ColumnFilterState, ColumnFilterType, FilterChangeEvent, FilterMatchMode, FilterOperator, FilterOption, FilterRule, PageChangeEvent, RowAction, RowSeverity, RowValidation, RowViolation, TableAction };
|
|
@@ -15,7 +15,7 @@ declare class TagComponent {
|
|
|
15
15
|
severity: _angular_core.InputSignal<TagSeverity>;
|
|
16
16
|
/** Renders the tag with fully rounded corners (pill). */
|
|
17
17
|
rounded: _angular_core.InputSignal<boolean>;
|
|
18
|
-
/** Optional leading
|
|
18
|
+
/** Optional leading icon: registered name (e.g. `'check'`) or `IconNode` data. */
|
|
19
19
|
icon: _angular_core.InputSignal<any>;
|
|
20
20
|
/** Inline styles applied to the tag. */
|
|
21
21
|
style: _angular_core.InputSignal<Record<string, string | number>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { ElementRef } from '@angular/core';
|
|
3
4
|
import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
|
|
5
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Shirkasoft UI Components.
|
|
@@ -11,7 +13,7 @@ import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
|
|
|
11
13
|
* Text input (or textarea) that implements ControlValueAccessor with built-in
|
|
12
14
|
* validation messages, card/number formatting, password reveal and search mode.
|
|
13
15
|
*/
|
|
14
|
-
declare class TextFieldComponent implements ControlValueAccessor {
|
|
16
|
+
declare class TextFieldComponent implements ControlValueAccessor, FormValueControl<any> {
|
|
15
17
|
private cdr;
|
|
16
18
|
/** id attribute applied to the native input. */
|
|
17
19
|
id: _angular_core.InputSignal<string>;
|
|
@@ -55,13 +57,17 @@ declare class TextFieldComponent implements ControlValueAccessor {
|
|
|
55
57
|
autocomplete: _angular_core.InputSignal<string>;
|
|
56
58
|
/** Emitted when the search button is clicked (search mode). */
|
|
57
59
|
searchButtonClick: _angular_core.OutputEmitterRef<void>;
|
|
58
|
-
|
|
60
|
+
/** Emitted on blur so Signal Forms can mark the field as touched. */
|
|
61
|
+
touch: _angular_core.OutputEmitterRef<void>;
|
|
62
|
+
protected readonly getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
|
|
59
63
|
/** Reference to the native input element. */
|
|
60
64
|
inputElement: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
61
65
|
/** Reference to the native textarea element. */
|
|
62
66
|
textareaElement: _angular_core.Signal<ElementRef<HTMLTextAreaElement> | undefined>;
|
|
63
|
-
/**
|
|
64
|
-
|
|
67
|
+
/** Field value. Two-way bindable and used by Signal Forms `[formField]`. */
|
|
68
|
+
value: _angular_core.ModelSignal<any>;
|
|
69
|
+
/** Internal alias kept for the existing implementation. */
|
|
70
|
+
private get _value();
|
|
65
71
|
/** Reactive disabled state from the form control. */
|
|
66
72
|
private _disabledState;
|
|
67
73
|
/** Whether the password is currently revealed. */
|
|
@@ -72,18 +78,28 @@ declare class TextFieldComponent implements ControlValueAccessor {
|
|
|
72
78
|
private errorTracker;
|
|
73
79
|
/** Text displayed in search mode when `displayValue` is set. */
|
|
74
80
|
displayLabel: _angular_core.Signal<string>;
|
|
75
|
-
/**
|
|
76
|
-
private
|
|
81
|
+
/** Control whose status/value changes are currently observed. */
|
|
82
|
+
private observedControl;
|
|
83
|
+
/** Subscription to `observedControl`; replaced when the control changes. */
|
|
84
|
+
private controlSubscription?;
|
|
77
85
|
/** Effective disabled state combining the input and the form binding. */
|
|
78
86
|
isDisabled: _angular_core.Signal<boolean>;
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Internal control used when no reactive control is supplied (`[formField]`,
|
|
89
|
+
* `formControlName`/`ngModel` on the host, or plain `[(value)]`). The native
|
|
90
|
+
* input always needs a control for its `[formControl]` binding.
|
|
91
|
+
*/
|
|
92
|
+
private readonly innerControl;
|
|
93
|
+
/** Explicit `control`, or `formGroup.get(label)`, or `undefined` if none. */
|
|
94
|
+
private externalControl;
|
|
95
|
+
/** True when the field is driven by its internal control (no reactive control given). */
|
|
96
|
+
private usesInnerControl;
|
|
97
|
+
/** Resolves the reactive control: external one if any, otherwise the internal one. */
|
|
98
|
+
actualControl: _angular_core.Signal<FormControl<any>>;
|
|
83
99
|
/** True when the resolved control is invalid and dirty or touched. */
|
|
84
|
-
shouldShowError: _angular_core.Signal<boolean
|
|
100
|
+
shouldShowError: _angular_core.Signal<boolean>;
|
|
85
101
|
/** True when the control had an error before and is now valid (success state). */
|
|
86
|
-
wasFixedError: _angular_core.Signal<boolean
|
|
102
|
+
wasFixedError: _angular_core.Signal<boolean>;
|
|
87
103
|
/** Resolved list of error messages for the current control state. */
|
|
88
104
|
getErrorMessages: _angular_core.Signal<string[]>;
|
|
89
105
|
/** Effective input type (handles textarea and password reveal). */
|
|
@@ -114,7 +130,7 @@ declare class TextFieldComponent implements ControlValueAccessor {
|
|
|
114
130
|
/** Reflects the disabled state of the form control. */
|
|
115
131
|
setDisabledState(isDisabled: boolean): void;
|
|
116
132
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextFieldComponent, never>;
|
|
117
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextFieldComponent, "shk-text-field", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "formatCard": { "alias": "formatCard"; "required": false; "isSignal": true; }; "preventNegative": { "alias": "preventNegative"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "numbersOnly": { "alias": "numbersOnly"; "required": false; "isSignal": true; }; "allowDecimals": { "alias": "allowDecimals"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "isTextArea": { "alias": "isTextArea"; "required": false; "isSignal": true; }; "textAreaHeight": { "alias": "textAreaHeight"; "required": false; "isSignal": true; }; "searchMode": { "alias": "searchMode"; "required": false; "isSignal": true; }; "displayValue": { "alias": "displayValue"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; }, { "searchButtonClick": "searchButtonClick"; }, never, never, true, never>;
|
|
133
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextFieldComponent, "shk-text-field", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "formatCard": { "alias": "formatCard"; "required": false; "isSignal": true; }; "preventNegative": { "alias": "preventNegative"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "numbersOnly": { "alias": "numbersOnly"; "required": false; "isSignal": true; }; "allowDecimals": { "alias": "allowDecimals"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "isTextArea": { "alias": "isTextArea"; "required": false; "isSignal": true; }; "textAreaHeight": { "alias": "textAreaHeight"; "required": false; "isSignal": true; }; "searchMode": { "alias": "searchMode"; "required": false; "isSignal": true; }; "displayValue": { "alias": "displayValue"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "searchButtonClick": "searchButtonClick"; "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
|
|
118
134
|
}
|
|
119
135
|
|
|
120
136
|
export { TextFieldComponent };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as shirkasoft_ui_components_config from 'shirkasoft-ui-components/config';
|
|
2
|
+
import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Shirkasoft UI Components.
|
|
7
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
8
|
+
* Belongs to Shirkasoft.
|
|
9
|
+
*/
|
|
10
|
+
/** A primary color offered by the picker. */
|
|
11
|
+
interface ShkPickerColor {
|
|
12
|
+
/** Hex color; it becomes `--shk-primary-600` (`theme.primary`). */
|
|
13
|
+
color: string;
|
|
14
|
+
/** Accessible name / tooltip. */
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Default primary colors (Tailwind 600 shades). Red and rose are left out on
|
|
19
|
+
* purpose: red is reserved for danger states.
|
|
20
|
+
*/
|
|
21
|
+
declare const DEFAULT_PRIMARY_COLORS: readonly ShkPickerColor[];
|
|
22
|
+
/**
|
|
23
|
+
* Theme customizer: a palette button that opens a panel to pick the primary
|
|
24
|
+
* color, the surface (neutral) palette and a theme preset at runtime.
|
|
25
|
+
*
|
|
26
|
+
* It edits the `theme.primary`, `theme.surface` and `theme.name` options, so it
|
|
27
|
+
* needs `provideShk(withTheme(...))`; add `withPersistence()` to remember the
|
|
28
|
+
* choice. Without `withTheme()` it renders nothing.
|
|
29
|
+
*
|
|
30
|
+
* ```html
|
|
31
|
+
* <shk-theme-picker />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare class ThemePickerComponent {
|
|
35
|
+
private readonly config;
|
|
36
|
+
private readonly host;
|
|
37
|
+
private readonly trigger;
|
|
38
|
+
/** Primary colors offered. */
|
|
39
|
+
readonly primaryColors: _angular_core.InputSignal<readonly ShkPickerColor[]>;
|
|
40
|
+
/** Shows the surface (neutral palette) section. */
|
|
41
|
+
readonly showSurface: _angular_core.InputSignal<boolean>;
|
|
42
|
+
/** Shows the theme presets section (needs more than one preset). */
|
|
43
|
+
readonly showPresets: _angular_core.InputSignal<boolean>;
|
|
44
|
+
/** Accessible name and tooltip of the button. */
|
|
45
|
+
readonly triggerLabel: _angular_core.InputSignal<string>;
|
|
46
|
+
readonly primaryLabel: _angular_core.InputSignal<string>;
|
|
47
|
+
readonly surfaceLabel: _angular_core.InputSignal<string>;
|
|
48
|
+
readonly presetsLabel: _angular_core.InputSignal<string>;
|
|
49
|
+
/** `theme.*` options exist only when the app uses `withTheme()`. */
|
|
50
|
+
protected readonly available: boolean;
|
|
51
|
+
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
52
|
+
protected readonly panelId: string;
|
|
53
|
+
protected readonly paletteIcon: shirkasoft_ui_components_icons.IconNode | null;
|
|
54
|
+
protected readonly presets: readonly shirkasoft_ui_components_config.ShkThemePreset[];
|
|
55
|
+
/** Surface palettes, each shown with its 500 shade. */
|
|
56
|
+
protected readonly surfaces: {
|
|
57
|
+
name: string;
|
|
58
|
+
label: string;
|
|
59
|
+
color: string;
|
|
60
|
+
}[];
|
|
61
|
+
protected readonly themeName: _angular_core.Signal<string>;
|
|
62
|
+
private readonly currentPreset;
|
|
63
|
+
private readonly primaryOverride;
|
|
64
|
+
private readonly surfaceOverride;
|
|
65
|
+
/** Primary color in use: the override, else the preset's own (lowercase hex). */
|
|
66
|
+
protected readonly activePrimary: _angular_core.Signal<string>;
|
|
67
|
+
/** Surface palette in use: the override, else the preset's own. */
|
|
68
|
+
protected readonly activeSurface: _angular_core.Signal<string>;
|
|
69
|
+
/** True while no primary/surface override is applied on top of the preset. */
|
|
70
|
+
protected readonly isPresetPure: _angular_core.Signal<boolean>;
|
|
71
|
+
protected toggle(): void;
|
|
72
|
+
protected setPrimary(color: string): void;
|
|
73
|
+
protected setSurface(name: string): void;
|
|
74
|
+
/** Applies a theme pack and clears the primary/surface overrides. */
|
|
75
|
+
protected setPreset(name: string): void;
|
|
76
|
+
protected onDocumentPointerDown(event: PointerEvent): void;
|
|
77
|
+
protected onEscape(): void;
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemePickerComponent, never>;
|
|
79
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemePickerComponent, "shk-theme-picker", never, { "primaryColors": { "alias": "primaryColors"; "required": false; "isSignal": true; }; "showSurface": { "alias": "showSurface"; "required": false; "isSignal": true; }; "showPresets": { "alias": "showPresets"; "required": false; "isSignal": true; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; "isSignal": true; }; "primaryLabel": { "alias": "primaryLabel"; "required": false; "isSignal": true; }; "surfaceLabel": { "alias": "surfaceLabel"; "required": false; "isSignal": true; }; "presetsLabel": { "alias": "presetsLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { DEFAULT_PRIMARY_COLORS, ThemePickerComponent };
|
|
83
|
+
export type { ShkPickerColor };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Built-in theme packs shipped with the library. */
|
|
5
|
+
type ShkThemeName = 'default' | 'ocean' | 'violet' | 'sunset' | (string & {});
|
|
6
|
+
/** Color scheme selection. `system` follows `prefers-color-scheme`. */
|
|
7
|
+
type ShkColorScheme = 'light' | 'dark' | 'system';
|
|
8
|
+
interface ShkThemeConfig {
|
|
9
|
+
/** Theme applied when nothing is stored yet. Defaults to `default`. */
|
|
10
|
+
defaultTheme?: ShkThemeName;
|
|
11
|
+
/** Scheme applied when nothing is stored yet. Defaults to `system`. */
|
|
12
|
+
defaultScheme?: ShkColorScheme;
|
|
13
|
+
/** Persist the selection in localStorage. Defaults to `true`. */
|
|
14
|
+
persist?: boolean;
|
|
15
|
+
/** localStorage keys. */
|
|
16
|
+
storageKey?: string;
|
|
17
|
+
schemeStorageKey?: string;
|
|
18
|
+
/** Attribute written on <html>. Defaults to `data-shk-theme`. */
|
|
19
|
+
attribute?: string;
|
|
20
|
+
/** Class toggled on <html> for dark mode. Defaults to `dark`. */
|
|
21
|
+
darkClass?: string;
|
|
22
|
+
}
|
|
23
|
+
type ResolvedShkThemeConfig = Required<ShkThemeConfig>;
|
|
24
|
+
declare const SHK_THEMES: readonly ShkThemeName[];
|
|
25
|
+
declare const DEFAULT_SHK_THEME_CONFIG: ResolvedShkThemeConfig;
|
|
26
|
+
declare const SHK_THEME_CONFIG: InjectionToken<Required<ShkThemeConfig>>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Shirkasoft UI Components.
|
|
30
|
+
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
31
|
+
* Belongs to Shirkasoft.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Configures the theme system and applies the stored/default theme while the
|
|
36
|
+
* app boots, so it is active even if nothing injects `ShkThemeService`.
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* bootstrapApplication(App, {
|
|
40
|
+
* providers: [provideShkTheme({ defaultTheme: 'ocean', defaultScheme: 'dark' })],
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function provideShkTheme(config?: ShkThemeConfig): EnvironmentProviders;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Applies and persists the color theme.
|
|
48
|
+
*
|
|
49
|
+
* Themes are plain CSS custom properties, so switching a theme is just an
|
|
50
|
+
* attribute change on `<html>` — no component re-render involved.
|
|
51
|
+
*/
|
|
52
|
+
declare class ShkThemeService {
|
|
53
|
+
private readonly doc;
|
|
54
|
+
private readonly config;
|
|
55
|
+
private readonly win;
|
|
56
|
+
/** Every theme name the service knows about. */
|
|
57
|
+
readonly availableThemes: readonly ShkThemeName[];
|
|
58
|
+
/** Currently active theme. */
|
|
59
|
+
readonly theme: _angular_core.WritableSignal<ShkThemeName>;
|
|
60
|
+
/** Currently selected scheme (`light`, `dark` or `system`). */
|
|
61
|
+
readonly scheme: _angular_core.WritableSignal<ShkColorScheme>;
|
|
62
|
+
/** `true` when dark colors are being applied. */
|
|
63
|
+
readonly isDark: _angular_core.WritableSignal<boolean>;
|
|
64
|
+
/** Convenience flag for templates. */
|
|
65
|
+
readonly isSystem: _angular_core.Signal<boolean>;
|
|
66
|
+
private mediaQuery?;
|
|
67
|
+
constructor();
|
|
68
|
+
/** Switches the active theme pack. */
|
|
69
|
+
setTheme(theme: ShkThemeName): void;
|
|
70
|
+
/** Selects light, dark or system scheme. */
|
|
71
|
+
setScheme(scheme: ShkColorScheme): void;
|
|
72
|
+
/** Flips between light and dark (leaves `system` on the opposite value). */
|
|
73
|
+
toggleDark(): void;
|
|
74
|
+
/** Applies a theme without persisting it (useful for previews). */
|
|
75
|
+
previewTheme(theme: ShkThemeName): void;
|
|
76
|
+
private restore;
|
|
77
|
+
private applyTheme;
|
|
78
|
+
private applyScheme;
|
|
79
|
+
private watchSystem;
|
|
80
|
+
private prefersDark;
|
|
81
|
+
private read;
|
|
82
|
+
private persist;
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShkThemeService, never>;
|
|
84
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShkThemeService>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { DEFAULT_SHK_THEME_CONFIG, SHK_THEMES, SHK_THEME_CONFIG, ShkThemeService, provideShkTheme };
|
|
88
|
+
export type { ResolvedShkThemeConfig, ShkColorScheme, ShkThemeConfig, ShkThemeName };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shirkasoft UI Components.
|
|
@@ -18,7 +19,7 @@ interface TimelineSubItem {
|
|
|
18
19
|
subtitle?: string;
|
|
19
20
|
/** Used to look up icon / color in `iconMap` and `iconColors`. */
|
|
20
21
|
type?: string;
|
|
21
|
-
/** Overrides the resolved icon (name or
|
|
22
|
+
/** Overrides the resolved icon (registered name or `IconNode` data). */
|
|
22
23
|
icon?: string | any;
|
|
23
24
|
/** Hex background for the icon box (fallback). */
|
|
24
25
|
color?: string;
|
|
@@ -80,10 +81,10 @@ declare const DEFAULT_SUPPLIER_ICON_COLORS: Record<string, {
|
|
|
80
81
|
bg: string;
|
|
81
82
|
text: string;
|
|
82
83
|
}>;
|
|
83
|
-
/** Maps a sub-item `type` to
|
|
84
|
+
/** Maps a sub-item `type` to its icon data (`IconNode`). */
|
|
84
85
|
declare const DEFAULT_SUPPLIER_TYPE_ICONS: Record<string, any>;
|
|
85
86
|
declare class TimelineComponent {
|
|
86
|
-
protected getIcon: (name: any) =>
|
|
87
|
+
protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
|
|
87
88
|
/** Timeline data. */
|
|
88
89
|
items: _angular_core.InputSignal<TimelineItem[]>;
|
|
89
90
|
/** 'left' = line and markers on the left; 'alternate' = cards alternate around a centered line on lg+; 'split' = markers centered with days on the left and activities on the right. */
|
|
@@ -119,7 +120,7 @@ declare class TimelineComponent {
|
|
|
119
120
|
addSubItemTooltip: _angular_core.InputSignal<string>;
|
|
120
121
|
itemActions: _angular_core.InputSignal<TimelineItemAction[]>;
|
|
121
122
|
subItemActions: _angular_core.InputSignal<TimelineSubItemAction[]>;
|
|
122
|
-
/** Maps a sub-item `type` to
|
|
123
|
+
/** Maps a sub-item `type` to an icon (registered name or `IconNode` data). */
|
|
123
124
|
iconMap: _angular_core.InputSignal<{
|
|
124
125
|
[type: string]: any;
|
|
125
126
|
}>;
|