@wix/editor 1.520.0 → 1.522.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 +73 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +55 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/statics/docs-ts-model.json +181 -181
- package/dist/statics/index.js +73 -29
- package/dist/statics/index.js.map +1 -1
- package/dist/types/index.d.ts +34 -16
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -168,14 +168,14 @@ class ApplicationSDKShape extends BaseSDKShape {
|
|
|
168
168
|
return privateAPI.info.getAppInstance(await this.getAppDefinitionId());
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
var index$
|
|
171
|
+
var index$f = new PlatformSDKShape(ApplicationSDKShape).withPublicMethod("getPrivateAPI").withPublicMethod("getPublicAPI").withPublicMethod("getAppInstance").build();
|
|
172
172
|
|
|
173
173
|
class EventsSDKShape extends BaseSDKShape {
|
|
174
174
|
async addEventListener(name, cb) {
|
|
175
175
|
return (await this.getApplicationContext()).getEvents().addEventListener(name, cb);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
var index$
|
|
178
|
+
var index$e = new PlatformSDKShape(EventsSDKShape).withPublicMethod("addEventListener").build();
|
|
179
179
|
|
|
180
180
|
class ElementsSDKShape extends BaseSDKShape {
|
|
181
181
|
async getSelection() {
|
|
@@ -194,7 +194,7 @@ class ElementsSDKShape extends BaseSDKShape {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
var index$
|
|
197
|
+
var index$d = new PlatformSDKShape(ElementsSDKShape).withPublicMethod("onSelectionChange").withPublicMethod("getSelection").build();
|
|
198
198
|
|
|
199
199
|
class InfoSDKShape extends BaseSDKShape {
|
|
200
200
|
async getViewMode() {
|
|
@@ -230,7 +230,7 @@ class InfoSDKShape extends BaseSDKShape {
|
|
|
230
230
|
return privateAPI.info.getMetaSiteId();
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
var index$
|
|
233
|
+
var index$c = new PlatformSDKShape(InfoSDKShape).withPublicMethod("getViewMode").withPublicMethod("getLanguageCode").withPublicMethod("getSiteDirection").withPublicMethod("siteHasCustomClasses").withPublicMethod("getThemeCustomProperties").withPublicMethod("getSiteFonts").withPublicMethod("getFontFamilyDisplayName").withPublicMethod("getMetaSiteId").build();
|
|
234
234
|
|
|
235
235
|
var WidgetShapeErrorCode = /* @__PURE__ */ ((WidgetShapeErrorCode2) => {
|
|
236
236
|
WidgetShapeErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -406,7 +406,7 @@ class WidgetSDKShape extends BaseSDKShape {
|
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
const widgetShape = new PlatformSDKShape(WidgetSDKShape).withPublicMethod("getNestedWidget").withPublicMethod("setDesignPreset").withPublicMethod("getDesignPreset").withPublicMethod("setProp").withPublicMethod("getProp").withPublicMethod("setPreloadFonts");
|
|
409
|
-
var index$
|
|
409
|
+
var index$b = widgetShape.build();
|
|
410
410
|
|
|
411
411
|
function fontValueToCSS(fontValue) {
|
|
412
412
|
return `${fontValue.cssVariableName ? `var(${fontValue.cssVariableName}, ` : ""}${fontValue.italic ? "italic " : ""}${fontValue.bold ? "bold " : ""}${fontValue.size || 16}px ${// wrap each font family with quotes
|
|
@@ -506,7 +506,7 @@ class InputsSDKShape extends BaseSDKShape {
|
|
|
506
506
|
return _value;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
var index$
|
|
509
|
+
var index$a = new PlatformSDKShape(InputsSDKShape).withPublicMethod("selectColor").withPublicMethod("selectFont").build();
|
|
510
510
|
|
|
511
511
|
class PanelsSDKShape extends BaseSDKShape {
|
|
512
512
|
async openLanguageSupportPanel() {
|
|
@@ -518,7 +518,7 @@ class PanelsSDKShape extends BaseSDKShape {
|
|
|
518
518
|
return privateAPI.panels.openFontsUploadPanel();
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
var index$
|
|
521
|
+
var index$9 = new PlatformSDKShape(PanelsSDKShape).withPublicMethod("openLanguageSupportPanel").withPublicMethod("openFontsUploadPanel").build();
|
|
522
522
|
|
|
523
523
|
class ModalsSDKShape extends BaseSDKShape {
|
|
524
524
|
async openDashboardModal(options) {
|
|
@@ -529,7 +529,7 @@ class ModalsSDKShape extends BaseSDKShape {
|
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
var index$
|
|
532
|
+
var index$8 = new PlatformSDKShape(ModalsSDKShape).withPublicMethod("openDashboardModal").build();
|
|
533
533
|
|
|
534
534
|
class ElementSDKShape extends BaseSDKShape {
|
|
535
535
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1279,7 +1279,7 @@ class ElementSDKShape extends BaseSDKShape {
|
|
|
1279
1279
|
);
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
var index$
|
|
1282
|
+
var index$7 = 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();
|
|
1283
1283
|
|
|
1284
1284
|
class PreferencesSDKShape extends BaseSDKShape {
|
|
1285
1285
|
async get(keys) {
|
|
@@ -1297,7 +1297,7 @@ class PreferencesSDKShape extends BaseSDKShape {
|
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
|
-
var index$
|
|
1300
|
+
var index$6 = new PlatformSDKShape(PreferencesSDKShape).withPublicMethod("set").withPublicMethod("get").build();
|
|
1301
1301
|
|
|
1302
1302
|
class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
1303
1303
|
async getData() {
|
|
@@ -1339,7 +1339,7 @@ class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
|
1339
1339
|
return privateAPI.externalPanels.translate(key, values);
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
var index$
|
|
1342
|
+
var index$5 = new PlatformSDKShape(ExternalPanelsSDKShape).withPublicMethod("getTheme").withPublicMethod("getData").withPublicMethod("getStyle").withPublicMethod("selectColor").withPublicMethod("selectLink").withPublicMethod("selectMedia").withPublicMethod("setData").withPublicMethod("setStyle").withPublicMethod("translate").build();
|
|
1343
1343
|
|
|
1344
1344
|
var ControllersErrorCode = /* @__PURE__ */ ((ControllersErrorCode2) => {
|
|
1345
1345
|
ControllersErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -1370,7 +1370,7 @@ class ControllersSDKShape extends BaseSDKShape {
|
|
|
1370
1370
|
);
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
var index$
|
|
1373
|
+
var index$4 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
|
|
1374
1374
|
|
|
1375
1375
|
class CmsBindingConnectionItem {
|
|
1376
1376
|
constructor(privateAPI, pointer, bindingTarget, config) {
|
|
@@ -1415,7 +1415,7 @@ class CmsBindingsSDKShape extends BaseSDKShape {
|
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
var index$
|
|
1418
|
+
var index$3 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
|
|
1419
1419
|
|
|
1420
1420
|
class BindingsProvider {
|
|
1421
1421
|
constructor(privateAPI, editorPointer, controllerRef, dataItemTarget, name) {
|
|
@@ -1472,7 +1472,7 @@ class BindingsProvidersSDKShape extends BaseSDKShape {
|
|
|
1472
1472
|
);
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
var index = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1475
|
+
var index$2 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1476
1476
|
|
|
1477
1477
|
class ProvidersPublicSDKShape extends BaseSDKShape {
|
|
1478
1478
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1626,6 +1626,46 @@ class WorkspaceHost {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
1628
|
|
|
1629
|
+
class RoutersSDKShape extends BaseSDKShape {
|
|
1630
|
+
constructor(overriddenApplicationContext = null) {
|
|
1631
|
+
super(overriddenApplicationContext);
|
|
1632
|
+
this.overriddenApplicationContext = overriddenApplicationContext;
|
|
1633
|
+
}
|
|
1634
|
+
async isValidPrefix(prefix) {
|
|
1635
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1636
|
+
return privateAPI.routers.isValidPrefix(prefix);
|
|
1637
|
+
}
|
|
1638
|
+
async list() {
|
|
1639
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1640
|
+
return privateAPI.routers.list();
|
|
1641
|
+
}
|
|
1642
|
+
async add(extensionId) {
|
|
1643
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1644
|
+
return privateAPI.routers.add(extensionId);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
var index$1 = new PlatformSDKShape(RoutersSDKShape).withPublicMethod("isValidPrefix").withPublicMethod("list").withPublicMethod("add").build();
|
|
1648
|
+
|
|
1649
|
+
class PagesSDKShape extends BaseSDKShape {
|
|
1650
|
+
constructor(overriddenApplicationContext = null) {
|
|
1651
|
+
super(overriddenApplicationContext);
|
|
1652
|
+
this.overriddenApplicationContext = overriddenApplicationContext;
|
|
1653
|
+
}
|
|
1654
|
+
async list() {
|
|
1655
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1656
|
+
return privateAPI.pages.list();
|
|
1657
|
+
}
|
|
1658
|
+
async addTemplate(templateId) {
|
|
1659
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1660
|
+
return privateAPI.pages.addTemplate(templateId);
|
|
1661
|
+
}
|
|
1662
|
+
async addExtension(extensionId) {
|
|
1663
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1664
|
+
return privateAPI.pages.addExtension(extensionId);
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
var index = new PlatformSDKShape(PagesSDKShape).withPublicMethod("list").withPublicMethod("addTemplate").withPublicMethod("addExtension").build();
|
|
1668
|
+
|
|
1629
1669
|
const frame = () => {
|
|
1630
1670
|
const queryParams = new URLSearchParams(window.location.search);
|
|
1631
1671
|
const essentialsQueryParamValue = queryParams.has("essentials") ? JSON.parse(queryParams.get("essentials")) : void 0;
|
|
@@ -1682,26 +1722,30 @@ const editor = {
|
|
|
1682
1722
|
|
|
1683
1723
|
exports.BaseSDKShape = BaseSDKShape;
|
|
1684
1724
|
exports.ElementSDKShape = ElementSDKShape;
|
|
1725
|
+
exports.PagesSDKShape = PagesSDKShape;
|
|
1685
1726
|
exports.PlatformSDKShape = PlatformSDKShape;
|
|
1686
1727
|
exports.ReactElementsSDKShape = ElementSDKShape;
|
|
1728
|
+
exports.RoutersSDKShape = RoutersSDKShape;
|
|
1687
1729
|
exports.Workspace = Workspace;
|
|
1688
1730
|
exports.WorkspaceHost = WorkspaceHost;
|
|
1689
|
-
exports.application = index$
|
|
1731
|
+
exports.application = index$f;
|
|
1690
1732
|
exports.bindings = bindingsPublicSDKShape;
|
|
1691
|
-
exports.bindingsProviders = index;
|
|
1692
|
-
exports.cmsBindings = index$
|
|
1693
|
-
exports.controllers = index$
|
|
1733
|
+
exports.bindingsProviders = index$2;
|
|
1734
|
+
exports.cmsBindings = index$3;
|
|
1735
|
+
exports.controllers = index$4;
|
|
1694
1736
|
exports.editor = editor;
|
|
1695
|
-
exports.element = index$
|
|
1696
|
-
exports.elements = index$
|
|
1697
|
-
exports.events = index$
|
|
1698
|
-
exports.externalPanels = index$
|
|
1699
|
-
exports.info = index$
|
|
1700
|
-
exports.inputs = index$
|
|
1701
|
-
exports.modals = index$
|
|
1702
|
-
exports.
|
|
1703
|
-
exports.
|
|
1737
|
+
exports.element = index$7;
|
|
1738
|
+
exports.elements = index$d;
|
|
1739
|
+
exports.events = index$e;
|
|
1740
|
+
exports.externalPanels = index$5;
|
|
1741
|
+
exports.info = index$c;
|
|
1742
|
+
exports.inputs = index$a;
|
|
1743
|
+
exports.modals = index$8;
|
|
1744
|
+
exports.pages = index;
|
|
1745
|
+
exports.panels = index$9;
|
|
1746
|
+
exports.preferences = index$6;
|
|
1704
1747
|
exports.providers = providersPublicSDKShape;
|
|
1705
|
-
exports.reactElements = index$
|
|
1706
|
-
exports.
|
|
1748
|
+
exports.reactElements = index$7;
|
|
1749
|
+
exports.routers = index$1;
|
|
1750
|
+
exports.widget = index$b;
|
|
1707
1751
|
//# sourceMappingURL=index.js.map
|