@wix/public-editor-platform-interfaces 1.34.0 → 1.36.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.
@@ -0,0 +1,80 @@
1
+ import { ProviderItem } from './Providers';
2
+ export type UnbindAll = 'ALL';
3
+ export interface BindingsMap {
4
+ [key: string]: PropertyBinding;
5
+ }
6
+ export type PropertyBinding = ContextItemBinding | MethodBinding;
7
+ export declare enum BindingItemType {
8
+ ContextItem = "ContextItem",
9
+ Method = "Method"
10
+ }
11
+ export interface ContextItemBinding {
12
+ bindingItemType: BindingItemType.ContextItem;
13
+ displayName?: string;
14
+ itemPath: string;
15
+ }
16
+ export interface MethodBinding {
17
+ bindingItemType: BindingItemType.Method;
18
+ callOptions: CallOptions;
19
+ displayName?: string;
20
+ methodPath: string;
21
+ }
22
+ export type BindingArgument = ContextBindingArgument | FunctionBinding | StaticArgument;
23
+ export interface CallOptions {
24
+ arguments: BindingArgument[];
25
+ asCallback: boolean;
26
+ }
27
+ export interface FunctionBinding extends CallOptions {
28
+ displayName?: string;
29
+ function: string;
30
+ functionLibraryType: string;
31
+ type: ArgumentType.FunctionBinding;
32
+ }
33
+ export interface ContextBindingArgument {
34
+ contextItem: PropertyBinding;
35
+ contextProvider: string;
36
+ displayName?: string;
37
+ type: ArgumentType.ContextBinding;
38
+ }
39
+ export interface StaticArgument {
40
+ dataType: string;
41
+ type: ArgumentType.Static;
42
+ value: string;
43
+ }
44
+ export declare enum ArgumentType {
45
+ ContextBinding = "ContextBindingItem",
46
+ FunctionBinding = "FunctionBindingItem",
47
+ Static = "StaticArgItem"
48
+ }
49
+ export interface FunctionBindingConfig {
50
+ functionBindingItem: FunctionBinding;
51
+ propertyName: string;
52
+ }
53
+ export interface BoundPropertiesPerProvider {
54
+ [key: string]: BoundProperties;
55
+ }
56
+ export type BoundProperties = ContextProviderBindings | FunctionLibraryBinding;
57
+ export declare enum BindingType {
58
+ ContextProvider = "ContextProvider",
59
+ FunctionLibrary = "FunctionLibrary"
60
+ }
61
+ export interface ContextProviderBindings {
62
+ bindingsMap: BindingsMap;
63
+ bindingType: BindingType.ContextProvider;
64
+ displayName?: string;
65
+ }
66
+ export interface FunctionLibraryBinding {
67
+ binding: FunctionBindingConfig;
68
+ bindingType: BindingType.FunctionLibrary;
69
+ }
70
+ export type Binding = {
71
+ bindings: BindingsMap;
72
+ providerType: string;
73
+ };
74
+ export type ListBindingsResponse = {
75
+ bindings: BoundProperties;
76
+ providerType: string;
77
+ }[];
78
+ export type BindingCandidate = ProviderItem & {
79
+ isBound: boolean;
80
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BindingType = exports.ArgumentType = exports.BindingItemType = void 0;
4
+ var BindingItemType;
5
+ (function (BindingItemType) {
6
+ BindingItemType["ContextItem"] = "ContextItem";
7
+ BindingItemType["Method"] = "Method";
8
+ })(BindingItemType || (exports.BindingItemType = BindingItemType = {}));
9
+ var ArgumentType;
10
+ (function (ArgumentType) {
11
+ ArgumentType["ContextBinding"] = "ContextBindingItem";
12
+ ArgumentType["FunctionBinding"] = "FunctionBindingItem";
13
+ ArgumentType["Static"] = "StaticArgItem";
14
+ })(ArgumentType || (exports.ArgumentType = ArgumentType = {}));
15
+ var BindingType;
16
+ (function (BindingType) {
17
+ BindingType["ContextProvider"] = "ContextProvider";
18
+ BindingType["FunctionLibrary"] = "FunctionLibrary";
19
+ })(BindingType || (exports.BindingType = BindingType = {}));
@@ -0,0 +1,38 @@
1
+ export type Provider = {
2
+ attachState?: AttachState;
3
+ contextDependencies?: string[];
4
+ displayName: string;
5
+ items?: Record<string, ProviderItem>;
6
+ providerType: string;
7
+ };
8
+ type ProviderItemBase = {
9
+ displayName: string;
10
+ itemName: string;
11
+ providerType: string;
12
+ };
13
+ export type ProviderArrayItem = ProviderItemBase & {
14
+ arrayItem: ProviderItem;
15
+ dataType: String;
16
+ };
17
+ export type ProviderObjectItem = ProviderItemBase & {
18
+ dataType: String;
19
+ objectItem: Record<string, ProviderItem>;
20
+ };
21
+ export type ProviderSimpleItem = ProviderItemBase & {
22
+ dataType: String;
23
+ };
24
+ export type ProviderItem = ProviderArrayItem | ProviderObjectItem | ProviderSimpleItem;
25
+ export type AttachState = 'above' | 'none' | 'self';
26
+ export interface AttachedProvider extends Provider {
27
+ attachState: AttachState;
28
+ }
29
+ export type AttachStateFilter = boolean | {
30
+ filterAttachedState?: AttachState[];
31
+ };
32
+ export type ListProvidersOptions = {
33
+ includeAttachState?: AttachStateFilter;
34
+ includeDependencies?: boolean;
35
+ includeItems?: boolean;
36
+ providerTypes?: string[];
37
+ };
38
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export { EventType } from './EventType';
6
6
  export { AccessToken } from './Token';
7
7
  export { DsItem } from './DataItem';
8
8
  export { BuilderStyle, Style, StyleRef } from './StyleData';
9
+ export * from './Providers';
10
+ export * from './Bindings';
9
11
  export { OpenColorPickerFn, OpenLinkPanelFn, BasePickerOptions, BackgroundFillValue, BackgroundPickerOptions, ColorPickerOptions, ColorPickerMode, } from './Inputs';
10
12
  export * as PublicDmTypes from './generated/dm-types';
11
13
  export * from './sdk';
package/dist/index.js CHANGED
@@ -41,5 +41,7 @@ const WixSDKTypes = __importStar(require("@wix/sdk-types"));
41
41
  exports.WixSDKTypes = WixSDKTypes;
42
42
  var EventType_1 = require("./EventType");
43
43
  Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return EventType_1.EventType; } });
44
+ __exportStar(require("./Providers"), exports);
45
+ __exportStar(require("./Bindings"), exports);
44
46
  exports.PublicDmTypes = __importStar(require("./generated/dm-types"));
45
47
  __exportStar(require("./sdk"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/public-editor-platform-interfaces",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "license": "UNLICENSED",
5
5
  "contributors": [
6
6
  {
@@ -51,5 +51,5 @@
51
51
  ]
52
52
  }
53
53
  },
54
- "falconPackageHash": "5765130e74e5115dbc074a85f7db2922f69abc70bc25e617e653c475"
54
+ "falconPackageHash": "69c78dac57df661f8b682bbd7cfa51afa990ffb2091364065eb68fdb"
55
55
  }