@masterteam/components 0.0.109 → 0.0.111
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/assets/i18n/ar.json +38 -28
- package/assets/i18n/en.json +10 -0
- package/fesm2022/masterteam-components-avatar.mjs +8 -3
- package/fesm2022/masterteam-components-avatar.mjs.map +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +260 -3
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +2 -2
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +2 -2
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +10 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +2 -2
- package/types/masterteam-components-avatar.d.ts +2 -0
- package/types/masterteam-components-business-fields.d.ts +73 -1
- package/types/masterteam-components.d.ts +16 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
|
|
3
3
|
import { HttpContext } from '@angular/common/http';
|
|
4
|
+
import { ColumnDef, TableAction } from '@masterteam/components/table';
|
|
5
|
+
import { SchedulePredecessorFieldRuntimeContext } from '@masterteam/components';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* One source level inside connection configuration.
|
|
@@ -110,5 +112,75 @@ declare class SchemaConnectionField implements ControlValueAccessor {
|
|
|
110
112
|
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>;
|
|
111
113
|
}
|
|
112
114
|
|
|
113
|
-
|
|
115
|
+
type PredecessorType = 0 | 1 | 2 | 3;
|
|
116
|
+
interface SchedulePredecessorValue {
|
|
117
|
+
predecessorId: number | string;
|
|
118
|
+
type: PredecessorType;
|
|
119
|
+
lagDays: number;
|
|
120
|
+
}
|
|
121
|
+
interface SchedulePredecessorRow extends SchedulePredecessorValue {
|
|
122
|
+
key: string;
|
|
123
|
+
}
|
|
124
|
+
interface SelectOption {
|
|
125
|
+
label: string;
|
|
126
|
+
value: number | string;
|
|
127
|
+
}
|
|
128
|
+
declare class SchedulePredecessorField implements ControlValueAccessor {
|
|
129
|
+
private readonly predecessorCellTpl;
|
|
130
|
+
private readonly typeCellTpl;
|
|
131
|
+
private readonly lagCellTpl;
|
|
132
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
133
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
134
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
135
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
136
|
+
readonly configuration: _angular_core.InputSignal<unknown>;
|
|
137
|
+
readonly runtimeContext: _angular_core.InputSignal<SchedulePredecessorFieldRuntimeContext | null>;
|
|
138
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
139
|
+
readonly taskOptions: _angular_core.WritableSignal<SelectOption[]>;
|
|
140
|
+
readonly rows: _angular_core.WritableSignal<SchedulePredecessorRow[]>;
|
|
141
|
+
readonly disabled: _angular_core.WritableSignal<boolean>;
|
|
142
|
+
readonly typeOptions: _angular_core.Signal<SelectOption[]>;
|
|
143
|
+
readonly availableTaskOptions: _angular_core.Signal<SelectOption[]>;
|
|
144
|
+
readonly canAddRow: _angular_core.Signal<boolean>;
|
|
145
|
+
readonly addTooltip: _angular_core.Signal<string | undefined>;
|
|
146
|
+
readonly pageSize: _angular_core.Signal<number>;
|
|
147
|
+
readonly columns: _angular_core.WritableSignal<ColumnDef[]>;
|
|
148
|
+
readonly rowActions: _angular_core.Signal<TableAction[]>;
|
|
149
|
+
requiredValidator: typeof Validators.required;
|
|
150
|
+
onTouched: () => void;
|
|
151
|
+
onModelChange: (value: string | null) => void;
|
|
152
|
+
ngControl: NgControl | null;
|
|
153
|
+
private readonly http;
|
|
154
|
+
private readonly transloco;
|
|
155
|
+
private readonly destroyRef;
|
|
156
|
+
private readonly activeLang;
|
|
157
|
+
private rowKey;
|
|
158
|
+
readonly texts: _angular_core.Signal<{
|
|
159
|
+
noAvailable: string;
|
|
160
|
+
predecessor: string;
|
|
161
|
+
type: string;
|
|
162
|
+
lagDays: string;
|
|
163
|
+
delete: string;
|
|
164
|
+
}>;
|
|
165
|
+
constructor();
|
|
166
|
+
addRow(): void;
|
|
167
|
+
removeRow(key: string): void;
|
|
168
|
+
updateRow(key: string, patch: Partial<SchedulePredecessorRow>): void;
|
|
169
|
+
writeValue(value: unknown): void;
|
|
170
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
171
|
+
registerOnTouched(fn: () => void): void;
|
|
172
|
+
setDisabledState(disabled: boolean): void;
|
|
173
|
+
private syncRows;
|
|
174
|
+
private loadTaskOptions;
|
|
175
|
+
private mapTaskOptions;
|
|
176
|
+
private resolveRootRecords;
|
|
177
|
+
private flattenRecords;
|
|
178
|
+
private nextRowKey;
|
|
179
|
+
private parseCompactValue;
|
|
180
|
+
private formatCompactValue;
|
|
181
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchedulePredecessorField, never>;
|
|
182
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchedulePredecessorField, "mt-schedule-predecessor-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; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export { SchedulePredecessorField, SchemaConnectionField };
|
|
114
186
|
export type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, SchemaConnectionConfig, SourceLevelState };
|
|
@@ -429,8 +429,21 @@ declare class SchemaConnectionFieldConfig extends BaseFieldConfig {
|
|
|
429
429
|
filter?: boolean;
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
+
interface SchedulePredecessorFieldRuntimeContext {
|
|
433
|
+
levelId?: number | string | null;
|
|
434
|
+
levelDataId?: number | string | null;
|
|
435
|
+
moduleDataId?: number | string | null;
|
|
436
|
+
}
|
|
437
|
+
declare class SchedulePredecessorFieldConfig extends BaseFieldConfig {
|
|
438
|
+
configuration: any;
|
|
439
|
+
runtimeContext: SchedulePredecessorFieldRuntimeContext | null;
|
|
440
|
+
constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
|
|
441
|
+
configuration?: any;
|
|
442
|
+
runtimeContext?: SchedulePredecessorFieldRuntimeContext | null;
|
|
443
|
+
});
|
|
444
|
+
}
|
|
432
445
|
type DynamicFieldConfig = {
|
|
433
|
-
[K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & SchemaConnectionFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & SchemaConnectionFieldConfig & BaseFieldConfig)[K];
|
|
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];
|
|
434
447
|
};
|
|
435
448
|
interface LayoutConfig {
|
|
436
449
|
containerClass?: string;
|
|
@@ -776,5 +789,5 @@ declare const REQUEST_CONTEXT: HttpContextToken<RequestContextConfig>;
|
|
|
776
789
|
declare function getLightColor(hexColor: string): string;
|
|
777
790
|
declare function getContrastColor(bgColor: string): string;
|
|
778
791
|
|
|
779
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DateFieldConfig, EditorFieldConfig, IconFieldConfig, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, 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 };
|
|
780
|
-
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, SectionConfig, ValidatorType };
|
|
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 };
|