@wix/editor 1.543.0 → 1.545.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.
@@ -1521,6 +1521,10 @@
1521
1521
  this.childPath = childPath;
1522
1522
  }
1523
1523
  // uses the bindings map to bind component props to provider items
1524
+ /**
1525
+ * @deprecated Use {@link setBinding} instead, which takes a flat
1526
+ * property-name -> binding dictionary with provider details inlined.
1527
+ */
1524
1528
  async bind(bindings) {
1525
1529
  const privateAPI = await this.getPlatformPrivateAPI();
1526
1530
  const manifestContextId = await this.getRequiredManifestContextId();
@@ -1531,6 +1535,16 @@
1531
1535
  );
1532
1536
  return result;
1533
1537
  }
1538
+ async setBinding(bindings) {
1539
+ const privateAPI = await this.getPlatformPrivateAPI();
1540
+ const manifestContextId = await this.getRequiredManifestContextId();
1541
+ const result = await privateAPI.bindings.setBinding(
1542
+ manifestContextId,
1543
+ this.childPath,
1544
+ bindings
1545
+ );
1546
+ return result;
1547
+ }
1534
1548
  // removes the bindings of specific props from the component and provider bindings map
1535
1549
  // if props is 'ALL' - unbinds all props from the component
1536
1550
  async unbind(props) {
@@ -1546,6 +1560,10 @@
1546
1560
  // gets the binding map for all attached providers of the editor pointer
1547
1561
  // providerTypes: optionally filter by provider types
1548
1562
  // includeDisplayNames: optionally add props and context items display names
1563
+ /**
1564
+ * @deprecated Use {@link getBinding} instead, which returns a flat
1565
+ * property-name -> binding dictionary with provider details inlined.
1566
+ */
1549
1567
  async listBindings(options) {
1550
1568
  const privateAPI = await this.getPlatformPrivateAPI();
1551
1569
  const manifestContextId = await this.getRequiredManifestContextId();
@@ -1556,6 +1574,19 @@
1556
1574
  );
1557
1575
  return result;
1558
1576
  }
1577
+ // gets the flat property-name -> binding map for all attached providers of the editor pointer
1578
+ // providerTypes: optionally filter by provider types
1579
+ // includeDisplayNames: optionally add context items display names
1580
+ async getBinding(options) {
1581
+ const privateAPI = await this.getPlatformPrivateAPI();
1582
+ const manifestContextId = await this.getRequiredManifestContextId();
1583
+ const result = await privateAPI.bindings.getBinding(
1584
+ manifestContextId,
1585
+ this.childPath,
1586
+ options
1587
+ );
1588
+ return result;
1589
+ }
1559
1590
  async findBindingCandidates(bindingTargetDetails, options) {
1560
1591
  const privateAPI = await this.getPlatformPrivateAPI();
1561
1592
  const manifestContextId = await this.getRequiredManifestContextId();
@@ -1578,7 +1609,7 @@
1578
1609
  }
1579
1610
  const bindingsPublicSDKShape = new PlatformSDKShape(
1580
1611
  BindingsPublicSDKShape
1581
- ).withPublicMethod("bind").withPublicMethod("unbind").withPublicMethod("listBindings").withPublicMethod("findBindingCandidates").withPublicMethod("selectBinding").build();
1612
+ ).withPublicMethod("bind").withPublicMethod("setBinding").withPublicMethod("unbind").withPublicMethod("listBindings").withPublicMethod("getBinding").withPublicMethod("findBindingCandidates").withPublicMethod("selectBinding").build();
1582
1613
 
1583
1614
  class Workspace {
1584
1615
  constructor(applicationContext) {