@masterteam/components 0.0.278 → 0.0.280
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/fesm2022/masterteam-components-business-fields.mjs +22 -2
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-runtime-action.mjs +76 -27
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -1
- package/fesm2022/masterteam-components-sidebar.mjs +10 -3
- package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
- package/fesm2022/masterteam-components-topbar.mjs +10 -3
- package/fesm2022/masterteam-components-topbar.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +2 -0
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +10 -2
- package/types/masterteam-components-runtime-action.d.ts +37 -2
- package/types/masterteam-components-sidebar.d.ts +3 -0
- package/types/masterteam-components-topbar.d.ts +3 -0
- package/types/masterteam-components.d.ts +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { AfterViewInit, InjectionToken, Type, OnInit } from '@angular/core';
|
|
3
|
-
import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchedulePredecessorFieldRuntimeContext, EntityListFieldRuntimeContext, ScheduleItemSelectorFieldRuntimeContext, LookupCheckListPropertyConfig, LookupModuleCheckListFieldRuntimeContext } from '@masterteam/components';
|
|
3
|
+
import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchemaConnectionFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, EntityListFieldRuntimeContext, ScheduleItemSelectorFieldRuntimeContext, LookupCheckListPropertyConfig, LookupModuleCheckListFieldRuntimeContext } from '@masterteam/components';
|
|
4
4
|
import { ControlValueAccessor, NgControl, Validators } from '@angular/forms';
|
|
5
5
|
import { HttpContext } from '@angular/common/http';
|
|
6
6
|
import { ColumnDef, TableAction } from '@masterteam/components/table';
|
|
@@ -115,6 +115,14 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
115
115
|
* Includes `targetLevelId`, `sourceLevels[]`, `payloadTemplate`, etc.
|
|
116
116
|
*/
|
|
117
117
|
readonly configuration: _angular_core.InputSignal<SchemaConnectionConfig>;
|
|
118
|
+
/**
|
|
119
|
+
* Runtime scope for this field's options queries. When `templateId` is
|
|
120
|
+
* present, it is sent as a `templateId` structural filter on every source
|
|
121
|
+
* level's `fetch/query` request, scoping the dropdown to the active plan
|
|
122
|
+
* instance. Absent means options load unscoped, same as before this input
|
|
123
|
+
* existed.
|
|
124
|
+
*/
|
|
125
|
+
readonly runtimeContext: _angular_core.InputSignal<SchemaConnectionFieldRuntimeContext | null>;
|
|
118
126
|
/**
|
|
119
127
|
* Optional HttpContext for API requests (e.g. to set base URL behavior).
|
|
120
128
|
*/
|
|
@@ -192,7 +200,7 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
192
200
|
registerOnTouched(fn: any): void;
|
|
193
201
|
setDisabledState(disabled: boolean): void;
|
|
194
202
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaConnectionField, never>;
|
|
195
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaConnectionField, "mt-schema-connection-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": true; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
203
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaConnectionField, "mt-schema-connection-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": true; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
196
204
|
}
|
|
197
205
|
|
|
198
206
|
type PredecessorType = 0 | 1 | 2 | 3;
|
|
@@ -68,13 +68,48 @@ declare function resolveActionLabel(action: RuntimeAction): string;
|
|
|
68
68
|
declare function buildActionPayload(action: RuntimeAction, formValue: Record<string, unknown> | undefined, externalResolvers?: Record<string, () => unknown>): Record<string, unknown> | undefined;
|
|
69
69
|
declare function normalizePayloadValue(key: string, value: unknown): unknown;
|
|
70
70
|
declare function resolveDefaultPayloadValue(key: string): unknown;
|
|
71
|
+
/**
|
|
72
|
+
* The declared operation inputs the payload would submit with no value — the
|
|
73
|
+
* `{ propertyKey, value: null }` placeholders the backend sent, still unfilled.
|
|
74
|
+
*
|
|
75
|
+
* A non-empty result means the action was fired without rendering its form, and
|
|
76
|
+
* submitting it would write nulls over the record (or fail the contract's
|
|
77
|
+
* `operation_input.required` rule). Hosts fill these by running the operation
|
|
78
|
+
* through `process-form-load` / `process-submit` instead.
|
|
79
|
+
*/
|
|
80
|
+
declare function getUnfilledActionInputKeys(payload: Record<string, unknown> | undefined): string[];
|
|
71
81
|
declare function getMissingRequiredPayloadKeys(action: RuntimeAction, payload: Record<string, unknown> | undefined): string[];
|
|
72
82
|
declare function isMissingPayloadValue(value: unknown): boolean;
|
|
73
83
|
declare function normalizeHttpMethod(value: string | null | undefined): string | null;
|
|
74
84
|
declare function methodSupportsBody(method: string): boolean;
|
|
75
85
|
declare function buildRequestOptions(method: string, payload: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
86
|
+
/**
|
|
87
|
+
* The action collects free-form request metadata — a reason, a note, a
|
|
88
|
+
* delegate, attachments — which the generic confirm dialog can render on its
|
|
89
|
+
* own because the keys are fixed and operation-independent.
|
|
90
|
+
*
|
|
91
|
+
* Operation *inputs* are a different thing entirely: see
|
|
92
|
+
* {@link hasActionInputFields}.
|
|
93
|
+
*/
|
|
76
94
|
declare function hasActionFormFields(action: RuntimeAction): boolean;
|
|
77
|
-
|
|
95
|
+
/**
|
|
96
|
+
* The action declares operation inputs the user still has to supply — its
|
|
97
|
+
* `payloadTemplate.fields` is a non-empty list of `{ propertyKey, value: null }`
|
|
98
|
+
* placeholders.
|
|
99
|
+
*
|
|
100
|
+
* Firing such an action straight from its template submits those nulls, so a
|
|
101
|
+
* host must instead run the operation through its own form: `process-form-load`
|
|
102
|
+
* for the effective form and current values, `process-submit/validate`, then
|
|
103
|
+
* `process-submit`. The backend owns which fields those are — never infer them
|
|
104
|
+
* from the operation key.
|
|
105
|
+
*/
|
|
106
|
+
declare function hasActionInputFields(action: RuntimeAction): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The property keys an action declares as its operation inputs, in the
|
|
109
|
+
* backend's own casing. Pass them to `mt-client-form`'s `allowedFieldKeys` to
|
|
110
|
+
* scope a configured form down to the inputs this action actually writes.
|
|
111
|
+
*/
|
|
112
|
+
declare function getActionInputFieldKeys(action: RuntimeAction): string[];
|
|
78
113
|
|
|
79
114
|
declare class RuntimeActionContextStore {
|
|
80
115
|
private readonly formSource;
|
|
@@ -101,5 +136,5 @@ declare class RuntimeActionRunner {
|
|
|
101
136
|
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionRunner>;
|
|
102
137
|
}
|
|
103
138
|
|
|
104
|
-
export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getMissingRequiredPayloadKeys, hasActionFormFields,
|
|
139
|
+
export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getActionInputFieldKeys, getMissingRequiredPayloadKeys, getUnfilledActionInputKeys, hasActionFormFields, hasActionInputFields, isMissingPayloadValue, methodSupportsBody, normalizeHttpMethod, normalizePayloadValue, resolveActionLabel, resolveDefaultPayloadValue };
|
|
105
140
|
export type { RuntimeAction, RuntimeActionAfterSuccess, RuntimeActionExecuteOptions, RuntimeActionFormSource, RuntimeActionFormValue, RuntimeActionReason, RuntimeActionResult, RuntimeActionStatus, RuntimeActionTranslatable };
|
|
@@ -33,6 +33,9 @@ declare class Sidebar {
|
|
|
33
33
|
logoLink: _angular_core.InputSignal<string | any[] | undefined>;
|
|
34
34
|
title: _angular_core.InputSignal<string | undefined>;
|
|
35
35
|
subTitle: _angular_core.InputSignal<string | undefined>;
|
|
36
|
+
protected readonly hasTitle: _angular_core.Signal<boolean>;
|
|
37
|
+
protected readonly hasSubTitle: _angular_core.Signal<boolean>;
|
|
38
|
+
protected readonly hasBrandText: _angular_core.Signal<boolean>;
|
|
36
39
|
bgColor: _angular_core.InputSignal<string | undefined>;
|
|
37
40
|
bgImage: _angular_core.InputSignal<string | undefined>;
|
|
38
41
|
bgRepeat: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -13,6 +13,9 @@ declare class Topbar {
|
|
|
13
13
|
logoClass: _angular_core.InputSignal<string | undefined>;
|
|
14
14
|
titleClass: _angular_core.InputSignal<string | undefined>;
|
|
15
15
|
subTitleClass: _angular_core.InputSignal<string | undefined>;
|
|
16
|
+
protected readonly hasTitle: _angular_core.Signal<boolean>;
|
|
17
|
+
protected readonly hasSubTitle: _angular_core.Signal<boolean>;
|
|
18
|
+
protected readonly hasBrandText: _angular_core.Signal<boolean>;
|
|
16
19
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Topbar, never>;
|
|
17
20
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Topbar, "mt-topbar", never, { "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoLink": { "alias": "logoLink"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "bgImage": { "alias": "bgImage"; "required": false; "isSignal": true; }; "bgRepeat": { "alias": "bgRepeat"; "required": false; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "showBranding": { "alias": "showBranding"; "required": false; "isSignal": true; }; "logoClass": { "alias": "logoClass"; "required": false; "isSignal": true; }; "titleClass": { "alias": "titleClass"; "required": false; "isSignal": true; }; "subTitleClass": { "alias": "subTitleClass"; "required": false; "isSignal": true; }; }, {}, never, ["[start]", "[actions]"], true, never>;
|
|
18
21
|
}
|
|
@@ -683,14 +683,26 @@ declare class LookupMatrixFieldConfig extends BaseFieldConfig {
|
|
|
683
683
|
emptyMessage?: string;
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
+
interface SchemaConnectionFieldRuntimeContext {
|
|
687
|
+
/**
|
|
688
|
+
* The active plan/template instance id. When present, it is sent as a
|
|
689
|
+
* `templateId` structural filter on every source level's `fetch/query`
|
|
690
|
+
* options request, scoping the dropdown to records owned by this plan.
|
|
691
|
+
* When absent, options load unscoped (back-compat with hosts that don't
|
|
692
|
+
* pass `templateId` to `mt-client-form`).
|
|
693
|
+
*/
|
|
694
|
+
templateId?: number | string | null;
|
|
695
|
+
}
|
|
686
696
|
declare class SchemaConnectionFieldConfig extends BaseFieldConfig {
|
|
687
697
|
configuration: any;
|
|
688
698
|
context: HttpContext | undefined;
|
|
689
699
|
filter: boolean;
|
|
700
|
+
runtimeContext: SchemaConnectionFieldRuntimeContext | null;
|
|
690
701
|
constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
|
|
691
702
|
configuration: any;
|
|
692
703
|
context?: HttpContext | undefined;
|
|
693
704
|
filter?: boolean;
|
|
705
|
+
runtimeContext?: SchemaConnectionFieldRuntimeContext | null;
|
|
694
706
|
});
|
|
695
707
|
}
|
|
696
708
|
interface SchedulePredecessorFieldRuntimeContext {
|
|
@@ -1257,4 +1269,4 @@ declare class MTDateFormatPipe implements PipeTransform {
|
|
|
1257
1269
|
}
|
|
1258
1270
|
|
|
1259
1271
|
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, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, newFieldId, parseClockTime, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
|
|
1260
|
-
export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, 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 };
|
|
1272
|
+
export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, 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, SchemaConnectionFieldRuntimeContext, SectionConfig, ValidatorType };
|