@masterteam/properties 0.0.6 → 0.0.8
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/properties.css +2 -2
- package/fesm2022/masterteam-properties.mjs +210 -147
- package/fesm2022/masterteam-properties.mjs.map +1 -1
- package/index.d.ts +28 -12
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface PropertyItem {
|
|
|
19
19
|
normalizedKey: string;
|
|
20
20
|
viewType: string;
|
|
21
21
|
viewTypeLabel: string;
|
|
22
|
-
|
|
22
|
+
title: string | Record<string, string>;
|
|
23
23
|
description?: string;
|
|
24
24
|
defaultValue?: unknown;
|
|
25
25
|
order?: number;
|
|
@@ -73,6 +73,15 @@ interface LogDefinition {
|
|
|
73
73
|
name: string;
|
|
74
74
|
[key: string]: unknown;
|
|
75
75
|
}
|
|
76
|
+
interface ConfigScope {
|
|
77
|
+
scope: string;
|
|
78
|
+
items: Array<{
|
|
79
|
+
id: number;
|
|
80
|
+
title?: string;
|
|
81
|
+
name?: string;
|
|
82
|
+
[key: string]: unknown;
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
76
85
|
interface CountryDefinition {
|
|
77
86
|
name: string;
|
|
78
87
|
name_ar?: string;
|
|
@@ -109,7 +118,7 @@ interface ApiTestResponse {
|
|
|
109
118
|
schema?: ApiSchema | null;
|
|
110
119
|
data?: unknown;
|
|
111
120
|
}
|
|
112
|
-
type PropertiesLoadingName = 'getAll' | 'getOne' | 'create' | 'update' | 'delete' | 'getLookups' | 'getGroups' | 'getConfigProperties' | '
|
|
121
|
+
type PropertiesLoadingName = 'getAll' | 'getOne' | 'create' | 'update' | 'delete' | 'getLookups' | 'getGroups' | 'getConfigProperties' | 'getConfigAsType' | 'getCountries' | 'testApiConfiguration';
|
|
113
122
|
interface PropertiesStateModel extends LoadingStateShape<PropertiesLoadingName> {
|
|
114
123
|
properties: PropertyItem[];
|
|
115
124
|
selectedProperty: PropertyItem | null;
|
|
@@ -119,7 +128,7 @@ interface PropertiesStateModel extends LoadingStateShape<PropertiesLoadingName>
|
|
|
119
128
|
lookups: LookupDefinition[];
|
|
120
129
|
configTypeProperties: PropertyItem[];
|
|
121
130
|
groups: GroupDefinition[];
|
|
122
|
-
|
|
131
|
+
configScopes: ConfigScope[];
|
|
123
132
|
countries: CountryDefinition[];
|
|
124
133
|
apiSchema: ApiSchema | null;
|
|
125
134
|
apiProperties: ApiPropertyOption[];
|
|
@@ -159,8 +168,10 @@ declare class GetLookups {
|
|
|
159
168
|
declare class GetGroups {
|
|
160
169
|
static readonly type = "[Properties] Get Groups";
|
|
161
170
|
}
|
|
162
|
-
declare class
|
|
163
|
-
|
|
171
|
+
declare class GetConfigAsType {
|
|
172
|
+
readonly viewType: string;
|
|
173
|
+
static readonly type = "[Properties] Get Config As Type";
|
|
174
|
+
constructor(viewType: string);
|
|
164
175
|
}
|
|
165
176
|
declare class GetCountries {
|
|
166
177
|
static readonly type = "[Properties] Get Countries";
|
|
@@ -183,6 +194,9 @@ declare class GetPropertiesForConfigType {
|
|
|
183
194
|
declare class ResetConfigProperties {
|
|
184
195
|
static readonly type = "[Properties] Reset Config Properties";
|
|
185
196
|
}
|
|
197
|
+
declare class ResetConfigScopes {
|
|
198
|
+
static readonly type = "[Properties] Reset Config Scopes";
|
|
199
|
+
}
|
|
186
200
|
declare class ResetSelectedProperty {
|
|
187
201
|
static readonly type = "[Properties] Reset Selected Property";
|
|
188
202
|
}
|
|
@@ -231,7 +245,6 @@ declare class PropertiesState {
|
|
|
231
245
|
private readonly lookupsUrl;
|
|
232
246
|
private readonly configPropertiesUrl;
|
|
233
247
|
private readonly groupsUrl;
|
|
234
|
-
private readonly logsUrl;
|
|
235
248
|
private readonly countriesUrl;
|
|
236
249
|
private readonly apiTestUrl;
|
|
237
250
|
private readonly apiDetectUrl;
|
|
@@ -240,7 +253,7 @@ declare class PropertiesState {
|
|
|
240
253
|
static lookups(state: PropertiesStateModel): LookupDefinition[];
|
|
241
254
|
static configTypeProperties(state: PropertiesStateModel): PropertyItem[];
|
|
242
255
|
static groups(state: PropertiesStateModel): GroupDefinition[];
|
|
243
|
-
static
|
|
256
|
+
static configScopes(state: PropertiesStateModel): ConfigScope[];
|
|
244
257
|
static countries(state: PropertiesStateModel): CountryDefinition[];
|
|
245
258
|
static apiSchema(state: PropertiesStateModel): ApiSchema | null;
|
|
246
259
|
static apiProperties(state: PropertiesStateModel): ApiPropertyOption[];
|
|
@@ -252,7 +265,7 @@ declare class PropertiesState {
|
|
|
252
265
|
getOne(ctx: StateContext<PropertiesStateModel>, action: GetProperty): rxjs.Observable<Response<PropertyItem> | null>;
|
|
253
266
|
getLookups(ctx: StateContext<PropertiesStateModel>, _action: GetLookups): rxjs.Observable<LookupDefinition[]> | rxjs.Observable<never[] | Response<LookupDefinition[]>>;
|
|
254
267
|
getGroups(ctx: StateContext<PropertiesStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<never[] | Response<GroupDefinition[]>>;
|
|
255
|
-
|
|
268
|
+
getConfigAsType(ctx: StateContext<PropertiesStateModel>, action: GetConfigAsType): rxjs.Observable<ConfigScope[]> | rxjs.Observable<never[] | Response<ConfigScope[]>>;
|
|
256
269
|
getCountries(ctx: StateContext<PropertiesStateModel>, _action: GetCountries): rxjs.Observable<CountryDefinition[]>;
|
|
257
270
|
testApiConfiguration(ctx: StateContext<PropertiesStateModel>, action: TestApiConfiguration): rxjs.Observable<Response<ApiSchema> | null>;
|
|
258
271
|
resetApiConfiguration(ctx: StateContext<PropertiesStateModel>): void;
|
|
@@ -262,6 +275,7 @@ declare class PropertiesState {
|
|
|
262
275
|
private mapSchemaToOptions;
|
|
263
276
|
getPropertiesForConfigType(ctx: StateContext<PropertiesStateModel>, action: GetPropertiesForConfigType): rxjs.Observable<never[] | Response<PropertyItem[]>>;
|
|
264
277
|
resetConfigProperties(ctx: StateContext<PropertiesStateModel>): void;
|
|
278
|
+
resetConfigScopes(ctx: StateContext<PropertiesStateModel>): void;
|
|
265
279
|
resetSelectedProperty(ctx: StateContext<PropertiesStateModel>): void;
|
|
266
280
|
setModuleInfo(ctx: StateContext<PropertiesStateModel>, action: SetPropertiesModuleInfo): void;
|
|
267
281
|
create(ctx: StateContext<PropertiesStateModel>, action: CreateProperty): rxjs.Observable<null> | rxjs.Observable<Response<PropertyItem>>;
|
|
@@ -280,7 +294,7 @@ declare class PropertiesFacade {
|
|
|
280
294
|
readonly lookups: _angular_core.Signal<LookupDefinition[]>;
|
|
281
295
|
readonly configProperties: _angular_core.Signal<PropertyItem[]>;
|
|
282
296
|
readonly groups: _angular_core.Signal<GroupDefinition[]>;
|
|
283
|
-
readonly
|
|
297
|
+
readonly configScopes: _angular_core.Signal<ConfigScope[]>;
|
|
284
298
|
readonly countries: _angular_core.Signal<CountryDefinition[]>;
|
|
285
299
|
readonly apiSchema: _angular_core.Signal<ApiSchema | null>;
|
|
286
300
|
readonly apiProperties: _angular_core.Signal<ApiPropertyOption[]>;
|
|
@@ -295,7 +309,7 @@ declare class PropertiesFacade {
|
|
|
295
309
|
setModuleInfo(moduleType: string, moduleId: string | number): Observable<unknown>;
|
|
296
310
|
loadLookups(): Observable<unknown>;
|
|
297
311
|
loadGroups(): Observable<unknown>;
|
|
298
|
-
|
|
312
|
+
loadConfigAsType(viewType: string): Observable<unknown>;
|
|
299
313
|
loadCountries(): Observable<unknown>;
|
|
300
314
|
testApiConfiguration(payload: ApiTestPayload): Observable<unknown>;
|
|
301
315
|
resetApiConfiguration(): Observable<unknown>;
|
|
@@ -303,6 +317,7 @@ declare class PropertiesFacade {
|
|
|
303
317
|
loadPropertiesForConfigType(moduleType: string, moduleId: string | number, params?: Partial<PropertiesQueryParams>): Observable<unknown>;
|
|
304
318
|
resetSelectedProperty(): Observable<unknown>;
|
|
305
319
|
resetConfigProperties(): Observable<unknown>;
|
|
320
|
+
resetConfigScopes(): Observable<unknown>;
|
|
306
321
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PropertiesFacade, never>;
|
|
307
322
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PropertiesFacade>;
|
|
308
323
|
}
|
|
@@ -348,6 +363,7 @@ declare class PropertyForm implements OnDestroy {
|
|
|
348
363
|
private readonly configurationControl;
|
|
349
364
|
private readonly creating;
|
|
350
365
|
private readonly updating;
|
|
366
|
+
readonly loading: _angular_core.Signal<boolean>;
|
|
351
367
|
readonly submitting: _angular_core.Signal<boolean>;
|
|
352
368
|
readonly propertyType: _angular_core.Signal<any>;
|
|
353
369
|
private readonly selectedPropertyTypeConfiguration;
|
|
@@ -379,5 +395,5 @@ declare class PropertyForm implements OnDestroy {
|
|
|
379
395
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PropertyForm, "mt-property-form", never, { "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
380
396
|
}
|
|
381
397
|
|
|
382
|
-
export { CreateProperty, DeleteProperty, GetCountries, GetGroups,
|
|
383
|
-
export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload };
|
|
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 };
|
|
399
|
+
export type { ApiConfigurationValue, ApiPropertyOption, ApiSchema, ApiSchemaProperty, ApiTestPayload, ApiTestResponse, ConfigScope, CountryDefinition, GroupDefinition, LogDefinition, LookupDefinition, LookupDefinitionItem, PropertiesLoadingName, PropertiesQueryParams, PropertiesStateModel, PropertyItem, PropertyPayload };
|