@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/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$g = 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$f = 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$e = new PlatformSDKShape(ElementsSDKShape).withPublicMethod("onSelectionChange").withPublicMethod("getSelection").build();
|
|
198
198
|
|
|
199
199
|
class InfoSDKShape extends BaseSDKShape {
|
|
200
200
|
async getViewMode() {
|
|
@@ -234,7 +234,7 @@ class InfoSDKShape extends BaseSDKShape {
|
|
|
234
234
|
return privateAPI.info.getMetaSiteId();
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
var index$
|
|
237
|
+
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();
|
|
238
238
|
|
|
239
239
|
var WidgetShapeErrorCode = /* @__PURE__ */ ((WidgetShapeErrorCode2) => {
|
|
240
240
|
WidgetShapeErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -410,7 +410,7 @@ class WidgetSDKShape extends BaseSDKShape {
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
const widgetShape = new PlatformSDKShape(WidgetSDKShape).withPublicMethod("getNestedWidget").withPublicMethod("setDesignPreset").withPublicMethod("getDesignPreset").withPublicMethod("setProp").withPublicMethod("getProp").withPublicMethod("setPreloadFonts");
|
|
413
|
-
var index$
|
|
413
|
+
var index$c = widgetShape.build();
|
|
414
414
|
|
|
415
415
|
function fontValueToCSS(fontValue) {
|
|
416
416
|
return `${fontValue.cssVariableName ? `var(${fontValue.cssVariableName}, ` : ""}${fontValue.italic ? "italic " : ""}${fontValue.bold ? "bold " : ""}${fontValue.size || 16}px ${// wrap each font family with quotes
|
|
@@ -510,7 +510,7 @@ class InputsSDKShape extends BaseSDKShape {
|
|
|
510
510
|
return _value;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
var index$
|
|
513
|
+
var index$b = new PlatformSDKShape(InputsSDKShape).withPublicMethod("selectColor").withPublicMethod("selectFont").build();
|
|
514
514
|
|
|
515
515
|
class PanelsSDKShape extends BaseSDKShape {
|
|
516
516
|
async openLanguageSupportPanel() {
|
|
@@ -522,7 +522,7 @@ class PanelsSDKShape extends BaseSDKShape {
|
|
|
522
522
|
return privateAPI.panels.openFontsUploadPanel();
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
var index$
|
|
525
|
+
var index$a = new PlatformSDKShape(PanelsSDKShape).withPublicMethod("openLanguageSupportPanel").withPublicMethod("openFontsUploadPanel").build();
|
|
526
526
|
|
|
527
527
|
class ModalsSDKShape extends BaseSDKShape {
|
|
528
528
|
async openDashboardModal(options) {
|
|
@@ -533,7 +533,7 @@ class ModalsSDKShape extends BaseSDKShape {
|
|
|
533
533
|
);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
var index$
|
|
536
|
+
var index$9 = new PlatformSDKShape(ModalsSDKShape).withPublicMethod("openDashboardModal").build();
|
|
537
537
|
|
|
538
538
|
class ElementSDKShape extends BaseSDKShape {
|
|
539
539
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1306,7 +1306,7 @@ class ElementSDKShape extends BaseSDKShape {
|
|
|
1306
1306
|
);
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
var index$
|
|
1309
|
+
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();
|
|
1310
1310
|
|
|
1311
1311
|
class PreferencesSDKShape extends BaseSDKShape {
|
|
1312
1312
|
async get(keys) {
|
|
@@ -1324,7 +1324,7 @@ class PreferencesSDKShape extends BaseSDKShape {
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
var index$
|
|
1327
|
+
var index$7 = new PlatformSDKShape(PreferencesSDKShape).withPublicMethod("set").withPublicMethod("get").build();
|
|
1328
1328
|
|
|
1329
1329
|
class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
1330
1330
|
async getData() {
|
|
@@ -1366,7 +1366,7 @@ class ExternalPanelsSDKShape extends BaseSDKShape {
|
|
|
1366
1366
|
return privateAPI.externalPanels.translate(key, values);
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
|
-
var index$
|
|
1369
|
+
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();
|
|
1370
1370
|
|
|
1371
1371
|
var ControllersErrorCode = /* @__PURE__ */ ((ControllersErrorCode2) => {
|
|
1372
1372
|
ControllersErrorCode2["UndefinedCompRef"] = "UndefinedCompRef";
|
|
@@ -1397,7 +1397,7 @@ class ControllersSDKShape extends BaseSDKShape {
|
|
|
1397
1397
|
);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
var index$
|
|
1400
|
+
var index$5 = new PlatformSDKShape(ControllersSDKShape).withPublicMethod("get").build();
|
|
1401
1401
|
|
|
1402
1402
|
class CmsBindingConnectionItem {
|
|
1403
1403
|
constructor(privateAPI, pointer, bindingTarget, config) {
|
|
@@ -1442,7 +1442,7 @@ class CmsBindingsSDKShape extends BaseSDKShape {
|
|
|
1442
1442
|
);
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
var index$
|
|
1445
|
+
var index$4 = new PlatformSDKShape(CmsBindingsSDKShape).withPublicMethod("get").build();
|
|
1446
1446
|
|
|
1447
1447
|
class BindingsProvider {
|
|
1448
1448
|
constructor(privateAPI, editorPointer, controllerRef, dataItemTarget, name) {
|
|
@@ -1499,7 +1499,7 @@ class BindingsProvidersSDKShape extends BaseSDKShape {
|
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
var index$
|
|
1502
|
+
var index$3 = new PlatformSDKShape(BindingsProvidersSDKShape).withPublicMethod("list").build();
|
|
1503
1503
|
|
|
1504
1504
|
class ProvidersPublicSDKShape extends BaseSDKShape {
|
|
1505
1505
|
constructor(overriddenApplicationContext = null, childPath = []) {
|
|
@@ -1640,6 +1640,25 @@ const bindingsPublicSDKShape = new PlatformSDKShape(
|
|
|
1640
1640
|
BindingsPublicSDKShape
|
|
1641
1641
|
).withPublicMethod("bind").withPublicMethod("setBinding").withPublicMethod("unbind").withPublicMethod("listBindings").withPublicMethod("getBinding").withPublicMethod("findBindingCandidates").withPublicMethod("selectBinding").build();
|
|
1642
1642
|
|
|
1643
|
+
class ContextActionsSDKShape extends BaseSDKShape {
|
|
1644
|
+
/**
|
|
1645
|
+
* Resolves the context actions a provider declared on its manifest into
|
|
1646
|
+
* ready-to-run commands. Each command carries
|
|
1647
|
+
* `{ actionName, displayName, description?, execute }` — the
|
|
1648
|
+
* `providerIdentifier` is baked into `execute` at resolution time, so the
|
|
1649
|
+
* caller supplies only what is runtime-known
|
|
1650
|
+
* (`openItem`/`editItem` require `{ sourceItemId }`).
|
|
1651
|
+
*/
|
|
1652
|
+
async getContextActions(options) {
|
|
1653
|
+
const privateAPI = await this.getPlatformPrivateAPI();
|
|
1654
|
+
return privateAPI.contextActions.getContextActions(
|
|
1655
|
+
options.providerIdentifier,
|
|
1656
|
+
options.actionNames
|
|
1657
|
+
);
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
var index$2 = new PlatformSDKShape(ContextActionsSDKShape).withPublicMethod("getContextActions").build();
|
|
1661
|
+
|
|
1643
1662
|
class Workspace {
|
|
1644
1663
|
constructor(applicationContext) {
|
|
1645
1664
|
this.applicationContext = applicationContext;
|
|
@@ -1803,6 +1822,7 @@ const editor = {
|
|
|
1803
1822
|
};
|
|
1804
1823
|
|
|
1805
1824
|
exports.BaseSDKShape = BaseSDKShape;
|
|
1825
|
+
exports.ContextActionsSDKShape = ContextActionsSDKShape;
|
|
1806
1826
|
exports.ElementSDKShape = ElementSDKShape;
|
|
1807
1827
|
exports.PagesSDKShape = PagesSDKShape;
|
|
1808
1828
|
exports.PlatformSDKShape = PlatformSDKShape;
|
|
@@ -1810,24 +1830,25 @@ exports.ReactElementsSDKShape = ElementSDKShape;
|
|
|
1810
1830
|
exports.RoutersSDKShape = RoutersSDKShape;
|
|
1811
1831
|
exports.Workspace = Workspace;
|
|
1812
1832
|
exports.WorkspaceHost = WorkspaceHost;
|
|
1813
|
-
exports.application = index$
|
|
1833
|
+
exports.application = index$g;
|
|
1814
1834
|
exports.bindings = bindingsPublicSDKShape;
|
|
1815
|
-
exports.bindingsProviders = index$
|
|
1816
|
-
exports.cmsBindings = index$
|
|
1817
|
-
exports.
|
|
1835
|
+
exports.bindingsProviders = index$3;
|
|
1836
|
+
exports.cmsBindings = index$4;
|
|
1837
|
+
exports.contextActions = index$2;
|
|
1838
|
+
exports.controllers = index$5;
|
|
1818
1839
|
exports.editor = editor;
|
|
1819
|
-
exports.element = index$
|
|
1820
|
-
exports.elements = index$
|
|
1821
|
-
exports.events = index$
|
|
1822
|
-
exports.externalPanels = index$
|
|
1823
|
-
exports.info = index$
|
|
1824
|
-
exports.inputs = index$
|
|
1825
|
-
exports.modals = index$
|
|
1840
|
+
exports.element = index$8;
|
|
1841
|
+
exports.elements = index$e;
|
|
1842
|
+
exports.events = index$f;
|
|
1843
|
+
exports.externalPanels = index$6;
|
|
1844
|
+
exports.info = index$d;
|
|
1845
|
+
exports.inputs = index$b;
|
|
1846
|
+
exports.modals = index$9;
|
|
1826
1847
|
exports.pages = index;
|
|
1827
|
-
exports.panels = index$
|
|
1828
|
-
exports.preferences = index$
|
|
1848
|
+
exports.panels = index$a;
|
|
1849
|
+
exports.preferences = index$7;
|
|
1829
1850
|
exports.providers = providersPublicSDKShape;
|
|
1830
|
-
exports.reactElements = index$
|
|
1851
|
+
exports.reactElements = index$8;
|
|
1831
1852
|
exports.routers = index$1;
|
|
1832
|
-
exports.widget = index$
|
|
1853
|
+
exports.widget = index$c;
|
|
1833
1854
|
//# sourceMappingURL=index.js.map
|