@masterteam/components 0.0.182 → 0.0.184

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 (37) hide show
  1. package/assets/common.css +1 -1
  2. package/assets/i18n/ar.json +3 -0
  3. package/assets/i18n/en.json +3 -0
  4. package/fesm2022/masterteam-components-drawer.mjs +2 -2
  5. package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
  7. package/fesm2022/masterteam-components-editor-field.mjs +2 -2
  8. package/fesm2022/masterteam-components-editor-field.mjs.map +1 -1
  9. package/fesm2022/masterteam-components-entities.mjs +73 -18
  10. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  11. package/fesm2022/masterteam-components-location-field.mjs +4 -4
  12. package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
  13. package/fesm2022/masterteam-components-number-field.mjs +2 -2
  14. package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
  15. package/fesm2022/masterteam-components-radio-cards-field.mjs +2 -2
  16. package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
  17. package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -1
  18. package/fesm2022/masterteam-components-select-field.mjs +2 -2
  19. package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
  20. package/fesm2022/masterteam-components-table.mjs +4 -4
  21. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  22. package/fesm2022/masterteam-components-tabs.mjs +2 -2
  23. package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
  24. package/fesm2022/masterteam-components-text-field.mjs +2 -2
  25. package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
  26. package/fesm2022/masterteam-components-textarea-field.mjs +2 -2
  27. package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
  28. package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
  29. package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
  30. package/fesm2022/masterteam-components-user-search-field.mjs +14 -3
  31. package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
  32. package/fesm2022/masterteam-components.mjs +19 -5
  33. package/fesm2022/masterteam-components.mjs.map +1 -1
  34. package/package.json +4 -4
  35. package/types/masterteam-components-entities.d.ts +34 -5
  36. package/types/masterteam-components-user-search-field.d.ts +11 -0
  37. package/types/masterteam-components.d.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.182",
3
+ "version": "0.0.184",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -12,7 +12,6 @@
12
12
  "@angular/core": "^21.2.8",
13
13
  "@angular/forms": "^21.2.8",
14
14
  "@jsverse/transloco": "^8.3.0",
15
- "@masterteam/icons": "^0.0.15",
16
15
  "@primeuix/themes": "^2.0.3",
17
16
  "@tailwindcss/postcss": "^4.2.2",
18
17
  "monaco-editor": "^0.52.0",
@@ -21,7 +20,8 @@
21
20
  "primeng": "21.1.5",
22
21
  "quill": "^2.0.3",
23
22
  "tailwindcss": "^4.2.2",
24
- "tailwindcss-primeui": "^0.6.1"
23
+ "tailwindcss-primeui": "^0.6.1",
24
+ "@masterteam/icons": "^0.0.15"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -267,4 +267,4 @@
267
267
  "module": "fesm2022/masterteam-components.mjs",
268
268
  "typings": "types/masterteam-components.d.ts",
269
269
  "type": "module"
270
- }
270
+ }
@@ -36,7 +36,7 @@ interface EntityListComparison {
36
36
  }
37
37
  type PropertyValueComparison = ValueComparison | EntityListComparison;
38
38
 
39
- type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'Location' | 'LookupMatrix' | 'LeafDetails';
39
+ type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Number' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'Location' | 'LookupMatrix' | 'LeafDetails' | 'Connection';
40
40
  type EntityLabelPosition = 'top' | 'bottom';
41
41
  /** Entity size – controls column span (1-24) inside a 24-column grid */
42
42
  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;
@@ -97,6 +97,11 @@ interface EntityUserValue {
97
97
  photoUrl?: string;
98
98
  phoneNumber?: string;
99
99
  email?: string;
100
+ /**
101
+ * `false` when the user is no longer linked to the current application
102
+ * (e.g. removed/deleted) but is still referenced by historical records.
103
+ */
104
+ isLinkedToCurrentApplication?: boolean;
100
105
  }
