@wix/public-editor-platform-interfaces 1.72.0 → 1.74.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.
@@ -1,4 +1,4 @@
1
- import { FunctionParameter } from '@wix/app-extensions/trusted';
1
+ import { DataType, FunctionParameter } from '@wix/app-extensions/trusted';
2
2
  import { ElementDataDefinition } from './sdk';
3
3
  import { AttachState, ProviderArrayItem, ProviderFunctionItem, ProviderObjectItem, ProviderSimpleItem, ProviderTextEnumItem, ProviderType } from './Providers';
4
4
  export declare const UNBIND_ALL: "ALL";
@@ -59,8 +59,15 @@ export interface ListBindingsOptions {
59
59
  providerIdentifiers?: string[];
60
60
  providerTypes?: ProviderType[];
61
61
  }
62
+ export type Converter = ProviderFunctionItem & {
63
+ providerIdentifier: string;
64
+ providerType: ProviderType.FunctionLibrary;
65
+ };
62
66
  export type BaseCandidate = {
63
67
  itemPath: string;
68
+ providerIdentifier: string;
69
+ providerType: ProviderType;
70
+ withConverter?: Converter;
64
71
  };
65
72
  export type SimpleCandidate = ProviderSimpleItem & BaseCandidate;
66
73
  export type TextEnumCandidate = ProviderTextEnumItem & BaseCandidate;
@@ -83,6 +90,8 @@ export type BindingDetails = {
83
90
  providerIdentifier: string;
84
91
  providerItem: PropertyBinding;
85
92
  providerDisplayName?: string;
93
+ bindingDisplayName?: string;
94
+ bindingItemType?: DataType;
86
95
  };
87
96
  export type BindingDetailsMap = Record<string, BindingDetails>;
88
97
  export type SelectBindingOptions = {
@@ -94,5 +103,6 @@ export type SelectBindingOptions = {
94
103
  };
95
104
  export type findBindingCandidatesOptions = {
96
105
  filterAttachState?: AttachState[];
106
+ includeCandidatesWithConverters?: boolean;
97
107
  };
98
108
  export type OverriddenSelectBindingOptions = SelectBindingOptions | ((options: SelectBindingOptions) => SelectBindingOptions);
package/dist/Element.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { ElementData, ElementDataInput, ElementDataValue, ElementLink } from './sdk/data';
1
+ import type { ElementData, ElementDataInput, ElementDataValue, ElementLink, ElementSort } from './sdk/data';
2
2
  import type { ElementStyles, ElementStylesUpdate, ElementStylesRemoval } from './sdk/styles';
3
3
  import type { ElementDataDefinitions, ElementPresetDefinitions, ElementStateDefinitions, ElementStyleDefinitions } from './sdk/definitions';
4
- import type { IPickerModes, IFontFamily, IFontWeight, IFontFamilyAndWeight, ISelectLinkSharedOptions, IPanelOptions, SelectFontParams, SelectFontFamilyParams, SelectFontWeightParams, SelectMediaParams, SelectLinkParams, SelectColorParams, SelectTextThemeParams, SelectedTextTheme } from './sdk/pickers';
4
+ import type { IPickerModes, IFontFamily, IFontWeight, IFontFamilyAndWeight, ISelectLinkSharedOptions, IPanelOptions, SelectFontParams, SelectFontFamilyParams, SelectFontWeightParams, SelectMediaParams, SelectLinkParams, SelectSortParams, SelectColorParams, SelectTextThemeParams, SelectedTextTheme } from './sdk/pickers';
5
5
  import type { BackgroundPickerOptions } from './Inputs';
6
- export type { IPickerModes, IFontFamily, IFontWeight, IFontFamilyAndWeight, ISelectLinkSharedOptions, IPanelOptions, SelectFontParams, SelectFontFamilyParams, SelectFontWeightParams, SelectMediaParams, SelectLinkParams, SelectColorParams, SelectTextThemeParams, SelectedTextTheme, };
6
+ export type { IPickerModes, IFontFamily, IFontWeight, IFontFamilyAndWeight, ISelectLinkSharedOptions, IPanelOptions, SelectFontParams, SelectFontFamilyParams, SelectFontWeightParams, SelectMediaParams, SelectLinkParams, SelectSortParams, SelectColorParams, SelectTextThemeParams, SelectedTextTheme, };
7
7
  /**
8
8
  * Use `reactElements` from `@wix/editor` in a custom panel to read and update the component's styles,
9
9
  * data, presets, and states, and to open editor pickers. Picker methods use {@link IPickerModes}. See each `select*` method for its parameter type.
@@ -431,6 +431,19 @@ export interface IElementSDK {
431
431
  * ```
432
432
  */
433
433
  selectLink(params: SelectLinkParams): Promise<ElementLink | null | undefined>;
434
+ /**
435
+ * Opens the WQL sort panel for a sort data item.
436
+ *
437
+ * @param params - See {@link SelectSortParams} and {@link IPickerModes}.
438
+ *
439
+ * @example
440
+ * ```ts
441
+ * import { reactElements } from '@wix/editor';
442
+ *
443
+ * const sort = await reactElements.selectSort({ dataItemKey: 'productSort' });
444
+ * ```
445
+ */
446
+ selectSort(params: SelectSortParams): Promise<ElementSort | undefined>;
434
447
  /**
435
448
  * Opens the color picker for selecting a color.
436
449
  *
@@ -1,9 +1,10 @@
1
1
  import type { ElementLink } from './data';
2
2
  /**
3
- * Each {@link IElementSDK | `reactElements`} `select*` method accepts one of two types of arguments:
3
+ * Most {@link IElementSDK | `reactElements`} `select*` methods accept one of two types of arguments:
4
4
  * a manifest key for automatic editor handling, or explicit options to manage the value yourself.
5
5
  * Use manifest-key mode to let the editor connect the picker to a manifest-backed data or style field.
6
6
  * Use explicit-options mode when your panel owns the selected value and handles callbacks itself.
7
+ * Some picker methods are currently manifest-key only.
7
8
  *
8
9
  * @see IElementSDK.selectFont
9
10
  * @see IElementSDK.selectFontFamily
@@ -149,6 +150,14 @@ export type SelectLinkParams = {
149
150
  linkTypes?: string[];
150
151
  };
151
152
  };
153
+ /**
154
+ * Options for {@link IElementSDK.selectSort | `reactElements.selectSort()`}.
155
+ * Pass a manifest key for automatic editor handling. See {@link IPickerModes}.
156
+ */
157
+ export type SelectSortParams = {
158
+ /** Pass a manifest key: field connected to `dataItemKey` in the manifest. See {@link IPickerModes}. */
159
+ dataItemKey: string;
160
+ };
152
161
  /**
153
162
  * Options for {@link IElementSDK.selectColor | `reactElements.selectColor()`}.
154
163
  * Pass either a manifest key or explicit options. See {@link IPickerModes}. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/public-editor-platform-interfaces",
3
- "version": "1.72.0",
3
+ "version": "1.74.0",
4
4
  "license": "UNLICENSED",
5
5
  "contributors": [
6
6
  {
@@ -52,5 +52,5 @@
52
52
  ]
53
53
  }
54
54
  },
55
- "falconPackageHash": "8c6f1695e6f874f0f6b2616f3ac0441b996f03db1eb5f1f5c927dc49"
55
+ "falconPackageHash": "781a49201f22dd23ee12cfb1c7246af61e393f47273602685a673800"
56
56
  }