@wix/public-editor-platform-interfaces 1.37.0 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Bindings.d.ts +30 -61
- package/dist/Bindings.js +5 -10
- package/dist/Providers.d.ts +37 -13
- package/dist/Providers.js +14 -0
- package/dist/generated/dm-types.d.ts +334 -242
- package/dist/generated/dm-types.js +162 -94
- package/dist/sdk/data.d.ts +40 -30
- package/package.json +3 -2
package/dist/Bindings.d.ts
CHANGED
|
@@ -1,83 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Method = "Method"
|
|
1
|
+
import { ProviderType } from './Providers';
|
|
2
|
+
export declare const UNBIND_ALL: "ALL";
|
|
3
|
+
export type UnbindAll = typeof UNBIND_ALL;
|
|
4
|
+
export interface BindingProperties {
|
|
5
|
+
bindingsMap: ProviderBindingsMap;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
providerIdentifier: string;
|
|
8
|
+
providerType: ProviderType;
|
|
10
9
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
10
|
+
export type ProviderBindingsMap = Record<string, PropertyBinding>;
|
|
11
|
+
export type PropertyBinding = MethodBinding | ProviderItemBinding;
|
|
12
|
+
export interface ProviderItemBinding {
|
|
13
|
+
bindingItemType: BindingItemType.ItemBinding;
|
|
13
14
|
displayName?: string;
|
|
14
15
|
itemPath: string;
|
|
15
16
|
}
|
|
16
17
|
export interface MethodBinding {
|
|
17
|
-
bindingItemType: BindingItemType.
|
|
18
|
+
bindingItemType: BindingItemType.MethodBinding;
|
|
18
19
|
callOptions: CallOptions;
|
|
19
20
|
displayName?: string;
|
|
20
21
|
methodPath: string;
|
|
21
22
|
}
|
|
22
|
-
export
|
|
23
|
+
export declare enum BindingItemType {
|
|
24
|
+
ItemBinding = "ItemBinding",
|
|
25
|
+
MethodBinding = "MethodBinding"
|
|
26
|
+
}
|
|
27
|
+
export type BindingArgument = ProviderItemBindingArgument | StaticArgument;
|
|
23
28
|
export interface CallOptions {
|
|
24
29
|
arguments: BindingArgument[];
|
|
25
30
|
asCallback: boolean;
|
|
26
31
|
}
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
functionLibraryType: string;
|
|
31
|
-
type: ArgumentType.FunctionBinding;
|
|
32
|
+
export declare enum ArgumentType {
|
|
33
|
+
ProviderBinding = "ProviderBindingItem",
|
|
34
|
+
Static = "StaticArgItem"
|
|
32
35
|
}
|
|
33
|
-
export interface
|
|
34
|
-
contextItem: PropertyBinding;
|
|
35
|
-
contextProvider: string;
|
|
36
|
+
export interface ProviderItemBindingArgument {
|
|
36
37
|
displayName?: string;
|
|
37
|
-
|
|
38
|
+
providerIdentifier: string;
|
|
39
|
+
providerItem: PropertyBinding;
|
|
40
|
+
providerType: ProviderType;
|
|
41
|
+
type: ArgumentType.ProviderBinding;
|
|
38
42
|
}
|
|
39
43
|
export interface StaticArgument {
|
|
40
44
|
dataType: string;
|
|
41
45
|
type: ArgumentType.Static;
|
|
42
46
|
value: string;
|
|
43
47
|
}
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
export interface FunctionBindingsMap {
|
|
50
|
-
[key: string]: FunctionPropertyBinding;
|
|
51
|
-
}
|
|
52
|
-
export interface FunctionPropertyBinding {
|
|
53
|
-
callOptions: CallOptions;
|
|
54
|
-
function: string;
|
|
55
|
-
}
|
|
56
|
-
export interface BoundPropertiesPerProvider {
|
|
57
|
-
[key: string]: BoundProperties;
|
|
58
|
-
}
|
|
59
|
-
export type BoundProperties = ContextProviderBindings | FunctionLibraryBinding;
|
|
60
|
-
export declare enum BindingType {
|
|
61
|
-
ContextProvider = "ContextProvider",
|
|
62
|
-
FunctionLibrary = "FunctionLibrary"
|
|
63
|
-
}
|
|
64
|
-
export interface ContextProviderBindings {
|
|
65
|
-
bindingsMap: BindingsMap;
|
|
66
|
-
bindingType: BindingType.ContextProvider;
|
|
67
|
-
displayName?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface FunctionLibraryBinding {
|
|
70
|
-
bindingsMap: FunctionBindingsMap;
|
|
71
|
-
bindingType: BindingType.FunctionLibrary;
|
|
48
|
+
export interface ListBindingsOptions {
|
|
49
|
+
includeDisplayNames?: boolean;
|
|
50
|
+
providerIdentifiers?: string[];
|
|
51
|
+
providerTypes?: ProviderType[];
|
|
72
52
|
}
|
|
73
|
-
export type Binding = {
|
|
74
|
-
bindings: BindingsMap;
|
|
75
|
-
providerType: string;
|
|
76
|
-
};
|
|
77
|
-
export type ListBindingsResponse = {
|
|
78
|
-
bindings: BoundProperties;
|
|
79
|
-
providerType: string;
|
|
80
|
-
}[];
|
|
81
|
-
export type BindingCandidate = ProviderItem & {
|
|
82
|
-
isBound: boolean;
|
|
83
|
-
};
|
package/dist/Bindings.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ArgumentType = exports.BindingItemType = exports.UNBIND_ALL = void 0;
|
|
4
|
+
exports.UNBIND_ALL = 'ALL';
|
|
4
5
|
var BindingItemType;
|
|
5
6
|
(function (BindingItemType) {
|
|
6
|
-
BindingItemType["
|
|
7
|
-
BindingItemType["
|
|
7
|
+
BindingItemType["ItemBinding"] = "ItemBinding";
|
|
8
|
+
BindingItemType["MethodBinding"] = "MethodBinding";
|
|
8
9
|
})(BindingItemType || (exports.BindingItemType = BindingItemType = {}));
|
|
9
10
|
var ArgumentType;
|
|
10
11
|
(function (ArgumentType) {
|
|
11
|
-
ArgumentType["
|
|
12
|
-
ArgumentType["FunctionBinding"] = "FunctionBindingItem";
|
|
12
|
+
ArgumentType["ProviderBinding"] = "ProviderBindingItem";
|
|
13
13
|
ArgumentType["Static"] = "StaticArgItem";
|
|
14
14
|
})(ArgumentType || (exports.ArgumentType = ArgumentType = {}));
|
|
15
|
-
var BindingType;
|
|
16
|
-
(function (BindingType) {
|
|
17
|
-
BindingType["ContextProvider"] = "ContextProvider";
|
|
18
|
-
BindingType["FunctionLibrary"] = "FunctionLibrary";
|
|
19
|
-
})(BindingType || (exports.BindingType = BindingType = {}));
|
package/dist/Providers.d.ts
CHANGED
|
@@ -1,30 +1,53 @@
|
|
|
1
|
+
import { DataType, EditorFunction, TextEnum } from '@wix/app-extensions/trusted';
|
|
2
|
+
export declare enum ProviderType {
|
|
3
|
+
Context = "Context",
|
|
4
|
+
FunctionLibrary = "FunctionLibrary",
|
|
5
|
+
Template = "Template"
|
|
6
|
+
}
|
|
1
7
|
export type Provider = {
|
|
2
|
-
attachState?: AttachState;
|
|
3
|
-
contextDependencies?: string[];
|
|
4
8
|
displayName: string;
|
|
5
9
|
items?: Record<string, ProviderItem>;
|
|
6
|
-
|
|
7
|
-
}
|
|
10
|
+
providerIdentifier: string;
|
|
11
|
+
} & ({
|
|
12
|
+
attachState?: AttachState.Above | AttachState.None | AttachState.Self;
|
|
13
|
+
contextDependencies?: string[];
|
|
14
|
+
providerType: ProviderType.Context;
|
|
15
|
+
} | {
|
|
16
|
+
attachState?: AttachState.Above | AttachState.Self;
|
|
17
|
+
providerType: ProviderType.Template;
|
|
18
|
+
} | {
|
|
19
|
+
attachState?: AttachState.System;
|
|
20
|
+
providerType: ProviderType.FunctionLibrary;
|
|
21
|
+
});
|
|
8
22
|
type ProviderItemBase = {
|
|
9
23
|
displayName: string;
|
|
10
24
|
itemName: string;
|
|
11
|
-
providerType: string;
|
|
12
25
|
};
|
|
13
26
|
export type ProviderArrayItem = ProviderItemBase & {
|
|
14
27
|
arrayItem: ProviderItem;
|
|
15
|
-
dataType:
|
|
28
|
+
dataType: DataType.arrayItems;
|
|
16
29
|
};
|
|
17
30
|
export type ProviderObjectItem = ProviderItemBase & {
|
|
18
|
-
dataType:
|
|
31
|
+
dataType: DataType.data;
|
|
19
32
|
objectItem: Record<string, ProviderItem>;
|
|
20
33
|
};
|
|
34
|
+
export type ProviderFunctionItem = ProviderItemBase & {
|
|
35
|
+
dataType: DataType.function;
|
|
36
|
+
function?: EditorFunction;
|
|
37
|
+
};
|
|
38
|
+
export type ProviderTextEnumItem = ProviderItemBase & {
|
|
39
|
+
dataType: DataType.textEnum;
|
|
40
|
+
textEnum: TextEnum;
|
|
41
|
+
};
|
|
21
42
|
export type ProviderSimpleItem = ProviderItemBase & {
|
|
22
|
-
dataType:
|
|
43
|
+
dataType: Exclude<DataType, DataType.arrayItems | DataType.data | DataType.function | DataType.textEnum>;
|
|
23
44
|
};
|
|
24
|
-
export type ProviderItem = ProviderArrayItem | ProviderObjectItem | ProviderSimpleItem;
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
45
|
+
export type ProviderItem = ProviderArrayItem | ProviderFunctionItem | ProviderObjectItem | ProviderSimpleItem | ProviderTextEnumItem;
|
|
46
|
+
export declare enum AttachState {
|
|
47
|
+
Above = "above",
|
|
48
|
+
None = "none",
|
|
49
|
+
Self = "self",
|
|
50
|
+
System = "system"
|
|
28
51
|
}
|
|
29
52
|
export type AttachStateFilter = boolean | {
|
|
30
53
|
filterAttachedState?: AttachState[];
|
|
@@ -33,6 +56,7 @@ export type ListProvidersOptions = {
|
|
|
33
56
|
includeAttachState?: AttachStateFilter;
|
|
34
57
|
includeDependencies?: boolean;
|
|
35
58
|
includeItems?: boolean;
|
|
36
|
-
|
|
59
|
+
providerIdentifiers?: string[];
|
|
60
|
+
providerTypes?: ProviderType[];
|
|
37
61
|
};
|
|
38
62
|
export {};
|
package/dist/Providers.js
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttachState = exports.ProviderType = void 0;
|
|
4
|
+
var ProviderType;
|
|
5
|
+
(function (ProviderType) {
|
|
6
|
+
ProviderType["Context"] = "Context";
|
|
7
|
+
ProviderType["FunctionLibrary"] = "FunctionLibrary";
|
|
8
|
+
ProviderType["Template"] = "Template";
|
|
9
|
+
})(ProviderType || (exports.ProviderType = ProviderType = {}));
|
|
10
|
+
var AttachState;
|
|
11
|
+
(function (AttachState) {
|
|
12
|
+
AttachState["Above"] = "above";
|
|
13
|
+
AttachState["None"] = "none";
|
|
14
|
+
AttachState["Self"] = "self";
|
|
15
|
+
AttachState["System"] = "system";
|
|
16
|
+
})(AttachState || (exports.AttachState = AttachState = {}));
|