@adobe/ccweb-add-on-sdk-types 1.6.1 → 1.7.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/package.json +1 -1
- package/ui/ui-sdk.d.ts +32 -1
package/package.json
CHANGED
package/ui/ui-sdk.d.ts
CHANGED
|
@@ -130,6 +130,10 @@ export declare enum AppEvent {
|
|
|
130
130
|
* triggered when the locale is changed in the application.
|
|
131
131
|
*/
|
|
132
132
|
localechange = "localechange",
|
|
133
|
+
/**
|
|
134
|
+
* triggered when the regional format is changed in the application.
|
|
135
|
+
*/
|
|
136
|
+
formatchange = "formatchange",
|
|
133
137
|
/**
|
|
134
138
|
* triggered when drag is started on the currently dragged element.
|
|
135
139
|
*/
|
|
@@ -157,6 +161,7 @@ export declare type AppEventHandlerType<Event extends AppEventType> = (data: App
|
|
|
157
161
|
declare interface AppEventsTypeMap {
|
|
158
162
|
[AppEvent.themechange]: AppThemeChangeEventData;
|
|
159
163
|
[AppEvent.localechange]: AppLocaleChangeEventData;
|
|
164
|
+
[AppEvent.formatchange]: AppFormatChangeEventData;
|
|
160
165
|
[AppEvent.dragstart]: AppDragStartEventData;
|
|
161
166
|
[AppEvent.dragend]: AppDragEndEventData;
|
|
162
167
|
|
|
@@ -166,6 +171,13 @@ declare interface AppEventsTypeMap {
|
|
|
166
171
|
|
|
167
172
|
export declare type AppEventType = keyof AppEventsTypeMap & string;
|
|
168
173
|
|
|
174
|
+
/**
|
|
175
|
+
* The payload data sent to the App FormatChange event handler.
|
|
176
|
+
*/
|
|
177
|
+
export declare interface AppFormatChangeEventData {
|
|
178
|
+
format: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
169
181
|
/**
|
|
170
182
|
* Interface that represents the underlying Application.
|
|
171
183
|
*/
|
|
@@ -212,9 +224,14 @@ declare interface ApplicationBase {
|
|
|
212
224
|
* Enable drag to document on the given element
|
|
213
225
|
* @param element - Element to enable drag on.
|
|
214
226
|
* @param dragCallbacks - Interface to pass all drag realated callbacks (previewCallback & completionCallback).
|
|
227
|
+
* @param dragOptions - Interface to pass all drag related options.
|
|
215
228
|
* @returns DisableDragToDocument - Callback to undo the changes made by enableDragToDocument
|
|
216
229
|
*/
|
|
217
|
-
enableDragToDocument(
|
|
230
|
+
enableDragToDocument(
|
|
231
|
+
element: HTMLElement,
|
|
232
|
+
dragCallbacks: DragCallbacks,
|
|
233
|
+
dragOptions?: DragOptions
|
|
234
|
+
): DisableDragToDocument;
|
|
218
235
|
/**
|
|
219
236
|
* @experimental - Experimental API
|
|
220
237
|
* Register iframe with the add-on SDK.
|
|
@@ -685,6 +702,16 @@ export declare interface DragCompletionData {
|
|
|
685
702
|
attributes?: MediaAttributes;
|
|
686
703
|
}
|
|
687
704
|
|
|
705
|
+
/**
|
|
706
|
+
* Interface to provide drag options which can be passed to enableDragToDocument to change the drag behavior.
|
|
707
|
+
*/
|
|
708
|
+
declare interface DragOptions {
|
|
709
|
+
/**
|
|
710
|
+
* Use preview size for the drag image instead of the element size
|
|
711
|
+
*/
|
|
712
|
+
usePreviewSizeForDragImage?: boolean;
|
|
713
|
+
}
|
|
714
|
+
|
|
688
715
|
export declare type DragPreviewCallback = (element: HTMLElement) => URL;
|
|
689
716
|
|
|
690
717
|
/**
|
|
@@ -1413,6 +1440,10 @@ export declare interface UI {
|
|
|
1413
1440
|
* Current locale of the application
|
|
1414
1441
|
*/
|
|
1415
1442
|
readonly locale: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Current regional format of the application
|
|
1445
|
+
*/
|
|
1446
|
+
readonly format: string;
|
|
1416
1447
|
/**
|
|
1417
1448
|
* Supported locales of the application
|
|
1418
1449
|
*/
|