@shopify/app-bridge-types 0.0.8 → 0.0.9
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/index.d.ts +4 -0
- package/package.json +1 -1
- package/shopify.ts +22 -0
package/index.d.ts
CHANGED
|
@@ -6,9 +6,11 @@ import type {
|
|
|
6
6
|
UIModalElement as BaseUIModalElement,
|
|
7
7
|
UINavMenuElement as BaseUINavMenuElement,
|
|
8
8
|
UITitleBarElement as BaseUITitleBarElement,
|
|
9
|
+
UISaveBarElement as BaseUISaveBarElement,
|
|
9
10
|
UIModalAttributes,
|
|
10
11
|
UINavMenuAttributes,
|
|
11
12
|
UITitleBarAttributes,
|
|
13
|
+
UISaveBarAttributes,
|
|
12
14
|
} from './shopify';
|
|
13
15
|
|
|
14
16
|
export {
|
|
@@ -16,6 +18,7 @@ export {
|
|
|
16
18
|
UIModalAttributes,
|
|
17
19
|
UINavMenuAttributes,
|
|
18
20
|
UITitleBarAttributes,
|
|
21
|
+
UISaveBarAttributes,
|
|
19
22
|
};
|
|
20
23
|
|
|
21
24
|
declare global {
|
|
@@ -28,6 +31,7 @@ declare global {
|
|
|
28
31
|
interface UIModalElement extends BaseUIModalElement {}
|
|
29
32
|
interface UINavMenuElement extends BaseUINavMenuElement {}
|
|
30
33
|
interface UITitleBarElement extends BaseUITitleBarElement {}
|
|
34
|
+
interface UISaveBarElement extends BaseUISaveBarElement {}
|
|
31
35
|
|
|
32
36
|
// Install property augmentations onto ReactElement prop definitions
|
|
33
37
|
namespace React {
|
package/package.json
CHANGED
package/shopify.ts
CHANGED
|
@@ -30,6 +30,7 @@ interface AppBridgeConfig {
|
|
|
30
30
|
export interface AppBridgeElements {
|
|
31
31
|
'ui-modal': UIModalAttributes;
|
|
32
32
|
'ui-nav-menu': UINavMenuAttributes;
|
|
33
|
+
'ui-save-bar': UISaveBarAttributes;
|
|
33
34
|
'ui-title-bar': UITitleBarAttributes;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -352,6 +353,11 @@ export interface ShopifyGlobal {
|
|
|
352
353
|
hide(id: string): Promise<void>;
|
|
353
354
|
toggle(id: string): Promise<void>;
|
|
354
355
|
};
|
|
356
|
+
saveBar: {
|
|
357
|
+
show(id: string): Promise<void>;
|
|
358
|
+
hide(id: string): Promise<void>;
|
|
359
|
+
toggle(id: string): Promise<void>;
|
|
360
|
+
};
|
|
355
361
|
pos: Pos;
|
|
356
362
|
}
|
|
357
363
|
|
|
@@ -391,6 +397,22 @@ interface UINavMenuElement_2 extends HTMLElement {
|
|
|
391
397
|
}
|
|
392
398
|
export type { UINavMenuElement_2 as UINavMenuElement }
|
|
393
399
|
|
|
400
|
+
export interface UISaveBarAttributes {
|
|
401
|
+
id?: string;
|
|
402
|
+
discardConfirmation?: boolean;
|
|
403
|
+
children?: any;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
interface UISaveBarElement_2 extends Omit<HTMLElement, 'addEventListener' | 'removeEventListener'> {
|
|
407
|
+
discardConfirmation?: boolean;
|
|
408
|
+
show(): Promise<void>;
|
|
409
|
+
hide(): Promise<void>;
|
|
410
|
+
toggle(): Promise<void>;
|
|
411
|
+
addEventListener(type: 'show' | 'hide', listener: EventListenerOrEventListenerObject): void;
|
|
412
|
+
removeEventListener(type: 'show' | 'hide', listener: EventListenerOrEventListenerObject): void;
|
|
413
|
+
}
|
|
414
|
+
export type { UISaveBarElement_2 as UISaveBarElement }
|
|
415
|
+
|
|
394
416
|
export interface UITitleBarAttributes {
|
|
395
417
|
title?: string;
|
|
396
418
|
children?: any;
|