101
106
  interface LeafDetailsStatusSummary {
102
107
  key: string;
@@ -168,6 +173,11 @@ interface EntityLocationValue {
168
173
  lng?: string | number;
169
174
  [key: string]: unknown;
170
175
  }
176
+ interface EntityConnectionValue {
177
+ /** Human-readable label of the connected record (read from `rawValue.display`). */
178
+ display?: string;
179
+ [key: string]: unknown;
180
+ }
171
181
  interface EntityData {
172
182
  id?: number;
173
183
  propertyId?: number;
@@ -177,7 +187,7 @@ interface EntityData {
177
187
  rawValue?: string;
178
188
  order?: number;
179
189
  propertyConfiguration?: EntityPropertyConfiguration;
180
- value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue | EntityLocationValue | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
190
+ value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue | EntityLocationValue | EntityConnectionValue | LeafDetailsEntityValue | LeafDetailsEntityCollectionValue | LeafDetailsRuntimeValue;
181
191
  viewType: EntityViewType;
182
192
  type?: string;
183
193
  configuration?: EntityConfiguration;
@@ -265,6 +275,11 @@ declare class EntityUser {
265
275
  readonly userName: _angular_core.Signal<string>;
266
276
  readonly userPhoto: _angular_core.Signal<string>;
267
277
  readonly labelText: _angular_core.Signal<string>;
278
+ /**
279
+ * `true` when the referenced user is no longer linked to the application.
280
+ * Drives the inline info badge/tooltip next to the display name.
281
+ */
282
+ readonly isUnlinked: _angular_core.Signal<boolean>;
268
283
  private readonly config;
269
284
  readonly showDisplayName: _angular_core.Signal<boolean>;
270
285
  readonly showPhoneNumber: _angular_core.Signal<boolean>;
@@ -413,6 +428,20 @@ declare class EntityLocation {
413
428
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLocation, "mt-entity-location", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
414
429
  }
415
430
 
431
+ declare class EntityConnection {
432
+ /** Full entity data object */
433
+ readonly data: _angular_core.InputSignal<EntityData | undefined>;
434
+ /** Individual inputs (used when data is not provided) */
435
+ readonly name: _angular_core.InputSignal<string | undefined>;
436
+ readonly value: _angular_core.InputSignal<string | EntityConnectionValue | undefined>;
437
+ readonly displayName: _angular_core.Signal<string>;
438
+ /** The connection display lives on `rawValue.display`; fall back to `value`. */
439
+ readonly connection: _angular_core.Signal<EntityConnectionValue | null>;
440
+ readonly displayValue: _angular_core.Signal<string>;
441
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityConnection, never>;
442
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityConnection, "mt-entity-connection", 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>;
443
+ }
444
+
416
445
  declare class EntityLeafDetails {
417
446
  readonly data: _angular_core.InputSignal<EntityData>;
418
447
  readonly leafValue: _angular_core.Signal<LeafDetailsEntityValue | null>;
@@ -446,7 +475,7 @@ declare class EntityPreview {
446
475
  declare class EntityPreviewBody {
447
476
  readonly data: _angular_core.InputSignal<EntityData>;
448
477
  readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
449
- readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Number" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment" | "Location" | "LeafDetails">;
478
+ readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Number" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment" | "Location" | "LeafDetails" | "Connection">;
450
479
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreviewBody, never>;
451
480
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreviewBody, "mt-entity-preview-body", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
452
481
  }
@@ -596,5 +625,5 @@ declare class EntitiesManage extends EntitiesResizeBase {
596
625
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesManage, "mt-entities-manage", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; }, { "entities": "entitiesChange"; "entitiesReordered": "entitiesReordered"; "entityClicked": "entityClicked"; }, never, never, true, never>;
597
626
  }
598
627
 
599
- export { ComparisonEntityList, ComparisonValue, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityPercentage, EntityPreview, EntityPreviewBody, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, buildDisplayEntities, expandLeafDetailsEntity, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue };
600
- export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupValue, EntityPercentageConfig, EntityPropertyConfiguration, EntityResizeEvent, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PropertyValueComparison, ValueComparison };
628
+ export { ComparisonEntityList, ComparisonValue, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityPercentage, EntityPreview, EntityPreviewBody, EntityStatus, EntityText, EntityUser, LEAF_DETAILS_KEY_SEPARATOR, buildDisplayEntities, expandLeafDetailsEntity, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue };
629
+ export type { ComparisonValueSide, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupValue, EntityPercentageConfig, EntityPropertyConfiguration, EntityResizeEvent, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PropertyValueComparison, ValueComparison };
@@ -11,6 +11,11 @@ interface User {
11
11
  displayName: string;
12
12
  userName: string;
13
13
  photo: string;
14
+ /**
15
+ * `false` when the user is no longer linked to the current application
16
+ * (e.g. removed/deleted) but is still referenced by historical records.
17
+ */
18
+ isLinkedToCurrentApplication?: boolean;
14
19
  }
15
20
  declare class UserSearchField implements ControlValueAccessor, OnInit {
16
21
  readonly hint: _angular_core.InputSignal<string | undefined>;
@@ -32,6 +37,12 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
32
37
  readonly size: _angular_core.InputSignal<"small" | "large" | undefined>;
33
38
  filteredUsers: _angular_core.WritableSignal<User[]>;
34
39
  private searchTerms;
40
+ /**
41
+ * In single-select mode, `true` when the currently selected user is no
42
+ * longer linked to the application. Drives the inline info badge/tooltip.
43
+ * Multiple-select mode handles this per-chip via the `selecteditem` template.
44
+ */
45
+ readonly unlinkedSingleUser: _angular_core.Signal<boolean>;
35
46
  private readonly translocoService;
36
47
  readonly autocomplete: _angular_core.Signal<AutoComplete | undefined>;
37
48
  onTouched: () => void;
@@ -28,6 +28,15 @@ interface MTDateFormats {
28
28
  }
29
29
  declare const DEFAULT_MT_DATE_FORMATS: MTDateFormats;
30
30
  declare const MT_DATE_FORMATS: InjectionToken<MTDateFormats>;
31
+ /**
32
+ * Converts .NET custom date/time format tokens to Angular `formatDate` (CLDR)
33
+ * tokens. System-setting formats are authored in .NET convention (e.g. `hh:mm tt`),
34
+ * but `formatDate` uses CLDR tokens where the AM/PM designator is `a`, not `tt`.
35
+ * Every other token in the supported set (d, M, y, H, h, m, s) is identical between
36
+ * the two, so only `tt`/`t` → `a` needs translating. Single-quoted literal sections
37
+ * (e.g. `'at'`) are left untouched.
38
+ */
39
+ declare function toAngularDateFormat(format: string): string;
31
40
  declare function provideMTDateFormats(formats: Partial<MTDateFormats>): EnvironmentProviders;
32
41
 
33
42
  type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'pick-list' | 'checkbox' | 'icon-field' | 'color-picker' | 'location' | 'spacer' | 'lookup-matrix' | string;
@@ -883,5 +892,5 @@ declare class MTDateFormatPipe implements PipeTransform {
883
892
  static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
884
893
  }
885
894
 
886
- export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
895
+ export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, toAngularDateFormat, wrapValidatorWithMessage };
887
896
  export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupMatrixCellConfig, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };