@wix/editor 1.652.0 → 1.653.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 +50 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +34 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/statics/docs-ts-model.json +191 -191
- package/dist/statics/index.js +50 -29
- package/dist/statics/index.js.map +1 -1
- package/dist/types/index.d.ts +30 -17
- package/package.json +5 -5
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$g = 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$f = 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$e = new PlatformSDKShape(ElementsSDKShape).withPublicMethod("onSelectionChange").withPublicMethod("getSelection").build();
|
|
196
196
|
|
|
197
197
|
class InfoSDKShape extends BaseSDKShape {
|
|
198
198
|
async getViewMode() {
|
|
@@ -232,7 +232,7 @@ class InfoSDKShape extends BaseSDKShape {
|
|
|
232
232
|
return privateAPI.info.getMetaSiteId();
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
var index$
|
|
235
|
+
var index$d = new PlatformSDKShape(InfoSDKShape).withPublicMethod("getViewMode").withPublicMethod("getLanguageCode").withPublicMethod("getLocales").withPublicMethod("getSiteDirection").withPublicMethod("siteHasCustomClasses").withPublicMethod("getThemeCustomProperties").withPublicMethod("getSiteFonts").withPublicMethod("getFontFamilyDisplayName").withPublicMethod("getMetaSiteId").build();
|
|
236
236
|
|
|
237
237
|
var WidgetShapeErrorCode = /* @__PURE__ */ ((WidgetShapeErrorCode2) => {
|
|
238
238
|
WidgetShapeErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -408,7 +408,7 @@ class WidgetSDKShape extends BaseSDKShape {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
const widgetShape = new PlatformSDKShape(WidgetSDKShape).withPublicMethod("getNestedWidget").withPublicMethod("setDesignPreset").withPublicMethod("getDesignPreset").withPublicMethod("setProp").withPublicMethod("getProp").withPublicMethod("setPreloadFonts");
|
|
411
|
-
var index$
|
|
411
|
+
var index$c = widgetShape.build();
|
|
412
412
|
|
|
413
413
|
function fontValueToCSS(fontValue) {
|
|
414
414
|
return `${fontValue.cssVariableName ? `var(${fontValue.cssVariableName}, ` : ""}${fontValue.italic ? "italic " : ""}${fontValue.bold ? "bold " : ""}${fontValue.size || 16}px ${// wrap each font family with quotes
|
|
@@ -508,7 +508,7 @@ class InputsSDKShape extends BaseSDKShape {
|
|
|
508
508
|
return _value;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
var index$
|
|
511
|
+
var index$b = new PlatformSDKShape(InputsSDKShape).withPublicMethod("selectColor").withPublicMethod("selectFont").build();
|
|
512
512
|
|
|
513
513
|
class PanelsSDKShape extends BaseSDKShape {
|
|
514
514
|
async openLanguageSupportPanel() {
|
|
@@ -520,7 +520,7 @@ class PanelsSDKShape extends BaseSDKShape {
|
|
|
520
520
|
return privateAPI.panels.openFontsUploadPanel();
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
var index$
|
|
523
|
+
var index$a = new PlatformSDKShape(PanelsSDKShape).withPublicMethod("openLanguageSupportPanel").withPublicMethod("openFontsUploadPanel").build();
|
|
524
524
|
|
|
525
525
|
class ModalsSDKShape extends BaseSDKShape {
|
|
526
526
|
async openDashboardModal(options) {
|
|
@@ -531,7 +531,7 @@ class ModalsSDKShape extends BaseSDKShape {
|
|
|
531
531
|
);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
var index$
|
|
534
|
+
var index$9 = new PlatformSDKShape(ModalsSDKShape).withPublicMethod("openDashboardModal").build();
|
|
535
535
|
|
|
536
536
|
class ElementSDKShape extends BaseSDKShape {
|
|
537
537
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1304,7 +1304,7 @@ class ElementSDKShape extends BaseSDKShape {
|
|
|
1304
1304
|
);
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
var index$
|
|
1307
|
+
var index$8 = 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("selectSort").withPublicMethod("selectFilter").withPublicMethod("selectColor").withPublicMethod("selectBackground").withPublicMethod("selectFontWeight").withPublicMethod("selectTextTheme").withPublicMethod("getArrayItemsSelectedIndex").withPublicMethod("setArrayItemsSelectedIndex").withPublicMethod("resetArrayItemsSelectedIndex").withPublicMethod("getBiToken").build();
|
|
1308
1308
|
|
|
1309
1309
|
class PreferencesSDKShape extends BaseSDKShape {
|
|
1310
1310
|
async get(keys) {
|
|
@@ -1322,7 +1322,7 @@ class PreferencesSDKShape extends BaseSDKShape {
|
|
|
1322
1322
|
);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
var index$
|
|
1325
|
+
var index$7 = new PlatformSDKShape(PreferencesSDKShape).withPublicMethod("set").withPublicMethod("get").build();
|
|
1326
1326
|
|
|
1327
1327
|
class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
1328
1328
|
async getData() {
|
|
@@ -1364,7 +1364,7 @@ class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
|
1364
1364
|
return privateAPI.externalPanels.translate(key, values);
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
|
-
var index$
|
|
1367
|
+
var index$6 = new PlatformSDKShape(ExternalPanelsSDKShape).withPublicMethod("getTheme").withPublicMethod("getData").withPublicMethod("getStyle").withPublicMethod("selectColor").withPublicMethod("selectLink").withPublicMethod("selectMedia").withPublicMethod("setData").withPublicMethod("setStyle").withPublicMethod("translate").build();
|
|
1368
1368
|
|
|
1369
1369
|
var ControllersErrorCode = /* @__PURE__ */ ((ControllersErrorCode2) => {
|
|
1370
1370
|
ControllersErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -1395,7 +1395,7 @@ class ControllersSDKShape extends BaseSDKShape {
|
|
|
1395
1395
|
);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
var index$
|
|
1398
|
+
var index$5 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
|
|
1399
1399
|
|
|
1400
1400
|
class CmsBindingConnectionItem {
|
|
1401
1401
|
constructor(privateAPI, pointer, bindingTarget, config) {
|
|
@@ -1440,7 +1440,7 @@ class CmsBindingsSDKShape extends BaseSDKShape {
|
|
|
1440
1440
|
);
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
var index$
|
|
1443
|
+
var index$4 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
|
|
1444
1444
|
|
|
1445
1445
|
class BindingsProvider {
|
|
1446
1446
|
constructor(privateAPI, editorPointer, controllerRef, dataItemTarget, name) {
|
|
@@ -1497,7 +1497,7 @@ class BindingsProvidersSDKShape extends BaseSDKShape {
|
|
|
1497
1497
|
);
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
var index$
|
|
1500
|
+
var index$3 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1501
1501
|
|
|
1502
1502
|
class ProvidersPublicSDKShape extends BaseSDKShape {
|
|
1503
1503
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1638,6 +1638,25 @@ const bindingsPublicSDKShape = new PlatformSDKShape(
|
|
|
1638
1638
|
BindingsPublicSDKShape
|
|
1639
1639
|
).withPublicMethod("bind").withPublicMethod("setBinding").withPublicMethod("unbind").withPublicMethod("listBindings").withPublicMethod("getBinding").withPublicMethod("findBindingCandidates").withPublicMethod("selectBinding").build();
|
|
1640
1640
|
|
|
1641
|
+
class ContextActionsSDKShape extends BaseSDKShape {
|
|
1642
|
+
/**
|
|
1643
|
+
* Resolves the context actions a provider declared on its manifest into
|
|
1644
|
+
* ready-to-run commands. Each command carries
|
|
1645
|
+
* `{ actionName, displayName, description?, execute }` — the
|
|
1646
|
+
* `providerIdentifier` is baked into `execute` at resolution time, so the
|
|
1647
|
+
* caller supplies only what is runtime-known
|
|
1648
|
+
* (`openItem`/`editItem` require `{ sourceItemId }`).
|
|
1649
|
+
*/
|
|
1650
|
+
async getContextActions(options) {
|
|
1651
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1652
|
+
return privateAPI.contextActions.getContextActions(
|
|
1653
|
+
options.providerIdentifier,
|
|
1654
|
+
options.actionNames
|
|
1655
|
+
);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
var index$2 = new PlatformSDKShape(ContextActionsSDKShape).withPublicMethod("getContextActions").build();
|
|
1659
|
+
|
|
1641
1660
|
class Workspace {
|
|
1642
1661
|
constructor(applicationContext) {
|
|
1643
1662
|
this.applicationContext = applicationContext;
|
|
@@ -1800,5 +1819,5 @@ const editor = {
|
|
|
1800
1819
|
auth
|
|
1801
1820
|
};
|
|
1802
1821
|
|
|
1803
|
-
export { BaseSDKShape, ElementSDKShape, PagesSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, index$
|
|
1822
|
+
export { BaseSDKShape, ContextActionsSDKShape, ElementSDKShape, PagesSDKShape, PlatformSDKShape, ElementSDKShape as ReactElementsSDKShape, RoutersSDKShape, Workspace, WorkspaceHost, index$g as application, bindingsPublicSDKShape as bindings, index$3 as bindingsProviders, index$4 as cmsBindings, index$2 as contextActions, index$5 as controllers, editor, index$8 as element, index$e as elements, index$f as events, index$6 as externalPanels, index$d as info, index$b as inputs, index$9 as modals, index as pages, index$a as panels, index$7 as preferences, providersPublicSDKShape as providers, index$8 as reactElements, index$1 as routers, index$c as widget };
|
|
1804
1823
|
//# sourceMappingURL=index.js.map
|