@masterteam/components 0.0.115 → 0.0.117

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.
Files changed (40) hide show
  1. package/assets/common.css +172 -2
  2. package/fesm2022/masterteam-components-business-fields.mjs +1 -1
  3. package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
  4. package/fesm2022/masterteam-components-drawer.mjs +6 -6
  5. package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-entities.mjs +257 -34
  7. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-formula.mjs +25 -8
  9. package/fesm2022/masterteam-components-formula.mjs.map +1 -1
  10. package/fesm2022/masterteam-components-progress.mjs +10 -2
  11. package/fesm2022/masterteam-components-progress.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-table.mjs +417 -55
  13. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  14. package/package.json +16 -16
  15. package/types/masterteam-components-drawer.d.ts +1 -1
  16. package/types/masterteam-components-entities.d.ts +30 -6
  17. package/types/masterteam-components-formula.d.ts +8 -1
  18. package/types/masterteam-components-progress.d.ts +2 -0
  19. package/types/masterteam-components-table.d.ts +31 -2
  20. package/fesm2022/masterteam-components-sidebar.mjs +0 -36
  21. package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
  22. package/fesm2022/masterteam-components-slider-field.mjs +0 -104
  23. package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
  24. package/fesm2022/masterteam-components-statistic-card.mjs +0 -22
  25. package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
  26. package/fesm2022/masterteam-components-textarea-field.mjs +0 -92
  27. package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
  28. package/fesm2022/masterteam-components-toast.mjs +0 -75
  29. package/fesm2022/masterteam-components-toast.mjs.map +0 -1
  30. package/fesm2022/masterteam-components-topbar.mjs +0 -28
  31. package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
  32. package/fesm2022/masterteam-components-tree.mjs +0 -219
  33. package/fesm2022/masterteam-components-tree.mjs.map +0 -1
  34. package/types/masterteam-components-sidebar.d.ts +0 -28
  35. package/types/masterteam-components-slider-field.d.ts +0 -45
  36. package/types/masterteam-components-statistic-card.d.ts +0 -18
  37. package/types/masterteam-components-textarea-field.d.ts +0 -38
  38. package/types/masterteam-components-toast.d.ts +0 -26
  39. package/types/masterteam-components-topbar.d.ts +0 -17
  40. package/types/masterteam-components-tree.d.ts +0 -98
@@ -1,10 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef, NgZone } from '@angular/core';
3
3
  import { HttpContext } from '@angular/common/http';
4
- import * as _masterteam_components_entities from '@masterteam/components/entities';
4
+ import { MTIcon } from '@masterteam/icons';
5
5
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
6
6
 
7
- type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment';
7
+ type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'LookupMatrix';
8
8
  /** Entity size – controls column span (1-24) inside a 24-column grid */
9
9
  type EntitySize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
