@masterteam/components 0.0.155 → 0.0.157

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.
@@ -9,6 +9,9 @@ declare class Drawer implements OnDestroy {
9
9
  private readonly drawerInstanceClass;
10
10
  private customMask;
11
11
  private removeMaskClickListener;
12
+ private resizeAnimTimer;
13
+ private readonly RESIZE_ANIM_CLASS;
14
+ private readonly RESIZE_ANIM_DURATION_MS;
12
15
  visible: _angular_core.ModelSignal<boolean>;
13
16
  visibleChange: _angular_core.OutputEmitterRef<boolean>;
14
17
  onShow: _angular_core.OutputEmitterRef<boolean>;
@@ -25,13 +28,20 @@ declare class Drawer implements OnDestroy {
25
28
  transitionOptions: _angular_core.InputSignal<string>;
26
29
  appendTo: _angular_core.InputSignal<string | HTMLElement>;
27
30
  modal: _angular_core.InputSignal<boolean>;
31
+ showMaximizeToggle: _angular_core.InputSignal<boolean>;
32
+ maximizeTooltip: _angular_core.InputSignal<string>;
33
+ restoreTooltip: _angular_core.InputSignal<string>;
34
+ maximized: _angular_core.ModelSignal<boolean>;
35
+ protected readonly canShowMaximizeToggle: _angular_core.Signal<boolean>;
28
36
  protected readonly resolvedAppendTo: _angular_core.Signal<string | HTMLElement>;
29
37
  protected readonly resolvedStyleClass: _angular_core.Signal<string>;
30
38
  constructor();
31
39
  visibleChangeEvent(event: boolean): void;
32
40
  onClose(): void;
41
+ toggleMaximized(): void;
33
42
  onShowEvent(): void;
34
43
  onHideEvent(): void;
44
+ private applyMaximizedInlineStyles;
35
45
  ngOnDestroy(): void;
36
46
  private syncCustomMask;
37
47
  private updateCustomMaskAttributes;
@@ -42,7 +52,7 @@ declare class Drawer implements OnDestroy {
42
52
  private bindMaskClickListener;
43
53
  private destroyCustomMask;
44
54
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Drawer, never>;
45
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "mt-drawer", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "blockScroll": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "loadingHeader": { "alias": "loadingHeader"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; }, never, ["[content]", "[footer]"], true, never>;
55
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "mt-drawer", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "blockScroll": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "loadingHeader": { "alias": "loadingHeader"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "showMaximizeToggle": { "alias": "showMaximizeToggle"; "required": false; "isSignal": true; }; "maximizeTooltip": { "alias": "maximizeTooltip"; "required": false; "isSignal": true; }; "restoreTooltip": { "alias": "restoreTooltip"; "required": false; "isSignal": true; }; "maximized": { "alias": "maximized"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; "maximized": "maximizedChange"; }, never, ["[content]", "[footer]"], true, never>;
46
56
  }
47
57
 
48
58
  export { Drawer };
@@ -15,6 +15,9 @@ interface DynamicDrawerConfigInterface {
15
15
  transitionOptions?: string;
16
16
  styleClass?: string;
17
17
  inputValues?: any;
18
+ showMaximizeToggle?: boolean;
19
+ maximizeTooltip?: string;
20
+ restoreTooltip?: string;
18
21
  }
19
22
  declare class DrawerService {
20
23
  private appRef;
@@ -41,12 +44,15 @@ declare class DrawerController {
41
44
  private _styleClass;
42
45
  private _header;
43
46
  private _fullScreen;
47
+ private _maximized;
44
48
  /** Get the current additional styleClass */
45
49
  get styleClass(): _angular_core.WritableSignal<string>;
46
50
  /** Get the current header */
47
51
  get header(): _angular_core.WritableSignal<string>;
48
52
  /** Get the current fullScreen state */
49
53
  get fullScreen(): _angular_core.WritableSignal<boolean | undefined>;
54
+ /** Get the current maximized (full-width) state */
55
+ get maximized(): _angular_core.WritableSignal<boolean>;
50
56
  /** Add or replace the dynamic styleClass */
51
57
  setStyleClass(styleClass: string): void;
52
58
  /** Append a class to the existing styleClass */
@@ -59,6 +65,10 @@ declare class DrawerController {
59
65
  setHeader(header: string): void;
60
66
  /** Toggle fullScreen mode */
61
67
  setFullScreen(fullScreen: boolean): void;
68
+ /** Set maximized (full-width) state */
69
+ setMaximized(maximized: boolean): void;
70
+ /** Toggle maximized (full-width) state */
71
+ toggleMaximized(): void;
62
72
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerController, never>;
63
73
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerController>;
64
74
  }
@@ -70,8 +80,22 @@ declare class DynamicDrawerHost {
70
80
  childInjector: Injector;
71
81
  private ref?;
72
82
  private drawerController;
83
+ private readonly host;
84
+ private readonly renderer;
85
+ private resizeAnimTimer;
86
+ private readonly RESIZE_ANIM_CLASS;
87
+ private readonly RESIZE_ANIM_DURATION_MS;
88
+ constructor();
73
89
  /** Computed styleClass combining config + dynamic controller class */
74
90
  computedStyleClass: _angular_core.Signal<string>;
91
+ /** Whether the maximize toggle button is visible in the header */
92
+ canShowMaximizeToggle: _angular_core.Signal<boolean>;
93
+ /** Tooltip for maximize/restore button (state-aware) */
94
+ maximizeButtonTooltip: _angular_core.Signal<any>;
95
+ /** Icon for maximize/restore button (state-aware) */
96
+ maximizeButtonIcon: _angular_core.Signal<"layout.minimize-01" | "layout.maximize-01">;
97
+ /** Toggle the drawer's full-width state */
98
+ toggleMaximized(): void;
75
99
  computedDrawerStyle: _angular_core.Signal<Record<string, string> | null>;
76
100
  /** Computed header - controller overrides config if set */
77
101
  computedHeader: _angular_core.Signal<any>;
@@ -85,6 +109,10 @@ declare class DynamicDrawerHost {
85
109
  }): void;
86
110
  show(): void;
87
111
  handleHide(data?: null): void;
112
+ onDrawerShow(): void;
113
+ onDrawerHide(): void;
114
+ private getDrawerElement;
115
+ private applyMaximizedInlineStyles;
88
116
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicDrawerHost, never>;
89
117
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicDrawerHost, "mt-dynamic-drawer-host", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "connect": { "alias": "connect"; "required": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
90
118
  }
@@ -472,6 +472,10 @@ declare class EntitiesPreview {
472
472
  * `clickableKeys` — host owns a computed signal and passes the value.
473
473
  */
474
474
  readonly activeKeys: _angular_core.InputSignal<ReadonlySet<string>>;
475
+ /** Tooltip text shown on hover when an entity is clickable but not active. */
476
+ readonly clickableTooltip: _angular_core.InputSignal<string>;
477
+ /** Tooltip text shown on hover when an entity is the current active filter. */
478
+ readonly activeTooltip: _angular_core.InputSignal<string>;
475
479
  /**
476
480
  * Emits when an individual entity slot is clicked. Only fires when the
477
481
  * entity's key is present in `clickableKeys`.
@@ -487,7 +491,7 @@ declare class EntitiesPreview {
487
491
  protected isActive(entity: EntityData): boolean;
488
492
  protected onEntityClick(source: MouseEvent, entity: EntityData): void;
489
493
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
490
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
494
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; "clickableTooltip": { "alias": "clickableTooltip"; "required": false; "isSignal": true; }; "activeTooltip": { "alias": "activeTooltip"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
491
495
  }
492
496
 
493
497
  /**
@@ -0,0 +1,102 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Type } from '@angular/core';
3
+
4
+ interface RuntimeActionTranslatable {
5
+ display?: string;
6
+ en?: string;
7
+ ar?: string;
8
+ }
9
+ type RuntimeActionAfterSuccess = 'refresh' | 'close';
10
+ interface RuntimeActionReason {
11
+ source?: string;
12
+ code?: string;
13
+ message?: string;
14
+ blocking?: boolean;
15
+ details?: string | null;
16
+ ruleKey?: string | null;
17
+ requestId?: number | null;
18
+ requestStatus?: string | null;
19
+ requestSchemaId?: number | null;
20
+ relatedRequestIds?: number[];
21
+ }
22
+ interface RuntimeAction {
23
+ actionKey: string;
24
+ actionName?: RuntimeActionTranslatable | string | null;
25
+ httpMethod?: string | null;
26
+ url?: string | null;
27
+ isAvailable?: boolean;
28
+ afterSuccess?: RuntimeActionAfterSuccess | null;
29
+ stepIds?: Array<number | string>;
30
+ needConfirmation?: boolean;
31
+ payloadKeys?: string[];
32
+ requiredPayloadKeys?: string[];
33
+ payloadTemplate?: Record<string, unknown> | null;
34
+ formId?: string | number | null;
35
+ targetType?: string;
36
+ targetId?: number;
37
+ moduleKey?: string;
38
+ operationKey?: string;
39
+ primaryReasonCode?: string | null;
40
+ reasons?: RuntimeActionReason[];
41
+ }
42
+ type RuntimeActionStatus = 'success' | 'error' | 'cancelled';
43
+ interface RuntimeActionResult {
44
+ status: RuntimeActionStatus;
45
+ actionKey: string;
46
+ afterSuccess: RuntimeActionAfterSuccess | null;
47
+ response?: unknown;
48
+ error?: unknown;
49
+ }
50
+ interface RuntimeActionExecuteOptions {
51
+ externalPayloadResolvers?: Record<string, () => unknown>;
52
+ defaultAfterSuccess?: RuntimeActionAfterSuccess;
53
+ successMessage?: (response: unknown, action: RuntimeAction) => string;
54
+ errorMessage?: (error: unknown, action: RuntimeAction) => string;
55
+ transformPayload?: (payload: Record<string, unknown> | undefined, action: RuntimeAction) => Record<string, unknown> | undefined;
56
+ silent?: boolean;
57
+ }
58
+ interface RuntimeActionFormValue {
59
+ requestPropertyId?: number;
60
+ propertyKey: string;
61
+ value: unknown;
62
+ }
63
+ interface RuntimeActionFormSource {
64
+ getSubmitValues(): RuntimeActionFormValue[] | undefined;
65
+ }
66
+ declare function resolveActionLabel(action: RuntimeAction): string;
67
+
68
+ declare function buildActionPayload(action: RuntimeAction, formValue: Record<string, unknown> | undefined, externalResolvers?: Record<string, () => unknown>): Record<string, unknown> | undefined;
69
+ declare function normalizePayloadValue(key: string, value: unknown): unknown;
70
+ declare function resolveDefaultPayloadValue(key: string): unknown;
71
+ declare function getMissingRequiredPayloadKeys(action: RuntimeAction, payload: Record<string, unknown> | undefined): string[];
72
+ declare function isMissingPayloadValue(value: unknown): boolean;
73
+ declare function normalizeHttpMethod(value: string | null | undefined): string | null;
74
+ declare function methodSupportsBody(method: string): boolean;
75
+ declare function buildRequestOptions(method: string, payload: Record<string, unknown> | undefined): Record<string, unknown>;
76
+ declare function hasActionFormFields(action: RuntimeAction): boolean;
77
+ declare function hasProgressTemplateField(action: RuntimeAction): boolean;
78
+
79
+ declare class RuntimeActionContextStore {
80
+ private readonly formSource;
81
+ setFormSource(source: RuntimeActionFormSource | null): void;
82
+ resolveFormValues(): RuntimeActionFormValue[];
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeActionContextStore, never>;
84
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionContextStore>;
85
+ }
86
+
87
+ declare const RUNTIME_ACTION_CONFIRM_DIALOG: InjectionToken<Type<unknown>>;
88
+ declare class RuntimeActionRunner {
89
+ private readonly http;
90
+ private readonly confirmation;
91
+ private readonly modal;
92
+ private readonly toast;
93
+ private readonly confirmDialogClass;
94
+ execute(action: RuntimeAction, options?: RuntimeActionExecuteOptions): Promise<RuntimeActionResult>;
95
+ private confirm;
96
+ private run;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeActionRunner, never>;
98
+ static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionRunner>;
99
+ }
100
+
101
+ export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getMissingRequiredPayloadKeys, hasActionFormFields, hasProgressTemplateField, isMissingPayloadValue, methodSupportsBody, normalizeHttpMethod, normalizePayloadValue, resolveActionLabel, resolveDefaultPayloadValue };
102
+ export type { RuntimeAction, RuntimeActionAfterSuccess, RuntimeActionExecuteOptions, RuntimeActionFormSource, RuntimeActionFormValue, RuntimeActionReason, RuntimeActionResult, RuntimeActionStatus, RuntimeActionTranslatable };