@o3r/core 14.1.0-prerelease.4 → 14.1.0-prerelease.41
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 +15 -15
- package/core/application/build-properties.d.ts +0 -50
- package/core/application/build-properties.d.ts.map +0 -1
- package/core/application/build-properties.js +0 -17
- package/core/application/build-properties.js.map +0 -1
- package/core/application/dgp-interfaces.d.ts +0 -35
- package/core/application/dgp-interfaces.d.ts.map +0 -1
- package/core/application/dgp-interfaces.js +0 -2
- package/core/application/dgp-interfaces.js.map +0 -1
- package/core/application/index.d.ts +0 -4
- package/core/application/index.d.ts.map +0 -1
- package/core/application/index.js +0 -4
- package/core/application/index.js.map +0 -1
- package/core/application/runtime.d.ts +0 -14
- package/core/application/runtime.d.ts.map +0 -1
- package/core/application/runtime.js +0 -2
- package/core/application/runtime.js.map +0 -1
- package/core/common/index.d.ts +0 -3
- package/core/common/index.d.ts.map +0 -1
- package/core/common/index.js +0 -3
- package/core/common/index.js.map +0 -1
- package/core/common/interface-utils.d.ts +0 -7
- package/core/common/interface-utils.d.ts.map +0 -1
- package/core/common/interface-utils.js +0 -2
- package/core/common/interface-utils.js.map +0 -1
- package/core/common/label-value.d.ts +0 -8
- package/core/common/label-value.d.ts.map +0 -1
- package/core/common/label-value.js +0 -2
- package/core/common/label-value.js.map +0 -1
- package/core/devkit/devtools-interface.d.ts +0 -34
- package/core/devkit/devtools-interface.d.ts.map +0 -1
- package/core/devkit/devtools-interface.js +0 -2
- package/core/devkit/devtools-interface.js.map +0 -1
- package/core/devkit/index.d.ts +0 -2
- package/core/devkit/index.d.ts.map +0 -1
- package/core/devkit/index.js +0 -2
- package/core/devkit/index.js.map +0 -1
- package/core/index.d.ts +0 -7
- package/core/index.d.ts.map +0 -1
- package/core/index.js +0 -7
- package/core/index.js.map +0 -1
- package/core/interfaces/configuration.d.ts +0 -90
- package/core/interfaces/configuration.d.ts.map +0 -1
- package/core/interfaces/configuration.js +0 -2
- package/core/interfaces/configuration.js.map +0 -1
- package/core/interfaces/context.d.ts +0 -57
- package/core/interfaces/context.d.ts.map +0 -1
- package/core/interfaces/context.js +0 -2
- package/core/interfaces/context.js.map +0 -1
- package/core/interfaces/index.d.ts +0 -5
- package/core/interfaces/index.d.ts.map +0 -1
- package/core/interfaces/index.js +0 -5
- package/core/interfaces/index.js.map +0 -1
- package/core/interfaces/item-identifier.d.ts +0 -14
- package/core/interfaces/item-identifier.d.ts.map +0 -1
- package/core/interfaces/item-identifier.js +0 -2
- package/core/interfaces/item-identifier.js.map +0 -1
- package/core/interfaces/translation.d.ts +0 -7
- package/core/interfaces/translation.d.ts.map +0 -1
- package/core/interfaces/translation.js +0 -2
- package/core/interfaces/translation.js.map +0 -1
- package/core/metadata/component-decorator.d.ts +0 -32
- package/core/metadata/component-decorator.d.ts.map +0 -1
- package/core/metadata/component-decorator.js +0 -18
- package/core/metadata/component-decorator.js.map +0 -1
- package/core/metadata/component-identifier.d.ts +0 -7
- package/core/metadata/component-identifier.d.ts.map +0 -1
- package/core/metadata/component-identifier.js +0 -9
- package/core/metadata/component-identifier.js.map +0 -1
- package/core/metadata/index.d.ts +0 -4
- package/core/metadata/index.d.ts.map +0 -1
- package/core/metadata/index.js +0 -4
- package/core/metadata/index.js.map +0 -1
- package/core/metadata/metadata-interface.d.ts +0 -10
- package/core/metadata/metadata-interface.d.ts.map +0 -1
- package/core/metadata/metadata-interface.js +0 -2
- package/core/metadata/metadata-interface.js.map +0 -1
- package/core/rules-engine/index.d.ts +0 -2
- package/core/rules-engine/index.d.ts.map +0 -1
- package/core/rules-engine/index.js +0 -2
- package/core/rules-engine/index.js.map +0 -1
- package/core/rules-engine/rules-engine-interfaces.d.ts +0 -24
- package/core/rules-engine/rules-engine-interfaces.d.ts.map +0 -1
- package/core/rules-engine/rules-engine-interfaces.js +0 -2
- package/core/rules-engine/rules-engine-interfaces.js.map +0 -1
- package/index.d.ts +0 -954
- package/index.d.ts.map +0 -1
- package/log/index.d.ts +0 -2
- package/log/index.d.ts.map +0 -1
- package/log/index.js +0 -2
- package/log/index.js.map +0 -1
- package/log/logger.d.ts +0 -36
- package/log/logger.d.ts.map +0 -1
- package/log/logger.js +0 -2
- package/log/logger.js.map +0 -1
- package/messages/common-message-interface.d.ts +0 -17
- package/messages/common-message-interface.d.ts.map +0 -1
- package/messages/common-message-interface.js +0 -2
- package/messages/common-message-interface.js.map +0 -1
- package/messages/index.d.ts +0 -4
- package/messages/index.d.ts.map +0 -1
- package/messages/index.js +0 -4
- package/messages/index.js.map +0 -1
- package/messages/message-helpers.d.ts +0 -24
- package/messages/message-helpers.d.ts.map +0 -1
- package/messages/message-helpers.js +0 -54
- package/messages/message-helpers.js.map +0 -1
- package/messages/message-interfaces.d.ts +0 -26
- package/messages/message-interfaces.d.ts.map +0 -1
- package/messages/message-interfaces.js +0 -5
- package/messages/message-interfaces.js.map +0 -1
- package/public_api.d.ts +0 -6
- package/public_api.d.ts.map +0 -1
- package/public_api.js +0 -6
- package/public_api.js.map +0 -1
- package/schematics/rule-factories/component/design-token.d.ts +0 -4
- package/schematics/rule-factories/component/design-token.d.ts.map +0 -1
- package/schematics/rule-factories/component/design-token.js +0 -10
- package/schematics/rule-factories/component/design-token.js.map +0 -1
- package/schematics/rule-factories/component/theming.d.ts +0 -4
- package/schematics/rule-factories/component/theming.d.ts.map +0 -1
- package/schematics/rule-factories/component/theming.js +0 -7
- package/schematics/rule-factories/component/theming.js.map +0 -1
- package/store/async/async-entity.adapter.d.ts +0 -62
- package/store/async/async-entity.adapter.d.ts.map +0 -1
- package/store/async/async-entity.adapter.js +0 -49
- package/store/async/async-entity.adapter.js.map +0 -1
- package/store/async/async.adapter.d.ts +0 -91
- package/store/async/async.adapter.d.ts.map +0 -1
- package/store/async/async.adapter.js +0 -94
- package/store/async/async.adapter.js.map +0 -1
- package/store/async/async.helpers.d.ts +0 -17
- package/store/async/async.helpers.d.ts.map +0 -1
- package/store/async/async.helpers.js +0 -25
- package/store/async/async.helpers.js.map +0 -1
- package/store/async/async.interfaces.d.ts +0 -91
- package/store/async/async.interfaces.d.ts.map +0 -1
- package/store/async/async.interfaces.js +0 -2
- package/store/async/async.interfaces.js.map +0 -1
- package/store/async/async.operators.d.ts +0 -22
- package/store/async/async.operators.d.ts.map +0 -1
- package/store/async/async.operators.js +0 -75
- package/store/async/async.operators.js.map +0 -1
- package/store/async/async.props.d.ts +0 -7
- package/store/async/async.props.d.ts.map +0 -1
- package/store/async/async.props.js +0 -10
- package/store/async/async.props.js.map +0 -1
- package/store/async/async.serializer.d.ts +0 -29
- package/store/async/async.serializer.d.ts.map +0 -1
- package/store/async/async.serializer.js +0 -34
- package/store/async/async.serializer.js.map +0 -1
- package/store/async/index.d.ts +0 -8
- package/store/async/index.d.ts.map +0 -1
- package/store/async/index.js +0 -8
- package/store/async/index.js.map +0 -1
- package/store/index.d.ts +0 -3
- package/store/index.d.ts.map +0 -1
- package/store/index.js +0 -3
- package/store/index.js.map +0 -1
- package/store/types.d.ts +0 -95
- package/store/types.d.ts.map +0 -1
- package/store/types.js +0 -11
- package/store/types.js.map +0 -1
- package/utils/debug/debug-helper.d.ts +0 -14
- package/utils/debug/debug-helper.d.ts.map +0 -1
- package/utils/debug/debug-helper.js +0 -19
- package/utils/debug/debug-helper.js.map +0 -1
- package/utils/deep-fill/deep-fill.d.ts +0 -37
- package/utils/deep-fill/deep-fill.d.ts.map +0 -1
- package/utils/deep-fill/deep-fill.js +0 -71
- package/utils/deep-fill/deep-fill.js.map +0 -1
- package/utils/index.d.ts +0 -4
- package/utils/index.d.ts.map +0 -1
- package/utils/index.js +0 -4
- package/utils/index.js.map +0 -1
- package/utils/rendering/rendering-helpers.d.ts +0 -10
- package/utils/rendering/rendering-helpers.d.ts.map +0 -1
- package/utils/rendering/rendering-helpers.js +0 -31
- package/utils/rendering/rendering-helpers.js.map +0 -1
package/index.d.ts
DELETED
|
@@ -1,954 +0,0 @@
|
|
|
1
|
-
import { InputSignal, Signal, EventEmitter } from '@angular/core';
|
|
2
|
-
import { Observable, OperatorFunction } from 'rxjs';
|
|
3
|
-
import { FormControl } from '@angular/forms';
|
|
4
|
-
import * as _ngrx_entity from '@ngrx/entity';
|
|
5
|
-
import { EntityAdapter, EntityState } from '@ngrx/entity';
|
|
6
|
-
import { Action } from '@ngrx/store';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Library build time properties
|
|
10
|
-
*/
|
|
11
|
-
interface BuildTimeProperties {
|
|
12
|
-
/**
|
|
13
|
-
* True if the application in launch in debug mode
|
|
14
|
-
*/
|
|
15
|
-
DEBUG_MODE: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* True if the webStorage option is enabled
|
|
18
|
-
*/
|
|
19
|
-
ENABLE_WEBSTORAGE: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Name of the current environment
|
|
22
|
-
*/
|
|
23
|
-
ENVIRONMENT: string;
|
|
24
|
-
/**
|
|
25
|
-
* Boolean that can be used to activate API calls mocks for development or mock-up purpose.
|
|
26
|
-
*/
|
|
27
|
-
USE_MOCKS: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Maximum size of the dev tool history
|
|
30
|
-
*/
|
|
31
|
-
DEVTOOL_HISTORY_SIZE: number | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* path to bundles in published folder
|
|
34
|
-
*/
|
|
35
|
-
LOCALIZATION_BUNDLES_OUTPUT: string;
|
|
36
|
-
/**
|
|
37
|
-
* The name of the bundle generated with the default localization components keys
|
|
38
|
-
*/
|
|
39
|
-
DEFAULT_LOC_BUNDLE_NAME: string;
|
|
40
|
-
/**
|
|
41
|
-
* Indicates the default server prefix to be used in case no dynamic is found
|
|
42
|
-
*/
|
|
43
|
-
APP_BASE_HREF: string | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Version of the App based on the package.json
|
|
46
|
-
*/
|
|
47
|
-
APP_VERSION: string;
|
|
48
|
-
/**
|
|
49
|
-
* Determine if the ghosting is activated on the app
|
|
50
|
-
*/
|
|
51
|
-
ENABLE_GHOSTING: boolean;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Library build time default properties
|
|
55
|
-
*/
|
|
56
|
-
declare const DEFAULT_BUILD_PROPERTIES: Readonly<BuildTimeProperties>;
|
|
57
|
-
|
|
58
|
-
interface BootstrapConfig {
|
|
59
|
-
/**
|
|
60
|
-
* App environment
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
environment: 'prod' | 'dev';
|
|
64
|
-
}
|
|
65
|
-
/** Data set injected to the page from the DGP web-server */
|
|
66
|
-
interface Dataset {
|
|
67
|
-
/**
|
|
68
|
-
* Bootstrap configuration
|
|
69
|
-
* @example
|
|
70
|
-
* ```typescript
|
|
71
|
-
* '{ environment: 'prod' }'
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
bootstrapconfig?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Dynamic content path
|
|
77
|
-
* @example
|
|
78
|
-
* ```typescript
|
|
79
|
-
* 'my/dynamic/path'
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
dynamiccontentpath?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Application basehref url
|
|
85
|
-
* @example
|
|
86
|
-
* ```typescript
|
|
87
|
-
* '/my/base/href'
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
appbasehref?: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Types available for configuration
|
|
95
|
-
*/
|
|
96
|
-
type ConfigurationValueType = string | number | boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Nested configuration allowing one level only
|
|
99
|
-
* Object should only contain primitive types
|
|
100
|
-
*/
|
|
101
|
-
interface NestedConfiguration {
|
|
102
|
-
[key: string]: ConfigurationValueType;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Interface of configuration that is supported by the cms
|
|
106
|
-
*/
|
|
107
|
-
interface Configuration {
|
|
108
|
-
[key: string]: ConfigurationValueType | (string | NestedConfiguration)[];
|
|
109
|
-
}
|
|
110
|
-
/** Configuration model exported by the CMS */
|
|
111
|
-
interface CustomConfig<T extends Partial<Configuration> = Partial<Configuration>> {
|
|
112
|
-
/** Component name */
|
|
113
|
-
name: string;
|
|
114
|
-
/** Component's library name; No library name for global config */
|
|
115
|
-
library?: string;
|
|
116
|
-
/** Component configuration as key value pairs */
|
|
117
|
-
config: T;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Dynamically Configurable item
|
|
121
|
-
*/
|
|
122
|
-
interface DynamicConfigurable<T extends Configuration> {
|
|
123
|
-
/**
|
|
124
|
-
* Configuration override by Angular input mechanism
|
|
125
|
-
*/
|
|
126
|
-
config: Partial<T> | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Configuration stream based on the input and the stored configuration
|
|
129
|
-
*/
|
|
130
|
-
config$: Observable<T>;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Dynamically Configurable item working with signal
|
|
134
|
-
*/
|
|
135
|
-
interface DynamicConfigurableWithSignal<T extends Configuration> {
|
|
136
|
-
/**
|
|
137
|
-
* Configuration override by Angular input mechanism
|
|
138
|
-
*/
|
|
139
|
-
config: InputSignal<Partial<T> | undefined>;
|
|
140
|
-
/**
|
|
141
|
-
* Configuration signal based on the input and the stored configuration
|
|
142
|
-
*/
|
|
143
|
-
configSignal: Signal<T>;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Configurable item
|
|
147
|
-
*/
|
|
148
|
-
interface Configurable<T extends {}> {
|
|
149
|
-
/**
|
|
150
|
-
* Configuration
|
|
151
|
-
*/
|
|
152
|
-
config: T;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Description of a configuration property extracted to the CMS
|
|
156
|
-
*/
|
|
157
|
-
interface CategoryDescription {
|
|
158
|
-
/** Category name */
|
|
159
|
-
name: string;
|
|
160
|
-
/** Category description */
|
|
161
|
-
label: string;
|
|
162
|
-
}
|
|
163
|
-
/** Types of components config */
|
|
164
|
-
type ConfigType = 'Block' | 'Page' | 'AppRuntimeConfiguration' | 'AppBuildConfiguration' | 'ExposedComponent';
|
|
165
|
-
/**
|
|
166
|
-
* Interface to define widget parameter to be used on CMS side
|
|
167
|
-
*/
|
|
168
|
-
interface ConfigPropertyWidgetParameters {
|
|
169
|
-
[parameterName: string]: string | boolean | number | string[] | boolean[] | number[];
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Interface to define the widget to be used on CMS side
|
|
173
|
-
*/
|
|
174
|
-
interface ConfigPropertyWidget {
|
|
175
|
-
/** Type of the CMS widget */
|
|
176
|
-
type: string;
|
|
177
|
-
/** Parameters provided to the CMS widget */
|
|
178
|
-
parameters?: ConfigPropertyWidgetParameters;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Application config
|
|
183
|
-
* Application config should implement this to be identified by CMS extractor as a 'runtime' config
|
|
184
|
-
*/
|
|
185
|
-
interface AppRuntimeConfiguration extends Configuration {
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Application config
|
|
189
|
-
* Application config should implement this to be identified by CMS extractor as a 'build time' config
|
|
190
|
-
*/
|
|
191
|
-
interface AppBuildConfiguration extends Configuration {
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Type expert to extend only public fields of a class
|
|
196
|
-
*/
|
|
197
|
-
type InterfaceOf<T> = {
|
|
198
|
-
[P in keyof T]: T[P];
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Interface used to define an object of two elements: label & value
|
|
203
|
-
*/
|
|
204
|
-
interface LabelValue<T> {
|
|
205
|
-
label: string;
|
|
206
|
-
value: T;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/** Interface extending Window with Otter Devtools accessor */
|
|
210
|
-
interface WindowWithDevtools extends Window {
|
|
211
|
-
/** Otter Devtools accessor */
|
|
212
|
-
_OTTER_DEVTOOLS_?: Record<string, any>;
|
|
213
|
-
}
|
|
214
|
-
/** Common option used by the different DevKit services */
|
|
215
|
-
interface DevtoolsCommonOptions {
|
|
216
|
-
/**
|
|
217
|
-
* Activated on the application bootstrap
|
|
218
|
-
* @default false
|
|
219
|
-
*/
|
|
220
|
-
isActivatedOnBootstrap: boolean;
|
|
221
|
-
}
|
|
222
|
-
/** Common option used by the different Contextualization DevKit services */
|
|
223
|
-
interface ContextualizationDevtoolsCommonOptions {
|
|
224
|
-
/**
|
|
225
|
-
* Activated on the application bootstrap when integrated in CMS context
|
|
226
|
-
* @default true
|
|
227
|
-
*/
|
|
228
|
-
isActivatedOnBootstrapWhenCMSContext: boolean;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Dataset injected on the page when in CMS context
|
|
232
|
-
*/
|
|
233
|
-
interface ContextualizationDataset {
|
|
234
|
-
/** `"true"` when in CMS context */
|
|
235
|
-
cmscontext?: string;
|
|
236
|
-
}
|
|
237
|
-
/** Interface describing an Otter Devtools service */
|
|
238
|
-
interface DevtoolsServiceInterface {
|
|
239
|
-
/** Activate the devtools service */
|
|
240
|
-
activate(): void;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Generic translation
|
|
245
|
-
*/
|
|
246
|
-
interface Translation {
|
|
247
|
-
[x: string]: string;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Inputs of the component
|
|
252
|
-
*/
|
|
253
|
-
interface ContextInput {
|
|
254
|
-
[key: string]: any;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Base outputs of the components
|
|
258
|
-
*/
|
|
259
|
-
interface BaseContextOutput {
|
|
260
|
-
[key: string]: any;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Type helper to generate the interface of component outputs
|
|
264
|
-
*/
|
|
265
|
-
type EventEmitterify<T extends BaseContextOutput> = {
|
|
266
|
-
[P in keyof T]: EventEmitter<T[P]>;
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* Context of the component
|
|
270
|
-
*/
|
|
271
|
-
type Context<T extends ContextInput = {}, U extends BaseContextOutput = {}> = {
|
|
272
|
-
[P in keyof T]: T[P];
|
|
273
|
-
} & {
|
|
274
|
-
[P in keyof U]: EventEmitterify<U>[P];
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* Type helper to generate the template context outputs
|
|
278
|
-
*/
|
|
279
|
-
type Functionify<T extends BaseContextOutput> = {
|
|
280
|
-
[P in keyof T]: (value: T[P]) => void;
|
|
281
|
-
};
|
|
282
|
-
/**
|
|
283
|
-
* Interface for a context of a child component
|
|
284
|
-
*/
|
|
285
|
-
interface TemplateContext<N extends {}, S extends ContextInput = Record<string, unknown>, F extends BaseContextOutput = Record<string, unknown>, W extends Translation = Translation> {
|
|
286
|
-
/** Component configuration */
|
|
287
|
-
config?: Partial<N>;
|
|
288
|
-
/** Component inputs context */
|
|
289
|
-
inputs: S & {
|
|
290
|
-
[key: string]: any;
|
|
291
|
-
};
|
|
292
|
-
/** Component outputs context */
|
|
293
|
-
outputs: Functionify<F & {
|
|
294
|
-
[key: string]: any;
|
|
295
|
-
}>;
|
|
296
|
-
/** Component translation */
|
|
297
|
-
translations?: Partial<W>;
|
|
298
|
-
/** Parent Component Id */
|
|
299
|
-
parentId?: string;
|
|
300
|
-
/** Form control object to be applied to the form */
|
|
301
|
-
formControl?: FormControl;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Unique identifier of an item in the extracted metadata
|
|
306
|
-
*/
|
|
307
|
-
interface ItemIdentifier {
|
|
308
|
-
/**
|
|
309
|
-
* Name of the library where the item is originally from
|
|
310
|
-
*/
|
|
311
|
-
library: string;
|
|
312
|
-
/**
|
|
313
|
-
* Name of the item
|
|
314
|
-
*/
|
|
315
|
-
name: string;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/** Type of component */
|
|
319
|
-
type ComponentType = 'Block' | 'Page' | 'ExposedComponent' | 'Component';
|
|
320
|
-
/**
|
|
321
|
-
* Information about an Otter component to provide
|
|
322
|
-
*/
|
|
323
|
-
interface OtterComponentInfoToProvide {
|
|
324
|
-
/** Type of component */
|
|
325
|
-
componentType: ComponentType;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Information about an Otter component
|
|
329
|
-
*/
|
|
330
|
-
interface OtterComponentInfo extends OtterComponentInfoToProvide {
|
|
331
|
-
/** Configuration ID */
|
|
332
|
-
configId?: string;
|
|
333
|
-
/** Translation keys */
|
|
334
|
-
translations?: Translation;
|
|
335
|
-
/** Component Name */
|
|
336
|
-
componentName: string;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Private field where Otter component information are stored
|
|
340
|
-
*/
|
|
341
|
-
declare const otterComponentInfoPropertyName = "__otter-info__";
|
|
342
|
-
/**
|
|
343
|
-
* Decorates an Angular component to provide Otter information
|
|
344
|
-
* @param info Information to define the Otter component
|
|
345
|
-
* @returns the component with the information
|
|
346
|
-
*/
|
|
347
|
-
declare function O3rComponent(info: OtterComponentInfoToProvide): <T extends new (...args: any[]) => object>(constructor: T) => T;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Compute the name of the component with the library's name to generate unique component identifier used in metadata and different modules
|
|
351
|
-
* @param componentName Name of the component to get the configuration
|
|
352
|
-
* @param libraryName Name of the library the component is coming from
|
|
353
|
-
*/
|
|
354
|
-
declare function computeItemIdentifier<C extends string, L extends string>(componentName: C, libraryName?: L): `${L extends string ? `${L}#` : ''}${C}`;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Represents an output generated by an Extractor
|
|
358
|
-
*/
|
|
359
|
-
interface Output {
|
|
360
|
-
/** Name of the output entity */
|
|
361
|
-
name: string;
|
|
362
|
-
/** Filepath of the entity */
|
|
363
|
-
path: string;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Minimum action field
|
|
368
|
-
*/
|
|
369
|
-
interface RulesEngineAction<A extends string = string, V = any> {
|
|
370
|
-
/** Type of the action */
|
|
371
|
-
actionType: A;
|
|
372
|
-
/** Generic value of the action */
|
|
373
|
-
value: V;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* Action handler executed by the rules engine
|
|
377
|
-
*/
|
|
378
|
-
interface RulesEngineActionHandler<T extends RulesEngineAction = RulesEngineAction> {
|
|
379
|
-
/**
|
|
380
|
-
* Execute the actions resulting of the rules engine
|
|
381
|
-
* @param actions List of actions executed by the rules engine
|
|
382
|
-
*/
|
|
383
|
-
executeActions(actions: T[]): void | Promise<void>;
|
|
384
|
-
/**
|
|
385
|
-
* Actions supported by the handler
|
|
386
|
-
*/
|
|
387
|
-
supportingActions: readonly T['actionType'][];
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Logger Client interface.
|
|
392
|
-
*/
|
|
393
|
-
interface Logger {
|
|
394
|
-
/**
|
|
395
|
-
* Log an error.
|
|
396
|
-
* @param message Message to log
|
|
397
|
-
* @param optionalParams Optional parameters to log
|
|
398
|
-
*/
|
|
399
|
-
error(message?: any, ...optionalParams: any[]): void;
|
|
400
|
-
/**
|
|
401
|
-
* Log a warning.
|
|
402
|
-
* @param message Message to log
|
|
403
|
-
* @param optionalParams Optional parameters to log
|
|
404
|
-
*/
|
|
405
|
-
warn(message?: any, ...optionalParams: any[]): void;
|
|
406
|
-
/**
|
|
407
|
-
* Log a message.
|
|
408
|
-
* @param message Message to log
|
|
409
|
-
* @param optionalParams Optional parameters to log
|
|
410
|
-
*/
|
|
411
|
-
info?(message?: any, ...optionalParams: any[]): void;
|
|
412
|
-
/**
|
|
413
|
-
* Log a message.
|
|
414
|
-
* @param message Message to log
|
|
415
|
-
* @param optionalParams Optional parameters to log
|
|
416
|
-
*/
|
|
417
|
-
log(message?: any, ...optionalParams: any[]): void;
|
|
418
|
-
/**
|
|
419
|
-
* Log a debug message.
|
|
420
|
-
* @param message Message to log
|
|
421
|
-
* @param optionalParams Optional parameters to log
|
|
422
|
-
*/
|
|
423
|
-
debug?(message?: any, ...optionalParams: any[]): void;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/** Type of a message exchanged within the Otter Framework */
|
|
427
|
-
declare const otterMessageType = "otter";
|
|
428
|
-
/** Target of a message that should be handled by the application */
|
|
429
|
-
declare const applicationMessageTarget = "app";
|
|
430
|
-
interface OtterMessageContent<DataType extends string = string> {
|
|
431
|
-
/** Type of data */
|
|
432
|
-
dataType: DataType;
|
|
433
|
-
}
|
|
434
|
-
interface OtterMessage<Content extends OtterMessageContent = OtterMessageContent, Target extends string | undefined = undefined | string> {
|
|
435
|
-
/** Type of the message */
|
|
436
|
-
type: typeof otterMessageType;
|
|
437
|
-
/** Version of the message (default to the @o3r/core version ) */
|
|
438
|
-
version?: string;
|
|
439
|
-
/** Target of the message */
|
|
440
|
-
to: Target;
|
|
441
|
-
/** Message content */
|
|
442
|
-
content: Content;
|
|
443
|
-
}
|
|
444
|
-
/** Type helper to retrieve the data types of a union of MessageContent */
|
|
445
|
-
type MessageDataTypes<T extends OtterMessageContent> = T['dataType'];
|
|
446
|
-
/** Type helper to filter the message that can be received by the application */
|
|
447
|
-
type FilterMessageToApplication<T extends OtterMessage> = T extends {
|
|
448
|
-
to: infer U;
|
|
449
|
-
} ? U extends (typeof applicationMessageTarget | undefined) ? T : never : never;
|
|
450
|
-
type ContentMessageData<T extends OtterMessageContent> = T extends any ? Omit<T, 'dataType'> : never;
|
|
451
|
-
|
|
452
|
-
/** Extension connection notification message content */
|
|
453
|
-
interface ConnectContentMessage extends OtterMessageContent<'connect'> {
|
|
454
|
-
}
|
|
455
|
-
/** Script Injection message content */
|
|
456
|
-
interface InjectContentMessage extends OtterMessageContent<'inject'> {
|
|
457
|
-
/** Path to the extension script to inject to the web application */
|
|
458
|
-
scriptToInject: string;
|
|
459
|
-
}
|
|
460
|
-
/** Requested messages Message Content */
|
|
461
|
-
interface RequestMessagesContentMessage<AvailableMessageDataTypes extends string = string> extends OtterMessageContent<'requestMessages'> {
|
|
462
|
-
/** If specified, only the listed messages will be re-emitted */
|
|
463
|
-
only?: AvailableMessageDataTypes[];
|
|
464
|
-
}
|
|
465
|
-
/** List of common Otter content messages */
|
|
466
|
-
type CommonContentMessages = ConnectContentMessage | InjectContentMessage | RequestMessagesContentMessage;
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Determine if a message should be handle by the application
|
|
470
|
-
* @param message Message to analyze
|
|
471
|
-
*/
|
|
472
|
-
declare const isToAppOtterMessage: <T extends OtterMessage>(message?: T) => message is FilterMessageToApplication<T & {
|
|
473
|
-
to: "app";
|
|
474
|
-
}>;
|
|
475
|
-
/**
|
|
476
|
-
* Determine if a message is emitted by an Otter tool
|
|
477
|
-
* @param message Message to analyze
|
|
478
|
-
*/
|
|
479
|
-
declare const isOtterMessage: <T extends OtterMessageContent>(message: any) => message is OtterMessage<T>;
|
|
480
|
-
/**
|
|
481
|
-
* Send an Otter Message
|
|
482
|
-
* @param dataType Type of the message
|
|
483
|
-
* @param content content of the message
|
|
484
|
-
* @param preStringify determine if the message should JSON.stringify before being send (will use the default mechanism otherwise)
|
|
485
|
-
*/
|
|
486
|
-
declare const sendOtterMessage: <T extends OtterMessageContent>(dataType: T["dataType"], content: ContentMessageData<T>, preStringify?: boolean) => void;
|
|
487
|
-
declare function filterMessageContent<T extends Event | MessageEvent>(): (source$: Observable<T>) => Observable<OtterMessageContent<string>>;
|
|
488
|
-
declare function filterMessageContent<T extends Event | MessageEvent, S extends OtterMessageContent>(predicate: (message: any) => message is S): (source$: Observable<T>) => Observable<S>;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Object that define how to serialize a specific state
|
|
492
|
-
*/
|
|
493
|
-
interface Serializer<T> {
|
|
494
|
-
serialize?: (obj: T) => any;
|
|
495
|
-
deserialize?: (data?: any) => T;
|
|
496
|
-
reviver?: (key: string, value: any) => any;
|
|
497
|
-
replacer?: (key: string, value: any) => any;
|
|
498
|
-
initialState?: T;
|
|
499
|
-
}
|
|
500
|
-
declare class StateSerializer<T> implements Serializer<T> {
|
|
501
|
-
serialize?: (obj: T) => any;
|
|
502
|
-
deserialize?: (data?: any) => T;
|
|
503
|
-
replacer?: (key: string, value: any) => any;
|
|
504
|
-
initialState?: T;
|
|
505
|
-
constructor(serializer: Serializer<T>);
|
|
506
|
-
reviver: (_: string, value: any) => any;
|
|
507
|
-
}
|
|
508
|
-
interface LocalStateModel {
|
|
509
|
-
/**
|
|
510
|
-
* Temporary ID of the model in the dictionary
|
|
511
|
-
*/
|
|
512
|
-
tid: string;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Adds an `id` to the given type
|
|
516
|
-
*/
|
|
517
|
-
type Idfy<T> = T & {
|
|
518
|
-
id: string | number;
|
|
519
|
-
};
|
|
520
|
-
/**
|
|
521
|
-
* Payload to update actions
|
|
522
|
-
*/
|
|
523
|
-
interface UpdateActionPayload<T> {
|
|
524
|
-
stateDetails: Partial<T>;
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Payload to set actions
|
|
528
|
-
*/
|
|
529
|
-
interface SetActionPayload<T> {
|
|
530
|
-
stateDetails: T;
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* Payload to set state actions
|
|
534
|
-
*/
|
|
535
|
-
interface SetStateActionPayload<T> {
|
|
536
|
-
state: T;
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Payload to fail actions
|
|
540
|
-
*/
|
|
541
|
-
interface FailActionPayload<T> {
|
|
542
|
-
error?: T;
|
|
543
|
-
}
|
|
544
|
-
type Keep<T, K extends keyof T> = Partial<T> & Pick<T, K>;
|
|
545
|
-
/** Payload to update entities actions */
|
|
546
|
-
interface UpdateEntitiesActionPayload<T, K extends keyof T> {
|
|
547
|
-
entities: Keep<T, K>[];
|
|
548
|
-
}
|
|
549
|
-
/** Payload to update entities actions with a field ID */
|
|
550
|
-
interface UpdateEntitiesActionPayloadWithId<T extends {
|
|
551
|
-
id: string | number;
|
|
552
|
-
}> {
|
|
553
|
-
entities: Keep<T, 'id'>[];
|
|
554
|
-
}
|
|
555
|
-
/** Payload to update entities actions */
|
|
556
|
-
interface UpdateEntityActionPayload<T, K extends keyof T> {
|
|
557
|
-
entity: Keep<T, K>;
|
|
558
|
-
}
|
|
559
|
-
/** Payload to update entities actions with a field ID */
|
|
560
|
-
interface UpdateEntityActionPayloadWithId<T extends {
|
|
561
|
-
id: string | number;
|
|
562
|
-
}> {
|
|
563
|
-
entity: Keep<T, 'id'>;
|
|
564
|
-
}
|
|
565
|
-
/** Payload to set entities and upsert entities actions */
|
|
566
|
-
interface SetEntitiesActionPayload<T> {
|
|
567
|
-
entities: T[];
|
|
568
|
-
}
|
|
569
|
-
/** Payload to set entity and upsert entity actions */
|
|
570
|
-
interface SetEntityActionPayload<T> {
|
|
571
|
-
entity: T;
|
|
572
|
-
}
|
|
573
|
-
/** Payload to fail entities actions */
|
|
574
|
-
interface FailEntitiesActionPayload<T> extends FailActionPayload<T> {
|
|
575
|
-
ids?: (string | number)[];
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Payload to clear the store in case of failure
|
|
579
|
-
*/
|
|
580
|
-
interface ClearOnFailurePayload {
|
|
581
|
-
/** Clear store on failure */
|
|
582
|
-
clearOnFailure?: boolean;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
type RequestId = string;
|
|
586
|
-
/**
|
|
587
|
-
* Interface representing an asynchronous request
|
|
588
|
-
*/
|
|
589
|
-
interface AsyncRequest {
|
|
590
|
-
/** ID of the request */
|
|
591
|
-
requestId: RequestId;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Represents a store item that can be manipulated via asynchronous calls
|
|
595
|
-
*/
|
|
596
|
-
interface AsyncStoreItem {
|
|
597
|
-
/**
|
|
598
|
-
* IDs of the active asynchronous requests for this item.
|
|
599
|
-
*/
|
|
600
|
-
requestIds: RequestId[];
|
|
601
|
-
/**
|
|
602
|
-
* Has a recent call failed.
|
|
603
|
-
* This is reset back to false the next time a new async process is started and there are no active requests.
|
|
604
|
-
*/
|
|
605
|
-
isFailure?: boolean;
|
|
606
|
-
/**
|
|
607
|
-
* Is an asynchronous process ongoing on that item
|
|
608
|
-
*/
|
|
609
|
-
isPending?: boolean;
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* Payload for actions relying on asynchronous requests
|
|
613
|
-
*/
|
|
614
|
-
interface FromApiActionPayload<T> extends Partial<AsyncRequest> {
|
|
615
|
-
/** Promise call from API */
|
|
616
|
-
call: Promise<T>;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Unwraps the type of a FromApiActionPayload
|
|
620
|
-
*/
|
|
621
|
-
type ExtractFromApiActionPayloadType<T extends FromApiActionPayload<any>> = T['call'] extends Promise<infer U> ? U : never;
|
|
622
|
-
/**
|
|
623
|
-
* Payload for actions relying on asynchronous requests
|
|
624
|
-
*/
|
|
625
|
-
interface FromApiActionPayloadWithEntityId<T> extends FromApiActionPayload<T> {
|
|
626
|
-
/** ID of the entity affected by the call */
|
|
627
|
-
id?: string;
|
|
628
|
-
}
|
|
629
|
-
/** Add an optional request ID to the given object */
|
|
630
|
-
type WithRequestId<T> = T & Partial<AsyncRequest>;
|
|
631
|
-
/** Payload to set entities actions from async */
|
|
632
|
-
interface SetAsyncStoreItemActionPayload<T> extends SetActionPayload<T>, Partial<AsyncRequest> {
|
|
633
|
-
}
|
|
634
|
-
/** Payload to update entities actions from async */
|
|
635
|
-
interface UpdateAsyncStoreItemEntitiesActionPayload<T extends object, K extends keyof T> extends UpdateEntitiesActionPayload<T, K>, Partial<AsyncRequest> {
|
|
636
|
-
}
|
|
637
|
-
/** Payload to update entities actions from async with a field ID */
|
|
638
|
-
interface UpdateAsyncStoreItemEntitiesActionPayloadWithId<T extends {
|
|
639
|
-
id: string | number;
|
|
640
|
-
}> extends UpdateEntitiesActionPayloadWithId<T>, Partial<AsyncRequest> {
|
|
641
|
-
}
|
|
642
|
-
/** Payload to update entity actions from async */
|
|
643
|
-
interface UpdateAsyncStoreItemEntityActionPayload<T extends object, K extends keyof T> extends UpdateEntityActionPayload<T, K>, Partial<AsyncRequest> {
|
|
644
|
-
}
|
|
645
|
-
/** Payload to update entity actions from async with a field ID */
|
|
646
|
-
interface UpdateAsyncStoreItemEntityActionPayloadWithId<T extends {
|
|
647
|
-
id: string | number;
|
|
648
|
-
}> extends UpdateEntityActionPayloadWithId<T>, Partial<AsyncRequest> {
|
|
649
|
-
}
|
|
650
|
-
/** Payload to set/upsert entities actions from async */
|
|
651
|
-
interface SetAsyncStoreItemEntitiesActionPayload<T extends object> extends SetEntitiesActionPayload<T>, Partial<AsyncRequest> {
|
|
652
|
-
}
|
|
653
|
-
/** Payload to set/upsert entity actions from async */
|
|
654
|
-
interface SetAsyncStoreItemEntityActionPayload<T extends object> extends SetEntityActionPayload<T>, Partial<AsyncRequest> {
|
|
655
|
-
}
|
|
656
|
-
/** Payload to fail entity actions from async */
|
|
657
|
-
interface FailAsyncStoreItemEntityActionPayload<T extends object> extends FailActionPayload<T>, Partial<AsyncRequest> {
|
|
658
|
-
}
|
|
659
|
-
/** Payload to fail entities actions from async */
|
|
660
|
-
interface FailAsyncStoreItemEntitiesActionPayload<T extends object> extends FailEntitiesActionPayload<T>, Partial<AsyncRequest> {
|
|
661
|
-
}
|
|
662
|
-
/** Status for all the elements inside a cart */
|
|
663
|
-
type EntityStatus<T, U extends keyof T = never> = {
|
|
664
|
-
[P in keyof Omit<T, 'id' | U>]?: AsyncStoreItem;
|
|
665
|
-
};
|
|
666
|
-
/**
|
|
667
|
-
* Extends an Entity model with a status property that holds async information for each of its sub-resources
|
|
668
|
-
*/
|
|
669
|
-
type EntityWithStatus<T> = T & {
|
|
670
|
-
status: EntityStatus<T>;
|
|
671
|
-
};
|
|
672
|
-
/** Modifies the given type that extends AsyncStoreItem to remove those properties */
|
|
673
|
-
type EntityWithoutAsyncStoreItem<T extends AsyncStoreItem> = Omit<T, keyof AsyncStoreItem>;
|
|
674
|
-
|
|
675
|
-
/** Adapter for Asynchronous Entity Store */
|
|
676
|
-
interface EntityAsyncRequestAdapter<T extends AsyncStoreItem> extends EntityAdapter<T> {
|
|
677
|
-
/**
|
|
678
|
-
* Updates the AsyncStoreItem properties of each entity matching an id from the list of given ids, when a request has failed.
|
|
679
|
-
* @param state Actual state
|
|
680
|
-
* @param ids Ids of the entity to be updated with AsyncStoreItem properties
|
|
681
|
-
* @param requestId Id of request which has failed
|
|
682
|
-
*/
|
|
683
|
-
failRequestMany<V extends EntityState<T> & AsyncStoreItem>(state: V, ids?: (string | number)[], requestId?: string): V;
|
|
684
|
-
/**
|
|
685
|
-
* Adds AsyncStoreItem property to the global store, or the entity if it already exists, when a request is triggered.
|
|
686
|
-
* @param state Actual state
|
|
687
|
-
* @param id Id of the entity to update
|
|
688
|
-
* @param requestId Id of the request which is triggered
|
|
689
|
-
*/
|
|
690
|
-
addRequestOne<V extends EntityState<T> & AsyncStoreItem>(state: V, id: string | number | null | undefined, requestId: string): V;
|
|
691
|
-
/**
|
|
692
|
-
* Adds AsyncStoreItem properties for each entity matching the given ids, when a request is triggered
|
|
693
|
-
* @param state Actual state
|
|
694
|
-
* @param ids Ids of the entity to be updated with AsyncStoreItem properties
|
|
695
|
-
* @param requestId Id of request which is triggered
|
|
696
|
-
*/
|
|
697
|
-
addRequestMany<V extends EntityState<T>>(state: V, ids: (string | number)[], requestId: string): V;
|
|
698
|
-
/**
|
|
699
|
-
* Updates the state with the given entity. Update the global or the current entity's status if it exists.
|
|
700
|
-
* @param state Actual state
|
|
701
|
-
* @param entity Payload item;
|
|
702
|
-
* @param requestId Id of request which has resolved if any
|
|
703
|
-
*/
|
|
704
|
-
resolveRequestOne<V extends EntityState<T> & AsyncStoreItem>(state: V, entity: EntityWithoutAsyncStoreItem<T> & Record<'id', string | number>, requestId?: string): V;
|
|
705
|
-
/**
|
|
706
|
-
* Updates the state with the given entity. Update the global or the current entity's status if it exists.
|
|
707
|
-
* @param state Actual state
|
|
708
|
-
* @param entity Payload item;
|
|
709
|
-
* @param requestId Id of request which has resolved if any
|
|
710
|
-
* @param idProperty Property of the entity containing its unique identifier
|
|
711
|
-
*/
|
|
712
|
-
resolveRequestOne<V extends EntityState<T> & AsyncStoreItem, W extends keyof T>(state: V, entity: EntityWithoutAsyncStoreItem<T> & Record<W, string | number>, requestId?: string, idProperty?: W): V;
|
|
713
|
-
/**
|
|
714
|
-
* Updates the state with the given entities. Updates also AsyncStoreItem properties of each entity, when a request is resolved.
|
|
715
|
-
* @param state Actual state
|
|
716
|
-
* @param entities Payload items;
|
|
717
|
-
* @param requestId Id of request which has resolved if any
|
|
718
|
-
*/
|
|
719
|
-
resolveRequestMany<V extends EntityState<T>>(state: V, entities: (Partial<T> & Record<'id', string | number>)[], requestId?: string): V;
|
|
720
|
-
/**
|
|
721
|
-
* Updates the state with the given entities. Updates also AsyncStoreItem properties of each entity, when a request is resolved.
|
|
722
|
-
* @param state Actual state
|
|
723
|
-
* @param entities Payload items;
|
|
724
|
-
* @param requestId Id of request which has resolved if any
|
|
725
|
-
* @param idProperty Property of the entity containing its unique identifier
|
|
726
|
-
*/
|
|
727
|
-
resolveRequestMany<V extends EntityState<T>, W extends keyof T>(state: V, entities: (Partial<T> & Record<W, string | number>)[], requestId?: string, idProperty?: W): V;
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* Create an Asynchronous Request Entity Adapter
|
|
731
|
-
* @param adapter Entity Adapter
|
|
732
|
-
*/
|
|
733
|
-
declare function createEntityAsyncRequestAdapter<T extends AsyncStoreItem>(adapter: EntityAdapter<T>): EntityAsyncRequestAdapter<T>;
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* Adapter to help manipulate AsyncStoreItems to register new request and update the status when they fail or resolve.
|
|
737
|
-
*/
|
|
738
|
-
interface AsyncStoreItemAdapter {
|
|
739
|
-
/**
|
|
740
|
-
* Adds a request to an AsyncStoreItem.
|
|
741
|
-
* If the item had a failure and no ongoing requests, sets it's failure status back to false
|
|
742
|
-
* @param item
|
|
743
|
-
* @param requestId
|
|
744
|
-
*/
|
|
745
|
-
addRequest<T extends AsyncStoreItem>(item: T, requestId: string): T;
|
|
746
|
-
/**
|
|
747
|
-
* Updates an AsyncStoreItem when a request has resolved.
|
|
748
|
-
* Removes it from its requestIds array.
|
|
749
|
-
* If no requestId provided, the method returns the current status of the AsyncStoreItem
|
|
750
|
-
* @param item
|
|
751
|
-
* @param requestId
|
|
752
|
-
*/
|
|
753
|
-
resolveRequest<T extends AsyncStoreItem>(item: T, requestId?: string): T;
|
|
754
|
-
/**
|
|
755
|
-
* Updates an AsyncStoreItem when a request has failed.
|
|
756
|
-
* Removes it from its requestIds array and set its failure status.
|
|
757
|
-
* @param item
|
|
758
|
-
* @param requestId
|
|
759
|
-
*/
|
|
760
|
-
failRequest<T extends AsyncStoreItem>(item: T, requestId?: string): T;
|
|
761
|
-
/**
|
|
762
|
-
* Add AsyncStoreItem properties (with initial values) to the given entity
|
|
763
|
-
* @param entityItem
|
|
764
|
-
* @returns Given item improved with AsyncStoreItem properties
|
|
765
|
-
*/
|
|
766
|
-
initialize<T extends object>(entityItem: T): T & AsyncStoreItem;
|
|
767
|
-
/**
|
|
768
|
-
* Extract only AsyncStoreItem properties from the given entity
|
|
769
|
-
* @param entityItem A model containing AsyncStoreItem properties
|
|
770
|
-
* @returns Object containing only AsyncStoreItem properties
|
|
771
|
-
*/
|
|
772
|
-
extractAsyncStoreItem<T extends AsyncStoreItem>(entityItem: T): AsyncStoreItem;
|
|
773
|
-
/**
|
|
774
|
-
* Clear AsyncStoreItem properties from the given entity
|
|
775
|
-
* @param entityItem A model containing AsyncStoreItem properties
|
|
776
|
-
*/
|
|
777
|
-
clearAsyncStoreItem<T extends AsyncStoreItem>(entityItem: T): T;
|
|
778
|
-
/**
|
|
779
|
-
* Merges an AsyncStoreItem collection into one item that gives an overall status.
|
|
780
|
-
* @param items
|
|
781
|
-
*/
|
|
782
|
-
merge(...items: (AsyncStoreItem | undefined)[]): AsyncStoreItem;
|
|
783
|
-
/**
|
|
784
|
-
* Add a request to the given subResource of an EntityStatus object
|
|
785
|
-
* @param status
|
|
786
|
-
* @param subResource
|
|
787
|
-
* @param requestId
|
|
788
|
-
*/
|
|
789
|
-
entityStatusAddRequest<T extends EntityStatus<T>>(status: T, subResource: keyof T, requestId: string): T;
|
|
790
|
-
/**
|
|
791
|
-
* Resolve a request on the given subResource of an EntityStatus object
|
|
792
|
-
* @param status
|
|
793
|
-
* @param subResource
|
|
794
|
-
* @param requestId
|
|
795
|
-
*/
|
|
796
|
-
entityStatusResolveRequest<T extends EntityStatus<T>>(status: T, subResource: keyof T, requestId?: string): T;
|
|
797
|
-
/**
|
|
798
|
-
* Fail a request to the given subResource of an EntityStatus object
|
|
799
|
-
* @param status
|
|
800
|
-
* @param subResource
|
|
801
|
-
* @param requestId
|
|
802
|
-
*/
|
|
803
|
-
entityStatusFailRequest<T extends EntityStatus<T>>(status: T, subResource: keyof T, requestId?: string): T;
|
|
804
|
-
/**
|
|
805
|
-
* Reset the failure status of the given subResource of an EntityStatus object
|
|
806
|
-
* @param status
|
|
807
|
-
* @param subResource
|
|
808
|
-
*/
|
|
809
|
-
entityStatusResetFailure<T extends EntityStatus<T>>(status: T, subResource: keyof T): T;
|
|
810
|
-
/**
|
|
811
|
-
* Reset the failure status of the given AsyncStoreItem to false
|
|
812
|
-
* @param entityItem
|
|
813
|
-
* @returns AsyncStoreItem with the updated failure status
|
|
814
|
-
*/
|
|
815
|
-
resetFailureStatus<T extends AsyncStoreItem>(entityItem: T): T;
|
|
816
|
-
/**
|
|
817
|
-
* Set the pending status of the given AsyncStoreItem to true
|
|
818
|
-
* @param entityItem
|
|
819
|
-
* @returns AsyncStoreItem with the updated pending status
|
|
820
|
-
*/
|
|
821
|
-
setLoadingStatus<T extends AsyncStoreItem>(entityItem: T): T;
|
|
822
|
-
}
|
|
823
|
-
declare const asyncStoreItemAdapter: AsyncStoreItemAdapter;
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* Determine if the action is an AsyncRequest action
|
|
827
|
-
* @param action Redux Action
|
|
828
|
-
*/
|
|
829
|
-
declare function isCallAction<T = any>(action?: any): action is FromApiActionPayload<T>;
|
|
830
|
-
/**
|
|
831
|
-
* Determine if the action is an AsyncRequest action with a Request ID
|
|
832
|
-
* @param action Redux Action
|
|
833
|
-
*/
|
|
834
|
-
declare function isIdentifiedCallAction<T = any>(action?: any): action is FromApiActionPayload<T> & AsyncRequest;
|
|
835
|
-
/**
|
|
836
|
-
* Determine if the given item implements the AsyncRequest interface
|
|
837
|
-
* @param item
|
|
838
|
-
*/
|
|
839
|
-
declare function isAsyncRequest<T>(item: any): item is T & AsyncRequest;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Custom operator to use instead of SwitchMap with effects based on FromApi actions.
|
|
843
|
-
* It makes sure to emit an action when the inner subscription is unsubscribed in order to keep the store up-to-date with pending information.
|
|
844
|
-
* @param successHandler function that returns the action to emit in case the FromApi call is a success
|
|
845
|
-
* @param errorHandler function that returns the action to emit in case the FromApi call fails
|
|
846
|
-
* @param cancelRequestActionFactory function that returns the action to emit in case the FromApi action is 'cancelled' because a new action was received by the switchMap
|
|
847
|
-
*/
|
|
848
|
-
declare function fromApiEffectSwitchMap<T extends FromApiActionPayload<any>, S extends ExtractFromApiActionPayloadType<T>, U extends Action, V extends Action, W extends Action>(successHandler: (result: S, action: T) => U | Observable<U> | Promise<U>, errorHandler?: (error: any, action: T) => Observable<V>, cancelRequestActionFactory?: (props: AsyncRequest, action: T) => W): OperatorFunction<T, U | V | W>;
|
|
849
|
-
/**
|
|
850
|
-
* Same as {@link fromApiEffectSwitchMap}, instead one inner subscription is kept by id.
|
|
851
|
-
* @param successHandler
|
|
852
|
-
* @param errorHandler
|
|
853
|
-
* @param cancelRequestActionFactory
|
|
854
|
-
* @param cleanUpTimer
|
|
855
|
-
*/
|
|
856
|
-
declare function fromApiEffectSwitchMapById<T extends FromApiActionPayload<any> & {
|
|
857
|
-
id: string;
|
|
858
|
-
}, S extends ExtractFromApiActionPayloadType<T>, U extends Action, V extends Action, W extends Action>(successHandler: (result: S, action: T) => U | Observable<U> | Promise<U>, errorHandler?: (error: any, action: T) => Observable<V>, cancelRequestActionFactory?: (props: AsyncRequest, action: T) => W, cleanUpTimer?: number): OperatorFunction<T, U | V | W>;
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Returns a creator that makes sure that requestId is defined in the action's properties by generating one
|
|
862
|
-
* if needed.
|
|
863
|
-
*/
|
|
864
|
-
declare const asyncProps: <P extends object>() => (props: P) => P & AsyncRequest;
|
|
865
|
-
|
|
866
|
-
/**
|
|
867
|
-
* Serializer for asynchronous store.
|
|
868
|
-
* @param state State of an asynchronous store to serialize
|
|
869
|
-
* @returns a plain json object to pass to json.stringify
|
|
870
|
-
*/
|
|
871
|
-
declare function asyncSerializer<T extends AsyncStoreItem>(state: T): T;
|
|
872
|
-
/**
|
|
873
|
-
* Serializer for asynchronous entity store.
|
|
874
|
-
* @param state State of an asynchronous entity store to serialize
|
|
875
|
-
* @returns a plain json object to pass to json.stringify
|
|
876
|
-
*/
|
|
877
|
-
declare function asyncEntitySerializer<T extends AsyncStoreItem & EntityState<AsyncStoreItem>>(state: T): T & {
|
|
878
|
-
entities: _ngrx_entity.Dictionary<AsyncStoreItem>;
|
|
879
|
-
};
|
|
880
|
-
/**
|
|
881
|
-
* Serializer for asynchronous entity store with status.
|
|
882
|
-
* @param state State of an asynchronous entity store with status to serialize
|
|
883
|
-
* @returns a plain json object to pass to json.stringify
|
|
884
|
-
*/
|
|
885
|
-
declare function asyncEntityWithStatusSerializer<T extends AsyncStoreItem & EntityState<AsyncStoreItem & {
|
|
886
|
-
status: EntityStatus<T['entities']['status']>;
|
|
887
|
-
}>>(state: T): T & {
|
|
888
|
-
entities: _ngrx_entity.Dictionary<AsyncStoreItem & {
|
|
889
|
-
status: EntityStatus<T["entities"]["status"]>;
|
|
890
|
-
}>;
|
|
891
|
-
};
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* Pad number
|
|
895
|
-
* @param val
|
|
896
|
-
* @param digits
|
|
897
|
-
*/
|
|
898
|
-
declare function padNumber(val: number, digits?: number): string;
|
|
899
|
-
/**
|
|
900
|
-
* Returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
901
|
-
* @param dataset
|
|
902
|
-
* @returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
903
|
-
*/
|
|
904
|
-
declare function isProductionEnvironment(dataset: Dataset): boolean;
|
|
905
|
-
|
|
906
|
-
/** Reviver Mapper to detect and create object on deepFill */
|
|
907
|
-
interface PrimitiveReviverMapper<T = any> {
|
|
908
|
-
/** Condition to fill to be determine as */
|
|
909
|
-
condition: (data: any) => boolean;
|
|
910
|
-
/**
|
|
911
|
-
* Construct the primitive type if needed
|
|
912
|
-
* @param data to be constructed
|
|
913
|
-
* @default {@see defaultConstruct}
|
|
914
|
-
*/
|
|
915
|
-
construct?: (data: any) => T;
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Check if an object is not an array or a date
|
|
919
|
-
* @param obj
|
|
920
|
-
* @param additionalMappers
|
|
921
|
-
*/
|
|
922
|
-
declare function isObject(obj: any, additionalMappers?: PrimitiveReviverMapper[]): boolean;
|
|
923
|
-
/**
|
|
924
|
-
* Return a new reference of the given object
|
|
925
|
-
* @param obj
|
|
926
|
-
* @param additionalMappers
|
|
927
|
-
*/
|
|
928
|
-
declare function immutablePrimitive(obj: any, additionalMappers?: PrimitiveReviverMapper[]): any;
|
|
929
|
-
/**
|
|
930
|
-
* Deep fill of base object using source
|
|
931
|
-
* It will do a deep merge of the objects, overriding arrays
|
|
932
|
-
* All properties not present in source, but present in base, will remain
|
|
933
|
-
* @param base
|
|
934
|
-
* @param source
|
|
935
|
-
* @param additionalMappers Map of conditions of type mapper
|
|
936
|
-
*/
|
|
937
|
-
declare function deepFill<T extends {
|
|
938
|
-
[x: string]: any;
|
|
939
|
-
}>(base: T, source?: {
|
|
940
|
-
[x: string]: any;
|
|
941
|
-
}, additionalMappers?: PrimitiveReviverMapper[]): T;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Buffers and emits data for lazy/progressive rendering of big lists
|
|
945
|
-
* That could solve issues with long-running tasks when trying to render an array
|
|
946
|
-
* of similar components.
|
|
947
|
-
* @param delayMs Delay between data emits
|
|
948
|
-
* @param concurrency Amount of elements that should be emitted at once
|
|
949
|
-
*/
|
|
950
|
-
declare function lazyArray<T>(delayMs?: number, concurrency?: number): (source$: Observable<T[]>) => Observable<T[]>;
|
|
951
|
-
|
|
952
|
-
export { DEFAULT_BUILD_PROPERTIES, O3rComponent, StateSerializer, applicationMessageTarget, asyncEntitySerializer, asyncEntityWithStatusSerializer, asyncProps, asyncSerializer, asyncStoreItemAdapter, computeItemIdentifier, createEntityAsyncRequestAdapter, deepFill, filterMessageContent, fromApiEffectSwitchMap, fromApiEffectSwitchMapById, immutablePrimitive, isAsyncRequest, isCallAction, isIdentifiedCallAction, isObject, isOtterMessage, isProductionEnvironment, isToAppOtterMessage, lazyArray, otterComponentInfoPropertyName, otterMessageType, padNumber, sendOtterMessage };
|
|
953
|
-
export type { AppBuildConfiguration, AppRuntimeConfiguration, AsyncRequest, AsyncStoreItem, AsyncStoreItemAdapter, BaseContextOutput, BootstrapConfig, BuildTimeProperties, CategoryDescription, ClearOnFailurePayload, CommonContentMessages, ComponentType, ConfigPropertyWidget, ConfigPropertyWidgetParameters, ConfigType, Configurable, Configuration, ConfigurationValueType, ConnectContentMessage, ContentMessageData, Context, ContextInput, ContextualizationDataset, ContextualizationDevtoolsCommonOptions, CustomConfig, Dataset, DevtoolsCommonOptions, DevtoolsServiceInterface, DynamicConfigurable, DynamicConfigurableWithSignal, EntityAsyncRequestAdapter, EntityStatus, EntityWithStatus, EntityWithoutAsyncStoreItem, EventEmitterify, ExtractFromApiActionPayloadType, FailActionPayload, FailAsyncStoreItemEntitiesActionPayload, FailAsyncStoreItemEntityActionPayload, FailEntitiesActionPayload, FilterMessageToApplication, FromApiActionPayload, FromApiActionPayloadWithEntityId, Functionify, Idfy, InjectContentMessage, InterfaceOf, ItemIdentifier, Keep, LabelValue, LocalStateModel, Logger, MessageDataTypes, NestedConfiguration, OtterComponentInfo, OtterComponentInfoToProvide, OtterMessage, OtterMessageContent, Output, PrimitiveReviverMapper, RequestId, RequestMessagesContentMessage, RulesEngineAction, RulesEngineActionHandler, Serializer, SetActionPayload, SetAsyncStoreItemActionPayload, SetAsyncStoreItemEntitiesActionPayload, SetAsyncStoreItemEntityActionPayload, SetEntitiesActionPayload, SetEntityActionPayload, SetStateActionPayload, TemplateContext, Translation, UpdateActionPayload, UpdateAsyncStoreItemEntitiesActionPayload, UpdateAsyncStoreItemEntitiesActionPayloadWithId, UpdateAsyncStoreItemEntityActionPayload, UpdateAsyncStoreItemEntityActionPayloadWithId, UpdateEntitiesActionPayload, UpdateEntitiesActionPayloadWithId, UpdateEntityActionPayload, UpdateEntityActionPayloadWithId, WindowWithDevtools, WithRequestId };
|
|
954
|
-
//# sourceMappingURL=index.d.ts.map
|