@masterteam/properties 0.0.32 → 0.0.33
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/properties",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/properties",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"tailwindcss": "^4.1.17",
|
|
20
20
|
"tailwindcss-primeui": "^0.6.1",
|
|
21
21
|
"@ngxs/store": "^20.1.0",
|
|
22
|
-
"@masterteam/
|
|
23
|
-
"@masterteam/
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
22
|
+
"@masterteam/components": "^0.0.100",
|
|
23
|
+
"@masterteam/forms": "^0.0.46",
|
|
24
|
+
"@masterteam/icons": "^0.0.13",
|
|
25
|
+
"@masterteam/formula-builder": "^0.0.2"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -121,6 +121,38 @@ interface ApiTestResponse {
|
|
|
121
121
|
schema?: ApiSchema | null;
|
|
122
122
|
data?: unknown;
|
|
123
123
|
}
|
|
124
|
+
interface PropertyStatusItem {
|
|
125
|
+
id: number;
|
|
126
|
+
propertyId: number;
|
|
127
|
+
key: string;
|
|
128
|
+
type?: string | null;
|
|
129
|
+
display?: Record<string, string>;
|
|
130
|
+
description?: Record<string, string>;
|
|
131
|
+
color?: string | null;
|
|
132
|
+
icon?: string | null;
|
|
133
|
+
formula?: FormulaBuilderValue | string | null;
|
|
134
|
+
formulaRaw?: unknown;
|
|
135
|
+
order?: number | null;
|
|
136
|
+
createdAt?: unknown;
|
|
137
|
+
createdBy?: unknown;
|
|
138
|
+
updatedAt?: unknown;
|
|
139
|
+
updatedBy?: unknown;
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
}
|
|
142
|
+
interface PropertyStatusPayload {
|
|
143
|
+
type?: string | null;
|
|
144
|
+
display?: Record<string, string>;
|
|
145
|
+
description?: Record<string, string>;
|
|
146
|
+
color?: string | null;
|
|
147
|
+
icon?: string | null;
|
|
148
|
+
formula?: FormulaBuilderValue | null;
|
|
149
|
+
}
|
|
150
|
+
interface PropertyStatusOrderPayload {
|
|
151
|
+
orders: Array<{
|
|
152
|
+
statusId: number;
|
|
153
|
+
order: number;
|
|
154
|
+
}>;
|
|
155
|
+
}
|
|
124
156
|
declare enum PropertiesActionKey {
|
|
125
157
|
GetAll = "getAll",
|
|
126
158
|
GetOne = "getOne",
|
|
@@ -132,7 +164,12 @@ declare enum PropertiesActionKey {
|
|
|
132
164
|
GetConfigProperties = "getConfigProperties",
|
|
133
165
|
GetConfigAsType = "getConfigAsType",
|
|
134
166
|
GetCountries = "getCountries",
|
|
135
|
-
TestApiConfiguration = "testApiConfiguration"
|
|
167
|
+
TestApiConfiguration = "testApiConfiguration",
|
|
168
|
+
GetPropertyStatuses = "getPropertyStatuses",
|
|
169
|
+
CreatePropertyStatus = "createPropertyStatus",
|
|
170
|
+
UpdatePropertyStatus = "updatePropertyStatus",
|
|
171
|
+
DeletePropertyStatus = "deletePropertyStatus",
|
|
172
|
+
ReorderPropertyStatuses = "reorderPropertyStatuses"
|
|
136
173
|
}
|
|
137
174
|
type PropertiesLoadingName = PropertiesActionKey;
|
|
138
175
|
interface PropertiesStateModel extends LoadingStateShape<PropertiesActionKey> {
|
|
@@ -151,6 +188,7 @@ interface PropertiesStateModel extends LoadingStateShape<PropertiesActionKey> {
|
|
|
151
188
|
countries: CountryDefinition[];
|
|
152
189
|
apiSchema: ApiSchema | null;
|
|
153
190
|
apiProperties: ApiPropertyOption[];
|
|
191
|
+
propertyStatuses: PropertyStatusItem[];
|
|
154
192
|
propertyTypes?: any;
|
|
155
193
|
breadcrumbItems: BreadcrumbItem[];
|
|
156
194
|
defaultViewType: string | null;
|
|
@@ -206,6 +244,38 @@ declare class TestApiConfiguration {
|
|
|
206
244
|
declare class ResetApiConfiguration {
|
|
207
245
|
static readonly type = "[Properties] Reset API Configuration";
|
|
208
246
|
}
|
|
247
|
+
declare class GetPropertyStatuses {
|
|
248
|
+
readonly propertyId: string | number;
|
|
249
|
+
static readonly type = "[Properties] Get Property Statuses";
|
|
250
|
+
constructor(propertyId: string | number);
|
|
251
|
+
}
|
|
252
|
+
declare class CreatePropertyStatus {
|
|
253
|
+
readonly propertyId: string | number;
|
|
254
|
+
readonly payload: PropertyStatusPayload;
|
|
255
|
+
static readonly type = "[Properties] Create Property Status";
|
|
256
|
+
constructor(propertyId: string | number, payload: PropertyStatusPayload);
|
|
257
|
+
}
|
|
258
|
+
declare class UpdatePropertyStatus {
|
|
259
|
+
readonly propertyId: string | number;
|
|
260
|
+
readonly statusId: string | number;
|
|
261
|
+
readonly payload: PropertyStatusPayload;
|
|
262
|
+
static readonly type = "[Properties] Update Property Status";
|
|
263
|
+
constructor(propertyId: string | number, statusId: string | number, payload: PropertyStatusPayload);
|
|
264
|
+
}
|
|
265
|
+
declare class DeletePropertyStatus {
|
|
266
|
+
readonly propertyId: string | number;
|
|
267
|
+
readonly statusId: string | number;
|
|
268
|
+
static readonly type = "[Properties] Delete Property Status";
|
|
269
|
+
constructor(propertyId: string | number, statusId: string | number);
|
|
270
|
+
}
|
|
271
|
+
declare class ReorderPropertyStatuses {
|
|
272
|
+
readonly payload: PropertyStatusOrderPayload;
|
|
273
|
+
static readonly type = "[Properties] Reorder Property Statuses";
|
|
274
|
+
constructor(payload: PropertyStatusOrderPayload);
|
|
275
|
+
}
|
|
276
|
+
declare class ResetPropertyStatuses {
|
|
277
|
+
static readonly type = "[Properties] Reset Property Statuses";
|
|
278
|
+
}
|
|
209
279
|
declare class GetPropertiesForConfigType {
|
|
210
280
|
readonly moduleType: string;
|
|
211
281
|
readonly moduleId: string | number;
|
|
@@ -281,7 +351,7 @@ declare class PropertiesState extends CrudStateBase<PropertyItem, PropertiesStat
|
|
|
281
351
|
private readonly groupsUrl;
|
|
282
352
|
private readonly countriesUrl;
|
|
283
353
|
private readonly apiTestUrl;
|
|
284
|
-
private readonly
|
|
354
|
+
private readonly propertyStatusOrderUrl;
|
|
285
355
|
static properties(state: PropertiesStateModel): PropertyItem[];
|
|
286
356
|
static selectedProperty(state: PropertiesStateModel): PropertyItem | null;
|
|
287
357
|
static moduleId(state: PropertiesStateModel): string | number | null;
|
|
@@ -293,6 +363,7 @@ declare class PropertiesState extends CrudStateBase<PropertyItem, PropertiesStat
|
|
|
293
363
|
static countries(state: PropertiesStateModel): CountryDefinition[];
|
|
294
364
|
static apiSchema(state: PropertiesStateModel): ApiSchema | null;
|
|
295
365
|
static apiProperties(state: PropertiesStateModel): ApiPropertyOption[];
|
|
366
|
+
static propertyStatuses(state: PropertiesStateModel): PropertyStatusItem[];
|
|
296
367
|
static propertyTypes(state: PropertiesStateModel): any;
|
|
297
368
|
static breadcrumbItems(state: PropertiesStateModel): BreadcrumbItem[];
|
|
298
369
|
static defaultViewType(state: PropertiesStateModel): string | null;
|
|
@@ -305,12 +376,18 @@ declare class PropertiesState extends CrudStateBase<PropertyItem, PropertiesStat
|
|
|
305
376
|
getGroups(ctx: StateContext<PropertiesStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<Response<GroupDefinition[]>>;
|
|
306
377
|
getConfigAsType(ctx: StateContext<PropertiesStateModel>, action: GetConfigAsType): rxjs.Observable<ConfigScope[]> | rxjs.Observable<Response<ConfigScope[]>>;
|
|
307
378
|
getCountries(ctx: StateContext<PropertiesStateModel>, _action: GetCountries): rxjs.Observable<CountryDefinition[]>;
|
|
308
|
-
testApiConfiguration(ctx: StateContext<PropertiesStateModel>, action: TestApiConfiguration): rxjs.Observable<Response<
|
|
379
|
+
testApiConfiguration(ctx: StateContext<PropertiesStateModel>, action: TestApiConfiguration): rxjs.Observable<Response<Record<string, unknown>>>;
|
|
380
|
+
getPropertyStatuses(ctx: StateContext<PropertiesStateModel>, action: GetPropertyStatuses): rxjs.Observable<Response<PropertyStatusItem[]>>;
|
|
381
|
+
createPropertyStatus(ctx: StateContext<PropertiesStateModel>, action: CreatePropertyStatus): rxjs.Observable<Response<PropertyStatusItem>>;
|
|
382
|
+
updatePropertyStatus(ctx: StateContext<PropertiesStateModel>, action: UpdatePropertyStatus): rxjs.Observable<Response<PropertyStatusItem>>;
|
|
383
|
+
deletePropertyStatus(ctx: StateContext<PropertiesStateModel>, action: DeletePropertyStatus): rxjs.Observable<Response<boolean>>;
|
|
384
|
+
reorderPropertyStatuses(ctx: StateContext<PropertiesStateModel>, action: ReorderPropertyStatuses): rxjs.Observable<Response<unknown>>;
|
|
309
385
|
getPropertiesForConfigType(ctx: StateContext<PropertiesStateModel>, action: GetPropertiesForConfigType): rxjs.Observable<Response<PropertyItem[]>>;
|
|
310
386
|
resetConfigProperties(ctx: StateContext<PropertiesStateModel>): void;
|
|
311
387
|
resetConfigScopes(ctx: StateContext<PropertiesStateModel>): void;
|
|
312
388
|
resetSelectedProperty(ctx: StateContext<PropertiesStateModel>): void;
|
|
313
389
|
resetApiConfiguration(ctx: StateContext<PropertiesStateModel>): void;
|
|
390
|
+
resetPropertyStatuses(ctx: StateContext<PropertiesStateModel>): void;
|
|
314
391
|
setModuleInfo(ctx: StateContext<PropertiesStateModel>, action: SetPropertiesModuleInfo): void;
|
|
315
392
|
SetPropertyTypes(ctx: StateContext<PropertiesStateModel>, action: SetPropertyTypes): void;
|
|
316
393
|
setBreadcrumb(ctx: StateContext<PropertiesStateModel>, action: SetBreadcrumb): void;
|
|
@@ -319,6 +396,8 @@ declare class PropertiesState extends CrudStateBase<PropertyItem, PropertiesStat
|
|
|
319
396
|
updateProperty(ctx: StateContext<PropertiesStateModel>, action: UpdateProperty): rxjs.Observable<Response<PropertyItem>> | rxjs.Observable<null>;
|
|
320
397
|
deleteProperty(ctx: StateContext<PropertiesStateModel>, action: DeleteProperty): rxjs.Observable<void>;
|
|
321
398
|
private mapSchemaToOptions;
|
|
399
|
+
private buildSchemaFromRecord;
|
|
400
|
+
private inferApiFieldType;
|
|
322
401
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertiesState, never>;
|
|
323
402
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PropertiesState>;
|
|
324
403
|
}
|
|
@@ -337,6 +416,7 @@ declare class PropertiesFacade {
|
|
|
337
416
|
readonly countries: _angular_core.Signal<_masterteam_properties.CountryDefinition[]>;
|
|
338
417
|
readonly apiSchema: _angular_core.Signal<_masterteam_properties.ApiSchema | null>;
|
|
339
418
|
readonly apiProperties: _angular_core.Signal<_masterteam_properties.ApiPropertyOption[]>;
|
|
419
|
+
readonly propertyStatuses: _angular_core.Signal<_masterteam_properties.PropertyStatusItem[]>;
|
|
340
420
|
readonly breadcrumbItems: _angular_core.Signal<BreadcrumbItem[]>;
|
|
341
421
|
readonly defaultViewType: _angular_core.Signal<string | null>;
|
|
342
422
|
private readonly loadingActive;
|
|
@@ -352,6 +432,11 @@ declare class PropertiesFacade {
|
|
|
352
432
|
readonly isLoadingConfigAsType: _angular_core.Signal<boolean>;
|
|
353
433
|
readonly isLoadingCountries: _angular_core.Signal<boolean>;
|
|
354
434
|
readonly isTestingApi: _angular_core.Signal<boolean>;
|
|
435
|
+
readonly isLoadingPropertyStatuses: _angular_core.Signal<boolean>;
|
|
436
|
+
readonly isCreatingPropertyStatus: _angular_core.Signal<boolean>;
|
|
437
|
+
readonly isUpdatingPropertyStatus: _angular_core.Signal<boolean>;
|
|
438
|
+
readonly isDeletingPropertyStatus: _angular_core.Signal<boolean>;
|
|
439
|
+
readonly isReorderingPropertyStatuses: _angular_core.Signal<boolean>;
|
|
355
440
|
readonly allError: _angular_core.Signal<string | null>;
|
|
356
441
|
readonly oneError: _angular_core.Signal<string | null>;
|
|
357
442
|
readonly createError: _angular_core.Signal<string | null>;
|
|
@@ -363,6 +448,7 @@ declare class PropertiesFacade {
|
|
|
363
448
|
readonly configAsTypeError: _angular_core.Signal<string | null>;
|
|
364
449
|
readonly countriesError: _angular_core.Signal<string | null>;
|
|
365
450
|
readonly apiTestError: _angular_core.Signal<string | null>;
|
|
451
|
+
readonly propertyStatusesError: _angular_core.Signal<string | null>;
|
|
366
452
|
readonly systemProperties: _angular_core.Signal<_masterteam_properties.PropertyItem[]>;
|
|
367
453
|
readonly customProperties: _angular_core.Signal<_masterteam_properties.PropertyItem[]>;
|
|
368
454
|
loadAll(params?: Partial<PropertiesQueryParams>): Observable<unknown>;
|
|
@@ -377,6 +463,12 @@ declare class PropertiesFacade {
|
|
|
377
463
|
loadCountries(): Observable<unknown>;
|
|
378
464
|
testApiConfiguration(payload: ApiTestPayload): Observable<unknown>;
|
|
379
465
|
resetApiConfiguration(): Observable<unknown>;
|
|
466
|
+
loadPropertyStatuses(propertyId: string | number): Observable<unknown>;
|
|
467
|
+
createPropertyStatus(propertyId: string | number, payload: PropertyStatusPayload): Observable<unknown>;
|
|
468
|
+
updatePropertyStatus(propertyId: string | number, statusId: string | number, payload: PropertyStatusPayload): Observable<unknown>;
|
|
469
|
+
deletePropertyStatus(propertyId: string | number, statusId: string | number): Observable<unknown>;
|
|
470
|
+
reorderPropertyStatuses(payload: PropertyStatusOrderPayload): Observable<unknown>;
|
|
471
|
+
resetPropertyStatuses(): Observable<unknown>;
|
|
380
472
|
setPropertyTypes(propertyTypes: any): Observable<void>;
|
|
381
473
|
loadPropertiesForConfigType(moduleType: string, moduleId: string | number): Observable<unknown>;
|
|
382
474
|
resetSelectedProperty(): Observable<unknown>;
|
|
@@ -453,17 +545,22 @@ declare class PropertyForm implements OnDestroy {
|
|
|
453
545
|
readonly propertyType: _angular_core.Signal<any>;
|
|
454
546
|
readonly isCalculated: _angular_core.Signal<boolean>;
|
|
455
547
|
readonly formulaSchemaId: _angular_core.Signal<number | undefined>;
|
|
548
|
+
readonly selectedViewType: _angular_core.Signal<any>;
|
|
549
|
+
readonly statusPropertyId: _angular_core.Signal<number | undefined>;
|
|
456
550
|
readonly availablePropertyTypes: _angular_core.Signal<any>;
|
|
457
551
|
private readonly selectedPropertyTypeConfiguration;
|
|
458
552
|
readonly configurationFormConfig: _angular_core.Signal<any>;
|
|
459
553
|
private configurationHost?;
|
|
554
|
+
private readonly statusConfigurationSection;
|
|
460
555
|
private readonly environmentInjector;
|
|
556
|
+
private readonly routeFragment;
|
|
461
557
|
private readonly configurationComponentType;
|
|
462
558
|
private configurationComponentRef;
|
|
463
559
|
private configurationComponentLoadId;
|
|
464
560
|
private readonly externalConfigurationForm;
|
|
465
561
|
private externalConfigurationSubscriptions;
|
|
466
562
|
private readonly externalConfigurationInvalid;
|
|
563
|
+
private readonly lastStatusScrollKey;
|
|
467
564
|
readonly configurationComponentExists: _angular_core.Signal<boolean>;
|
|
468
565
|
readonly configurationFormInvalid: _angular_core.Signal<boolean>;
|
|
469
566
|
readonly submitDisabled: _angular_core.Signal<boolean>;
|
|
@@ -479,10 +576,12 @@ declare class PropertyForm implements OnDestroy {
|
|
|
479
576
|
createOrEditProperty(): void;
|
|
480
577
|
private syncFormWithSelectedProperty;
|
|
481
578
|
goBack(): void;
|
|
579
|
+
private handleStatusPropertySave;
|
|
580
|
+
private scrollToStatusConfiguration;
|
|
482
581
|
ngOnDestroy(): void;
|
|
483
582
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertyForm, never>;
|
|
484
583
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PropertyForm, "mt-property-form", never, { "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
485
584
|
}
|
|
486
585
|
|
|
487
|
-
export { CreateProperty, DeleteProperty, GetConfigAsType, GetCountries, GetGroups, GetLookups, GetProperties, GetPropertiesForConfigType, GetProperty, PropertiesActionKey, PropertiesFacade, PropertiesList, PropertiesState, PropertyForm, REQUEST_CONTEXT, ResetApiConfiguration, ResetConfigProperties, ResetConfigScopes, ResetSelectedProperty, SetBreadcrumb, SetDefaultViewType, SetPropertiesModuleInfo, SetPropertyTypes, TestApiConfiguration, UpdateProperty };
|
|
488
|
-
export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, ConfigScope, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload };
|
|
586
|
+
export { CreateProperty, CreatePropertyStatus, DeleteProperty, DeletePropertyStatus, GetConfigAsType, GetCountries, GetGroups, GetLookups, GetProperties, GetPropertiesForConfigType, GetProperty, GetPropertyStatuses, PropertiesActionKey, PropertiesFacade, PropertiesList, PropertiesState, PropertyForm, REQUEST_CONTEXT, ReorderPropertyStatuses, ResetApiConfiguration, ResetConfigProperties, ResetConfigScopes, ResetPropertyStatuses, ResetSelectedProperty, SetBreadcrumb, SetDefaultViewType, SetPropertiesModuleInfo, SetPropertyTypes, TestApiConfiguration, UpdateProperty, UpdatePropertyStatus };
|
|
587
|
+
export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, ConfigScope, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload, PropertyStatusItem, PropertyStatusOrderPayload, PropertyStatusPayload };
|