10
10
  interface EntityBaseConfig {
@@ -155,6 +155,7 @@ declare class EntityPercentage {
155
155
  readonly numericValue: _angular_core.Signal<number>;
156
156
  readonly maxValue: _angular_core.Signal<number>;
157
157
  readonly hideName: _angular_core.Signal<boolean>;
158
+ private parseNumericValue;
158
159
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPercentage, never>;
159
160
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPercentage, "mt-entity-percentage", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "rawValue": { "alias": "rawValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
160
161
  }
@@ -224,36 +225,59 @@ declare class EntityLookup {
224
225
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLookup, "mt-entity-lookup", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
225
226
  }
226
227
 
228
+ type AttachmentReference = EntityAttachmentItemValue | string;
227
229
  declare class EntityAttachment {
228
230
  readonly data: _angular_core.InputSignal<EntityData | undefined>;
229
231
  readonly name: _angular_core.InputSignal<string | undefined>;
232
+ readonly shape: _angular_core.InputSignal<"default" | "compact">;
230
233
  readonly value: _angular_core.InputSignal<string | EntityAttachmentItemValue | EntityAttachmentValue | null | undefined>;
234
+ readonly endPoint: _angular_core.InputSignal<string>;
235
+ readonly context: _angular_core.InputSignal<HttpContext | undefined>;
236
+ private readonly httpClient;
231
237
  readonly displayName: _angular_core.Signal<string>;
232
238
  readonly hideName: _angular_core.Signal<boolean>;
233
- readonly uploadValue: _angular_core.Signal<string | _masterteam_components_entities.EntityStatusValue | _masterteam_components_entities.EntityUserValue | EntityAttachmentItemValue | (string | EntityAttachmentItemValue)[] | null>;
239
+ readonly loading: _angular_core.WritableSignal<boolean>;
240
+ readonly attachments: _angular_core.WritableSignal<EntityAttachmentItemValue[]>;
241
+ readonly attachmentReferences: _angular_core.Signal<AttachmentReference[]>;
242
+ readonly uploadValue: _angular_core.Signal<string | EntityAttachmentItemValue | (string | EntityAttachmentItemValue)[] | null>;
234
243
  readonly hasAttachments: _angular_core.Signal<boolean>;
235
244
  readonly isMultiple: _angular_core.Signal<boolean>;
236
245
  protected readonly empty = "-";
246
+ constructor();
247
+ attachmentTrackBy(index: number, attachment: EntityAttachmentItemValue): string;
248
+ attachmentTooltip(attachment: EntityAttachmentItemValue): string;
249
+ attachmentIcon(attachment: EntityAttachmentItemValue): MTIcon;
250
+ onCompactAttachmentClick(event: MouseEvent, attachment: EntityAttachmentItemValue): void;
251
+ downloadAttachment(attachment: EntityAttachmentItemValue): void;
252
+ private resolveAttachment$;
253
+ private normalizeAttachmentValue;
254
+ private normalizeAttachmentItem;
255
+ private requiresMetadataRequest;
256
+ private isAttachmentItemValue;
257
+ private resolveExtension;
237
258
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityAttachment, never>;
238
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityAttachment, "mt-entity-attachment", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
259
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityAttachment, "mt-entity-attachment", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "endPoint": { "alias": "endPoint"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
239
260
  }
240
261
 
241
262
  declare class EntityPreview {
242
263
  /** Single entity data to display */
243
264
  readonly data: _angular_core.InputSignal<EntityData>;
265
+ readonly attachmentShape: _angular_core.InputSignal<"default" | "compact">;
266
+ readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment">;
244
267
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
245
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
268
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
246
269
  }
247
270
 
248
271
  declare class EntitiesPreview {
249
272
  /** Array of entity data to display */
250
273
  readonly entities: _angular_core.InputSignal<EntityData[]>;
274
+ readonly attachmentShape: _angular_core.InputSignal<"default" | "compact">;
251
275
  /** Entities sorted by order */
252
276
  readonly sortedEntities: _angular_core.Signal<EntityData[]>;
253
277
  /** Returns the grid-column span for a given entity size (1-24) */
254
278
  getColSpan(entity: EntityData): string;
255
279
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
256
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
280
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
257
281
  }
258
282
 
259
283
  /**
@@ -445,6 +445,8 @@ declare class FormulaToolbar {
445
445
  readonly operators: _angular_core.InputSignal<OperatorDefinition[]>;
446
446
  /** Initial active tab */
447
447
  readonly initialTab: _angular_core.InputSignal<ToolbarTab>;
448
+ /** Tabs visible in the toolbar */
449
+ readonly visibleTabs: _angular_core.InputSignal<readonly ToolbarTab[]>;
448
450
  /** Placeholder for search input */
449
451
  readonly searchPlaceholder: _angular_core.InputSignal<string>;
450
452
  /** Labels */
@@ -467,6 +469,11 @@ declare class FormulaToolbar {
467
469
  label: string;
468
470
  value: ToolbarTab;
469
471
  }[];
472
+ /** Tabs actually rendered */
473
+ readonly resolvedTabOptions: _angular_core.Signal<{
474
+ label: string;
475
+ value: ToolbarTab;
476
+ }[]>;
470
477
  /** Context for custom properties template */
471
478
  protected readonly propertiesTemplateContext: FormulaToolbarPropertiesContext;
472
479
  /** Resolve properties template (projected first, input fallback) */
@@ -519,7 +526,7 @@ declare class FormulaToolbar {
519
526
  /** Clear custom value input */
520
527
  clearCustomValue(): void;
521
528
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaToolbar, never>;
522
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; }, ["projectedPropertiesTemplate"], never, true, never>;
529
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "visibleTabs": { "alias": "visibleTabs"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; }, ["projectedPropertiesTemplate"], never, true, never>;
523
530
  }
524
531
 
525
532
  declare const DEFAULT_OPERATORS: OperatorDefinition[];
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
 
3
3
  declare class Progress {
4
+ private static readonly DEFAULT_PRIMARY_COLOR;
4
5
  value: _angular_core.InputSignal<number>;
5
6
  mode: _angular_core.InputSignal<"linear" | "circle">;
6
7
  showLabel: _angular_core.InputSignal<boolean>;
@@ -13,6 +14,7 @@ declare class Progress {
13
14
  strokeWidth: _angular_core.InputSignal<number>;
14
15
  customClass: _angular_core.InputSignal<string>;
15
16
  labelTemplate: _angular_core.Signal<string>;
17
+ readonly resolvedColor: _angular_core.Signal<string>;
16
18
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Progress, never>;
17
19
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Progress, "mt-progress", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "circleSize": { "alias": "circleSize"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
18
20
  }
@@ -63,7 +63,9 @@ interface ColumnDef {
63
63
  type?: ColumnType;
64
64
  customCellTpl?: TemplateRef<any>;
65
65
  filterConfig?: FilterConfig;
66
+ sortable?: boolean;
66
67
  readonly?: boolean;
68
+ width?: string;
67
69
  }
68
70
  interface TableAction {
69
71
  icon?: MTIcon | undefined;
@@ -94,10 +96,12 @@ declare class Table {
94
96
  selectableRows: _angular_core.InputSignalWithTransform<boolean, unknown>;
95
97
  clickableRows: _angular_core.InputSignalWithTransform<boolean, unknown>;
96
98
  generalSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
99
+ lazyLocalSearch: _angular_core.InputSignalWithTransform<boolean, unknown>;
97
100
  showFilters: _angular_core.InputSignalWithTransform<boolean, unknown>;
98
101
  loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
99
102
  updating: _angular_core.InputSignalWithTransform<boolean, unknown>;
100
103
  lazy: _angular_core.InputSignalWithTransform<boolean, unknown>;
104
+ lazyLocalSort: _angular_core.InputSignalWithTransform<boolean, unknown>;
101
105
  lazyTotalRecords: _angular_core.InputSignal<number | undefined>;
102
106
  reorderableColumns: _angular_core.InputSignalWithTransform<boolean, unknown>;
103
107
  reorderableRows: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -120,6 +124,8 @@ declare class Table {
120
124
  currentPage: _angular_core.ModelSignal<number>;
121
125
  first: _angular_core.ModelSignal<number>;
122
126
  filterTerm: _angular_core.ModelSignal<string>;
127
+ sortField: _angular_core.WritableSignal<string | null>;
128
+ sortDirection: _angular_core.WritableSignal<"asc" | "desc" | null>;
123
129
  confirmationService: ConfirmationService;
124
130
  protected selectedRows: _angular_core.WritableSignal<Set<any>>;
125
131
  protected exportColumns: _angular_core.Signal<{
@@ -130,7 +136,9 @@ declare class Table {
130
136
  type?: _masterteam_components_table.ColumnType;
131
137
  customCellTpl?: TemplateRef<any>;
132
138
  filterConfig?: _masterteam_components_table.FilterConfig;
139
+ sortable?: boolean;
133
140
  readonly?: boolean;
141
+ width?: string;
134
142
  }[]>;
135
143
  protected activeFilterCount: _angular_core.Signal<number>;
136
144
  protected filteredData: _angular_core.Signal<any[]>;
@@ -150,6 +158,9 @@ declare class Table {
150
158
  handleLazyLoad(event: any): void;
151
159
  onPaginatorPage(event: any): void;
152
160
  onSearchChange(searchTerm: string): void;
161
+ toggleSort(column: ColumnDef): void;
162
+ isColumnSortable(column: ColumnDef): boolean;
163
+ getSortIcon(column: ColumnDef): MTIcon;
153
164
  onCellChange(row: any, columnKey: string, newValue: any, type?: ColumnTypeForActionCell): void;
154
165
  resolveActionLoading(action: TableAction, row: any): boolean | undefined;
155
166
  getVisibleRowActions(row: any): TableAction[];
@@ -169,10 +180,15 @@ declare class Table {
169
180
  * to show only avatar + displayName.
170
181
  */
171
182
  getEntityColumnData(row: any, col: ColumnDef): EntityData | null;
183
+ protected getStatusEntityAccentColor(row: Record<string, unknown>): string | null;
172
184
  protected getBooleanProperty(obj: any, key: string): boolean;
173
185
  private setProperty;
186
+ private sortData;
187
+ private getSortValue;
188
+ private getColumnResolvedValue;
189
+ private buildExportRows;
174
190
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Table, never>;
175
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "mt-table", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "selectableRows": { "alias": "selectableRows"; "required": false; "isSignal": true; }; "clickableRows": { "alias": "clickableRows"; "required": false; "isSignal": true; }; "generalSearch": { "alias": "generalSearch"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "updating": { "alias": "updating"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "lazyTotalRecords": { "alias": "lazyTotalRecords"; "required": false; "isSignal": true; }; "reorderableColumns": { "alias": "reorderableColumns"; "required": false; "isSignal": true; }; "reorderableRows": { "alias": "reorderableRows"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "actionShape": { "alias": "actionShape"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "tabsOptionLabel": { "alias": "tabsOptionLabel"; "required": false; "isSignal": true; }; "tabsOptionValue": { "alias": "tabsOptionValue"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paginatorPosition": { "alias": "paginatorPosition"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "cellChange": "cellChange"; "lazyLoad": "lazyLoad"; "columnReorder": "columnReorder"; "rowReorder": "rowReorder"; "rowClick": "rowClick"; "filters": "filtersChange"; "activeTab": "activeTabChange"; "onTabChange": "onTabChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "first": "firstChange"; "filterTerm": "filterTermChange"; }, ["captionStartContent", "captionEndContent", "emptyContent"], never, true, never>;
191
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "mt-table", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "selectableRows": { "alias": "selectableRows"; "required": false; "isSignal": true; }; "clickableRows": { "alias": "clickableRows"; "required": false; "isSignal": true; }; "generalSearch": { "alias": "generalSearch"; "required": false; "isSignal": true; }; "lazyLocalSearch": { "alias": "lazyLocalSearch"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "updating": { "alias": "updating"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "lazyLocalSort": { "alias": "lazyLocalSort"; "required": false; "isSignal": true; }; "lazyTotalRecords": { "alias": "lazyTotalRecords"; "required": false; "isSignal": true; }; "reorderableColumns": { "alias": "reorderableColumns"; "required": false; "isSignal": true; }; "reorderableRows": { "alias": "reorderableRows"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "actionShape": { "alias": "actionShape"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "tabsOptionLabel": { "alias": "tabsOptionLabel"; "required": false; "isSignal": true; }; "tabsOptionValue": { "alias": "tabsOptionValue"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paginatorPosition": { "alias": "paginatorPosition"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "cellChange": "cellChange"; "lazyLoad": "lazyLoad"; "columnReorder": "columnReorder"; "rowReorder": "rowReorder"; "rowClick": "rowClick"; "filters": "filtersChange"; "activeTab": "activeTabChange"; "onTabChange": "onTabChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "first": "firstChange"; "filterTerm": "filterTermChange"; }, ["captionStartContent", "captionEndContent", "emptyContent"], never, true, never>;
176
192
  }
177
193
 
178
194
  declare class TableFilter implements ControlValueAccessor {
@@ -188,7 +204,20 @@ declare class TableFilter implements ControlValueAccessor {
188
204
  }[];
189
205
  private onChange;
190
206
  private onTouched;
191
- protected filterableColumns: _angular_core.Signal<ColumnDef[]>;
207
+ protected filterableColumns: _angular_core.Signal<{
208
+ filterConfig: {
209
+ type: "boolean" | "text" | "select" | "date" | "user";
210
+ label?: string;
211
+ options?: FilterOption[];
212
+ };
213
+ key: string;
214
+ label: string;
215
+ type?: _masterteam_components_table.ColumnType;
216
+ customCellTpl?: _angular_core.TemplateRef<any>;
217
+ sortable?: boolean;
218
+ readonly?: boolean;
219
+ width?: string;
220
+ }[]>;
192
221
  protected activeFilterCount: _angular_core.Signal<number>;
193
222
  protected getFilterType(col: ColumnDef): string;
194
223
  protected getFilterValue(key: string): any;
@@ -1,36 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, signal, output, Component } from '@angular/core';
3
- import { Icon } from '@masterteam/icons';
4
- import { RouterLinkActive, RouterLink } from '@angular/router';
5
- import { Tooltip } from '@masterteam/components/tooltip';
6
-
7
- class Sidebar {
8
- items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
9
- logo = input(...(ngDevMode ? [undefined, { debugName: "logo" }] : []));
10
- logoLink = input(...(ngDevMode ? [undefined, { debugName: "logoLink" }] : []));
11
- title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
12
- subTitle = input(...(ngDevMode ? [undefined, { debugName: "subTitle" }] : []));
13
- bgColor = input(...(ngDevMode ? [undefined, { debugName: "bgColor" }] : []));
14
- bgImage = input(...(ngDevMode ? [undefined, { debugName: "bgImage" }] : []));
15
- bgRepeat = input(false, { ...(ngDevMode ? { debugName: "bgRepeat" } : {}), transform: booleanAttribute });
16
- iconsColor = input('var(--p-text-color)', ...(ngDevMode ? [{ debugName: "iconsColor" }] : []));
17
- expanded = signal(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
18
- expandedChange = output();
19
- toggleSidebar() {
20
- this.expanded.update((v) => !v);
21
- this.expandedChange.emit(this.expanded());
22
- }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Sidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Sidebar, isStandalone: true, selector: "mt-sidebar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgImage: { classPropertyName: "bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, bgRepeat: { classPropertyName: "bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, iconsColor: { classPropertyName: "iconsColor", publicName: "iconsColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '16rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat-y]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n alt=\"Logo\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-xl overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-4\">\r\n <mt-icon [icon]=\"item.icon\" class=\"shrink-0\" />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}\n"], dependencies: [{ kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }] });
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Sidebar, decorators: [{
27
- type: Component,
28
- args: [{ selector: 'mt-sidebar', standalone: true, imports: [RouterLinkActive, RouterLink, Icon, Tooltip], template: "<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '16rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat-y]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n alt=\"Logo\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-xl overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-4\">\r\n <mt-icon [icon]=\"item.icon\" class=\"shrink-0\" />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%;min-height:0}.mt-sidebar-menu{scrollbar-width:thin;scrollbar-color:var(--p-surface-400) transparent}.mt-sidebar-menu::-webkit-scrollbar{width:6px}.mt-sidebar-menu::-webkit-scrollbar-track{background:transparent}.mt-sidebar-menu::-webkit-scrollbar-thumb{border-radius:9999px;background:color-mix(in srgb,var(--p-surface-500) 58%,transparent)}.mt-sidebar-menu::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--p-surface-600) 72%,transparent)}.mt-sidebar-menu-collapsed{scrollbar-color:var(--p-surface-500) transparent}.mt-sidebar-menu-collapsed::-webkit-scrollbar{width:2px}.mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--p-surface-600) 82%,transparent)}\n"] }]
29
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitle", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], bgImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgImage", required: false }] }], bgRepeat: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgRepeat", required: false }] }], iconsColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconsColor", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
30
-
31
- /**
32
- * Generated bundle index. Do not edit.
33
- */
34
-
35
- export { Sidebar };
36
- //# sourceMappingURL=masterteam-components-sidebar.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"masterteam-components-sidebar.mjs","sources":["../../../../packages/masterteam/components/sidebar/sidebar.ts","../../../../packages/masterteam/components/sidebar/sidebar.html","../../../../packages/masterteam/components/sidebar/masterteam-components-sidebar.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n Component,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { Icon, MTIcon } from '@masterteam/icons';\r\nimport { RouterLink, RouterLinkActive } from '@angular/router';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\n\r\nexport interface SidebarItem {\r\n id: string | number;\r\n title: string;\r\n icon?: MTIcon;\r\n routerLink?: any[] | string;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-sidebar',\r\n standalone: true,\r\n imports: [RouterLinkActive, RouterLink, Icon, Tooltip],\r\n templateUrl: './sidebar.html',\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n height: 100%;\r\n min-height: 0;\r\n }\r\n\r\n .mt-sidebar-menu {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--p-surface-400) transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar {\r\n width: 6px;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-track {\r\n background: transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb {\r\n border-radius: 9999px;\r\n background: color-mix(in srgb, var(--p-surface-500) 58%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb:hover {\r\n background: color-mix(in srgb, var(--p-surface-600) 72%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu-collapsed {\r\n scrollbar-color: var(--p-surface-500) transparent;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar {\r\n width: 2px;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb {\r\n background: color-mix(in srgb, var(--p-surface-600) 82%, transparent);\r\n }\r\n `,\r\n ],\r\n})\r\nexport class Sidebar {\r\n items = input<SidebarItem[]>([]);\r\n\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n title = input<string>();\r\n subTitle = input<string>();\r\n\r\n bgColor = input<string>();\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n iconsColor = input<string>('var(--p-text-color)');\r\n\r\n expanded = signal(false);\r\n expandedChange = output<boolean>();\r\n\r\n toggleSidebar(): void {\r\n this.expanded.update((v) => !v);\r\n this.expandedChange.emit(this.expanded());\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '16rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat-y]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n alt=\"Logo\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-xl overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"rla.isActive ? 'var(--p-primary-500)' : iconsColor()\"\r\n >\r\n <div class=\"px-4\">\r\n <mt-icon [icon]=\"item.icon\" class=\"shrink-0\" />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmEa,OAAO,CAAA;AAClB,IAAA,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HostBinding, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import * as i1 from '@angular/forms';
4
- import { Validators, NgControl, FormsModule } from '@angular/forms';
5
- import * as i2 from 'primeng/slider';
6
- import { SliderModule } from 'primeng/slider';
7
- import { FieldValidation } from '@masterteam/components/field-validation';
8
- import { isInvalid } from '@masterteam/components';
9
-
10
- class SliderField {
11
- input;
12
- field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : []));
13
- label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
14
- animate = input(false, ...(ngDevMode ? [{ debugName: "animate" }] : []));
15
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
16
- min = input(0, { ...(ngDevMode ? { debugName: "min" } : {}), transform: numberAttribute });
17
- max = input(100, { ...(ngDevMode ? { debugName: "max" } : {}), transform: numberAttribute });
18
- step = input(undefined, { ...(ngDevMode ? { debugName: "step" } : {}), transform: numberAttribute });
19
- hideNumber = input(false, { ...(ngDevMode ? { debugName: "hideNumber" } : {}), transform: booleanAttribute });
20
- unit = input('%', ...(ngDevMode ? [{ debugName: "unit" }] : []));
21
- readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
22
- pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
23
- required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
24
- onChange = new EventEmitter();
25
- onSlideEnd = new EventEmitter();
26
- styleClass;
27
- requiredValidator = Validators.required;
28
- value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
29
- disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
30
- displayValue = computed(() => {
31
- const value = this.value();
32
- if (value === null || value === undefined) {
33
- return '-';
34
- }
35
- return `${value}${this.unit()}`;
36
- }, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
37
- onTouched = () => { };
38
- onModelChange = () => { };
39
- ngControl = inject(NgControl, { self: true });
40
- isInvalid = isInvalid;
41
- constructor() {
42
- if (this.ngControl) {
43
- this.ngControl.valueAccessor = this;
44
- }
45
- effect(() => {
46
- if (this.ngControl.control && this.required()) {
47
- this.ngControl.control.addValidators(Validators.required);
48
- this.ngControl.control.updateValueAndValidity();
49
- }
50
- });
51
- }
52
- applyInputsToInput() {
53
- Object.assign(this.input, this.pInputs());
54
- }
55
- ngOnInit() {
56
- this.styleClass = this.class();
57
- }
58
- onValueChange(value) {
59
- this.onModelChange(value);
60
- this.value.set(value);
61
- }
62
- ngOnChanges(changes) {
63
- if (changes['pInputs']) {
64
- this.applyInputsToInput();
65
- }
66
- }
67
- writeValue(value) {
68
- this.value.set(value);
69
- }
70
- registerOnChange(fn) {
71
- this.onModelChange = fn;
72
- }
73
- registerOnTouched(fn) {
74
- this.onTouched = fn;
75
- }
76
- setDisabledState(disabled) {
77
- this.disabled.set(disabled);
78
- }
79
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SliderField, deps: [], target: i0.ɵɵFactoryTarget.Component });
80
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SliderField, isStandalone: true, selector: "mt-slider-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, hideNumber: { classPropertyName: "hideNumber", publicName: "hideNumber", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onSlideEnd: "onSlideEnd" }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || !hideNumber()) {\r\n <div class=\"flex items-end justify-between gap-3\">\r\n @if (label()) {\r\n <label\r\n class=\"leading-none\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (!hideNumber()) {\r\n <span\r\n class=\"min-w-12 text-right text-sm font-medium leading-none text-muted-color tabular-nums\"\r\n >\r\n {{ displayValue() }}\r\n </span>\r\n }\r\n </div>\r\n}\r\n<div class=\"w-full my-2\">\r\n <p-slider\r\n #input\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (onSlideEnd)=\"onTouched(); onSlideEnd.emit($event)\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [animate]=\"animate()\"\r\n [id]=\"ngControl?.name || label()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [step]=\"step()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n class=\"block w-full\"\r\n ></p-slider>\r\n</div>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n", styles: [":host{--p-slider-track-size: .75rem}:host ::ng-deep .p-slider{background:var(--p-surface-200);border-radius:9999px}:host ::ng-deep .p-slider.p-slider-horizontal{height:var(--p-slider-track-size)}:host ::ng-deep .p-slider-range{border-radius:inherit}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SliderModule }, { kind: "component", type: i2.Slider, selector: "p-slider", inputs: ["animate", "min", "max", "orientation", "step", "range", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
- }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SliderField, decorators: [{
83
- type: Component,
84
- args: [{ selector: 'mt-slider-field', standalone: true, imports: [FormsModule, SliderModule, FieldValidation], changeDetection: ChangeDetectionStrategy.OnPush, host: {
85
- class: 'grid gap-1',
86
- }, template: "@if (label() || !hideNumber()) {\r\n <div class=\"flex items-end justify-between gap-3\">\r\n @if (label()) {\r\n <label\r\n class=\"leading-none\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (!hideNumber()) {\r\n <span\r\n class=\"min-w-12 text-right text-sm font-medium leading-none text-muted-color tabular-nums\"\r\n >\r\n {{ displayValue() }}\r\n </span>\r\n }\r\n </div>\r\n}\r\n<div class=\"w-full my-2\">\r\n <p-slider\r\n #input\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (onSlideEnd)=\"onTouched(); onSlideEnd.emit($event)\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [animate]=\"animate()\"\r\n [id]=\"ngControl?.name || label()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [step]=\"step()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n class=\"block w-full\"\r\n ></p-slider>\r\n</div>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n", styles: [":host{--p-slider-track-size: .75rem}:host ::ng-deep .p-slider{background:var(--p-surface-200);border-radius:9999px}:host ::ng-deep .p-slider.p-slider-horizontal{height:var(--p-slider-track-size)}:host ::ng-deep .p-slider-range{border-radius:inherit}\n"] }]
87
- }], ctorParameters: () => [], propDecorators: { input: [{
88
- type: ViewChild,
89
- args: ['input', { static: true }]
90
- }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], hideNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideNumber", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], onChange: [{
91
- type: Output
92
- }], onSlideEnd: [{
93
- type: Output
94
- }], styleClass: [{
95
- type: HostBinding,
96
- args: ['class']
97
- }] } });
98
-
99
- /**
100
- * Generated bundle index. Do not edit.
101
- */
102
-
103
- export { SliderField };
104
- //# sourceMappingURL=masterteam-components-slider-field.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"masterteam-components-slider-field.mjs","sources":["../../../../packages/masterteam/components/slider-field/slider-field.ts","../../../../packages/masterteam/components/slider-field/slider-field.html","../../../../packages/masterteam/components/slider-field/masterteam-components-slider-field.ts"],"sourcesContent":["import {\r\n Component,\r\n EventEmitter,\r\n HostBinding,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n booleanAttribute,\r\n computed,\r\n input,\r\n numberAttribute,\r\n signal,\r\n OnInit,\r\n OnChanges,\r\n inject,\r\n ChangeDetectionStrategy,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport {\r\n Slider,\r\n SliderChangeEvent,\r\n SliderSlideEndEvent,\r\n SliderModule,\r\n} from 'primeng/slider';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { isInvalid } from '@masterteam/components';\r\n\r\n@Component({\r\n selector: 'mt-slider-field',\r\n standalone: true,\r\n imports: [FormsModule, SliderModule, FieldValidation],\r\n templateUrl: './slider-field.html',\r\n styleUrls: ['./slider-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid gap-1',\r\n },\r\n})\r\nexport class SliderField implements ControlValueAccessor, OnInit, OnChanges {\r\n @ViewChild('input', { static: true })\r\n input: Slider;\r\n\r\n readonly field = input<boolean>(true);\r\n readonly label = input<string>();\r\n readonly animate = input<boolean>(false);\r\n readonly class = input<string>('');\r\n readonly min = input<number, unknown>(0, { transform: numberAttribute });\r\n readonly max = input<number, unknown>(100, { transform: numberAttribute });\r\n readonly step = input<number, unknown>(undefined, {\r\n transform: numberAttribute,\r\n });\r\n readonly hideNumber = input<boolean, unknown>(false, {\r\n transform: booleanAttribute,\r\n });\r\n readonly unit = input<string>('%');\r\n readonly readonly = input<boolean>(false);\r\n readonly pInputs = input<Partial<Slider>>();\r\n readonly required = input<boolean>(false);\r\n\r\n @Output() onChange: EventEmitter<SliderChangeEvent> = new EventEmitter();\r\n @Output() onSlideEnd: EventEmitter<SliderSlideEndEvent> = new EventEmitter();\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<number | null>(null);\r\n disabled = signal<boolean>(false);\r\n displayValue = computed(() => {\r\n const value = this.value();\r\n if (value === null || value === undefined) {\r\n return '-';\r\n }\r\n return `${value}${this.unit()}`;\r\n });\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: number | null) => void = () => {};\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n applyInputsToInput() {\r\n Object.assign(this.input, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n }\r\n onValueChange(value: number | null) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n }\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToInput();\r\n }\r\n }\r\n\r\n writeValue(value: number) {\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n}\r\n","@if (label() || !hideNumber()) {\r\n <div class=\"flex items-end justify-between gap-3\">\r\n @if (label()) {\r\n <label\r\n class=\"leading-none\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (!hideNumber()) {\r\n <span\r\n class=\"min-w-12 text-right text-sm font-medium leading-none text-muted-color tabular-nums\"\r\n >\r\n {{ displayValue() }}\r\n </span>\r\n }\r\n </div>\r\n}\r\n<div class=\"w-full my-2\">\r\n <p-slider\r\n #input\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (onSlideEnd)=\"onTouched(); onSlideEnd.emit($event)\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [animate]=\"animate()\"\r\n [id]=\"ngControl?.name || label()\"\r\n [min]=\"min()\"\r\n [max]=\"max()\"\r\n [step]=\"step()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n class=\"block w-full\"\r\n ></p-slider>\r\n</div>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MA4Ca,WAAW,CAAA;AAEtB,IAAA,KAAK;AAEI,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,iDAAC;IAC5B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACvB,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;IACzB,GAAG,GAAG,KAAK,CAAkB,CAAC,gDAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IAC/D,GAAG,GAAG,KAAK,CAAkB,GAAG,gDAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IACjE,IAAI,GAAG,KAAK,CAAkB,SAAS,iDAC9C,SAAS,EAAE,eAAe,EAAA,CAC1B;IACO,UAAU,GAAG,KAAK,CAAmB,KAAK,uDACjD,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACO,IAAA,IAAI,GAAG,KAAK,CAAS,GAAG,gDAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,oDAAC;IAChC,OAAO,GAAG,KAAK,CAAA,IA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,IAAA,EAAA,UAAA,EAAA,IAAA,EDFY,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,YAAY,2QAAE,eAAe,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAQzC,WAAW,EAAA,UAAA,EAAA,CAAA;kBAXvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,YAAY,EAAE,eAAe,CAAC,EAAA,eAAA,EAGpC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,gsCAAA,EAAA,MAAA,EAAA,CAAA,6PAAA,CAAA,EAAA;;sBAGA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAoBnC;;sBACA;;sBAEA,WAAW;uBAAC,OAAO;;;AEpEtB;;AAEG;;;;"}
@@ -1,22 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, Component } from '@angular/core';
3
- import { Card } from '@masterteam/components/card';
4
- import { Avatar } from '@masterteam/components/avatar';
5
-
6
- class StatisticCard {
7
- data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
8
- cardClass = input('shadow-md', ...(ngDevMode ? [{ debugName: "cardClass" }] : []));
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StatisticCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: StatisticCard, isStandalone: true, selector: "mt-statistic-card", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, cardClass: { classPropertyName: "cardClass", publicName: "cardClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-card headless [class]=\"cardClass()\">\n <div class=\"flex items-center gap-3 p-2\">\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"'var(--p-' + data().color + '-100)'\"\r\n [style.--p-avatar-color]=\"'var(--p-' + data().color + '-600)'\"\r\n [icon]=\"data().icon\"\r\n size=\"large\"\r\n shape=\"square\"\r\n ></mt-avatar>\r\n\r\n <div class=\"flex flex-col gap-0.5\">\r\n <span\r\n class=\"text-lg font-semibold\"\r\n [style.color]=\"'var(--p-' + data().color + '-600)'\"\r\n >\r\n {{ data().title }}\r\n </span>\r\n <span class=\"text-sm text-surface-500\">\r\n {{ data().subTitle }}\r\n </span>\r\n </div>\r\n </div>\r\n</mt-card>\r\n", styles: [""], dependencies: [{ kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }] });
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StatisticCard, decorators: [{
13
- type: Component,
14
- args: [{ selector: 'mt-statistic-card', standalone: true, imports: [Card, Avatar], template: "<mt-card headless [class]=\"cardClass()\">\n <div class=\"flex items-center gap-3 p-2\">\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"'var(--p-' + data().color + '-100)'\"\r\n [style.--p-avatar-color]=\"'var(--p-' + data().color + '-600)'\"\r\n [icon]=\"data().icon\"\r\n size=\"large\"\r\n shape=\"square\"\r\n ></mt-avatar>\r\n\r\n <div class=\"flex flex-col gap-0.5\">\r\n <span\r\n class=\"text-lg font-semibold\"\r\n [style.color]=\"'var(--p-' + data().color + '-600)'\"\r\n >\r\n {{ data().title }}\r\n </span>\r\n <span class=\"text-sm text-surface-500\">\r\n {{ data().subTitle }}\r\n </span>\r\n </div>\r\n </div>\r\n</mt-card>\r\n" }]
15
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], cardClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardClass", required: false }] }] } });
16
-
17
- /**
18
- * Generated bundle index. Do not edit.
19
- */
20
-
21
- export { StatisticCard };
22
- //# sourceMappingURL=masterteam-components-statistic-card.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"masterteam-components-statistic-card.mjs","sources":["../../../../packages/masterteam/components/statistic-card/statistic-card.ts","../../../../packages/masterteam/components/statistic-card/statistic-card.html","../../../../packages/masterteam/components/statistic-card/masterteam-components-statistic-card.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { MTIcon } from '@masterteam/icons';\r\n\r\nexport interface StatisticCardData {\r\n title: string;\r\n subTitle: string;\r\n icon: MTIcon;\r\n color: string;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-statistic-card',\r\n standalone: true,\r\n templateUrl: './statistic-card.html',\r\n styleUrl: './statistic-card.scss',\r\n imports: [Card, Avatar],\r\n})\r\nexport class StatisticCard {\n readonly data = input.required<StatisticCardData>();\n readonly cardClass = input('shadow-md');\n}\n","<mt-card headless [class]=\"cardClass()\">\n <div class=\"flex items-center gap-3 p-2\">\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"'var(--p-' + data().color + '-100)'\"\r\n [style.--p-avatar-color]=\"'var(--p-' + data().color + '-600)'\"\r\n [icon]=\"data().icon\"\r\n size=\"large\"\r\n shape=\"square\"\r\n ></mt-avatar>\r\n\r\n <div class=\"flex flex-col gap-0.5\">\r\n <span\r\n class=\"text-lg font-semibold\"\r\n [style.color]=\"'var(--p-' + data().color + '-600)'\"\r\n >\r\n {{ data().title }}\r\n </span>\r\n <span class=\"text-sm text-surface-500\">\r\n {{ data().subTitle }}\r\n </span>\r\n </div>\r\n </div>\r\n</mt-card>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAmBa,aAAa,CAAA;AACf,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAqB;AAC1C,IAAA,SAAS,GAAG,KAAK,CAAC,WAAW,qDAAC;uGAF5B,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,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