@masterteam/properties 0.0.32 → 0.0.34

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.32",
3
+ "version": "0.0.34",
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/forms": "^0.0.40",
23
- "@masterteam/components": "^0.0.94",
24
22
  "@masterteam/formula-builder": "^0.0.2",
25
- "@masterteam/icons": "^0.0.13"
23
+ "@masterteam/icons": "^0.0.13",
24
+ "@masterteam/forms": "^0.0.47",
25
+ "@masterteam/components": "^0.0.101"
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 apiDetectUrl;
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<ApiSchema> | null>;
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>;
@@ -446,6 +538,7 @@ declare class PropertyForm implements OnDestroy {
446
538
  private readonly mainControl;
447
539
  private readonly configurationControl;
448
540
  private readonly formulaControl;
541
+ private readonly mainValue;
449
542
  private readonly creating;
450
543
  private readonly updating;
451
544
  readonly loading: _angular_core.Signal<boolean>;
@@ -453,17 +546,23 @@ declare class PropertyForm implements OnDestroy {
453
546
  readonly propertyType: _angular_core.Signal<any>;
454
547
  readonly isCalculated: _angular_core.Signal<boolean>;
455
548
  readonly formulaSchemaId: _angular_core.Signal<number | undefined>;
549
+ readonly selectedViewType: _angular_core.Signal<any>;
550
+ readonly statusPropertyId: _angular_core.Signal<number | undefined>;
456
551
  readonly availablePropertyTypes: _angular_core.Signal<any>;
457
552
  private readonly selectedPropertyTypeConfiguration;
458
553
  readonly configurationFormConfig: _angular_core.Signal<any>;
459
554
  private configurationHost?;
555
+ private readonly statusConfigurationSection;
460
556
  private readonly environmentInjector;
557
+ private readonly routeFragment;
461
558
  private readonly configurationComponentType;
462
559
  private configurationComponentRef;
463
560
  private configurationComponentLoadId;
464
561
  private readonly externalConfigurationForm;
465
562
  private externalConfigurationSubscriptions;
563
+ private readonly subscriptions;
466
564
  private readonly externalConfigurationInvalid;
565
+ private readonly lastStatusScrollKey;
467
566
  readonly configurationComponentExists: _angular_core.Signal<boolean>;
468
567
  readonly configurationFormInvalid: _angular_core.Signal<boolean>;
469
568
  readonly submitDisabled: _angular_core.Signal<boolean>;
@@ -479,10 +578,12 @@ declare class PropertyForm implements OnDestroy {
479
578
  createOrEditProperty(): void;
480
579
  private syncFormWithSelectedProperty;
481
580
  goBack(): void;
581
+ private handleStatusPropertySave;
582
+ private scrollToStatusConfiguration;
482
583
  ngOnDestroy(): void;
483
584
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertyForm, never>;
484
585
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PropertyForm, "mt-property-form", never, { "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
485
586
  }
486
587
 
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 };
588
+ 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 };
589
+ export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, ConfigScope, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload, PropertyStatusItem, PropertyStatusOrderPayload, PropertyStatusPayload };