@shopify/app-bridge-react 3.7.11-snapshot-20240220213625 → 4.0.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/LICENSE.md +7 -0
- package/README.md +98 -128
- package/dist/index.cjs +28 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +700 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -42
- package/components/ClientRouter/ClientRouter.d.ts +0 -23
- package/components/ClientRouter/ClientRouter.js +0 -52
- package/components/ClientRouter/hook.d.ts +0 -10
- package/components/ClientRouter/hook.js +0 -20
- package/components/ClientRouter/index.d.ts +0 -3
- package/components/ClientRouter/index.js +0 -10
- package/components/ClientRouter/router.d.ts +0 -5
- package/components/ClientRouter/router.js +0 -11
- package/components/ContextualSaveBar/ContextualSaveBar.d.ts +0 -9
- package/components/ContextualSaveBar/ContextualSaveBar.js +0 -24
- package/components/ContextualSaveBar/index.d.ts +0 -3
- package/components/ContextualSaveBar/index.js +0 -7
- package/components/Loading/Loading.d.ts +0 -19
- package/components/Loading/Loading.js +0 -55
- package/components/Loading/index.d.ts +0 -2
- package/components/Loading/index.js +0 -7
- package/components/Modal/Modal.d.ts +0 -32
- package/components/Modal/Modal.js +0 -140
- package/components/Modal/ModalContent/ModalContent.d.ts +0 -24
- package/components/Modal/ModalContent/ModalContent.js +0 -61
- package/components/Modal/ModalContent/index.d.ts +0 -2
- package/components/Modal/ModalContent/index.js +0 -7
- package/components/Modal/index.d.ts +0 -4
- package/components/Modal/index.js +0 -10
- package/components/NavigationMenu/NavigationMenu.d.ts +0 -18
- package/components/NavigationMenu/NavigationMenu.js +0 -44
- package/components/NavigationMenu/index.d.ts +0 -3
- package/components/NavigationMenu/index.js +0 -7
- package/components/Provider/Provider.d.ts +0 -87
- package/components/Provider/Provider.js +0 -81
- package/components/Provider/index.d.ts +0 -3
- package/components/Provider/index.js +0 -7
- package/components/ResourcePicker/ResourcePicker.d.ts +0 -36
- package/components/ResourcePicker/ResourcePicker.js +0 -120
- package/components/ResourcePicker/index.d.ts +0 -3
- package/components/ResourcePicker/index.js +0 -7
- package/components/RoutePropagator/RoutePropagator.d.ts +0 -22
- package/components/RoutePropagator/RoutePropagator.js +0 -54
- package/components/RoutePropagator/globals.d.ts +0 -3
- package/components/RoutePropagator/globals.js +0 -15
- package/components/RoutePropagator/hook.d.ts +0 -10
- package/components/RoutePropagator/hook.js +0 -20
- package/components/RoutePropagator/index.d.ts +0 -3
- package/components/RoutePropagator/index.js +0 -10
- package/components/RoutePropagator/route-propagator.d.ts +0 -7
- package/components/RoutePropagator/route-propagator.js +0 -91
- package/components/TitleBar/TitleBar.d.ts +0 -27
- package/components/TitleBar/TitleBar.js +0 -107
- package/components/TitleBar/index.d.ts +0 -3
- package/components/TitleBar/index.js +0 -7
- package/components/Toast/Toast.d.ts +0 -38
- package/components/Toast/Toast.js +0 -67
- package/components/Toast/index.d.ts +0 -3
- package/components/Toast/index.js +0 -7
- package/components/index.d.ts +0 -11
- package/components/index.js +0 -37
- package/components/unstable_Picker/index.d.ts +0 -3
- package/components/unstable_Picker/index.js +0 -7
- package/components/unstable_Picker/unstable_Picker.d.ts +0 -13
- package/components/unstable_Picker/unstable_Picker.js +0 -85
- package/context.d.ts +0 -14
- package/context.js +0 -10
- package/hooks/index.d.ts +0 -10
- package/hooks/index.js +0 -21
- package/hooks/useAppBridgeState/index.d.ts +0 -1
- package/hooks/useAppBridgeState/index.js +0 -13
- package/hooks/useAppBridgeState/useAppBridgeState.d.ts +0 -10
- package/hooks/useAppBridgeState/useAppBridgeState.js +0 -89
- package/hooks/useAuthenticatedFetch/index.d.ts +0 -1
- package/hooks/useAuthenticatedFetch/index.js +0 -13
- package/hooks/useAuthenticatedFetch/useAuthenticatedFetch.d.ts +0 -11
- package/hooks/useAuthenticatedFetch/useAuthenticatedFetch.js +0 -22
- package/hooks/useContextualSaveBar/index.d.ts +0 -1
- package/hooks/useContextualSaveBar/index.js +0 -5
- package/hooks/useContextualSaveBar/useContextualSaveBar.d.ts +0 -10
- package/hooks/useContextualSaveBar/useContextualSaveBar.js +0 -85
- package/hooks/useFeatureRequest/index.d.ts +0 -1
- package/hooks/useFeatureRequest/index.js +0 -13
- package/hooks/useFeatureRequest/useFeatureRequest.d.ts +0 -13
- package/hooks/useFeatureRequest/useFeatureRequest.js +0 -49
- package/hooks/useFeaturesAvailable/index.d.ts +0 -2
- package/hooks/useFeaturesAvailable/index.js +0 -5
- package/hooks/useFeaturesAvailable/useFeaturesAvailable.d.ts +0 -12
- package/hooks/useFeaturesAvailable/useFeaturesAvailable.js +0 -101
- package/hooks/useLocale/index.d.ts +0 -1
- package/hooks/useLocale/index.js +0 -5
- package/hooks/useLocale/useLocale.d.ts +0 -1
- package/hooks/useLocale/useLocale.js +0 -8
- package/hooks/useNavigate/index.d.ts +0 -1
- package/hooks/useNavigate/index.js +0 -5
- package/hooks/useNavigate/useNavigate.d.ts +0 -3
- package/hooks/useNavigate/useNavigate.js +0 -63
- package/hooks/useNavigationHistory/index.d.ts +0 -1
- package/hooks/useNavigationHistory/index.js +0 -5
- package/hooks/useNavigationHistory/useNavigationHistory.d.ts +0 -16
- package/hooks/useNavigationHistory/useNavigationHistory.js +0 -28
- package/hooks/useOnceEffect/index.d.ts +0 -1
- package/hooks/useOnceEffect/index.js +0 -13
- package/hooks/useOnceEffect/useOnceEffect.d.ts +0 -5
- package/hooks/useOnceEffect/useOnceEffect.js +0 -11
- package/hooks/useToast/index.d.ts +0 -1
- package/hooks/useToast/index.js +0 -5
- package/hooks/useToast/useToast.d.ts +0 -20
- package/hooks/useToast/useToast.js +0 -46
- package/index.d.ts +0 -4
- package/index.js +0 -19
- package/types.d.ts +0 -35
- package/types.js +0 -5
- package/umd/index.js +0 -10
- package/useAppBridge.d.ts +0 -1
- package/useAppBridge.js +0 -13
- package/utilities/transformers.d.ts +0 -20
- package/utilities/transformers.js +0 -105
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLocale = void 0;
|
|
4
|
-
var useAppBridgeState_1 = require("../useAppBridgeState");
|
|
5
|
-
function useLocale() {
|
|
6
|
-
return useAppBridgeState_1.useAppBridgeState('staffMember.locale');
|
|
7
|
-
}
|
|
8
|
-
exports.useLocale = useLocale;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useNavigate } from './useNavigate';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useNavigate = void 0;
|
|
4
|
-
var useNavigate_1 = require("./useNavigate");
|
|
5
|
-
Object.defineProperty(exports, "useNavigate", { enumerable: true, get: function () { return useNavigate_1.useNavigate; } });
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { To, Navigate } from '@shopify/app-bridge/actions/Navigation/Redirect';
|
|
2
|
-
export declare function useNavigate(): Navigate<To>;
|
|
3
|
-
export type { Location, AppOptions, HostOptions, Options, To, SectionStringName, Navigate, } from '@shopify/app-bridge/actions/Navigation/Redirect';
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useNavigate = void 0;
|
|
15
|
-
var react_1 = require("react");
|
|
16
|
-
var Redirect_1 = require("@shopify/app-bridge/actions/Navigation/Redirect");
|
|
17
|
-
var useAppBridge_1 = require("../../useAppBridge");
|
|
18
|
-
var useNavigationHistory_1 = require("../useNavigationHistory");
|
|
19
|
-
function useNavigate() {
|
|
20
|
-
var app = useAppBridge_1.useAppBridge();
|
|
21
|
-
var history = useNavigationHistory_1.useNavigationHistory();
|
|
22
|
-
var redirect = react_1.useMemo(function () {
|
|
23
|
-
return Redirect_1.create(app);
|
|
24
|
-
}, [app]);
|
|
25
|
-
var handleRedirect = react_1.useCallback(function (to, options) {
|
|
26
|
-
var url = Redirect_1.normalizeUrl(to);
|
|
27
|
-
var isAppUrl = url.startsWith(app.localOrigin);
|
|
28
|
-
var isHostUrl = url.startsWith(app.hostOrigin);
|
|
29
|
-
var isRelative = url.startsWith('/');
|
|
30
|
-
if (isAppUrl || isHostUrl || isRelative) {
|
|
31
|
-
var path = Redirect_1.getRelativePath(url);
|
|
32
|
-
if (isHostUrl || (options === null || options === void 0 ? void 0 : options.target) === 'new' || (options === null || options === void 0 ? void 0 : options.target) === 'host') {
|
|
33
|
-
redirect.dispatch(Redirect_1.Action.ADMIN_PATH, {
|
|
34
|
-
path: path.replace(/^\/admin/, ''),
|
|
35
|
-
newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',
|
|
36
|
-
});
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (((options === null || options === void 0 ? void 0 : options.target) === 'self' || !(options === null || options === void 0 ? void 0 : options.target)) && (options === null || options === void 0 ? void 0 : options.replace)) {
|
|
40
|
-
history.replace({ pathname: path });
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
redirect.dispatch(Redirect_1.Action.APP, path);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
redirect.dispatch(Redirect_1.Action.REMOTE, {
|
|
47
|
-
url: url,
|
|
48
|
-
newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',
|
|
49
|
-
});
|
|
50
|
-
}, [redirect, history]);
|
|
51
|
-
return react_1.useCallback(function (to, options) {
|
|
52
|
-
if (Redirect_1.isAdminSection(to)) {
|
|
53
|
-
var convertedSection = __assign(__assign({}, to), { name: Redirect_1.ResourceType[to.name] });
|
|
54
|
-
redirect.dispatch(Redirect_1.Action.ADMIN_SECTION, {
|
|
55
|
-
section: convertedSection,
|
|
56
|
-
newContext: (options === null || options === void 0 ? void 0 : options.target) === 'new',
|
|
57
|
-
});
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
handleRedirect(to, options);
|
|
61
|
-
}, [handleRedirect, redirect]);
|
|
62
|
-
}
|
|
63
|
-
exports.useNavigate = useNavigate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useNavigationHistory } from './useNavigationHistory';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useNavigationHistory = void 0;
|
|
4
|
-
var useNavigationHistory_1 = require("./useNavigationHistory");
|
|
5
|
-
Object.defineProperty(exports, "useNavigationHistory", { enumerable: true, get: function () { return useNavigationHistory_1.useNavigationHistory; } });
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useNavigationHistory hook
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* React hook which wraps the Shopify App Bridge History action.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare function useNavigationHistory(): {
|
|
10
|
-
push: (location: {
|
|
11
|
-
pathname: string;
|
|
12
|
-
}) => void;
|
|
13
|
-
replace: (location: {
|
|
14
|
-
pathname: string;
|
|
15
|
-
}) => void;
|
|
16
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useNavigationHistory = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var actions_1 = require("@shopify/app-bridge/actions");
|
|
6
|
-
var useAppBridge_1 = require("../../useAppBridge");
|
|
7
|
-
/**
|
|
8
|
-
* useNavigationHistory hook
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* React hook which wraps the Shopify App Bridge History action.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
function useNavigationHistory() {
|
|
16
|
-
var app = useAppBridge_1.useAppBridge();
|
|
17
|
-
return react_1.useMemo(function () {
|
|
18
|
-
var history = actions_1.History.create(app);
|
|
19
|
-
function push(location) {
|
|
20
|
-
history.dispatch(actions_1.History.Action.PUSH, location.pathname);
|
|
21
|
-
}
|
|
22
|
-
function replace(location) {
|
|
23
|
-
history.dispatch(actions_1.History.Action.REPLACE, location.pathname);
|
|
24
|
-
}
|
|
25
|
-
return { push: push, replace: replace };
|
|
26
|
-
}, []);
|
|
27
|
-
}
|
|
28
|
-
exports.useNavigationHistory = useNavigationHistory;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useOnceEffect';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./useOnceEffect"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useOnceEffect = void 0;
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
/**
|
|
9
|
-
* `useLayoutEffect`, but never runs twice, even in React 18 StrictMode.
|
|
10
|
-
*/
|
|
11
|
-
exports.useOnceEffect = react_1.default.useInsertionEffect || react_1.default.useLayoutEffect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useToast } from './useToast';
|
package/hooks/useToast/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@shopify/app-bridge/actions/Toast';
|
|
2
|
-
export declare const DEFAULT_TOAST_DURATION = 5000;
|
|
3
|
-
interface ShowOptionsPayload extends Payload {
|
|
4
|
-
action?: {
|
|
5
|
-
content: string;
|
|
6
|
-
onAction?: () => void;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* useToast hook
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* React hook which wraps the Shopify App Bridge Toast action.
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export declare function useToast(): {
|
|
18
|
-
show: (content: string, options?: Partial<Omit<ShowOptionsPayload, "message">> | undefined) => void;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useToast = exports.DEFAULT_TOAST_DURATION = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var Toast_1 = require("@shopify/app-bridge/actions/Toast");
|
|
6
|
-
var useAppBridge_1 = require("../../useAppBridge");
|
|
7
|
-
exports.DEFAULT_TOAST_DURATION = 5000;
|
|
8
|
-
/**
|
|
9
|
-
* useToast hook
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* React hook which wraps the Shopify App Bridge Toast action.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
function useToast() {
|
|
17
|
-
var app = useAppBridge_1.useAppBridge();
|
|
18
|
-
var toastList = react_1.useRef([]);
|
|
19
|
-
var show = react_1.useCallback(function (content, options) {
|
|
20
|
-
var toast = Toast_1.create(app, {
|
|
21
|
-
message: content,
|
|
22
|
-
isError: options === null || options === void 0 ? void 0 : options.isError,
|
|
23
|
-
duration: (options === null || options === void 0 ? void 0 : options.duration) || exports.DEFAULT_TOAST_DURATION,
|
|
24
|
-
action: options === null || options === void 0 ? void 0 : options.action,
|
|
25
|
-
});
|
|
26
|
-
toast.dispatch(Toast_1.Action.SHOW);
|
|
27
|
-
toastList.current.push(toast);
|
|
28
|
-
toast.subscribe(Toast_1.Action.CLEAR, function () {
|
|
29
|
-
var _a;
|
|
30
|
-
(_a = options === null || options === void 0 ? void 0 : options.onDismiss) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
31
|
-
toastList.current.splice(toastList.current.indexOf(toast), 1);
|
|
32
|
-
toast.unsubscribe();
|
|
33
|
-
});
|
|
34
|
-
toast.subscribe(Toast_1.Action.ACTION, function () {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
(_b = (_a = options === null || options === void 0 ? void 0 : options.action) === null || _a === void 0 ? void 0 : _a.onAction) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
37
|
-
});
|
|
38
|
-
}, [app]);
|
|
39
|
-
react_1.useEffect(function () {
|
|
40
|
-
return function () {
|
|
41
|
-
toastList.current.forEach(function (toast) { return toast === null || toast === void 0 ? void 0 : toast.unsubscribe(); });
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
|
-
return { show: show };
|
|
45
|
-
}
|
|
46
|
-
exports.useToast = useToast;
|
package/index.d.ts
DELETED
package/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.useAppBridge = exports.Context = void 0;
|
|
14
|
-
var context_1 = require("./context");
|
|
15
|
-
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_1.AppBridgeContext; } });
|
|
16
|
-
var useAppBridge_1 = require("./useAppBridge");
|
|
17
|
-
Object.defineProperty(exports, "useAppBridge", { enumerable: true, get: function () { return useAppBridge_1.useAppBridge; } });
|
|
18
|
-
__exportStar(require("./components"), exports);
|
|
19
|
-
__exportStar(require("./hooks"), exports);
|
package/types.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Redirect } from '@shopify/app-bridge/actions';
|
|
2
|
-
import { Group } from '@shopify/app-bridge/actions/types';
|
|
3
|
-
export declare type Target = Exclude<keyof typeof Redirect.Action, 'ADMIN_SECTION'>;
|
|
4
|
-
export interface ActionProps {
|
|
5
|
-
/** Content the action displays */
|
|
6
|
-
content?: string;
|
|
7
|
-
/** Should the action be styled as destructive */
|
|
8
|
-
destructive?: boolean;
|
|
9
|
-
/** Should the action be disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Should the action be loading */
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
/** Forces url to open in a new tab */
|
|
14
|
-
external?: boolean;
|
|
15
|
-
/** Use Polaris plain styling */
|
|
16
|
-
plain?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Where to display the target link
|
|
19
|
-
* @default 'APP'
|
|
20
|
-
*/
|
|
21
|
-
target?: Target;
|
|
22
|
-
/** A destination to link to */
|
|
23
|
-
url?: string;
|
|
24
|
-
/** Callback when an action takes place */
|
|
25
|
-
onAction?(): void;
|
|
26
|
-
}
|
|
27
|
-
export interface ActionGroupProps {
|
|
28
|
-
/** Action group title */
|
|
29
|
-
title: string;
|
|
30
|
-
/** Use Polaris plain styling */
|
|
31
|
-
plain?: boolean;
|
|
32
|
-
/** List of actions */
|
|
33
|
-
actions: ActionProps[];
|
|
34
|
-
}
|
|
35
|
-
export { Group };
|
package/types.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Group = void 0;
|
|
4
|
-
var types_1 = require("@shopify/app-bridge/actions/types");
|
|
5
|
-
Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return types_1.Group; } });
|