@masterteam/components 0.0.111 → 0.0.112
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +127 -9
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +78 -12
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +25 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +32 -3
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +22 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +29 -2
- package/types/masterteam-components-multi-select-field.d.ts +8 -0
- package/types/masterteam-components-select-field.d.ts +5 -0
- package/types/masterteam-components-table.d.ts +2 -0
- package/types/masterteam-components.d.ts +41 -4
|
@@ -54,11 +54,15 @@ declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChange
|
|
|
54
54
|
isGrouped(): boolean;
|
|
55
55
|
getOptionLabelValue(option: any): string;
|
|
56
56
|
getOptionIcon(option: any): string | undefined;
|
|
57
|
+
shouldRenderOptionColorSwatch(option: any): boolean;
|
|
58
|
+
getOptionSwatchColor(option: any): string | null;
|
|
57
59
|
getOptionAvatarBackground(option: any): string | null;
|
|
58
60
|
getOptionAvatarColor(option: any): string | null;
|
|
59
61
|
getOptionAvatarShape(option: any): 'circle' | 'square';
|
|
60
62
|
getGroupLabelValue(group: any): string;
|
|
61
63
|
getGroupIcon(group: any): string | undefined;
|
|
64
|
+
shouldRenderGroupColorSwatch(group: any): boolean;
|
|
65
|
+
getGroupSwatchColor(group: any): string | null;
|
|
62
66
|
getGroupAvatarBackground(group: any): string | null;
|
|
63
67
|
getGroupAvatarColor(group: any): string | null;
|
|
64
68
|
getGroupAvatarShape(group: any): 'circle' | 'square';
|
|
@@ -66,7 +70,11 @@ declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChange
|
|
|
66
70
|
private getGroupColor;
|
|
67
71
|
private getAvatarBackgroundByColor;
|
|
68
72
|
private getAvatarColorByColor;
|
|
73
|
+
formatSelectedItems(values: any[] | null | undefined): string;
|
|
74
|
+
private resolveDisplayColor;
|
|
69
75
|
private normalizeAvatarShape;
|
|
76
|
+
private resolveNestedValue;
|
|
77
|
+
private resolveOption;
|
|
70
78
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultiSelectField, never>;
|
|
71
79
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiSelectField, "mt-multi-select-field", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "pInputs": { "alias": "pInputs"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterBy": { "alias": "filterBy"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; "isSignal": true; }; "group": { "alias": "group"; "required": false; "isSignal": true; }; "optionGroupLabel": { "alias": "optionGroupLabel"; "required": false; "isSignal": true; }; "optionGroupChildren": { "alias": "optionGroupChildren"; "required": false; "isSignal": true; }; "optionIcon": { "alias": "optionIcon"; "required": false; "isSignal": true; }; "optionIconColor": { "alias": "optionIconColor"; "required": false; "isSignal": true; }; "optionIconShape": { "alias": "optionIconShape"; "required": false; "isSignal": true; }; "optionAvatarShape": { "alias": "optionAvatarShape"; "required": false; "isSignal": true; }; "optionGroupIcon": { "alias": "optionGroupIcon"; "required": false; "isSignal": true; }; "optionGroupIconColor": { "alias": "optionGroupIconColor"; "required": false; "isSignal": true; }; "optionGroupIconShape": { "alias": "optionGroupIconShape"; "required": false; "isSignal": true; }; "optionGroupAvatarShape": { "alias": "optionGroupAvatarShape"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
72
80
|
}
|
|
@@ -58,11 +58,15 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
58
58
|
clearSelection(): void;
|
|
59
59
|
getOptionLabelValue(option: any): string;
|
|
60
60
|
getOptionIcon(option: any): string | undefined;
|
|
61
|
+
shouldRenderOptionColorSwatch(option: any): boolean;
|
|
62
|
+
getOptionSwatchColor(option: any): string | null;
|
|
61
63
|
getOptionAvatarBackground(option: any): string | null;
|
|
62
64
|
getOptionAvatarColor(option: any): string | null;
|
|
63
65
|
getOptionAvatarShape(option: any): 'circle' | 'square';
|
|
64
66
|
getGroupLabelValue(group: any): string;
|
|
65
67
|
getGroupIcon(group: any): string | undefined;
|
|
68
|
+
shouldRenderGroupColorSwatch(group: any): boolean;
|
|
69
|
+
getGroupSwatchColor(group: any): string | null;
|
|
66
70
|
getGroupAvatarBackground(group: any): string | null;
|
|
67
71
|
getGroupAvatarColor(group: any): string | null;
|
|
68
72
|
getGroupAvatarShape(group: any): 'circle' | 'square';
|
|
@@ -70,6 +74,7 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
70
74
|
private getGroupColor;
|
|
71
75
|
private getAvatarBackgroundByColor;
|
|
72
76
|
private getAvatarColorByColor;
|
|
77
|
+
private resolveDisplayColor;
|
|
73
78
|
private normalizeAvatarShape;
|
|
74
79
|
/**
|
|
75
80
|
* Resolves a nested dot-notation path (e.g. "name.display") on an object.
|
|
@@ -169,6 +169,8 @@ declare class Table {
|
|
|
169
169
|
* to show only avatar + displayName.
|
|
170
170
|
*/
|
|
171
171
|
getEntityColumnData(row: any, col: ColumnDef): EntityData | null;
|
|
172
|
+
protected getBooleanProperty(obj: any, key: string): boolean;
|
|
173
|
+
private setProperty;
|
|
172
174
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Table, never>;
|
|
173
175
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "mt-table", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "selectableRows": { "alias": "selectableRows"; "required": false; "isSignal": true; }; "clickableRows": { "alias": "clickableRows"; "required": false; "isSignal": true; }; "generalSearch": { "alias": "generalSearch"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "updating": { "alias": "updating"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "lazyTotalRecords": { "alias": "lazyTotalRecords"; "required": false; "isSignal": true; }; "reorderableColumns": { "alias": "reorderableColumns"; "required": false; "isSignal": true; }; "reorderableRows": { "alias": "reorderableRows"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "actionShape": { "alias": "actionShape"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "tabsOptionLabel": { "alias": "tabsOptionLabel"; "required": false; "isSignal": true; }; "tabsOptionValue": { "alias": "tabsOptionValue"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paginatorPosition": { "alias": "paginatorPosition"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "cellChange": "cellChange"; "lazyLoad": "lazyLoad"; "columnReorder": "columnReorder"; "rowReorder": "rowReorder"; "rowClick": "rowClick"; "filters": "filtersChange"; "activeTab": "activeTabChange"; "onTabChange": "onTabChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "first": "firstChange"; "filterTerm": "filterTermChange"; }, ["captionStartContent", "captionEndContent", "emptyContent"], never, true, never>;
|
|
174
176
|
}
|
|
@@ -20,7 +20,7 @@ declare function provideMTMessages(): typeof MessageService;
|
|
|
20
20
|
|
|
21
21
|
declare function provideMTConfirmation(): typeof ConfirmationService;
|
|
22
22
|
|
|
23
|
-
type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'pick-list' | 'checkbox' | 'icon-field' | 'color-picker' | 'spacer' | string;
|
|
23
|
+
type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'pick-list' | 'checkbox' | 'icon-field' | 'color-picker' | 'spacer' | 'lookup-matrix' | string;
|
|
24
24
|
type ValidatorType = 'required' | 'email' | 'minLength' | 'maxLength' | 'min' | 'max' | 'pattern' | 'custom';
|
|
25
25
|
type FieldRelationAction = 'enable' | 'disable' | 'show' | 'hide';
|
|
26
26
|
interface FieldRelationConfig {
|
|
@@ -419,6 +419,43 @@ declare class SpacerFieldConfig extends BaseFieldConfig {
|
|
|
419
419
|
label?: string;
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
|
+
interface LookupOptionItemConfig {
|
|
423
|
+
id?: number | string;
|
|
424
|
+
key?: string;
|
|
425
|
+
label: string;
|
|
426
|
+
value: any;
|
|
427
|
+
color?: string | null;
|
|
428
|
+
description?: string;
|
|
429
|
+
}
|
|
430
|
+
interface LookupMatrixCellConfig {
|
|
431
|
+
row: number;
|
|
432
|
+
column: number;
|
|
433
|
+
xLookupItemId: number | string;
|
|
434
|
+
yLookupItemId: number | string;
|
|
435
|
+
zLookupItemId?: number | string | null;
|
|
436
|
+
label: string;
|
|
437
|
+
color?: string | null;
|
|
438
|
+
}
|
|
439
|
+
declare class LookupMatrixFieldConfig extends BaseFieldConfig {
|
|
440
|
+
xFieldKey: string;
|
|
441
|
+
yFieldKey: string;
|
|
442
|
+
xAxisLabel: string;
|
|
443
|
+
yAxisLabel: string;
|
|
444
|
+
xOptions: LookupOptionItemConfig[];
|
|
445
|
+
yOptions: LookupOptionItemConfig[];
|
|
446
|
+
cells: LookupMatrixCellConfig[];
|
|
447
|
+
emptyMessage: string;
|
|
448
|
+
constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
|
|
449
|
+
xFieldKey: string;
|
|
450
|
+
yFieldKey: string;
|
|
451
|
+
xAxisLabel?: string;
|
|
452
|
+
yAxisLabel?: string;
|
|
453
|
+
xOptions?: LookupOptionItemConfig[];
|
|
454
|
+
yOptions?: LookupOptionItemConfig[];
|
|
455
|
+
cells?: LookupMatrixCellConfig[];
|
|
456
|
+
emptyMessage?: string;
|
|
457
|
+
});
|
|
458
|
+
}
|
|
422
459
|
declare class SchemaConnectionFieldConfig extends BaseFieldConfig {
|
|
423
460
|
configuration: any;
|
|
424
461
|
context: HttpContext | undefined;
|
|
@@ -443,7 +480,7 @@ declare class SchedulePredecessorFieldConfig extends BaseFieldConfig {
|
|
|
443
480
|
});
|
|
444
481
|
}
|
|
445
482
|
type DynamicFieldConfig = {
|
|
446
|
-
[K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)[K];
|
|
483
|
+
[K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)[K];
|
|
447
484
|
};
|
|
448
485
|
interface LayoutConfig {
|
|
449
486
|
containerClass?: string;
|
|
@@ -789,5 +826,5 @@ declare const REQUEST_CONTEXT: HttpContextToken<RequestContextConfig>;
|
|
|
789
826
|
declare function getLightColor(hexColor: string): string;
|
|
790
827
|
declare function getContrastColor(bgColor: string): string;
|
|
791
828
|
|
|
792
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DateFieldConfig, EditorFieldConfig, IconFieldConfig, 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, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
|
|
793
|
-
export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|
|
829
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DateFieldConfig, EditorFieldConfig, IconFieldConfig, LookupMatrixFieldConfig, 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, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
|
|
830
|
+
export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupMatrixCellConfig, LookupOptionItemConfig, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|