@open-tender/store 0.1.310 → 0.1.312
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/dist/cjs/components/Checkout.d.ts +3 -1
- package/dist/cjs/components/Checkout.js +2 -1
- package/dist/cjs/slices/notifications.d.ts +1 -1
- package/dist/cjs/slices/notifications.js +4 -3
- package/dist/esm/components/Checkout.d.ts +3 -1
- package/dist/esm/components/Checkout.js +2 -1
- package/dist/esm/slices/notifications.d.ts +1 -1
- package/dist/esm/slices/notifications.js +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckoutProps, Handlers } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, content, backTitle, proceedTitle, showFooter, showBottomText, renderHeader, renderTotals, children, showViewOrder, isScrollable }: {
|
|
3
|
+
declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, content, backTitle, proceedTitle, showFooter, showBottomText, renderHeader, renderTotals, children, showViewOrder, isScrollable, hasError }: {
|
|
4
4
|
handlers: Handlers;
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: string | null;
|
|
@@ -18,7 +18,9 @@ declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, co
|
|
|
18
18
|
showBottomText?: boolean;
|
|
19
19
|
showViewOrder?: boolean;
|
|
20
20
|
isScrollable?: boolean;
|
|
21
|
+
hasError?: boolean;
|
|
21
22
|
}) => ReactNode;
|
|
22
23
|
isScrollable?: boolean;
|
|
24
|
+
hasError?: boolean;
|
|
23
25
|
}) => ReactNode;
|
|
24
26
|
export default CheckoutContainer;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var hooks_1 = require("../app/hooks");
|
|
4
4
|
var slices_1 = require("../slices");
|
|
5
5
|
var CheckoutContainer = function (_a) {
|
|
6
|
-
var handlers = _a.handlers, title = _a.title, subtitle = _a.subtitle, headerContent = _a.headerContent, content = _a.content, backTitle = _a.backTitle, proceedTitle = _a.proceedTitle, showFooter = _a.showFooter, showBottomText = _a.showBottomText, renderHeader = _a.renderHeader, renderTotals = _a.renderTotals, children = _a.children, showViewOrder = _a.showViewOrder, isScrollable = _a.isScrollable;
|
|
6
|
+
var handlers = _a.handlers, title = _a.title, subtitle = _a.subtitle, headerContent = _a.headerContent, content = _a.content, backTitle = _a.backTitle, proceedTitle = _a.proceedTitle, showFooter = _a.showFooter, showBottomText = _a.showBottomText, renderHeader = _a.renderHeader, renderTotals = _a.renderTotals, children = _a.children, showViewOrder = _a.showViewOrder, isScrollable = _a.isScrollable, hasError = _a.hasError;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkout;
|
|
8
8
|
if (!config)
|
|
9
9
|
return null;
|
|
@@ -20,6 +20,7 @@ var CheckoutContainer = function (_a) {
|
|
|
20
20
|
showBottomText: showBottomText,
|
|
21
21
|
showViewOrder: showViewOrder,
|
|
22
22
|
isScrollable: isScrollable,
|
|
23
|
+
hasError: hasError,
|
|
23
24
|
renderHeader: renderHeader,
|
|
24
25
|
renderTotals: renderTotals
|
|
25
26
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Notifications } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
|
-
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">;
|
|
3
|
+
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">, hideAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/hideAllNotifications">;
|
|
4
4
|
export declare const selectNotifications: (state: AppState) => Notifications;
|
|
5
5
|
export declare const notificationsReducer: import("redux").Reducer<Notifications>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.notificationsReducer = exports.selectNotifications = exports.hideNotification = exports.showNotification = void 0;
|
|
4
|
+
exports.notificationsReducer = exports.selectNotifications = exports.hideAllNotifications = exports.hideNotification = exports.showNotification = void 0;
|
|
5
5
|
var utils_1 = require("@open-tender/utils");
|
|
6
6
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
var types_1 = require("./types");
|
|
@@ -16,10 +16,11 @@ var notificationsSlice = (0, toolkit_1.createSlice)({
|
|
|
16
16
|
hideNotification: function (state, action) {
|
|
17
17
|
// state = state.filter(i => i.id !== action.payload)
|
|
18
18
|
state.splice(state.findIndex(function (i) { return i.id === action.payload; }), 1);
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
hideAllNotifications: function () { return []; }
|
|
20
21
|
}
|
|
21
22
|
});
|
|
22
|
-
exports.showNotification = (_a = notificationsSlice.actions, _a.showNotification), exports.hideNotification = _a.hideNotification;
|
|
23
|
+
exports.showNotification = (_a = notificationsSlice.actions, _a.showNotification), exports.hideNotification = _a.hideNotification, exports.hideAllNotifications = _a.hideAllNotifications;
|
|
23
24
|
var selectNotifications = function (state) { return state.notifications; };
|
|
24
25
|
exports.selectNotifications = selectNotifications;
|
|
25
26
|
exports.notificationsReducer = notificationsSlice.reducer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckoutProps, Handlers } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, content, backTitle, proceedTitle, showFooter, showBottomText, renderHeader, renderTotals, children, showViewOrder, isScrollable }: {
|
|
3
|
+
declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, content, backTitle, proceedTitle, showFooter, showBottomText, renderHeader, renderTotals, children, showViewOrder, isScrollable, hasError }: {
|
|
4
4
|
handlers: Handlers;
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: string | null;
|
|
@@ -18,7 +18,9 @@ declare const CheckoutContainer: ({ handlers, title, subtitle, headerContent, co
|
|
|
18
18
|
showBottomText?: boolean;
|
|
19
19
|
showViewOrder?: boolean;
|
|
20
20
|
isScrollable?: boolean;
|
|
21
|
+
hasError?: boolean;
|
|
21
22
|
}) => ReactNode;
|
|
22
23
|
isScrollable?: boolean;
|
|
24
|
+
hasError?: boolean;
|
|
23
25
|
}) => ReactNode;
|
|
24
26
|
export default CheckoutContainer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAppSelector } from '../app/hooks';
|
|
2
2
|
import { selectKioskConfig } from '../slices';
|
|
3
3
|
var CheckoutContainer = function (_a) {
|
|
4
|
-
var handlers = _a.handlers, title = _a.title, subtitle = _a.subtitle, headerContent = _a.headerContent, content = _a.content, backTitle = _a.backTitle, proceedTitle = _a.proceedTitle, showFooter = _a.showFooter, showBottomText = _a.showBottomText, renderHeader = _a.renderHeader, renderTotals = _a.renderTotals, children = _a.children, showViewOrder = _a.showViewOrder, isScrollable = _a.isScrollable;
|
|
4
|
+
var handlers = _a.handlers, title = _a.title, subtitle = _a.subtitle, headerContent = _a.headerContent, content = _a.content, backTitle = _a.backTitle, proceedTitle = _a.proceedTitle, showFooter = _a.showFooter, showBottomText = _a.showBottomText, renderHeader = _a.renderHeader, renderTotals = _a.renderTotals, children = _a.children, showViewOrder = _a.showViewOrder, isScrollable = _a.isScrollable, hasError = _a.hasError;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).checkout;
|
|
6
6
|
if (!config)
|
|
7
7
|
return null;
|
|
@@ -18,6 +18,7 @@ var CheckoutContainer = function (_a) {
|
|
|
18
18
|
showBottomText: showBottomText,
|
|
19
19
|
showViewOrder: showViewOrder,
|
|
20
20
|
isScrollable: isScrollable,
|
|
21
|
+
hasError: hasError,
|
|
21
22
|
renderHeader: renderHeader,
|
|
22
23
|
renderTotals: renderTotals
|
|
23
24
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Notifications } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
|
-
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">;
|
|
3
|
+
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">, hideAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/hideAllNotifications">;
|
|
4
4
|
export declare const selectNotifications: (state: AppState) => Notifications;
|
|
5
5
|
export declare const notificationsReducer: import("redux").Reducer<Notifications>;
|
|
@@ -13,9 +13,10 @@ var notificationsSlice = createSlice({
|
|
|
13
13
|
hideNotification: function (state, action) {
|
|
14
14
|
// state = state.filter(i => i.id !== action.payload)
|
|
15
15
|
state.splice(state.findIndex(function (i) { return i.id === action.payload; }), 1);
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
hideAllNotifications: function () { return []; }
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
export var showNotification = (_a = notificationsSlice.actions, _a.showNotification), hideNotification = _a.hideNotification;
|
|
20
|
+
export var showNotification = (_a = notificationsSlice.actions, _a.showNotification), hideNotification = _a.hideNotification, hideAllNotifications = _a.hideAllNotifications;
|
|
20
21
|
export var selectNotifications = function (state) { return state.notifications; };
|
|
21
22
|
export var notificationsReducer = notificationsSlice.reducer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.312",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|