@masterteam/components 0.0.250 → 0.0.251

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.250",
3
+ "version": "0.0.251",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -43,7 +43,7 @@ type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime'
43
43
  * backend stores and returns the same shape as `DateTime`); only the
44
44
  * rendering and the picker are narrowed to the clock time.
45
45
  */
46
- | 'Time' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup'
46
+ | 'Time' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'MultiUser' | 'Lookup'
47
47
  /**
48
48
  * Calculated, read-only lookup resolved by the backend to the schema phase
49
49
  * gate the record currently sits on. Never editable at runtime.
@@ -83,6 +83,8 @@ interface EntityUserConfig extends EntityBaseConfig {
83
83
  showDisplayName?: boolean;
84
84
  showPhoneNumber?: boolean;
85
85
  showEmail?: boolean;
86
+ /** Maximum users shown before the MultiUser preview collapses behind +N. */
87
+ maxVisibleUsers?: number;
86
88
  }
87
89
  /**
88
90
  * One Progress/Percentage color rule. Bounds are inclusive and at least one of
@@ -175,6 +177,7 @@ interface EntityUserValue {
175
177
  */
176
178
  isLinkedToCurrentApplication?: boolean;
177
179
  }
180
+ type EntityMultiUserValue = EntityUserValue[];
178
181
  interface LeafDetailsStatusSummary {
179
182
  key: string;
180
183
  display: string;
@@ -313,7 +316,7 @@ interface EntityData {
313
316
  * props have no label and no view type to render with.
314
317
  */
315
318
  nestedProperties?: EntityNestedPropertyMeta[];
316
- value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
319
+ value: string | EntityStatusValue | EntityUserValue | EntityMultiUserValue | EntityLookupValue | EntityPhaseGateValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | EntityScheduleItemValue[] | EntityLookupCheckListValue | EntityLookupCheckListItem[] | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
317
320
  viewType: EntityViewType;
318
321
  type?: string;
319
322
  configuration?: EntityConfiguration;
@@ -399,9 +402,24 @@ declare class EntityUser {
399
402
  readonly httpContext: HttpContext;
400
403
  /** Full entity data object */
401
404
  readonly data: _angular_core.InputSignal<EntityData | undefined>;
405
+ readonly expanded: _angular_core.WritableSignal<boolean>;
402
406
  readonly displayName: _angular_core.Signal<string>;
403
- /** Resolved user value object from data().value */
407
+ readonly isMultiUser: _angular_core.Signal<boolean>;
408
+ /** Resolved user objects from either a User or MultiUser entity value. */
409
+ readonly users: _angular_core.Signal<EntityUserValue[]>;
410
+ readonly maxVisibleUsers: _angular_core.Signal<number>;
411
+ readonly visibleUsers: _angular_core.Signal<EntityUserValue[]>;
412
+ readonly hiddenUserCount: _angular_core.Signal<number>;
413
+ /** First user retained for the existing single-user computed API. */
404
414
  private readonly userValue;
415
+ userNameFor(user: EntityUserValue): string;
416
+ userPhotoFor(user: EntityUserValue): string;
417
+ labelTextFor(user: EntityUserValue): string;
418
+ isUnlinkedUser(user: EntityUserValue): boolean;
419
+ phoneNumberFor(user: EntityUserValue): string;
420
+ emailFor(user: EntityUserValue): string;
421
+ hasContactInfoFor(user: EntityUserValue): boolean;
422
+ readonly emptyUserName: _angular_core.Signal<string>;
405
423
  readonly rawUserName: _angular_core.Signal<string | null>;
406
424
  readonly userName: _angular_core.Signal<string>;
407
425
  readonly userPhoto: _angular_core.Signal<string>;
@@ -418,6 +436,8 @@ declare class EntityUser {
418
436
  readonly phoneNumber: _angular_core.Signal<string>;
419
437
  readonly email: _angular_core.Signal<string>;
420
438
  readonly hasContactInfo: _angular_core.Signal<boolean>;
439
+ constructor();
440
+ showAllUsers(): void;
421
441
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityUser, never>;
422
442
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityUser, "mt-entity-user", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
423
443
  }
@@ -968,4 +988,4 @@ declare class EntitiesManage extends EntitiesResizeBase {
968
988
  }
969
989
 
970
990
  export { ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildDisplayEntities, buildSectionKey, expandLeafDetailsEntity, getEntitySectionTitle, groupEntitiesIntoSections, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, matchesPercentageColorRule, resolveLocalizedLabel, resolvePercentageColor };
971
- export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
991
+ export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
@@ -320,7 +320,7 @@ declare class Table {
320
320
  captionStartContent: _angular_core.Signal<TemplateRef<any> | undefined>;
321
321
  captionEndContent: _angular_core.Signal<TemplateRef<any> | undefined>;
322
322
  emptyContent: _angular_core.Signal<TemplateRef<any> | undefined>;
323
- paginatorPosition: _angular_core.InputSignal<"end" | "start" | "center">;
323
+ paginatorPosition: _angular_core.InputSignal<"center" | "end" | "start">;
324
324
  alwaysShowPaginator: _angular_core.InputSignalWithTransform<boolean, unknown>;
325
325
  rowsPerPageOptions: _angular_core.InputSignal<number[]>;
326
326
  pageSize: _angular_core.ModelSignal<number>;
@@ -334,7 +334,7 @@ declare class Table {
334
334
  * the query it actually sent.
335
335
  */
336
336
  sortField: _angular_core.ModelSignal<string | null>;
337
- sortDirection: _angular_core.ModelSignal<"asc" | "desc" | null>;
337
+ sortDirection: _angular_core.ModelSignal<"desc" | "asc" | null>;
338
338
  confirmationService: ConfirmationService;
339
339
  private readonly exportService;
340
340
  private readonly transloco;
@@ -130,8 +130,6 @@ declare const DS_SEMANTIC: {
130
130
  readonly textSecondary: "#3C5073";
131
131
  readonly textPlaceholder: "#B6BDCA";
132
132
  readonly textHelper: "#384250";
133
- /** Figma `--avatar/text/default` for initials and avatar icons. */
134
- readonly avatarText: "#233A61";
135
133
  readonly surface: "#FFFFFF";
136
134
  readonly border: "#E5E7EB";
137
135
  /** Disabled is a colour swap, never an opacity fade. */
@@ -187,14 +185,6 @@ declare const DS_CONTROL_HEIGHT: {
187
185
  readonly md: 32;
188
186
  readonly lg: 40;
189
187
  };
190
- /** DatePicker component geometry from Figma node 4250:1943. */
191
- declare const DS_DATEPICKER: {
192
- readonly panelInlineSize: "26.5rem";
193
- readonly headerHeight: "3.5rem";
194
- readonly weekdayHeight: "2.5rem";
195
- readonly cellSize: "3.5rem";
196
- readonly dateSize: "3rem";
197
- };
198
188
  declare const DS_FONT_FAMILY = "'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif";
199
189
  /** Ordered chart series. Six is the hard maximum. */
200
190
  declare const DS_CHART_SERIES: readonly ["#1849A9", "#175CD3", "#2E90FA", "#53B1FD", "#B2DDFF", "#D1E9FF"];
@@ -1162,5 +1152,5 @@ declare class MTDateFormatPipe implements PipeTransform {
1162
1152
  static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
1163
1153
  }
1164
1154
 
1165
- export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DATEPICKER, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, wrapValidatorWithMessage };
1155
+ export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, wrapValidatorWithMessage };
1166
1156
  export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTDesignIdentity, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
@@ -1,180 +0,0 @@
1
- /* ==========================================================================
2
- DatePicker
3
- --------------------------------------------------------------------------
4
- DS `DatePicker` (Figma 4250:1943)
5
-
6
- PrimeNG supplies the interaction and accessibility model. These rules map
7
- its table-based DOM onto the DS 424px calendar, 56px cell hit area, 48px
8
- date circle, outlined Today state, range strip, and double focus ring.
9
- ========================================================================== */
10
-
11
- html.mt-ds .p-datepicker-panel {
12
- font-family: var(--ds-font-sans);
13
- }
14
-
15
- html.mt-ds .p-datepicker-calendar-container .p-datepicker-calendar {
16
- box-sizing: border-box;
17
- inline-size: var(--ds-datepicker-panel-inline-size);
18
- padding: 0 var(--ds-space-xl) var(--ds-space-xl);
19
- }
20
-
21
- html.mt-ds
22
- .p-datepicker-calendar-container
23
- .p-datepicker-calendar
24
- + .p-datepicker-calendar {
25
- border-inline-start: 1px solid var(--p-datepicker-group-border-color);
26
- }
27
-
28
- html.mt-ds .p-datepicker-header {
29
- block-size: var(--ds-datepicker-header-height);
30
- border-block-end: 0;
31
- }
32
-
33
- html.mt-ds .p-datepicker-title {
34
- font-size: var(--ds-text-md);
35
- line-height: var(--ds-text-md-lh);
36
- }
37
-
38
- html.mt-ds :is(.p-datepicker-prev-button, .p-datepicker-next-button) {
39
- inline-size: var(--ds-control-height-md);
40
- block-size: var(--ds-control-height-md);
41
- min-inline-size: var(--ds-control-height-md);
42
- padding: 0;
43
- border: 0;
44
- background: transparent;
45
- color: var(--ds-text-strong);
46
- }
47
-
48
- html.mt-ds
49
- :is(
50
- .p-datepicker-prev-button,
51
- .p-datepicker-next-button,
52
- .p-datepicker-select-month,
53
- .p-datepicker-select-year,
54
- .p-datepicker-day
55
- ):focus-visible {
56
- outline: none;
57
- box-shadow:
58
- 0 0 0 2px var(--ds-focus-ring-color),
59
- 0 0 0 5px var(--ds-focus-outline-color);
60
- }
61
-
62
- html.mt-ds .p-datepicker-day-view {
63
- table-layout: fixed;
64
- font-size: var(--ds-text-md);
65
- }
66
-
67
- html.mt-ds .p-datepicker-weekday-cell {
68
- block-size: var(--ds-datepicker-weekday-height);
69
- padding: 0;
70
- text-align: center;
71
- }
72
-
73
- html.mt-ds .p-datepicker-weekday {
74
- font-size: var(--ds-text-md);
75
- line-height: var(--ds-text-md-lh);
76
- }
77
-
78
- html.mt-ds .p-datepicker-day-cell {
79
- position: relative;
80
- box-sizing: border-box;
81
- inline-size: var(--ds-datepicker-cell-size);
82
- block-size: var(--ds-datepicker-cell-size);
83
- padding: var(--ds-space-xs);
84
- }
85
-
86
- html.mt-ds .p-datepicker-day {
87
- z-index: 1;
88
- inline-size: var(--ds-datepicker-date-size);
89
- block-size: var(--ds-datepicker-date-size);
90
- border-radius: var(--ds-radius-full);
91
- font-size: var(--ds-text-md);
92
- font-weight: var(--ds-font-weight-regular);
93
- line-height: var(--ds-text-md-lh);
94
- }
95
-
96
- html.mt-ds .p-datepicker-day-selected:not(.p-disabled) {
97
- font-weight: var(--ds-font-weight-bold);
98
- }
99
-
100
- html.mt-ds .p-datepicker-day-selected:not(.p-disabled):hover {
101
- background: var(--p-primary-900);
102
- color: var(--p-primary-contrast-color);
103
- }
104
-
105
- html.mt-ds .p-datepicker-day-selected:not(.p-disabled):active {
106
- background: var(--p-primary-950);
107
- }
108
-
109
- html.mt-ds
110
- .p-datepicker-today
111
- > .p-datepicker-day:not(.p-datepicker-day-selected) {
112
- border: 2px solid var(--p-primary-color);
113
- background: transparent;
114
- color: var(--p-primary-color);
115
- font-weight: var(--ds-font-weight-bold);
116
- }
117
-
118
- html.mt-ds
119
- .p-datepicker-other-month
120
- > .p-datepicker-day:not(.p-datepicker-day-selected) {
121
- color: var(--ds-text-secondary);
122
- }
123
-
124
- html.mt-ds .p-datepicker-day.p-disabled {
125
- color: var(--ds-disabled-bg);
126
- opacity: 1;
127
- pointer-events: none;
128
- }
129
-
130
- /* PrimeNG paints range state on the 48px date element. The DS paints a
131
- continuous 40px strip behind the circles, so the cell owns that layer. */
132
- html.mt-ds
133
- .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)::before,
134
- html.mt-ds
135
- .p-datepicker-day-cell:has(> .p-datepicker-day-selected):has(
136
- + .p-datepicker-day-cell > .p-datepicker-day-selected-range
137
- )::before,
138
- html.mt-ds
139
- .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)
140
- + .p-datepicker-day-cell:has(> .p-datepicker-day-selected)::before {
141
- content: "";
142
- position: absolute;
143
- z-index: 0;
144
- inset-block: var(--ds-space-md);
145
- inset-inline: 0;
146
- background: var(--p-datepicker-date-range-selected-background);
147
- pointer-events: none;
148
- }
149
-
150
- html.mt-ds
151
- .p-datepicker-day-cell:has(> .p-datepicker-day-selected):has(
152
- + .p-datepicker-day-cell > .p-datepicker-day-selected-range
153
- )::before {
154
- inset-inline-start: 50%;
155
- }
156
-
157
- html.mt-ds
158
- .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)
159
- + .p-datepicker-day-cell:has(> .p-datepicker-day-selected)::before {
160
- inset-inline-end: 50%;
161
- }
162
-
163
- html.mt-ds .p-datepicker-day-selected-range {
164
- background: transparent;
165
- color: var(--ds-text-strong);
166
- }
167
-
168
- html.mt-ds .p-datepicker-buttonbar {
169
- min-block-size: calc(var(--ds-control-height-lg) + (2 * var(--ds-space-lg)));
170
- }
171
-
172
- @media (max-width: 30rem) {
173
- html.mt-ds .p-datepicker-calendar-container .p-datepicker-calendar {
174
- inline-size: calc(100vw - (2 * var(--ds-space-xl)));
175
- }
176
-
177
- html.mt-ds .p-datepicker-day-cell {
178
- inline-size: auto;
179
- }
180
- }