@wix/editor 1.519.0 → 1.521.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 +51 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +35 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/statics/docs-ts-model.json +181 -181
- package/dist/statics/index.js +51 -29
- package/dist/statics/index.js.map +1 -1
- package/dist/types/index.d.ts +25 -16
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -166,14 +166,14 @@ class ApplicationSDKShape extends BaseSDKShape {
|
|
|
166
166
|
return privateAPI.info.getAppInstance(await this.getAppDefinitionId());
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
var index$
|
|
169
|
+
var index$e = new PlatformSDKShape(ApplicationSDKShape).withPublicMethod("getPrivateAPI").withPublicMethod("getPublicAPI").withPublicMethod("getAppInstance").build();
|
|
170
170
|
|
|
171
171
|
class EventsSDKShape extends BaseSDKShape {
|
|
172
172
|
async addEventListener(name, cb) {
|
|
173
173
|
return (await this.getApplicationContext()).getEvents().addEventListener(name, cb);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
var index$
|
|
176
|
+
var index$d = new PlatformSDKShape(EventsSDKShape).withPublicMethod("addEventListener").build();
|
|
177
177
|
|
|
178
178
|
class ElementsSDKShape extends BaseSDKShape {
|
|
179
179
|
async getSelection() {
|
|
@@ -192,7 +192,7 @@ class ElementsSDKShape extends BaseSDKShape {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
var index$
|
|
195
|
+
var index$c = new PlatformSDKShape(ElementsSDKShape).withPublicMethod("onSelectionChange").withPublicMethod("getSelection").build();
|
|
196
196
|
|
|
197
197
|
class InfoSDKShape extends BaseSDKShape {
|
|
198
198
|
async getViewMode() {
|
|
@@ -228,7 +228,7 @@ class InfoSDKShape extends BaseSDKShape {
|
|
|
228
228
|
return privateAPI.info.getMetaSiteId();
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
var index$
|
|
231
|
+
var index$b = new PlatformSDKShape(InfoSDKShape).withPublicMethod("getViewMode").withPublicMethod("getLanguageCode").withPublicMethod("getSiteDirection").withPublicMethod("siteHasCustomClasses").withPublicMethod("getThemeCustomProperties").withPublicMethod("getSiteFonts").withPublicMethod("getFontFamilyDisplayName").withPublicMethod("getMetaSiteId").build();
|
|
232
232
|
|
|
233
233
|
var WidgetShapeErrorCode = /* @__PURE__ */ ((WidgetShapeErrorCode2) => {
|
|
234
234
|
WidgetShapeErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -404,7 +404,7 @@ class WidgetSDKShape extends BaseSDKShape {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
const widgetShape = new PlatformSDKShape(WidgetSDKShape).withPublicMethod("getNestedWidget").withPublicMethod("setDesignPreset").withPublicMethod("getDesignPreset").withPublicMethod("setProp").withPublicMethod("getProp").withPublicMethod("setPreloadFonts");
|
|
407
|
-
var index$
|
|
407
|
+
var index$a = widgetShape.build();
|
|
408
408
|
|
|
409
409
|
function fontValueToCSS(fontValue) {
|
|
410
410
|
return `${fontValue.cssVariableName ? `var(${fontValue.cssVariableName}, ` : ""}${fontValue.italic ? "italic " : ""}${fontValue.bold ? "bold " : ""}${fontValue.size || 16}px ${// wrap each font family with quotes
|
|
@@ -504,7 +504,7 @@ class InputsSDKShape extends BaseSDKShape {
|
|
|
504
504
|
return _value;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
var index$
|
|
507
|
+
var index$9 = new PlatformSDKShape(InputsSDKShape).withPublicMethod("selectColor").withPublicMethod("selectFont").build();
|
|
508
508
|
|
|
509
509
|
class PanelsSDKShape extends BaseSDKShape {
|
|
510
510
|
async openLanguageSupportPanel() {
|
|
@@ -516,7 +516,7 @@ class PanelsSDKShape extends BaseSDKShape {
|
|
|
516
516
|
return privateAPI.panels.openFontsUploadPanel();
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
var index$
|
|
519
|
+
var index$8 = new PlatformSDKShape(PanelsSDKShape).withPublicMethod("openLanguageSupportPanel").withPublicMethod("openFontsUploadPanel").build();
|
|
520
520
|
|
|
521
521
|
class ModalsSDKShape extends BaseSDKShape {
|
|
522
522
|
async openDashboardModal(options) {
|
|
@@ -527,7 +527,7 @@ class ModalsSDKShape extends BaseSDKShape {
|
|
|
527
527
|
);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
var index$
|
|
530
|
+
var index$7 = new PlatformSDKShape(ModalsSDKShape).withPublicMethod("openDashboardModal").build();
|
|
531
531
|
|
|
532
532
|
class ElementSDKShape extends BaseSDKShape {
|
|
533
533
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1277,7 +1277,7 @@ class ElementSDKShape extends BaseSDKShape {
|
|
|
1277
1277
|
);
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
var index$
|
|
1280
|
+
var index$6 = new PlatformSDKShape(ElementSDKShape).withPublicMethod("getDataDefinitions").withPublicMethod("getData").withPublicMethod("getResolvedData").withPublicMethod("setData").withPublicMethod("getStyleDefinitions").withPublicMethod("getStyles").withPublicMethod("setStyles").withPublicMethod("removeStyles").withPublicMethod("getPresetDefinitions").withPublicMethod("getAppliedPreset").withPublicMethod("applyPreset").withPublicMethod("getDisplayGroupDefinitions").withPublicMethod("getDisplayName").withPublicMethod("getState").withPublicMethod("setState").withPublicMethod("onChange").withPublicMethod("getStateDefinitions").withPublicMethod("selectFont").withPublicMethod("selectFontFamily").withPublicMethod("selectMedia").withPublicMethod("selectLink").withPublicMethod("selectColor").withPublicMethod("selectBackground").withPublicMethod("selectFontWeight").withPublicMethod("selectTextTheme").withPublicMethod("getArrayItemsSelectedIndex").withPublicMethod("setArrayItemsSelectedIndex").withPublicMethod("resetArrayItemsSelectedIndex").withPublicMethod("getBiToken").build();
|
|
1281
1281
|
|
|
1282
1282
|
class PreferencesSDKShape extends BaseSDKShape {
|
|
1283
1283
|
async get(keys) {
|
|
@@ -1295,7 +1295,7 @@ class PreferencesSDKShape extends BaseSDKShape {
|
|
|
1295
1295
|
);
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
var index$
|
|
1298
|
+
var index$5 = new PlatformSDKShape(PreferencesSDKShape).withPublicMethod("set").withPublicMethod("get").build();
|
|
1299
1299
|
|
|
1300
1300
|
class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
1301
1301
|
async getData() {
|
|
@@ -1337,7 +1337,7 @@ class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
|
1337
1337
|
return privateAPI.externalPanels.translate(key, values);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
var index$
|
|
1340
|
+
var index$4 = new PlatformSDKShape(ExternalPanelsSDKShape).withPublicMethod("getTheme").withPublicMethod("getData").withPublicMethod("getStyle").withPublicMethod("selectColor").withPublicMethod("selectLink").withPublicMethod("selectMedia").withPublicMethod("setData").withPublicMethod("setStyle").withPublicMethod("translate").build();
|
|
1341
1341
|
|
|
1342
1342
|
var ControllersErrorCode = /* @__PURE__ */ ((ControllersErrorCode2) => {
|
|
1343
1343
|
ControllersErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -1368,7 +1368,7 @@ class ControllersSDKShape extends BaseSDKShape {
|
|
|
1368
1368
|
);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
|
-
var index$
|
|
1371
|
+
var index$3 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
|
|
1372
1372
|
|
|
1373
1373
|
class CmsBindingConnectionItem {
|
|
1374
1374
|
constructor(privateAPI, pointer, bindingTarget, config) {
|
|
@@ -1413,7 +1413,7 @@ class CmsBindingsSDKShape extends BaseSDKShape {
|
|
|
1413
1413
|
);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
var index$
|
|
1416
|
+
var index$2 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
|
|
1417
1417
|
|
|
1418
1418
|
class BindingsProvider {
|
|
1419
1419
|
constructor(privateAPI, editorPointer, controllerRef, dataItemTarget, name) {
|
|
@@ -1470,7 +1470,7 @@ class BindingsProvidersSDKShape extends BaseSDKShape {
|
|
|
1470
1470
|
);
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
var index = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1473
|
+
var index$1 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1474
1474
|
|
|
1475
1475
|
class ProvidersPublicSDKShape extends BaseSDKShape {
|
|
1476
1476
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1624,6 +1624,26 @@ class WorkspaceHost {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
|
|
1627
|
+
class RoutersSDKShape extends BaseSDKShape {
|
|
1628
|
+
constructor(overriddenApplicationContext = null) {
|
|
1629
|
+
super(overriddenApplicationContext);
|
|
1630
|
+
this.overriddenApplicationContext = overriddenApplicationContext;
|
|
1631
|
+
}
|
|
1632
|
+
async isValidPrefix(prefix) {
|
|
1633
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1634
|
+
return privateAPI.routers.isValidPrefix(prefix);
|
|
1635
|
+
}
|
|
1636
|
+
async list() {
|
|
1637
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1638
|
+
return privateAPI.routers.list();
|
|
1639
|
+
}
|
|
1640
|
+
async add(extensionId) {
|
|
1641
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1642
|
+
return privateAPI.routers.add(extensionId);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
var index = new PlatformSDKShape(RoutersSDKShape).withPublicMethod("isValidPrefix").withPublicMethod("list").withPublicMethod("add").build();
|
|
1646
|
+
|
|
1627
1647
|
const frame = () => {
|
|
1628
1648
|
const queryParams = new URLSearchParams(window.location.search);
|
|
1629
1649
|
const essentialsQueryParamValue = queryParams.has("essentials") ? JSON.parse(queryParams.get("essentials")) : void 0;
|
|
@@ -1678,5 +1698,5 @@ const editor = {
|
|
|
1678
1698
|
auth
|
|
1679
1699
|
};
|
|
1680
1700
|
|
|
1681
|
-
export { BaseSDKShape, ElementSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, Workspace, WorkspaceHost, index$
|
|
1701
|
+
export { BaseSDKShape, ElementSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, index$e as application, bindingsPublicSDKShape as bindings, index$1 as bindingsProviders, index$2 as cmsBindings, index$3 as controllers, editor, index$6 as element, index$c as elements, index$d as events, index$4 as externalPanels, index$b as info, index$9 as inputs, index$7 as modals, index$8 as panels, index$5 as preferences, providersPublicSDKShape as providers, index$6 as reactElements, index as routers, index$a as widget };
|
|
1682
1702
|
//# sourceMappingURL=index.js.map
|