@wix/editor 1.521.0 → 1.523.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/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$e = new PlatformSDKShape(ApplicationSDKShape).withPublicMethod("getPrivateAPI").withPublicMethod("getPublicAPI").withPublicMethod("getAppInstance").build();
169
+ var index$f = 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$d = new PlatformSDKShape(EventsSDKShape).withPublicMethod("addEventListener").build();
176
+ var index$e = 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$c = new PlatformSDKShape(ElementsSDKShape).withPublicMethod("onSelectionChange").withPublicMethod("getSelection").build();
195
+ var index$d = 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$b = new PlatformSDKShape(InfoSDKShape).withPublicMethod("getViewMode").withPublicMethod("getLanguageCode").withPublicMethod("getSiteDirection").withPublicMethod("siteHasCustomClasses").withPublicMethod("getThemeCustomProperties").withPublicMethod("getSiteFonts").withPublicMethod("getFontFamilyDisplayName").withPublicMethod("getMetaSiteId").build();
231
+ var index$c = 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$a = widgetShape.build();
407
+ var index$b = 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$9 = new PlatformSDKShape(InputsSDKShape).withPublicMethod("selectColor").withPublicMethod("selectFont").build();
507
+ var index$a = 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$8 = new PlatformSDKShape(PanelsSDKShape).withPublicMethod("openLanguageSupportPanel").withPublicMethod("openFontsUploadPanel").build();
519
+ var index$9 = 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$7 = new PlatformSDKShape(ModalsSDKShape).withPublicMethod("openDashboardModal").build();
530
+ var index$8 = 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$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();
1280
+ 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();
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$5 = new PlatformSDKShape(PreferencesSDKShape).withPublicMethod("set").withPublicMethod("get").build();
1298
+ var index$6 = 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$4 = new PlatformSDKShape(ExternalPanelsSDKShape).withPublicMethod("getTheme").withPublicMethod("getData").withPublicMethod("getStyle").withPublicMethod("selectColor").withPublicMethod("selectLink").withPublicMethod("selectMedia").withPublicMethod("setData").withPublicMethod("setStyle").withPublicMethod("translate").build();
1340
+ 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();
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$3 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
1371
+ var index$4 = 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$2 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
1416
+ var index$3 = 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$1 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
1473
+ var index$2 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
1474
1474
 
1475
1475
  class ProvidersPublicSDKShape extends BaseSDKShape {
1476
1476
  constructor(overriddenApplicationContext = null, childPath = []) {
@@ -1642,7 +1642,27 @@ class RoutersSDKShape extends BaseSDKShape {
1642
1642
  return privateAPI.routers.add(extensionId);
1643
1643
  }
1644
1644
  }
1645
- var index = new PlatformSDKShape(RoutersSDKShape).withPublicMethod("isValidPrefix").withPublicMethod("list").withPublicMethod("add").build();
1645
+ var index$1 = new PlatformSDKShape(RoutersSDKShape).withPublicMethod("isValidPrefix").withPublicMethod("list").withPublicMethod("add").build();
1646
+
1647
+ class PagesSDKShape extends BaseSDKShape {
1648
+ constructor(overriddenApplicationContext = null) {
1649
+ super(overriddenApplicationContext);
1650
+ this.overriddenApplicationContext = overriddenApplicationContext;
1651
+ }
1652
+ async list() {
1653
+ const privateAPI = await this.getPlatformPrivateAPI();
1654
+ return privateAPI.pages.list();
1655
+ }
1656
+ async addTemplate(templateId) {
1657
+ const privateAPI = await this.getPlatformPrivateAPI();
1658
+ return privateAPI.pages.addTemplate(templateId);
1659
+ }
1660
+ async addExtension(extensionId) {
1661
+ const privateAPI = await this.getPlatformPrivateAPI();
1662
+ return privateAPI.pages.addExtension(extensionId);
1663
+ }
1664
+ }
1665
+ var index = new PlatformSDKShape(PagesSDKShape).withPublicMethod("list").withPublicMethod("addTemplate").withPublicMethod("addExtension").build();
1646
1666
 
1647
1667
  const frame = () => {
1648
1668
  const queryParams = new URLSearchParams(window.location.search);
@@ -1698,5 +1718,5 @@ const editor = {
1698
1718
  auth
1699
1719
  };
1700
1720
 
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 };
1721
+ export { BaseSDKShape, ElementSDKShape, PagesSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, index$f as application, bindingsPublicSDKShape as bindings, index$2 as bindingsProviders, index$3 as cmsBindings, index$4 as controllers, editor, index$7 as element, index$d as elements, index$e as events, index$5 as externalPanels, index$c as info, index$a as inputs, index$8 as modals, index as pages, index$9 as panels, index$6 as preferences, providersPublicSDKShape as providers, index$7 as reactElements, index$1 as routers, index$b as widget };
1702
1722
  //# sourceMappingURL=index.js.map