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