@tiendanube/nexo 0.0.0 → 0.1.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/actions/actions.d.ts +10 -0
- package/actions/actions.js +3 -1
- package/helpers/helpers.d.ts +2 -1
- package/helpers/helpers.js +8 -1
- package/package.json +1 -1
package/actions/actions.d.ts
CHANGED
|
@@ -31,3 +31,13 @@ export declare type CopyToClipboardRequest = {
|
|
|
31
31
|
export declare type CopyToClipboardReponse = {
|
|
32
32
|
success: boolean;
|
|
33
33
|
};
|
|
34
|
+
export declare const ACTION_NAVIGATE_GOTO_OLD_ADMIN = "app/navigate/goToOldAdmin";
|
|
35
|
+
export declare type NavegateGoToOldAdminRequest = {
|
|
36
|
+
pathToOldAdmin: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const ACTION_NAVIGATE_HEADER = "app/navigate/header";
|
|
39
|
+
export declare type NavegateHeaderRequest = {
|
|
40
|
+
goTo?: string;
|
|
41
|
+
goToAdmin?: string;
|
|
42
|
+
text?: string;
|
|
43
|
+
};
|
package/actions/actions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ACTION_UTILS_COPY_TO_CLIPBOARD = exports.ACTION_STORE_INFO = exports.ACTION_AUTH_SESSION_TOKEN = exports.ACTION_NAVIGATE_SYNC = exports.ACTION_NAVIGATE_PATHNAME = exports.ACTION_NAVIGATE_GOTO = exports.ACTION_NAVIGATE_BACK = exports.ACTION_NAVEGATE_EXIT = exports.ACTION_CONNECTED = exports.ACTION_READY = void 0;
|
|
3
|
+
exports.ACTION_NAVIGATE_HEADER = exports.ACTION_NAVIGATE_GOTO_OLD_ADMIN = exports.ACTION_UTILS_COPY_TO_CLIPBOARD = exports.ACTION_STORE_INFO = exports.ACTION_AUTH_SESSION_TOKEN = exports.ACTION_NAVIGATE_SYNC = exports.ACTION_NAVIGATE_PATHNAME = exports.ACTION_NAVIGATE_GOTO = exports.ACTION_NAVIGATE_BACK = exports.ACTION_NAVEGATE_EXIT = exports.ACTION_CONNECTED = exports.ACTION_READY = void 0;
|
|
4
4
|
exports.ACTION_READY = "app/ready";
|
|
5
5
|
exports.ACTION_CONNECTED = "app/connected";
|
|
6
6
|
exports.ACTION_NAVEGATE_EXIT = "app/navigate/exit";
|
|
@@ -11,3 +11,5 @@ exports.ACTION_NAVIGATE_SYNC = "app/navigate/sync";
|
|
|
11
11
|
exports.ACTION_AUTH_SESSION_TOKEN = "app/auth/sessionToken";
|
|
12
12
|
exports.ACTION_STORE_INFO = "app/store/info";
|
|
13
13
|
exports.ACTION_UTILS_COPY_TO_CLIPBOARD = "app/utils/copyToClipboard";
|
|
14
|
+
exports.ACTION_NAVIGATE_GOTO_OLD_ADMIN = "app/navigate/goToOldAdmin";
|
|
15
|
+
exports.ACTION_NAVIGATE_HEADER = "app/navigate/header";
|
package/helpers/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoreInfoReponse } from "../actions/actions";
|
|
1
|
+
import { StoreInfoReponse, NavegateHeaderRequest } from "../actions/actions";
|
|
2
2
|
import { NexoClient } from "../core/nexoClient";
|
|
3
3
|
export declare const connect: (nexo: NexoClient, ttl?: number) => Promise<void>;
|
|
4
4
|
export declare const iAmReady: (nexo: NexoClient) => void;
|
|
@@ -10,3 +10,4 @@ export declare const syncPathname: (nexo: NexoClient, pathname: string) => void;
|
|
|
10
10
|
export declare const getStoreInfo: (nexo: NexoClient) => Promise<StoreInfoReponse>;
|
|
11
11
|
export declare const goTo: (nexo: NexoClient, pathname: string) => void;
|
|
12
12
|
export declare const copyToClipboard: (nexo: NexoClient, text: string) => Promise<boolean>;
|
|
13
|
+
export declare const navigateHeader: (nexo: NexoClient, config: NavegateHeaderRequest) => void;
|
package/helpers/helpers.js
CHANGED
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.copyToClipboard = exports.goTo = exports.getStoreInfo = exports.syncPathname = exports.getCurrentPathname = exports.getSessionToken = exports.navegateBack = exports.navegateExit = exports.iAmReady = exports.connect = void 0;
|
|
39
|
+
exports.navigateHeader = exports.copyToClipboard = exports.goTo = exports.getStoreInfo = exports.syncPathname = exports.getCurrentPathname = exports.getSessionToken = exports.navegateBack = exports.navegateExit = exports.iAmReady = exports.connect = void 0;
|
|
40
40
|
var actions_1 = require("../actions/actions");
|
|
41
41
|
var utils_1 = require("../core/utils");
|
|
42
42
|
var connect = function (nexo, ttl) {
|
|
@@ -117,3 +117,10 @@ var copyToClipboard = function (nexo, text) { return __awaiter(void 0, void 0, v
|
|
|
117
117
|
});
|
|
118
118
|
}); };
|
|
119
119
|
exports.copyToClipboard = copyToClipboard;
|
|
120
|
+
var navigateHeader = function (nexo, config) {
|
|
121
|
+
nexo.dispatch({
|
|
122
|
+
type: actions_1.ACTION_NAVIGATE_HEADER,
|
|
123
|
+
payload: config,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
exports.navigateHeader = navigateHeader;
|