@o3r/components 15.3.0-prerelease.16 → 15.3.0-prerelease.17
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-components-rules-engine.mjs +321 -334
- package/fesm2022/o3r-components-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-components.mjs +1495 -1638
- package/fesm2022/o3r-components.mjs.map +1 -1
- package/package.json +12 -12
- package/types/o3r-components-rules-engine.d.ts +60 -66
- package/types/o3r-components-rules-engine.d.ts.map +1 -1
- package/types/o3r-components.d.ts +635 -641
- package/types/o3r-components.d.ts.map +1 -1
|
@@ -1,150 +1,144 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
10
|
-
import { ActionReducer, Action, ReducerTypes, ActionCreator } from '@ngrx/store';
|
|
11
|
-
import * as _o3r_components from '@o3r/components';
|
|
12
|
-
import { AbstractControl, FormControl } from '@angular/forms';
|
|
13
|
-
import * as i1 from '@angular/common';
|
|
14
|
-
|
|
1
|
+
import { AsyncRequest, AsyncStoreItem, BaseContextOutput, BaseContextOutput as BaseContextOutput$1, CategoryDescription, ConfigPropertyWidget, Configuration, ConnectContentMessage, Context, Context as Context$1, ContextInput, ContextInput as ContextInput$1, DevtoolsCommonOptions, DevtoolsServiceInterface, FailAsyncStoreItemEntitiesActionPayload, FromApiActionPayload, Functionify, ItemIdentifier, MessageDataTypes, OtterMessageContent, Output, RequestMessagesContentMessage, Serializer, SetEntityActionPayload, TemplateContext, UpdateAsyncStoreItemEntityActionPayloadWithId, UpdateEntityActionPayloadWithId, asyncEntitySerializer } from "@o3r/core";
|
|
2
|
+
import { BehaviorSubject, Observable } from "rxjs";
|
|
3
|
+
import { EntityState } from "@ngrx/entity";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { AfterViewChecked, ComponentRef, EnvironmentProviders, InjectionToken, InputSignal, ModuleWithProviders, OnChanges, OnDestroy, OnInit, PipeTransform, Signal, SimpleChanges, Type } from "@angular/core";
|
|
6
|
+
import * as i1$1 from "@ngrx/store";
|
|
7
|
+
import { Action, ActionCreator, ActionReducer, ReducerTypes } from "@ngrx/store";
|
|
8
|
+
import { AbstractControl, FormControl } from "@angular/forms";
|
|
9
|
+
import * as i1 from "@angular/common";
|
|
15
10
|
/** Types of components config */
|
|
16
|
-
type ConfigType = 'Block' | 'Page' | 'AppRuntimeConfiguration' | 'AppBuildConfiguration' | 'ExposedComponent';
|
|
11
|
+
export type ConfigType = 'Block' | 'Page' | 'AppRuntimeConfiguration' | 'AppBuildConfiguration' | 'ExposedComponent';
|
|
17
12
|
/** Type of components we can have in an application */
|
|
18
|
-
type ComponentStructure = 'PAGE' | 'BLOCK' | 'COMPONENT' | 'APPLICATION' | 'NESTED_ELEMENT' | 'EXPOSED_COMPONENT';
|
|
13
|
+
export type ComponentStructure = 'PAGE' | 'BLOCK' | 'COMPONENT' | 'APPLICATION' | 'NESTED_ELEMENT' | 'EXPOSED_COMPONENT';
|
|
19
14
|
/** Component context information */
|
|
20
|
-
interface ComponentContext {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
export interface ComponentContext {
|
|
16
|
+
/** Context library */
|
|
17
|
+
library: string;
|
|
18
|
+
/** Context class name */
|
|
19
|
+
name: string;
|
|
25
20
|
}
|
|
26
21
|
/** Component config information */
|
|
27
|
-
interface ComponentConfig {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
export interface ComponentConfig {
|
|
23
|
+
/** Config library */
|
|
24
|
+
library: string;
|
|
25
|
+
/** Config class name */
|
|
26
|
+
name: string;
|
|
32
27
|
}
|
|
33
28
|
/** Placeholder data identifier */
|
|
34
|
-
interface PlaceholderData {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
export interface PlaceholderData {
|
|
30
|
+
/** Id of the placeholder */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Description of the placeholder */
|
|
33
|
+
description: string;
|
|
39
34
|
}
|
|
40
35
|
/** Placeholder metadata */
|
|
41
|
-
interface PlaceholdersMetadata {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
export interface PlaceholdersMetadata {
|
|
37
|
+
/** Component library */
|
|
38
|
+
library: string;
|
|
39
|
+
/** Component name */
|
|
40
|
+
name: string;
|
|
41
|
+
/** Placeholders available for the component */
|
|
42
|
+
placeholders: PlaceholderData[];
|
|
48
43
|
}
|
|
49
44
|
/**
|
|
50
45
|
* Output generated for component class metadata
|
|
51
46
|
*/
|
|
52
|
-
interface ComponentClassOutput extends Output {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
47
|
+
export interface ComponentClassOutput extends Output {
|
|
48
|
+
/** Component library */
|
|
49
|
+
library: string;
|
|
50
|
+
/** Component name */
|
|
51
|
+
name: string;
|
|
52
|
+
/** Component path */
|
|
53
|
+
path: string;
|
|
54
|
+
/** Component selector */
|
|
55
|
+
selector: string;
|
|
56
|
+
/** Component type */
|
|
57
|
+
type: ComponentStructure;
|
|
58
|
+
/** Component context */
|
|
59
|
+
context?: ComponentContext;
|
|
60
|
+
/** Component config */
|
|
61
|
+
config?: ComponentConfig;
|
|
62
|
+
/** Placeholders available for the component */
|
|
63
|
+
placeholders?: PlaceholderData[];
|
|
64
|
+
/** Determine if the component is activating a ruleset */
|
|
65
|
+
linkableToRuleset: boolean;
|
|
66
|
+
/** List of localization keys used in the component */
|
|
67
|
+
localizationKeys?: string[];
|
|
73
68
|
}
|
|
74
69
|
/** Property types */
|
|
75
|
-
type ConfigPropertyTypes = 'boolean' | 'number' | 'string' | 'string[]' | 'element[]' | 'enum' | 'enum[]' | 'unknown' | 'unknown[]';
|
|
70
|
+
export type ConfigPropertyTypes = 'boolean' | 'number' | 'string' | 'string[]' | 'element[]' | 'enum' | 'enum[]' | 'unknown' | 'unknown[]';
|
|
76
71
|
/**
|
|
77
72
|
* Interface that check if the Nested configuration defined match the cms requirements
|
|
78
73
|
* It only supports a 1 level depth object, containing primitive types (string | number | boolean)
|
|
79
74
|
*/
|
|
80
|
-
interface NestedConfiguration {
|
|
81
|
-
|
|
75
|
+
export interface NestedConfiguration {
|
|
76
|
+
[key: string]: string | boolean | number;
|
|
82
77
|
}
|
|
83
78
|
/** Representation of a config field */
|
|
84
|
-
interface ConfigProperty {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
79
|
+
export interface ConfigProperty {
|
|
80
|
+
/** Name of the configuration property */
|
|
81
|
+
name: string;
|
|
82
|
+
/** Description associated to the configuration property */
|
|
83
|
+
description: string;
|
|
84
|
+
/** Configuration type: string, number, boolean ... */
|
|
85
|
+
type: ConfigPropertyTypes;
|
|
86
|
+
/** Config property default value if primitive */
|
|
87
|
+
value?: string;
|
|
88
|
+
/** Config property default values if array of primitive */
|
|
89
|
+
values?: (string | NestedConfiguration)[];
|
|
90
|
+
/** Label to be used in the CMS for this config */
|
|
91
|
+
label: string;
|
|
92
|
+
/** Reference to the nested configuration if applicable */
|
|
93
|
+
reference?: ItemIdentifier;
|
|
94
|
+
/** List of possible value options */
|
|
95
|
+
choices?: string[];
|
|
96
|
+
/** The category of the config property */
|
|
97
|
+
category?: string;
|
|
98
|
+
/** The CMS widget information */
|
|
99
|
+
widget?: ConfigPropertyWidget;
|
|
100
|
+
/** If true, the CMS user must specify a value for the property */
|
|
101
|
+
required?: boolean;
|
|
102
|
+
/** Restriction keys */
|
|
103
|
+
restrictionKeys?: string[];
|
|
109
104
|
}
|
|
110
105
|
/**
|
|
111
106
|
* Output generated for component config metadata
|
|
112
107
|
*/
|
|
113
|
-
interface ComponentConfigOutput extends Output {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
108
|
+
export interface ComponentConfigOutput extends Output {
|
|
109
|
+
/** Component's library */
|
|
110
|
+
library: string;
|
|
111
|
+
/** Component type */
|
|
112
|
+
type: ComponentStructure;
|
|
113
|
+
/** Flag for application config to identify it as a runtime config */
|
|
114
|
+
runtime?: boolean;
|
|
115
|
+
/** Title of the configuration property */
|
|
116
|
+
title?: string;
|
|
117
|
+
/** Description associated to the configuration property */
|
|
118
|
+
description?: string;
|
|
119
|
+
/** Configuration tags */
|
|
120
|
+
tags?: string[];
|
|
121
|
+
/** Configuration fields */
|
|
122
|
+
properties: ConfigProperty[];
|
|
123
|
+
/** Category (taken from `@o3rCategories` tag) */
|
|
124
|
+
categories?: CategoryDescription[];
|
|
130
125
|
}
|
|
131
126
|
/**
|
|
132
127
|
* Output generated for component config metadata
|
|
133
128
|
*/
|
|
134
|
-
interface ComponentConfigOutputs {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
129
|
+
export interface ComponentConfigOutputs {
|
|
130
|
+
/**
|
|
131
|
+
* List of configuration output for a component
|
|
132
|
+
*/
|
|
133
|
+
componentConfigOutput: ComponentConfigOutput[];
|
|
139
134
|
}
|
|
140
135
|
/**
|
|
141
136
|
* Output generated for component metadata
|
|
142
137
|
*/
|
|
143
|
-
interface ComponentOutput {
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
export interface ComponentOutput {
|
|
139
|
+
components: ComponentClassOutput[];
|
|
140
|
+
configurations: ComponentConfigOutput[];
|
|
146
141
|
}
|
|
147
|
-
|
|
148
142
|
/**
|
|
149
143
|
* Buffers and emits data for lazy/progressive rendering of big lists
|
|
150
144
|
* That could solve issues with long-running tasks when trying to render an array
|
|
@@ -152,619 +146,610 @@ interface ComponentOutput {
|
|
|
152
146
|
* @param delayMs Delay between data emits
|
|
153
147
|
* @param concurrency Amount of elements that should be emitted at once
|
|
154
148
|
*/
|
|
155
|
-
declare function lazyArray<T>(delayMs?: number, concurrency?: number): (source$: Observable<T[]>) => Observable<T[]>;
|
|
156
|
-
|
|
149
|
+
export declare function lazyArray<T>(delayMs?: number, concurrency?: number): (source$: Observable<T[]>) => Observable<T[]>;
|
|
157
150
|
/**
|
|
158
151
|
* Variable model from the placeholder reply
|
|
159
152
|
*/
|
|
160
|
-
interface PlaceholderVariable {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
153
|
+
export interface PlaceholderVariable {
|
|
154
|
+
type: 'fact' | 'fullUrl' | 'relativeUrl' | 'localisation';
|
|
155
|
+
value: string;
|
|
156
|
+
parameters?: Record<string, string>;
|
|
157
|
+
path?: string;
|
|
165
158
|
}
|
|
166
159
|
/**
|
|
167
160
|
* Raw JSON template coming back from the CMS or any other source
|
|
168
161
|
*/
|
|
169
|
-
interface PlaceholderRequestReply {
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
export interface PlaceholderRequestReply {
|
|
163
|
+
template?: string;
|
|
164
|
+
vars?: Record<string, PlaceholderVariable>;
|
|
172
165
|
}
|
|
173
166
|
/**
|
|
174
167
|
* PlaceholderRequest model
|
|
175
168
|
*/
|
|
176
|
-
interface PlaceholderRequestModel extends AsyncStoreItem, PlaceholderRequestReply {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
169
|
+
export interface PlaceholderRequestModel extends AsyncStoreItem, PlaceholderRequestReply {
|
|
170
|
+
/** Raw URL that is not localized, ex: my_url/[LANGUAGE]/my_placeholder.json */
|
|
171
|
+
id: string;
|
|
172
|
+
/** Resolved URL that is localized, ex: my_url/en-GB/my_placeholder.json */
|
|
173
|
+
resolvedUrl: string;
|
|
174
|
+
/** Rendered template associated to the resolved URL, can be dynamic */
|
|
175
|
+
renderedTemplate?: string;
|
|
176
|
+
/** Unknown type found in the reply */
|
|
177
|
+
unknownTypeFound?: boolean;
|
|
178
|
+
/** A mechanism to cache previous request results for a given language. This boolean disables the dynamic rendering when it is set to false */
|
|
179
|
+
used?: boolean;
|
|
187
180
|
}
|
|
188
181
|
/**
|
|
189
182
|
* PlaceholderRequest state details
|
|
190
183
|
*/
|
|
191
|
-
interface PlaceholderRequestStateDetails extends AsyncStoreItem {
|
|
192
|
-
}
|
|
184
|
+
export interface PlaceholderRequestStateDetails extends AsyncStoreItem {}
|
|
193
185
|
/**
|
|
194
186
|
* PlaceholderRequest store state
|
|
195
187
|
*/
|
|
196
|
-
interface PlaceholderRequestState extends EntityState<PlaceholderRequestModel>, PlaceholderRequestStateDetails {
|
|
197
|
-
}
|
|
188
|
+
export interface PlaceholderRequestState extends EntityState<PlaceholderRequestModel>, PlaceholderRequestStateDetails {}
|
|
198
189
|
/**
|
|
199
190
|
* Name of the PlaceholderRequest Store
|
|
200
191
|
*/
|
|
201
|
-
declare const PLACEHOLDER_REQUEST_STORE_NAME = "placeholderRequest";
|
|
192
|
+
export declare const PLACEHOLDER_REQUEST_STORE_NAME = "placeholderRequest";
|
|
202
193
|
/**
|
|
203
194
|
* PlaceholderRequest Store Interface
|
|
204
195
|
*/
|
|
205
|
-
interface PlaceholderRequestStore {
|
|
206
|
-
|
|
207
|
-
|
|
196
|
+
export interface PlaceholderRequestStore {
|
|
197
|
+
/** PlaceholderRequest state */
|
|
198
|
+
[PLACEHOLDER_REQUEST_STORE_NAME]: PlaceholderRequestState;
|
|
208
199
|
}
|
|
209
|
-
|
|
210
200
|
/** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */
|
|
211
|
-
declare const cancelPlaceholderRequest:
|
|
212
|
-
|
|
201
|
+
export declare const cancelPlaceholderRequest: import("@ngrx/store").ActionCreator<"[PlaceholderRequest] cancel request", (props: AsyncRequest & {
|
|
202
|
+
id: string;
|
|
213
203
|
}) => AsyncRequest & {
|
|
214
|
-
|
|
215
|
-
} &
|
|
204
|
+
id: string;
|
|
205
|
+
} & import("@ngrx/store").Action<"[PlaceholderRequest] cancel request">>;
|
|
216
206
|
/** Action to update failureStatus for PlaceholderRequestModels */
|
|
217
|
-
declare const failPlaceholderRequestEntity:
|
|
207
|
+
export declare const failPlaceholderRequestEntity: import("@ngrx/store").ActionCreator<"[PlaceholderRequest] fail entities", (props: FailAsyncStoreItemEntitiesActionPayload<any>) => FailAsyncStoreItemEntitiesActionPayload<any> & import("@ngrx/store").Action<"[PlaceholderRequest] fail entities">>;
|
|
218
208
|
/** Action to update an entity */
|
|
219
|
-
declare const updatePlaceholderRequestEntity:
|
|
209
|
+
export declare const updatePlaceholderRequestEntity: import("@ngrx/store").ActionCreator<"[PlaceholderRequest] update entity", (props: UpdateAsyncStoreItemEntityActionPayloadWithId<PlaceholderRequestModel>) => UpdateAsyncStoreItemEntityActionPayloadWithId<PlaceholderRequestModel> & import("@ngrx/store").Action<"[PlaceholderRequest] update entity">>;
|
|
220
210
|
/** Action to update an entity without impact on request id */
|
|
221
|
-
declare const updatePlaceholderRequestEntitySync:
|
|
211
|
+
export declare const updatePlaceholderRequestEntitySync: import("@ngrx/store").ActionCreator<"[PlaceholderRequest] update entity sync", (props: UpdateEntityActionPayloadWithId<PlaceholderRequestModel>) => UpdateEntityActionPayloadWithId<PlaceholderRequestModel> & import("@ngrx/store").Action<"[PlaceholderRequest] update entity sync">>;
|
|
222
212
|
/** Action to update PlaceholderRequest with known IDs, will create the entity with only the url, the call will be created in the effect */
|
|
223
|
-
declare const setPlaceholderRequestEntityFromUrl:
|
|
224
|
-
|
|
225
|
-
|
|
213
|
+
export declare const setPlaceholderRequestEntityFromUrl: import("@ngrx/store").FunctionWithParametersType<[props: FromApiActionPayload<PlaceholderRequestReply> & {
|
|
214
|
+
resolvedUrl: string;
|
|
215
|
+
id: string;
|
|
226
216
|
}], FromApiActionPayload<PlaceholderRequestReply> & {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
} & AsyncRequest &
|
|
230
|
-
|
|
217
|
+
resolvedUrl: string;
|
|
218
|
+
id: string;
|
|
219
|
+
} & AsyncRequest & import("@ngrx/store").Action<"[PlaceholderRequest] set entity from url">> & import("@ngrx/store").Action<"[PlaceholderRequest] set entity from url">;
|
|
231
220
|
/** Token of the PlaceholderRequest reducer */
|
|
232
|
-
declare const PLACEHOLDER_REQUEST_REDUCER_TOKEN: InjectionToken<ActionReducer<PlaceholderRequestState, Action<string>>>;
|
|
221
|
+
export declare const PLACEHOLDER_REQUEST_REDUCER_TOKEN: InjectionToken<ActionReducer<PlaceholderRequestState, Action<string>>>;
|
|
233
222
|
/** Provide default reducer for PlaceholderRequest store */
|
|
234
|
-
declare function getDefaultplaceholderRequestReducer(): ActionReducer<PlaceholderRequestState, Action<string>>;
|
|
223
|
+
export declare function getDefaultplaceholderRequestReducer(): ActionReducer<PlaceholderRequestState, Action<string>>;
|
|
235
224
|
/**
|
|
236
225
|
* @deprecated Will be removed in v16. Use {@link providePlaceholderRequestStore} instead.
|
|
237
226
|
*/
|
|
238
|
-
declare class PlaceholderRequestStoreModule {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
227
|
+
export declare class PlaceholderRequestStoreModule {
|
|
228
|
+
static forRoot<T extends PlaceholderRequestState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<PlaceholderRequestStoreModule>;
|
|
229
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderRequestStoreModule, never>;
|
|
230
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PlaceholderRequestStoreModule, never, [typeof i1$1.StoreFeatureModule], never>;
|
|
231
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PlaceholderRequestStoreModule>;
|
|
243
232
|
}
|
|
244
233
|
/**
|
|
245
234
|
* Provide PlaceholderRequest feature store.
|
|
246
235
|
* @param reducerFactory Optional factory to override the default reducer.
|
|
247
236
|
*/
|
|
248
|
-
declare function providePlaceholderRequestStore(reducerFactory?: () => ActionReducer<PlaceholderRequestState, Action>): EnvironmentProviders;
|
|
249
|
-
|
|
237
|
+
export declare function providePlaceholderRequestStore(reducerFactory?: () => ActionReducer<PlaceholderRequestState, Action>): EnvironmentProviders;
|
|
250
238
|
/**
|
|
251
239
|
* PlaceholderRequest Store adapter
|
|
252
240
|
*/
|
|
253
|
-
declare const placeholderRequestAdapter:
|
|
241
|
+
export declare const placeholderRequestAdapter: import("@o3r/core").EntityAsyncRequestAdapter<PlaceholderRequestModel>;
|
|
254
242
|
/**
|
|
255
243
|
* PlaceholderRequest Store initial value
|
|
256
244
|
*/
|
|
257
|
-
declare const placeholderRequestInitialState: PlaceholderRequestState;
|
|
245
|
+
export declare const placeholderRequestInitialState: PlaceholderRequestState;
|
|
258
246
|
/**
|
|
259
247
|
* Reducers of Placeholder request store that handles the call to the placeholder template URL
|
|
260
248
|
*/
|
|
261
|
-
declare const placeholderRequestReducerFeatures: ReducerTypes<PlaceholderRequestState, ActionCreator[]>[];
|
|
249
|
+
export declare const placeholderRequestReducerFeatures: ReducerTypes<PlaceholderRequestState, ActionCreator[]>[];
|
|
262
250
|
/**
|
|
263
251
|
* PlaceholderRequest Store reducer
|
|
264
252
|
*/
|
|
265
|
-
declare const placeholderRequestReducer:
|
|
266
|
-
|
|
267
|
-
declare const selectPlaceholderRequestState: _ngrx_store.MemoizedSelector<object, PlaceholderRequestState, _ngrx_store.DefaultProjectorFn<PlaceholderRequestState>>;
|
|
253
|
+
export declare const placeholderRequestReducer: import("@ngrx/store").ActionReducer<PlaceholderRequestState, import("@ngrx/store").Action<string>>;
|
|
254
|
+
export declare const selectPlaceholderRequestState: import("@ngrx/store").MemoizedSelector<object, PlaceholderRequestState, import("@ngrx/store").DefaultProjectorFn<PlaceholderRequestState>>;
|
|
268
255
|
/** Select the dictionary of PlaceholderRequest entities */
|
|
269
|
-
declare const selectPlaceholderRequestEntities:
|
|
256
|
+
export declare const selectPlaceholderRequestEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("@o3r/components").PlaceholderRequestModel>, (s1: PlaceholderRequestState) => import("@ngrx/entity").Dictionary<import("@o3r/components").PlaceholderRequestModel>>;
|
|
270
257
|
/**
|
|
271
258
|
* Select a specific PlaceholderRequest entity using a raw url as id
|
|
272
259
|
* @param rawUrl
|
|
273
260
|
*/
|
|
274
|
-
declare const selectPlaceholderRequestEntityUsage: (rawUrl: string) =>
|
|
275
|
-
|
|
276
|
-
declare const
|
|
277
|
-
declare const
|
|
278
|
-
declare const placeholderRequestStorageSync: Readonly<Serializer<PlaceholderRequestState>>;
|
|
279
|
-
|
|
261
|
+
export declare const selectPlaceholderRequestEntityUsage: (rawUrl: string) => import("@ngrx/store").MemoizedSelector<object, boolean | undefined, (s1: PlaceholderRequestState) => boolean | undefined>;
|
|
262
|
+
export declare const placeholderRequestStorageSerializer: typeof asyncEntitySerializer;
|
|
263
|
+
export declare const placeholderRequestStorageDeserializer: (rawObject: any) => PlaceholderRequestState;
|
|
264
|
+
export declare const placeholderRequestStorageSync: Readonly<Serializer<PlaceholderRequestState>>;
|
|
280
265
|
/**
|
|
281
266
|
* PlaceholderTemplate model
|
|
282
267
|
*/
|
|
283
|
-
interface PlaceholderTemplateModel {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
268
|
+
export interface PlaceholderTemplateModel {
|
|
269
|
+
/** Placeholder id that is unique*/
|
|
270
|
+
id: string;
|
|
271
|
+
/** Urls to the templates to be fetched, and priority for rendering order */
|
|
272
|
+
urlsWithPriority: {
|
|
273
|
+
rawUrl: string;
|
|
274
|
+
priority: number;
|
|
275
|
+
}[];
|
|
291
276
|
}
|
|
292
277
|
/** Possible placeholder mode */
|
|
293
|
-
type PlaceholderMode = 'normal' | 'debug' | 'pending';
|
|
278
|
+
export type PlaceholderMode = 'normal' | 'debug' | 'pending';
|
|
294
279
|
/**
|
|
295
280
|
* PlaceholderTemplate store state
|
|
296
281
|
*/
|
|
297
|
-
interface PlaceholderTemplateState extends EntityState<PlaceholderTemplateModel> {
|
|
298
|
-
|
|
282
|
+
export interface PlaceholderTemplateState extends EntityState<PlaceholderTemplateModel> {
|
|
283
|
+
mode: PlaceholderMode;
|
|
299
284
|
}
|
|
300
285
|
/**
|
|
301
286
|
* Name of the PlaceholderTemplate Store
|
|
302
287
|
*/
|
|
303
|
-
declare const PLACEHOLDER_TEMPLATE_STORE_NAME = "placeholderTemplate";
|
|
288
|
+
export declare const PLACEHOLDER_TEMPLATE_STORE_NAME = "placeholderTemplate";
|
|
304
289
|
/**
|
|
305
290
|
* PlaceholderTemplate Store Interface
|
|
306
291
|
*/
|
|
307
|
-
interface PlaceholderTemplateStore {
|
|
308
|
-
|
|
309
|
-
|
|
292
|
+
export interface PlaceholderTemplateStore {
|
|
293
|
+
/** PlaceholderTemplate state */
|
|
294
|
+
[PLACEHOLDER_TEMPLATE_STORE_NAME]: PlaceholderTemplateState;
|
|
310
295
|
}
|
|
311
|
-
|
|
312
296
|
/** Action to delete a specific entity */
|
|
313
|
-
declare const deletePlaceholderTemplateEntity:
|
|
314
|
-
|
|
297
|
+
export declare const deletePlaceholderTemplateEntity: import("@ngrx/store").ActionCreator<"[PlaceholderTemplate] delete entity", (props: {
|
|
298
|
+
id: string;
|
|
315
299
|
}) => {
|
|
316
|
-
|
|
317
|
-
} &
|
|
300
|
+
id: string;
|
|
301
|
+
} & import("@ngrx/store").Action<"[PlaceholderTemplate] delete entity">>;
|
|
318
302
|
/** Action to clear all placeholderTemplate and fill the store with the payload */
|
|
319
|
-
declare const setPlaceholderTemplateEntity:
|
|
320
|
-
declare const togglePlaceholderModeTemplate:
|
|
321
|
-
|
|
303
|
+
export declare const setPlaceholderTemplateEntity: import("@ngrx/store").ActionCreator<"[PlaceholderTemplate] set entity", (props: SetEntityActionPayload<PlaceholderTemplateModel>) => SetEntityActionPayload<PlaceholderTemplateModel> & import("@ngrx/store").Action<"[PlaceholderTemplate] set entity">>;
|
|
304
|
+
export declare const togglePlaceholderModeTemplate: import("@ngrx/store").ActionCreator<"[PlaceholderTemplate] toggle mode", (props: {
|
|
305
|
+
mode: PlaceholderMode;
|
|
322
306
|
}) => {
|
|
323
|
-
|
|
324
|
-
} &
|
|
325
|
-
|
|
307
|
+
mode: PlaceholderMode;
|
|
308
|
+
} & import("@ngrx/store").Action<"[PlaceholderTemplate] toggle mode">>;
|
|
326
309
|
/** Token of the PlaceholderTemplate reducer */
|
|
327
|
-
declare const PLACEHOLDER_TEMPLATE_REDUCER_TOKEN: InjectionToken<ActionReducer<PlaceholderTemplateState, Action<string>>>;
|
|
310
|
+
export declare const PLACEHOLDER_TEMPLATE_REDUCER_TOKEN: InjectionToken<ActionReducer<PlaceholderTemplateState, Action<string>>>;
|
|
328
311
|
/** Provide default reducer for PlaceholderTemplate store */
|
|
329
|
-
declare function getDefaultPlaceholderTemplateReducer(): ActionReducer<PlaceholderTemplateState, Action<string>>;
|
|
312
|
+
export declare function getDefaultPlaceholderTemplateReducer(): ActionReducer<PlaceholderTemplateState, Action<string>>;
|
|
330
313
|
/**
|
|
331
314
|
* @deprecated Will be removed in v16. Use {@link providePlaceholderTemplateStore} instead.
|
|
332
315
|
*/
|
|
333
|
-
declare class PlaceholderTemplateStoreModule {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
316
|
+
export declare class PlaceholderTemplateStoreModule {
|
|
317
|
+
static forRoot<T extends PlaceholderTemplateState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<PlaceholderTemplateStoreModule>;
|
|
318
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderTemplateStoreModule, never>;
|
|
319
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PlaceholderTemplateStoreModule, never, [typeof i1$1.StoreFeatureModule], never>;
|
|
320
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PlaceholderTemplateStoreModule>;
|
|
338
321
|
}
|
|
339
322
|
/**
|
|
340
323
|
* Provide PlaceholderTemplate feature store.
|
|
341
324
|
* @param reducerFactory Optional factory to override the default reducer.
|
|
342
325
|
*/
|
|
343
|
-
declare function providePlaceholderTemplateStore(reducerFactory?: () => ActionReducer<PlaceholderTemplateState, Action>): EnvironmentProviders;
|
|
344
|
-
|
|
326
|
+
export declare function providePlaceholderTemplateStore(reducerFactory?: () => ActionReducer<PlaceholderTemplateState, Action>): EnvironmentProviders;
|
|
345
327
|
/**
|
|
346
328
|
* PlaceholderTemplate Store adapter
|
|
347
329
|
*/
|
|
348
|
-
declare const placeholderTemplateAdapter:
|
|
330
|
+
export declare const placeholderTemplateAdapter: import("@ngrx/entity").EntityAdapter<PlaceholderTemplateModel, string>;
|
|
349
331
|
/**
|
|
350
332
|
* PlaceholderTemplate Store initial value
|
|
351
333
|
*/
|
|
352
|
-
declare const placeholderTemplateInitialState: PlaceholderTemplateState;
|
|
334
|
+
export declare const placeholderTemplateInitialState: PlaceholderTemplateState;
|
|
353
335
|
/**
|
|
354
336
|
* List of basic actions for PlaceholderTemplate Store
|
|
355
337
|
*/
|
|
356
|
-
declare const placeholderTemplateReducerFeatures: ReducerTypes<PlaceholderTemplateState, ActionCreator[]>[];
|
|
338
|
+
export declare const placeholderTemplateReducerFeatures: ReducerTypes<PlaceholderTemplateState, ActionCreator[]>[];
|
|
357
339
|
/**
|
|
358
340
|
* PlaceholderTemplate Store reducer
|
|
359
341
|
*/
|
|
360
|
-
declare const placeholderTemplateReducer:
|
|
361
|
-
|
|
362
|
-
declare const selectPlaceholderTemplateState: _ngrx_store.MemoizedSelector<object, PlaceholderTemplateState, _ngrx_store.DefaultProjectorFn<PlaceholderTemplateState>>;
|
|
342
|
+
export declare const placeholderTemplateReducer: import("@ngrx/store").ActionReducer<PlaceholderTemplateState, import("@ngrx/store").Action<string>>;
|
|
343
|
+
export declare const selectPlaceholderTemplateState: import("@ngrx/store").MemoizedSelector<object, PlaceholderTemplateState, import("@ngrx/store").DefaultProjectorFn<PlaceholderTemplateState>>;
|
|
363
344
|
/** Select the dictionary of PlaceholderTemplate entities */
|
|
364
|
-
declare const selectPlaceholderTemplateEntities:
|
|
345
|
+
export declare const selectPlaceholderTemplateEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("@o3r/components").PlaceholderTemplateModel>, (s1: PlaceholderTemplateState) => import("@ngrx/entity").Dictionary<import("@o3r/components").PlaceholderTemplateModel>>;
|
|
365
346
|
/**
|
|
366
347
|
* Select a specific PlaceholderTemplate
|
|
367
348
|
* @param placeholderId
|
|
368
349
|
*/
|
|
369
|
-
declare const selectPlaceholderTemplateEntity: (placeholderId: string) =>
|
|
350
|
+
export declare const selectPlaceholderTemplateEntity: (placeholderId: string) => import("@ngrx/store").MemoizedSelector<object, import("@o3r/components").PlaceholderTemplateModel | undefined, (s1: PlaceholderTemplateState) => import("@o3r/components").PlaceholderTemplateModel | undefined>;
|
|
370
351
|
/**
|
|
371
352
|
* Select the ordered rendered placeholder template full data (url, priority etc.) for a given placeholderId
|
|
372
353
|
* Return undefined if the placeholder is not found
|
|
373
354
|
* Returns {orderedRenderedTemplates: undefined, isPending: true} if any of the request is still pending
|
|
374
355
|
* @param placeholderId
|
|
375
356
|
*/
|
|
376
|
-
declare const selectSortedTemplates: (placeholderId: string) =>
|
|
377
|
-
|
|
378
|
-
|
|
357
|
+
export declare const selectSortedTemplates: (placeholderId: string) => import("@ngrx/store").MemoizedSelector<object, {
|
|
358
|
+
orderedTemplates: undefined;
|
|
359
|
+
isPending: never;
|
|
379
360
|
} | {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
} | undefined, (s1:
|
|
388
|
-
|
|
389
|
-
|
|
361
|
+
orderedTemplates: {
|
|
362
|
+
rawUrl: string;
|
|
363
|
+
priority: number;
|
|
364
|
+
renderedTemplate?: string;
|
|
365
|
+
resolvedUrl: string;
|
|
366
|
+
}[];
|
|
367
|
+
isPending: boolean;
|
|
368
|
+
} | undefined, (s1: import("@o3r/components").PlaceholderTemplateModel | undefined, s2: import("@o3r/components").PlaceholderRequestState) => {
|
|
369
|
+
orderedTemplates: undefined;
|
|
370
|
+
isPending: never;
|
|
390
371
|
} | {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
372
|
+
orderedTemplates: {
|
|
373
|
+
rawUrl: string;
|
|
374
|
+
priority: number;
|
|
375
|
+
renderedTemplate?: string;
|
|
376
|
+
resolvedUrl: string;
|
|
377
|
+
}[];
|
|
378
|
+
isPending: boolean;
|
|
398
379
|
} | undefined>;
|
|
399
|
-
declare const selectPlaceholderTemplateMode:
|
|
400
|
-
|
|
401
|
-
declare const
|
|
402
|
-
declare const placeholderTemplateStorageSync: Readonly<Serializer<PlaceholderTemplateState>>;
|
|
403
|
-
|
|
380
|
+
export declare const selectPlaceholderTemplateMode: import("@ngrx/store").MemoizedSelector<object, import("@o3r/components").PlaceholderMode, (s1: PlaceholderTemplateState) => import("@o3r/components").PlaceholderMode>;
|
|
381
|
+
export declare const placeholderTemplateStorageDeserializer: (rawObject: any) => PlaceholderTemplateState;
|
|
382
|
+
export declare const placeholderTemplateStorageSync: Readonly<Serializer<PlaceholderTemplateState>>;
|
|
404
383
|
/**
|
|
405
384
|
* Model to describe a group of elements
|
|
406
385
|
*/
|
|
407
386
|
interface GroupInfo {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
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
|
-
/** Component analytics */
|
|
481
|
-
analytics?: Record<string, string[]>;
|
|
387
|
+
/**
|
|
388
|
+
* Text color for the {@link displayName}
|
|
389
|
+
*/
|
|
390
|
+
color?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Color of the border of the element once highlighted
|
|
393
|
+
*/
|
|
394
|
+
backgroundColor: string;
|
|
395
|
+
/**
|
|
396
|
+
* Name of the group display
|
|
397
|
+
*/
|
|
398
|
+
displayName: string;
|
|
399
|
+
/**
|
|
400
|
+
* Regexp to detect the elements part of the group
|
|
401
|
+
*/
|
|
402
|
+
regexp: string;
|
|
403
|
+
}
|
|
404
|
+
export interface Ng {
|
|
405
|
+
/**
|
|
406
|
+
* Retrieves the component instance associated with a given DOM element.
|
|
407
|
+
*
|
|
408
|
+
* Usage:
|
|
409
|
+
*
|
|
410
|
+
* Given the following DOM structure:
|
|
411
|
+
* ```html
|
|
412
|
+
* <my-app>
|
|
413
|
+
* <div>
|
|
414
|
+
* <child-comp></child-comp>
|
|
415
|
+
* </div>
|
|
416
|
+
* </my-app>
|
|
417
|
+
* ```
|
|
418
|
+
* Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`
|
|
419
|
+
* associated with this DOM element.
|
|
420
|
+
*
|
|
421
|
+
* Calling the function on `<my-app>` will return the `MyApp` instance.
|
|
422
|
+
* @param element DOM element from which the component should be retrieved.
|
|
423
|
+
* @returns Component instance associated with the element or `null` if there
|
|
424
|
+
* is no component associated with it.
|
|
425
|
+
*/
|
|
426
|
+
getComponent<T = any>(element: Element): T | null;
|
|
427
|
+
/**
|
|
428
|
+
* Retrieves the component instance whose view contains the DOM element.
|
|
429
|
+
*
|
|
430
|
+
* For example, if `<child-comp>` is used in the template of `<app-comp>`
|
|
431
|
+
* (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`
|
|
432
|
+
* would return `<app-comp>`.
|
|
433
|
+
* @param elementOrDir DOM element, component or directive instance
|
|
434
|
+
* for which to retrieve the root components.
|
|
435
|
+
* @returns Component instance whose view owns the DOM element or null if the element is not
|
|
436
|
+
* part of a component view.
|
|
437
|
+
*/
|
|
438
|
+
getOwningComponent<T = any>(elementOrDir: Element | object): T | null;
|
|
439
|
+
/**
|
|
440
|
+
* Retrieves the host element of a component or directive instance.
|
|
441
|
+
* The host element is the DOM element that matched the selector of the directive.
|
|
442
|
+
* @param componentOrDirective Component or directive instance for which the host
|
|
443
|
+
* element should be retrieved.
|
|
444
|
+
* @returns Host element of the target.
|
|
445
|
+
*/
|
|
446
|
+
getHostElement(componentOrDirective: object): Element;
|
|
447
|
+
}
|
|
448
|
+
export interface OtterLikeComponentInfo {
|
|
449
|
+
/** Container information */
|
|
450
|
+
container?: OtterLikeComponentInfo;
|
|
451
|
+
/** Configuration ID */
|
|
452
|
+
configId?: string;
|
|
453
|
+
/** Component name */
|
|
454
|
+
componentName: string;
|
|
455
|
+
/** Component translation */
|
|
456
|
+
translations?: Record<string, string[]>;
|
|
457
|
+
/** Component analytics */
|
|
458
|
+
analytics?: Record<string, string[]>;
|
|
482
459
|
}
|
|
483
460
|
/**
|
|
484
461
|
* Otter inspector css class
|
|
485
462
|
*/
|
|
486
|
-
declare const INSPECTOR_CLASS = "otter-devtools-inspector";
|
|
463
|
+
export declare const INSPECTOR_CLASS = "otter-devtools-inspector";
|
|
487
464
|
/**
|
|
488
465
|
* Determine if a node is an Otter container
|
|
489
466
|
* @param node Element to check
|
|
490
467
|
* @returns true if the node is an Otter container
|
|
491
468
|
*/
|
|
492
|
-
declare const isContainer: (node: Element | undefined | null) => node is Element;
|
|
469
|
+
export declare const isContainer: (node: Element | undefined | null) => node is Element;
|
|
493
470
|
/**
|
|
494
471
|
* Determine the config id of a component instance
|
|
495
472
|
* @param instance component instance
|
|
496
473
|
* @returns the config id of the component instance
|
|
497
474
|
*/
|
|
498
|
-
declare const getConfigId: (instance: any) => any;
|
|
475
|
+
export declare const getConfigId: (instance: any) => any;
|
|
499
476
|
/**
|
|
500
477
|
* Recursive method to determin the translations of a node
|
|
501
478
|
* @param node HTMLElement to check
|
|
502
479
|
* @param rec recursive method
|
|
503
480
|
* @returns the trasnslations associated to their component name
|
|
504
481
|
*/
|
|
505
|
-
declare function getTranslationsRec(node: Element | null, rec: typeof getTranslationsRec): Record<string, string[]> | undefined;
|
|
482
|
+
export declare function getTranslationsRec(node: Element | null, rec: typeof getTranslationsRec): Record<string, string[]> | undefined;
|
|
506
483
|
/**
|
|
507
484
|
* Determine the translations of a node
|
|
508
485
|
* @param node HTMLElement to check
|
|
509
486
|
* @returns the translations associated to their component name
|
|
510
487
|
*/
|
|
511
|
-
declare const getTranslations: (node: Element | null) => Record<string, string[]> | undefined;
|
|
488
|
+
export declare const getTranslations: (node: Element | null) => Record<string, string[]> | undefined;
|
|
512
489
|
/**
|
|
513
490
|
* Recursive method to determine the analytics of a node
|
|
514
491
|
* @param node Element to check
|
|
515
492
|
* @param rec recursive method
|
|
516
493
|
* @returns the analytics associated to their component name
|
|
517
494
|
*/
|
|
518
|
-
declare function getAnalyticEventsRec(node: Element | null, rec: typeof getAnalyticEventsRec): Record<string, string[]> | undefined;
|
|
495
|
+
export declare function getAnalyticEventsRec(node: Element | null, rec: typeof getAnalyticEventsRec): Record<string, string[]> | undefined;
|
|
519
496
|
/**
|
|
520
497
|
* Determine the analytics of a node
|
|
521
498
|
* @param node Element to check
|
|
522
499
|
* @returns the analytics associated to their component name
|
|
523
500
|
*/
|
|
524
|
-
declare const getAnalyticEvents: (node: Element | null) => Record<string, string[]> | undefined;
|
|
501
|
+
export declare const getAnalyticEvents: (node: Element | null) => Record<string, string[]> | undefined;
|
|
525
502
|
/**
|
|
526
503
|
* Determine all info from an Otter component
|
|
527
504
|
* @param componentClassInstance component instance
|
|
528
505
|
* @param host HTML element hosting the component
|
|
529
506
|
* @returns all info from an Otter component
|
|
530
507
|
*/
|
|
531
|
-
declare const getOtterLikeComponentInfo: (componentClassInstance: any, host: Element) => OtterLikeComponentInfo;
|
|
532
|
-
|
|
508
|
+
export declare const getOtterLikeComponentInfo: (componentClassInstance: any, host: Element) => OtterLikeComponentInfo;
|
|
533
509
|
/**
|
|
534
510
|
* Service to handle the custom inspector for the Otter Devtools Chrome extension.
|
|
535
511
|
*/
|
|
536
|
-
declare class OtterInspectorService {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
|
|
512
|
+
export declare class OtterInspectorService {
|
|
513
|
+
private readonly angularDevTools;
|
|
514
|
+
private readonly elementMouseOverCallback;
|
|
515
|
+
private readonly elementClickCallback;
|
|
516
|
+
private readonly cancelEventCallback;
|
|
517
|
+
private selectedComponent;
|
|
518
|
+
private inspectorDiv;
|
|
519
|
+
private readonly otterLikeComponentInfoToBeSent;
|
|
520
|
+
/**
|
|
521
|
+
* Stream of component info to be sent to the extension app.
|
|
522
|
+
*/
|
|
523
|
+
otterLikeComponentInfoToBeSent$: Observable<OtterLikeComponentInfo | undefined>;
|
|
524
|
+
constructor();
|
|
525
|
+
private startInspecting;
|
|
526
|
+
private elementClick;
|
|
527
|
+
private isOtterLikeComponent;
|
|
528
|
+
private findComponentInfo;
|
|
529
|
+
private elementMouseOver;
|
|
530
|
+
private highlight;
|
|
531
|
+
private unHighlight;
|
|
532
|
+
private cancelEvent;
|
|
533
|
+
/**
|
|
534
|
+
* Prepare the inspector div and add it to the DOM.
|
|
535
|
+
*/
|
|
536
|
+
prepareInspector(): void;
|
|
537
|
+
/**
|
|
538
|
+
* Toggle the inspector.
|
|
539
|
+
* @param isRunning true if the inspector is running
|
|
540
|
+
*/
|
|
541
|
+
toggleInspector(isRunning: boolean): void;
|
|
542
|
+
stopInspecting(): void;
|
|
543
|
+
}
|
|
569
544
|
/**
|
|
570
545
|
* Component Devtools options
|
|
571
546
|
*/
|
|
572
|
-
interface ComponentsDevtoolsServiceOptions extends DevtoolsCommonOptions {
|
|
573
|
-
}
|
|
547
|
+
export interface ComponentsDevtoolsServiceOptions extends DevtoolsCommonOptions {}
|
|
574
548
|
/**
|
|
575
549
|
* Message to give the selected component information
|
|
576
550
|
*/
|
|
577
|
-
interface SelectedComponentInfoMessage extends OtterLikeComponentInfo, OtterMessageContent<'selectedComponentInfo'> {
|
|
578
|
-
}
|
|
551
|
+
export interface SelectedComponentInfoMessage extends OtterLikeComponentInfo, OtterMessageContent<'selectedComponentInfo'> {}
|
|
579
552
|
/**
|
|
580
553
|
* Message to toggle the inspector
|
|
581
554
|
*/
|
|
582
|
-
interface ToggleInspectorMessage extends OtterMessageContent<'toggleInspector'> {
|
|
583
|
-
|
|
584
|
-
|
|
555
|
+
export interface ToggleInspectorMessage extends OtterMessageContent<'toggleInspector'> {
|
|
556
|
+
/** Is the inspector running */
|
|
557
|
+
isRunning: boolean;
|
|
585
558
|
}
|
|
586
559
|
/**
|
|
587
560
|
* Message to toggle the highlight
|
|
588
561
|
*/
|
|
589
|
-
interface ToggleHighlightMessage extends OtterMessageContent<'toggleHighlight'> {
|
|
590
|
-
|
|
591
|
-
|
|
562
|
+
export interface ToggleHighlightMessage extends OtterMessageContent<'toggleHighlight'> {
|
|
563
|
+
/** Is the highlight displayed */
|
|
564
|
+
isRunning: boolean;
|
|
592
565
|
}
|
|
593
566
|
/**
|
|
594
567
|
* Message the change the configuration of the `HighlightService`
|
|
595
568
|
*/
|
|
596
|
-
interface ChangeHighlightConfiguration extends OtterMessageContent<'changeHighlightConfiguration'> {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
569
|
+
export interface ChangeHighlightConfiguration extends OtterMessageContent<'changeHighlightConfiguration'> {
|
|
570
|
+
/**
|
|
571
|
+
* Minimum width of HTMLElement to be considered
|
|
572
|
+
*/
|
|
573
|
+
elementMinWidth?: number;
|
|
574
|
+
/**
|
|
575
|
+
* Minimum height of HTMLElement to be considered
|
|
576
|
+
*/
|
|
577
|
+
elementMinHeight?: number;
|
|
578
|
+
/**
|
|
579
|
+
* Throttle interval
|
|
580
|
+
*/
|
|
581
|
+
throttleInterval?: number;
|
|
582
|
+
/**
|
|
583
|
+
* Group information to detect elements
|
|
584
|
+
*/
|
|
585
|
+
groupsInfo?: Record<string, GroupInfo>;
|
|
586
|
+
/**
|
|
587
|
+
* Maximum number of ancestors
|
|
588
|
+
*/
|
|
589
|
+
maxDepth?: number;
|
|
590
|
+
/**
|
|
591
|
+
* Opacity of the chips
|
|
592
|
+
*/
|
|
593
|
+
chipsOpacity?: number;
|
|
594
|
+
/**
|
|
595
|
+
* Auto refresh
|
|
596
|
+
*/
|
|
597
|
+
autoRefresh?: boolean;
|
|
625
598
|
}
|
|
626
599
|
/**
|
|
627
600
|
* Message to toggle the placeholder mode
|
|
628
601
|
*/
|
|
629
|
-
interface PlaceholderModeMessage extends OtterMessageContent<'placeholderMode'> {
|
|
630
|
-
|
|
631
|
-
|
|
602
|
+
export interface PlaceholderModeMessage extends OtterMessageContent<'placeholderMode'> {
|
|
603
|
+
/** Placeholder mode */
|
|
604
|
+
mode: PlaceholderMode;
|
|
632
605
|
}
|
|
633
606
|
/**
|
|
634
607
|
* Message to know the component selection availability
|
|
635
608
|
*/
|
|
636
|
-
interface IsComponentSelectionAvailableMessage extends OtterMessageContent<'isComponentSelectionAvailable'> {
|
|
637
|
-
|
|
609
|
+
export interface IsComponentSelectionAvailableMessage extends OtterMessageContent<'isComponentSelectionAvailable'> {
|
|
610
|
+
available: boolean;
|
|
638
611
|
}
|
|
639
612
|
type ComponentsMessageContents = IsComponentSelectionAvailableMessage | SelectedComponentInfoMessage | ToggleInspectorMessage | ToggleHighlightMessage | ChangeHighlightConfiguration | PlaceholderModeMessage;
|
|
640
613
|
/** List of possible DataTypes for Components messages */
|
|
641
|
-
type ComponentsMessageDataTypes = MessageDataTypes<ComponentsMessageContents>;
|
|
614
|
+
export type ComponentsMessageDataTypes = MessageDataTypes<ComponentsMessageContents>;
|
|
642
615
|
/** List of all messages for Components purpose */
|
|
643
|
-
type AvailableComponentsMessageContents = ComponentsMessageContents | ConnectContentMessage | RequestMessagesContentMessage<ComponentsMessageDataTypes>;
|
|
616
|
+
export type AvailableComponentsMessageContents = ComponentsMessageContents | ConnectContentMessage | RequestMessagesContentMessage<ComponentsMessageDataTypes>;
|
|
644
617
|
/**
|
|
645
618
|
* Determine if the given message is a Components message
|
|
646
619
|
* @param message message to check
|
|
647
620
|
*/
|
|
648
|
-
declare const isComponentsMessage: (message: any) => message is AvailableComponentsMessageContents;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
|
|
621
|
+
export declare const isComponentsMessage: (message: any) => message is AvailableComponentsMessageContents;
|
|
622
|
+
export declare class ComponentsDevtoolsMessageService implements DevtoolsServiceInterface {
|
|
623
|
+
private readonly logger;
|
|
624
|
+
private readonly store;
|
|
625
|
+
private readonly options;
|
|
626
|
+
private readonly inspectorService;
|
|
627
|
+
private readonly sendMessage;
|
|
628
|
+
private readonly destroyRef;
|
|
629
|
+
private readonly highlightService;
|
|
630
|
+
constructor();
|
|
631
|
+
/**
|
|
632
|
+
* Function to connect the plugin to the Otter DevTools extension
|
|
633
|
+
*/
|
|
634
|
+
private connectPlugin;
|
|
635
|
+
private sendCurrentSelectedComponent;
|
|
636
|
+
private sendIsComponentSelectionAvailable;
|
|
637
|
+
/**
|
|
638
|
+
* Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
|
|
639
|
+
* @param only restricted list of messages to re-send
|
|
640
|
+
*/
|
|
641
|
+
private handleReEmitRequest;
|
|
642
|
+
/**
|
|
643
|
+
* Function to handle the incoming messages from Otter Chrome DevTools extension
|
|
644
|
+
* @param message message coming from the Otter Chrome DevTools extension
|
|
645
|
+
*/
|
|
646
|
+
private handleEvents;
|
|
647
|
+
/** @inheritDoc */
|
|
648
|
+
activate(): void;
|
|
649
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsDevtoolsMessageService, never>;
|
|
650
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
651
|
+
}
|
|
681
652
|
/**
|
|
682
653
|
* @deprecated Will be removed in v16. Use {@link provideComponentsDevtools} instead.
|
|
683
654
|
*/
|
|
684
|
-
declare class ComponentsDevtoolsModule {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
655
|
+
export declare class ComponentsDevtoolsModule {
|
|
656
|
+
/**
|
|
657
|
+
* Initialize Otter Devtools
|
|
658
|
+
* @param options
|
|
659
|
+
*/
|
|
660
|
+
static instrument(options: Partial<ComponentsDevtoolsServiceOptions>): ModuleWithProviders<ComponentsDevtoolsModule>;
|
|
661
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsDevtoolsModule, never>;
|
|
662
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsDevtoolsModule, never, [typeof i1$1.StoreModule, typeof PlaceholderTemplateStoreModule], never>;
|
|
663
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsDevtoolsModule>;
|
|
693
664
|
}
|
|
694
665
|
/**
|
|
695
666
|
* Provide components devtools functionality.
|
|
696
667
|
* @param options Components devtools options
|
|
697
668
|
*/
|
|
698
|
-
declare function provideComponentsDevtools(options?: Partial<ComponentsDevtoolsServiceOptions>): EnvironmentProviders;
|
|
699
|
-
|
|
700
|
-
declare const
|
|
701
|
-
declare const OTTER_COMPONENTS_DEVTOOLS_OPTIONS: InjectionToken<ComponentsDevtoolsServiceOptions>;
|
|
702
|
-
|
|
669
|
+
export declare function provideComponentsDevtools(options?: Partial<ComponentsDevtoolsServiceOptions>): EnvironmentProviders;
|
|
670
|
+
export declare const OTTER_COMPONENTS_DEVTOOLS_DEFAULT_OPTIONS: Readonly<ComponentsDevtoolsServiceOptions>;
|
|
671
|
+
export declare const OTTER_COMPONENTS_DEVTOOLS_OPTIONS: InjectionToken<ComponentsDevtoolsServiceOptions>;
|
|
703
672
|
/**
|
|
704
673
|
* Minimum interface for components used with c11n directive
|
|
705
674
|
*/
|
|
706
675
|
interface C11nComponent {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}
|
|
711
|
-
declare class C11nDirective<D extends Configuration = Configuration, I extends ContextInput = ContextInput, O extends BaseContextOutput = BaseContextOutput, T extends C11nComponent = Context<I, O>> implements OnChanges, OnDestroy {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
676
|
+
[key: string]: any;
|
|
677
|
+
config?: any;
|
|
678
|
+
validate?: (control: AbstractControl) => any;
|
|
679
|
+
}
|
|
680
|
+
export declare class C11nDirective<D extends Configuration = Configuration, I extends ContextInput$1 = ContextInput$1, O extends BaseContextOutput$1 = BaseContextOutput$1, T extends C11nComponent = Context$1<I, O>> implements OnChanges, OnDestroy {
|
|
681
|
+
private readonly viewContainerRef;
|
|
682
|
+
private readonly differsService;
|
|
683
|
+
private readonly injector;
|
|
684
|
+
/** The component information passed to the directive */
|
|
685
|
+
component: Type<T>;
|
|
686
|
+
/** The information related to configuration */
|
|
687
|
+
config?: D;
|
|
688
|
+
/** Formcontrol */
|
|
689
|
+
formControl?: FormControl;
|
|
690
|
+
/** The input setter */
|
|
691
|
+
set inputs(value: { [K in keyof I]: I[K] | InputSignal<I[K]>; });
|
|
692
|
+
/** The input getter */
|
|
693
|
+
get inputs(): { [K in keyof I]: I[K] | InputSignal<I[K]>; };
|
|
694
|
+
/** The information related to output */
|
|
695
|
+
outputs?: Functionify<O>;
|
|
696
|
+
/** The component reference */
|
|
697
|
+
componentRef: ComponentRef<T>;
|
|
698
|
+
private componentSubscriptions;
|
|
699
|
+
private _inputs;
|
|
700
|
+
private differInputs;
|
|
701
|
+
/** Set of inputs when the component was created. */
|
|
702
|
+
private readonly uninitializedInputs;
|
|
703
|
+
/**
|
|
704
|
+
* Type guard for component implementing CVA
|
|
705
|
+
* @param _cmp Component instance
|
|
706
|
+
*/
|
|
707
|
+
private componentImplementsCva;
|
|
708
|
+
private updateInputs;
|
|
709
|
+
/**
|
|
710
|
+
* called when data-bound property change
|
|
711
|
+
* @param changes The changes that occur
|
|
712
|
+
*/
|
|
713
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
714
|
+
/**
|
|
715
|
+
* returns validation errors from component instance if validate method exists else returns null
|
|
716
|
+
* @param control Form control
|
|
717
|
+
*/
|
|
718
|
+
validate(control: AbstractControl): any;
|
|
719
|
+
/**
|
|
720
|
+
* ngOnDestroy
|
|
721
|
+
*/
|
|
722
|
+
ngOnDestroy(): void;
|
|
723
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<C11nDirective<any, any, any, any>, never>;
|
|
724
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<C11nDirective<any, any, any, any>, "[c11n]", never, {
|
|
725
|
+
"component": {
|
|
726
|
+
"alias": "component";
|
|
727
|
+
"required": false;
|
|
728
|
+
};
|
|
729
|
+
"config": {
|
|
730
|
+
"alias": "config";
|
|
731
|
+
"required": false;
|
|
728
732
|
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
private updateInputs;
|
|
744
|
-
/**
|
|
745
|
-
* called when data-bound property change
|
|
746
|
-
* @param changes The changes that occur
|
|
747
|
-
*/
|
|
748
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
749
|
-
/**
|
|
750
|
-
* returns validation errors from component instance if validate method exists else returns null
|
|
751
|
-
* @param control Form control
|
|
752
|
-
*/
|
|
753
|
-
validate(control: AbstractControl): any;
|
|
754
|
-
/**
|
|
755
|
-
* ngOnDestroy
|
|
756
|
-
*/
|
|
757
|
-
ngOnDestroy(): void;
|
|
758
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<C11nDirective<any, any, any, any>, never>;
|
|
759
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<C11nDirective<any, any, any, any>, "[c11n]", never, { "component": { "alias": "component"; "required": false; }; "config": { "alias": "config"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "inputs": { "alias": "inputs"; "required": false; }; "outputs": { "alias": "outputs"; "required": false; }; }, {}, never, never, true, never>;
|
|
760
|
-
}
|
|
761
|
-
|
|
733
|
+
"formControl": {
|
|
734
|
+
"alias": "formControl";
|
|
735
|
+
"required": false;
|
|
736
|
+
};
|
|
737
|
+
"inputs": {
|
|
738
|
+
"alias": "inputs";
|
|
739
|
+
"required": false;
|
|
740
|
+
};
|
|
741
|
+
"outputs": {
|
|
742
|
+
"alias": "outputs";
|
|
743
|
+
"required": false;
|
|
744
|
+
};
|
|
745
|
+
}, {}, never, never, true, never>;
|
|
746
|
+
}
|
|
762
747
|
/** Interface for grouping the arrays needed for custom component registration */
|
|
763
|
-
interface EntryCustomComponents {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
748
|
+
export interface EntryCustomComponents {
|
|
749
|
+
/** Array of custom presenters */
|
|
750
|
+
customComponents: Type<any>[];
|
|
751
|
+
/** Array of custom presenter modules */
|
|
752
|
+
customComponentsModules: Type<any>[];
|
|
768
753
|
}
|
|
769
754
|
/**
|
|
770
755
|
* Register a custom component
|
|
@@ -772,59 +757,73 @@ interface EntryCustomComponents {
|
|
|
772
757
|
* @param customComponentKey
|
|
773
758
|
* @param customComponent
|
|
774
759
|
*/
|
|
775
|
-
declare function registerCustomComponent<T extends Context>(customComponentsMap: Map<string, Type<T>>, customComponentKey: string, customComponent: Type<T>): Map<string, Type<T>>;
|
|
776
|
-
|
|
760
|
+
export declare function registerCustomComponent<T extends Context$1>(customComponentsMap: Map<string, Type<T>>, customComponentKey: string, customComponent: Type<T>): Map<string, Type<T>>;
|
|
777
761
|
/** C11n directive mock */
|
|
778
|
-
declare class MockC11nDirective {
|
|
779
|
-
|
|
780
|
-
|
|
762
|
+
export declare class MockC11nDirective {
|
|
763
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MockC11nDirective, never>;
|
|
764
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MockC11nDirective, "[c11n]", never, {
|
|
765
|
+
"config": {
|
|
766
|
+
"alias": "config";
|
|
767
|
+
"required": false;
|
|
768
|
+
};
|
|
769
|
+
"component": {
|
|
770
|
+
"alias": "component";
|
|
771
|
+
"required": false;
|
|
772
|
+
};
|
|
773
|
+
"inputs": {
|
|
774
|
+
"alias": "inputs";
|
|
775
|
+
"required": false;
|
|
776
|
+
};
|
|
777
|
+
"outputs": {
|
|
778
|
+
"alias": "outputs";
|
|
779
|
+
"required": false;
|
|
780
|
+
};
|
|
781
|
+
}, {}, never, never, true, never>;
|
|
781
782
|
}
|
|
782
783
|
/** C11n service mock */
|
|
783
|
-
declare class C11nMockService {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
784
|
+
export declare class C11nMockService {
|
|
785
|
+
addPresenter(_presKey: string, _presType: any): void;
|
|
786
|
+
getPresenter(_defaultPres: any, _presKey: string): (source: Observable<any>) => Observable<null>;
|
|
787
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<C11nMockService, never>;
|
|
788
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
788
789
|
}
|
|
789
790
|
/**
|
|
790
791
|
* The purpose of this module is to be imported in the unit tests of the components which are using c11n directive
|
|
791
792
|
* @deprecated Will be removed in v16. Use {@link provideC11nMock} and import `MockC11nDirective` directly instead.
|
|
792
793
|
*/
|
|
793
|
-
declare class C11nMockModule {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
794
|
+
export declare class C11nMockModule {
|
|
795
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<C11nMockModule, never>;
|
|
796
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<C11nMockModule, never, [typeof MockC11nDirective], never>;
|
|
797
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<C11nMockModule>;
|
|
797
798
|
}
|
|
798
799
|
/**
|
|
799
800
|
* Provide C11n mock service for unit testing.
|
|
800
801
|
*/
|
|
801
|
-
declare function provideC11nMock(): EnvironmentProviders;
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
}
|
|
820
|
-
|
|
802
|
+
export declare function provideC11nMock(): EnvironmentProviders;
|
|
803
|
+
export declare class C11nService {
|
|
804
|
+
private readonly presentersMap;
|
|
805
|
+
/**
|
|
806
|
+
* Add a presenter
|
|
807
|
+
* @param presKey The presenter key to set
|
|
808
|
+
* @param presenter The new presenter
|
|
809
|
+
*/
|
|
810
|
+
addPresenter<T extends Context$1>(presKey: string, presenter: Type<T>): void;
|
|
811
|
+
/**
|
|
812
|
+
* Operator to retrieve the presenter based on a given presKey
|
|
813
|
+
* @param defaultPres The default presenter
|
|
814
|
+
* @param presKey The presenter key to retrieve
|
|
815
|
+
*/
|
|
816
|
+
getPresenter<T extends Context$1>(defaultPres: Type<T>, presKey?: string): (source: Observable<Configuration>) => Observable<Type<T>>;
|
|
817
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<C11nService, never>;
|
|
818
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
819
|
+
}
|
|
821
820
|
/**
|
|
822
821
|
* Customization service factory
|
|
823
822
|
* @param config -> registerCompFunc - a function which returns the map of custom components which will be injected in c11n service
|
|
824
823
|
* @param config.registerCompFunc
|
|
825
824
|
*/
|
|
826
|
-
declare function createC11nService(config: {
|
|
827
|
-
|
|
825
|
+
export declare function createC11nService(config: {
|
|
826
|
+
registerCompFunc: () => Map<string, any>;
|
|
828
827
|
}): C11nService;
|
|
829
828
|
/**
|
|
830
829
|
* Returns a tuple of the key and the component
|
|
@@ -840,118 +839,113 @@ declare function createC11nService(config: {
|
|
|
840
839
|
* @param customComponentKey
|
|
841
840
|
* @param customComponent
|
|
842
841
|
*/
|
|
843
|
-
declare function withComponent<T extends Context>(customComponentKey: string, customComponent: Type<T>): [string, Type<T>];
|
|
842
|
+
export declare function withComponent<T extends Context$1>(customComponentKey: string, customComponent: Type<T>): [string, Type<T>];
|
|
844
843
|
/**
|
|
845
844
|
* Provide custom components which will be injected in c11n service
|
|
846
845
|
* @param customComponents
|
|
847
846
|
* @param additionalComponents
|
|
848
847
|
*/
|
|
849
|
-
declare function provideCustomComponents(customComponents?: Map<string, any>, ...additionalComponents: (ReturnType<typeof withComponent>)[]):
|
|
850
|
-
|
|
848
|
+
export declare function provideCustomComponents(customComponents?: Map<string, any>, ...additionalComponents: (ReturnType<typeof withComponent>)[]): import("@angular/core").EnvironmentProviders;
|
|
851
849
|
/** The C11n injection token */
|
|
852
|
-
declare const C11N_PRESENTERS_MAP_TOKEN: InjectionToken<string>;
|
|
850
|
+
export declare const C11N_PRESENTERS_MAP_TOKEN: InjectionToken<string>;
|
|
853
851
|
/** Function used to register custom components */
|
|
854
|
-
declare const C11N_REGISTER_FUNC_TOKEN: InjectionToken<string>;
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
852
|
+
export declare const C11N_REGISTER_FUNC_TOKEN: InjectionToken<string>;
|
|
853
|
+
export declare class O3rCapitalizePipe implements PipeTransform {
|
|
854
|
+
transform(value?: any): any;
|
|
855
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<O3rCapitalizePipe, never>;
|
|
856
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<O3rCapitalizePipe, "o3rCapitalize", true>;
|
|
857
|
+
}
|
|
862
858
|
/** Time object to format duration */
|
|
863
859
|
interface TimeUnit {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
}
|
|
875
|
-
|
|
860
|
+
/** character defining the time unit */
|
|
861
|
+
formatCharacter: string;
|
|
862
|
+
/** divider to get the time unit value */
|
|
863
|
+
divider: number;
|
|
864
|
+
/**
|
|
865
|
+
* modulo for the time unit
|
|
866
|
+
* If not provided, it will either use the immediately higher unit time divider
|
|
867
|
+
* or Number.MAX_SAFE_INTEGER for the highest one
|
|
868
|
+
*/
|
|
869
|
+
modulo?: number;
|
|
870
|
+
}
|
|
876
871
|
/**
|
|
877
872
|
* Converts a duration in seconds into the HH:mm format
|
|
878
873
|
*/
|
|
879
|
-
declare class O3rDurationPipe implements PipeTransform {
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<O3rReplaceWithBoldPipe, "o3rReplaceWithBold", true>;
|
|
910
|
-
}
|
|
911
|
-
|
|
874
|
+
export declare class O3rDurationPipe implements PipeTransform {
|
|
875
|
+
/**
|
|
876
|
+
* Converts a duration in seconds into the HH:mm format
|
|
877
|
+
* @param value the value in seconds
|
|
878
|
+
* @param pattern the desired output format.
|
|
879
|
+
* The pattern takes into account static format characters surrounded by braces
|
|
880
|
+
* {d} for days, {h} for hours, {m} for minutes and {s} for seconds.
|
|
881
|
+
* It accepts a double unit time in case a padding is wanted {dd} outputs 05 for instance
|
|
882
|
+
* Should respect the following pattern `/(\{h+\})|(\{m+\})/` (ex: `'{h}h{m}m'` outputs `0h2m`, `'{h}H{mm}'` `0H02` etc.)
|
|
883
|
+
* @param timeUnits the units time to be used in this transformation. This can be used for custom units in the pattern like
|
|
884
|
+
* {
|
|
885
|
+
* formatCharacter: 'w',
|
|
886
|
+
* divider: 3600 * 24 * 7
|
|
887
|
+
* }
|
|
888
|
+
* The above defines a week for {w}
|
|
889
|
+
*/
|
|
890
|
+
transform(value?: number, pattern?: string, timeUnits?: TimeUnit[]): string;
|
|
891
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<O3rDurationPipe, never>;
|
|
892
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<O3rDurationPipe, "o3rDuration", true>;
|
|
893
|
+
}
|
|
894
|
+
export declare class O3rKeepWhiteSpacePipe implements PipeTransform {
|
|
895
|
+
transform(value: string): string;
|
|
896
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<O3rKeepWhiteSpacePipe, never>;
|
|
897
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<O3rKeepWhiteSpacePipe, "o3rKeepWhiteSpace", true>;
|
|
898
|
+
}
|
|
899
|
+
export declare class O3rReplaceWithBoldPipe implements PipeTransform {
|
|
900
|
+
transform(value: string, inputText: string): string;
|
|
901
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<O3rReplaceWithBoldPipe, never>;
|
|
902
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<O3rReplaceWithBoldPipe, "o3rReplaceWithBold", true>;
|
|
903
|
+
}
|
|
912
904
|
/**
|
|
913
905
|
* Placeholder component that is bind to the PlaceholderTemplateStore to display a template based on its ID
|
|
914
906
|
* A loading indication can be provided via projection
|
|
915
907
|
* @example
|
|
916
908
|
* <o3r-placeholder id="my-template-id">Is loading ...</o3r-placeholder>
|
|
917
909
|
*/
|
|
918
|
-
declare class PlaceholderComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
910
|
+
export declare class PlaceholderComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|
911
|
+
private readonly store;
|
|
912
|
+
private readonly cd;
|
|
913
|
+
readonly id$: BehaviorSubject<string | undefined>;
|
|
914
|
+
private readonly afterViewInit$;
|
|
915
|
+
private readonly messages$;
|
|
916
|
+
/** Determine if the placeholder content is pending */
|
|
917
|
+
isPending?: boolean;
|
|
918
|
+
/** Generated HTML template */
|
|
919
|
+
template?: string;
|
|
920
|
+
mode: Signal<PlaceholderMode>;
|
|
921
|
+
private readonly destroyRef;
|
|
922
|
+
/** template identify */
|
|
923
|
+
set id(value: string);
|
|
924
|
+
constructor();
|
|
925
|
+
/** @inheritdoc */
|
|
926
|
+
ngOnInit(): void;
|
|
927
|
+
ngAfterViewChecked(): void;
|
|
928
|
+
/** @inheritdoc */
|
|
929
|
+
ngOnDestroy(): void;
|
|
930
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderComponent, never>;
|
|
931
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlaceholderComponent, "o3r-placeholder", never, {
|
|
932
|
+
"id": {
|
|
933
|
+
"alias": "id";
|
|
934
|
+
"required": false;
|
|
935
|
+
};
|
|
936
|
+
}, {}, never, ["*"], true, never>;
|
|
937
|
+
}
|
|
942
938
|
/**
|
|
943
939
|
* @deprecated Will be removed in v16. Use {@link providePlaceholder} and import `PlaceholderComponent` directly instead.
|
|
944
940
|
*/
|
|
945
|
-
declare class PlaceholderModule {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
941
|
+
export declare class PlaceholderModule {
|
|
942
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderModule, never>;
|
|
943
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PlaceholderModule, never, [typeof i1.CommonModule, typeof i1$1.StoreModule, typeof PlaceholderTemplateStoreModule, typeof PlaceholderRequestStoreModule, typeof PlaceholderComponent], never>;
|
|
944
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<PlaceholderModule>;
|
|
949
945
|
}
|
|
950
946
|
/**
|
|
951
947
|
* Provide placeholder stores required by `PlaceholderComponent`.
|
|
952
948
|
*/
|
|
953
|
-
declare function providePlaceholder(): EnvironmentProviders;
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
export type { AvailableComponentsMessageContents, ChangeHighlightConfiguration, ComponentClassOutput, ComponentConfig, ComponentConfigOutput, ComponentConfigOutputs, ComponentContext, ComponentOutput, ComponentStructure, ComponentsDevtoolsServiceOptions, ComponentsMessageDataTypes, ConfigProperty, ConfigPropertyTypes, ConfigType, EntryCustomComponents, IsComponentSelectionAvailableMessage, NestedConfiguration, Ng, OtterLikeComponentInfo, PlaceholderData, PlaceholderMode, PlaceholderModeMessage, PlaceholderRequestModel, PlaceholderRequestReply, PlaceholderRequestState, PlaceholderRequestStateDetails, PlaceholderRequestStore, PlaceholderTemplateModel, PlaceholderTemplateState, PlaceholderTemplateStore, PlaceholderVariable, PlaceholdersMetadata, SelectedComponentInfoMessage, ToggleHighlightMessage, ToggleInspectorMessage };
|
|
957
|
-
//# sourceMappingURL=o3r-components.d.ts.map
|
|
949
|
+
export declare function providePlaceholder(): EnvironmentProviders;
|
|
950
|
+
export type { BaseContextOutput, Context, ContextInput, TemplateContext };
|
|
951
|
+
//# sourceMappingURL=o3r-components.d.ts.map
|