@open-tender/cloud 0.1.112 → 0.1.113
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppTheme, ConfigApp, ConfigBrand, ConfigContent, ConfigSettings, RequestError, RequestStatus, Theme } from '@open-tender/types';
|
|
1
|
+
import { AppTheme, ConfigApp, ConfigBrand, ConfigContent, ConfigSettings, OrderAppPages, RequestError, RequestStatus, Theme } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface ConfigState {
|
|
4
4
|
api: any;
|
|
@@ -6,13 +6,14 @@ export interface ConfigState {
|
|
|
6
6
|
appTheme: AppTheme | null;
|
|
7
7
|
brand: ConfigBrand | null;
|
|
8
8
|
content: ConfigContent | null;
|
|
9
|
-
stylesheet: string | null;
|
|
10
9
|
error: any;
|
|
11
10
|
isApp: boolean | undefined;
|
|
12
11
|
isBackgroundFetch: boolean;
|
|
13
12
|
loading: RequestStatus;
|
|
13
|
+
pages: OrderAppPages | null;
|
|
14
14
|
retries: number;
|
|
15
15
|
settings: ConfigSettings | null;
|
|
16
|
+
stylesheet: string | null;
|
|
16
17
|
theme: Theme | null;
|
|
17
18
|
}
|
|
18
19
|
export declare enum ConfigActionType {
|
|
@@ -43,6 +44,7 @@ export declare const selectTheme: (state: AppState) => Theme | null;
|
|
|
43
44
|
export declare const selectContent: (state: AppState) => ConfigContent | null;
|
|
44
45
|
export declare const selectSettings: (state: AppState) => ConfigSettings | null;
|
|
45
46
|
export declare const selectStylesheet: (state: AppState) => string | null;
|
|
47
|
+
export declare const selectPages: (state: AppState) => OrderAppPages | null;
|
|
46
48
|
export declare const selectApi: (state: AppState) => any;
|
|
47
49
|
export declare const selectAccountConfig: (state: AppState) => {
|
|
48
50
|
addresses: import("@open-tender/types").ConfigContentField;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.configReducer = exports.selectCategoryType = exports.selectHasCatering = exports.selectOutpostName = exports.selectHeaderHeight = exports.selectSoldOutMsg = exports.selectContentSection = exports.selectRecaptcha = exports.selectFulfillment = exports.selectOptIns = exports.selectLightColor = exports.selectConfigRetries = exports.selectDisplaySettings = exports.selectAccountConfig = exports.selectApi = exports.selectStylesheet = exports.selectSettings = exports.selectContent = exports.selectTheme = exports.selectBrand = exports.selectConfig = exports.selectCateringOnly = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
4
|
+
exports.configReducer = exports.selectCategoryType = exports.selectHasCatering = exports.selectOutpostName = exports.selectHeaderHeight = exports.selectSoldOutMsg = exports.selectContentSection = exports.selectRecaptcha = exports.selectFulfillment = exports.selectOptIns = exports.selectLightColor = exports.selectConfigRetries = exports.selectDisplaySettings = exports.selectAccountConfig = exports.selectApi = exports.selectPages = exports.selectStylesheet = exports.selectSettings = exports.selectContent = exports.selectTheme = exports.selectBrand = exports.selectConfig = exports.selectCateringOnly = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const utils_1 = require("@open-tender/utils");
|
|
@@ -13,14 +13,15 @@ const initialState = {
|
|
|
13
13
|
appTheme: null,
|
|
14
14
|
brand: null,
|
|
15
15
|
content: null,
|
|
16
|
-
|
|
17
|
-
theme: null,
|
|
16
|
+
error: null,
|
|
18
17
|
isApp: false,
|
|
19
18
|
isBackgroundFetch: false,
|
|
20
19
|
loading: 'idle',
|
|
21
|
-
|
|
20
|
+
pages: null,
|
|
22
21
|
retries: 0,
|
|
23
|
-
settings: null
|
|
22
|
+
settings: null,
|
|
23
|
+
stylesheet: null,
|
|
24
|
+
theme: null
|
|
24
25
|
};
|
|
25
26
|
var ConfigActionType;
|
|
26
27
|
(function (ConfigActionType) {
|
|
@@ -59,7 +60,7 @@ const configSlice = (0, toolkit_1.createSlice)({
|
|
|
59
60
|
extraReducers: builder => {
|
|
60
61
|
builder
|
|
61
62
|
.addCase(exports.fetchConfig.fulfilled, (state, action) => {
|
|
62
|
-
const { app, isApp, brand, content, theme, settings, stylesheet } = action.payload;
|
|
63
|
+
const { app, isApp, brand, content, theme, settings, stylesheet, pages } = action.payload;
|
|
63
64
|
state.app = app;
|
|
64
65
|
state.brand = brand;
|
|
65
66
|
state.content = content;
|
|
@@ -67,6 +68,7 @@ const configSlice = (0, toolkit_1.createSlice)({
|
|
|
67
68
|
state.appTheme = isApp && theme ? (0, utils_1.decorateTheme)(theme) : null;
|
|
68
69
|
state.settings = settings;
|
|
69
70
|
state.stylesheet = stylesheet;
|
|
71
|
+
state.pages = pages;
|
|
70
72
|
state.loading = 'idle';
|
|
71
73
|
state.api = new api_1.default(app);
|
|
72
74
|
state.error = null;
|
|
@@ -101,6 +103,8 @@ const selectSettings = (state) => state.config.settings;
|
|
|
101
103
|
exports.selectSettings = selectSettings;
|
|
102
104
|
const selectStylesheet = (state) => state.config.stylesheet;
|
|
103
105
|
exports.selectStylesheet = selectStylesheet;
|
|
106
|
+
const selectPages = (state) => state.config.pages;
|
|
107
|
+
exports.selectPages = selectPages;
|
|
104
108
|
const selectApi = (state) => state.config.api;
|
|
105
109
|
exports.selectApi = selectApi;
|
|
106
110
|
const selectAccountConfig = (state) => { var _a; return (_a = state.config.content) === null || _a === void 0 ? void 0 : _a.account; };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppTheme, ConfigApp, ConfigBrand, ConfigContent, ConfigSettings, RequestError, RequestStatus, Theme } from '@open-tender/types';
|
|
1
|
+
import { AppTheme, ConfigApp, ConfigBrand, ConfigContent, ConfigSettings, OrderAppPages, RequestError, RequestStatus, Theme } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
3
|
export interface ConfigState {
|
|
4
4
|
api: any;
|
|
@@ -6,13 +6,14 @@ export interface ConfigState {
|
|
|
6
6
|
appTheme: AppTheme | null;
|
|
7
7
|
brand: ConfigBrand | null;
|
|
8
8
|
content: ConfigContent | null;
|
|
9
|
-
stylesheet: string | null;
|
|
10
9
|
error: any;
|
|
11
10
|
isApp: boolean | undefined;
|
|
12
11
|
isBackgroundFetch: boolean;
|
|
13
12
|
loading: RequestStatus;
|
|
13
|
+
pages: OrderAppPages | null;
|
|
14
14
|
retries: number;
|
|
15
15
|
settings: ConfigSettings | null;
|
|
16
|
+
stylesheet: string | null;
|
|
16
17
|
theme: Theme | null;
|
|
17
18
|
}
|
|
18
19
|
export declare enum ConfigActionType {
|
|
@@ -43,6 +44,7 @@ export declare const selectTheme: (state: AppState) => Theme | null;
|
|
|
43
44
|
export declare const selectContent: (state: AppState) => ConfigContent | null;
|
|
44
45
|
export declare const selectSettings: (state: AppState) => ConfigSettings | null;
|
|
45
46
|
export declare const selectStylesheet: (state: AppState) => string | null;
|
|
47
|
+
export declare const selectPages: (state: AppState) => OrderAppPages | null;
|
|
46
48
|
export declare const selectApi: (state: AppState) => any;
|
|
47
49
|
export declare const selectAccountConfig: (state: AppState) => {
|
|
48
50
|
addresses: import("@open-tender/types").ConfigContentField;
|
|
@@ -9,14 +9,15 @@ const initialState = {
|
|
|
9
9
|
appTheme: null,
|
|
10
10
|
brand: null,
|
|
11
11
|
content: null,
|
|
12
|
-
|
|
13
|
-
theme: null,
|
|
12
|
+
error: null,
|
|
14
13
|
isApp: false,
|
|
15
14
|
isBackgroundFetch: false,
|
|
16
15
|
loading: 'idle',
|
|
17
|
-
|
|
16
|
+
pages: null,
|
|
18
17
|
retries: 0,
|
|
19
|
-
settings: null
|
|
18
|
+
settings: null,
|
|
19
|
+
stylesheet: null,
|
|
20
|
+
theme: null
|
|
20
21
|
};
|
|
21
22
|
export var ConfigActionType;
|
|
22
23
|
(function (ConfigActionType) {
|
|
@@ -55,7 +56,7 @@ const configSlice = createSlice({
|
|
|
55
56
|
extraReducers: builder => {
|
|
56
57
|
builder
|
|
57
58
|
.addCase(fetchConfig.fulfilled, (state, action) => {
|
|
58
|
-
const { app, isApp, brand, content, theme, settings, stylesheet } = action.payload;
|
|
59
|
+
const { app, isApp, brand, content, theme, settings, stylesheet, pages } = action.payload;
|
|
59
60
|
state.app = app;
|
|
60
61
|
state.brand = brand;
|
|
61
62
|
state.content = content;
|
|
@@ -63,6 +64,7 @@ const configSlice = createSlice({
|
|
|
63
64
|
state.appTheme = isApp && theme ? decorateTheme(theme) : null;
|
|
64
65
|
state.settings = settings;
|
|
65
66
|
state.stylesheet = stylesheet;
|
|
67
|
+
state.pages = pages;
|
|
66
68
|
state.loading = 'idle';
|
|
67
69
|
state.api = new OpenTenderAPI(app);
|
|
68
70
|
state.error = null;
|
|
@@ -90,6 +92,7 @@ export const selectTheme = (state) => state.config.theme;
|
|
|
90
92
|
export const selectContent = (state) => state.config.content;
|
|
91
93
|
export const selectSettings = (state) => state.config.settings;
|
|
92
94
|
export const selectStylesheet = (state) => state.config.stylesheet;
|
|
95
|
+
export const selectPages = (state) => state.config.pages;
|
|
93
96
|
export const selectApi = (state) => state.config.api;
|
|
94
97
|
export const selectAccountConfig = (state) => { var _a; return (_a = state.config.content) === null || _a === void 0 ? void 0 : _a.account; };
|
|
95
98
|
export const selectDisplaySettings = (state) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.113",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "^4.8.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@open-tender/types": "^0.2.
|
|
53
|
-
"@open-tender/utils": "^0.1.
|
|
52
|
+
"@open-tender/types": "^0.2.104",
|
|
53
|
+
"@open-tender/utils": "^0.1.173",
|
|
54
54
|
"@reduxjs/toolkit": "^1.8.5",
|
|
55
55
|
"react": "^18.2.0"
|
|
56
56
|
}
|