@types/scrivito 1.22.0 → 1.22.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.
- scrivito/README.md +1 -1
- scrivito/index.d.ts +78 -78
- scrivito/package.json +4 -3
scrivito/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for scrivito (https://www.scrivito.com/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrivito.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 03 Apr 2023 20:03:17 GMT
|
|
12
12
|
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
scrivito/index.d.ts
CHANGED
|
@@ -29,15 +29,15 @@ type Attribute =
|
|
|
29
29
|
| "widgetlist";
|
|
30
30
|
|
|
31
31
|
interface AttributeOptions {
|
|
32
|
-
values?: string[];
|
|
33
|
-
only?: string | string[];
|
|
32
|
+
values?: string[] | undefined;
|
|
33
|
+
only?: string | string[] | undefined;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
type AttributeWithOptions = [Attribute, AttributeOptions];
|
|
37
37
|
|
|
38
38
|
interface OptimizeFor {
|
|
39
|
-
width?: number | string;
|
|
40
|
-
height?: number | string;
|
|
39
|
+
width?: number | string | undefined;
|
|
40
|
+
height?: number | string | undefined;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
interface OptimizeForFit extends OptimizeFor {
|
|
@@ -57,7 +57,7 @@ type OptimizeDefinition = OptimizeForFit | OptimizeForResize;
|
|
|
57
57
|
|
|
58
58
|
interface UploadOptions {
|
|
59
59
|
filename: string;
|
|
60
|
-
contentType?: string;
|
|
60
|
+
contentType?: string | undefined;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export class Binary {
|
|
@@ -65,7 +65,7 @@ export class Binary {
|
|
|
65
65
|
static upload(source: Blob | File, options: UploadOptions): FutureBinary;
|
|
66
66
|
contentLength(): number;
|
|
67
67
|
contentType(): string;
|
|
68
|
-
copy(options?: { filename?: string; contentType?: string }): FutureBinary;
|
|
68
|
+
copy(options?: { filename?: string | undefined; contentType?: string | undefined }): FutureBinary;
|
|
69
69
|
filename(): string;
|
|
70
70
|
isPrivate(): boolean;
|
|
71
71
|
metadata(): MetadataCollection;
|
|
@@ -85,13 +85,13 @@ export class FutureBinary {
|
|
|
85
85
|
*/
|
|
86
86
|
interface CSSImageStyleBackgroundProps {
|
|
87
87
|
image: Obj | Binary | string;
|
|
88
|
-
attachment?: React.CSSProperties["backgroundAttachment"];
|
|
89
|
-
clip?: React.CSSProperties["backgroundClip"];
|
|
90
|
-
color?: React.CSSProperties["backgroundColor"];
|
|
91
|
-
origin?: React.CSSProperties["backgroundOrigin"];
|
|
92
|
-
position?: React.CSSProperties["backgroundPosition"];
|
|
93
|
-
repeat?: React.CSSProperties["backgroundRepeat"];
|
|
94
|
-
size?: React.CSSProperties["backgroundSize"];
|
|
88
|
+
attachment?: React.CSSProperties["backgroundAttachment"] | undefined;
|
|
89
|
+
clip?: React.CSSProperties["backgroundClip"] | undefined;
|
|
90
|
+
color?: React.CSSProperties["backgroundColor"] | undefined;
|
|
91
|
+
origin?: React.CSSProperties["backgroundOrigin"] | undefined;
|
|
92
|
+
position?: React.CSSProperties["backgroundPosition"] | undefined;
|
|
93
|
+
repeat?: React.CSSProperties["backgroundRepeat"] | undefined;
|
|
94
|
+
size?: React.CSSProperties["backgroundSize"] | undefined;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
type CSSPropsWithoutBackground = Omit<
|
|
@@ -110,37 +110,37 @@ interface BackgroundImageBackgroundProp {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
interface BackgroundImageTagProps {
|
|
113
|
-
tag?: string;
|
|
113
|
+
tag?: string | undefined;
|
|
114
114
|
style: CSSPropsWithoutBackground & BackgroundImageBackgroundProp;
|
|
115
|
-
className?: string;
|
|
115
|
+
className?: string | undefined;
|
|
116
116
|
}
|
|
117
117
|
export class BackgroundImageTag extends React.Component<BackgroundImageTagProps, any> {}
|
|
118
118
|
|
|
119
119
|
interface ChildListTagProps {
|
|
120
|
-
parent?: Obj;
|
|
121
|
-
tag?: string;
|
|
122
|
-
renderChild?: (child: Obj) => React.ReactElement;
|
|
123
|
-
className?: string;
|
|
120
|
+
parent?: Obj | undefined;
|
|
121
|
+
tag?: string | undefined;
|
|
122
|
+
renderChild?: ((child: Obj) => React.ReactElement) | undefined;
|
|
123
|
+
className?: string | undefined;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export class ChildListTag extends React.Component<ChildListTagProps, any> {}
|
|
127
127
|
|
|
128
128
|
interface ContentTagProps extends Omit<React.AllHTMLAttributes<any>, "content"> {
|
|
129
129
|
attribute: string;
|
|
130
|
-
content?: Obj | Widget;
|
|
131
|
-
tag?: string;
|
|
130
|
+
content?: Obj | Widget | undefined;
|
|
131
|
+
tag?: string | undefined;
|
|
132
132
|
page?: any;
|
|
133
|
-
widgetProps?: object;
|
|
133
|
+
widgetProps?: object | undefined;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export class ContentTag extends React.Component<ContentTagProps, any> {}
|
|
137
137
|
|
|
138
138
|
export class CurrentPage extends React.Component<{}, any> {}
|
|
139
139
|
|
|
140
|
-
interface ImageTagProps extends React.HTMLAttributes<HTMLImageElement> {
|
|
141
|
-
attribute?: string;
|
|
140
|
+
interface ImageTagProps extends Omit<React.HTMLAttributes<HTMLImageElement>, 'content'> {
|
|
141
|
+
attribute?: string | undefined;
|
|
142
142
|
content: Binary | Obj | Widget;
|
|
143
|
-
alt?: string;
|
|
143
|
+
alt?: string | undefined;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
export class ImageTag extends React.Component<ImageTagProps, any> {}
|
|
@@ -149,8 +149,8 @@ export class InPlaceEditingOff extends React.Component<any, any> {}
|
|
|
149
149
|
|
|
150
150
|
interface LinkTagProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
151
151
|
to: Obj | Link;
|
|
152
|
-
params?: object;
|
|
153
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
152
|
+
params?: object | undefined;
|
|
153
|
+
onClick?: ((event: React.MouseEvent) => void) | undefined;
|
|
154
154
|
}
|
|
155
155
|
export class LinkTag extends React.Component<LinkTagProps, any> {}
|
|
156
156
|
|
|
@@ -159,7 +159,7 @@ export class NotFoundErrorPage extends React.Component<{}, any> {}
|
|
|
159
159
|
export class RestoreInPlaceEditing extends React.Component<{}, any> {}
|
|
160
160
|
|
|
161
161
|
interface WidgetTagProps extends React.HTMLAttributes<any> {
|
|
162
|
-
tag?: string;
|
|
162
|
+
tag?: string | undefined;
|
|
163
163
|
[key: string]: any;
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -173,17 +173,17 @@ type Priority = "foreground" | "background";
|
|
|
173
173
|
|
|
174
174
|
interface ConfigOptions {
|
|
175
175
|
tenant: string;
|
|
176
|
-
homepage?: () => Obj | null;
|
|
177
|
-
origin?: string;
|
|
178
|
-
routingBasePath?: string;
|
|
179
|
-
visitorAuthentication?: boolean;
|
|
176
|
+
homepage?: (() => Obj | null) | undefined;
|
|
177
|
+
origin?: string | undefined;
|
|
178
|
+
routingBasePath?: string | undefined;
|
|
179
|
+
visitorAuthentication?: boolean | undefined;
|
|
180
180
|
// Hard to type
|
|
181
|
-
constraintsValidation?: (constraints: any) => any;
|
|
182
|
-
endpoint?: string;
|
|
183
|
-
priority?: Priority;
|
|
184
|
-
adoptUi?: boolean;
|
|
185
|
-
baseUrlForSite?: (siteId: string) => string | undefined;
|
|
186
|
-
siteForUrl?: (url: string) => { siteId: string; baseUrl: string } | undefined;
|
|
181
|
+
constraintsValidation?: ((constraints: any) => any) | undefined;
|
|
182
|
+
endpoint?: string | undefined;
|
|
183
|
+
priority?: Priority | undefined;
|
|
184
|
+
adoptUi?: boolean | undefined;
|
|
185
|
+
baseUrlForSite?: ((siteId: string) => string | undefined) | undefined;
|
|
186
|
+
siteForUrl?: ((url: string) => { siteId: string; baseUrl: string } | undefined) | undefined;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
@@ -196,12 +196,12 @@ interface AttributeValue {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
interface AttributeProps {
|
|
199
|
-
title?: string;
|
|
200
|
-
description?: string;
|
|
201
|
-
values?: AttributeValue[];
|
|
199
|
+
title?: string | undefined;
|
|
200
|
+
description?: string | undefined;
|
|
201
|
+
values?: AttributeValue[] | undefined;
|
|
202
202
|
options?: {
|
|
203
203
|
toolbar: string[];
|
|
204
|
-
};
|
|
204
|
+
} | undefined;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
interface EditingConfigAttributes {
|
|
@@ -211,15 +211,15 @@ interface EditingConfigAttributes {
|
|
|
211
211
|
// TODO talk about this with krishan
|
|
212
212
|
interface PropertiesGroup {
|
|
213
213
|
title: string;
|
|
214
|
-
component?: string;
|
|
215
|
-
properties?: string[];
|
|
214
|
+
component?: string | undefined;
|
|
215
|
+
properties?: string[] | undefined;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
export type ValidationReturnType = { message: string; severity: string } | string | undefined;
|
|
219
219
|
|
|
220
220
|
type AttributeValidationCallback = (
|
|
221
221
|
current: any,
|
|
222
|
-
options?: { obj?: Obj; widget?: Widget; content: any; name: string },
|
|
222
|
+
options?: { obj?: Obj | undefined; widget?: Widget | undefined; content: any; name: string },
|
|
223
223
|
) => ValidationReturnType;
|
|
224
224
|
|
|
225
225
|
export type AttributeBasedValidation = [string, AttributeValidationCallback];
|
|
@@ -229,37 +229,37 @@ export type ClassBasedValidation = (target: Widget | Obj) => ValidationReturnTyp
|
|
|
229
229
|
export type Validation = AttributeBasedValidation | ClassBasedValidation;
|
|
230
230
|
|
|
231
231
|
interface EditingConfig {
|
|
232
|
-
title?: string;
|
|
233
|
-
thumbnail?: string;
|
|
234
|
-
description?: string;
|
|
235
|
-
titleForContent?: (instance: Obj | Widget) => string | void;
|
|
236
|
-
descriptionForContent?: (instance: Obj | Widget) => string;
|
|
237
|
-
attributes?: EditingConfigAttributes;
|
|
238
|
-
properties?: string[];
|
|
239
|
-
propertiesGroups?: PropertiesGroup[];
|
|
240
|
-
hideInSelectionDialogs?: boolean;
|
|
241
|
-
initialContent?: Record<string, any
|
|
242
|
-
initialize?: (instance: Obj) => void;
|
|
243
|
-
initializeCopy?: (originalInstance: Obj) => void;
|
|
244
|
-
validations?: Validation[];
|
|
232
|
+
title?: string | undefined;
|
|
233
|
+
thumbnail?: string | undefined;
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
titleForContent?: ((instance: Obj | Widget) => string | void) | undefined;
|
|
236
|
+
descriptionForContent?: ((instance: Obj | Widget) => string) | undefined;
|
|
237
|
+
attributes?: EditingConfigAttributes | undefined;
|
|
238
|
+
properties?: string[] | undefined;
|
|
239
|
+
propertiesGroups?: PropertiesGroup[] | undefined;
|
|
240
|
+
hideInSelectionDialogs?: boolean | undefined;
|
|
241
|
+
initialContent?: Record<string, any> | undefined;
|
|
242
|
+
initialize?: ((instance: Obj) => void) | undefined;
|
|
243
|
+
initializeCopy?: ((originalInstance: Obj) => void) | undefined;
|
|
244
|
+
validations?: Validation[] | undefined;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* Link definitions
|
|
249
249
|
*/
|
|
250
250
|
interface InternalLinkAttributes {
|
|
251
|
-
hash?: string;
|
|
251
|
+
hash?: string | undefined;
|
|
252
252
|
obj: Obj;
|
|
253
|
-
query?: string;
|
|
254
|
-
rel?: string;
|
|
255
|
-
target?: string;
|
|
256
|
-
title?: string;
|
|
253
|
+
query?: string | undefined;
|
|
254
|
+
rel?: string | undefined;
|
|
255
|
+
target?: string | undefined;
|
|
256
|
+
title?: string | undefined;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
interface ExternalLinkAttributes {
|
|
260
|
-
rel?: string;
|
|
261
|
-
target?: string;
|
|
262
|
-
title?: string;
|
|
260
|
+
rel?: string | undefined;
|
|
261
|
+
target?: string | undefined;
|
|
262
|
+
title?: string | undefined;
|
|
263
263
|
url: string;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -456,8 +456,8 @@ interface SiteContext {
|
|
|
456
456
|
|
|
457
457
|
interface ObjClassOptions {
|
|
458
458
|
attributes: Record<string, Attribute | AttributeWithOptions>;
|
|
459
|
-
extractTextAttributes?: string[];
|
|
460
|
-
extend?: ObjClass;
|
|
459
|
+
extractTextAttributes?: string[] | undefined;
|
|
460
|
+
extend?: ObjClass | undefined;
|
|
461
461
|
onlyChildren: string | string[];
|
|
462
462
|
onlyInside: string | string[];
|
|
463
463
|
}
|
|
@@ -488,9 +488,9 @@ export class Widget {
|
|
|
488
488
|
|
|
489
489
|
interface WidgetClassOptions {
|
|
490
490
|
attributes: Record<string, Attribute | AttributeWithOptions>;
|
|
491
|
-
extractTextAttributes?: string[];
|
|
492
|
-
extend?: WidgetClass;
|
|
493
|
-
onlyInside?: string | string[];
|
|
491
|
+
extractTextAttributes?: string[] | undefined;
|
|
492
|
+
extend?: WidgetClass | undefined;
|
|
493
|
+
onlyInside?: string | string[] | undefined;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
type WidgetClass = typeof Widget;
|
|
@@ -541,12 +541,12 @@ interface MenuPosition {
|
|
|
541
541
|
interface MenuInsertParameters {
|
|
542
542
|
id: string;
|
|
543
543
|
title: string;
|
|
544
|
-
icon?: string;
|
|
545
|
-
description?: string;
|
|
546
|
-
position?: MenuPosition;
|
|
547
|
-
group?: string;
|
|
544
|
+
icon?: string | undefined;
|
|
545
|
+
description?: string | undefined;
|
|
546
|
+
position?: MenuPosition | undefined;
|
|
547
|
+
group?: string | undefined;
|
|
548
548
|
onClick: () => void;
|
|
549
|
-
enabled?: boolean;
|
|
549
|
+
enabled?: boolean | undefined;
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
type MenuModifyParameters = Pick<MenuInsertParameters, "id" | "group" | "icon" | "position" | "title">;
|
|
@@ -583,7 +583,7 @@ export function getClass(name: string): ObjClass | WidgetClass | null;
|
|
|
583
583
|
export function isEditorLoggedIn(): boolean;
|
|
584
584
|
export function isInPlaceEditingActive(): boolean;
|
|
585
585
|
export function load<T>(functionToLoad: () => T): Promise<T>;
|
|
586
|
-
export function navigateTo(target: (() => Obj | Link) | Obj | Link, options?: { hash?: string; params?: any }): void;
|
|
586
|
+
export function navigateTo(target: (() => Obj | Link) | Obj | Link, options?: { hash?: string | undefined; params?: any }): void;
|
|
587
587
|
export function openDialog(name: string): void;
|
|
588
588
|
export function preload(preloadDump: any): Promise<{ dumpLoaded: boolean }>;
|
|
589
589
|
export function provideComponent(className: string, component: WidgetComponent | ObjComponent): void;
|
|
@@ -601,7 +601,7 @@ export function renderPage(page: Obj, renderFunction: () => void): Promise<{ res
|
|
|
601
601
|
export function setVisitorIdToken(idToken: string): void;
|
|
602
602
|
export function updateContent(): void;
|
|
603
603
|
export function updateMenuExtensions(): void;
|
|
604
|
-
export function urlFor(target: Obj | Binary | Link, options?: { query?: string; hash?: string }): string;
|
|
604
|
+
export function urlFor(target: Obj | Binary | Link, options?: { query?: string | undefined; hash?: string | undefined }): string;
|
|
605
605
|
export function useHistory(history: History): void;
|
|
606
606
|
export function validationResultsFor(model: Obj | Widget, attribute: string): ValidationResult[];
|
|
607
607
|
export function isComparisonActive(): boolean;
|
scrivito/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/scrivito",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "TypeScript definitions for scrivito",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scrivito",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"contributors": [
|
|
7
8
|
{
|
|
@@ -26,6 +27,6 @@
|
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"@types/react": "*"
|
|
28
29
|
},
|
|
29
|
-
"typesPublisherContentHash": "
|
|
30
|
-
"typeScriptVersion": "3
|
|
30
|
+
"typesPublisherContentHash": "660366c9b437b76996bd3babf651ca296f7397c17b935916dc6802d49d588fa6",
|
|
31
|
+
"typeScriptVersion": "4.3"
|
|
31
32
|
}
|