@masterteam/properties 0.0.9-alpha.0 → 0.0.10
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/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as _masterteam_components_breadcrumb from '@masterteam/components/breadcrumb';
|
|
2
|
+
import { BreadcrumbItem } from '@masterteam/components/breadcrumb';
|
|
1
3
|
import * as _angular_core from '@angular/core';
|
|
2
4
|
import { OnDestroy } from '@angular/core';
|
|
3
5
|
import { ColumnDef, TableAction } from '@masterteam/components/table';
|
|
@@ -50,13 +52,13 @@ interface PropertyItem {
|
|
|
50
52
|
interface LookupDefinitionItem {
|
|
51
53
|
id: number;
|
|
52
54
|
key?: string;
|
|
53
|
-
|
|
55
|
+
title?: string;
|
|
54
56
|
[key: string]: unknown;
|
|
55
57
|
}
|
|
56
58
|
interface LookupDefinition {
|
|
57
59
|
id: number;
|
|
58
60
|
key: string;
|
|
59
|
-
|
|
61
|
+
title: string;
|
|
60
62
|
allowDelete: boolean;
|
|
61
63
|
allowManage: boolean;
|
|
62
64
|
allowEdit: boolean;
|
|
@@ -65,12 +67,12 @@ interface LookupDefinition {
|
|
|
65
67
|
}
|
|
66
68
|
interface GroupDefinition {
|
|
67
69
|
id: number;
|
|
68
|
-
|
|
70
|
+
title: string;
|
|
69
71
|
[key: string]: unknown;
|
|
70
72
|
}
|
|
71
73
|
interface LogDefinition {
|
|
72
74
|
id: number;
|
|
73
|
-
|
|
75
|
+
title: string;
|
|
74
76
|
[key: string]: unknown;
|
|
75
77
|
}
|
|
76
78
|
interface ConfigScope {
|
|
@@ -124,6 +126,9 @@ interface PropertiesStateModel extends LoadingStateShape<PropertiesLoadingName>
|
|
|
124
126
|
selectedProperty: PropertyItem | null;
|
|
125
127
|
moduleType: string | null;
|
|
126
128
|
moduleId: string | number | null;
|
|
129
|
+
parentModuleType?: string | null;
|
|
130
|
+
parentModuleId?: string | number | null;
|
|
131
|
+
parentPath?: string;
|
|
127
132
|
lastQueryParams: PropertiesQueryParams | null;
|
|
128
133
|
lookups: LookupDefinition[];
|
|
129
134
|
configTypeProperties: PropertyItem[];
|
|
@@ -133,6 +138,7 @@ interface PropertiesStateModel extends LoadingStateShape<PropertiesLoadingName>
|
|
|
133
138
|
apiSchema: ApiSchema | null;
|
|
134
139
|
apiProperties: ApiPropertyOption[];
|
|
135
140
|
propertyTypes?: any[];
|
|
141
|
+
breadcrumbItems: BreadcrumbItem[];
|
|
136
142
|
}
|
|
137
143
|
interface PropertiesQueryParams {
|
|
138
144
|
includeLog?: boolean;
|
|
@@ -187,9 +193,8 @@ declare class ResetApiConfiguration {
|
|
|
187
193
|
declare class GetPropertiesForConfigType {
|
|
188
194
|
readonly moduleType: string;
|
|
189
195
|
readonly moduleId: string | number;
|
|
190
|
-
readonly params?: PropertiesQueryParams | undefined;
|
|
191
196
|
static readonly type = "[Properties] Get By Config Type";
|
|
192
|
-
constructor(moduleType: string, moduleId: string | number
|
|
197
|
+
constructor(moduleType: string, moduleId: string | number);
|
|
193
198
|
}
|
|
194
199
|
declare class ResetConfigProperties {
|
|
195
200
|
static readonly type = "[Properties] Reset Config Properties";
|
|
@@ -219,14 +224,22 @@ declare class UpdateProperty {
|
|
|
219
224
|
declare class SetPropertiesModuleInfo {
|
|
220
225
|
readonly moduleType: string;
|
|
221
226
|
readonly moduleId: string | number;
|
|
227
|
+
readonly parentModuleType?: string | undefined;
|
|
228
|
+
readonly parentModuleId?: string | number | undefined;
|
|
229
|
+
readonly parentPath?: string | undefined;
|
|
222
230
|
static readonly type = "[Properties] Set Module Info";
|
|
223
|
-
constructor(moduleType: string, moduleId: string | number);
|
|
231
|
+
constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);
|
|
224
232
|
}
|
|
225
233
|
declare class SetPropertyTypes {
|
|
226
234
|
readonly payload: any;
|
|
227
235
|
static readonly type = "[Properties] Set Property Types";
|
|
228
236
|
constructor(payload: any);
|
|
229
237
|
}
|
|
238
|
+
declare class SetBreadcrumb {
|
|
239
|
+
readonly items: BreadcrumbItem[];
|
|
240
|
+
static readonly type = "[Properties] Set Breadcrumb";
|
|
241
|
+
constructor(items: BreadcrumbItem[]);
|
|
242
|
+
}
|
|
230
243
|
|
|
231
244
|
interface Response<T> {
|
|
232
245
|
endpoint: string;
|
|
@@ -258,22 +271,20 @@ declare class PropertiesState {
|
|
|
258
271
|
static apiSchema(state: PropertiesStateModel): ApiSchema | null;
|
|
259
272
|
static apiProperties(state: PropertiesStateModel): ApiPropertyOption[];
|
|
260
273
|
static propertyTypes(state: PropertiesStateModel): any[];
|
|
274
|
+
static breadcrumbItems(state: PropertiesStateModel): BreadcrumbItem[];
|
|
261
275
|
static isLoadingFactory(state: PropertiesStateModel): (loadingName: PropertiesLoadingName) => boolean;
|
|
262
276
|
static errorFactory(state: PropertiesStateModel): (loadingName: PropertiesLoadingName) => string | null;
|
|
263
277
|
static propertyById(state: PropertiesStateModel): (id: number | string) => PropertyItem | null;
|
|
264
278
|
getAll(ctx: StateContext<PropertiesStateModel>, action: GetProperties): rxjs.Observable<Response<PropertyItem[]> | null>;
|
|
265
279
|
getOne(ctx: StateContext<PropertiesStateModel>, action: GetProperty): rxjs.Observable<Response<PropertyItem> | null>;
|
|
266
|
-
getLookups(ctx: StateContext<PropertiesStateModel>, _action: GetLookups): rxjs.Observable<LookupDefinition[]> | rxjs.Observable<
|
|
280
|
+
getLookups(ctx: StateContext<PropertiesStateModel>, _action: GetLookups): rxjs.Observable<LookupDefinition[]> | rxjs.Observable<Response<LookupDefinition[]> | never[]>;
|
|
267
281
|
getGroups(ctx: StateContext<PropertiesStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<never[] | Response<GroupDefinition[]>>;
|
|
268
282
|
getConfigAsType(ctx: StateContext<PropertiesStateModel>, action: GetConfigAsType): rxjs.Observable<ConfigScope[]> | rxjs.Observable<never[] | Response<ConfigScope[]>>;
|
|
269
283
|
getCountries(ctx: StateContext<PropertiesStateModel>, _action: GetCountries): rxjs.Observable<CountryDefinition[]>;
|
|
270
284
|
testApiConfiguration(ctx: StateContext<PropertiesStateModel>, action: TestApiConfiguration): rxjs.Observable<Response<ApiSchema> | null>;
|
|
271
285
|
resetApiConfiguration(ctx: StateContext<PropertiesStateModel>): void;
|
|
272
|
-
private resolveApiSchema;
|
|
273
|
-
private buildSchemaFromData;
|
|
274
|
-
private resolveValueType;
|
|
275
286
|
private mapSchemaToOptions;
|
|
276
|
-
getPropertiesForConfigType(ctx: StateContext<PropertiesStateModel>, action: GetPropertiesForConfigType): rxjs.Observable<
|
|
287
|
+
getPropertiesForConfigType(ctx: StateContext<PropertiesStateModel>, action: GetPropertiesForConfigType): rxjs.Observable<Response<PropertyItem[]> | never[]>;
|
|
277
288
|
resetConfigProperties(ctx: StateContext<PropertiesStateModel>): void;
|
|
278
289
|
resetConfigScopes(ctx: StateContext<PropertiesStateModel>): void;
|
|
279
290
|
resetSelectedProperty(ctx: StateContext<PropertiesStateModel>): void;
|
|
@@ -282,6 +293,7 @@ declare class PropertiesState {
|
|
|
282
293
|
update(ctx: StateContext<PropertiesStateModel>, action: UpdateProperty): rxjs.Observable<Response<PropertyItem> | null>;
|
|
283
294
|
delete(ctx: StateContext<PropertiesStateModel>, action: DeleteProperty): rxjs.Observable<void | null>;
|
|
284
295
|
SetPropertyTypes(ctx: StateContext<PropertiesStateModel>, action: SetPropertyTypes): void;
|
|
296
|
+
setBreadcrumb(ctx: StateContext<PropertiesStateModel>, action: SetBreadcrumb): void;
|
|
285
297
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertiesState, never>;
|
|
286
298
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PropertiesState>;
|
|
287
299
|
}
|
|
@@ -298,6 +310,7 @@ declare class PropertiesFacade {
|
|
|
298
310
|
readonly countries: _angular_core.Signal<CountryDefinition[]>;
|
|
299
311
|
readonly apiSchema: _angular_core.Signal<ApiSchema | null>;
|
|
300
312
|
readonly apiProperties: _angular_core.Signal<ApiPropertyOption[]>;
|
|
313
|
+
readonly breadcrumbItems: _angular_core.Signal<BreadcrumbItem[]>;
|
|
301
314
|
readonly systemProperties: _angular_core.Signal<PropertyItem[]>;
|
|
302
315
|
readonly customProperties: _angular_core.Signal<PropertyItem[]>;
|
|
303
316
|
isLoading(loadingName: PropertiesLoadingName): _angular_core.Signal<boolean>;
|
|
@@ -306,7 +319,7 @@ declare class PropertiesFacade {
|
|
|
306
319
|
delete(id: string | number): Observable<unknown>;
|
|
307
320
|
create(payload: PropertyPayload): Observable<unknown>;
|
|
308
321
|
update(id: string | number, payload: PropertyPayload): Observable<unknown>;
|
|
309
|
-
setModuleInfo(moduleType: string, moduleId: string | number): Observable<unknown>;
|
|
322
|
+
setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): Observable<unknown>;
|
|
310
323
|
loadLookups(): Observable<unknown>;
|
|
311
324
|
loadGroups(): Observable<unknown>;
|
|
312
325
|
loadConfigAsType(viewType: string): Observable<unknown>;
|
|
@@ -314,10 +327,11 @@ declare class PropertiesFacade {
|
|
|
314
327
|
testApiConfiguration(payload: ApiTestPayload): Observable<unknown>;
|
|
315
328
|
resetApiConfiguration(): Observable<unknown>;
|
|
316
329
|
setPropertyTypes(propertyTypes: any): Observable<void>;
|
|
317
|
-
loadPropertiesForConfigType(moduleType: string, moduleId: string | number
|
|
330
|
+
loadPropertiesForConfigType(moduleType: string, moduleId: string | number): Observable<unknown>;
|
|
318
331
|
resetSelectedProperty(): Observable<unknown>;
|
|
319
332
|
resetConfigProperties(): Observable<unknown>;
|
|
320
333
|
resetConfigScopes(): Observable<unknown>;
|
|
334
|
+
setBreadcrumb(items: BreadcrumbItem[]): Observable<unknown>;
|
|
321
335
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertiesFacade, never>;
|
|
322
336
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PropertiesFacade>;
|
|
323
337
|
}
|
|
@@ -340,6 +354,7 @@ declare class PropertiesList {
|
|
|
340
354
|
readonly rowActions: _angular_core.WritableSignal<TableAction[]>;
|
|
341
355
|
readonly loading: _angular_core.Signal<boolean>;
|
|
342
356
|
readonly tableData: _angular_core.Signal<PropertyItem[]>;
|
|
357
|
+
readonly breadcrumbItems: _angular_core.Signal<_masterteam_components_breadcrumb.BreadcrumbItem[]>;
|
|
343
358
|
private editRow;
|
|
344
359
|
private deleteRow;
|
|
345
360
|
createProperty(): void;
|
|
@@ -353,7 +368,7 @@ declare class PropertyForm implements OnDestroy {
|
|
|
353
368
|
private readonly route;
|
|
354
369
|
propertyId: _angular_core.InputSignal<string>;
|
|
355
370
|
private readonly propertyTypes;
|
|
356
|
-
submitLabel: _angular_core.Signal<"
|
|
371
|
+
submitLabel: _angular_core.Signal<"Create" | "Update">;
|
|
357
372
|
isEditing: _angular_core.Signal<boolean>;
|
|
358
373
|
readonly propertyForm: FormGroup<{
|
|
359
374
|
main: FormControl<any>;
|
|
@@ -395,5 +410,5 @@ declare class PropertyForm implements OnDestroy {
|
|
|
395
410
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PropertyForm, "mt-property-form", never, { "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
396
411
|
}
|
|
397
412
|
|
|
398
|
-
export { CreateProperty, DeleteProperty, GetConfigAsType, GetCountries, GetGroups, GetLookups, GetProperties, GetPropertiesForConfigType, GetProperty, PropertiesFacade, PropertiesList, PropertiesState, PropertyForm, REQUEST_CONTEXT, ResetApiConfiguration, ResetConfigProperties, ResetConfigScopes, ResetSelectedProperty, SetPropertiesModuleInfo, SetPropertyTypes, TestApiConfiguration, UpdateProperty };
|
|
413
|
+
export { CreateProperty, DeleteProperty, GetConfigAsType, GetCountries, GetGroups, GetLookups, GetProperties, GetPropertiesForConfigType, GetProperty, PropertiesFacade, PropertiesList, PropertiesState, PropertyForm, REQUEST_CONTEXT, ResetApiConfiguration, ResetConfigProperties, ResetConfigScopes, ResetSelectedProperty, SetBreadcrumb, SetPropertiesModuleInfo, SetPropertyTypes, TestApiConfiguration, UpdateProperty };
|
|
399
414
|
export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, ConfigScope, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload };
|