@wix/editor 1.435.0 → 1.437.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/cjs/index.js +112 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +110 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/statics/index.js +112 -6
- package/dist/statics/index.js.map +1 -1
- package/dist/types/index.d.ts +28 -4
- package/package.json +5 -5
package/dist/cjs/index.js
CHANGED
|
@@ -936,7 +936,7 @@ class ControllersSDKShape extends BaseSDKShape {
|
|
|
936
936
|
}
|
|
937
937
|
var index$2 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
|
|
938
938
|
|
|
939
|
-
class
|
|
939
|
+
class CmsBindingConnectionItem {
|
|
940
940
|
constructor(privateAPI, pointer, bindingTarget, config) {
|
|
941
941
|
this.pointer = pointer;
|
|
942
942
|
this.bindingTarget = bindingTarget;
|
|
@@ -960,7 +960,7 @@ class BindingConnectionItem {
|
|
|
960
960
|
this.config = {};
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
class
|
|
963
|
+
class CmsBindingsSDKShape extends BaseSDKShape {
|
|
964
964
|
async get(target) {
|
|
965
965
|
const privateAPI = await this.getPlatformPrivateAPI();
|
|
966
966
|
const editorPointer = await privateAPI.components.getSingleSelectedEditorPointer();
|
|
@@ -971,10 +971,15 @@ class BindingsSDKShape extends BaseSDKShape {
|
|
|
971
971
|
if (!config) {
|
|
972
972
|
return null;
|
|
973
973
|
}
|
|
974
|
-
return new
|
|
974
|
+
return new CmsBindingConnectionItem(
|
|
975
|
+
privateAPI,
|
|
976
|
+
editorPointer,
|
|
977
|
+
target,
|
|
978
|
+
config
|
|
979
|
+
);
|
|
975
980
|
}
|
|
976
981
|
}
|
|
977
|
-
var index$1 = new PlatformSDKShape(
|
|
982
|
+
var index$1 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
|
|
978
983
|
|
|
979
984
|
class BindingsProvider {
|
|
980
985
|
constructor(privateAPI, editorPointer, controllerRef, dataItemTarget, name) {
|
|
@@ -1001,7 +1006,7 @@ class BindingsProvider {
|
|
|
1001
1006
|
config: data.config
|
|
1002
1007
|
}
|
|
1003
1008
|
);
|
|
1004
|
-
return new
|
|
1009
|
+
return new CmsBindingConnectionItem(
|
|
1005
1010
|
this.#privateAPI,
|
|
1006
1011
|
this.editorPointer,
|
|
1007
1012
|
this.dataItemTarget,
|
|
@@ -1033,6 +1038,105 @@ class BindingsProvidersSDKShape extends BaseSDKShape {
|
|
|
1033
1038
|
}
|
|
1034
1039
|
var index = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1035
1040
|
|
|
1041
|
+
class ProvidersPublicSDKShape extends BaseSDKShape {
|
|
1042
|
+
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
1043
|
+
super(overriddenApplicationContext);
|
|
1044
|
+
this.overriddenApplicationContext = overriddenApplicationContext;
|
|
1045
|
+
this.childPath = childPath;
|
|
1046
|
+
}
|
|
1047
|
+
async attach(providerType, data) {
|
|
1048
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1049
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1050
|
+
const result = await privateAPI.providers.attach(
|
|
1051
|
+
manifestContextId,
|
|
1052
|
+
this.childPath,
|
|
1053
|
+
providerType,
|
|
1054
|
+
data
|
|
1055
|
+
);
|
|
1056
|
+
return result;
|
|
1057
|
+
}
|
|
1058
|
+
async detach(providerType) {
|
|
1059
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1060
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1061
|
+
const result = await privateAPI.providers.detach(
|
|
1062
|
+
manifestContextId,
|
|
1063
|
+
this.childPath,
|
|
1064
|
+
providerType
|
|
1065
|
+
);
|
|
1066
|
+
return result;
|
|
1067
|
+
}
|
|
1068
|
+
async list(options) {
|
|
1069
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1070
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1071
|
+
const result = await privateAPI.providers.list(
|
|
1072
|
+
manifestContextId,
|
|
1073
|
+
this.childPath,
|
|
1074
|
+
options
|
|
1075
|
+
);
|
|
1076
|
+
return result;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
const providersPublicSDKShape = new PlatformSDKShape(
|
|
1080
|
+
ProvidersPublicSDKShape
|
|
1081
|
+
).withPublicMethod("attach").withPublicMethod("detach").withPublicMethod("list").build();
|
|
1082
|
+
|
|
1083
|
+
class BindingsPublicSDKShape extends BaseSDKShape {
|
|
1084
|
+
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
1085
|
+
super(overriddenApplicationContext);
|
|
1086
|
+
this.overriddenApplicationContext = overriddenApplicationContext;
|
|
1087
|
+
this.childPath = childPath;
|
|
1088
|
+
}
|
|
1089
|
+
// uses the bindings map to bind component props to provider items
|
|
1090
|
+
async bind(bindings) {
|
|
1091
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1092
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1093
|
+
const result = await privateAPI.bindings.bind(
|
|
1094
|
+
manifestContextId,
|
|
1095
|
+
this.childPath,
|
|
1096
|
+
bindings
|
|
1097
|
+
);
|
|
1098
|
+
return result;
|
|
1099
|
+
}
|
|
1100
|
+
// removes the bindings of specific props from the component and provider bindings map
|
|
1101
|
+
// if props is 'ALL' - unbinds all props from the component
|
|
1102
|
+
async unbind(props) {
|
|
1103
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1104
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1105
|
+
const result = await privateAPI.bindings.unbind(
|
|
1106
|
+
manifestContextId,
|
|
1107
|
+
this.childPath,
|
|
1108
|
+
props
|
|
1109
|
+
);
|
|
1110
|
+
return result;
|
|
1111
|
+
}
|
|
1112
|
+
// gets the binding map for all attached providers of the editor pointer
|
|
1113
|
+
// providerTypes: optionally filter by provider types
|
|
1114
|
+
// includeDisplayNames: optionally add props and context items display names
|
|
1115
|
+
async listBindings(options) {
|
|
1116
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1117
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1118
|
+
const result = await privateAPI.bindings.listBindings(
|
|
1119
|
+
manifestContextId,
|
|
1120
|
+
this.childPath,
|
|
1121
|
+
options
|
|
1122
|
+
);
|
|
1123
|
+
return result;
|
|
1124
|
+
}
|
|
1125
|
+
// finds the available binding options for the target prop of the provided component
|
|
1126
|
+
async findBindingCandidates(propPath) {
|
|
1127
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1128
|
+
const manifestContextId = await this.getRequiredManifestContextId();
|
|
1129
|
+
return privateAPI.bindings.findBindingCandidates(
|
|
1130
|
+
manifestContextId,
|
|
1131
|
+
this.childPath,
|
|
1132
|
+
propPath
|
|
1133
|
+
);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
const bindingsPublicSDKShape = new PlatformSDKShape(
|
|
1137
|
+
BindingsPublicSDKShape
|
|
1138
|
+
).withPublicMethod("bind").withPublicMethod("unbind").withPublicMethod("listBindings").withPublicMethod("findBindingCandidates").build();
|
|
1139
|
+
|
|
1036
1140
|
class Workspace {
|
|
1037
1141
|
constructor(applicationContext) {
|
|
1038
1142
|
this.applicationContext = applicationContext;
|
|
@@ -1138,8 +1242,9 @@ exports.PlatformSDKShape = PlatformSDKShape;
|
|
|
1138
1242
|
exports.Workspace = Workspace;
|
|
1139
1243
|
exports.WorkspaceHost = WorkspaceHost;
|
|
1140
1244
|
exports.application = index$d;
|
|
1141
|
-
exports.bindings =
|
|
1245
|
+
exports.bindings = bindingsPublicSDKShape;
|
|
1142
1246
|
exports.bindingsProviders = index;
|
|
1247
|
+
exports.cmsBindings = index$1;
|
|
1143
1248
|
exports.controllers = index$2;
|
|
1144
1249
|
exports.editor = editor;
|
|
1145
1250
|
exports.element = index$5;
|
|
@@ -1151,5 +1256,6 @@ exports.inputs = index$8;
|
|
|
1151
1256
|
exports.modals = index$6;
|
|
1152
1257
|
exports.panels = index$7;
|
|
1153
1258
|
exports.preferences = index$4;
|
|
1259
|
+
exports.providers = providersPublicSDKShape;
|
|
1154
1260
|
exports.widget = index$9;
|
|
1155
1261
|
//# sourceMappingURL=index.js.map
|