@dxs-ts/eveli-ide 0.0.2
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/LICENSE +201 -0
- package/build/favicon.png +0 -0
- package/build/index.d.ts +1170 -0
- package/build/index.js +125464 -0
- package/build/manifest.json +15 -0
- package/build/robots.txt +3 -0
- package/build/style.css +1 -0
- package/package.json +77 -0
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,1170 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
|
|
4
|
+
declare class DefaultStore implements Store {
|
|
5
|
+
private _config;
|
|
6
|
+
private _updateStarted;
|
|
7
|
+
private _iapSessionRefreshWindow;
|
|
8
|
+
private _defRef;
|
|
9
|
+
constructor(config: StoreConfig);
|
|
10
|
+
iapRefresh(): Promise<void>;
|
|
11
|
+
iapLogin(): boolean;
|
|
12
|
+
handle401(): Promise<void>;
|
|
13
|
+
fetch<T>(path: string, req?: RequestInit): Promise<T>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare interface ServiceErrorMsg {
|
|
17
|
+
id: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare interface ServiceErrorProps {
|
|
22
|
+
text: string;
|
|
23
|
+
status: number;
|
|
24
|
+
errors: ServiceErrorMsg[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare const siteTheme: Theme;
|
|
28
|
+
|
|
29
|
+
export declare namespace StencilClient {
|
|
30
|
+
export type PageId = string;
|
|
31
|
+
export type LinkId = string;
|
|
32
|
+
export type ArticleId = string;
|
|
33
|
+
export type WorkflowId = string;
|
|
34
|
+
export type LocaleId = string;
|
|
35
|
+
export type Locale = string;
|
|
36
|
+
export type LocalisedMarkdown = string;
|
|
37
|
+
export type LocalisedContent = string;
|
|
38
|
+
export type ReleaseId = string;
|
|
39
|
+
export type TemplateId = string;
|
|
40
|
+
export type LinkType = "internal" | "external" | "phone";
|
|
41
|
+
export type TemplateType = "page";
|
|
42
|
+
export interface Site {
|
|
43
|
+
name: string;
|
|
44
|
+
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
45
|
+
locales: Record<string, SiteLocale>;
|
|
46
|
+
pages: Record<PageId, Page>;
|
|
47
|
+
links: Record<LinkId, Link>;
|
|
48
|
+
articles: Record<ArticleId, Article>;
|
|
49
|
+
workflows: Record<WorkflowId, Workflow>;
|
|
50
|
+
releases: Record<ReleaseId, Release>;
|
|
51
|
+
templates: Record<TemplateId, Template>;
|
|
52
|
+
}
|
|
53
|
+
export interface SiteLocale {
|
|
54
|
+
id: LocaleId;
|
|
55
|
+
body: {
|
|
56
|
+
value: Locale;
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface LocaleMutator {
|
|
61
|
+
localeId: LocaleId;
|
|
62
|
+
value: string;
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface Page {
|
|
66
|
+
id: PageId;
|
|
67
|
+
created: string;
|
|
68
|
+
modified: string;
|
|
69
|
+
body: {
|
|
70
|
+
article: ArticleId;
|
|
71
|
+
locale: Locale;
|
|
72
|
+
content: LocalisedMarkdown;
|
|
73
|
+
devMode?: boolean;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface PageMutator {
|
|
77
|
+
pageId: PageId;
|
|
78
|
+
locale: Locale;
|
|
79
|
+
content: LocalisedContent;
|
|
80
|
+
devMode: boolean | undefined;
|
|
81
|
+
}
|
|
82
|
+
export interface Template {
|
|
83
|
+
id: TemplateId;
|
|
84
|
+
body: {
|
|
85
|
+
type: TemplateType;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
content: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export interface TemplateMutator {
|
|
92
|
+
id: TemplateId;
|
|
93
|
+
type: TemplateType;
|
|
94
|
+
name: string;
|
|
95
|
+
description: string;
|
|
96
|
+
content: string;
|
|
97
|
+
}
|
|
98
|
+
export interface Article {
|
|
99
|
+
id: ArticleId;
|
|
100
|
+
body: {
|
|
101
|
+
parentId?: ArticleId;
|
|
102
|
+
name: string;
|
|
103
|
+
order: number;
|
|
104
|
+
devMode?: boolean;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export interface ArticleMutator {
|
|
108
|
+
articleId: ArticleId;
|
|
109
|
+
parentId?: ArticleId;
|
|
110
|
+
name: string;
|
|
111
|
+
order: number;
|
|
112
|
+
links: LinkId[] | undefined;
|
|
113
|
+
workflows: WorkflowId[] | undefined;
|
|
114
|
+
devMode: boolean | undefined;
|
|
115
|
+
}
|
|
116
|
+
export interface Release {
|
|
117
|
+
id: string;
|
|
118
|
+
body: {
|
|
119
|
+
note?: string;
|
|
120
|
+
name: string;
|
|
121
|
+
created: string;
|
|
122
|
+
locales: LocaleReleaseItem[];
|
|
123
|
+
articles: ArticleReleaseItem[];
|
|
124
|
+
links: LinkReleaseItem[];
|
|
125
|
+
workflows: WorkflowReleaseItem[];
|
|
126
|
+
pages: PageReleaseItem[];
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export interface LinkReleaseItem extends ReleaseItem {
|
|
130
|
+
value: string;
|
|
131
|
+
contentType: string;
|
|
132
|
+
articles: string;
|
|
133
|
+
labels: LocaleLabel[];
|
|
134
|
+
}
|
|
135
|
+
export interface WorkflowReleaseItem extends ReleaseItem {
|
|
136
|
+
value: string;
|
|
137
|
+
articles: string[];
|
|
138
|
+
labels: LocaleLabel[];
|
|
139
|
+
}
|
|
140
|
+
export interface LocaleReleaseItem extends ReleaseItem {
|
|
141
|
+
value: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ArticleReleaseItem extends ReleaseItem {
|
|
144
|
+
name: string;
|
|
145
|
+
parentId?: string;
|
|
146
|
+
}
|
|
147
|
+
export interface PageReleaseItem extends ReleaseItem {
|
|
148
|
+
locale: string;
|
|
149
|
+
h1: string;
|
|
150
|
+
}
|
|
151
|
+
export interface ReleaseItem {
|
|
152
|
+
id: string;
|
|
153
|
+
hash: string;
|
|
154
|
+
}
|
|
155
|
+
export interface Link {
|
|
156
|
+
id: LinkId;
|
|
157
|
+
body: {
|
|
158
|
+
articles: ArticleId[];
|
|
159
|
+
contentType: LinkType;
|
|
160
|
+
value: string;
|
|
161
|
+
labels: LocaleLabel[];
|
|
162
|
+
devMode?: boolean;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export interface LocaleLabel {
|
|
166
|
+
locale: LocaleId;
|
|
167
|
+
labelValue: LocalisedContent;
|
|
168
|
+
}
|
|
169
|
+
export interface LinkMutator {
|
|
170
|
+
linkId: LinkId;
|
|
171
|
+
type: LinkType;
|
|
172
|
+
value: string;
|
|
173
|
+
articles: ArticleId[] | undefined;
|
|
174
|
+
labels: LocaleLabel[] | undefined;
|
|
175
|
+
devMode: boolean | undefined;
|
|
176
|
+
}
|
|
177
|
+
export interface Workflow {
|
|
178
|
+
id: WorkflowId;
|
|
179
|
+
body: {
|
|
180
|
+
articles: ArticleId[];
|
|
181
|
+
value: string;
|
|
182
|
+
labels: LocaleLabel[];
|
|
183
|
+
devMode?: boolean;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export interface WorkflowMutator {
|
|
187
|
+
workflowId: WorkflowId;
|
|
188
|
+
value: string;
|
|
189
|
+
articles: ArticleId[] | undefined;
|
|
190
|
+
labels: LocaleLabel[] | undefined;
|
|
191
|
+
devMode: boolean | undefined;
|
|
192
|
+
}
|
|
193
|
+
export interface FetchIntegration {
|
|
194
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
195
|
+
}
|
|
196
|
+
export interface Service {
|
|
197
|
+
getSite(): Promise<Site>;
|
|
198
|
+
getReleaseContent(releaseId: string): Promise<{}>;
|
|
199
|
+
create(): CreateBuilder;
|
|
200
|
+
delete(): DeleteBuilder;
|
|
201
|
+
update(): UpdateBuilder;
|
|
202
|
+
version(): Promise<VersionEntity>;
|
|
203
|
+
}
|
|
204
|
+
export interface VersionEntity {
|
|
205
|
+
version: string;
|
|
206
|
+
built: string;
|
|
207
|
+
}
|
|
208
|
+
export interface CreateArticle {
|
|
209
|
+
parentId?: ArticleId;
|
|
210
|
+
name: string;
|
|
211
|
+
order: number;
|
|
212
|
+
devMode: boolean | undefined;
|
|
213
|
+
}
|
|
214
|
+
export interface CreateLocale {
|
|
215
|
+
locale: Locale;
|
|
216
|
+
}
|
|
217
|
+
export interface CreatePage {
|
|
218
|
+
articleId: ArticleId;
|
|
219
|
+
locale: LocaleId;
|
|
220
|
+
content?: string;
|
|
221
|
+
devMode: boolean | undefined;
|
|
222
|
+
}
|
|
223
|
+
export interface CreateTemplate {
|
|
224
|
+
type: "page" | string;
|
|
225
|
+
name: string;
|
|
226
|
+
description: string;
|
|
227
|
+
content: string;
|
|
228
|
+
}
|
|
229
|
+
export interface CreateLink {
|
|
230
|
+
type: "internal" | "external" | string;
|
|
231
|
+
value: string;
|
|
232
|
+
labels: LocaleLabel[];
|
|
233
|
+
articles: ArticleId[];
|
|
234
|
+
devMode: boolean | undefined;
|
|
235
|
+
}
|
|
236
|
+
export interface CreateWorkflow {
|
|
237
|
+
value: string;
|
|
238
|
+
labels: LocaleLabel[];
|
|
239
|
+
articles: ArticleId[];
|
|
240
|
+
devMode: boolean | undefined;
|
|
241
|
+
}
|
|
242
|
+
export interface CreateRelease {
|
|
243
|
+
name: string;
|
|
244
|
+
note?: string;
|
|
245
|
+
created: string;
|
|
246
|
+
}
|
|
247
|
+
export interface CreateBuilder {
|
|
248
|
+
site(): Promise<Site>;
|
|
249
|
+
importData(init: string): Promise<void>;
|
|
250
|
+
release(init: CreateRelease): Promise<Release>;
|
|
251
|
+
locale(init: CreateLocale): Promise<SiteLocale>;
|
|
252
|
+
article(init: CreateArticle): Promise<Article>;
|
|
253
|
+
page(init: CreatePage): Promise<Page>;
|
|
254
|
+
link(init: CreateLink): Promise<Link>;
|
|
255
|
+
template(init: CreateTemplate): Promise<Template>;
|
|
256
|
+
workflow(init: CreateWorkflow): Promise<Workflow>;
|
|
257
|
+
}
|
|
258
|
+
export interface DeleteBuilder {
|
|
259
|
+
locale(id: LocaleId): Promise<void>;
|
|
260
|
+
article(id: ArticleId): Promise<void>;
|
|
261
|
+
page(id: PageId): Promise<void>;
|
|
262
|
+
link(id: LinkId): Promise<void>;
|
|
263
|
+
template(id: TemplateId): Promise<void>;
|
|
264
|
+
linkArticlePage(link: LinkId, article: ArticleId, locale: Locale): Promise<void>;
|
|
265
|
+
workflow(id: WorkflowId): Promise<void>;
|
|
266
|
+
workflowArticlePage(workflow: WorkflowId, article: ArticleId, locale: Locale): Promise<void>;
|
|
267
|
+
release(id: ReleaseId): Promise<void>;
|
|
268
|
+
}
|
|
269
|
+
export interface UpdateBuilder {
|
|
270
|
+
locale(article: LocaleMutator): Promise<SiteLocale>;
|
|
271
|
+
article(article: ArticleMutator): Promise<Article>;
|
|
272
|
+
pages(pages: PageMutator[]): Promise<Page[]>;
|
|
273
|
+
link(link: LinkMutator): Promise<Link>;
|
|
274
|
+
workflow(workflow: WorkflowMutator): Promise<Workflow>;
|
|
275
|
+
template(template: TemplateMutator): Promise<Template>;
|
|
276
|
+
}
|
|
277
|
+
export interface Store {
|
|
278
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
279
|
+
}
|
|
280
|
+
export interface StoreConfig {
|
|
281
|
+
url: string;
|
|
282
|
+
oidc?: string;
|
|
283
|
+
status?: string;
|
|
284
|
+
csrf?: {
|
|
285
|
+
key: string;
|
|
286
|
+
value: string;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
export interface ErrorMsg {
|
|
290
|
+
id: string;
|
|
291
|
+
value: string;
|
|
292
|
+
}
|
|
293
|
+
export interface ErrorProps {
|
|
294
|
+
text: string;
|
|
295
|
+
status: number;
|
|
296
|
+
errors: any[];
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export declare namespace StencilClient {
|
|
301
|
+
const mock: () => Service;
|
|
302
|
+
const service: (init: {
|
|
303
|
+
store?: Store;
|
|
304
|
+
config?: StoreConfig;
|
|
305
|
+
}) => Service;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export declare const StencilComposer: default_2.FC<StencilComposerProps>;
|
|
309
|
+
|
|
310
|
+
declare interface StencilComposerProps {
|
|
311
|
+
service: StencilClient.Service;
|
|
312
|
+
locked?: boolean;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export declare const stencilIntl: {
|
|
316
|
+
[key: string]: any;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
declare interface Store {
|
|
320
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare interface StoreConfig {
|
|
324
|
+
url: string;
|
|
325
|
+
oidc?: string;
|
|
326
|
+
status?: string;
|
|
327
|
+
csrf?: {
|
|
328
|
+
key: string;
|
|
329
|
+
value: string;
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
declare class StoreErrorImpl extends Error {
|
|
334
|
+
private _props;
|
|
335
|
+
constructor(props: ServiceErrorProps);
|
|
336
|
+
get name(): string;
|
|
337
|
+
get status(): number;
|
|
338
|
+
get errors(): ServiceErrorMsg[];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export declare namespace WrenchClient {
|
|
342
|
+
export declare type { TagId, FlowId, ServiceId, DecisionId, AstBodyType, Direction, ValueType, ProgramStatus, HitPolicy, AssociationType, ColumnExpressionType, FlowCommandMessageType, AstCommandValue, CommandsAndChanges, AstChangeset, ProgramMessage, AstCommand, TypeDef, AstBody, Headers, AstSource, ProgramAssociation, Site, Entity, EntityId, CreateBuilder, DeleteBuilder, AstDecision, AstDecisionRow, AstDecisionCell, AstFlow, FlowAstCommandMessage, FlowAstCommandRange, AstFlowInputType, AstFlowRoot, AstFlowTaskNode, AstFlowRefNode, AstFlowSwitchNode, AstFlowInputNode, AstFlowNode, AstService, AstTag, AstTagValue, AstBranch, ServiceErrorMsg, ServiceErrorProps, Service, Store, StoreError, StoreConfig, DebugRequest, DebugResponse, ProgramResult, ServiceResult, DecisionResult, DecisionLog, DecisionLogEntry, FlowProgramStepPointerType, FlowProgramStepRefType, FlowExecutionStatus, FlowResult, FlowResultLog, FlowResultErrorLog, Input, Output, CsvRow, VersionEntity, DiffRequest, DiffResponse, AstTagSummaryEntity, AstTagSummary };
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export declare namespace WrenchClient {
|
|
346
|
+
const StoreErrorImpl: typeof StoreErrorImpl;
|
|
347
|
+
const StoreImpl: typeof DefaultStore;
|
|
348
|
+
export class ServiceImpl implements WrenchClient.Service {
|
|
349
|
+
private _store;
|
|
350
|
+
private _branch;
|
|
351
|
+
private _headers;
|
|
352
|
+
constructor(store: WrenchClient.Store, branchName?: string);
|
|
353
|
+
withBranch(branchName?: string): WrenchClient.ServiceImpl;
|
|
354
|
+
get branch(): string | undefined;
|
|
355
|
+
create(): WrenchClient.CreateBuilder;
|
|
356
|
+
delete(): WrenchClient.DeleteBuilder;
|
|
357
|
+
update(id: string, body: WrenchClient.AstCommand[]): Promise<WrenchClient.Site>;
|
|
358
|
+
createAsset(name: string, desc: string | undefined, type: WrenchClient.AstBodyType | "SITE", body?: WrenchClient.AstCommand[]): Promise<WrenchClient.Site>;
|
|
359
|
+
ast(id: string, body: WrenchClient.AstCommand[]): Promise<WrenchClient.Entity<any>>;
|
|
360
|
+
getSite(): Promise<WrenchClient.Site>;
|
|
361
|
+
debug(debug: WrenchClient.DebugRequest): Promise<WrenchClient.DebugResponse>;
|
|
362
|
+
copy(id: string, name: string): Promise<WrenchClient.Site>;
|
|
363
|
+
version(): Promise<WrenchClient.VersionEntity>;
|
|
364
|
+
diff(input: WrenchClient.DiffRequest): Promise<WrenchClient.DiffResponse>;
|
|
365
|
+
summary(tagId: string): Promise<WrenchClient.AstTagSummary>;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export declare const WrenchComposer: default_2.FC<WrenchComposerProps>;
|
|
370
|
+
|
|
371
|
+
declare interface WrenchComposerProps {
|
|
372
|
+
service: WrenchClient.Service;
|
|
373
|
+
locked?: boolean;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export declare const wrenchIntl: {
|
|
377
|
+
[key: string]: any;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
export { }
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
declare namespace Burger {
|
|
384
|
+
const Provider: import("react").FC<AppProviderProps>;
|
|
385
|
+
const useApps: () => AppContextType;
|
|
386
|
+
const useDrawer: () => DrawerContextType;
|
|
387
|
+
const useTabs: () => TabsContextType;
|
|
388
|
+
const useSecondary: () => SecondaryContextType;
|
|
389
|
+
const Dialog: import("react").FC<StyledDialogProps>;
|
|
390
|
+
const Select: import("react").FC<StyledSelectProps<string>>;
|
|
391
|
+
const SelectMultiple: import("react").FC<{
|
|
392
|
+
multiline?: boolean;
|
|
393
|
+
open?: boolean;
|
|
394
|
+
helpers?: {
|
|
395
|
+
id: string;
|
|
396
|
+
value: string | React.ReactChild;
|
|
397
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
398
|
+
}[];
|
|
399
|
+
renderValue?: (values: string[]) => React.ReactNode;
|
|
400
|
+
} & StyledSelectProps<string[]>>;
|
|
401
|
+
const TextField: import("react").FC<StyledInputFieldProps<string>>;
|
|
402
|
+
const NumberField: import("react").FC<StyledInputFieldProps<number>>;
|
|
403
|
+
const FileField: import("react").FC<StyledInputFieldProps<string>>;
|
|
404
|
+
const DateField: import("react").FC<StyledInputFieldProps<string>>;
|
|
405
|
+
const DateTimeField: import("react").FC<StyledInputFieldProps<string>>;
|
|
406
|
+
const TreeItem: import("react").FC<StyledTreeItemProps>;
|
|
407
|
+
const TreeItemRoot: import("@emotion/styled").StyledComponent<import("@mui/lab/TreeItem").TreeItemProps & import("react").RefAttributes<HTMLLIElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
408
|
+
const TreeItemOption: import("react").FC<{
|
|
409
|
+
labelText: React.ReactNode;
|
|
410
|
+
nodeId: string;
|
|
411
|
+
color: string;
|
|
412
|
+
icon?: React.ElementType<import("@mui/material").SvgIconProps>;
|
|
413
|
+
onClick: () => void;
|
|
414
|
+
}>;
|
|
415
|
+
const SearchField: import("react").FC<StyledInputFieldProps<string>>;
|
|
416
|
+
const TransferList: import("react").FC<StyledTransferListProps>;
|
|
417
|
+
const PrimaryButton: import("react").FC<{
|
|
418
|
+
label: string;
|
|
419
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
420
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
421
|
+
disabled?: boolean;
|
|
422
|
+
}>;
|
|
423
|
+
const SecondaryButton: import("react").FC<{
|
|
424
|
+
label?: string;
|
|
425
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
426
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
427
|
+
disabled?: boolean;
|
|
428
|
+
}>;
|
|
429
|
+
const Checkbox: import("react").FC<{
|
|
430
|
+
checked: boolean;
|
|
431
|
+
onChange?: (newValue: boolean) => void;
|
|
432
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
433
|
+
}>;
|
|
434
|
+
const Switch: import("react").FC<StyledSwitchProps>;
|
|
435
|
+
const RadioButton: import("@emotion/styled").StyledComponent<import("@mui/material").RadioProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
436
|
+
const DateTimeFormatter: import("react").FC<DateTimeFormatProps>;
|
|
437
|
+
const ReleaseTable: import("react").FC<ReleaseTableProps>;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
declare namespace HdesClient {
|
|
442
|
+
const StoreErrorImpl: typeof StoreErrorImplAs;
|
|
443
|
+
const StoreImpl: typeof DefaultStore;
|
|
444
|
+
class ServiceImpl implements HdesClient.Service {
|
|
445
|
+
private _store;
|
|
446
|
+
private _branch;
|
|
447
|
+
private _headers;
|
|
448
|
+
constructor(store: HdesClient.Store, branchName?: string);
|
|
449
|
+
withBranch(branchName?: string): HdesClient.ServiceImpl;
|
|
450
|
+
get branch(): string | undefined;
|
|
451
|
+
create(): HdesClient.CreateBuilder;
|
|
452
|
+
delete(): HdesClient.DeleteBuilder;
|
|
453
|
+
update(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
|
|
454
|
+
createAsset(name: string, desc: string | undefined, type: HdesClient.AstBodyType | "SITE", body?: HdesClient.AstCommand[]): Promise<HdesClient.Site>;
|
|
455
|
+
ast(id: string, body: HdesClient.AstCommand[]): Promise<HdesClient.Entity<any>>;
|
|
456
|
+
getSite(): Promise<HdesClient.Site>;
|
|
457
|
+
debug(debug: HdesClient.DebugRequest): Promise<HdesClient.DebugResponse>;
|
|
458
|
+
copy(id: string, name: string): Promise<HdesClient.Site>;
|
|
459
|
+
version(): Promise<HdesClient.VersionEntity>;
|
|
460
|
+
diff(input: HdesClient.DiffRequest): Promise<HdesClient.DiffResponse>;
|
|
461
|
+
summary(tagId: string): Promise<HdesClient.AstTagSummary>;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
declare module 'react' {
|
|
467
|
+
interface CSSProperties {
|
|
468
|
+
'--tree-view-text-color'?: string;
|
|
469
|
+
'--tree-view-color'?: string;
|
|
470
|
+
'--tree-view-bg-color'?: string;
|
|
471
|
+
'--tree-view-hover-color'?: string;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
declare module '@mui/styles/defaultTheme' {
|
|
477
|
+
interface DefaultTheme extends Theme {
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
declare module '@mui/material/styles' {
|
|
483
|
+
interface Palette {
|
|
484
|
+
article: Palette['primary'];
|
|
485
|
+
page: Palette['primary'];
|
|
486
|
+
link: Palette['primary'];
|
|
487
|
+
workflow: Palette['primary'];
|
|
488
|
+
release: Palette['primary'];
|
|
489
|
+
locale: Palette['primary'];
|
|
490
|
+
import: Palette['primary'];
|
|
491
|
+
activeItem: Palette['primary'];
|
|
492
|
+
save: Palette['primary'];
|
|
493
|
+
explorer: Palette['primary'];
|
|
494
|
+
explorerItem: Palette['primary'];
|
|
495
|
+
mainContent: Palette['primary'];
|
|
496
|
+
uiElements: Palette['primary'];
|
|
497
|
+
table: Palette['primary'];
|
|
498
|
+
}
|
|
499
|
+
interface PaletteOptions {
|
|
500
|
+
article: Palette['primary'];
|
|
501
|
+
page: Palette['primary'];
|
|
502
|
+
link: Palette['primary'];
|
|
503
|
+
workflow: Palette['primary'];
|
|
504
|
+
release: Palette['primary'];
|
|
505
|
+
locale: Palette['primary'];
|
|
506
|
+
import: Palette['primary'];
|
|
507
|
+
activeItem: Palette['primary'];
|
|
508
|
+
save: Palette['primary'];
|
|
509
|
+
explorer: Palette['primary'];
|
|
510
|
+
explorerItem: Palette['primary'];
|
|
511
|
+
mainContent: Palette['primary'];
|
|
512
|
+
uiElements: Palette['primary'];
|
|
513
|
+
table: Palette['primary'];
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
declare namespace Composer {
|
|
519
|
+
interface SearchData {
|
|
520
|
+
values: readonly SearchDataEntry[];
|
|
521
|
+
filterLinks(keyword: string): readonly SearchResult[];
|
|
522
|
+
filterWorkflows(keyword: string): readonly SearchResult[];
|
|
523
|
+
filterArticles(keyword: string): readonly SearchResult[];
|
|
524
|
+
}
|
|
525
|
+
interface SearchDataEntry {
|
|
526
|
+
id: string;
|
|
527
|
+
type: "ARTICLE" | "LINK" | "WORKFLOW";
|
|
528
|
+
values: readonly SearchableValue[];
|
|
529
|
+
}
|
|
530
|
+
interface SearchResult {
|
|
531
|
+
source: SearchDataEntry;
|
|
532
|
+
matches: SearchableValue[];
|
|
533
|
+
}
|
|
534
|
+
interface SearchableValue {
|
|
535
|
+
id: string;
|
|
536
|
+
value: string;
|
|
537
|
+
type: "ARTICLE_NAME" | "ARTICLE_PAGE" | "WORKFLOW_NAME" | "WORKFLOW_LABEL" | "LINK_VALUE" | "LINK_LABEL";
|
|
538
|
+
}
|
|
539
|
+
type NavType = "ARTICLE_LINKS" | "ARTICLE_WORKFLOWS" | "ARTICLE_PAGES";
|
|
540
|
+
interface Nav {
|
|
541
|
+
type: NavType;
|
|
542
|
+
value?: string | null;
|
|
543
|
+
value2?: string | null;
|
|
544
|
+
}
|
|
545
|
+
interface TabData {
|
|
546
|
+
nav?: Nav;
|
|
547
|
+
withNav(nav: Nav): TabData;
|
|
548
|
+
}
|
|
549
|
+
interface Tab extends Burger.TabSession<TabData> {
|
|
550
|
+
}
|
|
551
|
+
interface PageUpdate {
|
|
552
|
+
saved: boolean;
|
|
553
|
+
origin: StencilClient.Page;
|
|
554
|
+
value: StencilClient.LocalisedContent;
|
|
555
|
+
withValue(value: StencilClient.LocalisedContent): PageUpdate;
|
|
556
|
+
}
|
|
557
|
+
interface SessionFilter {
|
|
558
|
+
locale?: StencilClient.LocaleId;
|
|
559
|
+
withLocale(locale?: StencilClient.LocaleId): SessionFilter;
|
|
560
|
+
}
|
|
561
|
+
interface Session {
|
|
562
|
+
site: StencilClient.Site;
|
|
563
|
+
pages: Record<StencilClient.PageId, PageUpdate>;
|
|
564
|
+
articles: ArticleView[];
|
|
565
|
+
workflows: WorkflowView[];
|
|
566
|
+
links: LinkView[];
|
|
567
|
+
search: SearchData;
|
|
568
|
+
filter: SessionFilter;
|
|
569
|
+
getArticleName(articleId: StencilClient.ArticleId): {
|
|
570
|
+
missing: boolean;
|
|
571
|
+
name: string;
|
|
572
|
+
};
|
|
573
|
+
getArticleView(articleId: StencilClient.ArticleId): ArticleView;
|
|
574
|
+
getLinkView(linkId: StencilClient.LinkId): LinkView;
|
|
575
|
+
getLinkName(linkId: StencilClient.LinkId): {
|
|
576
|
+
missing: boolean;
|
|
577
|
+
name: string;
|
|
578
|
+
};
|
|
579
|
+
getWorkflowView(workflowId: StencilClient.WorkflowId): WorkflowView;
|
|
580
|
+
getWorkflowName(workflowId: StencilClient.WorkflowId): {
|
|
581
|
+
missing: boolean;
|
|
582
|
+
name: string;
|
|
583
|
+
};
|
|
584
|
+
getArticlesForLocale(locale: StencilClient.LocaleId): StencilClient.Article[];
|
|
585
|
+
getArticlesForLocales(locales: StencilClient.LocaleId[]): StencilClient.Article[];
|
|
586
|
+
withPage(page: StencilClient.PageId): Session;
|
|
587
|
+
withPageValue(page: StencilClient.PageId, value: StencilClient.LocalisedContent): Session;
|
|
588
|
+
withoutPages(pages: StencilClient.PageId[]): Session;
|
|
589
|
+
withLocaleFilter(locale?: StencilClient.LocaleId): Session;
|
|
590
|
+
withSite(site: StencilClient.Site): Session;
|
|
591
|
+
}
|
|
592
|
+
interface Actions {
|
|
593
|
+
handleLoad(): Promise<void>;
|
|
594
|
+
handleLoadSite(): Promise<void>;
|
|
595
|
+
handlePageUpdate(page: StencilClient.PageId, value: StencilClient.LocalisedContent): void;
|
|
596
|
+
handlePageUpdateRemove(pages: StencilClient.PageId[]): void;
|
|
597
|
+
handleLocaleFilter(locale?: StencilClient.LocaleId): void;
|
|
598
|
+
}
|
|
599
|
+
interface ContextType {
|
|
600
|
+
session: Session;
|
|
601
|
+
actions: Actions;
|
|
602
|
+
service: StencilClient.Service;
|
|
603
|
+
}
|
|
604
|
+
interface ArticleView {
|
|
605
|
+
article: StencilClient.Article;
|
|
606
|
+
pages: PageView[];
|
|
607
|
+
canCreate: StencilClient.SiteLocale[];
|
|
608
|
+
links: LinkView[];
|
|
609
|
+
workflows: WorkflowView[];
|
|
610
|
+
children: Composer.ArticleView[];
|
|
611
|
+
displayOrder: number;
|
|
612
|
+
getPageById(pageId: StencilClient.PageId): PageView;
|
|
613
|
+
getPageByLocaleId(localeId: StencilClient.LocaleId): PageView;
|
|
614
|
+
findPageByLocaleId(localeId: StencilClient.LocaleId): PageView | undefined;
|
|
615
|
+
}
|
|
616
|
+
interface PageView {
|
|
617
|
+
title: string;
|
|
618
|
+
page: StencilClient.Page;
|
|
619
|
+
locale: StencilClient.SiteLocale;
|
|
620
|
+
}
|
|
621
|
+
interface LinkView {
|
|
622
|
+
link: StencilClient.Link;
|
|
623
|
+
labels: LabelView[];
|
|
624
|
+
}
|
|
625
|
+
interface WorkflowView {
|
|
626
|
+
workflow: StencilClient.Workflow;
|
|
627
|
+
labels: LabelView[];
|
|
628
|
+
}
|
|
629
|
+
interface LabelView {
|
|
630
|
+
label: StencilClient.LocaleLabel;
|
|
631
|
+
locale: StencilClient.SiteLocale;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
declare namespace Composer {
|
|
637
|
+
const createTab: (props: {
|
|
638
|
+
nav: Composer.Nav;
|
|
639
|
+
page?: StencilClient.Page;
|
|
640
|
+
}) => ImmutableTabData;
|
|
641
|
+
const ComposerContext: React.Context<ContextType>;
|
|
642
|
+
const useUnsaved: (article: StencilClient.Article) => boolean;
|
|
643
|
+
const useComposer: () => {
|
|
644
|
+
session: Session;
|
|
645
|
+
service: StencilClient.Service;
|
|
646
|
+
actions: Actions;
|
|
647
|
+
site: StencilClient.Site;
|
|
648
|
+
isArticleSaved: (article: StencilClient.Article) => boolean;
|
|
649
|
+
};
|
|
650
|
+
const useSite: () => StencilClient.Site;
|
|
651
|
+
const useSession: () => Session;
|
|
652
|
+
const useNav: () => {
|
|
653
|
+
handleInTab: (props: {
|
|
654
|
+
article: StencilClient.Article;
|
|
655
|
+
type: Composer.NavType;
|
|
656
|
+
locale?: string | null;
|
|
657
|
+
secondary?: boolean;
|
|
658
|
+
}) => void;
|
|
659
|
+
findTab: (article: StencilClient.Article) => Composer.Tab | undefined;
|
|
660
|
+
};
|
|
661
|
+
const Provider: React.FC<{
|
|
662
|
+
children: React.ReactNode;
|
|
663
|
+
service: StencilClient.Service;
|
|
664
|
+
}>;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare namespace StencilClient {
|
|
668
|
+
type PageId = string;
|
|
669
|
+
type LinkId = string;
|
|
670
|
+
type ArticleId = string;
|
|
671
|
+
type WorkflowId = string;
|
|
672
|
+
type LocaleId = string;
|
|
673
|
+
type Locale = string;
|
|
674
|
+
type LocalisedMarkdown = string;
|
|
675
|
+
type LocalisedContent = string;
|
|
676
|
+
type ReleaseId = string;
|
|
677
|
+
type TemplateId = string;
|
|
678
|
+
type LinkType = "internal" | "external" | "phone";
|
|
679
|
+
type TemplateType = "page";
|
|
680
|
+
interface Site {
|
|
681
|
+
name: string;
|
|
682
|
+
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
683
|
+
locales: Record<string, SiteLocale>;
|
|
684
|
+
pages: Record<PageId, Page>;
|
|
685
|
+
links: Record<LinkId, Link>;
|
|
686
|
+
articles: Record<ArticleId, Article>;
|
|
687
|
+
workflows: Record<WorkflowId, Workflow>;
|
|
688
|
+
releases: Record<ReleaseId, Release>;
|
|
689
|
+
templates: Record<TemplateId, Template>;
|
|
690
|
+
}
|
|
691
|
+
interface SiteLocale {
|
|
692
|
+
id: LocaleId;
|
|
693
|
+
body: {
|
|
694
|
+
value: Locale;
|
|
695
|
+
enabled: boolean;
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
interface LocaleMutator {
|
|
699
|
+
localeId: LocaleId;
|
|
700
|
+
value: string;
|
|
701
|
+
enabled: boolean;
|
|
702
|
+
}
|
|
703
|
+
interface Page {
|
|
704
|
+
id: PageId;
|
|
705
|
+
created: string;
|
|
706
|
+
modified: string;
|
|
707
|
+
body: {
|
|
708
|
+
article: ArticleId;
|
|
709
|
+
locale: Locale;
|
|
710
|
+
content: LocalisedMarkdown;
|
|
711
|
+
devMode?: boolean;
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
interface PageMutator {
|
|
715
|
+
pageId: PageId;
|
|
716
|
+
locale: Locale;
|
|
717
|
+
content: LocalisedContent;
|
|
718
|
+
devMode: boolean | undefined;
|
|
719
|
+
}
|
|
720
|
+
interface Template {
|
|
721
|
+
id: TemplateId;
|
|
722
|
+
body: {
|
|
723
|
+
type: TemplateType;
|
|
724
|
+
name: string;
|
|
725
|
+
description: string;
|
|
726
|
+
content: string;
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
interface TemplateMutator {
|
|
730
|
+
id: TemplateId;
|
|
731
|
+
type: TemplateType;
|
|
732
|
+
name: string;
|
|
733
|
+
description: string;
|
|
734
|
+
content: string;
|
|
735
|
+
}
|
|
736
|
+
interface Article {
|
|
737
|
+
id: ArticleId;
|
|
738
|
+
body: {
|
|
739
|
+
parentId?: ArticleId;
|
|
740
|
+
name: string;
|
|
741
|
+
order: number;
|
|
742
|
+
devMode?: boolean;
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
interface ArticleMutator {
|
|
746
|
+
articleId: ArticleId;
|
|
747
|
+
parentId?: ArticleId;
|
|
748
|
+
name: string;
|
|
749
|
+
order: number;
|
|
750
|
+
links: LinkId[] | undefined;
|
|
751
|
+
workflows: WorkflowId[] | undefined;
|
|
752
|
+
devMode: boolean | undefined;
|
|
753
|
+
}
|
|
754
|
+
interface Release {
|
|
755
|
+
id: string;
|
|
756
|
+
body: {
|
|
757
|
+
note?: string;
|
|
758
|
+
name: string;
|
|
759
|
+
created: string;
|
|
760
|
+
locales: LocaleReleaseItem[];
|
|
761
|
+
articles: ArticleReleaseItem[];
|
|
762
|
+
links: LinkReleaseItem[];
|
|
763
|
+
workflows: WorkflowReleaseItem[];
|
|
764
|
+
pages: PageReleaseItem[];
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
interface LinkReleaseItem extends ReleaseItem {
|
|
768
|
+
value: string;
|
|
769
|
+
contentType: string;
|
|
770
|
+
articles: string;
|
|
771
|
+
labels: LocaleLabel[];
|
|
772
|
+
}
|
|
773
|
+
interface WorkflowReleaseItem extends ReleaseItem {
|
|
774
|
+
value: string;
|
|
775
|
+
articles: string[];
|
|
776
|
+
labels: LocaleLabel[];
|
|
777
|
+
}
|
|
778
|
+
interface LocaleReleaseItem extends ReleaseItem {
|
|
779
|
+
value: string;
|
|
780
|
+
}
|
|
781
|
+
interface ArticleReleaseItem extends ReleaseItem {
|
|
782
|
+
name: string;
|
|
783
|
+
parentId?: string;
|
|
784
|
+
}
|
|
785
|
+
interface PageReleaseItem extends ReleaseItem {
|
|
786
|
+
locale: string;
|
|
787
|
+
h1: string;
|
|
788
|
+
}
|
|
789
|
+
interface ReleaseItem {
|
|
790
|
+
id: string;
|
|
791
|
+
hash: string;
|
|
792
|
+
}
|
|
793
|
+
interface Link {
|
|
794
|
+
id: LinkId;
|
|
795
|
+
body: {
|
|
796
|
+
articles: ArticleId[];
|
|
797
|
+
contentType: LinkType;
|
|
798
|
+
value: string;
|
|
799
|
+
labels: LocaleLabel[];
|
|
800
|
+
devMode?: boolean;
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
interface LocaleLabel {
|
|
804
|
+
locale: LocaleId;
|
|
805
|
+
labelValue: LocalisedContent;
|
|
806
|
+
}
|
|
807
|
+
interface LinkMutator {
|
|
808
|
+
linkId: LinkId;
|
|
809
|
+
type: LinkType;
|
|
810
|
+
value: string;
|
|
811
|
+
articles: ArticleId[] | undefined;
|
|
812
|
+
labels: LocaleLabel[] | undefined;
|
|
813
|
+
devMode: boolean | undefined;
|
|
814
|
+
}
|
|
815
|
+
interface Workflow {
|
|
816
|
+
id: WorkflowId;
|
|
817
|
+
body: {
|
|
818
|
+
articles: ArticleId[];
|
|
819
|
+
value: string;
|
|
820
|
+
labels: LocaleLabel[];
|
|
821
|
+
devMode?: boolean;
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
interface WorkflowMutator {
|
|
825
|
+
workflowId: WorkflowId;
|
|
826
|
+
value: string;
|
|
827
|
+
articles: ArticleId[] | undefined;
|
|
828
|
+
labels: LocaleLabel[] | undefined;
|
|
829
|
+
devMode: boolean | undefined;
|
|
830
|
+
}
|
|
831
|
+
interface FetchIntegration {
|
|
832
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
833
|
+
}
|
|
834
|
+
interface Service {
|
|
835
|
+
getSite(): Promise<Site>;
|
|
836
|
+
getReleaseContent(releaseId: string): Promise<{}>;
|
|
837
|
+
create(): CreateBuilder;
|
|
838
|
+
delete(): DeleteBuilder;
|
|
839
|
+
update(): UpdateBuilder;
|
|
840
|
+
version(): Promise<VersionEntity>;
|
|
841
|
+
}
|
|
842
|
+
interface VersionEntity {
|
|
843
|
+
version: string;
|
|
844
|
+
built: string;
|
|
845
|
+
}
|
|
846
|
+
interface CreateArticle {
|
|
847
|
+
parentId?: ArticleId;
|
|
848
|
+
name: string;
|
|
849
|
+
order: number;
|
|
850
|
+
devMode: boolean | undefined;
|
|
851
|
+
}
|
|
852
|
+
interface CreateLocale {
|
|
853
|
+
locale: Locale;
|
|
854
|
+
}
|
|
855
|
+
interface CreatePage {
|
|
856
|
+
articleId: ArticleId;
|
|
857
|
+
locale: LocaleId;
|
|
858
|
+
content?: string;
|
|
859
|
+
devMode: boolean | undefined;
|
|
860
|
+
}
|
|
861
|
+
interface CreateTemplate {
|
|
862
|
+
type: "page" | string;
|
|
863
|
+
name: string;
|
|
864
|
+
description: string;
|
|
865
|
+
content: string;
|
|
866
|
+
}
|
|
867
|
+
interface CreateLink {
|
|
868
|
+
type: "internal" | "external" | string;
|
|
869
|
+
value: string;
|
|
870
|
+
labels: LocaleLabel[];
|
|
871
|
+
articles: ArticleId[];
|
|
872
|
+
devMode: boolean | undefined;
|
|
873
|
+
}
|
|
874
|
+
interface CreateWorkflow {
|
|
875
|
+
value: string;
|
|
876
|
+
labels: LocaleLabel[];
|
|
877
|
+
articles: ArticleId[];
|
|
878
|
+
devMode: boolean | undefined;
|
|
879
|
+
}
|
|
880
|
+
interface CreateRelease {
|
|
881
|
+
name: string;
|
|
882
|
+
note?: string;
|
|
883
|
+
created: string;
|
|
884
|
+
}
|
|
885
|
+
interface CreateBuilder {
|
|
886
|
+
site(): Promise<Site>;
|
|
887
|
+
importData(init: string): Promise<void>;
|
|
888
|
+
release(init: CreateRelease): Promise<Release>;
|
|
889
|
+
locale(init: CreateLocale): Promise<SiteLocale>;
|
|
890
|
+
article(init: CreateArticle): Promise<Article>;
|
|
891
|
+
page(init: CreatePage): Promise<Page>;
|
|
892
|
+
link(init: CreateLink): Promise<Link>;
|
|
893
|
+
template(init: CreateTemplate): Promise<Template>;
|
|
894
|
+
workflow(init: CreateWorkflow): Promise<Workflow>;
|
|
895
|
+
}
|
|
896
|
+
interface DeleteBuilder {
|
|
897
|
+
locale(id: LocaleId): Promise<void>;
|
|
898
|
+
article(id: ArticleId): Promise<void>;
|
|
899
|
+
page(id: PageId): Promise<void>;
|
|
900
|
+
link(id: LinkId): Promise<void>;
|
|
901
|
+
template(id: TemplateId): Promise<void>;
|
|
902
|
+
linkArticlePage(link: LinkId, article: ArticleId, locale: Locale): Promise<void>;
|
|
903
|
+
workflow(id: WorkflowId): Promise<void>;
|
|
904
|
+
workflowArticlePage(workflow: WorkflowId, article: ArticleId, locale: Locale): Promise<void>;
|
|
905
|
+
release(id: ReleaseId): Promise<void>;
|
|
906
|
+
}
|
|
907
|
+
interface UpdateBuilder {
|
|
908
|
+
locale(article: LocaleMutator): Promise<SiteLocale>;
|
|
909
|
+
article(article: ArticleMutator): Promise<Article>;
|
|
910
|
+
pages(pages: PageMutator[]): Promise<Page[]>;
|
|
911
|
+
link(link: LinkMutator): Promise<Link>;
|
|
912
|
+
workflow(workflow: WorkflowMutator): Promise<Workflow>;
|
|
913
|
+
template(template: TemplateMutator): Promise<Template>;
|
|
914
|
+
}
|
|
915
|
+
interface Store {
|
|
916
|
+
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
917
|
+
}
|
|
918
|
+
interface StoreConfig {
|
|
919
|
+
url: string;
|
|
920
|
+
oidc?: string;
|
|
921
|
+
status?: string;
|
|
922
|
+
csrf?: {
|
|
923
|
+
key: string;
|
|
924
|
+
value: string;
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
interface ErrorMsg {
|
|
928
|
+
id: string;
|
|
929
|
+
value: string;
|
|
930
|
+
}
|
|
931
|
+
interface ErrorProps {
|
|
932
|
+
text: string;
|
|
933
|
+
status: number;
|
|
934
|
+
errors: any[];
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
declare namespace StencilClient {
|
|
940
|
+
const mock: () => Service;
|
|
941
|
+
const service: (init: {
|
|
942
|
+
store?: Store;
|
|
943
|
+
config?: StoreConfig;
|
|
944
|
+
}) => Service;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
declare namespace Composer {
|
|
949
|
+
interface Nav {
|
|
950
|
+
value?: string | null;
|
|
951
|
+
}
|
|
952
|
+
interface TabData {
|
|
953
|
+
nav?: Nav;
|
|
954
|
+
withNav(nav: Nav): TabData;
|
|
955
|
+
}
|
|
956
|
+
interface Tab extends Burger.TabSession<TabData> {
|
|
957
|
+
}
|
|
958
|
+
interface DebugSession {
|
|
959
|
+
error?: HdesClient.StoreError;
|
|
960
|
+
debug?: HdesClient.DebugResponse;
|
|
961
|
+
csv?: string;
|
|
962
|
+
json?: string;
|
|
963
|
+
selected: HdesClient.EntityId;
|
|
964
|
+
inputType: DebugInputType;
|
|
965
|
+
}
|
|
966
|
+
type DebugInputType = "CSV" | "JSON";
|
|
967
|
+
interface DebugSessions {
|
|
968
|
+
selected?: HdesClient.EntityId;
|
|
969
|
+
values: Record<HdesClient.EntityId, DebugSession>;
|
|
970
|
+
}
|
|
971
|
+
interface PageUpdate {
|
|
972
|
+
saved: boolean;
|
|
973
|
+
origin: HdesClient.Entity<any>;
|
|
974
|
+
value: HdesClient.AstCommand[];
|
|
975
|
+
withValue(value: HdesClient.AstCommand[]): PageUpdate;
|
|
976
|
+
}
|
|
977
|
+
interface Session {
|
|
978
|
+
site: HdesClient.Site;
|
|
979
|
+
pages: Record<HdesClient.EntityId, PageUpdate>;
|
|
980
|
+
debug: DebugSessions;
|
|
981
|
+
branchName?: string;
|
|
982
|
+
getDecision(decisionName: string): undefined | HdesClient.Entity<HdesClient.AstDecision>;
|
|
983
|
+
getFlow(flowName: string): undefined | HdesClient.Entity<HdesClient.AstFlow>;
|
|
984
|
+
getService(serviceName: string): undefined | HdesClient.Entity<HdesClient.AstService>;
|
|
985
|
+
getEntity(id: HdesClient.EntityId): undefined | HdesClient.Entity<any>;
|
|
986
|
+
withDebug(page: DebugSession): Session;
|
|
987
|
+
withPage(page: HdesClient.EntityId): Session;
|
|
988
|
+
withPageValue(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): Session;
|
|
989
|
+
withoutPages(pages: HdesClient.EntityId[]): Session;
|
|
990
|
+
withBranch(branchName?: string): Session;
|
|
991
|
+
withSite(site: HdesClient.Site): Session;
|
|
992
|
+
}
|
|
993
|
+
interface Actions {
|
|
994
|
+
handleLoad(): Promise<void>;
|
|
995
|
+
handleLoadSite(site?: HdesClient.Site): Promise<void>;
|
|
996
|
+
handleDebugUpdate(debug: DebugSession): void;
|
|
997
|
+
handlePageUpdate(page: HdesClient.EntityId, value: HdesClient.AstCommand[]): void;
|
|
998
|
+
handlePageUpdateRemove(pages: HdesClient.EntityId[]): void;
|
|
999
|
+
handleBranchUpdate(branchName?: string): void;
|
|
1000
|
+
}
|
|
1001
|
+
interface ContextType {
|
|
1002
|
+
session: Session;
|
|
1003
|
+
actions: Actions;
|
|
1004
|
+
service: HdesClient.Service;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
declare namespace Composer {
|
|
1010
|
+
const createTab: (props: {
|
|
1011
|
+
nav: Composer.Nav;
|
|
1012
|
+
page?: HdesClient.Entity<any>;
|
|
1013
|
+
}) => ImmutableTabData;
|
|
1014
|
+
const ComposerContext: React.Context<ContextType>;
|
|
1015
|
+
const useUnsaved: (entity: HdesClient.Entity<any>) => boolean;
|
|
1016
|
+
const useComposer: () => {
|
|
1017
|
+
session: Session;
|
|
1018
|
+
service: HdesClient.Service;
|
|
1019
|
+
actions: Actions;
|
|
1020
|
+
site: HdesClient.Site;
|
|
1021
|
+
isArticleSaved: (entity: HdesClient.Entity<any>) => boolean;
|
|
1022
|
+
};
|
|
1023
|
+
const useSite: () => HdesClient.Site;
|
|
1024
|
+
const useBranchName: () => string | undefined;
|
|
1025
|
+
const useSession: () => Session;
|
|
1026
|
+
const useNav: () => {
|
|
1027
|
+
handleInTab: (props: {
|
|
1028
|
+
article: HdesClient.Entity<any>;
|
|
1029
|
+
}) => void;
|
|
1030
|
+
findTab: (article: HdesClient.Entity<any>) => Composer.Tab | undefined;
|
|
1031
|
+
};
|
|
1032
|
+
const useDebug: () => {
|
|
1033
|
+
handleDebugInit: (selected: HdesClient.EntityId) => void;
|
|
1034
|
+
};
|
|
1035
|
+
const Provider: React.FC<{
|
|
1036
|
+
children: React.ReactNode;
|
|
1037
|
+
service: HdesClient.Service;
|
|
1038
|
+
}>;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
declare namespace Decision {
|
|
1042
|
+
const Table: import("react").FC<{
|
|
1043
|
+
ast: import("../../client/api").AstDecision;
|
|
1044
|
+
renderHeader: (props: import("./DecisionTable").RenderHeaderProps) => React.ReactNode;
|
|
1045
|
+
renderRow: (props: import("./DecisionTable").RenderRowProps) => React.ReactNode;
|
|
1046
|
+
renderCell: (props: import("./DecisionTable").RenderCellProps) => React.ReactNode;
|
|
1047
|
+
}>;
|
|
1048
|
+
const Cell: import("react").FC<{
|
|
1049
|
+
row: import("../../client/api").AstDecisionRow;
|
|
1050
|
+
header: import("../../client/api").TypeDef;
|
|
1051
|
+
cell: import("../../client/api").AstDecisionCell;
|
|
1052
|
+
onClick: () => void;
|
|
1053
|
+
}>;
|
|
1054
|
+
const Header: import("react").FC<{
|
|
1055
|
+
ast: import("../../client/api").AstDecision;
|
|
1056
|
+
headers: import("../../client/api").TypeDef[];
|
|
1057
|
+
children: React.ReactNode;
|
|
1058
|
+
onClick: (header: import("../../client/api").TypeDef) => void;
|
|
1059
|
+
}>;
|
|
1060
|
+
const Row: import("react").FC<{
|
|
1061
|
+
row: import("../../client/api").AstDecisionRow;
|
|
1062
|
+
headers: import("../../client/api").TypeDef[];
|
|
1063
|
+
renderCell: (props: {
|
|
1064
|
+
row: import("../../client/api").AstDecisionRow;
|
|
1065
|
+
header: import("../../client/api").TypeDef;
|
|
1066
|
+
cell: import("../../client/api").AstDecisionCell;
|
|
1067
|
+
}) => React.ReactNode;
|
|
1068
|
+
}>;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
declare namespace Vis {
|
|
1073
|
+
interface Model {
|
|
1074
|
+
nodes: Node[];
|
|
1075
|
+
edges: Edge[];
|
|
1076
|
+
visited: string[];
|
|
1077
|
+
}
|
|
1078
|
+
interface Node {
|
|
1079
|
+
id: string;
|
|
1080
|
+
label: string;
|
|
1081
|
+
shape: 'circle' | 'diamond' | 'box' | undefined;
|
|
1082
|
+
parents: string[];
|
|
1083
|
+
color?: string;
|
|
1084
|
+
group?: string;
|
|
1085
|
+
externalId?: string;
|
|
1086
|
+
body?: any;
|
|
1087
|
+
widthConstraint?: {
|
|
1088
|
+
maximum: number;
|
|
1089
|
+
minimum: number;
|
|
1090
|
+
};
|
|
1091
|
+
x: number;
|
|
1092
|
+
y: number;
|
|
1093
|
+
}
|
|
1094
|
+
interface Edge {
|
|
1095
|
+
from: string;
|
|
1096
|
+
to: string;
|
|
1097
|
+
}
|
|
1098
|
+
interface InitProps {
|
|
1099
|
+
model?: Model;
|
|
1100
|
+
options: any;
|
|
1101
|
+
events: {
|
|
1102
|
+
onClick: (id: string) => void;
|
|
1103
|
+
onDoubleClick: (id: string) => void;
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
declare namespace Vis {
|
|
1110
|
+
const create: (init: InitProps) => React.ReactElement;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
declare namespace GraphAPI {
|
|
1115
|
+
const create: (props: {
|
|
1116
|
+
fl: Client.AstFlow;
|
|
1117
|
+
models: Client.Site;
|
|
1118
|
+
}) => Vis.Model;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
declare namespace BurgerStyles {
|
|
1123
|
+
const Dialog: import("react").FC<StyledDialogProps>;
|
|
1124
|
+
const Select: import("react").FC<StyledSelectProps<string>>;
|
|
1125
|
+
const SelectMultiple: import("react").FC<{
|
|
1126
|
+
multiline?: boolean;
|
|
1127
|
+
open?: boolean;
|
|
1128
|
+
helpers?: {
|
|
1129
|
+
id: string;
|
|
1130
|
+
value: string | React.ReactChild;
|
|
1131
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
1132
|
+
}[];
|
|
1133
|
+
renderValue?: (values: string[]) => React.ReactNode;
|
|
1134
|
+
} & StyledSelectProps<string[]>>;
|
|
1135
|
+
const TextField: import("react").FC<StyledInputFieldProps<string>>;
|
|
1136
|
+
const NumberField: import("react").FC<StyledInputFieldProps<number>>;
|
|
1137
|
+
const FileField: import("react").FC<StyledInputFieldProps<string>>;
|
|
1138
|
+
const DateField: import("react").FC<StyledInputFieldProps<string>>;
|
|
1139
|
+
const DateTimeField: import("react").FC<StyledInputFieldProps<string>>;
|
|
1140
|
+
const TreeItem: import("react").FC<StyledTreeItemProps>;
|
|
1141
|
+
const TreeItemRoot: import("@emotion/styled").StyledComponent<import("@mui/lab/TreeItem").TreeItemProps & import("react").RefAttributes<HTMLLIElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
1142
|
+
const TreeItemOption: import("react").FC<{
|
|
1143
|
+
labelText: React.ReactNode;
|
|
1144
|
+
nodeId: string;
|
|
1145
|
+
color: string;
|
|
1146
|
+
icon?: React.ElementType<import("@mui/material").SvgIconProps>;
|
|
1147
|
+
onClick: () => void;
|
|
1148
|
+
}>;
|
|
1149
|
+
const SearchField: import("react").FC<StyledInputFieldProps<string>>;
|
|
1150
|
+
const TransferList: import("react").FC<StyledTransferListProps>;
|
|
1151
|
+
const PrimaryButton: import("react").FC<{
|
|
1152
|
+
label: string;
|
|
1153
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
1154
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
1155
|
+
disabled?: boolean;
|
|
1156
|
+
}>;
|
|
1157
|
+
const SecondaryButton: import("react").FC<{
|
|
1158
|
+
label?: string;
|
|
1159
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
1160
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
1161
|
+
disabled?: boolean;
|
|
1162
|
+
}>;
|
|
1163
|
+
const Checkbox: import("react").FC<{
|
|
1164
|
+
checked: boolean;
|
|
1165
|
+
onChange?: (newValue: boolean) => void;
|
|
1166
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
1167
|
+
}>;
|
|
1168
|
+
const Switch: import("react").FC<StyledSwitchProps>;
|
|
1169
|
+
const RadioButton: import("@emotion/styled").StyledComponent<import("@mui/material").RadioProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
1170
|
+
}
|