@masterteam/components 0.0.276 → 0.0.278

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.276",
3
+ "version": "0.0.278",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -2,8 +2,8 @@ import * as _masterteam_components_entities from '@masterteam/components/entitie
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { ElementRef, NgZone } from '@angular/core';
4
4
  import { MTDateFormatType } from '@masterteam/components';
5
- import { HttpContext } from '@angular/common/http';
6
5
  import { MTIcon } from '@masterteam/icons';
6
+ import { HttpContext } from '@angular/common/http';
7
7
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
8
8
 
9
9
  interface ComparisonValueSide {
@@ -49,6 +49,14 @@ type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime'
49
49
  * gate the record currently sits on. Never editable at runtime.
50
50
  */
51
51
  | 'PhaseGate' | 'Attachment' | 'Location' | 'LookupMatrix' | 'LookupModuleCheckList' | 'LeafDetails' | 'Connection' | 'ScheduleItemSelector'
52
+ /**
53
+ * A stored icon reference. The value is a plain icon key (e.g.
54
+ * `custom.strategy`) — the backend's own system icon property (Name/Icon on
55
+ * a Template) reports this view type. Rendered as the actual glyph via
56
+ * `mt-icon`, not as the raw key string; `mt-icon` degrades to an empty glyph
57
+ * for an unknown key.
58
+ */
59
+ | 'Icon'
52
60
  /**
53
61
  * Layout marker, not a value. Rendered full-width and non-resizable; the
54
62
  * preview layer (`groupEntitiesIntoSections`) turns each marker into a titled
@@ -506,6 +514,25 @@ declare class EntityStatus {
506
514
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityStatus, "mt-entity-status", 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>;
507
515
  }
508
516
 
517
+ /**
518
+ * Renders an `Icon` view-type value — a stored icon key such as
519
+ * `custom.strategy` — as the actual glyph via `mt-icon`, rather than printing
520
+ * the raw key as text (which is what the plain-text fallback used to do before
521
+ * `Icon` was a distinct view type).
522
+ */
523
+ declare class EntityIcon {
524
+ /** Full entity data object */
525
+ readonly data: _angular_core.InputSignal<EntityData | undefined>;
526
+ /** Individual inputs (used when data is not provided) */
527
+ readonly name: _angular_core.InputSignal<string | undefined>;
528
+ readonly value: _angular_core.InputSignal<string | undefined>;
529
+ readonly displayName: _angular_core.Signal<string>;
530
+ readonly emptyLabel = "_";
531
+ readonly iconName: _angular_core.Signal<MTIcon | null>;
532
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityIcon, never>;
533
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityIcon, "mt-entity-icon", 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>;
534
+ }
535
+
509
536
  declare class EntityUser {
510
537
  readonly httpContext: HttpContext;
511
538
  /** Full entity data object */
@@ -1271,5 +1298,5 @@ declare class FitText {
1271
1298
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FitText, "[mtFitText]", never, { "mtFitText": { "alias": "mtFitText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1272
1299
  }
1273
1300
 
1274
- export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
1301
+ export { CONNECTION_KEY_SEPARATOR, CURRENCY_COMPACT_THRESHOLD, ComparisonEntityList, ComparisonValue, DEFAULT_PHASE_GATE_COLOR, ENTITY_EMPTY_VALUE_PLACEHOLDER, EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityConnection, EntityCurrency, EntityDate, EntityField, EntityIcon, EntityLeafDetails, EntityLocation, EntityLongText, EntityLookup, EntityLookupModuleCheckList, EntityPercentage, EntityPhaseGate, EntityPreview, EntityPreviewBody, EntityScheduleItem, EntityStatus, EntityText, EntityUser, FitText, LEAF_DETAILS_KEY_SEPARATOR, SECTION_KEY_PREFIX, buildConnectionKey, buildDisplayEntities, buildSectionKey, compactCurrencyDisplay, currencyUnitOf, displayOrPlaceholder, expandConnectionEntity, expandLeafDetailsEntity, extractDisplayText, getEntitySectionTitle, groupEntitiesIntoSections, isConnectionSyntheticKey, isEntityAlignEnd, isEntityLabelHidden, isEntitySection, isLeafDetailsCatalogConfiguration, isLeafDetailsCollectionValue, isLeafDetailsRuntimeValue, isLeafDetailsSyntheticKey, isLeafDetailsValue, isSectionKey, isValueMissing, matchesPercentageColorRule, normalizeConnectionSourceLevels, normalizeNumerals, parseCurrencyAmount, resolveConnectionLevelName, resolveEntityLabelPosition, resolveLocalizedLabel, resolvePercentageColor, serializeEntityRawValue, splitConnectionKey };
1275
1302
  export type { ComparisonValueSide, ConnectionCatalogConfiguration, ConnectionLevelSavedConfig, ConnectionSourceLevelConfig, EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityClickEvent, EntityComparisonField, EntityComparisonOperation, EntityConfiguration, EntityConnectionConfig, EntityConnectionSourceValue, EntityConnectionValue, EntityData, EntityLabelPosition, EntityLeafDetailsConfig, EntityListComparison, EntityListComparisonRow, EntityLocationValue, EntityLookupCheckListItem, EntityLookupCheckListPropValue, EntityLookupCheckListValue, EntityLookupValue, EntityMultiLookupValue, EntityMultiUserValue, EntityNestedPropertyMeta, EntityPercentageConfig, EntityPhaseGateValue, EntityPropertyConfiguration, EntityResizeEvent, EntityScheduleItemValue, EntitySectionConfig, EntitySectionGroup, EntitySectionLabel, EntitySize, EntityStatusValue, EntityTranslatableTextValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsCatalogConfiguration, LeafDetailsCatalogLevelValue, LeafDetailsCatalogStatusValue, LeafDetailsEntityCollectionValue, LeafDetailsEntityValue, LeafDetailsRuntimeChildSchema, LeafDetailsRuntimeStatusCount, LeafDetailsRuntimeStatusDetails, LeafDetailsRuntimeValue, LeafDetailsStatusSummary, LeafLevelSavedConfig, PercentageColorRule, PercentageColorSource, PropertyValueComparison, ValueComparison };
@@ -27,6 +27,12 @@ declare class PickListField implements ControlValueAccessor, OnInit {
27
27
  readonly dragdrop: _angular_core.InputSignal<boolean>;
28
28
  readonly responsive: _angular_core.InputSignal<boolean>;
29
29
  readonly required: _angular_core.InputSignal<boolean>;
30
+ /**
31
+ * Selected values the user may not remove — the caller owns them (a field the
32
+ * backend requires, say). They render disabled in the target list and are put
33
+ * back if an interaction drops them anyway.
34
+ */
35
+ readonly lockedValues: _angular_core.InputSignal<any[]>;
30
36
  styleClass: string;
31
37
  requiredValidator: typeof Validators.required;
32
38
  value: _angular_core.WritableSignal<any[]>;
@@ -38,6 +44,12 @@ declare class PickListField implements ControlValueAccessor, OnInit {
38
44
  ngControl: NgControl;
39
45
  isInvalid: typeof isInvalid;
40
46
  private hasInitialized;
47
+ private readonly lockedIdentifiers;
48
+ /**
49
+ * Bound as `targetOptionDisabled`, so it has to keep a stable identity — a
50
+ * new function per change-detection pass re-renders both lists every cycle.
51
+ */
52
+ readonly isLockedOption: (item: any) => boolean;
41
53
  pickList?: PickList;
42
54
  constructor();
43
55
  ngOnInit(): void;
@@ -51,13 +63,20 @@ declare class PickListField implements ControlValueAccessor, OnInit {
51
63
  private getNestedValue;
52
64
  private syncLists;
53
65
  private syncFromPickList;
66
+ /**
67
+ * `targetOptionDisabled` only stops a locked item from being *selected*: the
68
+ * pick list's "move all to source" button empties the target without
69
+ * consulting it. Anything locked that was in the value before the interaction
70
+ * goes back into the target list before the new value is emitted.
71
+ */
72
+ private restoreLockedItems;
54
73
  private normalizeValueToOptions;
55
74
  private extractValues;
56
75
  private updateSourceFromTarget;
57
76
  private getIdentifier;
58
77
  private findOption;
59
78
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PickListField, never>;
60
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PickListField, "mt-pick-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "sourceHeader": { "alias": "sourceHeader"; "required": false; "isSignal": true; }; "targetHeader": { "alias": "targetHeader"; "required": false; "isSignal": true; }; "showSourceControls": { "alias": "showSourceControls"; "required": false; "isSignal": true; }; "showTargetControls": { "alias": "showTargetControls"; "required": false; "isSignal": true; }; "showSourceFilter": { "alias": "showSourceFilter"; "required": false; "isSignal": true; }; "showTargetFilter": { "alias": "showTargetFilter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "filterLocale": { "alias": "filterLocale"; "required": false; "isSignal": true; }; "filterMatchMode": { "alias": "filterMatchMode"; "required": false; "isSignal": true; }; "dragdrop": { "alias": "dragdrop"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
79
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PickListField, "mt-pick-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "sourceHeader": { "alias": "sourceHeader"; "required": false; "isSignal": true; }; "targetHeader": { "alias": "targetHeader"; "required": false; "isSignal": true; }; "showSourceControls": { "alias": "showSourceControls"; "required": false; "isSignal": true; }; "showTargetControls": { "alias": "showTargetControls"; "required": false; "isSignal": true; }; "showSourceFilter": { "alias": "showSourceFilter"; "required": false; "isSignal": true; }; "showTargetFilter": { "alias": "showTargetFilter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "filterLocale": { "alias": "filterLocale"; "required": false; "isSignal": true; }; "filterMatchMode": { "alias": "filterMatchMode"; "required": false; "isSignal": true; }; "dragdrop": { "alias": "dragdrop"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "lockedValues": { "alias": "lockedValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
61
80
  }
62
81
 
63
82
  export { PickListField };
@@ -568,6 +568,8 @@ declare class MultiSelectFieldConfig extends BaseFieldConfig {
568
568
  }
569
569
  declare class PickListFieldConfig extends BaseFieldConfig {
570
570
  options: any[];
571
+ /** Selected values the user cannot move back out of the target list. */
572
+ lockedValues: any[];
571
573
  optionLabel: string;
572
574
  optionValue: string;
573
575
  sourceHeader: string;
@@ -595,6 +597,7 @@ declare class PickListFieldConfig extends BaseFieldConfig {
595
597
  dataKey?: string;
596
598
  dragdrop?: boolean;
597
599
  responsive?: boolean;
600
+ lockedValues?: any[];
598
601
  });
599
602
  }
600
603
  declare class CheckboxFieldConfig extends BaseFieldConfig {