@o3r/configuration 15.3.0-prerelease.9 → 15.4.0-prerelease.0
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/fesm2022/o3r-configuration-fixtures-jasmine.mjs +13 -27
- package/fesm2022/o3r-configuration-fixtures-jasmine.mjs.map +1 -1
- package/fesm2022/o3r-configuration-fixtures-jest.mjs +13 -27
- package/fesm2022/o3r-configuration-fixtures-jest.mjs.map +1 -1
- package/fesm2022/o3r-configuration-rules-engine.mjs +97 -76
- package/fesm2022/o3r-configuration-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-configuration.mjs +716 -780
- package/fesm2022/o3r-configuration.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/configuration-to-component/schema.json +0 -3
- package/schematics/ng-add/schema.json +0 -3
- package/types/o3r-configuration-fixtures-jasmine.d.ts +17 -20
- package/types/o3r-configuration-fixtures-jasmine.d.ts.map +1 -1
- package/types/o3r-configuration-fixtures-jest.d.ts +17 -20
- package/types/o3r-configuration-fixtures-jest.d.ts.map +1 -1
- package/types/o3r-configuration-rules-engine.d.ts +24 -30
- package/types/o3r-configuration-rules-engine.d.ts.map +1 -1
- package/types/o3r-configuration.d.ts +370 -401
- package/types/o3r-configuration.d.ts.map +1 -1
|
@@ -1,587 +1,558 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import * as _ngrx_store from '@ngrx/store';
|
|
9
|
-
import { ActionReducer, Action, ReducerTypes, ActionCreator, Store } from '@ngrx/store';
|
|
10
|
-
import * as _o3r_configuration from '@o3r/configuration';
|
|
11
|
-
|
|
1
|
+
import { Configurable, Configuration, Configuration as Configuration$1, ConnectContentMessage, ContextualizationDevtoolsCommonOptions, CustomConfig, CustomConfig as CustomConfig$1, DevtoolsCommonOptions, DevtoolsServiceInterface, DynamicConfigurable, DynamicConfigurableWithSignal, MessageDataTypes, OtterMessageContent, RequestMessagesContentMessage, Serializer, SetStateActionPayload } from "@o3r/core";
|
|
2
|
+
import { Observable, Observer, Subject } from "rxjs";
|
|
3
|
+
import { Dictionary, EntityAdapter, EntityState } from "@ngrx/entity";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { EnvironmentProviders, InjectionToken, InputSignal, ModuleWithProviders, Signal } from "@angular/core";
|
|
6
|
+
import * as i1 from "@ngrx/store";
|
|
7
|
+
import { Action, ActionCreator, ActionReducer, ReducerTypes, Store } from "@ngrx/store";
|
|
12
8
|
/**
|
|
13
9
|
* Interface to define the error messages into component configuration
|
|
14
10
|
*/
|
|
15
|
-
interface ErrorMessages {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
export interface ErrorMessages {
|
|
12
|
+
/**
|
|
13
|
+
* Error message map
|
|
14
|
+
*/
|
|
15
|
+
errorMessages: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
22
18
|
}
|
|
23
19
|
/**
|
|
24
20
|
* Interface to specify that the component has an ID
|
|
25
21
|
*/
|
|
26
|
-
interface Identifiable {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
export interface Identifiable {
|
|
23
|
+
/**
|
|
24
|
+
* Identifier
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
29
|
* Get the component and library's names based on the configuration name
|
|
34
30
|
* @param configurationName Name of the component as found in the store
|
|
35
31
|
* @returns Object containing library and component name.
|
|
36
32
|
*/
|
|
37
|
-
declare function parseConfigurationName(configurationName: string): {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
export declare function parseConfigurationName(configurationName: string): {
|
|
34
|
+
library?: string;
|
|
35
|
+
libraryName?: string;
|
|
36
|
+
componentName: string;
|
|
41
37
|
} | undefined;
|
|
42
38
|
/**
|
|
43
39
|
* Operator to get the configuration from store for a given component and merge it with the global config
|
|
44
40
|
* @param defaultValue Default value of the configuration
|
|
45
41
|
*/
|
|
46
|
-
declare function getConfiguration<T extends Record<string, unknown>>(defaultValue: T): <C extends Partial<T>>(source: Observable<C | undefined>) => Observable<T>;
|
|
47
|
-
|
|
42
|
+
export declare function getConfiguration<T extends Record<string, unknown>>(defaultValue: T): <C extends Partial<T>>(source: Observable<C | undefined>) => Observable<T>;
|
|
48
43
|
/**
|
|
49
44
|
* Property override model
|
|
50
45
|
*/
|
|
51
|
-
interface PropertyOverride {
|
|
52
|
-
|
|
46
|
+
export interface PropertyOverride {
|
|
47
|
+
[property: string]: any;
|
|
53
48
|
}
|
|
54
49
|
/**
|
|
55
50
|
* ConfigOverride store state
|
|
56
51
|
*/
|
|
57
|
-
interface ConfigOverrideState {
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
export interface ConfigOverrideState {
|
|
53
|
+
/** Map of PropertyOverride indexed on component + config name */
|
|
54
|
+
configOverrides: Record<string, PropertyOverride>;
|
|
60
55
|
}
|
|
61
56
|
/**
|
|
62
57
|
* Name of the ConfigOverride Store
|
|
63
58
|
*/
|
|
64
|
-
declare const CONFIG_OVERRIDE_STORE_NAME = "configOverride";
|
|
59
|
+
export declare const CONFIG_OVERRIDE_STORE_NAME = "configOverride";
|
|
65
60
|
/**
|
|
66
61
|
* ConfigOverride Store Interface
|
|
67
62
|
*/
|
|
68
|
-
interface ConfigOverrideStore {
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
export interface ConfigOverrideStore {
|
|
64
|
+
/** ConfigOverride state */
|
|
65
|
+
[CONFIG_OVERRIDE_STORE_NAME]: ConfigOverrideState;
|
|
71
66
|
}
|
|
72
|
-
|
|
73
67
|
/**
|
|
74
68
|
* Clear all overrides and fill the store with the payload
|
|
75
69
|
*/
|
|
76
|
-
declare const setConfigOverride:
|
|
77
|
-
|
|
70
|
+
export declare const setConfigOverride: import("@ngrx/store").ActionCreator<"[ConfigOverride] set", (props: SetStateActionPayload<ConfigOverrideState>) => SetStateActionPayload<ConfigOverrideState> & import("@ngrx/store").Action<"[ConfigOverride] set">>;
|
|
78
71
|
/** Token of the ConfigOverride reducer */
|
|
79
|
-
declare const CONFIG_OVERRIDE_REDUCER_TOKEN: InjectionToken<ActionReducer<ConfigOverrideState, Action<string>>>;
|
|
72
|
+
export declare const CONFIG_OVERRIDE_REDUCER_TOKEN: InjectionToken<ActionReducer<ConfigOverrideState, Action<string>>>;
|
|
80
73
|
/** Provide default reducer for ConfigOverride store */
|
|
81
|
-
declare function getDefaultConfigOverrideReducer(): ActionReducer<ConfigOverrideState, Action<string>>;
|
|
74
|
+
export declare function getDefaultConfigOverrideReducer(): ActionReducer<ConfigOverrideState, Action<string>>;
|
|
82
75
|
/**
|
|
83
76
|
* @deprecated Will be removed in v16. Use {@link provideConfigOverrideStore} instead.
|
|
84
77
|
*/
|
|
85
|
-
declare class ConfigOverrideStoreModule {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
78
|
+
export declare class ConfigOverrideStoreModule {
|
|
79
|
+
static forRoot<T extends ConfigOverrideState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<ConfigOverrideStoreModule>;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigOverrideStoreModule, never>;
|
|
81
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigOverrideStoreModule, never, [typeof i1.StoreFeatureModule], never>;
|
|
82
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfigOverrideStoreModule>;
|
|
90
83
|
}
|
|
91
84
|
/**
|
|
92
85
|
* Provide ConfigOverride feature store.
|
|
93
86
|
* @param reducerFactory Optional factory to override the default reducer.
|
|
94
87
|
*/
|
|
95
|
-
declare function provideConfigOverrideStore(reducerFactory?: () => ActionReducer<ConfigOverrideState, Action>): EnvironmentProviders;
|
|
96
|
-
|
|
88
|
+
export declare function provideConfigOverrideStore(reducerFactory?: () => ActionReducer<ConfigOverrideState, Action>): EnvironmentProviders;
|
|
97
89
|
/**
|
|
98
90
|
* ConfigOverride Store initial value
|
|
99
91
|
*/
|
|
100
|
-
declare const configOverrideInitialState: ConfigOverrideState;
|
|
92
|
+
export declare const configOverrideInitialState: ConfigOverrideState;
|
|
101
93
|
/**
|
|
102
94
|
* List of basic actions for ConfigOverride Store
|
|
103
95
|
*/
|
|
104
|
-
declare const configOverrideReducerFeatures: ReducerTypes<ConfigOverrideState, ActionCreator[]>[];
|
|
96
|
+
export declare const configOverrideReducerFeatures: ReducerTypes<ConfigOverrideState, ActionCreator[]>[];
|
|
105
97
|
/**
|
|
106
98
|
* ConfigOverride Store reducer
|
|
107
99
|
*/
|
|
108
|
-
declare const configOverrideReducer:
|
|
109
|
-
|
|
100
|
+
export declare const configOverrideReducer: import("@ngrx/store").ActionReducer<ConfigOverrideState, import("@ngrx/store").Action<string>>;
|
|
110
101
|
/** Select ConfigOverride State */
|
|
111
|
-
declare const selectConfigOverrideState:
|
|
102
|
+
export declare const selectConfigOverrideState: import("@ngrx/store").MemoizedSelector<object, ConfigOverrideState, import("@ngrx/store").DefaultProjectorFn<ConfigOverrideState>>;
|
|
112
103
|
/** Select the array of ConfigOverride */
|
|
113
|
-
declare const selectConfigOverride:
|
|
104
|
+
export declare const selectConfigOverride: import("@ngrx/store").MemoizedSelector<object, Record<string, import("@o3r/configuration").PropertyOverride>, (s1: ConfigOverrideState) => Record<string, import("@o3r/configuration").PropertyOverride>>;
|
|
114
105
|
/**
|
|
115
106
|
* Get the override for given component identifier
|
|
116
107
|
* @param componentId
|
|
117
108
|
*/
|
|
118
|
-
declare const selectComponentOverrideConfig: (componentId: string) =>
|
|
119
|
-
|
|
109
|
+
export declare const selectComponentOverrideConfig: (componentId: string) => import("@ngrx/store").MemoizedSelector<object, import("@o3r/configuration").PropertyOverride, (s1: Record<string, import("@o3r/configuration").PropertyOverride>) => import("@o3r/configuration").PropertyOverride>;
|
|
120
110
|
/**
|
|
121
111
|
* Deserializer
|
|
122
112
|
* @param rawObject
|
|
123
113
|
*/
|
|
124
|
-
declare const configOverrideStorageDeserializer: (rawObject: any) => any;
|
|
125
|
-
declare const configOverrideStorageSync: Serializer<ConfigOverrideState>;
|
|
126
|
-
|
|
127
|
-
interface
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
114
|
+
export declare const configOverrideStorageDeserializer: (rawObject: any) => any;
|
|
115
|
+
export declare const configOverrideStorageSync: Serializer<ConfigOverrideState>;
|
|
116
|
+
export interface SetConfigurationEntitiesPayload {
|
|
117
|
+
/** Map of configurations to update/insert, this is now Partial due the change of Configuration interface */
|
|
118
|
+
entities: {
|
|
119
|
+
[id: string]: Partial<Configuration$1>;
|
|
120
|
+
};
|
|
132
121
|
}
|
|
133
|
-
interface UpsertConfigurationEntityPayload {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
122
|
+
export interface UpsertConfigurationEntityPayload {
|
|
123
|
+
/** ID of the item */
|
|
124
|
+
id: string;
|
|
125
|
+
/** Updated/New configuration object */
|
|
126
|
+
configuration: Partial<Configuration$1>;
|
|
138
127
|
}
|
|
139
|
-
interface UpdateConfigurationEntityPayload {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
export interface UpdateConfigurationEntityPayload {
|
|
129
|
+
/** ID of the item */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Updated/New configuration partial object */
|
|
132
|
+
configuration: Partial<Configuration$1>;
|
|
144
133
|
}
|
|
145
134
|
/**
|
|
146
135
|
* Upsert one configuration entity
|
|
147
136
|
*/
|
|
148
|
-
declare const upsertConfigurationEntity:
|
|
137
|
+
export declare const upsertConfigurationEntity: import("@ngrx/store").ActionCreator<"[Configuration] set configuration entity", (props: UpsertConfigurationEntityPayload) => UpsertConfigurationEntityPayload & import("@ngrx/store").Action<"[Configuration] set configuration entity">>;
|
|
149
138
|
/**
|
|
150
139
|
* Update one configuration entity
|
|
151
140
|
*/
|
|
152
|
-
declare const updateConfigurationEntity:
|
|
141
|
+
export declare const updateConfigurationEntity: import("@ngrx/store").ActionCreator<"[Configuration] update configuration entity", (props: UpdateConfigurationEntityPayload) => UpdateConfigurationEntityPayload & import("@ngrx/store").Action<"[Configuration] update configuration entity">>;
|
|
153
142
|
/**
|
|
154
143
|
* Clear all configuration and fill the store with the payload
|
|
155
144
|
*/
|
|
156
|
-
declare const setConfigurationEntities:
|
|
145
|
+
export declare const setConfigurationEntities: import("@ngrx/store").ActionCreator<"[Configuration] set entities", (props: SetConfigurationEntitiesPayload) => SetConfigurationEntitiesPayload & import("@ngrx/store").Action<"[Configuration] set entities">>;
|
|
157
146
|
/**
|
|
158
147
|
* Update configuration with known IDs, ignore the new ones
|
|
159
148
|
*/
|
|
160
|
-
declare const updateConfigurationEntities:
|
|
149
|
+
export declare const updateConfigurationEntities: import("@ngrx/store").ActionCreator<"[Configuration] update entities", (props: SetConfigurationEntitiesPayload) => SetConfigurationEntitiesPayload & import("@ngrx/store").Action<"[Configuration] update entities">>;
|
|
161
150
|
/**
|
|
162
151
|
* Update configuration with known IDs, insert the new ones
|
|
163
152
|
*/
|
|
164
|
-
declare const upsertConfigurationEntities:
|
|
153
|
+
export declare const upsertConfigurationEntities: import("@ngrx/store").ActionCreator<"[Configuration] upsert entities", (props: SetConfigurationEntitiesPayload) => SetConfigurationEntitiesPayload & import("@ngrx/store").Action<"[Configuration] upsert entities">>;
|
|
165
154
|
/**
|
|
166
155
|
* Clear only the entities, keeps the other attributes in the state
|
|
167
156
|
*/
|
|
168
|
-
declare const clearConfigurationEntities:
|
|
169
|
-
|
|
157
|
+
export declare const clearConfigurationEntities: import("@ngrx/store").ActionCreator<"[Configuration] clear entities", () => import("@ngrx/store").Action<"[Configuration] clear entities">>;
|
|
170
158
|
/**
|
|
171
159
|
* compute the configuration into SetEntitiesPayload
|
|
172
160
|
* @param customConfigObject array of configurations
|
|
173
161
|
*/
|
|
174
|
-
declare function computeConfiguration<T extends Configuration>(customConfigObject: CustomConfig<T>[]): SetConfigurationEntitiesPayload;
|
|
175
|
-
|
|
162
|
+
export declare function computeConfiguration<T extends Configuration$1>(customConfigObject: CustomConfig$1<T>[]): SetConfigurationEntitiesPayload;
|
|
176
163
|
/**
|
|
177
164
|
* Configuration model
|
|
178
165
|
*/
|
|
179
|
-
interface ConfigurationModel extends Configuration {
|
|
180
|
-
|
|
166
|
+
export interface ConfigurationModel extends Configuration$1 {
|
|
167
|
+
id: string;
|
|
181
168
|
}
|
|
182
169
|
/**
|
|
183
170
|
* Configuration store state
|
|
184
171
|
*/
|
|
185
|
-
interface ConfigurationState extends EntityState<ConfigurationModel> {
|
|
186
|
-
}
|
|
172
|
+
export interface ConfigurationState extends EntityState<ConfigurationModel> {}
|
|
187
173
|
/**
|
|
188
174
|
* Name of the Configuration Store
|
|
189
175
|
*/
|
|
190
|
-
declare const CONFIGURATION_STORE_NAME = "configuration";
|
|
176
|
+
export declare const CONFIGURATION_STORE_NAME = "configuration";
|
|
191
177
|
/**
|
|
192
178
|
* Configuration Store Interface
|
|
193
179
|
*/
|
|
194
|
-
interface ConfigurationStore {
|
|
195
|
-
|
|
196
|
-
|
|
180
|
+
export interface ConfigurationStore {
|
|
181
|
+
/** Configuration state */
|
|
182
|
+
[CONFIGURATION_STORE_NAME]: ConfigurationState;
|
|
197
183
|
}
|
|
198
184
|
/**
|
|
199
185
|
* ID of the global configuration
|
|
200
186
|
*/
|
|
201
|
-
declare const globalConfigurationId = "global";
|
|
202
|
-
|
|
187
|
+
export declare const globalConfigurationId = "global";
|
|
203
188
|
/** Token of the Configuration reducer */
|
|
204
|
-
declare const CONFIGURATION_REDUCER_TOKEN: InjectionToken<ActionReducer<ConfigurationState, Action<string>>>;
|
|
189
|
+
export declare const CONFIGURATION_REDUCER_TOKEN: InjectionToken<ActionReducer<ConfigurationState, Action<string>>>;
|
|
205
190
|
/** Provide default reducer for Configuration store */
|
|
206
|
-
declare function getDefaultConfigurationReducer(): ActionReducer<ConfigurationState, Action<string>>;
|
|
191
|
+
export declare function getDefaultConfigurationReducer(): ActionReducer<ConfigurationState, Action<string>>;
|
|
207
192
|
/**
|
|
208
193
|
* @deprecated Will be removed in v16. Use {@link provideConfigurationStore} instead.
|
|
209
194
|
*/
|
|
210
|
-
declare class ConfigurationStoreModule {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
195
|
+
export declare class ConfigurationStoreModule {
|
|
196
|
+
static forRoot<T extends ConfigurationState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<ConfigurationStoreModule>;
|
|
197
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationStoreModule, never>;
|
|
198
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationStoreModule, never, [typeof i1.StoreFeatureModule], never>;
|
|
199
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationStoreModule>;
|
|
215
200
|
}
|
|
216
201
|
/**
|
|
217
202
|
* Provide Configuration feature store.
|
|
218
203
|
* @param reducerFactory Optional factory to override the default reducer.
|
|
219
204
|
*/
|
|
220
|
-
declare function provideConfigurationStore(reducerFactory?: () => ActionReducer<ConfigurationState, Action>): EnvironmentProviders;
|
|
221
|
-
|
|
205
|
+
export declare function provideConfigurationStore(reducerFactory?: () => ActionReducer<ConfigurationState, Action>): EnvironmentProviders;
|
|
222
206
|
/**
|
|
223
207
|
* Configuration Store adapter
|
|
224
208
|
*/
|
|
225
|
-
declare const configurationAdapter: EntityAdapter<ConfigurationModel>;
|
|
209
|
+
export declare const configurationAdapter: EntityAdapter<ConfigurationModel>;
|
|
226
210
|
/**
|
|
227
211
|
* Configuration Store initial value
|
|
228
212
|
*/
|
|
229
|
-
declare const configurationInitialState: ConfigurationState;
|
|
213
|
+
export declare const configurationInitialState: ConfigurationState;
|
|
230
214
|
/**
|
|
231
215
|
* List of basic actions for Configuration Store
|
|
232
216
|
*/
|
|
233
|
-
declare const configurationReducerFeatures: ReducerTypes<ConfigurationState, ActionCreator[]>[];
|
|
217
|
+
export declare const configurationReducerFeatures: ReducerTypes<ConfigurationState, ActionCreator[]>[];
|
|
234
218
|
/**
|
|
235
219
|
* Configuration Store reducer
|
|
236
220
|
*/
|
|
237
|
-
declare const configurationReducer:
|
|
238
|
-
|
|
221
|
+
export declare const configurationReducer: import("@ngrx/store").ActionReducer<ConfigurationState, import("@ngrx/store").Action<string>>;
|
|
239
222
|
/**
|
|
240
223
|
* Select Configuration State
|
|
241
224
|
* Note: the usage of createSelector is to avoid warning printing because of potentially undefined feature store
|
|
242
225
|
*/
|
|
243
|
-
declare const selectConfigurationState:
|
|
244
|
-
|
|
226
|
+
export declare const selectConfigurationState: import("@ngrx/store").MemoizedSelector<{
|
|
227
|
+
configuration: ConfigurationState;
|
|
245
228
|
}, ConfigurationState | undefined, (state: ConfigurationState | undefined) => ConfigurationState | undefined>;
|
|
246
229
|
/** Select the array of Configuration ids */
|
|
247
|
-
declare const selectConfigurationIds:
|
|
248
|
-
|
|
230
|
+
export declare const selectConfigurationIds: import("@ngrx/store").MemoizedSelector<{
|
|
231
|
+
configuration: ConfigurationState;
|
|
249
232
|
}, string[] | number[], (s1: ConfigurationState | undefined) => string[] | number[]>;
|
|
250
233
|
/** Select the array of Configuration */
|
|
251
|
-
declare const selectAllConfiguration:
|
|
252
|
-
|
|
253
|
-
},
|
|
234
|
+
export declare const selectAllConfiguration: import("@ngrx/store").MemoizedSelector<{
|
|
235
|
+
configuration: ConfigurationState;
|
|
236
|
+
}, import("@o3r/configuration").ConfigurationModel[], (s1: ConfigurationState | undefined) => import("@o3r/configuration").ConfigurationModel[]>;
|
|
254
237
|
/** Select the dictionary of Configuration entities */
|
|
255
|
-
declare const selectConfigurationEntities:
|
|
256
|
-
|
|
257
|
-
},
|
|
238
|
+
export declare const selectConfigurationEntities: import("@ngrx/store").MemoizedSelector<{
|
|
239
|
+
configuration: ConfigurationState;
|
|
240
|
+
}, import("@ngrx/entity").Dictionary<import("@o3r/configuration").ConfigurationModel>, (s1: ConfigurationState | undefined) => import("@ngrx/entity").Dictionary<import("@o3r/configuration").ConfigurationModel>>;
|
|
258
241
|
/** Select the total Configuration count */
|
|
259
|
-
declare const selectConfigurationTotal:
|
|
260
|
-
|
|
242
|
+
export declare const selectConfigurationTotal: import("@ngrx/store").MemoizedSelector<{
|
|
243
|
+
configuration: ConfigurationState;
|
|
261
244
|
}, number, (s1: ConfigurationState | undefined) => number>;
|
|
262
245
|
/**
|
|
263
246
|
* Select the configuration for component with id
|
|
264
247
|
* @param props property of the selector
|
|
265
248
|
* @param props.id id of the component
|
|
266
249
|
*/
|
|
267
|
-
declare const selectConfigurationForComponent: <T extends Configuration>(props: {
|
|
268
|
-
|
|
269
|
-
}) =>
|
|
270
|
-
|
|
271
|
-
}, T, (s1:
|
|
250
|
+
export declare const selectConfigurationForComponent: <T extends Configuration$1>(props: {
|
|
251
|
+
id: string;
|
|
252
|
+
}) => import("@ngrx/store").MemoizedSelector<{
|
|
253
|
+
configuration: ConfigurationState;
|
|
254
|
+
}, T, (s1: import("@ngrx/entity").Dictionary<import("@o3r/configuration").ConfigurationModel>) => T>;
|
|
272
255
|
/**
|
|
273
256
|
* Select the global configuration
|
|
274
257
|
*/
|
|
275
|
-
declare const selectGlobalConfiguration:
|
|
276
|
-
|
|
277
|
-
}, Configuration, (s1: Configuration) => Configuration>;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
deserialize: (rawObject: any) => ConfigurationState;
|
|
258
|
+
export declare const selectGlobalConfiguration: import("@ngrx/store").MemoizedSelector<{
|
|
259
|
+
configuration: ConfigurationState;
|
|
260
|
+
}, Configuration$1, (s1: Configuration$1) => Configuration$1>;
|
|
261
|
+
export declare const configurationStorageSync: {
|
|
262
|
+
deserialize: (rawObject: any) => ConfigurationState;
|
|
281
263
|
};
|
|
282
|
-
|
|
283
264
|
/** Option for Configuration devtools service */
|
|
284
|
-
interface ConfigurationDevtoolsServiceOptions extends DevtoolsCommonOptions, ContextualizationDevtoolsCommonOptions {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
265
|
+
export interface ConfigurationDevtoolsServiceOptions extends DevtoolsCommonOptions, ContextualizationDevtoolsCommonOptions {
|
|
266
|
+
/**
|
|
267
|
+
* Default library name to use if not specified in the function call
|
|
268
|
+
* @default `@o3r/components`
|
|
269
|
+
*/
|
|
270
|
+
defaultLibraryName: string;
|
|
271
|
+
/**
|
|
272
|
+
* Default JSON file name if not specified in the function
|
|
273
|
+
* @default partial-static-config.json
|
|
274
|
+
*/
|
|
275
|
+
defaultJsonFilename: string;
|
|
295
276
|
}
|
|
296
|
-
interface ConfigurationsMessage extends OtterMessageContent<'configurations'> {
|
|
297
|
-
|
|
298
|
-
|
|
277
|
+
export interface ConfigurationsMessage extends OtterMessageContent<'configurations'> {
|
|
278
|
+
/** Configurations */
|
|
279
|
+
configurations: Dictionary<ConfigurationModel>;
|
|
299
280
|
}
|
|
300
|
-
interface UpdateConfigMessage extends OtterMessageContent<'updateConfig'> {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
281
|
+
export interface UpdateConfigMessage extends OtterMessageContent<'updateConfig'> {
|
|
282
|
+
/** Configuration ID */
|
|
283
|
+
id: string;
|
|
284
|
+
/** Configuration value */
|
|
285
|
+
configValue: any;
|
|
305
286
|
}
|
|
306
287
|
type ConfigurationMessageContents = ConfigurationsMessage | UpdateConfigMessage;
|
|
307
288
|
/** List of possible DataTypes for Configuration messages */
|
|
308
|
-
type ConfigurationMessageDataTypes = MessageDataTypes<ConfigurationMessageContents>;
|
|
289
|
+
export type ConfigurationMessageDataTypes = MessageDataTypes<ConfigurationMessageContents>;
|
|
309
290
|
/** List of all messages for configuration purpose */
|
|
310
|
-
type AvailableConfigurationMessageContents = ConfigurationMessageContents | ConnectContentMessage | RequestMessagesContentMessage<ConfigurationMessageDataTypes>;
|
|
291
|
+
export type AvailableConfigurationMessageContents = ConfigurationMessageContents | ConnectContentMessage | RequestMessagesContentMessage<ConfigurationMessageDataTypes>;
|
|
311
292
|
/**
|
|
312
293
|
* Determine if the given message is a Configuration message
|
|
313
294
|
* @param message message to check
|
|
314
295
|
*/
|
|
315
|
-
declare const isConfigurationMessage: (message: any) => message is AvailableConfigurationMessageContents;
|
|
296
|
+
export declare const isConfigurationMessage: (message: any) => message is AvailableConfigurationMessageContents;
|
|
316
297
|
/**
|
|
317
298
|
* Contextualization devtools exposed for configuration in CMS integration
|
|
318
299
|
*/
|
|
319
|
-
interface ConfigurationContextualizationDevtools {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
300
|
+
export interface ConfigurationContextualizationDevtools {
|
|
301
|
+
/**
|
|
302
|
+
* Replace N configurations in one shot
|
|
303
|
+
* @param configs array of configurations to update
|
|
304
|
+
*/
|
|
305
|
+
updateConfigurations: (configurations: CustomConfig$1<Configuration$1>[]) => void;
|
|
325
306
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
307
|
+
export declare class ConfigurationDevtoolsConsoleService implements DevtoolsServiceInterface, ConfigurationContextualizationDevtools {
|
|
308
|
+
/** Name of the Window property to access to the devtools */
|
|
309
|
+
static readonly windowModuleName = "configuration";
|
|
310
|
+
private readonly configurationDevtools;
|
|
311
|
+
private readonly options;
|
|
312
|
+
constructor();
|
|
313
|
+
private downloadJSON;
|
|
314
|
+
private copyElementToClipboard;
|
|
315
|
+
/**
|
|
316
|
+
* Set a specified value of a component configuration
|
|
317
|
+
* @param selector Selector for a component configuration
|
|
318
|
+
* @param configProperty Name of the configuration property to set
|
|
319
|
+
* @param configValue Value of the configuration property to set
|
|
320
|
+
*/
|
|
321
|
+
setDynamicConfig(selector: string | {
|
|
322
|
+
library?: string;
|
|
323
|
+
componentName: string;
|
|
324
|
+
}, configProperty: string, configValue: any): void;
|
|
325
|
+
/** @inheritDoc */
|
|
326
|
+
activate(): void;
|
|
327
|
+
/**
|
|
328
|
+
* Display the list of configurations loaded in the store and the library they originate from
|
|
329
|
+
* @returns array with the configurations and libraries for example: `["LibComponentsCommonRuntimeConfig from \@my-lib/shared-common"]`
|
|
330
|
+
*/
|
|
331
|
+
displayComponentsWithConfiguration(): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* Display the configuration for a specific component
|
|
334
|
+
* @param selector Selector for a component configuration. It can be a string in the form library#configurationName (i.e: '@my-lib/shared-components#HeaderContConfig')
|
|
335
|
+
* or an object with the configuration and library names (i.e: `{library:"@my-lib/shared-components", componentName:'HeaderContConfig'}`).
|
|
336
|
+
* Note the object input componentName expects a configuration name not a component name.
|
|
337
|
+
* @returns Configuration object (i.e: {airlineLogoPath: "img/airlines/icon-BH.svg", displayLanguageSelector: false})
|
|
338
|
+
*/
|
|
339
|
+
displayCurrentConfigurationFor(selector: string | {
|
|
340
|
+
library?: string;
|
|
341
|
+
componentName: string;
|
|
342
|
+
}): Promise<void>;
|
|
343
|
+
/**
|
|
344
|
+
* Download the JSON file of the whole configuration
|
|
345
|
+
* @param fileName Name of the file to download
|
|
346
|
+
*/
|
|
347
|
+
saveConfiguration(fileName?: string): Promise<void>;
|
|
348
|
+
/**
|
|
349
|
+
* Display the whole configuration of the application
|
|
350
|
+
*/
|
|
351
|
+
displayConfiguration(): Promise<void>;
|
|
352
|
+
/**
|
|
353
|
+
* Display a bookmark to generate the current configuration
|
|
354
|
+
*/
|
|
355
|
+
displayConfigurationBookmark(): Promise<void>;
|
|
356
|
+
/**
|
|
357
|
+
* Copy the whole configuration to the clipboard
|
|
358
|
+
*/
|
|
359
|
+
copyConfigurationToClipboard(): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Replace N configurations in one shot
|
|
362
|
+
* @param configurations array of configurations to update
|
|
363
|
+
*/
|
|
364
|
+
updateConfigurations(configurations: string | CustomConfig$1<Configuration$1>[]): void;
|
|
365
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationDevtoolsConsoleService, never>;
|
|
366
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
387
367
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
368
|
+
export declare class ConfigurationDevtoolsMessageService implements DevtoolsServiceInterface {
|
|
369
|
+
private readonly store;
|
|
370
|
+
private readonly logger;
|
|
371
|
+
private readonly configurationDevtools;
|
|
372
|
+
private readonly options;
|
|
373
|
+
private readonly sendMessage;
|
|
374
|
+
private readonly destroyRef;
|
|
375
|
+
constructor();
|
|
376
|
+
private sendCurrentConfigurationState;
|
|
377
|
+
/**
|
|
378
|
+
* Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
|
|
379
|
+
* @param only restricted list of messages to re-send
|
|
380
|
+
*/
|
|
381
|
+
private handleReEmitRequest;
|
|
382
|
+
/**
|
|
383
|
+
* Function to handle the incoming messages from Otter Chrome DevTools extension
|
|
384
|
+
* @param message message coming from the Otter Chrome DevTools extension
|
|
385
|
+
*/
|
|
386
|
+
private handleEvents;
|
|
387
|
+
/**
|
|
388
|
+
* Function to connect the plugin to the Otter DevTools extension
|
|
389
|
+
*/
|
|
390
|
+
private connectPlugin;
|
|
391
|
+
/** @inheritDoc */
|
|
392
|
+
activate(): void;
|
|
393
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationDevtoolsMessageService, never>;
|
|
394
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
416
395
|
}
|
|
417
|
-
|
|
418
396
|
/**
|
|
419
397
|
* @deprecated Will be removed in v16. Use {@link provideConfigurationDevtools} instead.
|
|
420
398
|
*/
|
|
421
|
-
declare class ConfigurationDevtoolsModule {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
399
|
+
export declare class ConfigurationDevtoolsModule {
|
|
400
|
+
/**
|
|
401
|
+
* Initialize Otter Devtools
|
|
402
|
+
* @param options
|
|
403
|
+
*/
|
|
404
|
+
static instrument(options: Partial<ConfigurationDevtoolsServiceOptions>): ModuleWithProviders<ConfigurationDevtoolsModule>;
|
|
405
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationDevtoolsModule, never>;
|
|
406
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationDevtoolsModule, never, [typeof i1.StoreModule, typeof ConfigurationStoreModule], never>;
|
|
407
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationDevtoolsModule>;
|
|
430
408
|
}
|
|
431
409
|
/**
|
|
432
410
|
* Provide configuration devtools functionality.
|
|
433
411
|
* @param options Configuration devtools options
|
|
434
412
|
*/
|
|
435
|
-
declare function provideConfigurationDevtools(options?: Partial<ConfigurationDevtoolsServiceOptions>): EnvironmentProviders;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
413
|
+
export declare function provideConfigurationDevtools(options?: Partial<ConfigurationDevtoolsServiceOptions>): EnvironmentProviders;
|
|
414
|
+
export declare class OtterConfigurationDevtools {
|
|
415
|
+
protected store: Store<ConfigurationStore>;
|
|
416
|
+
private readonly appRef;
|
|
417
|
+
private readonly options;
|
|
418
|
+
/** Stream of configurations */
|
|
419
|
+
readonly configurationEntities$: Observable<CustomConfig$1[]>;
|
|
420
|
+
constructor();
|
|
421
|
+
/**
|
|
422
|
+
* Get configuration name based on input information
|
|
423
|
+
* @param selector Selector for a component configuration. It can be a string in the form library#componentName (i.e: `@my-lib/shared-components#HeaderContComponent`)
|
|
424
|
+
* or an object with the component and library names (i.e: `{library:"@my-lib/shared-components", componentName:'HeaderContComponent'}`)
|
|
425
|
+
* @param isFallbackName Determine if the name requested is a fallback name
|
|
426
|
+
* @returns string in the format library#componentName (i.e: `"@my-lib/shared-components#HeaderContComponent"`)
|
|
427
|
+
*/
|
|
428
|
+
getComponentConfigName(selector: string | {
|
|
429
|
+
library?: string;
|
|
430
|
+
componentName: string;
|
|
431
|
+
}, isFallbackName?: boolean): string;
|
|
432
|
+
/**
|
|
433
|
+
* Get the list of components which have a configuration loaded in the store
|
|
434
|
+
*/
|
|
435
|
+
getComponentsWithConfiguration(): Promise<string[]>;
|
|
436
|
+
/**
|
|
437
|
+
* Set a specified value of a component configuration
|
|
438
|
+
* @param selector Selector for a component configuration
|
|
439
|
+
* @param configProperty Name of the configuration property to set
|
|
440
|
+
* @param configValue Value of the configuration property to set
|
|
441
|
+
*/
|
|
442
|
+
setDynamicConfig(selector: string | {
|
|
443
|
+
library?: string;
|
|
444
|
+
componentName: string;
|
|
445
|
+
}, configProperty: string, configValue: any): void;
|
|
446
|
+
/**
|
|
447
|
+
* Get the configuration for a specific component
|
|
448
|
+
* @param selector Selector for a component configuration. It can be a string in the form library#configurationName (i.e: `@my-lib/shared-components#HeaderPresConfig`)
|
|
449
|
+
* or an object with the configuration and library names (i.e: `{library:"@my-lib/shared-components", componentName:'HeaderPresConfig'}`)
|
|
450
|
+
*/
|
|
451
|
+
getCurrentConfigurationFor(selector: string | {
|
|
452
|
+
library?: string;
|
|
453
|
+
componentName: string;
|
|
454
|
+
}): Promise<Configuration$1>;
|
|
455
|
+
/**
|
|
456
|
+
* Get the whole configuration of the application
|
|
457
|
+
*/
|
|
458
|
+
getConfiguration(): Promise<CustomConfig$1<Partial<Configuration$1>>[]>;
|
|
459
|
+
/**
|
|
460
|
+
* Load a json configuration
|
|
461
|
+
* @param configurations configurations to load
|
|
462
|
+
*/
|
|
463
|
+
loadConfiguration(configurations: string | CustomConfig$1<Configuration$1>[]): void;
|
|
464
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OtterConfigurationDevtools, never>;
|
|
465
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
489
466
|
}
|
|
490
|
-
|
|
491
|
-
declare const
|
|
492
|
-
declare const OTTER_CONFIGURATION_DEVTOOLS_OPTIONS: InjectionToken<ConfigurationDevtoolsServiceOptions>;
|
|
493
|
-
|
|
467
|
+
export declare const OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS: Readonly<ConfigurationDevtoolsServiceOptions>;
|
|
468
|
+
export declare const OTTER_CONFIGURATION_DEVTOOLS_OPTIONS: InjectionToken<ConfigurationDevtoolsServiceOptions>;
|
|
494
469
|
/**
|
|
495
470
|
* @deprecated Will be removed in v16. Use {@link import('@o3r/configuration').provideConfigurationStore} instead.
|
|
496
471
|
*/
|
|
497
|
-
declare class ConfigurationBaseServiceModule {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
472
|
+
export declare class ConfigurationBaseServiceModule {
|
|
473
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationBaseServiceModule, never>;
|
|
474
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationBaseServiceModule, never, [typeof ConfigurationStoreModule], never>;
|
|
475
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationBaseServiceModule>;
|
|
501
476
|
}
|
|
502
|
-
|
|
503
477
|
/**
|
|
504
478
|
* Configuration service
|
|
505
479
|
*/
|
|
506
|
-
declare class ConfigurationBaseService {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
480
|
+
export declare class ConfigurationBaseService {
|
|
481
|
+
private readonly store;
|
|
482
|
+
private readonly extendedConfiguration;
|
|
483
|
+
/**
|
|
484
|
+
* Update a specific component config or add it to the store if does not exist
|
|
485
|
+
* @param configuration to edit/add
|
|
486
|
+
* @param configurationId Configuration ID
|
|
487
|
+
*/
|
|
488
|
+
upsertConfiguration<T extends Configuration$1>(configuration: T, configurationId?: string): void;
|
|
489
|
+
/**
|
|
490
|
+
* Update a specific component config
|
|
491
|
+
* @param configuration Partial config to edit
|
|
492
|
+
* @param configurationId Configuration ID
|
|
493
|
+
*/
|
|
494
|
+
updateConfiguration<T extends Partial<Configuration$1>>(configuration: T, configurationId?: string): void;
|
|
495
|
+
/**
|
|
496
|
+
* This function will get the configuration stored in the data attribute of the html's body tag
|
|
497
|
+
* @param configTagName Value used to identify the data attribute where the config is pushed in the index.html
|
|
498
|
+
*/
|
|
499
|
+
getConfigFromBodyTag<T extends Configuration$1>(configTagName?: string): void;
|
|
500
|
+
/**
|
|
501
|
+
* Transform the custom configuration in store configuration model
|
|
502
|
+
* @param customConfigObject Configuration object (extracted from body tag for static config or downloaded in case of dynamic config)
|
|
503
|
+
*/
|
|
504
|
+
computeConfiguration<T extends Configuration$1>(customConfigObject: CustomConfig$1<T>[]): void;
|
|
505
|
+
/**
|
|
506
|
+
* Complete a stored configuration by adding the missing fields
|
|
507
|
+
* @param extension Configuration extension to be included in the store
|
|
508
|
+
* @param configurationId Configuration ID to extend
|
|
509
|
+
* @param forceUpdate Force update the configuration in the store
|
|
510
|
+
*/
|
|
511
|
+
extendConfiguration<T extends Configuration$1>(extension: T, configurationId?: string, forceUpdate?: boolean): void;
|
|
512
|
+
/**
|
|
513
|
+
* Operator to get the configuration from store for a given component and merge it with the global config
|
|
514
|
+
* @param id Id of the component
|
|
515
|
+
* @param defaultValue Default value of the configuration
|
|
516
|
+
*/
|
|
517
|
+
getComponentConfig<T extends Configuration$1>(id: string, defaultValue: T): (source: Observable<Partial<T> | undefined>) => Observable<T>;
|
|
518
|
+
/**
|
|
519
|
+
* Get an observable of the configuration from store for a given component and merge it with the global config + the config overrides from the rules engine
|
|
520
|
+
* @param id Id of the component
|
|
521
|
+
*/
|
|
522
|
+
getConfig<T extends Configuration$1>(id: string): Observable<T>;
|
|
523
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationBaseService, never>;
|
|
524
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
551
525
|
}
|
|
552
|
-
|
|
553
526
|
/**
|
|
554
527
|
* Decorator to identify the component's configuration
|
|
555
528
|
*/
|
|
556
|
-
declare function O3rConfig(): (target: any, key: string) => void;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
asObservable(): Observable<T>;
|
|
529
|
+
export declare function O3rConfig(): (target: any, key: string) => void;
|
|
530
|
+
export declare class ConfigurationObserver<T extends Configuration$1> implements Observer<Partial<T> | undefined>, Pick<Subject<T>, 'asObservable'> {
|
|
531
|
+
/** Configuration ID */
|
|
532
|
+
configId: string;
|
|
533
|
+
/** Inner observable */
|
|
534
|
+
private readonly observable;
|
|
535
|
+
/** Inner subscriber */
|
|
536
|
+
private readonly subscriber;
|
|
537
|
+
/** @inheritdoc */
|
|
538
|
+
closed?: boolean;
|
|
539
|
+
constructor(
|
|
540
|
+
/** Configuration ID */
|
|
541
|
+
configId: string, defaultConfig: T, configurationService?: ConfigurationBaseService);
|
|
542
|
+
/** @inheritdoc */
|
|
543
|
+
next(value?: Partial<T>): void;
|
|
544
|
+
/** @inheritdoc */
|
|
545
|
+
error(err: any): void;
|
|
546
|
+
/** @inheritdoc */
|
|
547
|
+
complete(): void;
|
|
548
|
+
/**
|
|
549
|
+
* @inheritdoc
|
|
550
|
+
*/
|
|
551
|
+
asObservable(): Observable<T>;
|
|
580
552
|
}
|
|
581
|
-
|
|
582
553
|
/** Configuration signal */
|
|
583
|
-
type ConfigurationSignal<T> = Signal<T> & {
|
|
584
|
-
|
|
554
|
+
export type ConfigurationSignal<T> = Signal<T> & {
|
|
555
|
+
configId: string;
|
|
585
556
|
};
|
|
586
557
|
/**
|
|
587
558
|
* Get a configuration signal
|
|
@@ -589,8 +560,6 @@ type ConfigurationSignal<T> = Signal<T> & {
|
|
|
589
560
|
* @param configId
|
|
590
561
|
* @param defaultConfig
|
|
591
562
|
*/
|
|
592
|
-
declare function configSignal<T extends Configuration>(configInput: InputSignal<Partial<T> | undefined>, configId: string, defaultConfig: T): ConfigurationSignal<T>;
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
export type { AvailableConfigurationMessageContents, ConfigOverrideState, ConfigOverrideStore, ConfigurationContextualizationDevtools, ConfigurationDevtoolsServiceOptions, ConfigurationMessageDataTypes, ConfigurationModel, ConfigurationSignal, ConfigurationState, ConfigurationStore, ConfigurationsMessage, ErrorMessages, Identifiable, PropertyOverride, SetConfigurationEntitiesPayload, UpdateConfigMessage, UpdateConfigurationEntityPayload, UpsertConfigurationEntityPayload };
|
|
596
|
-
//# sourceMappingURL=o3r-configuration.d.ts.map
|
|
563
|
+
export declare function configSignal<T extends Configuration$1>(configInput: InputSignal<Partial<T> | undefined>, configId: string, defaultConfig: T): ConfigurationSignal<T>;
|
|
564
|
+
export type { Configurable, Configuration, CustomConfig, DynamicConfigurable, DynamicConfigurableWithSignal };
|
|
565
|
+
//# sourceMappingURL=o3r-configuration.d.ts.map
|